feat: manually mirror opencoze's code from bytedance

Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
fanlv
2025-07-20 17:36:12 +08:00
commit 890153324f
14811 changed files with 1923430 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import AppBuilderApiService from './idl/app_builder';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const appBuilderApi = new AppBuilderApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const reqHeaders = {
...config.headers,
...params.headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,59 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Toast } from '@coze-arch/bot-semi';
import {
axiosInstance,
isApiError,
type AxiosRequestConfig,
} from '@coze-arch/bot-http';
// Toast展示位置离top 80px
Toast.config({
top: 80,
});
interface CustomAxiosConfig {
// eslint-disable-next-line @typescript-eslint/naming-convention
__disableErrorToast?: boolean;
}
/**
* 业务自定义 axios 配置
* @param __disableErrorToast default: false
*/
export type BotAPIRequestConfig = AxiosRequestConfig & CustomAxiosConfig;
axiosInstance.interceptors.response.use(
response => response.data,
error => {
// 业务逻辑
if (
isApiError(error) &&
error.msg &&
!(error.config as CustomAxiosConfig).__disableErrorToast
) {
Toast.error({
content: error.msg,
showClose: false,
});
}
throw error;
},
);
export { axiosInstance };

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import BasicApiService from '@coze-arch/idl/basic_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const basicApi = new BasicApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, 'Agw-Js-Conv': 'str' },
}),
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import BenefitApiService from './idl/benefit';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const benefitApi = new BenefitApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import CardApiService from './idl/card';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const cardApi = new CardApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const reqHeaders = {
...config.headers,
...params.headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import queryString from 'query-string';
import ConnectorApiService from './idl/connector_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const connectorApi = new ConnectorApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
paramsSerializer: p => queryString.stringify(p, { arrayFormat: 'comma' }),
...params,
...config,
}),
});

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import CozeSpaceApiService from '@coze-arch/idl/stone_coze_space';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const cozeSpaceApi = new CozeSpaceApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const reqHeaders = {
...config.headers,
...params.headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DebuggerApiService from './idl/debugger_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const debuggerApi = new DebuggerApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const { headers } = config;
const reqHeaders = {
...headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DeveloperApiService from './idl/developer_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const DeveloperApi = new DeveloperApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DeveloperBackendApiService from './idl/developer_backend';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const developerBackendApi =
new DeveloperBackendApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DevopsEvaluationService from './idl/devops_evaluation';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const devopsEvaluationApi =
new DevopsEvaluationService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const reqHeaders = {
...config.headers,
...params.headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({
...params,
...config,
headers: reqHeaders,
});
},
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import DpManageService from './idl/dp_manage';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const dpManageApi = new DpManageService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import EvaluationLiteService from './idl/evaluation_lite';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const evaluationLiteApi = new EvaluationLiteService<BotAPIRequestConfig>(
{
request: (params, config = {}) => {
const headers = {
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers });
},
},
);

View File

@@ -0,0 +1,31 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FileboxService from './idl/filebox';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fileboxApi = new FileboxService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const { headers } = config;
const reqHeaders = {
...headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});
export { ObjType } from './idl/filebox';

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FornaxApiService from '@coze-arch/idl/fornax_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fornaxApi = new FornaxApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import EvaluationApiService from '@coze-arch/idl/evaluation_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const evaluationApi = new EvaluationApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FornaxMlFlowService from '@coze-arch/idl/fornax_ml_flow';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fornaxMlFlowApi = new FornaxMlFlowService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FornaxObApiService from '@coze-arch/idl/fornax_ob_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fornaxObApi = new FornaxObApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FornaxPromptService from '@coze-arch/idl/prompt_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fornaxPromptApi = new FornaxPromptService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import FulfillApiService from './idl/fulfill';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const fulfillApi = new FulfillApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import HubApiService from './idl/hub_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const hubApi = new HubApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, 'Agw-Js-Conv': 'str' },
}),
});

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/app_builder';
export { default as default } from '@coze-arch/idl/app_builder';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/basic_api';
export { default as default } from '@coze-arch/idl/basic_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/benefit';
export { default as default } from '@coze-arch/idl/benefit';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/card';
export { default as default } from '@coze-arch/idl/card';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/connector_api';
export { default as default } from '@coze-arch/idl/connector_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/debugger_api';
export { default as default } from '@coze-arch/idl/debugger_api';

View File

