@webitel/api-services 0.0.51 → 0.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/gen/_docs/html/assets/navigation.js +1 -1
- package/src/gen/_docs/html/assets/search.js +1 -1
- package/src/gen/_docs/html/functions/dictionaries_dictionaries.api.gen.getDictionaries.html +1 -1
- package/src/gen/_docs/html/functions/dictionaries_dictionaries.msw.api.gen.getDeleteTypeMixin3MockHandler.html +1 -0
- package/src/gen/_docs/html/functions/dictionaries_dictionaries.msw.api.gen.getDeleteTypeMixin3ResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/extensions_extensions.api.gen.getExtensions.html +1 -1
- package/src/gen/_docs/html/functions/extensions_extensions.msw.api.gen.getDeleteTypeMockHandler.html +1 -0
- package/src/gen/_docs/html/functions/extensions_extensions.msw.api.gen.getDeleteTypeResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.api.gen.getPdfService.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getDownloadPdfExportMockHandler.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getDownloadPdfExportResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getGeneratePdfExportMockHandler.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getGeneratePdfExportResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getGetPdfExportHistoryMockHandler.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getGetPdfExportHistoryResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/pdf-service_pdf-service.msw.api.gen.getPdfServiceMock.html +1 -0
- package/src/gen/_docs/html/functions/records_records.api.gen.getRecords.html +1 -1
- package/src/gen/_docs/html/functions/records_records.msw.api.gen.getLocateMockHandler.html +1 -0
- package/src/gen/_docs/html/functions/records_records.msw.api.gen.getLocateResponseMock.html +1 -0
- package/src/gen/_docs/html/functions/types_types.api.gen.getTypes.html +1 -1
- package/src/gen/_docs/html/functions/types_types.msw.api.gen.getLocateMixin3MockHandler.html +1 -0
- package/src/gen/_docs/html/functions/types_types.msw.api.gen.getLocateMixin3ResponseMock.html +1 -0
- package/src/gen/_docs/html/index.html +1 -1
- package/src/gen/_docs/html/interfaces/_models_webitelPdfPdfExportChunk.WebitelPdfPdfExportChunk.html +4 -0
- package/src/gen/_docs/html/interfaces/_models_webitelPdfPdfExportMetadata.WebitelPdfPdfExportMetadata.html +12 -0
- package/src/gen/_docs/html/interfaces/_models_webitelPdfPdfHistoryRecord.WebitelPdfPdfHistoryRecord.html +20 -0
- package/src/gen/_docs/html/interfaces/_models_webitelPdfPdfHistoryResponse.WebitelPdfPdfHistoryResponse.html +8 -0
- package/src/gen/_docs/html/interfaces/_models_webitelPdfPdfServiceGeneratePdfExportBody.WebitelPdfPdfServiceGeneratePdfExportBody.html +10 -0
- package/src/gen/_docs/html/modules/_models.html +1 -1
- package/src/gen/_docs/html/modules/_models_downloadPdfExport200.html +1 -0
- package/src/gen/_docs/html/modules/_models_downloadPdfExportParams.html +1 -0
- package/src/gen/_docs/html/modules/_models_getPdfExportHistoryParams.html +1 -0
- package/src/gen/_docs/html/modules/_models_locate200.html +1 -0
- package/src/gen/_docs/html/modules/_models_locateParams.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfExportChunk.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfExportMetadata.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfExportStatus.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfHistoryRecord.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfHistoryResponse.html +1 -0
- package/src/gen/_docs/html/modules/_models_webitelPdfPdfServiceGeneratePdfExportBody.html +1 -0
- package/src/gen/_docs/html/modules/dictionaries_dictionaries.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/dictionaries_dictionaries.msw.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/dictionaries_dictionaries.zod.gen.html +3 -3
- package/src/gen/_docs/html/modules/extensions_extensions.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/extensions_extensions.msw.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/extensions_extensions.zod.gen.html +3 -3
- package/src/gen/_docs/html/modules/index.html +1 -1
- package/src/gen/_docs/html/modules/pdf-service_pdf-service.api.gen.html +1 -0
- package/src/gen/_docs/html/modules/pdf-service_pdf-service.msw.api.gen.html +1 -0
- package/src/gen/_docs/html/modules/pdf-service_pdf-service.zod.gen.html +5 -0
- package/src/gen/_docs/html/modules/records_records.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/records_records.msw.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/records_records.zod.gen.html +3 -3
- package/src/gen/_docs/html/modules/types_types.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/types_types.msw.api.gen.html +1 -1
- package/src/gen/_docs/html/modules/types_types.zod.gen.html +3 -3
- package/src/gen/_docs/html/types/_models_deleteTypeMixin3Params.DeleteTypeMixin3Params.html +7 -2
- package/src/gen/_docs/html/types/_models_deleteTypeParams.DeleteTypeParams.html +2 -7
- package/src/gen/_docs/html/types/_models_downloadPdfExport200.DownloadPdfExport200.html +3 -0
- package/src/gen/_docs/html/types/_models_downloadPdfExportParams.DownloadPdfExportParams.html +7 -0
- package/src/gen/_docs/html/types/_models_getPdfExportHistoryParams.GetPdfExportHistoryParams.html +9 -0
- package/src/gen/_docs/html/types/{_models_locateMixin3200.LocateMixin3200.html → _models_locate200.Locate200.html} +1 -1
- package/src/gen/_docs/html/types/{_models_locateMixin3Params.LocateMixin3Params.html → _models_locateParams.LocateParams.html} +2 -2
- package/src/gen/_docs/html/types/_models_webitelPdfPdfExportStatus.WebitelPdfPdfExportStatus.html +9 -0
- package/src/gen/_docs/html/types/dictionaries_dictionaries.api.gen.DeleteTypeMixin3Result.html +1 -0
- package/src/gen/_docs/html/types/extensions_extensions.api.gen.DeleteTypeResult.html +1 -0
- package/src/gen/_docs/html/types/pdf-service_pdf-service.api.gen.DownloadPdfExportResult.html +1 -0
- package/src/gen/_docs/html/types/pdf-service_pdf-service.api.gen.GeneratePdfExportResult.html +1 -0
- package/src/gen/_docs/html/types/pdf-service_pdf-service.api.gen.GetPdfExportHistoryResult.html +1 -0
- package/src/gen/_docs/html/types/{dictionaries_dictionaries.api.gen.DeleteTypeResult.html → records_records.api.gen.LocateResult.html} +1 -1
- package/src/gen/_docs/html/types/types_types.api.gen.LocateMixin3Result.html +1 -0
- package/src/gen/_docs/html/variables/_models_webitelPdfPdfExportStatus.WebitelPdfPdfExportStatus.html +1 -0
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeMixin3QueryParams.html +2 -0
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeMixin3Response.html +1 -0
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeMixin3ResponseDataItemFieldsItemKindDefault.html +1 -0
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeParams.html +2 -0
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeQueryParams.html +1 -0
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeResponse.html +1 -0
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeResponseDataItemFieldsItemKindDefault.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.downloadPdfExportParams.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.downloadPdfExportQueryParams.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.downloadPdfExportResponse.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.generatePdfExportBody.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.generatePdfExportParams.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.generatePdfExportResponse.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.getPdfExportHistoryParams.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.getPdfExportHistoryQueryParams.html +1 -0
- package/src/gen/_docs/html/variables/pdf-service_pdf-service.zod.gen.getPdfExportHistoryResponse.html +1 -0
- package/src/gen/_docs/html/variables/{records_records.zod.gen.locateMixin3QueryFieldsItemDefault.html → pdf-service_pdf-service.zod.gen.getPdfExportHistoryResponseDataItemStatusDefault.html} +1 -1
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateParams.html +2 -0
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateQueryFieldsItemDefault.html +1 -0
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateQueryParams.html +1 -0
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateResponse.html +1 -0
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateMixin3Params.html +1 -0
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateMixin3Response.html +1 -0
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateMixin3ResponseFieldsItemKindDefault.html +1 -0
- package/src/gen/_models/deleteTypeMixin3Params.ts +10 -0
- package/src/gen/_models/deleteTypeParams.ts +0 -10
- package/src/gen/_models/downloadPdfExport200.ts +13 -0
- package/src/gen/_models/downloadPdfExportParams.ts +13 -0
- package/src/gen/_models/getPdfExportHistoryParams.ts +17 -0
- package/src/gen/_models/index.ts +11 -2
- package/src/gen/_models/{locateMixin3200.ts → locate200.ts} +1 -1
- package/src/gen/_models/{locateMixin3Params.ts → locateParams.ts} +1 -1
- package/src/gen/_models/webitelPdfPdfExportChunk.ts +14 -0
- package/src/gen/_models/webitelPdfPdfExportMetadata.ts +22 -0
- package/src/gen/_models/webitelPdfPdfExportStatus.ts +27 -0
- package/src/gen/_models/webitelPdfPdfHistoryRecord.ts +31 -0
- package/src/gen/_models/webitelPdfPdfHistoryResponse.ts +19 -0
- package/src/gen/_models/webitelPdfPdfServiceGeneratePdfExportBody.ts +20 -0
- package/src/gen/dictionaries/dictionaries.api.gen.ts +5 -5
- package/src/gen/dictionaries/dictionaries.msw.api.gen.ts +4 -4
- package/src/gen/dictionaries/dictionaries.zod.gen.ts +6 -4
- package/src/gen/extensions/extensions.api.gen.ts +5 -5
- package/src/gen/extensions/extensions.msw.api.gen.ts +4 -4
- package/src/gen/extensions/extensions.zod.gen.ts +5 -7
- package/src/gen/index.ts +3 -0
- package/src/gen/pdf-service/pdf-service.api.gen.ts +83 -0
- package/src/gen/pdf-service/pdf-service.msw.api.gen.ts +216 -0
- package/src/gen/pdf-service/pdf-service.zod.gen.ts +153 -0
- package/src/gen/records/records.api.gen.ts +6 -6
- package/src/gen/records/records.msw.api.gen.ts +7 -7
- package/src/gen/records/records.zod.gen.ts +4 -4
- package/src/gen/types/types.api.gen.ts +3 -3
- package/src/gen/types/types.msw.api.gen.ts +4 -4
- package/src/gen/types/types.zod.gen.ts +4 -4
- package/types/gen/_models/deleteTypeMixin3Params.d.ts +10 -0
- package/types/gen/_models/deleteTypeParams.d.ts +0 -10
- package/types/gen/_models/downloadPdfExport200.d.ts +12 -0
- package/types/gen/_models/downloadPdfExportParams.d.ts +12 -0
- package/types/gen/_models/getPdfExportHistoryParams.d.ts +16 -0
- package/types/gen/_models/{locateMixin3200.d.ts → locate200.d.ts} +1 -1
- package/types/gen/_models/{locateMixin3Params.d.ts → locateParams.d.ts} +1 -1
- package/types/gen/_models/webitelPdfPdfExportChunk.d.ts +13 -0
- package/types/gen/_models/webitelPdfPdfExportMetadata.d.ts +21 -0
- package/types/gen/_models/webitelPdfPdfExportStatus.d.ts +23 -0
- package/types/gen/_models/webitelPdfPdfHistoryRecord.d.ts +30 -0
- package/types/gen/_models/webitelPdfPdfHistoryResponse.d.ts +18 -0
- package/types/gen/_models/webitelPdfPdfServiceGeneratePdfExportBody.d.ts +19 -0
- package/types/gen/dictionaries/dictionaries.api.gen.d.ts +3 -3
- package/types/gen/dictionaries/dictionaries.msw.api.gen.d.ts +2 -2
- package/types/gen/dictionaries/dictionaries.zod.gen.d.ts +3 -3
- package/types/gen/extensions/extensions.api.gen.d.ts +3 -3
- package/types/gen/extensions/extensions.msw.api.gen.d.ts +2 -2
- package/types/gen/extensions/extensions.zod.gen.d.ts +4 -4
- package/types/gen/pdf-service/pdf-service.api.gen.d.ts +11 -0
- package/types/gen/pdf-service/pdf-service.msw.api.gen.d.ts +9 -0
- package/types/gen/pdf-service/pdf-service.zod.gen.d.ts +80 -0
- package/types/gen/records/records.api.gen.d.ts +3 -3
- package/types/gen/records/records.msw.api.gen.d.ts +3 -3
- package/types/gen/records/records.zod.gen.d.ts +4 -4
- package/types/gen/types/types.api.gen.d.ts +2 -2
- package/types/gen/types/types.msw.api.gen.d.ts +2 -2
- package/types/gen/types/types.zod.gen.d.ts +3 -3
- package/src/gen/_docs/html/functions/dictionaries_dictionaries.msw.api.gen.getDeleteTypeMockHandler.html +0 -1
- package/src/gen/_docs/html/functions/dictionaries_dictionaries.msw.api.gen.getDeleteTypeResponseMock.html +0 -1
- package/src/gen/_docs/html/functions/extensions_extensions.msw.api.gen.getDeleteTypeMixin3MockHandler.html +0 -1
- package/src/gen/_docs/html/functions/extensions_extensions.msw.api.gen.getDeleteTypeMixin3ResponseMock.html +0 -1
- package/src/gen/_docs/html/functions/records_records.msw.api.gen.getLocateMixin3MockHandler.html +0 -1
- package/src/gen/_docs/html/functions/records_records.msw.api.gen.getLocateMixin3ResponseMock.html +0 -1
- package/src/gen/_docs/html/functions/types_types.msw.api.gen.getLocateMockHandler.html +0 -1
- package/src/gen/_docs/html/functions/types_types.msw.api.gen.getLocateResponseMock.html +0 -1
- package/src/gen/_docs/html/modules/_models_locateMixin3200.html +0 -1
- package/src/gen/_docs/html/modules/_models_locateMixin3Params.html +0 -1
- package/src/gen/_docs/html/types/extensions_extensions.api.gen.DeleteTypeMixin3Result.html +0 -1
- package/src/gen/_docs/html/types/records_records.api.gen.LocateMixin3Result.html +0 -1
- package/src/gen/_docs/html/types/types_types.api.gen.LocateResult.html +0 -1
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeQueryParams.html +0 -2
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeResponse.html +0 -1
- package/src/gen/_docs/html/variables/dictionaries_dictionaries.zod.gen.deleteTypeResponseDataItemFieldsItemKindDefault.html +0 -1
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeMixin3Params.html +0 -2
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeMixin3QueryParams.html +0 -1
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeMixin3Response.html +0 -1
- package/src/gen/_docs/html/variables/extensions_extensions.zod.gen.deleteTypeMixin3ResponseDataItemFieldsItemKindDefault.html +0 -1
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateMixin3Params.html +0 -2
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateMixin3QueryParams.html +0 -1
- package/src/gen/_docs/html/variables/records_records.zod.gen.locateMixin3Response.html +0 -1
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateParams.html +0 -1
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateResponse.html +0 -1
- package/src/gen/_docs/html/variables/types_types.zod.gen.locateResponseFieldsItemKindDefault.html +0 -1
|
@@ -1595,7 +1595,7 @@ export const updateData2Response = zod.object({});
|
|
|
1595
1595
|
* (DictionaryList) {
|
|
1596
1596
|
* @summary Delete custom dictionaries.
|
|
1597
1597
|
*/
|
|
1598
|
-
export const
|
|
1598
|
+
export const deleteTypeMixin3QueryParams = zod.object({
|
|
1599
1599
|
fields: zod
|
|
1600
1600
|
.array(zod.string())
|
|
1601
1601
|
.optional()
|
|
@@ -1605,9 +1605,9 @@ export const deleteTypeQueryParams = zod.object({
|
|
|
1605
1605
|
.describe('`types.repo`\n\n// `record.pk`\n repeated string id = 3;'),
|
|
1606
1606
|
});
|
|
1607
1607
|
|
|
1608
|
-
export const
|
|
1608
|
+
export const deleteTypeMixin3ResponseDataItemFieldsItemKindDefault = 'none';
|
|
1609
1609
|
|
|
1610
|
-
export const
|
|
1610
|
+
export const deleteTypeMixin3Response = zod
|
|
1611
1611
|
.object({
|
|
1612
1612
|
data: zod
|
|
1613
1613
|
.array(
|
|
@@ -1788,7 +1788,9 @@ export const deleteTypeResponse = zod
|
|
|
1788
1788
|
'datetime',
|
|
1789
1789
|
'duration',
|
|
1790
1790
|
])
|
|
1791
|
-
.default(
|
|
1791
|
+
.default(
|
|
1792
|
+
deleteTypeMixin3ResponseDataItemFieldsItemKindDefault,
|
|
1793
|
+
)
|
|
1792
1794
|
.describe(
|
|
1793
1795
|
'Kind of primitive data types.\n\n - none: option allow_alias = true;\n - list: [array]\n - int: int32\n - uint: uint32\n - float: float32\n - datetime: date &| time',
|
|
1794
1796
|
),
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
DataInputExtension,
|
|
13
13
|
DataStructList,
|
|
14
14
|
DeleteType2Params,
|
|
15
|
-
|
|
15
|
+
DeleteTypeParams,
|
|
16
16
|
ProtodataStruct,
|
|
17
17
|
SearchTypeParams,
|
|
18
18
|
} from '.././_models';
|
|
@@ -55,9 +55,9 @@ export const // --- title start
|
|
|
55
55
|
* returns (ExtensionList) {
|
|
56
56
|
* @summary Delete extension for types.
|
|
57
57
|
*/
|
|
58
|
-
const
|
|
58
|
+
const deleteType = <TData = AxiosResponse<DataStructList>>(
|
|
59
59
|
repo: string[],
|
|
60
|
-
params?:
|
|
60
|
+
params?: DeleteTypeParams,
|
|
61
61
|
options?: AxiosRequestConfig,
|
|
62
62
|
): Promise<TData> => {
|
|
63
63
|
return axios.delete(`/types/extensions/${repo}`, {
|
|
@@ -110,7 +110,7 @@ export const // --- title start
|
|
|
110
110
|
return {
|
|
111
111
|
deleteType2,
|
|
112
112
|
searchType,
|
|
113
|
-
|
|
113
|
+
deleteType,
|
|
114
114
|
locateTypeMixin3,
|
|
115
115
|
createTypeMixin3,
|
|
116
116
|
updateTypeMixin3,
|
|
@@ -118,7 +118,7 @@ export const // --- title start
|
|
|
118
118
|
};
|
|
119
119
|
export type DeleteType2Result = AxiosResponse<DataStructList>;
|
|
120
120
|
export type SearchTypeResult = AxiosResponse<DataStructList>;
|
|
121
|
-
export type
|
|
121
|
+
export type DeleteTypeResult = AxiosResponse<DataStructList>;
|
|
122
122
|
export type LocateTypeMixin3Result = AxiosResponse<ProtodataStruct>;
|
|
123
123
|
export type CreateTypeMixin3Result = AxiosResponse<ProtodataStruct>;
|
|
124
124
|
export type UpdateTypeMixin3Result = AxiosResponse<ProtodataStruct>;
|
|
@@ -1170,7 +1170,7 @@ export const getSearchTypeResponseMock = (
|
|
|
1170
1170
|
...overrideResponse,
|
|
1171
1171
|
});
|
|
1172
1172
|
|
|
1173
|
-
export const
|
|
1173
|
+
export const getDeleteTypeResponseMock = (
|
|
1174
1174
|
overrideResponse: Partial<DataStructList> = {},
|
|
1175
1175
|
): DataStructList => ({
|
|
1176
1176
|
data: faker.helpers.arrayElement([
|
|
@@ -3470,7 +3470,7 @@ export const getSearchTypeMockHandler = (
|
|
|
3470
3470
|
});
|
|
3471
3471
|
};
|
|
3472
3472
|
|
|
3473
|
-
export const
|
|
3473
|
+
export const getDeleteTypeMockHandler = (
|
|
3474
3474
|
overrideResponse?:
|
|
3475
3475
|
| DataStructList
|
|
3476
3476
|
| ((
|
|
@@ -3486,7 +3486,7 @@ export const getDeleteTypeMixin3MockHandler = (
|
|
|
3486
3486
|
? typeof overrideResponse === 'function'
|
|
3487
3487
|
? await overrideResponse(info)
|
|
3488
3488
|
: overrideResponse
|
|
3489
|
-
:
|
|
3489
|
+
: getDeleteTypeResponseMock(),
|
|
3490
3490
|
),
|
|
3491
3491
|
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
3492
3492
|
);
|
|
@@ -3564,7 +3564,7 @@ export const getUpdateTypeMixin3MockHandler = (
|
|
|
3564
3564
|
export const getExtensionsMock = () => [
|
|
3565
3565
|
getDeleteType2MockHandler(),
|
|
3566
3566
|
getSearchTypeMockHandler(),
|
|
3567
|
-
|
|
3567
|
+
getDeleteTypeMockHandler(),
|
|
3568
3568
|
getLocateTypeMixin3MockHandler(),
|
|
3569
3569
|
getCreateTypeMixin3MockHandler(),
|
|
3570
3570
|
getUpdateTypeMixin3MockHandler(),
|
|
@@ -803,17 +803,17 @@ export const searchTypeResponse = zod
|
|
|
803
803
|
* returns (ExtensionList) {
|
|
804
804
|
* @summary Delete extension for types.
|
|
805
805
|
*/
|
|
806
|
-
export const
|
|
806
|
+
export const deleteTypeParams = zod.object({
|
|
807
807
|
repo: zod.array(zod.string()).min(1).describe('`type.repo`'),
|
|
808
808
|
});
|
|
809
809
|
|
|
810
|
-
export const
|
|
810
|
+
export const deleteTypeQueryParams = zod.object({
|
|
811
811
|
fields: zod.array(zod.string()).optional(),
|
|
812
812
|
});
|
|
813
813
|
|
|
814
|
-
export const
|
|
814
|
+
export const deleteTypeResponseDataItemFieldsItemKindDefault = 'none';
|
|
815
815
|
|
|
816
|
-
export const
|
|
816
|
+
export const deleteTypeResponse = zod
|
|
817
817
|
.object({
|
|
818
818
|
data: zod
|
|
819
819
|
.array(
|
|
@@ -994,9 +994,7 @@ export const deleteTypeMixin3Response = zod
|
|
|
994
994
|
'datetime',
|
|
995
995
|
'duration',
|
|
996
996
|
])
|
|
997
|
-
.default(
|
|
998
|
-
deleteTypeMixin3ResponseDataItemFieldsItemKindDefault,
|
|
999
|
-
)
|
|
997
|
+
.default(deleteTypeResponseDataItemFieldsItemKindDefault)
|
|
1000
998
|
.describe(
|
|
1001
999
|
'Kind of primitive data types.\n\n - none: option allow_alias = true;\n - list: [array]\n - int: int32\n - uint: uint32\n - float: float32\n - datetime: date &| time',
|
|
1002
1000
|
),
|
package/src/gen/index.ts
CHANGED
|
@@ -203,6 +203,9 @@ export * from './outbound-resource-service/outbound-resource-service.zod.gen';
|
|
|
203
203
|
export * from './pause-template-service/pause-template-service.api.gen';
|
|
204
204
|
export * from './pause-template-service/pause-template-service.msw.api.gen';
|
|
205
205
|
export * from './pause-template-service/pause-template-service.zod.gen';
|
|
206
|
+
export * from './pdf-service/pdf-service.api.gen';
|
|
207
|
+
export * from './pdf-service/pdf-service.msw.api.gen';
|
|
208
|
+
export * from './pdf-service/pdf-service.zod.gen';
|
|
206
209
|
export * from './permissions/permissions.api.gen';
|
|
207
210
|
export * from './permissions/permissions.msw.api.gen';
|
|
208
211
|
export * from './permissions/permissions.zod.gen';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import axios from '@aliasedDeps/api-services/axios';
|
|
8
|
+
|
|
9
|
+
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
10
|
+
|
|
11
|
+
import type {
|
|
12
|
+
DownloadPdfExport200,
|
|
13
|
+
DownloadPdfExportParams,
|
|
14
|
+
GetPdfExportHistoryParams,
|
|
15
|
+
WebitelPdfPdfExportMetadata,
|
|
16
|
+
WebitelPdfPdfHistoryResponse,
|
|
17
|
+
WebitelPdfPdfServiceGeneratePdfExportBody,
|
|
18
|
+
} from '.././_models';
|
|
19
|
+
|
|
20
|
+
// --- header start
|
|
21
|
+
//
|
|
22
|
+
|
|
23
|
+
export const // --- title start
|
|
24
|
+
getPdfService =
|
|
25
|
+
// --- title end
|
|
26
|
+
() => {
|
|
27
|
+
// --- header end
|
|
28
|
+
/**
|
|
29
|
+
* @summary Generate a new PDF export asynchronously.
|
|
30
|
+
Returns metadata about the created export task.
|
|
31
|
+
*/
|
|
32
|
+
const generatePdfExport = <
|
|
33
|
+
TData = AxiosResponse<WebitelPdfPdfExportMetadata>,
|
|
34
|
+
>(
|
|
35
|
+
agentId: string,
|
|
36
|
+
webitelPdfPdfServiceGeneratePdfExportBody: WebitelPdfPdfServiceGeneratePdfExportBody,
|
|
37
|
+
options?: AxiosRequestConfig,
|
|
38
|
+
): Promise<TData> => {
|
|
39
|
+
return axios.post(
|
|
40
|
+
`/export/pdf/${agentId}`,
|
|
41
|
+
webitelPdfPdfServiceGeneratePdfExportBody,
|
|
42
|
+
options,
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @summary Get paginated history of PDF exports for a given agent.
|
|
47
|
+
*/
|
|
48
|
+
const getPdfExportHistory = <
|
|
49
|
+
TData = AxiosResponse<WebitelPdfPdfHistoryResponse>,
|
|
50
|
+
>(
|
|
51
|
+
agentId: string,
|
|
52
|
+
params?: GetPdfExportHistoryParams,
|
|
53
|
+
options?: AxiosRequestConfig,
|
|
54
|
+
): Promise<TData> => {
|
|
55
|
+
return axios.get(`/export/pdf/${agentId}/history`, {
|
|
56
|
+
...options,
|
|
57
|
+
params: { ...params, ...options?.params },
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* @summary Download a previously generated PDF by export ID.
|
|
62
|
+
*/
|
|
63
|
+
const downloadPdfExport = <TData = AxiosResponse<DownloadPdfExport200>>(
|
|
64
|
+
fileId: string,
|
|
65
|
+
params?: DownloadPdfExportParams,
|
|
66
|
+
options?: AxiosRequestConfig,
|
|
67
|
+
): Promise<TData> => {
|
|
68
|
+
return axios.get(`/export/pdf/${fileId}`, {
|
|
69
|
+
...options,
|
|
70
|
+
params: { ...params, ...options?.params },
|
|
71
|
+
});
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
// --- footer start
|
|
75
|
+
return { generatePdfExport, getPdfExportHistory, downloadPdfExport };
|
|
76
|
+
};
|
|
77
|
+
export type GeneratePdfExportResult =
|
|
78
|
+
AxiosResponse<WebitelPdfPdfExportMetadata>;
|
|
79
|
+
export type GetPdfExportHistoryResult =
|
|
80
|
+
AxiosResponse<WebitelPdfPdfHistoryResponse>;
|
|
81
|
+
export type DownloadPdfExportResult = AxiosResponse<DownloadPdfExport200>;
|
|
82
|
+
|
|
83
|
+
// --- footer end
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import { faker } from '@faker-js/faker';
|
|
8
|
+
|
|
9
|
+
import { delay, HttpResponse, http } from 'msw';
|
|
10
|
+
import type {
|
|
11
|
+
DownloadPdfExport200,
|
|
12
|
+
WebitelPdfPdfExportMetadata,
|
|
13
|
+
WebitelPdfPdfHistoryResponse,
|
|
14
|
+
} from '.././_models';
|
|
15
|
+
import { WebitelPdfPdfExportStatus } from '.././_models';
|
|
16
|
+
|
|
17
|
+
export const getGeneratePdfExportResponseMock = (
|
|
18
|
+
overrideResponse: Partial<WebitelPdfPdfExportMetadata> = {},
|
|
19
|
+
): WebitelPdfPdfExportMetadata => ({
|
|
20
|
+
fileName: faker.helpers.arrayElement([
|
|
21
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
22
|
+
undefined,
|
|
23
|
+
]),
|
|
24
|
+
mimeType: faker.helpers.arrayElement([
|
|
25
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
26
|
+
undefined,
|
|
27
|
+
]),
|
|
28
|
+
size: faker.helpers.arrayElement([
|
|
29
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
30
|
+
undefined,
|
|
31
|
+
]),
|
|
32
|
+
status: faker.helpers.arrayElement([
|
|
33
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
34
|
+
undefined,
|
|
35
|
+
]),
|
|
36
|
+
taskId: faker.helpers.arrayElement([
|
|
37
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
38
|
+
undefined,
|
|
39
|
+
]),
|
|
40
|
+
...overrideResponse,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const getGetPdfExportHistoryResponseMock = (
|
|
44
|
+
overrideResponse: Partial<WebitelPdfPdfHistoryResponse> = {},
|
|
45
|
+
): WebitelPdfPdfHistoryResponse => ({
|
|
46
|
+
data: faker.helpers.arrayElement([
|
|
47
|
+
Array.from(
|
|
48
|
+
{ length: faker.number.int({ min: 1, max: 10 }) },
|
|
49
|
+
(_, i) => i + 1,
|
|
50
|
+
).map(() => ({
|
|
51
|
+
createdAt: faker.helpers.arrayElement([
|
|
52
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
53
|
+
undefined,
|
|
54
|
+
]),
|
|
55
|
+
createdBy: faker.helpers.arrayElement([
|
|
56
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
57
|
+
undefined,
|
|
58
|
+
]),
|
|
59
|
+
fileId: faker.helpers.arrayElement([
|
|
60
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
61
|
+
undefined,
|
|
62
|
+
]),
|
|
63
|
+
id: faker.helpers.arrayElement([
|
|
64
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
65
|
+
undefined,
|
|
66
|
+
]),
|
|
67
|
+
mimeType: faker.helpers.arrayElement([
|
|
68
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
69
|
+
undefined,
|
|
70
|
+
]),
|
|
71
|
+
name: faker.helpers.arrayElement([
|
|
72
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
73
|
+
undefined,
|
|
74
|
+
]),
|
|
75
|
+
status: faker.helpers.arrayElement([
|
|
76
|
+
faker.helpers.arrayElement(Object.values(WebitelPdfPdfExportStatus)),
|
|
77
|
+
undefined,
|
|
78
|
+
]),
|
|
79
|
+
updatedAt: faker.helpers.arrayElement([
|
|
80
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
81
|
+
undefined,
|
|
82
|
+
]),
|
|
83
|
+
updatedBy: faker.helpers.arrayElement([
|
|
84
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
85
|
+
undefined,
|
|
86
|
+
]),
|
|
87
|
+
})),
|
|
88
|
+
undefined,
|
|
89
|
+
]),
|
|
90
|
+
next: faker.helpers.arrayElement([faker.datatype.boolean(), undefined]),
|
|
91
|
+
page: faker.helpers.arrayElement([
|
|
92
|
+
faker.number.int({ min: undefined, max: undefined, multipleOf: undefined }),
|
|
93
|
+
undefined,
|
|
94
|
+
]),
|
|
95
|
+
...overrideResponse,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export const getDownloadPdfExportResponseMock = (
|
|
99
|
+
overrideResponse: Partial<DownloadPdfExport200> = {},
|
|
100
|
+
): DownloadPdfExport200 => ({
|
|
101
|
+
error: faker.helpers.arrayElement([
|
|
102
|
+
{
|
|
103
|
+
code: faker.helpers.arrayElement([
|
|
104
|
+
faker.number.int({
|
|
105
|
+
min: undefined,
|
|
106
|
+
max: undefined,
|
|
107
|
+
multipleOf: undefined,
|
|
108
|
+
}),
|
|
109
|
+
undefined,
|
|
110
|
+
]),
|
|
111
|
+
details: faker.helpers.arrayElement([
|
|
112
|
+
Array.from(
|
|
113
|
+
{ length: faker.number.int({ min: 1, max: 10 }) },
|
|
114
|
+
(_, i) => i + 1,
|
|
115
|
+
).map(() => ({
|
|
116
|
+
'@type': faker.helpers.arrayElement([
|
|
117
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
118
|
+
undefined,
|
|
119
|
+
]),
|
|
120
|
+
})),
|
|
121
|
+
undefined,
|
|
122
|
+
]),
|
|
123
|
+
message: faker.helpers.arrayElement([
|
|
124
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
125
|
+
undefined,
|
|
126
|
+
]),
|
|
127
|
+
},
|
|
128
|
+
undefined,
|
|
129
|
+
]),
|
|
130
|
+
result: faker.helpers.arrayElement([
|
|
131
|
+
{
|
|
132
|
+
data: faker.helpers.arrayElement([
|
|
133
|
+
faker.string.alpha({ length: { min: 10, max: 20 } }),
|
|
134
|
+
undefined,
|
|
135
|
+
]),
|
|
136
|
+
},
|
|
137
|
+
undefined,
|
|
138
|
+
]),
|
|
139
|
+
...overrideResponse,
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
export const getGeneratePdfExportMockHandler = (
|
|
143
|
+
overrideResponse?:
|
|
144
|
+
| WebitelPdfPdfExportMetadata
|
|
145
|
+
| ((
|
|
146
|
+
info: Parameters<Parameters<typeof http.post>[1]>[0],
|
|
147
|
+
) => Promise<WebitelPdfPdfExportMetadata> | WebitelPdfPdfExportMetadata),
|
|
148
|
+
) => {
|
|
149
|
+
return http.post('*/export/pdf/:agentId', async (info) => {
|
|
150
|
+
await delay(1000);
|
|
151
|
+
|
|
152
|
+
return new HttpResponse(
|
|
153
|
+
JSON.stringify(
|
|
154
|
+
overrideResponse !== undefined
|
|
155
|
+
? typeof overrideResponse === 'function'
|
|
156
|
+
? await overrideResponse(info)
|
|
157
|
+
: overrideResponse
|
|
158
|
+
: getGeneratePdfExportResponseMock(),
|
|
159
|
+
),
|
|
160
|
+
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
161
|
+
);
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export const getGetPdfExportHistoryMockHandler = (
|
|
166
|
+
overrideResponse?:
|
|
167
|
+
| WebitelPdfPdfHistoryResponse
|
|
168
|
+
| ((
|
|
169
|
+
info: Parameters<Parameters<typeof http.get>[1]>[0],
|
|
170
|
+
) =>
|
|
171
|
+
| Promise<WebitelPdfPdfHistoryResponse>
|
|
172
|
+
| WebitelPdfPdfHistoryResponse),
|
|
173
|
+
) => {
|
|
174
|
+
return http.get('*/export/pdf/:agentId/history', async (info) => {
|
|
175
|
+
await delay(1000);
|
|
176
|
+
|
|
177
|
+
return new HttpResponse(
|
|
178
|
+
JSON.stringify(
|
|
179
|
+
overrideResponse !== undefined
|
|
180
|
+
? typeof overrideResponse === 'function'
|
|
181
|
+
? await overrideResponse(info)
|
|
182
|
+
: overrideResponse
|
|
183
|
+
: getGetPdfExportHistoryResponseMock(),
|
|
184
|
+
),
|
|
185
|
+
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
186
|
+
);
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export const getDownloadPdfExportMockHandler = (
|
|
191
|
+
overrideResponse?:
|
|
192
|
+
| DownloadPdfExport200
|
|
193
|
+
| ((
|
|
194
|
+
info: Parameters<Parameters<typeof http.get>[1]>[0],
|
|
195
|
+
) => Promise<DownloadPdfExport200> | DownloadPdfExport200),
|
|
196
|
+
) => {
|
|
197
|
+
return http.get('*/export/pdf/:fileId', async (info) => {
|
|
198
|
+
await delay(1000);
|
|
199
|
+
|
|
200
|
+
return new HttpResponse(
|
|
201
|
+
JSON.stringify(
|
|
202
|
+
overrideResponse !== undefined
|
|
203
|
+
? typeof overrideResponse === 'function'
|
|
204
|
+
? await overrideResponse(info)
|
|
205
|
+
: overrideResponse
|
|
206
|
+
: getDownloadPdfExportResponseMock(),
|
|
207
|
+
),
|
|
208
|
+
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
209
|
+
);
|
|
210
|
+
});
|
|
211
|
+
};
|
|
212
|
+
export const getPdfServiceMock = () => [
|
|
213
|
+
getGeneratePdfExportMockHandler(),
|
|
214
|
+
getGetPdfExportHistoryMockHandler(),
|
|
215
|
+
getDownloadPdfExportMockHandler(),
|
|
216
|
+
];
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v7.10.0 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Webitel API
|
|
5
|
+
* OpenAPI spec version: 24.04.0
|
|
6
|
+
*/
|
|
7
|
+
import { z as zod } from 'zod/v4';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @summary Generate a new PDF export asynchronously.
|
|
11
|
+
Returns metadata about the created export task.
|
|
12
|
+
*/
|
|
13
|
+
export const generatePdfExportParams = zod.object({
|
|
14
|
+
agent_id: zod
|
|
15
|
+
.string()
|
|
16
|
+
.describe('Agent ID for which the export is generated.'),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const generatePdfExportBody = zod
|
|
20
|
+
.object({
|
|
21
|
+
channel: zod
|
|
22
|
+
.string()
|
|
23
|
+
.optional()
|
|
24
|
+
.describe('Channel type (e.g., \"screenshot\").'),
|
|
25
|
+
fileIds: zod
|
|
26
|
+
.array(zod.string())
|
|
27
|
+
.optional()
|
|
28
|
+
.describe('Optional list of specific file IDs to include.'),
|
|
29
|
+
from: zod.string().optional().describe('Start timestamp (Unix millis).'),
|
|
30
|
+
to: zod.string().optional().describe('End timestamp (Unix millis).'),
|
|
31
|
+
})
|
|
32
|
+
.describe('Request for generating a PDF export.');
|
|
33
|
+
|
|
34
|
+
export const generatePdfExportResponse = zod
|
|
35
|
+
.object({
|
|
36
|
+
fileName: zod.string().optional().describe('File name of the export.'),
|
|
37
|
+
mimeType: zod
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('MIME type, e.g., \"application/pdf\".'),
|
|
41
|
+
size: zod
|
|
42
|
+
.string()
|
|
43
|
+
.optional()
|
|
44
|
+
.describe('File size in bytes (0 if not ready).'),
|
|
45
|
+
status: zod
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.describe('Task status: pending | processing | done | failed.'),
|
|
49
|
+
taskId: zod.string().optional().describe('Unique identifier of the task.'),
|
|
50
|
+
})
|
|
51
|
+
.describe('Metadata about a PDF export task.');
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @summary Get paginated history of PDF exports for a given agent.
|
|
55
|
+
*/
|
|
56
|
+
export const getPdfExportHistoryParams = zod.object({
|
|
57
|
+
agent_id: zod.string().describe('Agent ID.'),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const getPdfExportHistoryQueryParams = zod.object({
|
|
61
|
+
page: zod.number().optional().describe('Page number (starting from 1).'),
|
|
62
|
+
size: zod
|
|
63
|
+
.number()
|
|
64
|
+
.optional()
|
|
65
|
+
.describe('Page size (number of records per page).'),
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export const getPdfExportHistoryResponseDataItemStatusDefault =
|
|
69
|
+
'PDF_EXPORT_STATUS_UNSPECIFIED';
|
|
70
|
+
|
|
71
|
+
export const getPdfExportHistoryResponse = zod
|
|
72
|
+
.object({
|
|
73
|
+
data: zod
|
|
74
|
+
.array(
|
|
75
|
+
zod
|
|
76
|
+
.object({
|
|
77
|
+
createdAt: zod
|
|
78
|
+
.string()
|
|
79
|
+
.optional()
|
|
80
|
+
.describe('Creation timestamp (Unix millis).'),
|
|
81
|
+
createdBy: zod
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('User ID who created the export.'),
|
|
85
|
+
fileId: zod.string().optional().describe('Related file ID.'),
|
|
86
|
+
id: zod.string().optional().describe('Export ID.'),
|
|
87
|
+
mimeType: zod
|
|
88
|
+
.string()
|
|
89
|
+
.optional()
|
|
90
|
+
.describe('MIME type of the export.'),
|
|
91
|
+
name: zod.string().optional().describe('Export name.'),
|
|
92
|
+
status: zod
|
|
93
|
+
.enum([
|
|
94
|
+
'PDF_EXPORT_STATUS_UNSPECIFIED',
|
|
95
|
+
'PDF_EXPORT_STATUS_PENDING',
|
|
96
|
+
'PDF_EXPORT_STATUS_PROCESSING',
|
|
97
|
+
'PDF_EXPORT_STATUS_DONE',
|
|
98
|
+
'PDF_EXPORT_STATUS_FAILED',
|
|
99
|
+
])
|
|
100
|
+
.default(getPdfExportHistoryResponseDataItemStatusDefault)
|
|
101
|
+
.describe(
|
|
102
|
+
'Status of the PDF export process.\n\n - PDF_EXPORT_STATUS_UNSPECIFIED: Default value.\n - PDF_EXPORT_STATUS_PENDING: Task is waiting to start.\n - PDF_EXPORT_STATUS_PROCESSING: Task is in progress.\n - PDF_EXPORT_STATUS_DONE: Task is completed successfully.\n - PDF_EXPORT_STATUS_FAILED: Task failed.',
|
|
103
|
+
),
|
|
104
|
+
updatedAt: zod
|
|
105
|
+
.string()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe('Update timestamp (Unix millis).'),
|
|
108
|
+
updatedBy: zod
|
|
109
|
+
.string()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe('User ID who last updated the export.'),
|
|
112
|
+
})
|
|
113
|
+
.describe('Represents a single PDF export record.'),
|
|
114
|
+
)
|
|
115
|
+
.optional()
|
|
116
|
+
.describe('List of export history records.'),
|
|
117
|
+
next: zod.boolean().optional().describe('True if there is a next page.'),
|
|
118
|
+
page: zod.number().optional().describe('Current page number.'),
|
|
119
|
+
})
|
|
120
|
+
.describe('Response containing a page of export history.');
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @summary Download a previously generated PDF by export ID.
|
|
124
|
+
*/
|
|
125
|
+
export const downloadPdfExportParams = zod.object({
|
|
126
|
+
file_id: zod.string().describe('Unique export identifier.'),
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
export const downloadPdfExportQueryParams = zod.object({
|
|
130
|
+
domainId: zod.string().optional().describe('Domain ID for authorization.'),
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export const downloadPdfExportResponse = zod.object({
|
|
134
|
+
error: zod
|
|
135
|
+
.object({
|
|
136
|
+
code: zod.number().optional(),
|
|
137
|
+
details: zod
|
|
138
|
+
.array(
|
|
139
|
+
zod.object({
|
|
140
|
+
'@type': zod.string().optional(),
|
|
141
|
+
}),
|
|
142
|
+
)
|
|
143
|
+
.optional(),
|
|
144
|
+
message: zod.string().optional(),
|
|
145
|
+
})
|
|
146
|
+
.optional(),
|
|
147
|
+
result: zod
|
|
148
|
+
.object({
|
|
149
|
+
data: zod.string().optional().describe('Raw PDF file bytes (chunked).'),
|
|
150
|
+
})
|
|
151
|
+
.optional()
|
|
152
|
+
.describe('Chunked response with PDF binary data.'),
|
|
153
|
+
});
|
|
@@ -13,8 +13,8 @@ import type {
|
|
|
13
13
|
Create200,
|
|
14
14
|
CreateBody,
|
|
15
15
|
DataDataset,
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
Locate200,
|
|
17
|
+
LocateParams,
|
|
18
18
|
SearchParams,
|
|
19
19
|
Update2Body,
|
|
20
20
|
Update2Params,
|
|
@@ -73,10 +73,10 @@ export const // --- title start
|
|
|
73
73
|
* (Record) {
|
|
74
74
|
* @summary Locate dataset record
|
|
75
75
|
*/
|
|
76
|
-
const
|
|
76
|
+
const locate = <TData = AxiosResponse<Locate200>>(
|
|
77
77
|
repo: string,
|
|
78
78
|
id: string,
|
|
79
|
-
params?:
|
|
79
|
+
params?: LocateParams,
|
|
80
80
|
options?: AxiosRequestConfig,
|
|
81
81
|
): Promise<TData> => {
|
|
82
82
|
return axios.get(`/v2/dataset/${repo}/${id}`, {
|
|
@@ -118,12 +118,12 @@ export const // --- title start
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
// --- footer start
|
|
121
|
-
return { _delete, search, create,
|
|
121
|
+
return { _delete, search, create, locate, update, update2 };
|
|
122
122
|
};
|
|
123
123
|
export type _DeleteResult = AxiosResponse<DataDataset>;
|
|
124
124
|
export type SearchResult = AxiosResponse<DataDataset>;
|
|
125
125
|
export type CreateResult = AxiosResponse<Create200>;
|
|
126
|
-
export type
|
|
126
|
+
export type LocateResult = AxiosResponse<Locate200>;
|
|
127
127
|
export type UpdateResult = AxiosResponse<Update200>;
|
|
128
128
|
export type Update2Result = AxiosResponse<Update2200>;
|
|
129
129
|
|
|
@@ -10,7 +10,7 @@ import { delay, HttpResponse, http } from 'msw';
|
|
|
10
10
|
import type {
|
|
11
11
|
Create200,
|
|
12
12
|
DataDataset,
|
|
13
|
-
|
|
13
|
+
Locate200,
|
|
14
14
|
Update200,
|
|
15
15
|
Update2200,
|
|
16
16
|
} from '.././_models';
|
|
@@ -1186,7 +1186,7 @@ export const getSearchResponseMock = (
|
|
|
1186
1186
|
|
|
1187
1187
|
export const getCreateResponseMock = (): Create200 => ({});
|
|
1188
1188
|
|
|
1189
|
-
export const
|
|
1189
|
+
export const getLocateResponseMock = (): Locate200 => ({});
|
|
1190
1190
|
|
|
1191
1191
|
export const getUpdateResponseMock = (): Update200 => ({});
|
|
1192
1192
|
|
|
@@ -1261,12 +1261,12 @@ export const getCreateMockHandler = (
|
|
|
1261
1261
|
});
|
|
1262
1262
|
};
|
|
1263
1263
|
|
|
1264
|
-
export const
|
|
1264
|
+
export const getLocateMockHandler = (
|
|
1265
1265
|
overrideResponse?:
|
|
1266
|
-
|
|
|
1266
|
+
| Locate200
|
|
1267
1267
|
| ((
|
|
1268
1268
|
info: Parameters<Parameters<typeof http.get>[1]>[0],
|
|
1269
|
-
) => Promise<
|
|
1269
|
+
) => Promise<Locate200> | Locate200),
|
|
1270
1270
|
) => {
|
|
1271
1271
|
return http.get('*/v2/dataset/:repo/:id', async (info) => {
|
|
1272
1272
|
await delay(1000);
|
|
@@ -1277,7 +1277,7 @@ export const getLocateMixin3MockHandler = (
|
|
|
1277
1277
|
? typeof overrideResponse === 'function'
|
|
1278
1278
|
? await overrideResponse(info)
|
|
1279
1279
|
: overrideResponse
|
|
1280
|
-
:
|
|
1280
|
+
: getLocateResponseMock(),
|
|
1281
1281
|
),
|
|
1282
1282
|
{ status: 200, headers: { 'Content-Type': 'application/json' } },
|
|
1283
1283
|
);
|
|
@@ -1333,7 +1333,7 @@ export const getRecordsMock = () => [
|
|
|
1333
1333
|
getDeleteMockHandler(),
|
|
1334
1334
|
getSearchMockHandler(),
|
|
1335
1335
|
getCreateMockHandler(),
|
|
1336
|
-
|
|
1336
|
+
getLocateMockHandler(),
|
|
1337
1337
|
getUpdateMockHandler(),
|
|
1338
1338
|
getUpdate2MockHandler(),
|
|
1339
1339
|
];
|