@unchainedshop/core 4.3.3 → 4.3.5

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 (89) hide show
  1. package/lib/bulk-importer/createBulkImporter.d.ts +1 -1
  2. package/lib/bulk-importer/createBulkImporter.d.ts.map +1 -1
  3. package/lib/bulk-importer/handlers/assortment/create.d.ts +40 -480
  4. package/lib/bulk-importer/handlers/assortment/create.d.ts.map +1 -1
  5. package/lib/bulk-importer/handlers/assortment/create.js +1 -1
  6. package/lib/bulk-importer/handlers/assortment/create.js.map +1 -1
  7. package/lib/bulk-importer/handlers/assortment/remove.d.ts +2 -10
  8. package/lib/bulk-importer/handlers/assortment/remove.d.ts.map +1 -1
  9. package/lib/bulk-importer/handlers/assortment/update.d.ts +40 -480
  10. package/lib/bulk-importer/handlers/assortment/update.d.ts.map +1 -1
  11. package/lib/bulk-importer/handlers/assortment/update.js +1 -1
  12. package/lib/bulk-importer/handlers/assortment/update.js.map +1 -1
  13. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +3 -15
  14. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts.map +1 -1
  15. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +1 -1
  16. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +1 -1
  17. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +3 -15
  18. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts.map +1 -1
  19. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +1 -1
  20. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +1 -1
  21. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +3 -15
  22. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts.map +1 -1
  23. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +1 -1
  24. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +1 -1
  25. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +6 -54
  26. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts.map +1 -1
  27. package/lib/bulk-importer/handlers/filter/create.d.ts +7 -107
  28. package/lib/bulk-importer/handlers/filter/create.d.ts.map +1 -1
  29. package/lib/bulk-importer/handlers/filter/create.js +1 -1
  30. package/lib/bulk-importer/handlers/filter/create.js.map +1 -1
  31. package/lib/bulk-importer/handlers/filter/remove.d.ts +1 -5
  32. package/lib/bulk-importer/handlers/filter/remove.d.ts.map +1 -1
  33. package/lib/bulk-importer/handlers/filter/update.d.ts +7 -107
  34. package/lib/bulk-importer/handlers/filter/update.d.ts.map +1 -1
  35. package/lib/bulk-importer/handlers/filter/update.js +1 -1
  36. package/lib/bulk-importer/handlers/filter/update.js.map +1 -1
  37. package/lib/bulk-importer/handlers/product/create.d.ts +61 -1155
  38. package/lib/bulk-importer/handlers/product/create.d.ts.map +1 -1
  39. package/lib/bulk-importer/handlers/product/create.js +2 -2
  40. package/lib/bulk-importer/handlers/product/create.js.map +1 -1
  41. package/lib/bulk-importer/handlers/product/remove.d.ts +2 -10
  42. package/lib/bulk-importer/handlers/product/remove.d.ts.map +1 -1
  43. package/lib/bulk-importer/handlers/product/update.d.ts +61 -1155
  44. package/lib/bulk-importer/handlers/product/update.d.ts.map +1 -1
  45. package/lib/bulk-importer/handlers/product/update.js +2 -2
  46. package/lib/bulk-importer/handlers/product/update.js.map +1 -1
  47. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +6 -54
  48. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts.map +1 -1
  49. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +4 -58
  50. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts.map +1 -1
  51. package/lib/bulk-importer/upsertAsset.d.ts +3 -15
  52. package/lib/bulk-importer/upsertAsset.d.ts.map +1 -1
  53. package/lib/bulk-importer/upsertAsset.js +2 -2
  54. package/lib/bulk-importer/upsertAsset.js.map +1 -1
  55. package/lib/directors/BasePricingSheet.d.ts.map +1 -1
  56. package/lib/directors/BasePricingSheet.js.map +1 -1
  57. package/package.json +1 -1
  58. package/src/bulk-importer/createBulkImporter.ts +1 -1
  59. package/src/bulk-importer/handlers/assortment/create.ts +1 -1
  60. package/src/bulk-importer/handlers/assortment/update.ts +1 -1
  61. package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +1 -1
  62. package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +1 -1
  63. package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +1 -1
  64. package/src/bulk-importer/handlers/filter/create.ts +1 -1
  65. package/src/bulk-importer/handlers/filter/update.ts +1 -1
  66. package/src/bulk-importer/handlers/product/create.ts +2 -2
  67. package/src/bulk-importer/handlers/product/update.ts +2 -2
  68. package/src/bulk-importer/upsertAsset.ts +2 -2
  69. package/src/directors/BasePricingSheet.ts +3 -2
  70. package/lib/factory/registerPhysicalWarehouse copy.d.ts +0 -10
  71. package/lib/factory/registerPhysicalWarehouse copy.d.ts.map +0 -1
  72. package/lib/factory/registerPhysicalWarehouse copy.js +0 -54
  73. package/lib/factory/registerPhysicalWarehouse copy.js.map +0 -1
  74. package/lib/factory/registerPhysicalWarehouse.d.ts +0 -10
  75. package/lib/factory/registerPhysicalWarehouse.d.ts.map +0 -1
  76. package/lib/factory/registerPhysicalWarehouse.js +0 -54
  77. package/lib/factory/registerPhysicalWarehouse.js.map +0 -1
  78. package/lib/factory/registerVirtualWarehouse.d.ts +0 -11
  79. package/lib/factory/registerVirtualWarehouse.d.ts.map +0 -1
  80. package/lib/factory/registerVirtualWarehouse.js +0 -51
  81. package/lib/factory/registerVirtualWarehouse.js.map +0 -1
  82. package/lib/factory/registerWarehouse.d.ts +0 -7
  83. package/lib/factory/registerWarehouse.d.ts.map +0 -1
  84. package/lib/factory/registerWarehouse.js +0 -35
  85. package/lib/factory/registerWarehouse.js.map +0 -1
  86. package/lib/factory/registerWorker copy.d.ts +0 -7
  87. package/lib/factory/registerWorker copy.d.ts.map +0 -1
  88. package/lib/factory/registerWorker copy.js +0 -35
  89. package/lib/factory/registerWorker copy.js.map +0 -1
