@floristcloud/api-lib 1.2.7 → 1.2.10
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/auth/index.js +1 -1
- package/build/commands/auth/list-mobile-buyer-tenants.command.js +25 -0
- package/build/commands/pre-order-collection-item/get-pre-order-collection-item-grouped-list-for-client.query.js +24 -0
- package/build/commands/pre-order-collection-item/index.js +1 -0
- package/build/commands/product/group/update-group-product-update-batch.command.js +2 -0
- package/build/constant/error.js +2 -0
- package/build/schemas/pre-order-collection-item/pre-order-collection-item.schema.js +9 -1
- package/commands/auth/index.ts +1 -1
- package/commands/auth/list-mobile-buyer-tenants.command.ts +28 -0
- package/commands/pre-order-collection-item/get-pre-order-collection-item-grouped-list-for-client.query.ts +26 -0
- package/commands/pre-order-collection-item/index.ts +1 -0
- package/commands/product/group/update-group-product-update-batch.command.ts +2 -0
- package/constant/error.ts +2 -0
- package/package.json +1 -1
- package/schemas/pre-order-collection-item/pre-order-collection-item.schema.ts +10 -0
- package/build/commands/auth/list-mobile-buyer-tenants-by-phone.command.js +0 -20
- package/commands/auth/list-mobile-buyer-tenants-by-phone.command.ts +0 -23
|
@@ -18,7 +18,7 @@ __exportStar(require("./register-user.command"), exports);
|
|
|
18
18
|
__exportStar(require("./reset-password-by-user.command"), exports);
|
|
19
19
|
__exportStar(require("./reset-password-by-admin.command"), exports);
|
|
20
20
|
__exportStar(require("./login-user.command"), exports);
|
|
21
|
-
__exportStar(require("./list-mobile-buyer-tenants
|
|
21
|
+
__exportStar(require("./list-mobile-buyer-tenants.command"), exports);
|
|
22
22
|
__exportStar(require("./reset-password-by-token.command"), exports);
|
|
23
23
|
__exportStar(require("./restore-password-by-security-code.command"), exports);
|
|
24
24
|
__exportStar(require("./reset-password-by-security-code.command"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListMobileBuyerTenantsContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ListMobileBuyerTenantsRequestSchema = zod_1.z
|
|
6
|
+
.object({
|
|
7
|
+
phone: zod_1.z.string().min(1).optional(),
|
|
8
|
+
email: zod_1.z.email().optional(),
|
|
9
|
+
})
|
|
10
|
+
.refine((data) => data.phone || data.email, {
|
|
11
|
+
message: 'Either phone or email must be provided',
|
|
12
|
+
});
|
|
13
|
+
const MobileBuyerTenantItemSchema = zod_1.z.object({
|
|
14
|
+
companyUUID: zod_1.z.uuid(),
|
|
15
|
+
displayName: zod_1.z.string(),
|
|
16
|
+
domain: zod_1.z.string().nullable(),
|
|
17
|
+
});
|
|
18
|
+
const ListMobileBuyerTenantsResponseSchema = zod_1.z.object({
|
|
19
|
+
items: zod_1.z.array(MobileBuyerTenantItemSchema),
|
|
20
|
+
});
|
|
21
|
+
var ListMobileBuyerTenantsContractCommand;
|
|
22
|
+
(function (ListMobileBuyerTenantsContractCommand) {
|
|
23
|
+
ListMobileBuyerTenantsContractCommand.RequestSchema = ListMobileBuyerTenantsRequestSchema;
|
|
24
|
+
ListMobileBuyerTenantsContractCommand.ResponseSchema = ListMobileBuyerTenantsResponseSchema;
|
|
25
|
+
})(ListMobileBuyerTenantsContractCommand || (exports.ListMobileBuyerTenantsContractCommand = ListMobileBuyerTenantsContractCommand = {}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPreOrderCollectionItemGroupedListForClientContractQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const GetPreOrderCollectionItemGroupedListForClientRequestSchema = zod_1.z.object({
|
|
7
|
+
sizes: zod_1.z.array(zod_1.z.string()).optional(),
|
|
8
|
+
colors: zod_1.z.array(zod_1.z.string()).optional(),
|
|
9
|
+
preOrderCollectionsUUID: zod_1.z.array(zod_1.z.string()).optional(),
|
|
10
|
+
categoriesUUID: zod_1.z.array(zod_1.z.string()).optional(),
|
|
11
|
+
growers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
|
+
searchQuery: zod_1.z.string().optional(),
|
|
13
|
+
page: zod_1.z.coerce.number().optional().default(1),
|
|
14
|
+
count: zod_1.z.coerce.number().optional().default(10),
|
|
15
|
+
});
|
|
16
|
+
const GetPreOrderCollectionItemGroupedListForClientResponseSchema = zod_1.z.object({
|
|
17
|
+
message: zod_1.z.string().optional(),
|
|
18
|
+
data: schemas_1.PreOrderCollectionItemGroupedListSchema,
|
|
19
|
+
});
|
|
20
|
+
var GetPreOrderCollectionItemGroupedListForClientContractQuery;
|
|
21
|
+
(function (GetPreOrderCollectionItemGroupedListForClientContractQuery) {
|
|
22
|
+
GetPreOrderCollectionItemGroupedListForClientContractQuery.RequestSchema = GetPreOrderCollectionItemGroupedListForClientRequestSchema;
|
|
23
|
+
GetPreOrderCollectionItemGroupedListForClientContractQuery.ResponseSchema = GetPreOrderCollectionItemGroupedListForClientResponseSchema;
|
|
24
|
+
})(GetPreOrderCollectionItemGroupedListForClientContractQuery || (exports.GetPreOrderCollectionItemGroupedListForClientContractQuery = GetPreOrderCollectionItemGroupedListForClientContractQuery = {}));
|
|
@@ -27,6 +27,7 @@ __exportStar(require("./get-pre-order-collection-item-extended-with-clients-pre-
|
|
|
27
27
|
__exportStar(require("./get-active-pre-order-collection-item-list.query"), exports);
|
|
28
28
|
__exportStar(require("./get-pre-order-collection-item-list-filter-values-for-client.query"), exports);
|
|
29
29
|
__exportStar(require("./get-pre-order-collection-item-list-for-client.query"), exports);
|
|
30
|
+
__exportStar(require("./get-pre-order-collection-item-grouped-list-for-client.query"), exports);
|
|
30
31
|
__exportStar(require("./export-pre-order-collection-item-with-clients-horizontal.query"), exports);
|
|
31
32
|
__exportStar(require("./export-pre-order-collection-item-with-clients-vertical.query"), exports);
|
|
32
33
|
__exportStar(require("./update-pre-order-collection-item-product-maching.command"), exports);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.UpdateGroupProductUpdateBatchContractCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const enum_1 = require("../../../enum");
|
|
5
6
|
const UpdateGroupProductUpdateBatchRequestSchema = zod_1.z.object({
|
|
6
7
|
productUUIDList: zod_1.z.array(zod_1.z.string()),
|
|
7
8
|
data: zod_1.z
|
|
@@ -20,6 +21,7 @@ const UpdateGroupProductUpdateBatchRequestSchema = zod_1.z.object({
|
|
|
20
21
|
invoiceNumber: zod_1.z.string().nullable(),
|
|
21
22
|
imageUUID: zod_1.z.string().nullable(),
|
|
22
23
|
multiplicityDescription: zod_1.z.string().nullable(),
|
|
24
|
+
salesUnit: zod_1.z.nativeEnum(enum_1.SalesUnitEnum).nullable(),
|
|
23
25
|
})
|
|
24
26
|
.partial(),
|
|
25
27
|
});
|
package/build/constant/error.js
CHANGED
|
@@ -488,6 +488,8 @@ exports.ERRORS = {
|
|
|
488
488
|
CATEGORY_NOT_UPDATED: { code: 'CA014', message: 'Failed to update category', httpCode: 500 },
|
|
489
489
|
CATEGORY_CREATE_MANY_FAILED: { code: 'CA015', message: 'Failed to create many categories', httpCode: 500 },
|
|
490
490
|
CATEGORY_USE_IN_PRODUCT: { code: 'CA016', message: 'Category use in product', httpCode: 500 },
|
|
491
|
+
CATEGORY_USE_IN_PRE_ORDER_COLLECTION_ITEM: { code: 'CA017', message: 'Category use in pre order collection item', httpCode: 500 },
|
|
492
|
+
CATEGORY_USE_IN_PRODUCT_IMAGE: { code: 'CA018', message: 'Category use in product image', httpCode: 500 },
|
|
491
493
|
// CATEGORY ALIAS
|
|
492
494
|
ALIAS_NOT_CREATED: { code: 'AL009', message: 'Failed to create category-category-category-alias', httpCode: 500 },
|
|
493
495
|
ALIAS_NOT_FOUND: { code: 'AL010', message: 'Alias with this relation not found', httpCode: 404 },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreOrderCollectionItemExtendedWithPreOrderCollectionListSchema = exports.PreOrderCollectionItemExtendedWithPreOrderCollectionSchema = exports.PreOrderCollectionItemExtendedListSchema = exports.PreOrderCollectionItemExtendedWithClientsPreOrderProductSchema = exports.PreOrderCollectionItemExtendedSchema = exports.MatchingProductSchema = exports.UpdatePreOrderCollectionItemSchema = exports.CreatePreOrderCollectionItemSchema = exports.PreOrderCollectionItemSchema = void 0;
|
|
3
|
+
exports.PreOrderCollectionItemGroupedListSchema = exports.PreOrderCollectionItemGroupedSchema = exports.PreOrderCollectionItemExtendedWithPreOrderCollectionListSchema = exports.PreOrderCollectionItemExtendedWithPreOrderCollectionSchema = exports.PreOrderCollectionItemExtendedListSchema = exports.PreOrderCollectionItemExtendedWithClientsPreOrderProductSchema = exports.PreOrderCollectionItemExtendedSchema = exports.MatchingProductSchema = exports.UpdatePreOrderCollectionItemSchema = exports.CreatePreOrderCollectionItemSchema = exports.PreOrderCollectionItemSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const type_schema_1 = require("../type/type.schema");
|
|
6
6
|
const category_schema_1 = require("../category/category.schema");
|
|
@@ -130,3 +130,11 @@ exports.PreOrderCollectionItemExtendedWithPreOrderCollectionListSchema = zod_1.z
|
|
|
130
130
|
list: zod_1.z.array(exports.PreOrderCollectionItemExtendedWithPreOrderCollectionSchema),
|
|
131
131
|
total: zod_1.z.number(),
|
|
132
132
|
});
|
|
133
|
+
exports.PreOrderCollectionItemGroupedSchema = zod_1.z.object({
|
|
134
|
+
group: zod_1.z.string().nullable(),
|
|
135
|
+
items: zod_1.z.array(exports.PreOrderCollectionItemExtendedWithPreOrderCollectionSchema),
|
|
136
|
+
});
|
|
137
|
+
exports.PreOrderCollectionItemGroupedListSchema = zod_1.z.object({
|
|
138
|
+
list: zod_1.z.array(exports.PreOrderCollectionItemGroupedSchema),
|
|
139
|
+
total: zod_1.z.number(),
|
|
140
|
+
});
|
package/commands/auth/index.ts
CHANGED
|
@@ -2,7 +2,7 @@ export * from './register-user.command';
|
|
|
2
2
|
export * from './reset-password-by-user.command';
|
|
3
3
|
export * from './reset-password-by-admin.command';
|
|
4
4
|
export * from './login-user.command';
|
|
5
|
-
export * from './list-mobile-buyer-tenants
|
|
5
|
+
export * from './list-mobile-buyer-tenants.command';
|
|
6
6
|
export * from './reset-password-by-token.command';
|
|
7
7
|
export * from './restore-password-by-security-code.command';
|
|
8
8
|
export * from './reset-password-by-security-code.command';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
const ListMobileBuyerTenantsRequestSchema = z
|
|
4
|
+
.object({
|
|
5
|
+
phone: z.string().min(1).optional(),
|
|
6
|
+
email: z.email().optional(),
|
|
7
|
+
})
|
|
8
|
+
.refine((data) => data.phone || data.email, {
|
|
9
|
+
message: 'Either phone or email must be provided',
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const MobileBuyerTenantItemSchema = z.object({
|
|
13
|
+
companyUUID: z.uuid(),
|
|
14
|
+
displayName: z.string(),
|
|
15
|
+
domain: z.string().nullable(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const ListMobileBuyerTenantsResponseSchema = z.object({
|
|
19
|
+
items: z.array(MobileBuyerTenantItemSchema),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export namespace ListMobileBuyerTenantsContractCommand {
|
|
23
|
+
export const RequestSchema = ListMobileBuyerTenantsRequestSchema;
|
|
24
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
25
|
+
|
|
26
|
+
export const ResponseSchema = ListMobileBuyerTenantsResponseSchema;
|
|
27
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { PreOrderCollectionItemGroupedListSchema } from '../../schemas';
|
|
3
|
+
|
|
4
|
+
const GetPreOrderCollectionItemGroupedListForClientRequestSchema = z.object({
|
|
5
|
+
sizes: z.array(z.string()).optional(),
|
|
6
|
+
colors: z.array(z.string()).optional(),
|
|
7
|
+
preOrderCollectionsUUID: z.array(z.string()).optional(),
|
|
8
|
+
categoriesUUID: z.array(z.string()).optional(),
|
|
9
|
+
growers: z.array(z.string()).optional(),
|
|
10
|
+
searchQuery: z.string().optional(),
|
|
11
|
+
page: z.coerce.number().optional().default(1),
|
|
12
|
+
count: z.coerce.number().optional().default(10),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const GetPreOrderCollectionItemGroupedListForClientResponseSchema = z.object({
|
|
16
|
+
message: z.string().optional(),
|
|
17
|
+
data: PreOrderCollectionItemGroupedListSchema,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export namespace GetPreOrderCollectionItemGroupedListForClientContractQuery {
|
|
21
|
+
export const RequestSchema = GetPreOrderCollectionItemGroupedListForClientRequestSchema;
|
|
22
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
23
|
+
|
|
24
|
+
export const ResponseSchema = GetPreOrderCollectionItemGroupedListForClientResponseSchema;
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -11,6 +11,7 @@ export * from './get-pre-order-collection-item-extended-with-clients-pre-order-p
|
|
|
11
11
|
export * from './get-active-pre-order-collection-item-list.query';
|
|
12
12
|
export * from './get-pre-order-collection-item-list-filter-values-for-client.query';
|
|
13
13
|
export * from './get-pre-order-collection-item-list-for-client.query';
|
|
14
|
+
export * from './get-pre-order-collection-item-grouped-list-for-client.query';
|
|
14
15
|
export * from './export-pre-order-collection-item-with-clients-horizontal.query';
|
|
15
16
|
export * from './export-pre-order-collection-item-with-clients-vertical.query';
|
|
16
17
|
export * from './update-pre-order-collection-item-product-maching.command';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SalesUnitEnum } from '../../../enum';
|
|
2
3
|
|
|
3
4
|
const UpdateGroupProductUpdateBatchRequestSchema = z.object({
|
|
4
5
|
productUUIDList: z.array(z.string()),
|
|
@@ -18,6 +19,7 @@ const UpdateGroupProductUpdateBatchRequestSchema = z.object({
|
|
|
18
19
|
invoiceNumber: z.string().nullable(),
|
|
19
20
|
imageUUID: z.string().nullable(),
|
|
20
21
|
multiplicityDescription: z.string().nullable(),
|
|
22
|
+
salesUnit: z.nativeEnum(SalesUnitEnum).nullable(),
|
|
21
23
|
})
|
|
22
24
|
.partial(),
|
|
23
25
|
});
|
package/constant/error.ts
CHANGED
|
@@ -510,6 +510,8 @@ export const ERRORS = {
|
|
|
510
510
|
CATEGORY_NOT_UPDATED: { code: 'CA014', message: 'Failed to update category', httpCode: 500 },
|
|
511
511
|
CATEGORY_CREATE_MANY_FAILED: { code: 'CA015', message: 'Failed to create many categories', httpCode: 500 },
|
|
512
512
|
CATEGORY_USE_IN_PRODUCT: { code: 'CA016', message: 'Category use in product', httpCode: 500 },
|
|
513
|
+
CATEGORY_USE_IN_PRE_ORDER_COLLECTION_ITEM: { code: 'CA017', message: 'Category use in pre order collection item', httpCode: 500 },
|
|
514
|
+
CATEGORY_USE_IN_PRODUCT_IMAGE: { code: 'CA018', message: 'Category use in product image', httpCode: 500 },
|
|
513
515
|
|
|
514
516
|
// CATEGORY ALIAS
|
|
515
517
|
ALIAS_NOT_CREATED: { code: 'AL009', message: 'Failed to create category-category-category-alias', httpCode: 500 },
|
package/package.json
CHANGED
|
@@ -136,3 +136,13 @@ export const PreOrderCollectionItemExtendedWithPreOrderCollectionListSchema = z.
|
|
|
136
136
|
list: z.array(PreOrderCollectionItemExtendedWithPreOrderCollectionSchema),
|
|
137
137
|
total: z.number(),
|
|
138
138
|
});
|
|
139
|
+
|
|
140
|
+
export const PreOrderCollectionItemGroupedSchema = z.object({
|
|
141
|
+
group: z.string().nullable(),
|
|
142
|
+
items: z.array(PreOrderCollectionItemExtendedWithPreOrderCollectionSchema),
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
export const PreOrderCollectionItemGroupedListSchema = z.object({
|
|
146
|
+
list: z.array(PreOrderCollectionItemGroupedSchema),
|
|
147
|
+
total: z.number(),
|
|
148
|
+
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListMobileBuyerTenantsByPhoneContractCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const ListMobileBuyerTenantsByPhoneRequestSchema = zod_1.z.object({
|
|
6
|
-
phone: zod_1.z.string().min(1),
|
|
7
|
-
});
|
|
8
|
-
const MobileBuyerTenantItemSchema = zod_1.z.object({
|
|
9
|
-
companyUUID: zod_1.z.uuid(),
|
|
10
|
-
displayName: zod_1.z.string(),
|
|
11
|
-
domain: zod_1.z.string().nullable(),
|
|
12
|
-
});
|
|
13
|
-
const ListMobileBuyerTenantsByPhoneResponseSchema = zod_1.z.object({
|
|
14
|
-
items: zod_1.z.array(MobileBuyerTenantItemSchema),
|
|
15
|
-
});
|
|
16
|
-
var ListMobileBuyerTenantsByPhoneContractCommand;
|
|
17
|
-
(function (ListMobileBuyerTenantsByPhoneContractCommand) {
|
|
18
|
-
ListMobileBuyerTenantsByPhoneContractCommand.RequestSchema = ListMobileBuyerTenantsByPhoneRequestSchema;
|
|
19
|
-
ListMobileBuyerTenantsByPhoneContractCommand.ResponseSchema = ListMobileBuyerTenantsByPhoneResponseSchema;
|
|
20
|
-
})(ListMobileBuyerTenantsByPhoneContractCommand || (exports.ListMobileBuyerTenantsByPhoneContractCommand = ListMobileBuyerTenantsByPhoneContractCommand = {}));
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
const ListMobileBuyerTenantsByPhoneRequestSchema = z.object({
|
|
4
|
-
phone: z.string().min(1),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const MobileBuyerTenantItemSchema = z.object({
|
|
8
|
-
companyUUID: z.uuid(),
|
|
9
|
-
displayName: z.string(),
|
|
10
|
-
domain: z.string().nullable(),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
const ListMobileBuyerTenantsByPhoneResponseSchema = z.object({
|
|
14
|
-
items: z.array(MobileBuyerTenantItemSchema),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export namespace ListMobileBuyerTenantsByPhoneContractCommand {
|
|
18
|
-
export const RequestSchema = ListMobileBuyerTenantsByPhoneRequestSchema;
|
|
19
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
20
|
-
|
|
21
|
-
export const ResponseSchema = ListMobileBuyerTenantsByPhoneResponseSchema;
|
|
22
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
23
|
-
}
|