@@ -0,0 +1,19 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/developer_api';
export { default as default } from '@coze-arch/idl/developer_api';
export { SuggestReplyMode } from '@coze-arch/idl';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/developer_backend';
export { default as default } from '@coze-arch/idl/developer_backend';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/devops_evaluation';
export { default as default } from '@coze-arch/idl/devops_evaluation';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/dp_manage';
export { default as default } from '@coze-arch/idl/dp_manage';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/evaluation_lite';
export { default as default } from '@coze-arch/idl/evaluation_lite';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/filebox';
export { default as default } from '@coze-arch/idl/filebox';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/fornax_api';
export { default as default } from '@coze-arch/idl/fornax_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/fulfill';
export { default as default } from '@coze-arch/idl/fulfill';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/hub_api';
export { default as default } from '@coze-arch/idl/hub_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/incentive';
export { default as default } from '@coze-arch/idl/incentive';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/intelligence_api';
export { default as default } from '@coze-arch/idl/intelligence_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/knowledge';
export { default as default } from '@coze-arch/idl/knowledge';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/market_interaction_api';
export { default as default } from '@coze-arch/idl/market_interaction_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/memory';
export { default as default } from '@coze-arch/idl/memory';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/multimedia_api';
export { default as default } from '@coze-arch/idl/multimedia_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/notify_api';
export { default as default } from '@coze-arch/idl/notify_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/ob_data';
export { default as default } from '@coze-arch/idl/ob_data';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/ob_query_api';
export { default as default } from '@coze-arch/idl/ob_query_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/pat_permission_api';
export { default as default } from '@coze-arch/idl/pat_permission_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/permission_authz';
export { default as default } from '@coze-arch/idl/permission_authz';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/permission_oauth2';
export { default as default } from '@coze-arch/idl/permission_oauth2';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/playground_api';
export { default as default } from '@coze-arch/idl/playground_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/plugin_develop';
export { default as default } from '@coze-arch/idl/plugin_develop';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/plugin_impl_api';
export { default as default } from '@coze-arch/idl/plugin_impl_api';

View File

@@ -0,0 +1,21 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/product_api';
export { default as default } from '@coze-arch/idl/product_api';
import { type public_api } from '@coze-arch/idl/product_api';
export type ProductInfo = public_api.ProductInfo;

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/resource';
export { default as default } from '@coze-arch/idl/resource';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/social_api';
export { default as default } from '@coze-arch/idl/social_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/trade';
export { default as default } from '@coze-arch/idl/trade';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/ui_builder';
export { default as default } from '@coze-arch/idl/ui_builder';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/workflow_api';
export { default as default } from '@coze-arch/idl/workflow_api';

View File

@@ -0,0 +1,18 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export * from '@coze-arch/idl/xmemory_api';
export { default as default } from '@coze-arch/idl/xmemory_api';

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import IncentiveService from './idl/incentive';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const incentiveApi = new IncentiveService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,84 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { default as DeveloperApiService } from './idl/developer_api';
export { default as PlaygroundApiService } from './idl/playground_api';
export { default as KnowledgeService } from './idl/knowledge';
export { default as PluginImplApi } from './idl/plugin_impl_api';
export { DeveloperApi } from './developer-api';
export { PlaygroundApi } from './playground-api';
export { ProductApi } from './product-api';
export { NotifyApi } from './notify-api';
export { MemoryApi, SubLinkDiscoveryTaskStatus } from './memory-api';
export { devopsEvaluationApi } from './devops-evaluation-api';
export { evaluationLiteApi } from './evaluation-lite-api';
export { workflowApi } from './workflow-api';
export { fileboxApi, ObjType } from './filebox-api';
export { PluginDevelopApi } from './plugin-develop';
export { cardApi } from './card-api';
export { appBuilderApi } from './app-builder-api';
export { uiBuilderApi } from './ui-builder-api';
export { obDataApi } from './ob-data-api';
export { permissionAuthzApi } from './permission-authz-api';
export { type PaymentMethodInfo } from './idl/trade';
export { tradeApi } from './trade-api';
export { benefitApi } from './benefit-api';
export { incentiveApi } from './incentive-api';
export { dpManageApi } from './dp-manage-api';
export { marketInteractionApi } from './market-interaction-api';
export { debuggerApi } from './debugger-api';
export { connectorApi } from './connector-api';
export { type BotAPIRequestConfig } from './axios';
export { xMemoryApi } from './xmemory-api';
export { obQueryApi } from './ob-query-api';
export { fulfillApi } from './fulfill-api';
export { patPermissionApi } from './pat-permission-api';
export { KnowledgeApi } from './knowledge-api';
export { developerBackendApi } from './developer-backend';
export { hubApi } from './hub-api';
export { SocialApi } from './social-api';
export {
APIErrorEvent,
handleAPIErrorEvent,
removeAPIErrorEvent,
addGlobalRequestInterceptor,
removeGlobalRequestInterceptor,
addGlobalResponseInterceptor,
} from '@coze-arch/bot-http';
export { AgentInstanceInfo, AgentInfo } from './idl/card';
export { permissionOAuth2Api } from './permission-oauth2-api';
export { basicApi } from './basic-api';
export { Resource } from './resource';
export { intelligenceApi } from './intelligence-api';
export { MultimediaApi } from './multimedia-api';
export { fornaxMlFlowApi } from './fornax-ml-flow-api';
export { fornaxPromptApi } from './fornax-prompt';
export { StoneEvaluationApi } from './stone-fornax-evaluation';
export { fornaxObApi } from './fornax-ob-api';
export { fornaxApi } from './fornax-api';
export { evaluationApi } from './fornax-evaluation-api';
export { cozeSpaceApi } from './coze-space-api';

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import IntelligenceApiService from './idl/intelligence_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const intelligenceApi = new IntelligenceApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, 'Agw-Js-Conv': 'str' },
}),
});

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import KnowledgeService from './idl/knowledge';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const KnowledgeApi = new KnowledgeService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const { headers } = config;
const reqHeaders = {
...headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import MarketInteractionApiService from './idl/market_interaction_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const marketInteractionApi =
new MarketInteractionApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, 'Agw-Js-Conv': 'str' },
}),
});

