@unchainedshop/platform 4.3.3 → 4.4.0

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 (218) hide show
  1. package/README.md +149 -2
  2. package/lib/context/index.d.ts +1 -2
  3. package/lib/context/index.js +1 -2
  4. package/lib/context/setAccessToken.d.ts +1 -2
  5. package/lib/context/setAccessToken.js +0 -1
  6. package/lib/migrations/createMigrationRunner.d.ts +0 -1
  7. package/lib/migrations/createMigrationRunner.js +0 -3
  8. package/lib/migrations/migrationRepository.d.ts +1 -2
  9. package/lib/migrations/migrationRepository.js +1 -1
  10. package/lib/migrations/runMigrations.d.ts +2 -3
  11. package/lib/migrations/runMigrations.js +1 -2
  12. package/lib/platform-index.d.ts +4 -5
  13. package/lib/platform-index.js +4 -5
  14. package/lib/setup/setupAccounts.d.ts +1 -2
  15. package/lib/setup/setupAccounts.js +0 -1
  16. package/lib/setup/setupTemplates.d.ts +11 -11
  17. package/lib/setup/setupTemplates.js +16 -19
  18. package/lib/setup/setupUploadHandlers.d.ts +1 -2
  19. package/lib/setup/setupUploadHandlers.js +0 -1
  20. package/lib/setup/setupWorkqueue.d.ts +2 -3
  21. package/lib/setup/setupWorkqueue.js +1 -7
  22. package/lib/startPlatform.d.ts +6 -7
  23. package/lib/startPlatform.js +15 -16
  24. package/lib/templates/index.d.ts +8 -9
  25. package/lib/templates/index.js +8 -9
  26. package/lib/templates/order-parser/getOrderPositionsData.d.ts +2 -3
  27. package/lib/templates/order-parser/getOrderPositionsData.js +0 -1
  28. package/lib/templates/order-parser/getOrderSummaryData.d.ts +2 -3
  29. package/lib/templates/order-parser/getOrderSummaryData.js +0 -1
  30. package/lib/templates/order-parser/index.d.ts +4 -5
  31. package/lib/templates/order-parser/index.js +2 -3
  32. package/lib/templates/resolveAccountActionTemplate.d.ts +1 -2
  33. package/lib/templates/resolveAccountActionTemplate.js +0 -2
  34. package/lib/templates/resolveEnrollmentStatusTemplate.d.ts +1 -2
  35. package/lib/templates/resolveEnrollmentStatusTemplate.js +0 -1
  36. package/lib/templates/resolveErrorReportTemplate.d.ts +1 -2
  37. package/lib/templates/resolveErrorReportTemplate.js +0 -1
  38. package/lib/templates/resolveForwardDeliveryTemplate.d.ts +1 -2
  39. package/lib/templates/resolveForwardDeliveryTemplate.js +1 -2
  40. package/lib/templates/resolveOrderConfirmationTemplate.d.ts +1 -2
  41. package/lib/templates/resolveOrderConfirmationTemplate.js +1 -2
  42. package/lib/templates/resolveOrderRejectionTemplate.d.ts +1 -2
  43. package/lib/templates/resolveOrderRejectionTemplate.js +1 -2
  44. package/lib/templates/resolveQuotationStatusTemplate.d.ts +1 -2
  45. package/lib/templates/resolveQuotationStatusTemplate.js +0 -1
  46. package/package.json +17 -16
  47. package/lib/bulk-importer/createBulkImporter.d.ts +0 -20
  48. package/lib/bulk-importer/createBulkImporter.d.ts.map +0 -1
  49. package/lib/bulk-importer/createBulkImporter.js +0 -97
  50. package/lib/bulk-importer/createBulkImporter.js.map +0 -1
  51. package/lib/bulk-importer/handlers/assortment/create.d.ts +0 -11
  52. package/lib/bulk-importer/handlers/assortment/create.d.ts.map +0 -1
  53. package/lib/bulk-importer/handlers/assortment/create.js +0 -60
  54. package/lib/bulk-importer/handlers/assortment/create.js.map +0 -1
  55. package/lib/bulk-importer/handlers/assortment/index.d.ts +0 -4
  56. package/lib/bulk-importer/handlers/assortment/index.d.ts.map +0 -1
  57. package/lib/bulk-importer/handlers/assortment/index.js +0 -4
  58. package/lib/bulk-importer/handlers/assortment/index.js.map +0 -1
  59. package/lib/bulk-importer/handlers/assortment/remove.d.ts +0 -10
  60. package/lib/bulk-importer/handlers/assortment/remove.d.ts.map +0 -1
  61. package/lib/bulk-importer/handlers/assortment/remove.js +0 -13
  62. package/lib/bulk-importer/handlers/assortment/remove.js.map +0 -1
  63. package/lib/bulk-importer/handlers/assortment/update.d.ts +0 -12
  64. package/lib/bulk-importer/handlers/assortment/update.d.ts.map +0 -1
  65. package/lib/bulk-importer/handlers/assortment/update.js +0 -62
  66. package/lib/bulk-importer/handlers/assortment/update.js.map +0 -1
  67. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +0 -7
  68. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts.map +0 -1
  69. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +0 -37
  70. package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +0 -1
  71. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +0 -7
  72. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts.map +0 -1
  73. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +0 -32
  74. package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +0 -1
  75. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +0 -7
  76. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts.map +0 -1
  77. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +0 -37
  78. package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +0 -1
  79. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +0 -7
  80. package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts.map +0 -1
  81. package/lib/bulk-importer/handlers/assortment/upsertMedia.js +0 -39
  82. package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +0 -1
  83. package/lib/bulk-importer/handlers/filter/create.d.ts +0 -11
  84. package/lib/bulk-importer/handlers/filter/create.d.ts.map +0 -1
  85. package/lib/bulk-importer/handlers/filter/create.js +0 -54
  86. package/lib/bulk-importer/handlers/filter/create.js.map +0 -1
  87. package/lib/bulk-importer/handlers/filter/index.d.ts +0 -4
  88. package/lib/bulk-importer/handlers/filter/index.d.ts.map +0 -1
  89. package/lib/bulk-importer/handlers/filter/index.js +0 -4
  90. package/lib/bulk-importer/handlers/filter/index.js.map +0 -1
  91. package/lib/bulk-importer/handlers/filter/remove.d.ts +0 -10
  92. package/lib/bulk-importer/handlers/filter/remove.d.ts.map +0 -1
  93. package/lib/bulk-importer/handlers/filter/remove.js +0 -14
  94. package/lib/bulk-importer/handlers/filter/remove.js.map +0 -1
  95. package/lib/bulk-importer/handlers/filter/update.d.ts +0 -11
  96. package/lib/bulk-importer/handlers/filter/update.d.ts.map +0 -1
  97. package/lib/bulk-importer/handlers/filter/update.js +0 -44
  98. package/lib/bulk-importer/handlers/filter/update.js.map +0 -1
  99. package/lib/bulk-importer/handlers/product/create.d.ts +0 -11
  100. package/lib/bulk-importer/handlers/product/create.d.ts.map +0 -1
  101. package/lib/bulk-importer/handlers/product/create.js +0 -51
  102. package/lib/bulk-importer/handlers/product/create.js.map +0 -1
  103. package/lib/bulk-importer/handlers/product/index.d.ts +0 -4
  104. package/lib/bulk-importer/handlers/product/index.d.ts.map +0 -1
  105. package/lib/bulk-importer/handlers/product/index.js +0 -4
  106. package/lib/bulk-importer/handlers/product/index.js.map +0 -1
  107. package/lib/bulk-importer/handlers/product/remove.d.ts +0 -10
  108. package/lib/bulk-importer/handlers/product/remove.d.ts.map +0 -1
  109. package/lib/bulk-importer/handlers/product/remove.js +0 -13
  110. package/lib/bulk-importer/handlers/product/remove.js.map +0 -1
  111. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.d.ts +0 -3
  112. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.d.ts.map +0 -1
  113. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js +0 -16
  114. package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js.map +0 -1
  115. package/lib/bulk-importer/handlers/product/update.d.ts +0 -11
  116. package/lib/bulk-importer/handlers/product/update.d.ts.map +0 -1
  117. package/lib/bulk-importer/handlers/product/update.js +0 -48
  118. package/lib/bulk-importer/handlers/product/update.js.map +0 -1
  119. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +0 -6
  120. package/lib/bulk-importer/handlers/product/upsertMedia.d.ts.map +0 -1
  121. package/lib/bulk-importer/handlers/product/upsertMedia.js +0 -45
  122. package/lib/bulk-importer/handlers/product/upsertMedia.js.map +0 -1
  123. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +0 -6
  124. package/lib/bulk-importer/handlers/product/upsertVariations.d.ts.map +0 -1
  125. package/lib/bulk-importer/handlers/product/upsertVariations.js +0 -42
  126. package/lib/bulk-importer/handlers/product/upsertVariations.js.map +0 -1
  127. package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts +0 -3
  128. package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.d.ts.map +0 -1
  129. package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js +0 -6
  130. package/lib/bulk-importer/handlers/utils/convertTagsToLowerCase.js.map +0 -1
  131. package/lib/bulk-importer/upsertAsset.d.ts +0 -8
  132. package/lib/bulk-importer/upsertAsset.d.ts.map +0 -1
  133. package/lib/bulk-importer/upsertAsset.js +0 -33
  134. package/lib/bulk-importer/upsertAsset.js.map +0 -1
  135. package/lib/context/index.d.ts.map +0 -1
  136. package/lib/context/index.js.map +0 -1
  137. package/lib/context/setAccessToken.d.ts.map +0 -1
  138. package/lib/context/setAccessToken.js.map +0 -1
  139. package/lib/context/withAccessToken.d.ts +0 -4
  140. package/lib/context/withAccessToken.d.ts.map +0 -1
  141. package/lib/context/withAccessToken.js +0 -42
  142. package/lib/context/withAccessToken.js.map +0 -1
  143. package/lib/migrations/createMigrationRunner.d.ts.map +0 -1
  144. package/lib/migrations/createMigrationRunner.js.map +0 -1
  145. package/lib/migrations/migrationRepository.d.ts.map +0 -1
  146. package/lib/migrations/migrationRepository.js.map +0 -1
  147. package/lib/migrations/runMigrations.d.ts.map +0 -1
  148. package/lib/migrations/runMigrations.js.map +0 -1
  149. package/lib/platform-index.d.ts.map +0 -1
  150. package/lib/platform-index.js.map +0 -1
  151. package/lib/setup/setupAccounts.d.ts.map +0 -1
  152. package/lib/setup/setupAccounts.js.map +0 -1
  153. package/lib/setup/setupCarts.d.ts +0 -8
  154. package/lib/setup/setupCarts.d.ts.map +0 -1
  155. package/lib/setup/setupCarts.js +0 -17
  156. package/lib/setup/setupCarts.js.map +0 -1
  157. package/lib/setup/setupTemplates.d.ts.map +0 -1
  158. package/lib/setup/setupTemplates.js.map +0 -1
  159. package/lib/setup/setupUploadHandlers.d.ts.map +0 -1
  160. package/lib/setup/setupUploadHandlers.js.map +0 -1
  161. package/lib/setup/setupWorkqueue.d.ts.map +0 -1
  162. package/lib/setup/setupWorkqueue.js.map +0 -1
  163. package/lib/startPlatform.d.ts.map +0 -1
  164. package/lib/startPlatform.js.map +0 -1
  165. package/lib/templates/index.d.ts.map +0 -1
  166. package/lib/templates/index.js.map +0 -1
  167. package/lib/templates/order-parser/formatAddress.d.ts +0 -3
  168. package/lib/templates/order-parser/formatAddress.d.ts.map +0 -1
  169. package/lib/templates/order-parser/formatAddress.js +0 -14
  170. package/lib/templates/order-parser/formatAddress.js.map +0 -1
  171. package/lib/templates/order-parser/formatPrice.d.ts +0 -6
  172. package/lib/templates/order-parser/formatPrice.d.ts.map +0 -1
  173. package/lib/templates/order-parser/formatPrice.js +0 -6
  174. package/lib/templates/order-parser/formatPrice.js.map +0 -1
  175. package/lib/templates/order-parser/getOrderPositionsData.d.ts.map +0 -1
  176. package/lib/templates/order-parser/getOrderPositionsData.js.map +0 -1
  177. package/lib/templates/order-parser/getOrderSummaryData.d.ts.map +0 -1
  178. package/lib/templates/order-parser/getOrderSummaryData.js.map +0 -1
  179. package/lib/templates/order-parser/index.d.ts.map +0 -1
  180. package/lib/templates/order-parser/index.js.map +0 -1
  181. package/lib/templates/resolveAccountActionTemplate.d.ts.map +0 -1
  182. package/lib/templates/resolveAccountActionTemplate.js.map +0 -1
  183. package/lib/templates/resolveEnrollmentStatusTemplate.d.ts.map +0 -1
  184. package/lib/templates/resolveEnrollmentStatusTemplate.js.map +0 -1
  185. package/lib/templates/resolveErrorReportTemplate.d.ts.map +0 -1
  186. package/lib/templates/resolveErrorReportTemplate.js.map +0 -1
  187. package/lib/templates/resolveForwardDeliveryTemplate.d.ts.map +0 -1
  188. package/lib/templates/resolveForwardDeliveryTemplate.js.map +0 -1
  189. package/lib/templates/resolveOrderConfirmationTemplate.d.ts.map +0 -1
  190. package/lib/templates/resolveOrderConfirmationTemplate.js.map +0 -1
  191. package/lib/templates/resolveOrderRejectionTemplate.d.ts.map +0 -1
  192. package/lib/templates/resolveOrderRejectionTemplate.js.map +0 -1
  193. package/lib/templates/resolveQuotationStatusTemplate.d.ts.map +0 -1
  194. package/lib/templates/resolveQuotationStatusTemplate.js.map +0 -1
  195. package/src/context/index.ts +0 -1
  196. package/src/context/setAccessToken.ts +0 -22
  197. package/src/migrations/createMigrationRunner.ts +0 -65
  198. package/src/migrations/migrationRepository.ts +0 -22
  199. package/src/migrations/runMigrations.ts +0 -68
  200. package/src/platform-index.ts +0 -19
  201. package/src/setup/setupAccounts.ts +0 -11
  202. package/src/setup/setupTemplates.ts +0 -67
  203. package/src/setup/setupUploadHandlers.ts +0 -22
  204. package/src/setup/setupWorkqueue.ts +0 -104
  205. package/src/startPlatform.ts +0 -128
  206. package/src/templates/index.ts +0 -9
  207. package/src/templates/order-parser/getOrderPositionsData.ts +0 -50
  208. package/src/templates/order-parser/getOrderSummaryData.ts +0 -91
  209. package/src/templates/order-parser/index.ts +0 -65
  210. package/src/templates/resolveAccountActionTemplate.ts +0 -127
  211. package/src/templates/resolveEnrollmentStatusTemplate.ts +0 -34
  212. package/src/templates/resolveErrorReportTemplate.ts +0 -47
  213. package/src/templates/resolveForwardDeliveryTemplate.ts +0 -42
  214. package/src/templates/resolveOrderConfirmationTemplate.ts +0 -40
  215. package/src/templates/resolveOrderRejectionTemplate.ts +0 -41
  216. package/src/templates/resolveQuotationStatusTemplate.ts +0 -45
  217. package/tests/platform-index.test.ts +0 -7
  218. package/tsconfig.json +0 -9
