@unchainedshop/platform 2.0.0-rc.3 → 2.0.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.
- package/jest.config.js +3 -0
- package/lib/bulk-importer/createBulkImporter.d.ts +2 -2
- package/lib/bulk-importer/createBulkImporter.js +13 -4
- package/lib/bulk-importer/createBulkImporter.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/create.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/create.js +6 -6
- package/lib/bulk-importer/handlers/assortment/create.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/index.d.ts +3 -3
- package/lib/bulk-importer/handlers/assortment/index.js +3 -3
- package/lib/bulk-importer/handlers/assortment/index.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/remove.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/update.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/update.js +6 -6
- package/lib/bulk-importer/handlers/assortment/update.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentChildren.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentContent.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentFilters.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertAssortmentProducts.js.map +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertMedia.d.ts +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js +1 -1
- package/lib/bulk-importer/handlers/assortment/upsertMedia.js.map +1 -1
- package/lib/bulk-importer/handlers/filter/create.d.ts +1 -1
- package/lib/bulk-importer/handlers/filter/create.js +2 -2
- package/lib/bulk-importer/handlers/filter/create.js.map +1 -1
- package/lib/bulk-importer/handlers/filter/index.d.ts +3 -3
- package/lib/bulk-importer/handlers/filter/index.js +3 -3
- package/lib/bulk-importer/handlers/filter/index.js.map +1 -1
- package/lib/bulk-importer/handlers/filter/remove.d.ts +1 -1
- package/lib/bulk-importer/handlers/filter/update.d.ts +1 -1
- package/lib/bulk-importer/handlers/filter/update.js +2 -2
- package/lib/bulk-importer/handlers/filter/update.js.map +1 -1
- package/lib/bulk-importer/handlers/filter/upsertFilterContent.d.ts +2 -2
- package/lib/bulk-importer/handlers/filter/upsertFilterOptionContent.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/create.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/create.js +4 -4
- package/lib/bulk-importer/handlers/product/create.js.map +1 -1
- package/lib/bulk-importer/handlers/product/index.d.ts +3 -3
- package/lib/bulk-importer/handlers/product/index.js +3 -3
- package/lib/bulk-importer/handlers/product/index.js.map +1 -1
- package/lib/bulk-importer/handlers/product/remove.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js +1 -1
- package/lib/bulk-importer/handlers/product/transformSpecificationToProductStructure.js.map +1 -1
- package/lib/bulk-importer/handlers/product/update.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/update.js +4 -4
- package/lib/bulk-importer/handlers/product/update.js.map +1 -1
- package/lib/bulk-importer/handlers/product/upsertMedia.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/upsertMedia.js +2 -2
- package/lib/bulk-importer/handlers/product/upsertMedia.js.map +1 -1
- package/lib/bulk-importer/handlers/product/upsertProductContent.d.ts +1 -1
- package/lib/bulk-importer/handlers/product/upsertVariations.d.ts +1 -1
- package/lib/bulk-importer/upsertAsset.d.ts +2 -2
- package/lib/context/index.d.ts +2 -2
- package/lib/context/index.js +2 -2
- package/lib/context/index.js.map +1 -1
- package/lib/context/setAccessToken.d.ts +1 -1
- package/lib/context/withAccessToken.d.ts +1 -1
- package/lib/migrations/createMigrationRunner.d.ts +1 -1
- package/lib/migrations/migrationRepository.d.ts +2 -2
- package/lib/migrations/runMigrations.d.ts +1 -1
- package/lib/migrations/runMigrations.js +1 -1
- package/lib/migrations/runMigrations.js.map +1 -1
- package/lib/platform-index.d.ts +2 -2
- package/lib/platform-index.js +2 -2
- package/lib/platform-index.js.map +1 -1
- package/lib/setup/setupAccounts.d.ts +1 -1
- package/lib/setup/setupCarts.d.ts +2 -2
- package/lib/setup/setupTemplates.js +7 -7
- package/lib/setup/setupTemplates.js.map +1 -1
- package/lib/setup/setupWorkqueue.d.ts +2 -2
- package/lib/startPlatform.d.ts +3 -3
- package/lib/startPlatform.js +10 -9
- package/lib/startPlatform.js.map +1 -1
- package/lib/templates/resolveAccountActionTemplate.d.ts +1 -1
- package/lib/templates/resolveEnrollmentStatusTemplate.d.ts +1 -1
- package/lib/templates/resolveForwardDeliveryTemplate.d.ts +1 -1
- package/lib/templates/resolveForwardDeliveryTemplate.js +2 -2
- package/lib/templates/resolveForwardDeliveryTemplate.js.map +1 -1
- package/lib/templates/resolveOrderConfirmationTemplate.d.ts +1 -1
- package/lib/templates/resolveOrderConfirmationTemplate.js +3 -3
- package/lib/templates/resolveOrderConfirmationTemplate.js.map +1 -1
- package/lib/templates/resolveOrderRejectionTemplate.d.ts +1 -1
- package/lib/templates/resolveQuotationStatusTemplate.d.ts +1 -1
- package/lib/templates/utils/getOrderAttachmentsData.d.ts +2 -2
- package/lib/templates/utils/getOrderPositionsData.d.ts +3 -3
- package/package.json +13 -13
- package/src/bulk-importer/createBulkImporter.ts +17 -6
- package/src/bulk-importer/handlers/assortment/create.ts +7 -7
- package/src/bulk-importer/handlers/assortment/index.ts +3 -3
- package/src/bulk-importer/handlers/assortment/remove.ts +1 -1
- package/src/bulk-importer/handlers/assortment/update.ts +7 -7
- package/src/bulk-importer/handlers/assortment/upsertAssortmentChildren.ts +3 -3
- package/src/bulk-importer/handlers/assortment/upsertAssortmentContent.ts +2 -2
- package/src/bulk-importer/handlers/assortment/upsertAssortmentFilters.ts +3 -3
- package/src/bulk-importer/handlers/assortment/upsertAssortmentProducts.ts +3 -3
- package/src/bulk-importer/handlers/assortment/upsertMedia.ts +3 -3
- package/src/bulk-importer/handlers/filter/create.ts +3 -3
- package/src/bulk-importer/handlers/filter/index.ts +3 -3
- package/src/bulk-importer/handlers/filter/remove.ts +1 -1
- package/src/bulk-importer/handlers/filter/update.ts +3 -3
- package/src/bulk-importer/handlers/filter/upsertFilterContent.ts +2 -2
- package/src/bulk-importer/handlers/filter/upsertFilterOptionContent.ts +2 -2
- package/src/bulk-importer/handlers/product/create.ts +5 -5
- package/src/bulk-importer/handlers/product/index.ts +3 -3
- package/src/bulk-importer/handlers/product/remove.ts +1 -1
- package/src/bulk-importer/handlers/product/transformSpecificationToProductStructure.ts +1 -1
- package/src/bulk-importer/handlers/product/update.ts +5 -5
- package/src/bulk-importer/handlers/product/upsertMedia.ts +4 -4
- package/src/bulk-importer/handlers/product/upsertProductContent.ts +2 -2
- package/src/bulk-importer/handlers/product/upsertVariations.ts +2 -2
- package/src/bulk-importer/upsertAsset.ts +2 -2
- package/src/context/index.ts +2 -2
- package/src/context/setAccessToken.ts +1 -1
- package/src/context/withAccessToken.ts +1 -1
- package/src/migrations/migrationRepository.ts +2 -2
- package/src/migrations/runMigrations.ts +2 -2
- package/src/platform-index.ts +2 -2
- package/src/setup/setupAccounts.ts +2 -2
- package/src/setup/setupCarts.ts +2 -2
- package/src/setup/setupTemplates.ts +7 -7
- package/src/setup/setupWorkqueue.ts +2 -2
- package/src/startPlatform.ts +11 -9
- package/src/templates/resolveAccountActionTemplate.ts +1 -1
- package/src/templates/resolveEnrollmentStatusTemplate.ts +1 -1
- package/src/templates/resolveForwardDeliveryTemplate.ts +3 -3
- package/src/templates/resolveOrderConfirmationTemplate.ts +4 -4
- package/src/templates/resolveOrderRejectionTemplate.ts +1 -1
- package/src/templates/resolveQuotationStatusTemplate.ts +1 -1
- package/src/templates/utils/getOrderAttachmentsData.ts +2 -2
- package/src/templates/utils/getOrderPositionsData.ts +3 -3
- package/tsconfig.json +4 -22
|
@@ -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,
|
package/src/context/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as withAccessToken } from './withAccessToken';
|
|
2
|
-
export { default as setAccessToken } from './setAccessToken';
|
|
1
|
+
export { default as withAccessToken } from './withAccessToken.js';
|
|
2
|
+
export { default as setAccessToken } from './setAccessToken.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 (unchainedAPI: UnchainedCore, username: string, secret: string): Promise<void> => {
|
|
4
4
|
await unchainedAPI.modules.users.updateUser(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Migration, MigrationRepository } from '@unchainedshop/types/core';
|
|
2
|
-
import { Db } from '@unchainedshop/types/common';
|
|
1
|
+
import { Migration, MigrationRepository } from '@unchainedshop/types/core.js';
|
|
2
|
+
import { Db } from '@unchainedshop/types/common.js';
|
|
3
3
|
|
|
4
4
|
export const createMigrationRepository = (db: Db): MigrationRepository<Migration> => {
|
|
5
5
|
const migrations = new Map();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Migration, UnchainedCore, MigrationRepository } from '@unchainedshop/types/core';
|
|
1
|
+
import { Migration, UnchainedCore, MigrationRepository } from '@unchainedshop/types/core.js';
|
|
2
2
|
import { createLogger } from '@unchainedshop/logger';
|
|
3
3
|
import { generateDbFilterById } from '@unchainedshop/utils';
|
|
4
|
-
import { createMigrationRunner } from './createMigrationRunner';
|
|
4
|
+
import { createMigrationRunner } from './createMigrationRunner.js';
|
|
5
5
|
|
|
6
6
|
export const runMigrations = async ({
|
|
7
7
|
migrationRepository,
|
package/src/platform-index.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { User } from '@unchainedshop/types/user';
|
|
1
|
+
import { User } from '@unchainedshop/types/user.js';
|
|
2
2
|
import { randomValueHex } from '@unchainedshop/utils';
|
|
3
3
|
import { accountsSettings } from '@unchainedshop/core-accountsjs';
|
|
4
4
|
import moniker from 'moniker';
|
|
5
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
5
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
6
6
|
|
|
7
7
|
export const setupAccounts = (unchainedAPI: UnchainedCore) => {
|
|
8
8
|
const accountsServer = unchainedAPI.modules.accounts.getAccountsServer();
|
package/src/setup/setupCarts.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
|
4
4
|
const { UNCHAINED_DISABLE_PROVIDER_INVALIDATION, UNCHAINED_ASSIGN_CART_FOR_USERS } = process.env;
|
|
5
5
|
|
|
@@ -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
|
|
|
10
10
|
export const setupTemplates = () => {
|
|
11
11
|
MessagingDirector.registerTemplate(MessageTypes.ACCOUNT_ACTION, resolveAccountActionTemplate);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SetupWorkqueueOptions } from '@unchainedshop/types/platform';
|
|
1
|
+
import { SetupWorkqueueOptions } from '@unchainedshop/types/platform.js';
|
|
2
2
|
import { EventListenerWorker, FailedRescheduler, IntervalWorker } from '@unchainedshop/core-worker';
|
|
3
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
3
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
4
4
|
|
|
5
5
|
export const setupWorkqueue = (
|
|
6
6
|
unchainedAPI: UnchainedCore,
|
package/src/startPlatform.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { SetupWorkqueueOptions, PlatformOptions, MessageTypes } from '@unchainedshop/types/platform';
|
|
1
|
+
import { SetupWorkqueueOptions, PlatformOptions, 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
|
-
import { UnchainedCore } from '@unchainedshop/types/core';
|
|
6
|
+
import { UnchainedCore } from '@unchainedshop/types/core.js';
|
|
7
7
|
import { getRegisteredEvents } from '@unchainedshop/events';
|
|
8
8
|
import { WorkerDirector } from '@unchainedshop/core-worker';
|
|
9
|
-
import { createBulkImporterFactory } from './bulk-importer/createBulkImporter';
|
|
10
|
-
import { runMigrations } from './migrations/runMigrations';
|
|
11
|
-
import { setupAccounts } from './setup/setupAccounts';
|
|
12
|
-
import { setupCarts } from './setup/setupCarts';
|
|
13
|
-
import { setupTemplates } from './setup/setupTemplates';
|
|
14
|
-
import { setupWorkqueue } from './setup/setupWorkqueue';
|
|
15
|
-
import { createMigrationRepository } from './migrations/migrationRepository';
|
|
9
|
+
import { createBulkImporterFactory } from './bulk-importer/createBulkImporter.js';
|
|
10
|
+
import { runMigrations } from './migrations/runMigrations.js';
|
|
11
|
+
import { setupAccounts } from './setup/setupAccounts.js';
|
|
12
|
+
import { setupCarts } from './setup/setupCarts.js';
|
|
13
|
+
import { setupTemplates } from './setup/setupTemplates.js';
|
|
14
|
+
import { setupWorkqueue } from './setup/setupWorkqueue.js';
|
|
15
|
+
import { createMigrationRepository } from './migrations/migrationRepository.js';
|
|
16
16
|
|
|
17
17
|
export { MessageTypes };
|
|
18
18
|
|
|
@@ -43,6 +43,7 @@ export const startPlatform = async ({
|
|
|
43
43
|
typeDefs = [],
|
|
44
44
|
resolvers = [],
|
|
45
45
|
options = {},
|
|
46
|
+
adminUiConfig = {},
|
|
46
47
|
rolesOptions = {},
|
|
47
48
|
bulkImporter: bulkImporterOptions,
|
|
48
49
|
schema,
|
|
@@ -109,6 +110,7 @@ export const startPlatform = async ({
|
|
|
109
110
|
playground,
|
|
110
111
|
tracing,
|
|
111
112
|
cacheControl,
|
|
113
|
+
adminUiConfig,
|
|
112
114
|
});
|
|
113
115
|
|
|
114
116
|
// Setup work queues for scheduled work
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TemplateResolver } from '@unchainedshop/types/messaging';
|
|
1
|
+
import { TemplateResolver } from '@unchainedshop/types/messaging.js';
|
|
2
2
|
import { systemLocale } from '@unchainedshop/utils';
|
|
3
|
-
import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
|
|
4
|
-
import { getOrderPositionsData } from './utils/getOrderPositionsData';
|
|
3
|
+
import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
|
|
4
|
+
import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
|
|
5
5
|
|
|
6
6
|
const { EMAIL_FROM, EMAIL_WEBSITE_NAME, ROOT_URL } = process.env;
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TemplateResolver } from '@unchainedshop/types/messaging';
|
|
2
|
-
import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing';
|
|
3
|
-
import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData';
|
|
4
|
-
import { getOrderPositionsData } from './utils/getOrderPositionsData';
|
|
1
|
+
import { TemplateResolver } from '@unchainedshop/types/messaging.js';
|
|
2
|
+
import { OrderPricingRowCategory } from '@unchainedshop/types/orders.pricing.js';
|
|
3
|
+
import { getOrderAttachmentsData } from './utils/getOrderAttachmentsData.js';
|
|
4
|
+
import { getOrderPositionsData } from './utils/getOrderPositionsData.js';
|
|
5
5
|
|
|
6
6
|
const { EMAIL_FROM, EMAIL_WEBSITE_NAME, EMAIL_WEBSITE_URL } = process.env;
|
|
7
7
|
|
|
@@ -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
|
|
|
4
4
|
export const getOrderAttachmentsData = async (
|
|
5
5
|
order: Order,
|
|
@@ -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
|
|
|
5
5
|
export const getOrderPositionsData = async (
|
|
6
6
|
order: Order,
|
package/tsconfig.json
CHANGED
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
+
"extends": "../shared/base.tsconfig.json",
|
|
2
3
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"experimentalDecorators": true,
|
|
8
|
-
"forceConsistentCasingInFileNames": true,
|
|
9
|
-
"lib": [
|
|
10
|
-
"esnext"
|
|
11
|
-
],
|
|
12
|
-
"module": "esnext",
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"noImplicitReturns": true,
|
|
15
|
-
"noUnusedLocals": false,
|
|
4
|
+
"rootDir": "src",
|
|
16
5
|
"outDir": "lib",
|
|
17
|
-
"preserveWatchOutput": true,
|
|
18
|
-
"skipLibCheck": true,
|
|
19
|
-
"sourceMap": true,
|
|
20
|
-
"target": "esnext",
|
|
21
|
-
"types": [
|
|
22
|
-
"node",
|
|
23
|
-
"jest"
|
|
24
|
-
]
|
|
25
6
|
},
|
|
7
|
+
"exclude": ["**/*.test.ts", "**/*.test.js", "tests"],
|
|
26
8
|
"include": [
|
|
27
|
-
"src"
|
|
9
|
+
"./src"
|
|
28
10
|
]
|
|
29
11
|
}
|