@unchainedshop/core 4.8.0 → 4.8.1

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.
Files changed (45) hide show
  1. package/lib/bulk-exporter/createBulkExporter.d.ts +2 -2
  2. package/lib/bulk-exporter/createBulkExporter.js +2 -2
  3. package/lib/bulk-exporter/handlers/exportAssortmentsHandler.d.ts +19 -19
  4. package/lib/bulk-exporter/handlers/exportAssortmentsHandler.js +9 -9
  5. package/lib/bulk-exporter/handlers/exportFiltersHandler.d.ts +11 -11
  6. package/lib/bulk-exporter/handlers/exportFiltersHandler.js +5 -5
  7. package/lib/bulk-exporter/handlers/exportProductsHandler.d.ts +19 -19
  8. package/lib/bulk-exporter/handlers/exportProductsHandler.js +9 -9
  9. package/lib/bulk-exporter/handlers/exportUsersHandler.d.ts +17 -17
  10. package/lib/bulk-exporter/handlers/exportUsersHandler.js +8 -8
  11. package/lib/bulk-importer/createBulkImporter.d.ts +2 -2
  12. package/lib/bulk-importer/createBulkImporter.js +4 -2
  13. package/lib/bulk-importer/handlers/assortment/create.d.ts +87 -87
  14. package/lib/bulk-importer/handlers/assortment/create.js +13 -15
  15. package/lib/bulk-importer/handlers/assortment/remove.d.ts +5 -5
  16. package/lib/bulk-importer/handlers/assortment/remove.js +1 -1
  17. package/lib/bulk-importer/handlers/assortment/update.d.ts +87 -87
  18. package/lib/bulk-importer/handlers/assortment/update.js +17 -21
  19. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +7 -7
  20. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +5 -5
  21. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +7 -7
  22. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +5 -5
  23. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +7 -7
  24. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +5 -5
  25. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +14 -14
  26. package/lib/bulk-importer/handlers/assortment/upsertMedia.js +8 -10
  27. package/lib/bulk-importer/handlers/filter/create.d.ts +19 -19
  28. package/lib/bulk-importer/handlers/filter/create.js +8 -10
  29. package/lib/bulk-importer/handlers/filter/remove.d.ts +3 -3
  30. package/lib/bulk-importer/handlers/filter/remove.js +1 -1
  31. package/lib/bulk-importer/handlers/filter/update.d.ts +19 -19
  32. package/lib/bulk-importer/handlers/filter/update.js +8 -10
  33. package/lib/bulk-importer/handlers/product/create.d.ts +175 -175
  34. package/lib/bulk-importer/handlers/product/create.js +35 -45
  35. package/lib/bulk-importer/handlers/product/remove.d.ts +5 -5
  36. package/lib/bulk-importer/handlers/product/remove.js +1 -1
  37. package/lib/bulk-importer/handlers/product/update.d.ts +175 -175
  38. package/lib/bulk-importer/handlers/product/update.js +40 -52
  39. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +14 -14
  40. package/lib/bulk-importer/handlers/product/upsertMedia.js +8 -10
  41. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +13 -13
  42. package/lib/bulk-importer/handlers/product/upsertVariations.js +10 -14
  43. package/lib/bulk-importer/upsertAsset.d.ts +7 -7
  44. package/lib/bulk-importer/upsertAsset.js +4 -4
  45. package/package.json +1 -1
@@ -1,24 +1,20 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v4-mini';
2
2
  const ProductVariationOptionSchema = z.object({
3
3
  value: z.string(),
4
- content: z
5
- .record(z.string(), z.object({
6
- title: z.string().optional(),
7
- subtitle: z.string().optional(),
8
- }))
9
- .optional(),
4
+ content: z.optional(z.record(z.string(), z.object({
5
+ title: z.optional(z.string()),
6
+ subtitle: z.optional(z.string()),
7
+ }))),
10
8
  });
11
9
  export const ProductVariationSchema = z.object({
12
- _id: z.string().optional(),
10
+ _id: z.optional(z.string()),
13
11
  key: z.string(),
14
12
  type: z.string(),
15
13
  options: z.array(ProductVariationOptionSchema),
16
- content: z
17
- .record(z.string(), z.object({
18
- title: z.string().optional(),
19
- subtitle: z.string().optional(),
20
- }))
21
- .optional(),
14
+ content: z.optional(z.record(z.string(), z.object({
15
+ title: z.optional(z.string()),
16
+ subtitle: z.optional(z.string()),
17
+ }))),
22
18
  });
23
19
  const upsert = async (productVariation, unchainedAPI) => {
24
20
  const { modules } = unchainedAPI;
@@ -1,12 +1,12 @@
1
1
  import type { Modules } from '../modules.ts';
2
2
  import type { Services } from '../services/index.ts';
3
- import { z } from 'zod';
4
- export declare const AssetSchema: z.ZodObject<{
5
- _id: z.ZodOptional<z.ZodString>;
6
- url: z.ZodString;
7
- meta: z.ZodOptional<z.ZodRecord<z.ZodAny, z.ZodAny>>;
8
- fileName: z.ZodString;
9
- headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
3
+ import { z } from 'zod/v4-mini';
4
+ export declare const AssetSchema: z.ZodMiniObject<{
5
+ _id: z.ZodMiniOptional<z.ZodMiniString<string>>;
6
+ url: z.ZodMiniString<string>;
7
+ meta: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniAny, z.ZodMiniAny>>;
8
+ fileName: z.ZodMiniString<string>;
9
+ headers: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniAny>>;
10
10
  }, z.core.$strip>;
11
11
  declare const upsertAsset: (directoryName: string, asset: z.infer<typeof AssetSchema>, unchainedAPI: {
12
12
  modules: Modules;
@@ -1,12 +1,12 @@
1
1
  import { createLogger } from '@unchainedshop/logger';
2
- import { z } from 'zod';
2
+ import { z } from 'zod/v4-mini';
3
3
  const logger = createLogger('unchained:bulk-import');
4
4
  export const AssetSchema = z.object({
5
- _id: z.string().optional(),
5
+ _id: z.optional(z.string()),
6
6
  url: z.string(),
7
- meta: z.record(z.any(), z.any()).optional(),
7
+ meta: z.optional(z.record(z.any(), z.any())),
8
8
  fileName: z.string(),
9
- headers: z.record(z.string(), z.any()).optional(),
9
+ headers: z.optional(z.record(z.string(), z.any())),
10
10
  });
11
11
  const upsertAsset = async (directoryName, asset, unchainedAPI) => {
12
12
  const { modules, services } = unchainedAPI;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/core",
3
3
  "description": "Core orchestration package for the Unchained Engine with business services and directors",
4
- "version": "4.8.0",
4
+ "version": "4.8.1",
5
5
  "main": "lib/core-index.js",
6
6
  "types": "lib/core-index.d.ts",
7
7
  "type": "module",