feat: manually mirror opencoze's code from bytedance
Change-Id: I09a73aadda978ad9511264a756b2ce51f5761adf
This commit is contained in:
29
frontend/packages/arch/bot-api/src/app-builder-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/app-builder-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
59
frontend/packages/arch/bot-api/src/axios.ts
Normal file
59
frontend/packages/arch/bot-api/src/axios.ts
Normal 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 };
|
||||
28
frontend/packages/arch/bot-api/src/basic-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/basic-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/benefit-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/benefit-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/card-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/card-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/connector-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/connector-api.ts
Normal 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,
|
||||
}),
|
||||
});
|
||||
30
frontend/packages/arch/bot-api/src/coze-space-api.ts
Normal file
30
frontend/packages/arch/bot-api/src/coze-space-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/debugger-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/debugger-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
24
frontend/packages/arch/bot-api/src/developer-api.ts
Normal file
24
frontend/packages/arch/bot-api/src/developer-api.ts
Normal 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 }),
|
||||
});
|
||||
24
frontend/packages/arch/bot-api/src/developer-backend.ts
Normal file
24
frontend/packages/arch/bot-api/src/developer-backend.ts
Normal 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 }),
|
||||
});
|
||||
34
frontend/packages/arch/bot-api/src/devops-evaluation-api.ts
Normal file
34
frontend/packages/arch/bot-api/src/devops-evaluation-api.ts
Normal 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,
|
||||
});
|
||||
},
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/dp-manage-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/dp-manage-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/evaluation-lite-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/evaluation-lite-api.ts
Normal 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 });
|
||||
},
|
||||
},
|
||||
);
|
||||
31
frontend/packages/arch/bot-api/src/filebox-api.ts
Normal file
31
frontend/packages/arch/bot-api/src/filebox-api.ts
Normal 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';
|
||||
28
frontend/packages/arch/bot-api/src/fornax-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/fornax-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/fornax-evaluation-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/fornax-evaluation-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/fornax-ml-flow-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/fornax-ml-flow-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/fornax-ob-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/fornax-ob-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/fornax-prompt.ts
Normal file
28
frontend/packages/arch/bot-api/src/fornax-prompt.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/fulfill-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/fulfill-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/hub-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/hub-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
18
frontend/packages/arch/bot-api/src/idl/app_builder.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/app_builder.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/basic_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/basic_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/benefit.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/benefit.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/card.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/card.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/connector_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/connector_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/debugger_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/debugger_api.ts
Normal 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';
|
||||
19
frontend/packages/arch/bot-api/src/idl/developer_api.ts
Normal file
19
frontend/packages/arch/bot-api/src/idl/developer_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/developer_backend.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/developer_backend.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/devops_evaluation.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/devops_evaluation.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/dp_manage.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/dp_manage.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/evaluation_lite.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/evaluation_lite.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/filebox.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/filebox.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/fornax_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/fornax_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/fulfill.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/fulfill.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/hub_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/hub_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/incentive.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/incentive.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/intelligence_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/intelligence_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/knowledge.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/knowledge.ts
Normal 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';
|
||||
@@ -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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/memory.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/memory.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/multimedia_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/multimedia_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/notify_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/notify_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/ob_data.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/ob_data.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/ob_query_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/ob_query_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/pat_permission_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/pat_permission_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/permission_authz.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/permission_authz.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/permission_oauth2.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/permission_oauth2.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/playground_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/playground_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/plugin_develop.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/plugin_develop.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/plugin_impl_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/plugin_impl_api.ts
Normal 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';
|
||||
21
frontend/packages/arch/bot-api/src/idl/product_api.ts
Normal file
21
frontend/packages/arch/bot-api/src/idl/product_api.ts
Normal 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;
|
||||
18
frontend/packages/arch/bot-api/src/idl/resource.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/resource.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/social_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/social_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/trade.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/trade.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/ui-builder.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/ui-builder.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/workflow_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/workflow_api.ts
Normal 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';
|
||||
18
frontend/packages/arch/bot-api/src/idl/xmemory_api.ts
Normal file
18
frontend/packages/arch/bot-api/src/idl/xmemory_api.ts
Normal 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';
|
||||
27
frontend/packages/arch/bot-api/src/incentive-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/incentive-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
84
frontend/packages/arch/bot-api/src/index.ts
Normal file
84
frontend/packages/arch/bot-api/src/index.ts
Normal 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';
|
||||
27
frontend/packages/arch/bot-api/src/intelligence-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/intelligence-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
30
frontend/packages/arch/bot-api/src/knowledge-api.ts
Normal file
30
frontend/packages/arch/bot-api/src/knowledge-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/market-interaction-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/market-interaction-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
32
frontend/packages/arch/bot-api/src/memory-api.ts
Normal file
32
frontend/packages/arch/bot-api/src/memory-api.ts
Normal 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';
|
||||
29
frontend/packages/arch/bot-api/src/multimedia-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/multimedia-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/notify-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/notify-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/ob-data-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/ob-data-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/ob-query-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/ob-query-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
23
frontend/packages/arch/bot-api/src/pat-permission-api.ts
Normal file
23
frontend/packages/arch/bot-api/src/pat-permission-api.ts
Normal 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 }),
|
||||
});
|
||||
24
frontend/packages/arch/bot-api/src/permission-authz-api.ts
Normal file
24
frontend/packages/arch/bot-api/src/permission-authz-api.ts
Normal 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 }),
|
||||
});
|
||||
24
frontend/packages/arch/bot-api/src/permission-oauth2-api.ts
Normal file
24
frontend/packages/arch/bot-api/src/permission-oauth2-api.ts
Normal 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 }),
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/playground-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/playground-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
30
frontend/packages/arch/bot-api/src/plugin-develop.ts
Normal file
30
frontend/packages/arch/bot-api/src/plugin-develop.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
34
frontend/packages/arch/bot-api/src/product-api.ts
Normal file
34
frontend/packages/arch/bot-api/src/product-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
24
frontend/packages/arch/bot-api/src/resource.ts
Normal file
24
frontend/packages/arch/bot-api/src/resource.ts
Normal 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 }),
|
||||
});
|
||||
30
frontend/packages/arch/bot-api/src/social-api.ts
Normal file
30
frontend/packages/arch/bot-api/src/social-api.ts
Normal 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' }),
|
||||
},
|
||||
}),
|
||||
});
|
||||
@@ -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',
|
||||
}),
|
||||
},
|
||||
}),
|
||||
});
|
||||
27
frontend/packages/arch/bot-api/src/trade-api.ts
Normal file
27
frontend/packages/arch/bot-api/src/trade-api.ts
Normal 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' },
|
||||
}),
|
||||
});
|
||||
29
frontend/packages/arch/bot-api/src/ui-builder-api.ts
Normal file
29
frontend/packages/arch/bot-api/src/ui-builder-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
28
frontend/packages/arch/bot-api/src/workflow-api.ts
Normal file
28
frontend/packages/arch/bot-api/src/workflow-api.ts
Normal 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 });
|
||||
},
|
||||
});
|
||||
23
frontend/packages/arch/bot-api/src/xmemory-api.ts
Normal file
23
frontend/packages/arch/bot-api/src/xmemory-api.ts
Normal 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 }),
|
||||
});
|
||||
Reference in New Issue
Block a user