@floristcloud/api-lib 1.2.166 → 1.2.168
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/category/create-category.command.js +3 -9
- package/build/commands/category/get-category-by-uuid.query.js +4 -11
- package/build/commands/category/get-category-list.query.js +3 -9
- package/build/commands/category/update-category-command.js +3 -9
- package/build/commands/integration/ozexport/get-ozexport-catalog-filters.query.js +10 -0
- package/build/commands/integration/ozexport/index.js +1 -0
- package/build/constant/discount-rules-pricing-type-list.constant.js +14 -0
- package/build/constant/error.js +11 -0
- package/build/constant/index.js +1 -0
- package/build/enum/discount-rules-mode-type.enum.js +2 -4
- package/build/enum/discount-rules-type.enum.js +1 -0
- package/build/schemas/category/category-create.schema.js +4 -0
- package/build/schemas/category/category-extended-with-box-settings.schema.js +8 -0
- package/build/schemas/category/category-extended.schema.js +8 -0
- package/build/schemas/category/category-list.schema.js +2 -2
- package/build/schemas/category/category-pieces-per-box-by-length.schema.js +9 -0
- package/build/schemas/category/category-pieces-per-box-overrides.schema.js +8 -0
- package/build/schemas/category/category-update.schema.js +4 -0
- package/build/schemas/category/category-with-box-settings.schema.js +11 -0
- package/build/schemas/category/category.schema.js +1 -5
- package/build/schemas/category/create-category-response.schema.js +9 -0
- package/build/schemas/category/get-category-by-uuid-request.schema.js +7 -0
- package/build/schemas/category/get-category-by-uuid-response.schema.js +9 -0
- package/build/schemas/category/get-category-list-response.schema.js +9 -0
- package/build/schemas/category/index.js +10 -0
- package/build/schemas/category/update-category-response.schema.js +9 -0
- package/build/schemas/discount-rules/discount-rules.schema.js +25 -11
- package/build/schemas/discount-rules/product-discount-price-data.schema.js +9 -0
- package/build/schemas/discount-rules/product-discount-price-multiplicity-option.schema.js +2 -0
- package/build/schemas/integration/ozexport/get-ozexport-catalog-filters-request.schema.js +5 -0
- package/build/schemas/integration/ozexport/get-ozexport-catalog-filters-response-data.schema.js +9 -0
- package/build/schemas/integration/ozexport/get-ozexport-catalog-filters-response.schema.js +8 -0
- package/build/schemas/integration/ozexport/get-ozexport-catalog-offers-request.schema.js +2 -0
- package/build/schemas/integration/ozexport/get-ozexport-catalog-request.schema.js +3 -0
- package/build/schemas/integration/ozexport/index.js +4 -0
- package/build/schemas/integration/ozexport/ozexport-catalog-category.schema.js +8 -0
- package/build/schemas/order-product/price-correction-analyze-item.schema.js +6 -0
- package/build/schemas/pre-order-collection-item/index.js +1 -0
- package/build/schemas/pre-order-collection-item/pre-order-collection-item-extended-for-admin.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/pre-order-collection-item-extended-with-clients-pre-order-product.schema.js +2 -0
- package/build/schemas/pre-order-collection-item/pre-order-collection-item-for-admin.schema.js +2 -1
- package/build/schemas/pre-order-collection-item/supplier-add-analyze-item.schema.js +2 -0
- package/build/schemas/pre-order-collection-item/supplier-add-analyze-request.schema.js +1 -0
- package/build/schemas/pre-order-collection-item/supplier-add-cost-price.schema.js +6 -0
- package/build/schemas/pre-order-collection-item/supplier-add-execute-item.schema.js +2 -0
- package/build/schemas/pre-order-collection-item/supplier-add-execute-request.schema.js +1 -0
- package/build/schemas/product-image/product-image.schema.js +2 -2
- package/commands/category/create-category.command.ts +3 -10
- package/commands/category/get-category-by-uuid.query.ts +3 -11
- package/commands/category/get-category-list.query.ts +4 -11
- package/commands/category/update-category-command.ts +3 -10
- package/commands/integration/ozexport/get-ozexport-catalog-filters.query.ts +11 -0
- package/commands/integration/ozexport/index.ts +1 -0
- package/constant/discount-rules-pricing-type-list.constant.ts +12 -0
- package/constant/error.ts +11 -0
- package/constant/index.ts +1 -0
- package/enum/discount-rules-mode-type.enum.ts +2 -4
- package/enum/discount-rules-type.enum.ts +1 -0
- package/package.json +1 -1
- package/schemas/category/category-create.schema.ts +5 -0
- package/schemas/category/category-extended-with-box-settings.schema.ts +6 -0
- package/schemas/category/category-extended.schema.ts +6 -0
- package/schemas/category/category-list.schema.ts +2 -2
- package/schemas/category/category-pieces-per-box-by-length.schema.ts +8 -0
- package/schemas/category/category-pieces-per-box-overrides.schema.ts +6 -0
- package/schemas/category/category-update.schema.ts +5 -0
- package/schemas/category/category-with-box-settings.schema.ts +10 -0
- package/schemas/category/category.schema.ts +0 -5
- package/schemas/category/create-category-response.schema.ts +7 -0
- package/schemas/category/get-category-by-uuid-request.schema.ts +5 -0
- package/schemas/category/get-category-by-uuid-response.schema.ts +7 -0
- package/schemas/category/get-category-list-response.schema.ts +7 -0
- package/schemas/category/index.ts +10 -0
- package/schemas/category/update-category-response.schema.ts +7 -0
- package/schemas/discount-rules/discount-rules.schema.ts +28 -11
- package/schemas/discount-rules/product-discount-price-data.schema.ts +9 -0
- package/schemas/discount-rules/product-discount-price-multiplicity-option.schema.ts +2 -0
- package/schemas/integration/ozexport/get-ozexport-catalog-filters-request.schema.ts +3 -0
- package/schemas/integration/ozexport/get-ozexport-catalog-filters-response-data.schema.ts +7 -0
- package/schemas/integration/ozexport/get-ozexport-catalog-filters-response.schema.ts +6 -0
- package/schemas/integration/ozexport/get-ozexport-catalog-offers-request.schema.ts +2 -0
- package/schemas/integration/ozexport/get-ozexport-catalog-request.schema.ts +4 -0
- package/schemas/integration/ozexport/index.ts +4 -0
- package/schemas/integration/ozexport/ozexport-catalog-category.schema.ts +6 -0
- package/schemas/order-product/price-correction-analyze-item.schema.ts +7 -0
- package/schemas/pre-order-collection-item/index.ts +1 -0
- package/schemas/pre-order-collection-item/pre-order-collection-item-extended-for-admin.schema.ts +5 -3
- package/schemas/pre-order-collection-item/pre-order-collection-item-extended-with-clients-pre-order-product.schema.ts +2 -0
- package/schemas/pre-order-collection-item/pre-order-collection-item-for-admin.schema.ts +5 -1
- package/schemas/pre-order-collection-item/supplier-add-analyze-item.schema.ts +2 -0
- package/schemas/pre-order-collection-item/supplier-add-analyze-request.schema.ts +1 -0
- package/schemas/pre-order-collection-item/supplier-add-cost-price.schema.ts +4 -0
- package/schemas/pre-order-collection-item/supplier-add-execute-item.schema.ts +2 -0
- package/schemas/pre-order-collection-item/supplier-add-execute-request.schema.ts +1 -0
- package/schemas/product-image/product-image.schema.ts +1 -1
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { PreOrderCollectionItemSupplierAdminShape } from './pre-order-collection-item-supplier-admin.shape';
|
|
2
2
|
import { PreOrderCollectionItemSchema } from './pre-order-collection-item-base.schema';
|
|
3
|
+
import { SupplierAddCostPriceSchema } from './supplier-add-cost-price.schema';
|
|
3
4
|
|
|
4
|
-
export const PreOrderCollectionItemForAdminSchema = PreOrderCollectionItemSchema.extend(
|
|
5
|
+
export const PreOrderCollectionItemForAdminSchema = PreOrderCollectionItemSchema.extend({
|
|
6
|
+
...PreOrderCollectionItemSupplierAdminShape,
|
|
7
|
+
costPrice: SupplierAddCostPriceSchema.nullable(),
|
|
8
|
+
});
|
|
@@ -13,6 +13,8 @@ export const SupplierAddAnalyzeItemSchema = z.object({
|
|
|
13
13
|
productImageUUID: z.string().nullable(),
|
|
14
14
|
willImportCard: z.boolean(),
|
|
15
15
|
categoryName: z.string().nullable(),
|
|
16
|
+
categoryMultiplicity: z.number().nullable(),
|
|
17
|
+
piecesPerBox: z.number().int().positive().nullable(),
|
|
16
18
|
offer: SupplierAddAnalyzeOfferSchema.nullable(),
|
|
17
19
|
existingItemUUID: z.string().nullable(),
|
|
18
20
|
isSkipped: z.boolean(),
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { SupplierAddOfferKeySchema } from './supplier-add-offer-key.schema';
|
|
3
3
|
import { SupplierAddSalePriceSchema } from './supplier-add-sale-price.schema';
|
|
4
|
+
import { SupplierAddCostPriceSchema } from './supplier-add-cost-price.schema';
|
|
4
5
|
|
|
5
6
|
// Кратность — Int колонки позиции (int4).
|
|
6
7
|
const MULTIPLICITY_MAX = 2147483647;
|
|
7
8
|
|
|
8
9
|
export const SupplierAddExecuteItemSchema = SupplierAddOfferKeySchema.extend({
|
|
9
10
|
price: SupplierAddSalePriceSchema,
|
|
11
|
+
costPrice: SupplierAddCostPriceSchema.nullable().optional(),
|
|
10
12
|
multiplicity: z.number().int().min(1).max(MULTIPLICITY_MAX).optional(),
|
|
11
13
|
isOpen: z.boolean().optional(),
|
|
12
14
|
});
|
|
@@ -13,4 +13,5 @@ export const SupplierAddExecuteRequestSchema = z.object({
|
|
|
13
13
|
.refine(hasUniqueSupplierAddKeys, { message: 'validation.supplierAdd.duplicateKeys' }),
|
|
14
14
|
// true — добавить и те предложения, которые в коллекции уже есть (ALREADY_IN_COLLECTION не пропускается).
|
|
15
15
|
allowDuplicates: z.boolean().optional().default(false),
|
|
16
|
+
transferGrower: z.boolean().optional().default(true),
|
|
16
17
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { CategoryExtendedSchema } from '../category/category.schema';
|
|
2
|
+
import { CategoryExtendedSchema } from '../category/category-extended.schema';
|
|
3
3
|
import { ProductImageAliasSchema } from './product-image-alias.schema';
|
|
4
4
|
|
|
5
5
|
export const ProductImageSchema = z.object({
|