package/README.md CHANGED
@@ -1,3 +1,150 @@
1
- # Unchained Engine
1
+ [![npm version](https://img.shields.io/npm/v/@unchainedshop/platform.svg)](https://npmjs.com/package/@unchainedshop/platform)
2
+ [![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](https://opensource.org/licenses/EUPL-1.2)
2
3
 
3
- Umbrella Package to setup Database Helpers, Accounts & Cron Jobs.
4
+ # @unchainedshop/platform
5
+
6
+ Umbrella package for the Unchained Engine. Provides complete platform setup including database initialization, API server, migrations, templates, and runtime configuration.
7
+
8
+ ## Installation
9
+
10
+ ```bash
11
+ npm install @unchainedshop/platform
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```typescript
17
+ import { startPlatform } from '@unchainedshop/platform';
18
+ import express from 'express';
19
+
20
+ const app = express();
21
+
22
+ const { unchainedAPI, graphqlHandler } = await startPlatform({
23
+ express: app,
24
+ options: {
25
+ // Platform options
26
+ },
27
+ });
28
+
29
+ // Platform is ready
30
+ app.listen(4010);
31
+ ```
32
+
33
+ ## API Overview
34
+
35
+ ### Platform Setup
36
+
37
+ | Export | Description |
38
+ |--------|-------------|
39
+ | `startPlatform` | Initialize complete Unchained platform |
40
+ | `runMigrations` | Run database migrations |
41
+ | `printRuntimeConfiguration` | Log registered templates, events, and adapters |
42
+
43
+ ### Context Helpers
44
+
45
+ | Export | Description |
46
+ |--------|-------------|
47
+ | `setAccessToken` | Set access token for user session |
48
+ | `getAccessToken` | Get current access token |
49
+ | `invalidateAccessToken` | Invalidate/logout access token |
50
+
51
+ ### Templates
52
+
53
+ | Export | Description |
54
+ |--------|-------------|
55
+ | `MessageTypes` | Available message/notification types |
56
+ | `setupTemplates` | Register message templates |
57
+
58
+ ### Message Types
59
+
60
+ | Type | Description |
61
+ |------|-------------|
62
+ | `ACCOUNT_ACTION` | Account verification, password reset |
63
+ | `DELIVERY` | Delivery notifications |
64
+ | `ORDER_CONFIRMATION` | Order confirmation emails |
65
+ | `ORDER_REJECTION` | Order rejection notifications |
66
+ | `QUOTATION_STATUS` | Quotation status updates |
67
+ | `ENROLLMENT_STATUS` | Subscription status updates |
68
+ | `FORWARD_DELIVERY` | Forward delivery notifications |
69
+
70
+ ## Quick Start
71
+
72
+ ```typescript
73
+ import express from 'express';
74
+ import { startPlatform, MessageTypes } from '@unchainedshop/platform';
75
+
76
+ const app = express();
77
+
78
+ const { unchainedAPI, graphqlHandler } = await startPlatform({
79
+ express: app,
80
+ options: {
81
+ modules: {
82
+ // Module-specific configuration
83
+ },
84
+ plugins: [
85
+ // Plugin imports
86
+ ],
87
+ },
88
+ workQueueConfig: {
89
+ // Worker queue configuration
90
+ },
91
+ });
92
+
93
+ // Access unchained API
94
+ const products = await unchainedAPI.modules.products.findProducts({});
95
+
96
+ // Start server
97
+ app.use('/graphql', graphqlHandler);
98
+ app.listen(4010);
99
+ ```
100
+
101
+ ## Configuration
102
+
103
+ ```typescript
104
+ const platform = await startPlatform({
105
+ express: app,
106
+ options: {
107
+ modules: {
108
+ orders: {
109
+ // Order module options
110
+ },
111
+ products: {
112
+ // Product module options
113
+ },
114
+ },
115
+ services: {
116
+ // Custom services
117
+ },
118
+ bulkImporter: {
119
+ handlers: {
120
+ // Custom import handlers
121
+ },
122
+ },
123
+ },
124
+ workQueueConfig: {
125
+ batchSize: 10,
126
+ pollInterval: 1000,
127
+ },
128
+ context: (defaultResolver) => async (props, req, res) => {
129
+ const context = await defaultResolver(props, req, res);
130
+ return {
131
+ ...context,
132
+ // Custom context properties
133
+ };
134
+ },
135
+ });
136
+ ```
137
+
138
+ ## Returns
139
+
140
+ The `startPlatform` function returns:
141
+
142
+ | Property | Description |
143
+ |----------|-------------|
144
+ | `unchainedAPI` | Complete Unchained core API instance |
145
+ | `graphqlHandler` | GraphQL Yoga server instance for Express/Fastify |
146
+ | `db` | MongoDB database instance |
147
+
148
+ ## License
149
+
150
+ EUPL-1.2
@@ -1,2 +1 @@
1
- export { default as setAccessToken } from './setAccessToken.js';
2
- //# sourceMappingURL=index.d.ts.map
1
+ export { default as setAccessToken } from './setAccessToken.ts';
@@ -1,2 +1 @@
1
- export { default as setAccessToken } from './setAccessToken.js';
2
- //# sourceMappingURL=index.js.map
1
+ export { default as setAccessToken } from "./setAccessToken.js";
@@ -1,4 +1,3 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
1
+ import type { UnchainedCore } from '@unchainedshop/core';
2
2
  declare const _default: (unchainedAPI: UnchainedCore, username: string, plainSecret: string) => Promise<void>;
3
3
  export default _default;
4
- //# sourceMappingURL=setAccessToken.d.ts.map
@@ -9,4 +9,3 @@ export default async (unchainedAPI, username, plainSecret) => {
9
9
  },
10
10
  }, {});
11
11
  };
12
- //# sourceMappingURL=setAccessToken.js.map
@@ -12,4 +12,3 @@ export declare const createMigrationRunner: ({ currentId, logger, migrationRepos
12
12
  migrateToLatest(): any;
13
13
  run(): Promise<any[]>;
14
14
  };
15
- //# sourceMappingURL=createMigrationRunner.d.ts.map
@@ -2,9 +2,7 @@ class MigrationError extends Error {
2
2
  migrationId;
3
3
  date;
4
4
  constructor(migrationId = null, ...params) {
5
- // Pass remaining arguments (including vendor specific ones) to parent constructor
6
5
  super(...params);
7
- // Maintains proper stack trace for where our error was thrown (only available on V8)
8
6
  if (Error.captureStackTrace) {
9
7
  Error.captureStackTrace(this, MigrationError);
10
8
  }
@@ -48,4 +46,3 @@ export const createMigrationRunner = ({ currentId, logger = console, migrationRe
48
46
  }
49
47
  },
50
48
  });
51
- //# sourceMappingURL=createMigrationRunner.js.map
@@ -1,3 +1,2 @@
1
- import { mongodb, MigrationRepository } from '@unchainedshop/mongodb';
1
+ import { mongodb, type MigrationRepository } from '@unchainedshop/mongodb';
2
2
  export declare const createMigrationRepository: (db: mongodb.Db) => MigrationRepository;
3
- //# sourceMappingURL=migrationRepository.d.ts.map
@@ -1,3 +1,4 @@
1
+ import { mongodb } from '@unchainedshop/mongodb';
1
2
  export const createMigrationRepository = (db) => {
2
3
  const migrations = new Map();
3
4
  return {
@@ -16,4 +17,3 @@ export const createMigrationRepository = (db) => {
16
17
  },
17
18
  };
18
19
  };
19
- //# sourceMappingURL=migrationRepository.js.map
@@ -1,8 +1,7 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
2
- import { MigrationRepository } from '@unchainedshop/mongodb';
1
+ import type { UnchainedCore } from '@unchainedshop/core';
2
+ import { type MigrationRepository } from '@unchainedshop/mongodb';
3
3
  export declare const runMigrations: ({ migrationRepository, logger, unchainedAPI, }: {
4
4
  migrationRepository: MigrationRepository<UnchainedCore>;
5
5
  logger?: any;
6
6
  unchainedAPI: UnchainedCore;
7
7
  }) => Promise<void>;
8
- //# sourceMappingURL=runMigrations.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import { createLogger } from '@unchainedshop/logger';
2
2
  import { generateDbFilterById } from '@unchainedshop/mongodb';
3
- import { createMigrationRunner } from './createMigrationRunner.js';
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 () => {
@@ -44,4 +44,3 @@ export const runMigrations = async ({ migrationRepository, logger = createLogger
44
44
  logger.warn(`Some migrations failed, last successful id: ${lastMigrationId}`);
45
45
  }
46
46
  };
47
- //# sourceMappingURL=runMigrations.js.map
@@ -1,6 +1,5 @@
1
- export * from './startPlatform.js';
2
- export * from './context/index.js';
3
- export * from './templates/index.js';
4
- export * from './migrations/runMigrations.js';
1
+ export * from './startPlatform.ts';
2
+ export * from './context/index.ts';
3
+ export * from './templates/index.ts';
4
+ export * from './migrations/runMigrations.ts';
5
5
  export declare const printRuntimeConfiguration: () => void;
6
- //# sourceMappingURL=platform-index.d.ts.map
@@ -1,7 +1,7 @@
1
- export * from './startPlatform.js';
2
- export * from './context/index.js';
3
- export * from './templates/index.js';
4
- export * from './migrations/runMigrations.js';
1
+ export * from "./startPlatform.js";
2
+ export * from "./context/index.js";
3
+ export * from "./templates/index.js";
4
+ export * from "./migrations/runMigrations.js";
5
5
  import { MessagingDirector, getAllAdapters } from '@unchainedshop/core';
6
6
  import { getRegisteredEvents } from '@unchainedshop/events';
7
7
  import { log } from '@unchainedshop/logger';
@@ -13,4 +13,3 @@ export const printRuntimeConfiguration = () => {
13
13
  const adapters = getAllAdapters().map((adapter) => adapter.asString());
14
14
  log(`Adapters: ${adapters.length}`, { adapters });
15
15
  };
16
- //# sourceMappingURL=platform-index.js.map
@@ -1,3 +1,2 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
1
+ import type { UnchainedCore } from '@unchainedshop/core';
2
2
  export declare const setupAccounts: (unchainedAPI: UnchainedCore) => void;
3
- //# sourceMappingURL=setupAccounts.d.ts.map
@@ -7,4 +7,3 @@ export const setupAccounts = (unchainedAPI) => {
7
7
  });
8
8
  });
9
9
  };
10
- //# sourceMappingURL=setupAccounts.js.map
@@ -1,12 +1,12 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
2
- export declare enum MessageTypes {
3
- ACCOUNT_ACTION = "ACCOUNT_ACTION",
4
- DELIVERY = "DELIVERY",
5
- ORDER_CONFIRMATION = "ORDER_CONFIRMATION",
6
- ORDER_REJECTION = "ORDER_REJECTION",
7
- QUOTATION_STATUS = "QUOTATION_STATUS",
8
- ENROLLMENT_STATUS = "ENROLLMENT_STATUS",
9
- ERROR_REPORT = "ERROR_REPORT"
10
- }
1
+ import { type UnchainedCore } from '@unchainedshop/core';
2
+ export declare const MessageTypes: {
3
+ readonly ACCOUNT_ACTION: "ACCOUNT_ACTION";
4
+ readonly DELIVERY: "DELIVERY";
5
+ readonly ORDER_CONFIRMATION: "ORDER_CONFIRMATION";
6
+ readonly ORDER_REJECTION: "ORDER_REJECTION";
7
+ readonly QUOTATION_STATUS: "QUOTATION_STATUS";
8
+ readonly ENROLLMENT_STATUS: "ENROLLMENT_STATUS";
9
+ readonly ERROR_REPORT: "ERROR_REPORT";
10
+ };
11
+ export type MessageTypes = (typeof MessageTypes)[keyof typeof MessageTypes];
11
12
  export declare const setupTemplates: (unchainedAPI: UnchainedCore) => void;
12
- //# sourceMappingURL=setupTemplates.d.ts.map
@@ -1,23 +1,22 @@
1
1
  import { MessagingDirector } from '@unchainedshop/core';
2
2
  import { subscribe } from '@unchainedshop/events';
3
3
  import { OrderStatus } from '@unchainedshop/core-orders';
4
- import { resolveOrderRejectionTemplate } from '../templates/resolveOrderRejectionTemplate.js';
5
- import { resolveAccountActionTemplate } from '../templates/resolveAccountActionTemplate.js';
6
- import { resolveForwardDeliveryTemplate } from '../templates/resolveForwardDeliveryTemplate.js';
7
- import { resolveOrderConfirmationTemplate } from '../templates/resolveOrderConfirmationTemplate.js';
8
- import { resolveQuotationStatusTemplate } from '../templates/resolveQuotationStatusTemplate.js';
9
- import { resolveEnrollmentStatusTemplate } from '../templates/resolveEnrollmentStatusTemplate.js';
10
- import { resolveErrorReportTemplate } from '../templates/resolveErrorReportTemplate.js';
11
- export var MessageTypes;
12
- (function (MessageTypes) {
13
- MessageTypes["ACCOUNT_ACTION"] = "ACCOUNT_ACTION";
14
- MessageTypes["DELIVERY"] = "DELIVERY";
15
- MessageTypes["ORDER_CONFIRMATION"] = "ORDER_CONFIRMATION";
16
- MessageTypes["ORDER_REJECTION"] = "ORDER_REJECTION";
17
- MessageTypes["QUOTATION_STATUS"] = "QUOTATION_STATUS";
18
- MessageTypes["ENROLLMENT_STATUS"] = "ENROLLMENT_STATUS";
19
- MessageTypes["ERROR_REPORT"] = "ERROR_REPORT";
20
- })(MessageTypes || (MessageTypes = {}));
4
+ import { resolveOrderRejectionTemplate } from "../templates/resolveOrderRejectionTemplate.js";
5
+ import { resolveAccountActionTemplate } from "../templates/resolveAccountActionTemplate.js";
6
+ import { resolveForwardDeliveryTemplate } from "../templates/resolveForwardDeliveryTemplate.js";
7
+ import { resolveOrderConfirmationTemplate } from "../templates/resolveOrderConfirmationTemplate.js";
8
+ import { resolveQuotationStatusTemplate } from "../templates/resolveQuotationStatusTemplate.js";
9
+ import { resolveEnrollmentStatusTemplate } from "../templates/resolveEnrollmentStatusTemplate.js";
10
+ import { resolveErrorReportTemplate } from "../templates/resolveErrorReportTemplate.js";
11
+ export const MessageTypes = {
12
+ ACCOUNT_ACTION: 'ACCOUNT_ACTION',
13
+ DELIVERY: 'DELIVERY',
14
+ ORDER_CONFIRMATION: 'ORDER_CONFIRMATION',
15
+ ORDER_REJECTION: 'ORDER_REJECTION',
16
+ QUOTATION_STATUS: 'QUOTATION_STATUS',
17
+ ENROLLMENT_STATUS: 'ENROLLMENT_STATUS',
18
+ ERROR_REPORT: 'ERROR_REPORT',
19
+ };
21
20
  export const setupTemplates = (unchainedAPI) => {
22
21
  MessagingDirector.registerTemplate(MessageTypes.ACCOUNT_ACTION, resolveAccountActionTemplate);
23
22
  MessagingDirector.registerTemplate(MessageTypes.DELIVERY, resolveForwardDeliveryTemplate);
@@ -31,7 +30,6 @@ export const setupTemplates = (unchainedAPI) => {
31
30
  const user = await unchainedAPI.modules.users.findUserById(order.userId);
32
31
  const locale = unchainedAPI.modules.users.userLocale(user);
33
32
  if (order.status === OrderStatus.PENDING) {
34
- // We only send the "confirmation" when pending, else we let the other events handle it
35
33
  await unchainedAPI.services.worker.addMessage(MessageTypes.ORDER_CONFIRMATION, {
36
34
  locale: locale.baseName,
37
35
  orderId: order._id,
@@ -57,4 +55,3 @@ export const setupTemplates = (unchainedAPI) => {
57
55
  });
58
56
  });
59
57
  };
60
- //# sourceMappingURL=setupTemplates.js.map
@@ -1,3 +1,2 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
1
+ import type { UnchainedCore } from '@unchainedshop/core';
2
2
  export declare const setupUploadHandlers: ({ services, modules }: UnchainedCore) => void;
3
- //# sourceMappingURL=setupUploadHandlers.d.ts.map
@@ -16,4 +16,3 @@ export const setupUploadHandlers = ({ services, modules }) => {
16
16
  });
17
17
  });
18
18
  };
19
- //# sourceMappingURL=setupUploadHandlers.js.map
@@ -1,5 +1,5 @@
1
- import { FailedReschedulerParams, IntervalWorkerParams, IScheduler, IWorker, UnchainedCore } from '@unchainedshop/core';
2
- import { MigrationRepository } from '@unchainedshop/mongodb';
1
+ import { type FailedReschedulerParams, type IntervalWorkerParams, type IScheduler, type IWorker, type UnchainedCore } from '@unchainedshop/core';
2
+ import type { MigrationRepository } from '@unchainedshop/mongodb';
3
3
  export type WorkQueueQueueManager = IWorker<any> | IScheduler<any>;
4
4
  export interface SetupWorkqueueOptions extends IntervalWorkerParams, FailedReschedulerParams {
5
5
  enabledQueueManagers?: WorkQueueQueueManager[];
@@ -16,4 +16,3 @@ export declare function setupWorkqueue({ unchainedAPI, migrationRepository, ...w
16
16
  migrationRepository: MigrationRepository<UnchainedCore>;
17
17
  } & SetupWorkqueueOptions): Promise<void>;
18
18
  export declare function stopWorkqueue(): void;
19
- //# sourceMappingURL=setupWorkqueue.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { EventListenerWorker, FailedRescheduler, IntervalWorker, } from '@unchainedshop/core';
2
- import { runMigrations } from '../migrations/runMigrations.js';
2
+ import { runMigrations } from "../migrations/runMigrations.js";
3
3
  import { createLogger } from '@unchainedshop/logger';
4
4
  const logger = createLogger('unchained:worker');
5
5
  const { UNCHAINED_DISABLE_PROVIDER_INVALIDATION, UNCHAINED_DISABLE_WORKER, UNCHAINED_ASSIGN_CART_FOR_USERS, } = process.env;
@@ -12,22 +12,18 @@ export const queueWorkers = [];
12
12
  export async function setupWorkqueue({ unchainedAPI, migrationRepository, ...workQueueOptions }) {
13
13
  if (workQueueOptions.disableWorker || UNCHAINED_DISABLE_WORKER)
14
14
  return;
15
- // Run migrations
16
15
  await runMigrations({ migrationRepository, unchainedAPI });
17
- // Start queue managers
18
16
  (workQueueOptions?.enabledQueueManagers || defaultQueueManagers).forEach((f) => {
19
17
  const handler = f.actions(workQueueOptions, unchainedAPI);
20
18
  queueWorkers.push(handler);
21
19
  handler.start();
22
20
  });
23
- // Invalidate providers on carts
24
21
  if (workQueueOptions.invalidateProviders ?? !UNCHAINED_DISABLE_PROVIDER_INVALIDATION) {
25
22
  const orders = await unchainedAPI.modules.orders.findCartsToInvalidate(workQueueOptions.providerInvalidationMaxAgeDays);
26
23
  await Promise.allSettled(orders.map(async (order) => {
27
24
  await unchainedAPI.services.orders.updateCalculation(order._id);
28
25
  }));
29
26
  }
30
- // Ensure users have carts
31
27
  if (workQueueOptions.assignCartForUsers ?? Boolean(UNCHAINED_ASSIGN_CART_FOR_USERS)) {
32
28
  const users = await unchainedAPI.modules.users.findUsers({});
33
29
  await Promise.all(users.map((user) => {
@@ -40,7 +36,6 @@ export async function setupWorkqueue({ unchainedAPI, migrationRepository, ...wor
40
36
  });
41
37
  }));
42
38
  }
43
- // Setup filter cache
44
39
  if (!workQueueOptions?.skipInvalidationOnStartup) {
45
40
  unchainedAPI.services.filters
46
41
  .invalidateFilterCache()
@@ -56,4 +51,3 @@ export function stopWorkqueue() {
56
51
  });
57
52
  queueWorkers.length = 0;
58
53
  }
59
- //# sourceMappingURL=setupWorkqueue.js.map
@@ -1,10 +1,10 @@
1
- import { UnchainedServerOptions } from '@unchainedshop/api';
2
- import { UnchainedCoreOptions } from '@unchainedshop/core';
1
+ import { type UnchainedServerOptions } from '@unchainedshop/api';
2
+ import { type UnchainedCoreOptions } from '@unchainedshop/core';
3
3
  import { mongodb } from '@unchainedshop/mongodb';
4
- import { UnchainedCore } from '@unchainedshop/core';
5
- import { MessageTypes } from './setup/setupTemplates.js';
6
- import { SetupWorkqueueOptions } from './setup/setupWorkqueue.js';
7
- import { IRoleOptionConfig } from '@unchainedshop/roles';
4
+ import type { UnchainedCore } from '@unchainedshop/core';
5
+ import { MessageTypes } from './setup/setupTemplates.ts';
6
+ import { type SetupWorkqueueOptions } from './setup/setupWorkqueue.ts';
7
+ import type { IRoleOptionConfig } from '@unchainedshop/roles';
8
8
  export { MessageTypes };
9
9
  export type PlatformOptions = {
10
10
  rolesOptions?: IRoleOptionConfig;
@@ -15,4 +15,3 @@ export declare const startPlatform: ({ modules, services, options, rolesOptions,
15
15
  graphqlHandler: any;
16
16
  db: mongodb.Db;
17
17
  }>;
18
- //# sourceMappingURL=startPlatform.d.ts.map
@@ -1,12 +1,20 @@
1
+ var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
2
+ if (typeof path === "string" && /^\.\.?\//.test(path)) {
3
+ return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
4
+ return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
5
+ });
6
+ }
7
+ return path;
8
+ };
1
9
  import { startAPIServer, roles } from '@unchainedshop/api';
2
10
  import { initCore } from '@unchainedshop/core';
3
- import { initDb, stopDb } from '@unchainedshop/mongodb';
11
+ import { initDb, mongodb, stopDb } from '@unchainedshop/mongodb';
4
12
  import { defaultLogger } from '@unchainedshop/logger';
5
- import { setupAccounts } from './setup/setupAccounts.js';
6
- import { setupUploadHandlers } from './setup/setupUploadHandlers.js';
7
- import { setupTemplates, MessageTypes } from './setup/setupTemplates.js';
8
- import { stopWorkqueue, setupWorkqueue } from './setup/setupWorkqueue.js';
9
- import { createMigrationRepository } from './migrations/migrationRepository.js';
13
+ import { setupAccounts } from "./setup/setupAccounts.js";
14
+ import { setupUploadHandlers } from "./setup/setupUploadHandlers.js";
15
+ import { setupTemplates, MessageTypes } from "./setup/setupTemplates.js";
16
+ import { stopWorkqueue, setupWorkqueue } from "./setup/setupWorkqueue.js";
17
+ import { createMigrationRepository } from "./migrations/migrationRepository.js";
10
18
  export { MessageTypes };
11
19
  const REQUIRED_ENV_VARIABLES = [
12
20
  'EMAIL_WEBSITE_NAME',
@@ -33,11 +41,8 @@ export const startPlatform = async ({ modules, services, options, rolesOptions,
33
41
  exitOnMissingEnvironmentVariables();
34
42
  existOnInvalidEnvironmentVariables();
35
43
  const configuredRoles = roles.configureRoles(rolesOptions || {});
36
- // Configure database
37
44
  const db = await initDb();
38
- // Prepare Migrations
39
45
  const migrationRepository = createMigrationRepository(db);
40
- // Initialise core api using the database
41
46
  const unchainedAPI = await initCore({
42
47
  db,
43
48
  migrationRepository,
@@ -46,25 +51,20 @@ export const startPlatform = async ({ modules, services, options, rolesOptions,
46
51
  services,
47
52
  options,
48
53
  });
49
- // Setup Accounts specific extensions and event handlers
50
54
  setupAccounts(unchainedAPI);
51
- // Setup Messaging Templates
52
55
  setupTemplates(unchainedAPI);
53
- // Setup File Upload Handlers
54
56
  setupUploadHandlers(unchainedAPI);
55
- // Start GraphQL Server
56
57
  const graphqlHandler = await startAPIServer({
57
58
  unchainedAPI,
58
59
  roles: configuredRoles,
59
60
  ...arbitraryAPIServerConfiguration,
60
61
  });
61
- // Setup Work Queue
62
62
  await setupWorkqueue({
63
63
  unchainedAPI,
64
64
  migrationRepository,
65
65
  ...workQueueOptions,
66
66
  });
67
- const { default: packageJson } = await import(`${import.meta.dirname}/../package.json`, {
67
+ const { default: packageJson } = await import(__rewriteRelativeImportExtension(`${import.meta.dirname}/../package.json`), {
68
68
  with: { type: 'json' },
69
69
  });
70
70
  defaultLogger.info(`Unchained Engine running`, { version: packageJson.version });
@@ -84,4 +84,3 @@ export const startPlatform = async ({ modules, services, options, rolesOptions,
84
84
  defaultLogger.debug(`Unchained Engine started in ${(end - start).toFixed(0)} ms`);
85
85
  return { unchainedAPI, graphqlHandler, db };
86
86
  };
87
- //# sourceMappingURL=startPlatform.js.map
@@ -1,9 +1,8 @@
1
- export { resolveOrderRejectionTemplate } from './resolveOrderRejectionTemplate.js';
2
- export { resolveAccountActionTemplate } from './resolveAccountActionTemplate.js';
3
- export { resolveForwardDeliveryTemplate } from './resolveForwardDeliveryTemplate.js';
4
- export { resolveOrderConfirmationTemplate } from './resolveOrderConfirmationTemplate.js';
5
- export { resolveQuotationStatusTemplate } from './resolveQuotationStatusTemplate.js';
6
- export { resolveEnrollmentStatusTemplate } from './resolveEnrollmentStatusTemplate.js';
7
- export { resolveErrorReportTemplate } from './resolveErrorReportTemplate.js';
8
- export * as parser from './order-parser/index.js';
9
- //# sourceMappingURL=index.d.ts.map
1
+ export { resolveOrderRejectionTemplate } from './resolveOrderRejectionTemplate.ts';
2
+ export { resolveAccountActionTemplate } from './resolveAccountActionTemplate.ts';
3
+ export { resolveForwardDeliveryTemplate } from './resolveForwardDeliveryTemplate.ts';
4
+ export { resolveOrderConfirmationTemplate } from './resolveOrderConfirmationTemplate.ts';
5
+ export { resolveQuotationStatusTemplate } from './resolveQuotationStatusTemplate.ts';
6
+ export { resolveEnrollmentStatusTemplate } from './resolveEnrollmentStatusTemplate.ts';
7
+ export { resolveErrorReportTemplate } from './resolveErrorReportTemplate.ts';
8
+ export * as parser from './order-parser/index.ts';
@@ -1,9 +1,8 @@
1
- export { resolveOrderRejectionTemplate } from './resolveOrderRejectionTemplate.js';
2
- export { resolveAccountActionTemplate } from './resolveAccountActionTemplate.js';
3
- export { resolveForwardDeliveryTemplate } from './resolveForwardDeliveryTemplate.js';
4
- export { resolveOrderConfirmationTemplate } from './resolveOrderConfirmationTemplate.js';
5
- export { resolveQuotationStatusTemplate } from './resolveQuotationStatusTemplate.js';
6
- export { resolveEnrollmentStatusTemplate } from './resolveEnrollmentStatusTemplate.js';
7
- export { resolveErrorReportTemplate } from './resolveErrorReportTemplate.js';
8
- export * as parser from './order-parser/index.js';
9
- //# sourceMappingURL=index.js.map
1
+ export { resolveOrderRejectionTemplate } from "./resolveOrderRejectionTemplate.js";
2
+ export { resolveAccountActionTemplate } from "./resolveAccountActionTemplate.js";
3
+ export { resolveForwardDeliveryTemplate } from "./resolveForwardDeliveryTemplate.js";
4
+ export { resolveOrderConfirmationTemplate } from "./resolveOrderConfirmationTemplate.js";
5
+ export { resolveQuotationStatusTemplate } from "./resolveQuotationStatusTemplate.js";
6
+ export { resolveEnrollmentStatusTemplate } from "./resolveEnrollmentStatusTemplate.js";
7
+ export { resolveErrorReportTemplate } from "./resolveErrorReportTemplate.js";
8
+ export * as parser from "./order-parser/index.js";
@@ -1,5 +1,5 @@
1
- import { UnchainedCore } from '@unchainedshop/core';
2
- import { Order } from '@unchainedshop/core-orders';
1
+ import type { UnchainedCore } from '@unchainedshop/core';
2
+ import type { Order } from '@unchainedshop/core-orders';
3
3
  type PriceFormatter = ({ amount, currencyCode }: {
4
4
  amount: number;
5
5
  currencyCode: string;
@@ -27,4 +27,3 @@ export declare const getOrderPositionsData: (order: Order, params: {
27
27
  total: string;
28
28
  }[]>;
29
29
  export {};
30
- //# sourceMappingURL=getOrderPositionsData.d.ts.map
@@ -33,4 +33,3 @@ export const getOrderPositionsData = async (order, params, context) => {
33
33
  };
34
34
  }));
35
35
  };
36
- //# sourceMappingURL=getOrderPositionsData.js.map
@@ -1,5 +1,5 @@
1
- import { Order } from '@unchainedshop/core-orders';
2
- import { UnchainedCore } from '@unchainedshop/core';
1
+ import type { Order } from '@unchainedshop/core-orders';
2
+ import { type UnchainedCore } from '@unchainedshop/core';
3
3
  type PriceFormatter = ({ amount, currencyCode }: {
4
4
  amount: number;
5
5
  currencyCode: string;
@@ -44,4 +44,3 @@ export declare const getOrderSummaryData: (order: Order, params: {
44
44
  billingAddress: string;
45
45
  }>;
46
46
  export {};
47
- //# sourceMappingURL=getOrderSummaryData.d.ts.map
@@ -67,4 +67,3 @@ export const getOrderSummaryData = async (order, params, context) => {
67
67
  billingAddress,
68
68
  };
69
69
  };
70
- //# sourceMappingURL=getOrderSummaryData.js.map
@@ -1,10 +1,9 @@
1
- import { getOrderPositionsData } from './getOrderPositionsData.js';
2
- import { getOrderSummaryData } from './getOrderSummaryData.js';
3
- import { Order } from '@unchainedshop/core-orders';
4
- import { UnchainedCore } from '@unchainedshop/core';
1
+ import { getOrderPositionsData } from './getOrderPositionsData.ts';
2
+ import { getOrderSummaryData } from './getOrderSummaryData.ts';
3
+ import type { Order } from '@unchainedshop/core-orders';
4
+ import type { UnchainedCore } from '@unchainedshop/core';
5
5
  export declare const transformOrderToText: ({ order, locale }: {
6
6
  order: Order;
7
7
  locale: Intl.Locale;
8
8
  }, context: UnchainedCore) => Promise<string>;
9
9
  export { getOrderPositionsData, getOrderSummaryData };
10
- //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- import { getOrderPositionsData } from './getOrderPositionsData.js';
2
- import { getOrderSummaryData } from './getOrderSummaryData.js';
1
+ import { getOrderPositionsData } from "./getOrderPositionsData.js";
2
+ import { getOrderSummaryData } from "./getOrderSummaryData.js";
3
3
  export const transformOrderToText = async ({ order, locale }, context) => {
4
4
  const orderDate = new Date(order.ordered).toLocaleString();
5
5
  const orderNumber = order.orderNumber;
@@ -53,4 +53,3 @@ ${subtotalText}${deliveryFeesText}${paymentFeesText}${totalLine}${taxesText}
53
53
  `;
54
54
  };
55
55
  export { getOrderPositionsData, getOrderSummaryData };
56
- //# sourceMappingURL=index.js.map
@@ -1,3 +1,2 @@
1
- import { TemplateResolver } from '@unchainedshop/core';
1
+ import type { TemplateResolver } from '@unchainedshop/core';
2
2
  export declare const resolveAccountActionTemplate: TemplateResolver;
3
- //# sourceMappingURL=resolveAccountActionTemplate.d.ts.map