@@ -1,51 +0,0 @@
1
- import { WarehousingProviderType, } from '@unchainedshop/core-warehousing';
2
- import { WarehousingAdapter, WarehousingDirector } from '../core-index.js';
3
- export default function registerVirtualWarehouse({ adapterId, orderIndex = 0, stock, tokenize, tokenMetadata, isInvalidateable, }) {
4
- WarehousingDirector.registerAdapter({
5
- ...WarehousingAdapter,
6
- key: 'shop.unchained.warehousing.virtual.' + adapterId,
7
- label: 'Virtual Wareshousing: ' + adapterId,
8
- version: '1.0.0',
9
- orderIndex,
10
- initialConfiguration: [{ key: 'shipping-hub', value: 'Shipping Hub' }],
11
- typeSupported: (type) => {
12
- return type === WarehousingProviderType.VIRTUAL;
13
- },
14
- actions: (configuration, context) => {
15
- return {
16
- ...WarehousingAdapter.actions(configuration, context),
17
- isActive() {
18
- return true;
19
- },
20
- configurationError() {
21
- return null;
22
- },
23
- stock: async (referenceDate) => {
24
- if (typeof stock === 'number') {
25
- return stock;
26
- }
27
- else if (typeof stock === 'function') {
28
- return stock(referenceDate, configuration, context);
29
- }
30
- return 99999;
31
- },
32
- async tokenize() {
33
- return tokenize(configuration, context);
34
- },
35
- async tokenMetadata(serialNumber, referenceDate) {
36
- if (tokenMetadata) {
37
- return tokenMetadata(serialNumber, referenceDate, configuration, context);
38
- }
39
- return null;
40
- },
41
- async isInvalidateable(serialNumber, referenceDate) {
42
- if (isInvalidateable) {
43
- return isInvalidateable(serialNumber, referenceDate, configuration, context);
44
- }
45
- return false;
46
- },
47
- };
48
- },
49
- });
50
- }
51
- //# sourceMappingURL=registerVirtualWarehouse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registerVirtualWarehouse.js","sourceRoot":"","sources":["../../src/factory/registerVirtualWarehouse.ts"],"names":[],"mappings":"AAAA,OAA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,CAAC;gBAED,KAAK,CAAC,aAAa,CAAC,YAAY,EAAE,aAAa;oBAC7C,IAAI,aAAa,EAAE,CAAC;wBAClB,OAAO,aAAa,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;oBAC5E,CAAC;oBACD,OAAO,IAAI,CAAC;gBACd,CAAC;gBAED,KAAK,CAAC,gBAAgB,CAAC,YAAY,EAAE,aAAa;oBAChD,IAAI,gBAAgB,EAAE,CAAC;wBACrB,OAAO,gBAAgB,CAAC,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;oBAC/E,CAAC;oBACD,OAAO,KAAK,CAAC;gBACf,CAAC;aACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,7 +0,0 @@
1
- export default function registerWorker<Input = any, Result = any>({ type, external, maxParallelAllocations, process, }: {
2
- type: string;
3
- external?: boolean;
4
- maxParallelAllocations?: number;
5
- process?: (input: Input, workId: string) => Promise<Result>;
6
- }): void;
7
- //# sourceMappingURL=registerWarehouse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registerWarehouse.d.ts","sourceRoot":"","sources":["../../src/factory/registerWarehouse.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,EAChE,IAAI,EACJ,QAAQ,EACR,sBAAsB,EACtB,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D,QAiCA"}
@@ -1,35 +0,0 @@
1
- import { WorkerAdapter, WorkerDirector } from '../core-index.js';
2
- export default function registerWorker({ type, external, maxParallelAllocations, process, }) {
3
- WorkerDirector.registerAdapter({
4
- ...WorkerAdapter,
5
- key: 'shop.unchained.worker.' + type.toLowerCase(),
6
- label: 'Worker: ' + type,
7
- version: '1.0',
8
- external: external ?? false,
9
- maxParallelAllocations,
10
- type,
11
- async doWork(input, _, workId) {
12
- if (!process) {
13
- return { success: false };
14
- }
15
- try {
16
- const result = await process(input, workId);
17
- return {
18
- success: true,
19
- result,
20
- };
21
- }
22
- catch (err) {
23
- return {
24
- success: false,
25
- error: {
26
- name: err.name,
27
- message: err.message,
28
- cause: err.cause,
29
- },
30
- };
31
- }
32
- },
33
- });
34
- }
35
- //# sourceMappingURL=registerWarehouse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registerWarehouse.js","sourceRoot":"","sources":["../../src/factory/registerWarehouse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,cAAc,CAA4B,EAChE,IAAI,EACJ,QAAQ,EACR,sBAAsB,EACtB,OAAO,GAMR;IACC,cAAc,CAAC,eAAe,CAAC;QAC7B,GAAG,aAAa;QAEhB,GAAG,EAAE,wBAAwB,GAAG,IAAI,CAAC,WAAW,EAAE;QAClD,KAAK,EAAE,UAAU,GAAG,IAAI;QACxB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,QAAQ,IAAI,KAAK;QAC3B,sBAAsB;QACtB,IAAI;QAEJ,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM;YAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC5C,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,MAAM;iBACP,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,IAAI,EAAE,GAAG,CAAC,IAAI;wBACd,OAAO,EAAE,GAAG,CAAC,OAAO;wBACpB,KAAK,EAAE,GAAG,CAAC,KAAK;qBACjB;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,7 +0,0 @@
1
- export default function registerWorker<Input = any, Result = any>({ type, external, maxParallelAllocations, process, }: {
2
- type: string;
3
- external?: boolean;
4
- maxParallelAllocations?: number;
5
- process?: (input: Input, workId: string) => Promise<Result>;
6
- }): void;
7
- //# sourceMappingURL=registerWorker%20copy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registerWorker copy.d.ts","sourceRoot":"","sources":["../../src/factory/registerWorker copy.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,EAChE,IAAI,EACJ,QAAQ,EACR,sBAAsB,EACtB,OAAO,GACR,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC7D,QAiCA"}
@@ -1,35 +0,0 @@
1
- import { WorkerAdapter, WorkerDirector } from '../core-index.js';
2
- export default function registerWorker({ type, external, maxParallelAllocations, process, }) {
3
- WorkerDirector.registerAdapter({
4
- ...WorkerAdapter,
5
- key: 'shop.unchained.worker.' + type.toLowerCase(),
6
- label: 'Worker: ' + type,
7
- version: '1.0',
8
- external: external ?? false,
9
- maxParallelAllocations,
10
- type,
11
- async doWork(input, _, workId) {
12
- if (!process) {
13
- return { success: false };
14
- }
15
- try {
16
- const result = await process(input, workId);
17
- return {
18
- success: true,
19
- result,
20
- };
21
- }
22
- catch (err) {
23
- return {
24
- success: false,
25
- error: {
26
- name: err.name,
27
- message: err.message,
28
- cause: err.cause,
29
- },
30
- };
31
- }
32
- },
33
- });
34
- }
35
- //# sourceMappingURL=registerWorker%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registerWorker copy.js","sourceRoot":"","sources":["../../src/factory/registerWorker copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,CAAC,OAAO,UAAU,cAAc,CAA4B,EAChE,IAAI,EACJ,QAAQ,EACR,sBAAsB,EACtB,OAAO,GAMR;IACC,cAAc,CAAC,eAAe,CAAC;QAC7B,GAAG,aAAa;QAEhB,GAAG,EAAE,wBAAwB,GAAG,IAAI,CAAC,WAAW,EAAE;QAClD,KAAK,EAAE,UAAU,GAAG,IAAI;QACxB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,QAAQ,IAAI,KAAK;QAC3B,sBAAsB;QACtB,IAAI;QAEJ,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM;YAC3B,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;YAC5B,CAAC;YACD,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;gBAC5C,OAAO;oBACL,OAAO,EAAE,IAAI;oBACb,MAAM;iBACP,CAAC;YACJ,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,OAAO;oBACL,OAAO,EAAE,KAAK;oBACd,KAAK,EAAE;wBACL,IAAI,EAAE,GAAG,CAAC,IAAI;wBACd,OAAO,EAAE,GAAG,CAAC,OAAO;wBACpB,KAAK,EAAE,GAAG,CAAC,KAAK;qBACjB;iBACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}