@unchainedshop/core 4.8.29 → 5.0.0-alpha.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/README.md +92 -546
- package/lib/bulk-exporter/createBulkExporter.d.ts +2 -2
- package/lib/bulk-exporter/createBulkExporter.js +1 -1
- package/lib/bulk-exporter/handlers/exportAssortmentsHandler.d.ts +19 -19
- package/lib/bulk-exporter/handlers/exportAssortmentsHandler.js +9 -9
- package/lib/bulk-exporter/handlers/exportFiltersHandler.d.ts +11 -11
- package/lib/bulk-exporter/handlers/exportFiltersHandler.js +5 -5
- package/lib/bulk-exporter/handlers/exportProductsHandler.d.ts +19 -19
- package/lib/bulk-exporter/handlers/exportProductsHandler.js +11 -11
- package/lib/bulk-exporter/handlers/exportUsersHandler.d.ts +17 -17
- package/lib/bulk-exporter/handlers/exportUsersHandler.js +8 -8
- package/lib/bulk-importer/createBulkImporter.d.ts +1 -1
- package/lib/bulk-importer/createBulkImporter.js +6 -6
- package/lib/bulk-importer/handlers/product/create.d.ts +135 -32
- package/lib/bulk-importer/handlers/product/create.js +33 -16
- package/lib/bulk-importer/handlers/product/update.d.ts +63 -33
- package/lib/bulk-importer/handlers/product/update.js +5 -48
- package/lib/core-index.d.ts +4 -2
- package/lib/core-index.js +5 -17
- package/lib/directors/BaseDiscountAdapter.d.ts +3 -0
- package/lib/directors/BaseDiscountDirector.d.ts +2 -2
- package/lib/directors/BaseDiscountDirector.js +12 -14
- package/lib/directors/BasePricingDirector.d.ts +2 -2
- package/lib/directors/BasePricingDirector.js +4 -7
- package/lib/directors/BaseWorker.js +3 -2
- package/lib/directors/DeliveryAdapter.js +1 -0
- package/lib/directors/DeliveryDirector.d.ts +1 -1
- package/lib/directors/DeliveryDirector.js +4 -5
- package/lib/directors/DeliveryPricingAdapter.d.ts +2 -1
- package/lib/directors/DeliveryPricingAdapter.js +2 -1
- package/lib/directors/DeliveryPricingDirector.d.ts +1 -1
- package/lib/directors/DeliveryPricingDirector.js +4 -3
- package/lib/directors/DeliveryPricingSheet.d.ts +1 -1
- package/lib/directors/DeliveryPricingSheet.js +1 -1
- package/lib/directors/EnrollmentAdapter.js +1 -1
- package/lib/directors/EnrollmentDirector.d.ts +1 -1
- package/lib/directors/EnrollmentDirector.js +5 -7
- package/lib/directors/FileDirector.d.ts +4 -4
- package/lib/directors/FileDirector.js +2 -13
- package/lib/directors/FilterAdapter.js +1 -0
- package/lib/directors/FilterDirector.d.ts +1 -1
- package/lib/directors/FilterDirector.js +6 -8
- package/lib/directors/OrderDiscountAdapter.d.ts +3 -2
- package/lib/directors/OrderDiscountAdapter.js +5 -2
- package/lib/directors/OrderDiscountDirector.js +2 -1
- package/lib/directors/OrderPricingAdapter.d.ts +2 -1
- package/lib/directors/OrderPricingAdapter.js +3 -1
- package/lib/directors/OrderPricingDirector.d.ts +4 -1
- package/lib/directors/OrderPricingDirector.js +4 -2
- package/lib/directors/OrderPricingSheet.d.ts +2 -1
- package/lib/directors/OrderPricingSheet.js +18 -18
- package/lib/directors/PaymentAdapter.js +1 -0
- package/lib/directors/PaymentDirector.d.ts +1 -1
- package/lib/directors/PaymentDirector.js +4 -5
- package/lib/directors/PaymentPricingAdapter.d.ts +2 -1
- package/lib/directors/PaymentPricingAdapter.js +2 -1
- package/lib/directors/PaymentPricingDirector.d.ts +2 -1
- package/lib/directors/PaymentPricingDirector.js +3 -2
- package/lib/directors/PaymentPricingSheet.d.ts +2 -1
- package/lib/directors/PaymentPricingSheet.js +2 -1
- package/lib/directors/ProductDiscountAdapter.d.ts +3 -2
- package/lib/directors/ProductDiscountAdapter.js +5 -2
- package/lib/directors/ProductDiscountDirector.d.ts +1 -1
- package/lib/directors/ProductDiscountDirector.js +3 -2
- package/lib/directors/ProductPricingAdapter.d.ts +2 -1
- package/lib/directors/ProductPricingAdapter.js +3 -1
- package/lib/directors/ProductPricingDirector.d.ts +3 -1
- package/lib/directors/ProductPricingDirector.js +4 -2
- package/lib/directors/ProductPricingSheet.d.ts +1 -1
- package/lib/directors/ProductPricingSheet.js +1 -1
- package/lib/directors/QuotationAdapter.js +1 -0
- package/lib/directors/QuotationDirector.d.ts +1 -1
- package/lib/directors/QuotationDirector.js +4 -7
- package/lib/directors/WarehousingAdapter.js +1 -0
- package/lib/directors/WarehousingDirector.d.ts +1 -1
- package/lib/directors/WarehousingDirector.js +19 -27
- package/lib/directors/WorkerAdapter.js +1 -0
- package/lib/directors/WorkerDirector.d.ts +2 -2
- package/lib/directors/WorkerDirector.js +3 -22
- package/lib/directors/index.d.ts +2 -0
- package/lib/directors/index.js +2 -0
- package/lib/directors/registryDirector.d.ts +2 -0
- package/lib/directors/registryDirector.js +6 -0
- package/lib/factory/index.d.ts +12 -1
- package/lib/factory/index.js +12 -1
- package/lib/factory/registerAssortmentSearchFilter.d.ts +4 -2
- package/lib/factory/registerAssortmentSearchFilter.js +18 -6
- package/lib/factory/registerInvoicePayment.d.ts +2 -2
- package/lib/factory/registerInvoicePayment.js +12 -3
- package/lib/factory/registerPhysicalWarehousing.d.ts +2 -2
- package/lib/factory/registerPhysicalWarehousing.js +12 -3
- package/lib/factory/registerPickUpDelivery.d.ts +2 -2
- package/lib/factory/registerPickUpDelivery.js +12 -3
- package/lib/factory/registerProductDiscoverabilityFilter.d.ts +4 -2
- package/lib/factory/registerProductDiscoverabilityFilter.js +18 -6
- package/lib/factory/registerProductSearchFilter.d.ts +4 -2
- package/lib/factory/registerProductSearchFilter.js +16 -6
- package/lib/factory/registerShippingDelivery.d.ts +2 -2
- package/lib/factory/registerShippingDelivery.js +12 -3
- package/lib/factory/registerVirtualWarehousing.d.ts +2 -2
- package/lib/factory/registerVirtualWarehousing.js +13 -4
- package/lib/factory/registerWorker.d.ts +2 -1
- package/lib/factory/registerWorker.js +13 -4
- package/lib/plugins/PluginRegistry.d.ts +1 -0
- package/lib/plugins/PluginRegistry.js +8 -1
- package/lib/services/checkoutOrder.js +4 -0
- package/lib/services/createDownloadStream.js +1 -1
- package/lib/services/createFileDownloadURL.js +2 -1
- package/lib/services/createSignedURL.js +2 -1
- package/lib/services/index.d.ts +14 -1
- package/lib/services/index.js +14 -1
- package/lib/services/initCartProviders.js +1 -0
- package/lib/services/linkFileService.js +1 -1
- package/lib/services/removeFiles.js +1 -1
- package/lib/services/reserveOrderDiscountsForCheckout.d.ts +5 -0
- package/lib/services/reserveOrderDiscountsForCheckout.js +34 -0
- package/lib/services/simulateProductDispatching.d.ts +3 -1
- package/lib/services/simulateProductDispatching.js +3 -3
- package/lib/services/simulateProductInventory.d.ts +3 -1
- package/lib/services/simulateProductInventory.js +3 -3
- package/lib/services/supportedDeliveryProviders.js +9 -0
- package/lib/services/supportedPaymentProviders.js +9 -0
- package/lib/services/supportedWarehousingProviders.js +9 -0
- package/lib/services/uploadFileFromStream.js +2 -1
- package/lib/services/uploadFileFromURL.js +2 -1
- package/package.json +26 -24
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import exportProductsHandler from './handlers/exportProductsHandler.ts';
|
|
2
2
|
import exportAssortmentsHandler from './handlers/exportAssortmentsHandler.ts';
|
|
3
3
|
import exportFiltersHandler from './handlers/exportFiltersHandler.ts';
|
|
4
|
-
import { z } from 'zod
|
|
4
|
+
import { z } from 'zod';
|
|
5
5
|
import type { CSVFileResult } from './handlers/generateCSVFileAndUrl.ts';
|
|
6
6
|
export declare const EXPORTS_DIRECTORY = "exports";
|
|
7
7
|
export type ExportFiles = Record<string, CSVFileResult | null>;
|
|
@@ -11,7 +11,7 @@ export interface BulkExportOperationResult {
|
|
|
11
11
|
files: ExportFiles;
|
|
12
12
|
}
|
|
13
13
|
export interface BulkExportHandler<T = unknown> {
|
|
14
|
-
payloadSchema?: z.
|
|
14
|
+
payloadSchema?: z.ZodObject<z.ZodRawShape>;
|
|
15
15
|
(params: Record<string, unknown>, locales: string[], unchainedAPI: T): Promise<ExportFiles>;
|
|
16
16
|
}
|
|
17
17
|
export interface BulkExporterOptions {
|
|
@@ -2,7 +2,7 @@ import exportProductsHandler from "./handlers/exportProductsHandler.js";
|
|
|
2
2
|
import exportAssortmentsHandler from "./handlers/exportAssortmentsHandler.js";
|
|
3
3
|
import exportFiltersHandler from "./handlers/exportFiltersHandler.js";
|
|
4
4
|
import { createLogger } from '@unchainedshop/logger';
|
|
5
|
-
import { z } from 'zod
|
|
5
|
+
import { z } from 'zod';
|
|
6
6
|
import exportUsersHandler from "./handlers/exportUsersHandler.js";
|
|
7
7
|
const logger = createLogger('unchained:bulk-export');
|
|
8
8
|
export const EXPORTS_DIRECTORY = 'exports';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { UnchainedCore } from '../../core-index.ts';
|
|
2
|
-
import { z } from 'zod
|
|
3
|
-
export declare const AssortmentExportPayloadSchema: z.
|
|
4
|
-
exportAssortments: z.
|
|
5
|
-
exportLinks: z.
|
|
6
|
-
exportProducts: z.
|
|
7
|
-
exportFilters: z.
|
|
8
|
-
queryString: z.
|
|
9
|
-
includeInactive: z.
|
|
10
|
-
includeLeaves: z.
|
|
11
|
-
tags: z.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const AssortmentExportPayloadSchema: z.ZodObject<{
|
|
4
|
+
exportAssortments: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
exportLinks: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
exportProducts: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
exportFilters: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
9
|
+
includeInactive: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
includeLeaves: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export interface AssortmentExportParams {
|
|
14
14
|
exportAssortments?: boolean;
|
|
@@ -24,15 +24,15 @@ declare const exportAssortmentsHandler: {
|
|
|
24
24
|
products: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
25
25
|
children: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
26
26
|
}>;
|
|
27
|
-
payloadSchema: z.
|
|
28
|
-
exportAssortments: z.
|
|
29
|
-
exportLinks: z.
|
|
30
|
-
exportProducts: z.
|
|
31
|
-
exportFilters: z.
|
|
32
|
-
queryString: z.
|
|
33
|
-
includeInactive: z.
|
|
34
|
-
includeLeaves: z.
|
|
35
|
-
tags: z.
|
|
27
|
+
payloadSchema: z.ZodObject<{
|
|
28
|
+
exportAssortments: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
exportLinks: z.ZodOptional<z.ZodBoolean>;
|
|
30
|
+
exportProducts: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
exportFilters: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
33
|
+
includeInactive: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
includeLeaves: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
37
|
};
|
|
38
38
|
export default exportAssortmentsHandler;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import generateCSVFileAndURL from "./generateCSVFileAndUrl.js";
|
|
2
|
-
import { z } from 'zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
import { EXPORTS_DIRECTORY } from "../createBulkExporter.js";
|
|
4
4
|
export const AssortmentExportPayloadSchema = z.object({
|
|
5
|
-
exportAssortments: z.
|
|
6
|
-
exportLinks: z.
|
|
7
|
-
exportProducts: z.
|
|
8
|
-
exportFilters: z.
|
|
9
|
-
queryString: z.
|
|
10
|
-
includeInactive: z.
|
|
11
|
-
includeLeaves: z.
|
|
12
|
-
tags: z.
|
|
5
|
+
exportAssortments: z.boolean().optional(),
|
|
6
|
+
exportLinks: z.boolean().optional(),
|
|
7
|
+
exportProducts: z.boolean().optional(),
|
|
8
|
+
exportFilters: z.boolean().optional(),
|
|
9
|
+
queryString: z.string().optional(),
|
|
10
|
+
includeInactive: z.boolean().optional(),
|
|
11
|
+
includeLeaves: z.boolean().optional(),
|
|
12
|
+
tags: z.array(z.string()).optional(),
|
|
13
13
|
});
|
|
14
14
|
const ASSORTMENT_CSV_SCHEMA = {
|
|
15
15
|
base: ['_id', 'isActive', 'isBase', 'isRoot', 'sequence', 'tags'],
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { UnchainedCore } from '../../core-index.ts';
|
|
2
|
-
import { z } from 'zod
|
|
3
|
-
export declare const FilterExportPayloadSchema: z.
|
|
4
|
-
exportFilters: z.
|
|
5
|
-
exportFilterOptions: z.
|
|
6
|
-
queryString: z.
|
|
7
|
-
includeInactive: z.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const FilterExportPayloadSchema: z.ZodObject<{
|
|
4
|
+
exportFilters: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
exportFilterOptions: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
7
|
+
includeInactive: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export interface FilterExportParams {
|
|
10
10
|
exportFilters?: boolean;
|
|
@@ -16,11 +16,11 @@ declare const exportFiltersHandler: {
|
|
|
16
16
|
filters: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
17
17
|
filterOptions: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
18
18
|
}>;
|
|
19
|
-
payloadSchema: z.
|
|
20
|
-
exportFilters: z.
|
|
21
|
-
exportFilterOptions: z.
|
|
22
|
-
queryString: z.
|
|
23
|
-
includeInactive: z.
|
|
19
|
+
payloadSchema: z.ZodObject<{
|
|
20
|
+
exportFilters: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
exportFilterOptions: z.ZodOptional<z.ZodBoolean>;
|
|
22
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
23
|
+
includeInactive: z.ZodOptional<z.ZodBoolean>;
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
};
|
|
26
26
|
export default exportFiltersHandler;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import generateCSVFileAndURL from "./generateCSVFileAndUrl.js";
|
|
2
|
-
import { z } from 'zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
import { EXPORTS_DIRECTORY } from "../createBulkExporter.js";
|
|
4
4
|
export const FilterExportPayloadSchema = z.object({
|
|
5
|
-
exportFilters: z.
|
|
6
|
-
exportFilterOptions: z.
|
|
7
|
-
queryString: z.
|
|
8
|
-
includeInactive: z.
|
|
5
|
+
exportFilters: z.boolean().optional(),
|
|
6
|
+
exportFilterOptions: z.boolean().optional(),
|
|
7
|
+
queryString: z.string().optional(),
|
|
8
|
+
includeInactive: z.boolean().optional(),
|
|
9
9
|
});
|
|
10
10
|
const FILTER_CSV_SCHEMA = {
|
|
11
11
|
filterFields: ['_id', 'key', 'type', 'isActive'],
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { UnchainedCore } from '../../core-index.ts';
|
|
2
|
-
import { z } from 'zod
|
|
3
|
-
export declare const ProductExportPayloadSchema: z.
|
|
4
|
-
exportProducts: z.
|
|
5
|
-
exportBundleItems: z.
|
|
6
|
-
exportPrices: z.
|
|
7
|
-
exportVariations: z.
|
|
8
|
-
exportVariationOptions: z.
|
|
9
|
-
queryString: z.
|
|
10
|
-
includeDrafts: z.
|
|
11
|
-
tags: z.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ProductExportPayloadSchema: z.ZodObject<{
|
|
4
|
+
exportProducts: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
exportBundleItems: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
exportPrices: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
exportVariations: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
exportVariationOptions: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
10
|
+
includeDrafts: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
12
12
|
}, z.core.$strip>;
|
|
13
13
|
export interface ProductExportParams {
|
|
14
14
|
exportProducts?: boolean;
|
|
@@ -26,15 +26,15 @@ declare const exportProductsHandler: {
|
|
|
26
26
|
variations: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
27
27
|
variationOptions: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
28
28
|
}>;
|
|
29
|
-
payloadSchema: z.
|
|
30
|
-
exportProducts: z.
|
|
31
|
-
exportBundleItems: z.
|
|
32
|
-
exportPrices: z.
|
|
33
|
-
exportVariations: z.
|
|
34
|
-
exportVariationOptions: z.
|
|
35
|
-
queryString: z.
|
|
36
|
-
includeDrafts: z.
|
|
37
|
-
tags: z.
|
|
29
|
+
payloadSchema: z.ZodObject<{
|
|
30
|
+
exportProducts: z.ZodOptional<z.ZodBoolean>;
|
|
31
|
+
exportBundleItems: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
exportPrices: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
exportVariations: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
exportVariationOptions: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
queryString: z.ZodOptional<z.ZodString>;
|
|
36
|
+
includeDrafts: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
};
|
|
40
40
|
export default exportProductsHandler;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import generateCSVFileAndURL from "./generateCSVFileAndUrl.js";
|
|
2
|
-
import { z } from 'zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
import { EXPORTS_DIRECTORY } from "../createBulkExporter.js";
|
|
4
4
|
export const ProductExportPayloadSchema = z.object({
|
|
5
|
-
exportProducts: z.
|
|
6
|
-
exportBundleItems: z.
|
|
7
|
-
exportPrices: z.
|
|
8
|
-
exportVariations: z.
|
|
9
|
-
exportVariationOptions: z.
|
|
10
|
-
queryString: z.
|
|
11
|
-
includeDrafts: z.
|
|
12
|
-
tags: z.
|
|
5
|
+
exportProducts: z.boolean().optional(),
|
|
6
|
+
exportBundleItems: z.boolean().optional(),
|
|
7
|
+
exportPrices: z.boolean().optional(),
|
|
8
|
+
exportVariations: z.boolean().optional(),
|
|
9
|
+
exportVariationOptions: z.boolean().optional(),
|
|
10
|
+
queryString: z.string().optional(),
|
|
11
|
+
includeDrafts: z.boolean().optional(),
|
|
12
|
+
tags: z.array(z.string()).optional(),
|
|
13
13
|
});
|
|
14
14
|
const PRODUCT_CSV_SCHEMA = {
|
|
15
15
|
base: ['_id', 'sku', 'baseUnit', 'sequence', 'status', 'tags', 'updated', 'published', 'type'],
|
|
@@ -21,7 +21,7 @@ const PRODUCT_CSV_SCHEMA = {
|
|
|
21
21
|
'countryCode',
|
|
22
22
|
'isTaxable',
|
|
23
23
|
'isNetPrice',
|
|
24
|
-
'
|
|
24
|
+
'minQuantity',
|
|
25
25
|
],
|
|
26
26
|
bundleItemHeaders: ['productId', 'bundleItemProductId', 'quantity', 'configuration'],
|
|
27
27
|
variationItemHeaders: ['productId', 'variationId', 'key', 'type'],
|
|
@@ -77,7 +77,7 @@ const buildPriceRows = (productId, prices = []) => prices.map((p) => ({
|
|
|
77
77
|
isTaxable: p.isTaxable ?? '',
|
|
78
78
|
currencyCode: p.currency?.isoCode ?? '',
|
|
79
79
|
countryCode: p.country?.isoCode ?? '',
|
|
80
|
-
|
|
80
|
+
minQuantity: p.minQuantity ?? '',
|
|
81
81
|
}));
|
|
82
82
|
const buildBundleRows = (productId, bundles = []) => bundles.map((b) => ({
|
|
83
83
|
productId,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { UnchainedCore } from '../../core-index.ts';
|
|
2
|
-
import { z } from 'zod
|
|
3
|
-
export declare const UserExportPayloadSchema: z.
|
|
4
|
-
exportReviews: z.
|
|
5
|
-
exportOrders: z.
|
|
6
|
-
exportBookmarks: z.
|
|
7
|
-
exportEvents: z.
|
|
8
|
-
exportQuotations: z.
|
|
9
|
-
exportEnrollments: z.
|
|
10
|
-
userId: z.
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const UserExportPayloadSchema: z.ZodObject<{
|
|
4
|
+
exportReviews: z.ZodOptional<z.ZodBoolean>;
|
|
5
|
+
exportOrders: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
exportBookmarks: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
exportEvents: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
exportQuotations: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
exportEnrollments: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export interface UserExportParams {
|
|
13
13
|
exportReviews?: boolean;
|
|
@@ -27,14 +27,14 @@ declare const exportUsersHandler: {
|
|
|
27
27
|
quotations: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
28
28
|
enrollments: import("./generateCSVFileAndUrl.ts").CSVFileResult | null;
|
|
29
29
|
}>;
|
|
30
|
-
payloadSchema: z.
|
|
31
|
-
exportReviews: z.
|
|
32
|
-
exportOrders: z.
|
|
33
|
-
exportBookmarks: z.
|
|
34
|
-
exportEvents: z.
|
|
35
|
-
exportQuotations: z.
|
|
36
|
-
exportEnrollments: z.
|
|
37
|
-
userId: z.
|
|
30
|
+
payloadSchema: z.ZodObject<{
|
|
31
|
+
exportReviews: z.ZodOptional<z.ZodBoolean>;
|
|
32
|
+
exportOrders: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
exportBookmarks: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
exportEvents: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
exportQuotations: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
exportEnrollments: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
};
|
|
40
40
|
export default exportUsersHandler;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import generateCSVFileAndURL from "./generateCSVFileAndUrl.js";
|
|
2
|
-
import { z } from 'zod
|
|
2
|
+
import { z } from 'zod';
|
|
3
3
|
import { EXPORTS_DIRECTORY } from "../createBulkExporter.js";
|
|
4
4
|
export const UserExportPayloadSchema = z.object({
|
|
5
|
-
exportReviews: z.
|
|
6
|
-
exportOrders: z.
|
|
7
|
-
exportBookmarks: z.
|
|
8
|
-
exportEvents: z.
|
|
9
|
-
exportQuotations: z.
|
|
10
|
-
exportEnrollments: z.
|
|
11
|
-
userId: z.
|
|
5
|
+
exportReviews: z.boolean().optional(),
|
|
6
|
+
exportOrders: z.boolean().optional(),
|
|
7
|
+
exportBookmarks: z.boolean().optional(),
|
|
8
|
+
exportEvents: z.boolean().optional(),
|
|
9
|
+
exportQuotations: z.boolean().optional(),
|
|
10
|
+
exportEnrollments: z.boolean().optional(),
|
|
11
|
+
userId: z.string().optional(),
|
|
12
12
|
});
|
|
13
13
|
const USER_CSV_SCHEMA = {
|
|
14
14
|
userFields: [
|
|
@@ -14,7 +14,7 @@ export interface BulkImportOperationResult {
|
|
|
14
14
|
export type BulkImportOperation<T> = {
|
|
15
15
|
payloadSchema?: z.ZodMiniObject;
|
|
16
16
|
} & ((payload: any, options: {
|
|
17
|
-
bulk: (collection: string) => mongodb.BulkOperationBase;
|
|
17
|
+
bulk: (collection: string) => typeof mongodb.BulkOperationBase;
|
|
18
18
|
createShouldUpsertIfIDExists?: boolean;
|
|
19
19
|
updateShouldUpsertIfIDNotExists?: boolean;
|
|
20
20
|
skipCacheInvalidation?: boolean;
|
|
@@ -59,12 +59,12 @@ export default function createBulkImporterFactory(db, bulkImporterOptions) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
catch (e) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
62
|
+
const issues = e?.issues
|
|
63
|
+
? e.issues.map((i) => `${i.path?.join('.')}: ${i.message}`).join(', ')
|
|
64
|
+
: e.message;
|
|
65
|
+
throw new Error(`🤧 ${entity}.${operation}.${event.payload?._id || '*'} (${issues})`, {
|
|
66
|
+
cause: e,
|
|
67
|
+
});
|
|
68
68
|
}
|
|
69
69
|
},
|
|
70
70
|
prepare: async (event, unchainedAPI) => {
|
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
import { z } from 'zod/v4-mini';
|
|
2
2
|
import type { Modules } from '../../../modules.ts';
|
|
3
3
|
import type { Services } from '../../../services/index.ts';
|
|
4
|
-
export declare const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
export declare const DateLikeSchema: z.ZodMiniUnion<readonly [z.ZodMiniDate<Date>, z.ZodMiniString<string>]>;
|
|
5
|
+
export declare const ProductTokenizationSchema: z.ZodMiniObject<{
|
|
6
|
+
contractAddress: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
7
|
+
contractStandard: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
8
|
+
readonly ERC721: "ERC721";
|
|
9
|
+
readonly ERC1155: "ERC1155";
|
|
10
|
+
}>>;
|
|
11
|
+
tokenId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
12
|
+
supply: z.ZodMiniOptional<z.ZodMiniInt>;
|
|
13
|
+
ercMetadataProperties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const ProductContentSchema: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
16
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
17
|
+
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
18
|
+
slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
19
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
20
|
+
brand: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
21
|
+
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
22
|
+
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
export declare const ProductSpecificationFields: {
|
|
12
25
|
sequence: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
13
26
|
status: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<{
|
|
14
27
|
readonly DRAFT: "DRAFT";
|
|
15
28
|
readonly ACTIVE: "ACTIVE";
|
|
16
29
|
readonly DELETED: "DELETED";
|
|
17
30
|
}>>>;
|
|
18
|
-
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
31
|
+
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniDate<Date>, z.ZodMiniString<string>]>>>;
|
|
19
32
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
20
33
|
commerce: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
21
34
|
pricing: z.ZodMiniArray<z.ZodMiniObject<{
|
|
22
35
|
amount: z.ZodMiniNumber<number>;
|
|
23
|
-
|
|
36
|
+
minQuantity: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
24
37
|
isTaxable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
25
38
|
isNetPrice: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
26
39
|
currencyCode: z.ZodMiniString<string>;
|
|
@@ -37,6 +50,16 @@ export declare const ProductCreateSpecificationSchema: z.ZodMiniObject<{
|
|
|
37
50
|
lengthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
38
51
|
widthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
39
52
|
}, z.core.$strip>>;
|
|
53
|
+
tokenization: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
54
|
+
contractAddress: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
55
|
+
contractStandard: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
56
|
+
readonly ERC721: "ERC721";
|
|
57
|
+
readonly ERC1155: "ERC1155";
|
|
58
|
+
}>>;
|
|
59
|
+
tokenId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
60
|
+
supply: z.ZodMiniOptional<z.ZodMiniInt>;
|
|
61
|
+
ercMetadataProperties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
40
63
|
bundleItems: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
41
64
|
productId: z.ZodMiniString<string>;
|
|
42
65
|
quantity: z.ZodMiniNumber<number>;
|
|
@@ -46,6 +69,19 @@ export declare const ProductCreateSpecificationSchema: z.ZodMiniObject<{
|
|
|
46
69
|
}, z.core.$strip>>;
|
|
47
70
|
}, z.core.$strip>>>;
|
|
48
71
|
meta: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniAny, z.ZodMiniAny>>;
|
|
72
|
+
variationResolvers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
73
|
+
vector: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
|
|
74
|
+
productId: z.ZodMiniString<string>;
|
|
75
|
+
}, z.core.$strip>>>;
|
|
76
|
+
};
|
|
77
|
+
export declare const ProductCreateSpecificationSchema: z.ZodMiniObject<{
|
|
78
|
+
type: z.ZodMiniEnum<{
|
|
79
|
+
readonly SIMPLE_PRODUCT: "SIMPLE_PRODUCT";
|
|
80
|
+
readonly CONFIGURABLE_PRODUCT: "CONFIGURABLE_PRODUCT";
|
|
81
|
+
readonly BUNDLE_PRODUCT: "BUNDLE_PRODUCT";
|
|
82
|
+
readonly PLAN_PRODUCT: "PLAN_PRODUCT";
|
|
83
|
+
readonly TOKENIZED_PRODUCT: "TOKENIZED_PRODUCT";
|
|
84
|
+
}>;
|
|
49
85
|
content: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
50
86
|
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
51
87
|
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
@@ -55,6 +91,53 @@ export declare const ProductCreateSpecificationSchema: z.ZodMiniObject<{
|
|
|
55
91
|
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
56
92
|
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
57
93
|
}, z.core.$strip>>;
|
|
94
|
+
sequence: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
95
|
+
status: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<{
|
|
96
|
+
readonly DRAFT: "DRAFT";
|
|
97
|
+
readonly ACTIVE: "ACTIVE";
|
|
98
|
+
readonly DELETED: "DELETED";
|
|
99
|
+
}>>>;
|
|
100
|
+
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniDate<Date>, z.ZodMiniString<string>]>>>;
|
|
101
|
+
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
102
|
+
commerce: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
103
|
+
pricing: z.ZodMiniArray<z.ZodMiniObject<{
|
|
104
|
+
amount: z.ZodMiniNumber<number>;
|
|
105
|
+
minQuantity: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
106
|
+
isTaxable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
107
|
+
isNetPrice: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
108
|
+
currencyCode: z.ZodMiniString<string>;
|
|
109
|
+
countryCode: z.ZodMiniString<string>;
|
|
110
|
+
}, z.core.$strip>>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
warehousing: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
113
|
+
sku: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
114
|
+
baseUnit: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
115
|
+
}, z.core.$strip>>;
|
|
116
|
+
supply: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
117
|
+
weightInGram: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
118
|
+
heightInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
119
|
+
lengthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
120
|
+
widthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
tokenization: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
123
|
+
contractAddress: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
124
|
+
contractStandard: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
125
|
+
readonly ERC721: "ERC721";
|
|
126
|
+
readonly ERC1155: "ERC1155";
|
|
127
|
+
}>>;
|
|
128
|
+
tokenId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
129
|
+
supply: z.ZodMiniOptional<z.ZodMiniInt>;
|
|
130
|
+
ercMetadataProperties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
bundleItems: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
133
|
+
productId: z.ZodMiniString<string>;
|
|
134
|
+
quantity: z.ZodMiniNumber<number>;
|
|
135
|
+
configuration: z.ZodMiniArray<z.ZodMiniObject<{
|
|
136
|
+
key: z.ZodMiniString<string>;
|
|
137
|
+
value: z.ZodMiniString<string>;
|
|
138
|
+
}, z.core.$strip>>;
|
|
139
|
+
}, z.core.$strip>>>;
|
|
140
|
+
meta: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniAny, z.ZodMiniAny>>;
|
|
58
141
|
variationResolvers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
59
142
|
vector: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
|
|
60
143
|
productId: z.ZodMiniString<string>;
|
|
@@ -70,18 +153,27 @@ export declare const ProductCreatePayloadSchema: z.ZodMiniObject<{
|
|
|
70
153
|
readonly PLAN_PRODUCT: "PLAN_PRODUCT";
|
|
71
154
|
readonly TOKENIZED_PRODUCT: "TOKENIZED_PRODUCT";
|
|
72
155
|
}>;
|
|
156
|
+
content: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
157
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
158
|
+
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
159
|
+
slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
160
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
161
|
+
brand: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
162
|
+
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
163
|
+
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
164
|
+
}, z.core.$strip>>;
|
|
73
165
|
sequence: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
74
166
|
status: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<{
|
|
75
167
|
readonly DRAFT: "DRAFT";
|
|
76
168
|
readonly ACTIVE: "ACTIVE";
|
|
77
169
|
readonly DELETED: "DELETED";
|
|
78
170
|
}>>>;
|
|
79
|
-
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
171
|
+
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniDate<Date>, z.ZodMiniString<string>]>>>;
|
|
80
172
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
81
173
|
commerce: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
82
174
|
pricing: z.ZodMiniArray<z.ZodMiniObject<{
|
|
83
175
|
amount: z.ZodMiniNumber<number>;
|
|
84
|
-
|
|
176
|
+
minQuantity: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
85
177
|
isTaxable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
86
178
|
isNetPrice: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
87
179
|
currencyCode: z.ZodMiniString<string>;
|
|
@@ -98,6 +190,16 @@ export declare const ProductCreatePayloadSchema: z.ZodMiniObject<{
|
|
|
98
190
|
lengthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
99
191
|
widthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
100
192
|
}, z.core.$strip>>;
|
|
193
|
+
tokenization: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
194
|
+
contractAddress: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
195
|
+
contractStandard: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
196
|
+
readonly ERC721: "ERC721";
|
|
197
|
+
readonly ERC1155: "ERC1155";
|
|
198
|
+
}>>;
|
|
199
|
+
tokenId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
200
|
+
supply: z.ZodMiniOptional<z.ZodMiniInt>;
|
|
201
|
+
ercMetadataProperties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
202
|
+
}, z.core.$strip>>;
|
|
101
203
|
bundleItems: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
102
204
|
productId: z.ZodMiniString<string>;
|
|
103
205
|
quantity: z.ZodMiniNumber<number>;
|
|
@@ -107,15 +209,6 @@ export declare const ProductCreatePayloadSchema: z.ZodMiniObject<{
|
|
|
107
209
|
}, z.core.$strip>>;
|
|
108
210
|
}, z.core.$strip>>>;
|
|
109
211
|
meta: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniAny, z.ZodMiniAny>>;
|
|
110
|
-
content: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
111
|
-
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
112
|
-
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
113
|
-
slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
114
|
-
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
115
|
-
brand: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
116
|
-
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
117
|
-
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
118
|
-
}, z.core.$strip>>;
|
|
119
212
|
variationResolvers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
120
213
|
vector: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
|
|
121
214
|
productId: z.ZodMiniString<string>;
|
|
@@ -177,18 +270,27 @@ declare namespace createProduct {
|
|
|
177
270
|
readonly PLAN_PRODUCT: "PLAN_PRODUCT";
|
|
178
271
|
readonly TOKENIZED_PRODUCT: "TOKENIZED_PRODUCT";
|
|
179
272
|
}>;
|
|
273
|
+
content: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
274
|
+
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
275
|
+
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
276
|
+
slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
277
|
+
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
278
|
+
brand: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
279
|
+
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
280
|
+
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
281
|
+
}, z.core.$strip>>;
|
|
180
282
|
sequence: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
181
283
|
status: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniEnum<{
|
|
182
284
|
readonly DRAFT: "DRAFT";
|
|
183
285
|
readonly ACTIVE: "ACTIVE";
|
|
184
286
|
readonly DELETED: "DELETED";
|
|
185
287
|
}>>>;
|
|
186
|
-
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniString<string>>>;
|
|
288
|
+
published: z.ZodMiniOptional<z.ZodMiniNullable<z.ZodMiniUnion<readonly [z.ZodMiniDate<Date>, z.ZodMiniString<string>]>>>;
|
|
187
289
|
tags: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
188
290
|
commerce: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
189
291
|
pricing: z.ZodMiniArray<z.ZodMiniObject<{
|
|
190
292
|
amount: z.ZodMiniNumber<number>;
|
|
191
|
-
|
|
293
|
+
minQuantity: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
192
294
|
isTaxable: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
193
295
|
isNetPrice: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
|
|
194
296
|
currencyCode: z.ZodMiniString<string>;
|
|
@@ -205,6 +307,16 @@ declare namespace createProduct {
|
|
|
205
307
|
lengthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
206
308
|
widthInMillimeters: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
|
|
207
309
|
}, z.core.$strip>>;
|
|
310
|
+
tokenization: z.ZodMiniOptional<z.ZodMiniObject<{
|
|
311
|
+
contractAddress: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
312
|
+
contractStandard: z.ZodMiniOptional<z.ZodMiniEnum<{
|
|
313
|
+
readonly ERC721: "ERC721";
|
|
314
|
+
readonly ERC1155: "ERC1155";
|
|
315
|
+
}>>;
|
|
316
|
+
tokenId: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
317
|
+
supply: z.ZodMiniOptional<z.ZodMiniInt>;
|
|
318
|
+
ercMetadataProperties: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
|
|
319
|
+
}, z.core.$strip>>;
|
|
208
320
|
bundleItems: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
209
321
|
productId: z.ZodMiniString<string>;
|
|
210
322
|
quantity: z.ZodMiniNumber<number>;
|
|
@@ -214,15 +326,6 @@ declare namespace createProduct {
|
|
|
214
326
|
}, z.core.$strip>>;
|
|
215
327
|
}, z.core.$strip>>>;
|
|
216
328
|
meta: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniAny, z.ZodMiniAny>>;
|
|
217
|
-
content: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniObject<{
|
|
218
|
-
title: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
219
|
-
subtitle: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
220
|
-
slug: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
221
|
-
description: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
222
|
-
brand: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
223
|
-
vendor: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
224
|
-
labels: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
|
|
225
|
-
}, z.core.$strip>>;
|
|
226
329
|
variationResolvers: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniObject<{
|
|
227
330
|
vector: z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>;
|
|
228
331
|
productId: z.ZodMiniString<string>;
|