@floristcloud/api-lib 1.2.20 → 1.2.21
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/build/commands/consignment-import-schema/get-consignment-import-schema-template.query.js +20 -0
- package/build/commands/consignment-import-schema/index.js +1 -0
- package/build/constant/error.js +2 -0
- package/build/enum/consignment-import-schema-relation-entity-property.enum.js +2 -0
- package/commands/consignment-import-schema/get-consignment-import-schema-template.query.ts +21 -0
- package/commands/consignment-import-schema/index.ts +1 -0
- package/constant/error.ts +2 -0
- package/enum/consignment-import-schema-relation-entity-property.enum.ts +2 -0
- package/package.json +1 -1
package/build/commands/consignment-import-schema/get-consignment-import-schema-template.query.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetConsignmentImportSchemaTemplateContractQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enum_1 = require("../../enum");
|
|
6
|
+
const TemplateRelationSchema = zod_1.z.object({
|
|
7
|
+
entityProperty: zod_1.z.nativeEnum(enum_1.ConsignmentImportSchemaRelationEntityPropertyEnum),
|
|
8
|
+
externalName: zod_1.z.string(),
|
|
9
|
+
isRequire: zod_1.z.boolean(),
|
|
10
|
+
});
|
|
11
|
+
const GetConsignmentImportSchemaTemplateResponseSchema = zod_1.z.object({
|
|
12
|
+
data: zod_1.z.object({
|
|
13
|
+
name: zod_1.z.string(),
|
|
14
|
+
relations: zod_1.z.array(TemplateRelationSchema),
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
var GetConsignmentImportSchemaTemplateContractQuery;
|
|
18
|
+
(function (GetConsignmentImportSchemaTemplateContractQuery) {
|
|
19
|
+
GetConsignmentImportSchemaTemplateContractQuery.ResponseSchema = GetConsignmentImportSchemaTemplateResponseSchema;
|
|
20
|
+
})(GetConsignmentImportSchemaTemplateContractQuery || (exports.GetConsignmentImportSchemaTemplateContractQuery = GetConsignmentImportSchemaTemplateContractQuery = {}));
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./create-consignment-import-scheme.command"), exports);
|
|
18
18
|
__exportStar(require("./update-consignment-import-schema.command"), exports);
|
|
19
|
+
__exportStar(require("./get-consignment-import-schema-template.query"), exports);
|
package/build/constant/error.js
CHANGED
|
@@ -236,6 +236,8 @@ exports.ERRORS = {
|
|
|
236
236
|
CONSIGNMENT_PRODUCT_UPDATE_ANALYSIS_FAILED: { code: 'CON022', message: 'Update analysis failed', httpCode: 500 },
|
|
237
237
|
CONSIGNMENT_PRODUCT_UPDATE_BATCH_TOO_LARGE: { code: 'CON023', message: 'Batch size too large', httpCode: 400 },
|
|
238
238
|
CONSIGNMENT_IMPORT_TOO_MANY_ROWS: { code: 'CON024', message: 'Too many rows for this import mode', httpCode: 400 },
|
|
239
|
+
CONSIGNMENT_PRODUCT_UPDATE_SCHEMA_NOT_FOUND: { code: 'CON025', message: 'Update schema not found', httpCode: 404 },
|
|
240
|
+
CONSIGNMENT_PRODUCT_UPDATE_SCHEMA_NO_HEADERS_MATCHED: { code: 'CON026', message: 'No schema headers matched the file', httpCode: 400 },
|
|
239
241
|
// CONSIGNMENT-IMPORT-SCHEME
|
|
240
242
|
CONSIGNMENT_IMPORT_SCHEME_NOT_CREATED: { code: 'CS001', message: 'Failed to create consignment import scheme', httpCode: 500 },
|
|
241
243
|
CONSIGNMENT_IMPORT_SCHEME_FETCH_FAILED: { code: 'CS002', message: 'Error when retrieving a consignment import scheme', httpCode: 500 },
|
|
@@ -35,4 +35,6 @@ var ConsignmentImportSchemaRelationEntityPropertyEnum;
|
|
|
35
35
|
ConsignmentImportSchemaRelationEntityPropertyEnum["OPTION1_MULTIPLICITY"] = "OPTION1_MULTIPLICITY";
|
|
36
36
|
ConsignmentImportSchemaRelationEntityPropertyEnum["OPTION1_PRICE"] = "OPTION1_PRICE";
|
|
37
37
|
ConsignmentImportSchemaRelationEntityPropertyEnum["SALES_UNIT"] = "SALES_UNIT";
|
|
38
|
+
ConsignmentImportSchemaRelationEntityPropertyEnum["UUID"] = "UUID";
|
|
39
|
+
ConsignmentImportSchemaRelationEntityPropertyEnum["MULTIPLICITY_DESCRIPTION"] = "MULTIPLICITY_DESCRIPTION";
|
|
38
40
|
})(ConsignmentImportSchemaRelationEntityPropertyEnum || (exports.ConsignmentImportSchemaRelationEntityPropertyEnum = ConsignmentImportSchemaRelationEntityPropertyEnum = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ConsignmentImportSchemaRelationEntityPropertyEnum } from '../../enum';
|
|
3
|
+
|
|
4
|
+
const TemplateRelationSchema = z.object({
|
|
5
|
+
entityProperty: z.nativeEnum(ConsignmentImportSchemaRelationEntityPropertyEnum),
|
|
6
|
+
externalName: z.string(),
|
|
7
|
+
isRequire: z.boolean(),
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const GetConsignmentImportSchemaTemplateResponseSchema = z.object({
|
|
11
|
+
data: z.object({
|
|
12
|
+
name: z.string(),
|
|
13
|
+
relations: z.array(TemplateRelationSchema),
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export namespace GetConsignmentImportSchemaTemplateContractQuery {
|
|
18
|
+
export const ResponseSchema = GetConsignmentImportSchemaTemplateResponseSchema;
|
|
19
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
20
|
+
export type TemplateRelation = z.infer<typeof TemplateRelationSchema>;
|
|
21
|
+
}
|
package/constant/error.ts
CHANGED
|
@@ -245,6 +245,8 @@ export const ERRORS = {
|
|
|
245
245
|
CONSIGNMENT_PRODUCT_UPDATE_ANALYSIS_FAILED: { code: 'CON022', message: 'Update analysis failed', httpCode: 500 },
|
|
246
246
|
CONSIGNMENT_PRODUCT_UPDATE_BATCH_TOO_LARGE: { code: 'CON023', message: 'Batch size too large', httpCode: 400 },
|
|
247
247
|
CONSIGNMENT_IMPORT_TOO_MANY_ROWS: { code: 'CON024', message: 'Too many rows for this import mode', httpCode: 400 },
|
|
248
|
+
CONSIGNMENT_PRODUCT_UPDATE_SCHEMA_NOT_FOUND: { code: 'CON025', message: 'Update schema not found', httpCode: 404 },
|
|
249
|
+
CONSIGNMENT_PRODUCT_UPDATE_SCHEMA_NO_HEADERS_MATCHED: { code: 'CON026', message: 'No schema headers matched the file', httpCode: 400 },
|
|
248
250
|
|
|
249
251
|
// CONSIGNMENT-IMPORT-SCHEME
|
|
250
252
|
CONSIGNMENT_IMPORT_SCHEME_NOT_CREATED: { code: 'CS001', message: 'Failed to create consignment import scheme', httpCode: 500 },
|