View File

@@ -0,0 +1,32 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import MemoryService from './idl/memory';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
/* eslint-disable @typescript-eslint/naming-convention */
export const MemoryApi = new MemoryService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const { headers } = config;
const reqHeaders = {
...headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});
export { SubLinkDiscoveryTaskStatus } from './idl/memory';

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import MultimediaService from './idl/multimedia_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const MultimediaApi = new MultimediaService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import NotifyApiService from './idl/notify_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const NotifyApi = new NotifyApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ObDataService from './idl/ob_data';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const obDataApi = new ObDataService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ObQueryApiService from './idl/ob_query_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const obQueryApi = new ObQueryApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const headers = {
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers });
},
});

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PATPermissionService from './idl/pat_permission_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const patPermissionApi = new PATPermissionService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PermissionAuthzService from './idl/permission_authz';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const permissionAuthzApi =
new PermissionAuthzService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PermissionOAuth2Service from './idl/permission_oauth2';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const permissionOAuth2Api =
new PermissionOAuth2Service<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PlaygroundApiService from './idl/playground_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const PlaygroundApi = new PlaygroundApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import PluginDevelopApiService from './idl/plugin_develop';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const PluginDevelopApi =
new PluginDevelopApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import qs from 'query-string';
import ProductApiService from './idl/product_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const ProductApi = new ProductApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.paramsSerializer =
config.paramsSerializer ||
(p => qs.stringify(p, { arrayFormat: 'comma' }));
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,24 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import ResourceService from './idl/resource';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention
export const Resource = new ResourceService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});

View File

@@ -0,0 +1,30 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import SocialApiService from './idl/social_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention -- what can I say
export const SocialApi = new SocialApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...{
...config,
headers: Object.assign(config.headers || {}, { 'Agw-Js-Conv': 'str' }),
},
}),
});

View File

@@ -0,0 +1,34 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import StoneFornaxEvaluationService from '@coze-arch/idl/stone_fornax_evaluation';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
// eslint-disable-next-line @typescript-eslint/naming-convention -- what can I say
export const StoneEvaluationApi =
new StoneFornaxEvaluationService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...{
...config,
headers: Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
}),
},
}),
});

View File

@@ -0,0 +1,27 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import TradeApiService from './idl/trade';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const tradeApi = new TradeApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({
...params,
...config,
headers: { ...params.headers, ...config.headers, ['Agw-Js-Conv']: 'str' },
}),
});

View File

@@ -0,0 +1,29 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import UiBuilderApiService from './idl/ui-builder';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const uiBuilderApi = new UiBuilderApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
const reqHeaders = {
...config.headers,
...params.headers,
'Agw-Js-Conv': 'str',
};
return axiosInstance.request({ ...params, ...config, headers: reqHeaders });
},
});

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import WorkflowApiService from './idl/workflow_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const workflowApi = new WorkflowApiService<BotAPIRequestConfig>({
request: (params, config = {}) => {
config.headers = Object.assign(config.headers || {}, {
'Agw-Js-Conv': 'str',
});
return axiosInstance.request({ ...params, ...config });
},
});

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2025 coze-dev Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import XmemoryApiService from './idl/xmemory_api';
import { axiosInstance, type BotAPIRequestConfig } from './axios';
export const xMemoryApi = new XmemoryApiService<BotAPIRequestConfig>({
request: (params, config = {}) =>
axiosInstance.request({ ...params, ...config }),
});