@unchainedshop/platform 2.0.0-rc.2 → 2.0.0-rc.4

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 (135) hide show
  1. package/lib/bulk-importer/createBulkImporter.d.ts +2 -2
  2. package/lib/bulk-importer/createBulkImporter.js +3 -3
  3. package/lib/bulk-importer/createBulkImporter.js.map +1 -1
  4. package/lib/bulk-importer/handlers/assortment/create.d.ts +1 -1
  5. package/lib/bulk-importer/handlers/assortment/create.js +6 -6
  6. package/lib/bulk-importer/handlers/assortment/create.js.map +1 -1
  7. package/lib/bulk-importer/handlers/assortment/index.d.ts +3 -3
  8. package/lib/bulk-importer/handlers/assortment/index.js +3 -3
  9. package/lib/bulk-importer/handlers/assortment/index.js.map +1 -1
  10. package/lib/bulk-importer/handlers/assortment/remove.d.ts +1 -1
  11. package/lib/bulk-importer/handlers/assortment/update.d.ts +1 -1
  12. package/lib/bulk-importer/handlers/assortment/update.js +6 -6
  13. package/lib/bulk-importer/handlers/assortment/update.js.map +1 -1
  14. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +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/upsertAssortmentContent.d.ts +1 -1
  18. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +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 +1 -1
  22. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +1 -1
  23. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +1 -1
  24. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +1 -1
  25. package/lib/bulk-importer/handlers/assortment/upsertMedia.js +1 -1
  26. package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +1 -1
  27. package/lib/bulk-importer/handlers/filter/create.d.ts +1 -1
  28. package/lib/bulk-importer/handlers/filter/create.js +2 -2
  29. package/lib/bulk-importer/handlers/filter/create.js.map +1 -1
  30. package/lib/bulk-importer/handlers/filter/index.d.ts +3 -3
  31. package/lib/bulk-importer/handlers/filter/index.js +3 -3
  32. package/lib/bulk-importer/handlers/filter/index.js.map +1 -1
  33. package/lib/bulk-importer/handlers/filter/remove.d.ts +1 -1
  34. package/lib/bulk-importer/handlers/filter/update.d.ts +1 -1
  35. package/lib/bulk-importer/handlers/filter/update.js +2 -2
  36. package/lib/bulk-importer/handlers/filter/update.js.map +1 -1
  37. package/lib/bulk-importer/handlers/filter/upsertFilterContent.d.ts +2 -2
  38. package/lib/bulk-importer/handlers/filter/upsertFilterOptionContent.d.ts +1 -1
  39. package/lib/bulk-importer/handlers/product/create.d.ts +1 -1
  40. package/lib/bulk-importer/handlers/product/create.js +4 -4
  41. package/lib/bulk-importer/handlers/product/create.js.map +1 -1
  42. package/lib/bulk-importer/handlers/product/index.d.ts +3 -3
  43. package/lib/bulk-importer/handlers/product/index.js +3 -3
  44. package/lib/bulk-importer/handlers/product/index.js.map +1 -1
  45. package/lib/bulk-importer/handlers/product/remove.d.ts +1 -1
  46. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js +1 -1
  47. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js.map +1 -1
  48. package/lib/bulk-importer/handlers/product/update.d.ts +1 -1
  49. package/lib/bulk-importer/handlers/product/update.js +4 -4
  50. package/lib/bulk-importer/handlers/product/update.js.map +1 -1
  51. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +1 -1
  52. package/lib/bulk-importer/handlers/product/upsertMedia.js +2 -2
  53. package/lib/bulk-importer/handlers/product/upsertMedia.js.map +1 -1
  54. package/lib/bulk-importer/handlers/product/upsertProductContent.d.ts +1 -1
  55. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +1 -1
  56. package/lib/bulk-importer/upsertAsset.d.ts +2 -2
  57. package/lib/context/index.d.ts +2 -2
  58. package/lib/context/index.js +2 -2
  59. package/lib/context/index.js.map +1 -1
  60. package/lib/context/setAccessToken.d.ts +1 -1
  61. package/lib/context/withAccessToken.d.ts +1 -1
  62. package/lib/migrations/createMigrationRunner.d.ts +1 -1
  63. package/lib/migrations/migrationRepository.d.ts +2 -2
  64. package/lib/migrations/runMigrations.d.ts +1 -1
  65. package/lib/migrations/runMigrations.js +1 -1
  66. package/lib/migrations/runMigrations.js.map +1 -1
  67. package/lib/platform-index.d.ts +2 -2
  68. package/lib/platform-index.js +2 -2
  69. package/lib/platform-index.js.map +1 -1
  70. package/lib/setup/setupAccounts.d.ts +1 -1
  71. package/lib/setup/setupCarts.d.ts +2 -2
  72. package/lib/setup/setupTemplates.js +7 -7
  73. package/lib/setup/setupTemplates.js.map +1 -1
  74. package/lib/setup/setupWorkqueue.d.ts +2 -2
  75. package/lib/startPlatform.d.ts +3 -3
  76. package/lib/startPlatform.js +10 -9
  77. package/lib/startPlatform.js.map +1 -1
  78. package/lib/templates/resolveAccountActionTemplate.d.ts +1 -1
  79. package/lib/templates/resolveEnrollmentStatusTemplate.d.ts +1 -1
  80. package/lib/templates/resolveForwardDeliveryTemplate.d.ts +1 -1
  81. package/lib/templates/resolveForwardDeliveryTemplate.js +2 -2
  82. package/lib/templates/resolveForwardDeliveryTemplate.js.map +1 -1
  83. package/lib/templates/resolveOrderConfirmationTemplate.d.ts +1 -1
  84. package/lib/templates/resolveOrderConfirmationTemplate.js +3 -3
  85. package/lib/templates/resolveOrderConfirmationTemplate.js.map +1 -1
  86. package/lib/templates/resolveOrderRejectionTemplate.d.ts +1 -1
  87. package/lib/templates/resolveQuotationStatusTemplate.d.ts +1 -1
  88. package/lib/templates/utils/getOrderAttachmentsData.d.ts +2 -2
  89. package/lib/templates/utils/getOrderPositionsData.d.ts +3 -3
  90. package/package.json +11 -11
  91. package/src/bulk-importer/createBulkImporter.ts +5 -5
  92. package/src/bulk-importer/handlers/assortment/create.ts +7 -7
  93. package/src/bulk-importer/handlers/assortment/index.ts +3 -3
  94. package/src/bulk-importer/handlers/assortment/remove.ts +1 -1
  95. package/src/bulk-importer/handlers/assortment/update.ts +7 -7
  96. package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +3 -3
  97. package/src/bulk-importer/handlers/assortment/upsertAssortmentContent.ts +2 -2
  98. package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +3 -3
  99. package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +3 -3
  100. package/src/bulk-importer/handlers/assortment/upsertMedia.ts +3 -3
  101. package/src/bulk-importer/handlers/filter/create.ts +3 -3
  102. package/src/bulk-importer/handlers/filter/index.ts +3 -3
  103. package/src/bulk-importer/handlers/filter/remove.ts +1 -1
  104. package/src/bulk-importer/handlers/filter/update.ts +3 -3
  105. package/src/bulk-importer/handlers/filter/upsertFilterContent.ts +2 -2
  106. package/src/bulk-importer/handlers/filter/upsertFilterOptionContent.ts +2 -2
  107. package/src/bulk-importer/handlers/product/create.ts +5 -5
  108. package/src/bulk-importer/handlers/product/index.ts +3 -3
  109. package/src/bulk-importer/handlers/product/remove.ts +1 -1
  110. package/src/bulk-importer/handlers/product/transformSpecificationToProductStructure.ts +1 -1
  111. package/src/bulk-importer/handlers/product/update.ts +5 -5
  112. package/src/bulk-importer/handlers/product/upsertMedia.ts +4 -4
  113. package/src/bulk-importer/handlers/product/upsertProductContent.ts +2 -2
  114. package/src/bulk-importer/handlers/product/upsertVariations.ts +2 -2
  115. package/src/bulk-importer/upsertAsset.ts +2 -2
  116. package/src/context/index.ts +2 -2
  117. package/src/context/setAccessToken.ts +1 -1
  118. package/src/context/withAccessToken.ts +1 -1
  119. package/src/migrations/migrationRepository.ts +2 -2
  120. package/src/migrations/runMigrations.ts +2 -2
  121. package/src/platform-index.ts +2 -2
  122. package/src/setup/setupAccounts.ts +2 -2
  123. package/src/setup/setupCarts.ts +2 -2
  124. package/src/setup/setupTemplates.ts +7 -7
  125. package/src/setup/setupWorkqueue.ts +2 -2
  126. package/src/startPlatform.ts +11 -9
  127. package/src/templates/resolveAccountActionTemplate.ts +1 -1
  128. package/src/templates/resolveEnrollmentStatusTemplate.ts +1 -1
  129. package/src/templates/resolveForwardDeliveryTemplate.ts +3 -3
  130. package/src/templates/resolveOrderConfirmationTemplate.ts +4 -4
  131. package/src/templates/resolveOrderRejectionTemplate.ts +1 -1
  132. package/src/templates/resolveQuotationStatusTemplate.ts +1 -1
  133. package/src/templates/utils/getOrderAttachmentsData.ts +2 -2
  134. package/src/templates/utils/getOrderPositionsData.ts +3 -3
  135. package/tsconfig.json +3 -3
@@ -1,6 +1,6 @@
1
1
  import { createLogger } from '@unchainedshop/logger';
2
2
  import { generateDbFilterById } from '@unchainedshop/utils';
3
- import { createMigrationRunner } from './createMigrationRunner';
3
+ import { createMigrationRunner } from './createMigrationRunner.js';
4
4
  export const runMigrations = async ({ migrationRepository, logger = createLogger('unchained:migrations'), unchainedAPI, }) => {
5
5
  const LastMigration = migrationRepository.db.collection('last-migration');
6
6
  const findCurrentId = async () => {
@@ -1 +1 @@
1
- {"version":3,"file":"runMigrations.js","sourceRoot":"","sources":["../../src/migrations/runMigrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAAE,EAClC,mBAAmB,EACnB,MAAM,GAAG,YAAY,CAAC,sBAAsB,CAAC,EAC7C,YAAY,GAKb,EAAE,EAAE;IACH,MAAM,aAAa,GAAG,mBAAmB,CAAC,EAAE,CAAC,UAAU,CAAC,gBAA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E,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EACnD;YACE,IAAI,EAAE;gBACJ,GAAG,EAAE,EAAE;gBACP,MAAM;gBACN,QAAQ,EAAE,WAAW;gBACrB,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB;SACF,EACD;YACE,MAAM,EAAE,IAAI;SACb,CACF,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,aAAa,MAAM,QAAQ,EAAE,EAAE,CAAC,CAAC;QAChD,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,MAAM,aAAa,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,qBAAqB,CAAC;QACnC,SAAS;QACT,MAAM;QACN,mBAAmB;QACnB,mBAAmB;QACnB,YAAY;KACb,CAAC,CAAC;IAEH,MAAM,CAAC,eAAe,EAAE,cAAc,CAAC,GAAG,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;IAE7D,IAAI,cAAc,KAAK,IAAI,EAAE;QAC3B,IAAI,cAAc,GAAG,CAAC,EAAE;YACtB,MAAM,CAAC,IAAI,CAAC,OAAO,cAAc,8CAA8C,eAAe,EAAE,CAAC,CAAC;SACnG;aAAM;YACL,MAAM,CAAC,IAAI,CAAC,4CAA4C,SAAS,EAAE,CAAC,CAAC;SACtE;KACF;SAAM;QACL,MAAM,CAAC,IAAI,CAAC,+CAA+C,eAAe,EAAE,CAAC,CAAC;KAC/E;AACH,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- export * from './startPlatform';
2
- export * from './context';
1
+ export * from './startPlatform.js';
2
+ export * from './context/index.js';
3
3
  declare const connectPlatformToExpress4: (expressApp: import("express").Express, { apolloGraphQLServer }: {
4
4
  apolloGraphQLServer: import("@apollo/server").ApolloServer<import("@apollo/server").BaseContext>;
5
5
  }) => void;
@@ -1,6 +1,6 @@
1
1
  import { express } from '@unchainedshop/api';
2
- export * from './startPlatform';
3
- export * from './context';
2
+ export * from './startPlatform.js';
3
+ export * from './context/index.js';
4
4
  const connectPlatformToExpress4 = express.connect;
5
5
  export { connectPlatformToExpress4 };
6
6
  //# sourceMappingURL=platform-index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"platform-index.js","sourceRoot":"","sources":["../src/platform-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAE1B,MAAM,yBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
1
+ {"version":3,"file":"platform-index.js","sourceRoot":"","sources":["../src/platform-index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AAEnC,MAAM,yBAAyB,GAAG,OAAO,CAAC,OAAO,CAAC;AAElD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -1,2 +1,2 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
2
  export declare const setupAccounts: (unchainedAPI: UnchainedCore) => any;
@@ -1,3 +1,3 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { SetupCartsOptions } from '@unchainedshop/types/platform';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { SetupCartsOptions } from '@unchainedshop/types/platform.js';
3
3
  export declare const setupCarts: (unchainedAPI: UnchainedCore, options?: SetupCartsOptions) => Promise<void>;
@@ -1,11 +1,11 @@
1
- import { MessageTypes } from '@unchainedshop/types/platform';
1
+ import { MessageTypes } from '@unchainedshop/types/platform.js';
2
2
  import { MessagingDirector } from '@unchainedshop/core-messaging';
3
- import { resolveOrderRejectionTemplate } from '../templates/resolveOrderRejectionTemplate';
4
- import { resolveAccountActionTemplate } from '../templates/resolveAccountActionTemplate';
5
- import { resolveForwardDeliveryTemplate } from '../templates/resolveForwardDeliveryTemplate';
6
- import { resolveOrderConfirmationTemplate } from '../templates/resolveOrderConfirmationTemplate';
7
- import { resolveQuotationStatusTemplate } from '../templates/resolveQuotationStatusTemplate';
8
- import { resolveEnrollmentStatusTemplate } from '../templates/resolveEnrollmentStatusTemplate';
3
+ import { resolveOrderRejectionTemplate } from '../templates/resolveOrderRejectionTemplate.js';
4
+ import { resolveAccountActionTemplate } from '../templates/resolveAccountActionTemplate.js';
5
+ import { resolveForwardDeliveryTemplate } from '../templates/resolveForwardDeliveryTemplate.js';
6
+ import { resolveOrderConfirmationTemplate } from '../templates/resolveOrderConfirmationTemplate.js';
7
+ import { resolveQuotationStatusTemplate } from '../templates/resolveQuotationStatusTemplate.js';
8
+ import { resolveEnrollmentStatusTemplate } from '../templates/resolveEnrollmentStatusTemplate.js';
9
9
  export const setupTemplates = () => {
10
10
  MessagingDirector.registerTemplate(MessageTypes.ACCOUNT_ACTION, resolveAccountActionTemplate);
11
11
  MessagingDirector.registerTemplate(MessageTypes.DELIVERY, resolveForwardDeliveryTemplate);
@@ -1 +1 @@
1
- {"version":3,"file":"setupTemplates.js","sourceRoot":"","sources":["../../src/setup/setupTemplates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,8BAA8B,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,+BAA+B,EAAE,MAAM,8CAA8C,CAAC;AAE/F,MAAM,CAAC,MAAM,cAAc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CAAC;IAC1F,iBAAiB,CAAC,gBAAgB,CAAC,YAAY,CAAC,kBAAkB,EAAE,gCAAgC,CAAC,CAAC;IACtG,iBAAiB,CAAC,gBAAgB,CAAC,YAAY,CAAC,eAAe,EAAE,6BAA6B,CAAC,CAAC;IAChG,iBAAiB,CAAC,gBAAgB,CAAC,YAAY,CAAC,gBAAgB,EAAE,8BAA8B,CAAC,CAAC;IAClG,iBAAiB,CAAC,gBAAgB,CAAC,YAAY,CAAC,iBAAiB,EAAE,+BAA+B,CAAC,CAAC;AACtG,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
- import { SetupWorkqueueOptions } from '@unchainedshop/types/platform';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { SetupWorkqueueOptions } from '@unchainedshop/types/platform.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
3
  export declare const setupWorkqueue: (unchainedAPI: UnchainedCore, { workerId, batchCount, schedule }?: SetupWorkqueueOptions) => {
4
4
  start: () => void;
5
5
  stop: () => void;
@@ -1,8 +1,8 @@
1
- import { PlatformOptions, MessageTypes } from '@unchainedshop/types/platform';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { PlatformOptions, MessageTypes } from '@unchainedshop/types/platform.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
3
  export { MessageTypes };
4
4
  export declare const queueWorkers: Array<any>;
5
- export declare const startPlatform: ({ modules, services, typeDefs, resolvers, options, rolesOptions, bulkImporter: bulkImporterOptions, schema, plugins, cache, workQueueOptions, context, introspection, playground, tracing, cacheControl, }: PlatformOptions) => Promise<{
5
+ export declare const startPlatform: ({ modules, services, typeDefs, resolvers, options, adminUiConfig, rolesOptions, bulkImporter: bulkImporterOptions, schema, plugins, cache, workQueueOptions, context, introspection, playground, tracing, cacheControl, }: PlatformOptions) => Promise<{
6
6
  unchainedAPI: UnchainedCore;
7
7
  apolloGraphQLServer: any;
8
8
  }>;
@@ -1,17 +1,17 @@
1
- import { MessageTypes } from '@unchainedshop/types/platform';
1
+ import { MessageTypes } from '@unchainedshop/types/platform.js';
2
2
  import { startAPIServer, roles } from '@unchainedshop/api';
3
3
  import { initCore } from '@unchainedshop/core';
4
4
  import { initDb } from '@unchainedshop/mongodb';
5
5
  import { createLogger } from '@unchainedshop/logger';
6
6
  import { getRegisteredEvents } from '@unchainedshop/events';
7
7
  import { WorkerDirector } from '@unchainedshop/core-worker';
8
- import { createBulkImporterFactory } from './bulk-importer/createBulkImporter';
9
- import { runMigrations } from './migrations/runMigrations';
10
- import { setupAccounts } from './setup/setupAccounts';
11
- import { setupCarts } from './setup/setupCarts';
12
- import { setupTemplates } from './setup/setupTemplates';
13
- import { setupWorkqueue } from './setup/setupWorkqueue';
14
- import { createMigrationRepository } from './migrations/migrationRepository';
8
+ import { createBulkImporterFactory } from './bulk-importer/createBulkImporter.js';
9
+ import { runMigrations } from './migrations/runMigrations.js';
10
+ import { setupAccounts } from './setup/setupAccounts.js';
11
+ import { setupCarts } from './setup/setupCarts.js';
12
+ import { setupTemplates } from './setup/setupTemplates.js';
13
+ import { setupWorkqueue } from './setup/setupWorkqueue.js';
14
+ import { createMigrationRepository } from './migrations/migrationRepository.js';
15
15
  export { MessageTypes };
16
16
  const logger = createLogger('unchained');
17
17
  const REQUIRED_ENV_VARIABLES = ['EMAIL_WEBSITE_NAME', 'EMAIL_WEBSITE_URL', 'EMAIL_FROM'];
@@ -29,7 +29,7 @@ const checkWorkQueueEnabled = (options) => {
29
29
  return !UNCHAINED_DISABLE_WORKER;
30
30
  };
31
31
  export const queueWorkers = [];
32
- export const startPlatform = async ({ modules = {}, services = {}, typeDefs = [], resolvers = [], options = {}, rolesOptions = {}, bulkImporter: bulkImporterOptions, schema, plugins, cache, workQueueOptions, context, introspection, playground, tracing, cacheControl, }) => {
32
+ export const startPlatform = async ({ modules = {}, services = {}, typeDefs = [], resolvers = [], options = {}, adminUiConfig = {}, rolesOptions = {}, bulkImporter: bulkImporterOptions, schema, plugins, cache, workQueueOptions, context, introspection, playground, tracing, cacheControl, }) => {
33
33
  exitOnMissingEnvironmentVariables();
34
34
  // Configure database
35
35
  const db = await initDb();
@@ -73,6 +73,7 @@ export const startPlatform = async ({ modules = {}, services = {}, typeDefs = []
73
73
  playground,
74
74
  tracing,
75
75
  cacheControl,
76
+ adminUiConfig,
76
77
  });
77
78
  // Setup work queues for scheduled work
78
79
  if (isWorkQueueEnabled) {
@@ -1 +1 @@
1
- {"version":3,"file":"startPlatform.js","sourceRoot":"","sources":["../src/startPlatform.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0C,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,MAAM,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAEzC,MAAM,sBAAsB,GAAG,CAAC,oBAAoB,EAAE,mBAAmB,E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BAAyB,EAAE;QAC/C,YAAY,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,CAAC;KACpF;IAED,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAC/C,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveAccountActionTemplate: TemplateResolver;
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveEnrollmentStatusTemplate: TemplateResolver;
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveForwardDeliveryTemplate: TemplateResolver;
@@ -1,6 +1,6 @@
1
1
  import { systemLocale } from '@unchainedshop/utils';
2
- import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
3
- import { getOrderPositionsData } from './utils/getOrderPositionsData';
2
+ import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
3
+ import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
4
4
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, ROOT_URL } = process.env;
5
5
  const mjmlTemplate = `
6
6
  <mjml>
@@ -1 +1 @@
1
- {"version":3,"file":"resolveForwardDeliveryTemplate.js","sourceRoot":"","sources":["../../src/templates/resolveForwardDeliveryTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,MAAM,EAAE,UAAU,EAAE,kBAA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,EAAE,kBAAkB;QAC5B,OAAO;QACP,KAAK,EAAE,YAAY,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,GAAG,GAAG;QAC9D,GAAG,YAAY;QACf,OAAO;KACR,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,YAAY,CAAC,IAAI,IAAI,UAAU,IAAI,yBAAyB;gBAClE,EAAE,EAAE,YAAY,CAAC,EAAE,IAAI,wBAAwB;gBAC/C,EAAE,EAAE,YAAY,CAAC,EAAE;gBACnB,OAAO;gBACP,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC;gBACxD,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC;gBAC5D,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveOrderConfirmationTemplate: TemplateResolver;
@@ -1,6 +1,6 @@
1
- import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing';
2
- import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
3
- import { getOrderPositionsData } from './utils/getOrderPositionsData';
1
+ import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing.js';
2
+ import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
3
+ import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
4
4
  const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
5
5
  const mjmlTemplate = `
6
6
  <mjml>
@@ -1 +1 @@
1
- {"version":3,"file":"resolveOrderConfirmationTemplate.js","sourceRoot":"","sources":["../../src/templates/resolveOrderConfirmationTemplate.ts"],"names":[],"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CAAC,CAAC,MAAM,CAAC;SACtE;QACD,SAAS,EAAE,qBAAqB,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC;KAC7D,CAAC;IACF,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,UAAU,IAAI,wBAAwB;gBAC5C,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;gBAC9B,OAAO;gBACP,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC;gBACxD,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC;gBAC5D,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"resolveOrderConfirmationTemplate.js","sourceRoot":"","sources":["../../src/templates/resolveOrderConfirmationTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,EAAE,UAAU,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE1E,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBpB,CAAC;AAEF,MAAM,YAAY,GAAG;;;;;;;;CAQpB,CAAC;AAEF,MAAM,KAAK,GAAG;IACZ,EAAE,EAAE;QACF,UAAU,EAAE,8BAA8B;QAC1C,QAAQ,EAAE,6BAA6B;QACvC,OAAO,EAAE,GAAG,kBAAkB,sBAAsB;KACrD;IACD,EAAE,EAAE;QACF,UAAU,EAAE,yBAAyB;QACrC,QAAQ,EAAE,sCAAsC;QAChD,OAAO,EAAE,GAAG,kBAAkB,sBAAsB;KACrD;IACD,EAAE,EA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KAAK;gBACvC,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC,MAAM,CACV;YACD,KAAK,EAAE,WAAW,CAChB,YAAY,CAAC,KAAK,CAAC;gBACjB,QAAQ,EAAE,uBAAuB,CAAC,KAAK;gBACvC,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC,MAAM,CACV;YACD,QAAQ,EAAE,WAAW,CACnB,YAAY,CAAC,KAAK,CAAC;gBACjB,QAAQ,EAAE,uBAAuB,CAAC,QAAQ;gBAC1C,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC,MAAM,CACV;YACD,OAAO,EAAE,WAAW,CAClB,YAAY,CAAC,KAAK,CAAC;gBACjB,QAAQ,EAAE,uBAAuB,CAAC,OAAO;gBACzC,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC,MAAM,CACV;YACD,KAAK,EAAE,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;SACtE;QACD,SAAS,EAAE,qBAAqB,CAAC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC;KAC7D,CAAC;IACF,OAAO;QACL;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACL,IAAI,EAAE,UAAU,IAAI,wBAAwB;gBAC5C,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;gBAC9B,OAAO;gBACP,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,YAAY,EAAE,IAAI,CAAC;gBACxD,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,YAAY,EAAE,IAAI,CAAC;gBAC5D,WAAW;aACZ;SACF;KACF,CAAC;AACJ,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveOrderRejectionTemplate: TemplateResolver;
@@ -1,2 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/types/messaging';
1
+ import { TemplateResolver } from '@unchainedshop/types/messaging.js';
2
2
  export declare const resolveQuotationStatusTemplate: TemplateResolver;
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { Order } from '@unchainedshop/types/orders';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { Order } from '@unchainedshop/types/orders.js';
3
3
  export declare const getOrderAttachmentsData: (order: Order, params: {
4
4
  fileType: string;
5
5
  }, { modules }: UnchainedCore) => Promise<{
@@ -1,6 +1,6 @@
1
- import { Locale } from '@unchainedshop/types/common';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import { Order } from '@unchainedshop/types/orders';
1
+ import { Locale } from '@unchainedshop/types/common.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import { Order } from '@unchainedshop/types/orders.js';
4
4
  export declare const getOrderPositionsData: (order: Order, params: {
5
5
  locale?: Locale;
6
6
  }, context: UnchainedCore) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/platform",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.4",
4
4
  "main": "lib/platform-index.js",
5
5
  "exports": {
6
6
  ".": "./lib/platform-index.js",
@@ -31,15 +31,15 @@
31
31
  },
32
32
  "homepage": "https://github.com/unchainedshop/unchained#readme",
33
33
  "dependencies": {
34
- "@unchainedshop/api": "^2.0.0-rc.2",
35
- "@unchainedshop/core": "^2.0.0-rc.2",
36
- "@unchainedshop/events": "^2.0.0-rc.2",
37
- "@unchainedshop/file-upload": "^2.0.0-rc.2",
38
- "@unchainedshop/logger": "^2.0.0-rc.2",
39
- "@unchainedshop/mongodb": "^2.0.0-rc.2",
40
- "@unchainedshop/plugins": "^2.0.0-rc.2",
41
- "@unchainedshop/roles": "^2.0.0-rc.2",
42
- "@unchainedshop/utils": "^2.0.0-rc.2",
34
+ "@unchainedshop/api": "^2.0.0-rc.4",
35
+ "@unchainedshop/core": "^2.0.0-rc.4",
36
+ "@unchainedshop/events": "^2.0.0-rc.4",
37
+ "@unchainedshop/file-upload": "^2.0.0-rc.4",
38
+ "@unchainedshop/logger": "^2.0.0-rc.4",
39
+ "@unchainedshop/mongodb": "^2.0.0-rc.4",
40
+ "@unchainedshop/plugins": "^2.0.0-rc.4",
41
+ "@unchainedshop/roles": "^2.0.0-rc.4",
42
+ "@unchainedshop/utils": "^2.0.0-rc.4",
43
43
  "event-iterator": "^2.0.0",
44
44
  "JSONStream": "^1.3.5",
45
45
  "moniker": "0.1.2",
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^18.11.18",
50
- "@unchainedshop/types": "^2.0.0-rc.2",
50
+ "@unchainedshop/types": "^2.0.0-rc.4",
51
51
  "cross-env": "^7.0.3",
52
52
  "jest": "^29.3.1",
53
53
  "ts-jest": "^29.0.3",
@@ -1,9 +1,9 @@
1
1
  import mongodb from 'mongodb';
2
- import { BulkImportHandler, BulkImportOperation } from '@unchainedshop/types/platform';
3
- import { BulkImporter, UnchainedCore } from '@unchainedshop/types/core';
4
- import * as AssortmentHandlers from './handlers/assortment';
5
- import * as FilterHandlers from './handlers/filter';
6
- import * as ProductHandlers from './handlers/product';
2
+ import { BulkImportHandler, BulkImportOperation } from '@unchainedshop/types/platform.js';
3
+ import { BulkImporter, UnchainedCore } from '@unchainedshop/types/core.js';
4
+ import * as AssortmentHandlers from './handlers/assortment/index.js';
5
+ import * as FilterHandlers from './handlers/filter/index.js';
6
+ import * as ProductHandlers from './handlers/product/index.js';
7
7
 
8
8
  let bulkOperationHandlers: Record<string, BulkImportHandler> = {};
9
9
 
@@ -1,10 +1,10 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
3
- import upsertAssortmentChildren from './upsertAssortmentChildren';
4
- import upsertAssortmentContent from './upsertAssortmentContent';
5
- import upsertAssortmentFilters from './upsertAssortmentFilters';
6
- import upsertAssortmentProducts from './upsertAssortmentProducts';
7
- import upsertMedia from './upsertMedia';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
3
+ import upsertAssortmentChildren from './upsertAssortmentChildren.js';
4
+ import upsertAssortmentContent from './upsertAssortmentContent.js';
5
+ import upsertAssortmentFilters from './upsertAssortmentFilters.js';
6
+ import upsertAssortmentProducts from './upsertAssortmentProducts.js';
7
+ import upsertMedia from './upsertMedia.js';
8
8
 
9
9
  export default async function createAssortment(
10
10
  payload: any,
@@ -1,3 +1,3 @@
1
- export { default as create } from './create';
2
- export { default as update } from './update';
3
- export { default as remove } from './remove';
1
+ export { default as create } from './create.js';
2
+ export { default as update } from './update.js';
3
+ export { default as remove } from './remove.js';
@@ -1,4 +1,4 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
2
 
3
3
  export default async function removeAssortment(payload, { logger }, unchainedAPI: UnchainedCore) {
4
4
  const { modules } = unchainedAPI;
@@ -1,10 +1,10 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertAssortmentContent from './upsertAssortmentContent';
3
- import upsertAssortmentProducts from './upsertAssortmentProducts';
4
- import upsertAssortmentChildren from './upsertAssortmentChildren';
5
- import upsertAssortmentFilters from './upsertAssortmentFilters';
6
- import upsertMedia from './upsertMedia';
7
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertAssortmentContent from './upsertAssortmentContent.js';
3
+ import upsertAssortmentProducts from './upsertAssortmentProducts.js';
4
+ import upsertAssortmentChildren from './upsertAssortmentChildren.js';
5
+ import upsertAssortmentFilters from './upsertAssortmentFilters.js';
6
+ import upsertMedia from './upsertMedia.js';
7
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
8
8
 
9
9
  export default async function updateAssortment(payload: any, { logger }, unchainedAPI: UnchainedCore) {
10
10
  const { modules } = unchainedAPI;
@@ -1,6 +1,6 @@
1
- import { AssortmentLink } from '@unchainedshop/types/assortments';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
1
+ import { AssortmentLink } from '@unchainedshop/types/assortments.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
4
4
 
5
5
  const upsert = async (assortmentLink: AssortmentLink, { modules }: UnchainedCore) => {
6
6
  if (
@@ -1,5 +1,5 @@
1
- import { AssortmentText } from '@unchainedshop/types/assortments';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { AssortmentText } from '@unchainedshop/types/assortments.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
3
 
4
4
  export default async ({ assortmentId, content }, { modules }: UnchainedCore) => {
5
5
  await Promise.all(
@@ -1,6 +1,6 @@
1
- import { AssortmentFilter } from '@unchainedshop/types/assortments';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
1
+ import { AssortmentFilter } from '@unchainedshop/types/assortments.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
4
4
 
5
5
  const upsert = async (assortmentFilter: AssortmentFilter, { modules }: UnchainedCore) => {
6
6
  if (
@@ -1,6 +1,6 @@
1
- import { AssortmentProduct } from '@unchainedshop/types/assortments';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
1
+ import { AssortmentProduct } from '@unchainedshop/types/assortments.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
4
4
 
5
5
  const upsert = async (assortmentProduct: AssortmentProduct, unchainedAPI: UnchainedCore) => {
6
6
  const { modules } = unchainedAPI;
@@ -1,6 +1,6 @@
1
- import { AssortmentMediaText } from '@unchainedshop/types/assortments.media';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import upsertAsset from '../../upsertAsset';
1
+ import { AssortmentMediaText } from '@unchainedshop/types/assortments.media.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import upsertAsset from '../../upsertAsset.js';
4
4
 
5
5
  const upsertMediaObject = async (media, unchainedAPI: UnchainedCore) => {
6
6
  const { modules } = unchainedAPI;
@@ -1,6 +1,6 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertFilterContent from './upsertFilterContent';
3
- import upsertFilterOptionContent from './upsertFilterOptionContent';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertFilterContent from './upsertFilterContent.js';
3
+ import upsertFilterOptionContent from './upsertFilterOptionContent.js';
4
4
 
5
5
  export default async function createFilter(
6
6
  payload: any,
@@ -1,3 +1,3 @@
1
- export { default as create } from './create';
2
- export { default as update } from './update';
3
- export { default as remove } from './remove';
1
+ export { default as create } from './create.js';
2
+ export { default as update } from './update.js';
3
+ export { default as remove } from './remove.js';
@@ -1,4 +1,4 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
2
 
3
3
  export default async function removeFilter(payload: any, { logger }, unchainedAPI: UnchainedCore) {
4
4
  const { modules } = unchainedAPI;
@@ -1,6 +1,6 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertFilterContent from './upsertFilterContent';
3
- import upsertFilterOptionContent from './upsertFilterOptionContent';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertFilterContent from './upsertFilterContent.js';
3
+ import upsertFilterOptionContent from './upsertFilterOptionContent.js';
4
4
 
5
5
  export default async function updateFilter(
6
6
  payload: any,
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { FilterText } from '@unchainedshop/types/filters';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { FilterText } from '@unchainedshop/types/filters.js';
3
3
 
4
4
  export default async function upsertFilterContent({ content, filterId }, unchainedAPI: UnchainedCore) {
5
5
  return Promise.all(
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { FilterText } from '@unchainedshop/types/filters';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { FilterText } from '@unchainedshop/types/filters.js';
3
3
 
4
4
  export default async function upsertFilterOptionContent(
5
5
  { options, filterId },
@@ -1,8 +1,8 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertVariations from './upsertVariations';
3
- import upsertMedia from './upsertMedia';
4
- import upsertProductContent from './upsertProductContent';
5
- import transformSpecificationToProductStructure from './transformSpecificationToProductStructure';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertVariations from './upsertVariations.js';
3
+ import upsertMedia from './upsertMedia.js';
4
+ import upsertProductContent from './upsertProductContent.js';
5
+ import transformSpecificationToProductStructure from './transformSpecificationToProductStructure.js';
6
6
 
7
7
  export default async function createProduct(
8
8
  payload: any,
@@ -1,3 +1,3 @@
1
- export { default as create } from './create';
2
- export { default as update } from './update';
3
- export { default as remove } from './remove';
1
+ export { default as create } from './create.js';
2
+ export { default as update } from './update.js';
3
+ export { default as remove } from './remove.js';
@@ -1,4 +1,4 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
2
 
3
3
  export default async function removeProduct(payload: any, { logger }, unchainedAPI: UnchainedCore) {
4
4
  const { services } = unchainedAPI;
@@ -1,4 +1,4 @@
1
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
1
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
2
2
 
3
3
  export default (specification) => {
4
4
  const {
@@ -1,8 +1,8 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import upsertVariations from './upsertVariations';
3
- import upsertMedia from './upsertMedia';
4
- import upsertProductContent from './upsertProductContent';
5
- import transformSpecificationToProductStructure from './transformSpecificationToProductStructure';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import upsertVariations from './upsertVariations.js';
3
+ import upsertMedia from './upsertMedia.js';
4
+ import upsertProductContent from './upsertProductContent.js';
5
+ import transformSpecificationToProductStructure from './transformSpecificationToProductStructure.js';
6
6
 
7
7
  export default async function createProduct(payload: any, { logger }, unchainedAPI: UnchainedCore) {
8
8
  const { modules } = unchainedAPI;
@@ -1,7 +1,7 @@
1
- import { ProductMedia, ProductMediaText } from '@unchainedshop/types/products.media';
2
- import { UnchainedCore } from '@unchainedshop/types/core';
3
- import convertTagsToLowerCase from '../utils/convertTagsToLowerCase';
4
- import upsertAsset from '../../upsertAsset';
1
+ import { ProductMedia, ProductMediaText } from '@unchainedshop/types/products.media.js';
2
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
3
+ import convertTagsToLowerCase from '../utils/convertTagsToLowerCase.js';
4
+ import upsertAsset from '../../upsertAsset.js';
5
5
 
6
6
  const upsertProductMedia = async (productMedia: ProductMedia, { modules }: UnchainedCore) => {
7
7
  try {
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { ProductText } from '@unchainedshop/types/products';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { ProductText } from '@unchainedshop/types/products.js';
3
3
 
4
4
  export default async function upsertProductContent({ productId, content }, { modules }: UnchainedCore) {
5
5
  await Promise.all(
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { ProductVariation, ProductVariationText } from '@unchainedshop/types/products.variations';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { ProductVariation, ProductVariationText } from '@unchainedshop/types/products.variations.js';
3
3
 
4
4
  const upsert = async (productVariation: ProductVariation, unchainedAPI: UnchainedCore) => {
5
5
  const { modules } = unchainedAPI;
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/types/core';
2
- import { File } from '@unchainedshop/types/files';
1
+ import { UnchainedCore } from '@unchainedshop/types/core.js';
2
+ import { File } from '@unchainedshop/types/files.js';
3
3
 
4
4
  const upsertAsset = async (
5
5
  directoryName: string,