@haus-tech/product-import-export-plugin 3.6.1 → 3.6.3

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 (44) hide show
  1. package/CHANGELOG.md +38 -11
  2. package/README.mdx +69 -59
  3. package/package.json +7 -9
  4. package/src/api/plugin.controller.d.ts +32 -2
  5. package/src/api/plugin.controller.js +30 -4
  6. package/src/api/plugin.controller.js.map +1 -1
  7. package/src/api/product-export.controller.d.ts +1 -0
  8. package/src/api/product-export.controller.js +17 -0
  9. package/src/api/product-export.controller.js.map +1 -1
  10. package/src/api/product-import.controller.js +1 -0
  11. package/src/api/product-import.controller.js.map +1 -1
  12. package/src/dashboard/bulk-export.tsx +0 -1
  13. package/src/dashboard/export-dialog.tsx +285 -22
  14. package/src/dashboard/export.tsx +17 -52
  15. package/src/dashboard/exported-list.tsx +96 -176
  16. package/src/dashboard/import.tsx +149 -286
  17. package/src/dashboard/index.tsx +28 -27
  18. package/src/dashboard/utils.ts +20 -3
  19. package/src/index.d.ts +1 -1
  20. package/src/product-import-export.plugin.d.ts +0 -6
  21. package/src/product-import-export.plugin.js +25 -29
  22. package/src/product-import-export.plugin.js.map +1 -1
  23. package/src/providers/import-providers/asset-importer.js +8 -27
  24. package/src/providers/import-providers/asset-importer.js.map +1 -1
  25. package/src/providers/import-providers/import-parser.d.ts +0 -1
  26. package/src/providers/import-providers/import-parser.js +2 -18
  27. package/src/providers/import-providers/import-parser.js.map +1 -1
  28. package/src/providers/import-providers/product-importer.d.ts +0 -10
  29. package/src/providers/import-providers/product-importer.js +34 -115
  30. package/src/providers/import-providers/product-importer.js.map +1 -1
  31. package/src/services/export-storage/export-storage-strategy.d.ts +0 -8
  32. package/src/services/extended-fast-importer.service.js +12 -20
  33. package/src/services/extended-fast-importer.service.js.map +1 -1
  34. package/src/services/import-storage/import-job-storage-strategy.d.ts +0 -9
  35. package/src/services/product-export-queue.service.js +1 -1
  36. package/src/services/product-export-queue.service.js.map +1 -1
  37. package/src/services/product-export.service.d.ts +13 -7
  38. package/src/services/product-export.service.js +96 -43
  39. package/src/services/product-export.service.js.map +1 -1
  40. package/src/types.d.ts +29 -9
  41. package/src/ui/components/product-import.component.ts +1 -0
  42. package/README.md +0 -231
  43. package/src/dashboard/export-configuration-panel.tsx +0 -404
  44. package/src/dashboard/use-active-channel-key.ts +0 -7
package/CHANGELOG.md CHANGED
@@ -1,28 +1,55 @@
1
- ## 3.6.0-next.2
1
+ ## 3.3.11-next.1
2
+
3
+ ### 🚀 Features
4
+
5
+ - **product-import-export-plugin:** backport id export field + customExportColumns to 3.5 line (3.3.11-next.0) ([#22](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/pull/22))
6
+
7
+ ## 3.3.11-next.0
8
+
9
+ ### 🚀 Features
10
+
11
+ - **product-import-export-plugin:** add progress reporting to product export process ([ed6220e](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/ed6220e))
12
+ - **product-import-export-plugin:** optimize product export process and stock level retrieval ([d281929](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/d281929))
13
+ - **product-import-export-plugin:** enhance email notification and import/export functionality ([c133dc5](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/c133dc5))
14
+ - **product-import-export-plugin:** enforce import/export acceptance criteria and enhance documentation ([b1a93b6](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/b1a93b6))
15
+ - **product-import-export-plugin:** update pre-version command and clean up export artifacts ([1cde024](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/1cde024))
16
+ - **product-import-export-plugin:** optimize asset handling and caching in product importer ([9d2888e](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/9d2888e))
17
+ - **product-import-export-plugin:** enhance testing and export functionality ([1764eb2](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/1764eb2))
18
+
19
+ ### 🩹 Fixes
20
+
21
+ - **product-import-export-plugin:** ensure tax category is always assigned to product variants ([276bed5](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/276bed5))
22
+ - **product-import-export-plugin:** poll exports list and restore featured asset on import ([2c61b48](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/2c61b48))
23
+
24
+ ## 3.3.10-next.6
2
25
 
3
26
  ### 🩹 Fixes
4
27
 
5
- - **product-import-export-plugin:** poll exports list and restore featured asset on import ([644099a](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/644099a))
28
+ - **product-import-export-plugin:** ensure tax category is always assigned to product variants ([276bed5](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/276bed5))
6
29
 
7
- ## 3.6.0-next.1
30
+ ## 3.3.10-next.5
8
31
 
9
32
  ### 🚀 Features
10
33
 
11
- - **product-import-export-plugin:** integrate active channel management into export and import components ([1d3eef1](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/1d3eef1))
34
+ - **product-import-export-plugin:** add progress reporting to product export process ([ed6220e](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/ed6220e))
12
35
 
13
- ## 3.6.0-next.0
36
+ ## 3.3.10-next.4
14
37
 
15
38
  ### 🚀 Features
16
39
 
17
- - **product-import-export-plugin:** add installation ID and enhance e2e database management ([78eeffb](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/78eeffb))
18
- - **product-import-export-plugin:** add popover help for export asset options ([7aa8373](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/7aa8373))
19
- - **product-import-export-plugin:** implement export configuration panel and enhance export dialog ([d2e1f34](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/d2e1f34))
20
- - **product-import-export-plugin:** enhance product export functionality and update tests ([de56d44](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/de56d44))
21
- - **product-import-export-plugin:** update dependencies and enhance import/export functionality ([9c78665](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/9c78665))
40
+ - **product-import-export-plugin:** optimize product export process and stock level retrieval ([d281929](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/d281929))
41
+
42
+ ## 3.3.10-next.3
43
+
44
+ ### 🚀 Features
45
+
46
+ - **product-import-export-plugin:** optimize product export process and stock level retrieval ([d281929](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/d281929))
47
+
48
+ ## 3.3.10-next.2
22
49
 
23
50
  ### 🩹 Fixes
24
51
 
25
- - **product-import-export-plugin:** update dashboard and export settings screenshots ([2129b39](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/2129b39))
52
+ - **product-import-export-plugin:** poll exports list and restore featured asset on import ([2c61b48](https://github.com/WeAreHausTech/haus-tech-vendure-plugins-public/commit/2c61b48))
26
53
 
27
54
  ## 3.3.2-next.2
28
55
 
package/README.mdx CHANGED
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: product-import-export-plugin
3
- title: Product Import & Export
3
+ title: Product Import & Export Plugin
4
4
  description: Vendure plugin for importing and exporting product data via CSV.
5
- version: 3.6.0-next.2
5
+ version: 3.3.1
6
6
  tags:
7
7
  - vendure
8
8
  - plugin
@@ -19,16 +19,16 @@ A Vendure plugin for importing and exporting product data via CSV. Supports bulk
19
19
 
20
20
  ## Features
21
21
 
22
- - **Import** – Bulk upload products from CSV with validation, custom fields, assets, facets, and variants
23
- - **Export** – Export products to CSV with selected fields; export all products or a selection
24
- - **Storage strategies** – Store exported files in S3 or locally on disk (with automatic fallback)
25
- - **UI** – Admin UI and Dashboard integration for import and export
22
+ * **Import** – Bulk upload products from CSV with validation, custom fields, assets, facets, and variants
23
+ * **Export** – Export products to CSV with selected fields; export all products or a selection
24
+ * **Storage strategies** – Store exported files in S3 or locally on disk (with automatic fallback)
25
+ * **UI** – Admin UI and Dashboard integration for import and export
26
26
 
27
27
  ![Dashboard UI](assets/Screenshot-dashboard-ui.png)
28
28
 
29
29
  ## Compatibility
30
30
 
31
- Vendure **^3.6.0**
31
+ Vendure **^2.0.0** or **^3.0.0**
32
32
 
33
33
  ## Getting started
34
34
 
@@ -65,13 +65,13 @@ export const config = {
65
65
 
66
66
  ### Import options
67
67
 
68
- | Option | Type | Default | Description |
69
- | ------------------------ | -------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------- |
70
- | `updateProductSlug` | `boolean` | `true` | Update product slug from the `name` field in the CSV |
71
- | `restoreSoftDeleted` | `boolean` | `true` | Restore soft-deleted products/variants found by id or SKU during import. If `false`, new products will be created instead. |
72
- | `storageStrategy` | `ImportJobStorageStrategy` | local disk | Strategy instance for queued import file storage and retrieval. |
73
- | `storageStrategyFactory` | `(injector: Injector) => ImportJobStorageStrategy` | `undefined` | Factory for DI-aware strategy creation (recommended for S3/remote storage). |
74
- | `importJobStorage` | `'local' \| 's3'` | `'local'` | Deprecated compatibility flag. Prefer `storageStrategy` / `storageStrategyFactory`. |
68
+ | Option | Type | Default | Description |
69
+ | ------------------------ | ----------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
70
+ | `updateProductSlug` | `boolean` | `true` | Update product slug from the `name` field in the CSV |
71
+ | `restoreSoftDeleted` | `boolean` | `true` | Restore soft-deleted products/variants found by id or SKU during import. If `false`, new products will be created instead. |
72
+ | `storageStrategy` | `ImportJobStorageStrategy` | local disk | Strategy instance for queued import file storage and retrieval. |
73
+ | `storageStrategyFactory` | `(injector: Injector) => ImportJobStorageStrategy` | `undefined` | Factory for DI-aware strategy creation (recommended for S3/remote storage). |
74
+ | `importJobStorage` | `'local' \| 's3'` | `'local'` | Deprecated compatibility flag. Prefer `storageStrategy` / `storageStrategyFactory`. |
75
75
 
76
76
  Available import storage strategies:
77
77
 
@@ -87,6 +87,7 @@ Available import storage strategies:
87
87
  | `defaultExportAssetsAs` | `'url' \| 'json'` | `'url'` | Default asset export format |
88
88
  | `defaultExportFields` | `string[]` | See above | Fields that will be pre-selected in the export UI |
89
89
  | `requiredExportFields` | `string[]` | `['name', 'sku']` | Fields that must always be included |
90
+ | `customExportColumns` | `CustomExportColumn[]`| `undefined` | Extra CSV columns resolved per variant row. See [Custom export columns](#custom-export-columns) below. |
90
91
  | `storageStrategy` | `'s3' \| 'disk'` | `'disk'` | Where exported files are stored |
91
92
  | `s3Options` | `object` | `undefined` | S3 configuration (required when `storageStrategy` is `'s3'`) |
92
93
 
@@ -94,8 +95,41 @@ Available import storage strategies:
94
95
 
95
96
  The plugin supports configurable storage for exported files:
96
97
 
97
- - **S3** – Stores export files in an S3-compatible bucket
98
- - **Disk (default)** – Saves files locally on the server
98
+ * **S3** – Stores export files in an S3-compatible bucket
99
+ * **Disk (default)** – Saves files locally on the server
100
+
101
+ ### Custom export columns
102
+
103
+ Add columns to the exported CSV whose value is computed per variant row, for example a permalink built from the product slug and variant SKU.
104
+
105
+ ```typescript
106
+ export const config = {
107
+ plugins: [
108
+ ProductImportExportPlugin.init({
109
+ importOptions: {},
110
+ exportOptions: {
111
+ customExportColumns: [
112
+ {
113
+ name: 'permalink',
114
+ onExportStart: () => {
115
+ // Optional. Runs once per export job, before the first resolve() call.
116
+ // Use it to reset any per-export cache or counter.
117
+ },
118
+ resolve: (ctx, injector, product, variant) =>
119
+ `https://shop.example.com/${product.slug}?sku=${variant.sku}`,
120
+ },
121
+ ],
122
+ },
123
+ }),
124
+ ],
125
+ }
126
+ ```
127
+
128
+ - **`name`** – Must be non-empty, must not contain `:` (colon-suffixed headers are reserved for translated columns), must not collide with a built-in export field name, and must be unique among `customExportColumns` entries. These rules are validated when the plugin is initialised, so a misconfigured column fails fast at startup rather than mid-export.
129
+ - **`onExportStart`** – Optional. Awaited once per export job, before the first `resolve` call.
130
+ - **`resolve(ctx, injector, product, variant)`** – Called once per exported variant row. Its return value is written to the cell (`String(value)`, or an empty cell for `null`/`undefined`). Use `injector` to pull in Vendure services via DI.
131
+ - A custom column only appears in the export when its `name` is included in the selected export fields, both in the header row and in the request; otherwise it is skipped entirely.
132
+ - **Fail-soft** – If `resolve` throws, the plugin logs a warning and writes an empty cell for that row instead of failing the whole export.
99
133
 
100
134
  ## CSV Format for Import
101
135
 
@@ -106,21 +140,22 @@ The plugin supports configurable storage for exported files:
106
140
 
107
141
  ### Optional columns
108
142
 
109
- | Column | Format | Example |
110
- | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
111
- | `name`, `slug`, `description` | Text, or `name:en`, `name:sv` for translations | `My Product` |
112
- | `assets` | Pipe-separated URLs, or JSON `[{"url":"...","name":"..."}]` | `https://example.com/1.jpg\|https://example.com/2.jpg` |
113
- | `facets` | `facet:value` pairs, pipe-separated | `Brand:Acme\|Category:Electronics` |
114
- | `optionGroups` | Pipe-separated group names. Use `name:code` to share a group across products (see [Sharing option groups](#sharing-option-groups)) | `Size\|Color` or `size:shoe-size` |
115
- | `optionValues` | Pipe-separated values (order matches option groups) | `Large\|Blue` |
116
- | `price` | Number (in smallest currency unit) | `9999` |
117
- | `taxCategory` | Tax category name | `standard` |
118
- | `stockOnHand` | Number | `100` |
119
- | `trackInventory` | `true` or `false` | `true` |
120
- | `variantAssets` | Same format as `assets` | `https://example.com/variant.jpg` |
121
- | `variantFacets` | Same format as `facets` | `Material:Cotton` |
122
- | `enabled` | `true` or `false` | `true` |
123
- | Custom fields | Column name = custom field name; value depends on field type | Add columns for any Product or ProductVariant custom fields defined in your Vendure config |
143
+ | Column | Format | Example |
144
+ | ----------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
145
+ | `id` | Vendure product id | `42` |
146
+ | `name`, `slug`, `description` | Text, or `name:en`, `name:sv` for translations | `My Product` |
147
+ | `assets` | Pipe-separated URLs, or JSON `[{"url":"...","name":"..."}]` | `https://example.com/1.jpg\|https://example.com/2.jpg` |
148
+ | `facets` | `facet:value` pairs, pipe-separated | `Brand:Acme\|Category:Electronics` |
149
+ | `optionGroups` | Pipe-separated group names | `Size\|Color` |
150
+ | `optionValues` | Pipe-separated values (order matches option groups) | `Large\|Blue` |
151
+ | `price` | Number (in smallest currency unit) | `9999` |
152
+ | `taxCategory` | Tax category name | `standard` |
153
+ | `stockOnHand` | Number | `100` |
154
+ | `trackInventory` | `true` or `false` | `true` |
155
+ | `variantAssets` | Same format as `assets` | `https://example.com/variant.jpg` |
156
+ | `variantFacets` | Same format as `facets` | `Material:Cotton` |
157
+ | `enabled` | `true` or `false` | `true` |
158
+ | Custom fields | Column name = custom field name; value depends on field type | Add columns for any Product or ProductVariant custom fields defined in your Vendure config |
124
159
 
125
160
  #### Import behavior rules
126
161
 
@@ -128,28 +163,6 @@ The plugin supports configurable storage for exported files:
128
163
  - If a column exists in the header but the cell is empty, that field is explicitly cleared.
129
164
  - For products with more than one variant, `optionGroups` and `optionValues` are required.
130
165
 
131
- #### Sharing option groups
132
-
133
- By default, each product gets its own option groups. To **share an option group** across
134
- multiple products (e.g. a common "Size" group for all shoes), use the `name:code` syntax in the
135
- `optionGroups` column: `size:shoe-size`. All products that reference the same code will share
136
- a single option group. Products using a plain name (e.g. just `size`) will each get their own
137
- independent option group.
138
-
139
- ```csv
140
- ...optionGroups , optionValues , ...
141
- # Each shoe product shares a single "shoe-size" option group:
142
- "size:shoe-size" , Small , ...
143
- "size:shoe-size" , Medium , ...
144
- # This product gets its own independent "size" group:
145
- "size" , 4GB , ...
146
- ```
147
-
148
- The first product to reference a given code defines the full set of option values for that
149
- shared group; subsequent products may use any subset of those values. Codes are language-
150
- agnostic — only the `name` portion before the colon is translated per language column
151
- (`optionGroups:en`, `optionGroups:sv`, etc.).
152
-
153
166
  #### Multi-language support
154
167
 
155
168
  Use language-specific columns by suffixing the field name with the language code. The language codes must match those configured in your Vendure instance (e.g. `en`, `sv`).
@@ -198,8 +211,9 @@ The Admin UI offers basic import and export. Some features such as the export-al
198
211
  1. In the Admin UI or Dashboard, select products to export (or use bulk export).
199
212
  2. Configure export fields (assets, facets, custom fields, etc.).
200
213
  - For products with more than one variant, `optionGroups` and `optionValues` must be included.
201
- - `productId` is not available as a selectable export field.
214
+ - `id` (the Vendure product id) is available as a selectable export field. It is written after the translated `name`/`slug`/`description` columns, so it is never CSV column 0, since import treats column 0 positionally as a product id for by-id matching.
202
215
  - If `customFields` are not selected, no custom-field columns are written to the CSV.
216
+ - If `customExportColumns` is configured, only the columns whose `name` is selected are written to the CSV.
203
217
  3. Choose asset format: URL or JSON.
204
218
  4. Start the export (it is added to a job queue and runs in the background).
205
219
  5. Download the CSV when the export is complete. Your downloaded files will be listed in the export view.
@@ -216,11 +230,7 @@ Note: templates for `@vendure/email-plugin` should be valid MJML.
216
230
 
217
231
  ```typescript
218
232
  import path from 'path'
219
- import {
220
- DefaultEmailPlugin,
221
- FileBasedTemplateLoader,
222
- defaultEmailHandlers,
223
- } from '@vendure/email-plugin'
233
+ import { DefaultEmailPlugin, FileBasedTemplateLoader, defaultEmailHandlers } from '@vendure/email-plugin'
224
234
  import {
225
235
  withProductExportedHandler,
226
236
  withProductExportedTemplateFallback,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haus-tech/product-import-export-plugin",
3
- "version": "3.6.1",
3
+ "version": "3.6.3",
4
4
  "description": "A Vendure plugin for importing and exporting products using a CSV file",
5
5
  "author": "Haus Tech",
6
6
  "repository": {
@@ -35,7 +35,6 @@
35
35
  "files": [
36
36
  "src",
37
37
  "assets",
38
- "README.md",
39
38
  "README.mdx",
40
39
  "CHANGELOG.md"
41
40
  ],
@@ -47,21 +46,20 @@
47
46
  },
48
47
  "dependencies": {
49
48
  "@aws-sdk/client-s3": "^3.744.0",
50
- "axios": "^1.16.1",
49
+ "axios": "^1.7.0",
51
50
  "bottleneck": "^2.19.5",
52
51
  "fs-extra": "^11.2.0",
53
- "lodash": "^4.18.1"
52
+ "lodash": "^4.17.21"
54
53
  },
55
54
  "devDependencies": {
56
55
  "@types/fs-extra": "^11.0.4",
57
- "@vendure/email-plugin": "3.6.3",
58
- "csv-parse": "^6.0.0",
56
+ "csv-parse": "^5.6.0",
59
57
  "csv-stringify": "^6.6.0"
60
58
  },
61
59
  "peerDependencies": {
62
- "@vendure/core": "^3.6.0",
63
- "@vendure/email-plugin": "^3.6.0",
64
- "csv-parse": "^6.0.0",
60
+ "@vendure/core": "^2.0.0 || ^3.0.0",
61
+ "@vendure/email-plugin": "^2.0.0 || ^3.0.0",
62
+ "csv-parse": "^5.5.6",
65
63
  "csv-stringify": "^6.5.1",
66
64
  "slug": "^9.1.0"
67
65
  },
@@ -1,8 +1,38 @@
1
1
  import { RequestContext } from '@vendure/core';
2
2
  import { PluginInitOptions } from '../types';
3
+ /**
4
+ * The subset of plugin options that the admin UIs need. This is an explicit
5
+ * allow-list: the raw options object carries storage strategies (and therefore
6
+ * cloud credentials) and MUST never be serialized to a client.
7
+ */
8
+ export type PublicPluginConfig = {
9
+ importOptions: {
10
+ visibleOptions?: PluginInitOptions['importOptions']['visibleOptions'];
11
+ defaultOptions: {
12
+ updateProductSlug?: boolean;
13
+ restoreSoftDeleted?: boolean;
14
+ };
15
+ };
16
+ exportOptions: {
17
+ defaultFileName?: string;
18
+ exportAssetsAsOptions?: PluginInitOptions['exportOptions']['exportAssetsAsOptions'];
19
+ defaultExportAssetsAs?: PluginInitOptions['exportOptions']['defaultExportAssetsAs'];
20
+ defaultExportFields?: PluginInitOptions['exportOptions']['defaultExportFields'];
21
+ requiredExportFields?: PluginInitOptions['exportOptions']['requiredExportFields'];
22
+ customExportColumns?: Array<{
23
+ name: string;
24
+ }>;
25
+ };
26
+ };
27
+ export type PublicChannelInfo = {
28
+ code: string;
29
+ defaultLanguageCode: string;
30
+ availableLanguageCodes: string[];
31
+ };
32
+ export declare function toPublicPluginConfig(options: PluginInitOptions): PublicPluginConfig;
3
33
  export declare class ProductImportExportPluginController {
4
34
  private options;
5
35
  constructor(options: PluginInitOptions);
6
- getConfig(): PluginInitOptions;
7
- getChannel(ctx: RequestContext): import("@vendure/core").Channel;
36
+ getConfig(): PublicPluginConfig;
37
+ getChannel(ctx: RequestContext): PublicChannelInfo;
8
38
  }
@@ -13,34 +13,60 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.ProductImportExportPluginController = void 0;
16
+ exports.toPublicPluginConfig = toPublicPluginConfig;
16
17
  const core_1 = require("@vendure/core");
17
18
  const common_1 = require("@nestjs/common");
18
19
  const constants_1 = require("../constants");
20
+ function toPublicPluginConfig(options) {
21
+ const { importOptions, exportOptions } = options;
22
+ return {
23
+ importOptions: {
24
+ visibleOptions: importOptions?.visibleOptions,
25
+ // Pick fields one by one: the ImportOptions type also permits storage
26
+ // strategies inside defaultOptions, so a raw copy could leak credentials.
27
+ defaultOptions: {
28
+ updateProductSlug: importOptions?.defaultOptions?.updateProductSlug,
29
+ restoreSoftDeleted: importOptions?.defaultOptions?.restoreSoftDeleted,
30
+ },
31
+ },
32
+ exportOptions: {
33
+ defaultFileName: exportOptions?.defaultFileName,
34
+ exportAssetsAsOptions: exportOptions?.exportAssetsAsOptions,
35
+ defaultExportAssetsAs: exportOptions?.defaultExportAssetsAs,
36
+ defaultExportFields: exportOptions?.defaultExportFields,
37
+ requiredExportFields: exportOptions?.requiredExportFields,
38
+ customExportColumns: exportOptions?.customExportColumns?.map(({ name }) => ({ name })),
39
+ },
40
+ };
41
+ }
19
42
  let ProductImportExportPluginController = class ProductImportExportPluginController {
20
43
  options;
21
44
  constructor(options) {
22
45
  this.options = options;
23
46
  }
24
47
  getConfig() {
25
- return this.options;
48
+ return toPublicPluginConfig(this.options);
26
49
  }
27
50
  getChannel(ctx) {
28
- return ctx.channel;
51
+ const { code, defaultLanguageCode, availableLanguageCodes } = ctx.channel;
52
+ return { code, defaultLanguageCode, availableLanguageCodes };
29
53
  }
30
54
  };
31
55
  exports.ProductImportExportPluginController = ProductImportExportPluginController;
32
56
  __decorate([
33
57
  (0, common_1.Get)('config'),
58
+ (0, core_1.Allow)(core_1.Permission.ReadCatalog, core_1.Permission.ReadProduct),
34
59
  __metadata("design:type", Function),
35
60
  __metadata("design:paramtypes", []),
36
- __metadata("design:returntype", void 0)
61
+ __metadata("design:returntype", Object)
37
62
  ], ProductImportExportPluginController.prototype, "getConfig", null);
38
63
  __decorate([
39
64
  (0, common_1.Get)('channel'),
65
+ (0, core_1.Allow)(core_1.Permission.ReadCatalog, core_1.Permission.ReadProduct),
40
66
  __param(0, (0, core_1.Ctx)()),
41
67
  __metadata("design:type", Function),
42
68
  __metadata("design:paramtypes", [core_1.RequestContext]),
43
- __metadata("design:returntype", void 0)
69
+ __metadata("design:returntype", Object)
44
70
  ], ProductImportExportPluginController.prototype, "getChannel", null);
45
71
  exports.ProductImportExportPluginController = ProductImportExportPluginController = __decorate([
46
72
  (0, common_1.Controller)('product-import-export'),
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plugin/src/api/plugin.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wCAAmD;AACnD,2CAAwD;AACxD,4CAAmE;AAI5D,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IACoB;IAAlE,YAAkE,OAA0B;QAA1B,YAAO,GAAP,OAAO,CAAmB;IAAG,CAAC;IAGhG,SAAS;QACP,OAAO,IAAI,CAAC,OAAO,CAAA;IACrB,CAAC;IAGD,UAAU,CAAQ,GAAmB;QACnC,OAAO,GAAG,CAAC,OAAO,CAAA;IACpB,CAAC;CACF,CAAA;AAZY,kFAAmC;AAI9C;IADC,IAAA,YAAG,EAAC,QAAQ,CAAC;;;;oEAGb;AAGD;IADC,IAAA,YAAG,EAAC,SAAS,CAAC;IACH,WAAA,IAAA,UAAG,GAAE,CAAA;;qCAAM,qBAAc;;qEAEpC;8CAXU,mCAAmC;IAD/C,IAAA,mBAAU,EAAC,uBAAuB,CAAC;IAErB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;;GAD9C,mCAAmC,CAY/C"}
1
+ {"version":3,"file":"plugin.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plug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AAmC;AAK9C;IAFC,IAAA,YAAG,EAAC,QAAQ,CAAC;IACb,IAAA,YAAK,EAAC,iBAAU,CAAC,WAAW,EAAE,iBAAU,CAAC,WAAW,CAAC;;;;oEAGrD;AAID;IAFC,IAAA,YAAG,EAAC,SAAS,CAAC;IACd,IAAA,YAAK,EAAC,iBAAU,CAAC,WAAW,EAAE,iBAAU,CAAC,WAAW,CAAC;IAC1C,WAAA,IAAA,UAAG,GAAE,CAAA;;qCAAM,qBAAc;;qEAGpC;8CAdU,mCAAmC;IAD/C,IAAA,mBAAU,EAAC,uBAAuB,CAAC;IAErB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;;GAD9C,mCAAmC,CAe/C"}
@@ -11,6 +11,7 @@ export declare class ProductExportController {
11
11
  private productExportQueueService;
12
12
  constructor(options: PluginInitOptions, exportStorageStrategy: ExportStorageStrategy, productExportService: ProductExportService, productExportQueueService: ProductExportQueueService);
13
13
  private validateExportFileName;
14
+ private validateNameFieldPresent;
14
15
  private validateOptionColumnsForMultiVariantExport;
15
16
  exportProducts(ctx: RequestContext, res: Response, fileName: string, customFields: string, exportAssetsAs: 'url' | 'json', selectedExportFields: string, selection: ID[]): Promise<void>;
16
17
  exportAllProducts(ctx: RequestContext, fileName: string, customFields: string, exportAssetsAs: 'url' | 'json', selectedExportFields: string): Promise<{
@@ -46,6 +46,15 @@ let ProductExportController = class ProductExportController {
46
46
  }
47
47
  return trimmed;
48
48
  }
49
+ validateNameFieldPresent(selectedExportFields) {
50
+ const selected = new Set(selectedExportFields
51
+ .split(',')
52
+ .map((field) => field.trim())
53
+ .filter(Boolean));
54
+ if (!selected.has('name')) {
55
+ throw new common_1.UnprocessableEntityException('name is a required export field');
56
+ }
57
+ }
49
58
  async validateOptionColumnsForMultiVariantExport(ctx, selectedExportFields, selectionIds) {
50
59
  const selected = new Set(selectedExportFields
51
60
  .split(',')
@@ -84,6 +93,7 @@ let ProductExportController = class ProductExportController {
84
93
  if (!customFields) {
85
94
  customFields = '';
86
95
  }
96
+ this.validateNameFieldPresent(selectedExportFields);
87
97
  await this.validateOptionColumnsForMultiVariantExport(ctx, selectedExportFields, selection);
88
98
  const job = await this.productExportQueueService.triggerExportWithSelection(ctx, fileName, customFields, exportAssetsAs, selectedExportFields, selection);
89
99
  if (!job || !job.id) {
@@ -114,6 +124,7 @@ let ProductExportController = class ProductExportController {
114
124
  if (!customFields) {
115
125
  customFields = '';
116
126
  }
127
+ this.validateNameFieldPresent(selectedExportFields);
117
128
  await this.validateOptionColumnsForMultiVariantExport(ctx, selectedExportFields);
118
129
  const job = await this.productExportQueueService.triggerExport(ctx, fileName, customFields, exportAssetsAs, selectedExportFields, true);
119
130
  return {
@@ -176,6 +187,7 @@ let ProductExportController = class ProductExportController {
176
187
  exports.ProductExportController = ProductExportController;
177
188
  __decorate([
178
189
  (0, common_1.Post)('export'),
190
+ (0, core_1.Allow)(core_1.Permission.UpdateCatalog, core_1.Permission.UpdateProduct),
179
191
  __param(0, (0, core_1.Ctx)()),
180
192
  __param(1, (0, common_1.Res)()),
181
193
  __param(2, (0, common_1.Query)('fileName')),
@@ -189,6 +201,7 @@ __decorate([
189
201
  ], ProductExportController.prototype, "exportProducts", null);
190
202
  __decorate([
191
203
  (0, common_1.Post)('export-all'),
204
+ (0, core_1.Allow)(core_1.Permission.UpdateCatalog, core_1.Permission.UpdateProduct),
192
205
  __param(0, (0, core_1.Ctx)()),
193
206
  __param(1, (0, common_1.Query)('fileName')),
194
207
  __param(2, (0, common_1.Query)('customFields')),
@@ -200,6 +213,7 @@ __decorate([
200
213
  ], ProductExportController.prototype, "exportAllProducts", null);
201
214
  __decorate([
202
215
  (0, common_1.Get)('download/:fileName'),
216
+ (0, core_1.Allow)(core_1.Permission.ReadCatalog, core_1.Permission.ReadProduct),
203
217
  __param(0, (0, core_1.Ctx)()),
204
218
  __param(1, (0, common_1.Res)()),
205
219
  __param(2, (0, common_1.Param)('fileName')),
@@ -209,6 +223,7 @@ __decorate([
209
223
  ], ProductExportController.prototype, "downloadExport", null);
210
224
  __decorate([
211
225
  (0, common_1.Delete)('delete/:fileName'),
226
+ (0, core_1.Allow)(core_1.Permission.UpdateCatalog, core_1.Permission.UpdateProduct),
212
227
  __param(0, (0, core_1.Ctx)()),
213
228
  __param(1, (0, common_1.Param)('fileName')),
214
229
  __metadata("design:type", Function),
@@ -217,6 +232,7 @@ __decorate([
217
232
  ], ProductExportController.prototype, "deleteExport", null);
218
233
  __decorate([
219
234
  (0, common_1.Post)('custom-fields'),
235
+ (0, core_1.Allow)(core_1.Permission.ReadCatalog, core_1.Permission.ReadProduct),
220
236
  __param(0, (0, core_1.Ctx)()),
221
237
  __param(1, (0, common_1.Body)()),
222
238
  __metadata("design:type", Function),
@@ -225,6 +241,7 @@ __decorate([
225
241
  ], ProductExportController.prototype, "getCustomFields", null);
226
242
  __decorate([
227
243
  (0, common_1.Get)('exported-files'),
244
+ (0, core_1.Allow)(core_1.Permission.ReadCatalog, core_1.Permission.ReadProduct),
228
245
  __param(0, (0, core_1.Ctx)()),
229
246
  __metadata("design:type", Function),
230
247
  __metadata("design:paramtypes", [core_1.RequestContext]),
@@ -1 +1 @@
1
- {"version":3,"file":"product-export.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plugin/src/api/product-export.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wCAAuD;AACvD,2CAWuB;AAEvB,+EAAyE;AACzE,2FAAoF;AACpF,4CAA4F;AAKrF,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAEsB;IACb;IACjC;IACA;IAJV,YACwD,OAA0B,EACvC,qBAA4C,EAC7E,oBAA0C,EAC1C,yBAAoD;QAHN,YAAO,GAAP,OAAO,CAAmB;QACvC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC7E,yBAAoB,GAApB,oBAAoB,CAAsB;QAC1C,8BAAyB,GAAzB,yBAAyB,CAA2B;IAC3D,CAAC;IAEI,sBAAsB,CAAC,QAAgB;QAC7C,MA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AAY,CAAC;IAEhB,WAAA,IAAA,UAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;IACjB,WAAA,IAAA,cAAK,EAAC,cAAc,CAAC,CAAA;IACrB,WAAA,IAAA,cAAK,EAAC,gBAAgB,CAAC,CAAA;IACvB,WAAA,IAAA,cAAK,EAAC,sBAAsB,CAAC,CAAA;;qCAJlB,qBAAc;;gEA2C3B;AAGK;IADL,IAAA,YAAG,EAAC,oBAAoB,CAAC;IAEvB,WAAA,IAAA,UAAG,GAAE,CAAA;IACL,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;qCAFN,qBAAc;;6DAiB3B;AAGK;IADL,IAAA,eAAM,EAAC,kBAAkB,CAAC;IACP,WAAA,IAAA,UAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;qCAAlC,qBAAc;;2DAY5C;AAGK;IADL,IAAA,aAAI,EAAC,eAAe,CAAC;IACC,WAAA,IAAA,UAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAvB,qBAAc;;8DAE/C;AAGK;IADL,IAAA,YAAG,EAAC,gBAAgB,CAAC;IACA,WAAA,IAAA,UAAG,GAAE,CAAA;;qCAAM,qBAAc;;6DAM9C;kCAzNU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAGxB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;IAC5C,WAAA,IAAA,eAAM,EAAC,mCAAuB,CAAC,CAAA;qDACF,6CAAoB;QACf,wDAAyB;GALnD,uBAAuB,CAoOnC"}
1
+ {"version":3,"file":"product-export.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plugin/src/api/product-export.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wCAA0E;AAC1E,2CAWuB;AAEvB,+EAAyE;AAC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CAJlB,qBAAc;;gEA4C3B;AAIK;IAFL,IAAA,YAAG,EAAC,oBAAoB,CAAC;IACzB,IAAA,YAAK,EAAC,iBAAU,CAAC,WAAW,EAAE,iBAAU,CAAC,WAAW,CAAC;IAEnD,WAAA,IAAA,UAAG,GAAE,CAAA;IACL,WAAA,IAAA,YAAG,GAAE,CAAA;IACL,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;qCAFN,qBAAc;;6DAiB3B;AAIK;IAFL,IAAA,eAAM,EAAC,kBAAkB,CAAC;IAC1B,IAAA,YAAK,EAAC,iBAAU,CAAC,aAAa,EAAE,iBAAU,CAAC,aAAa,CAAC;IACtC,WAAA,IAAA,UAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,cAAK,EAAC,UAAU,CAAC,CAAA;;qCAAlC,qBAAc;;2DAY5C;AAIK;IAFL,IAAA,aAAI,EAAC,eAAe,CAAC;IACrB,IAAA,YAAK,EAAC,iBAAU,CAAC,WAAW,EAAE,iBAAU,CAAC,WAAW,CAAC;IAC/B,WAAA,IAAA,UAAG,GAAE,CAAA;IAAuB,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAvB,qBAAc;;8DAE/C;AAIK;IAFL,IAAA,YAAG,EAAC,gBAAgB,CAAC;IACrB,IAAA,YAAK,EAAC,iBAAU,CAAC,WAAW,EAAE,iBAAU,CAAC,WAAW,CAAC;IAChC,WAAA,IAAA,UAAG,GAAE,CAAA;;qCAAM,qBAAc;;6DAM9C;kCA9OU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAGxB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;IAC5C,WAAA,IAAA,eAAM,EAAC,mCAAuB,CAAC,CAAA;qDACF,6CAAoB;QACf,wDAAyB;GALnD,uBAAuB,CAyPnC"}
@@ -45,6 +45,7 @@ let ProductImportController = class ProductImportController {
45
45
  exports.ProductImportController = ProductImportController;
46
46
  __decorate([
47
47
  (0, common_1.Post)('/upload'),
48
+ (0, core_1.Allow)(core_1.Permission.UpdateCatalog, core_1.Permission.UpdateProduct),
48
49
  (0, common_1.UseInterceptors)((0, platform_express_1.FileInterceptor)('file')),
49
50
  __param(0, (0, core_1.Ctx)()),
50
51
  __param(1, (0, common_1.UploadedFile)()),
@@ -1 +1 @@
1
- {"version":3,"file":"product-import.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plugin/src/api/product-import.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wCAAiE;AACjE,2CAQuB;AAEvB,+DAA0D;AAC1D,4CAAmE;AAEnE,+EAAyE;AAGlE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAEsB;IAC9C;IAFV,YACwD,OAA0B,EACxE,OAA6B;QADiB,YAAO,GAAP,OAAO,CAAmB;QACxE,YAAO,GAAP,OAAO,CAAsB;IACpC,CAAC;IAIE,AAAN,KAAK,CAAC,cAAc,CACX,GAAmB,EACV,IAAyB,EAEzC,oBAAuC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc;QAC9E,EAAE,iBAAyB,IAAI,MAAM,EACjB,YAA0B,EACtB,gBAAkC,EAE5D,GAAa;QAEb,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QACjD,CAAC;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAA;QACzD,CAAC;QAED,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,CAC5B,GAAG,EACH,IAAI,EACJ,iBAAiB,KAAK,MAAM,EAC5B,YAAY,EACZ,gBAAgB,CACjB,CAAA;YACD,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAA;QAC3D,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACxB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAE,KAAe,EAAE,OAAO,IAAI,uBAAuB,CAAC,CAAA;QACnF,CAAC;IACH,CAAC;CACF,CAAA;AAxCY,0DAAuB;AAQ5B;IAFL,IAAA,aAAI,EAAC,SAAS,CAAC;IACf,IAAA,wBAAe,EAAC,IAAA,kCAAe,EAAC,MAAM,CAAC,CAAC;IAEtC,WAAA,IAAA,UAAG,GAAE,CAAA;IACL,WAAA,IAAA,qBAAY,GAAE,CAAA;IACd,WAAA,IAAA,aAAI,EAAC,mBAAmB,CAAC,CAAA;IAGzB,WAAA,IAAA,aAAI,EAAC,cAAc,CAAC,CAAA;IACpB,WAAA,IAAA,aAAI,EAAC,kBAAkB,CAAC,CAAA;IACxB,WAAA,IAAA,YAAG,GAAE,CAAA;;qCAPM,qBAAc;;6DA8B3B;kCAvCU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAGxB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;6CAC5B,6CAAoB;GAH5B,uBAAuB,CAwCnC"}
1
+ {"version":3,"file":"product-import.controller.js","sourceRoot":"","sources":["../../../../../packages/product-import-export-plugin/src/api/product-import.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wCAAoF;AACpF,2CAQuB;AAEvB,+DAA0D;AAC1D,4CAAmE;AAEnE,+EAAyE;AAGlE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAEsB;IAC9C;IAFV,YACwD,OAA0B,EACxE,OAA6B;QADiB,YAAO,GAAP,OAAO,CAAmB;QACxE,YAAO,GAAP,OAAO,CAAsB;IACpC,CAAC;IAKE,AAAN,KAAK,CAAC,cAAc,CACX,GAAmB,EACV,IAAyB,EAEzC,oBAAuC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,cAAc;QAC9E,EAAE,iB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CU,uBAAuB;IADnC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;IAGxB,WAAA,IAAA,eAAM,EAAC,gDAAoC,CAAC,CAAA;6CAC5B,6CAAoB;GAH5B,uBAAuB,CAyCnC"}
@@ -22,7 +22,6 @@ export function ExportProductsBulkAction({
22
22
  return (
23
23
  <>
24
24
  <DataTableBulkActionItem
25
- closeOnClick={false}
26
25
  onClick={() => setDialogOpen(true)}
27
26
  label="Export products to CSV"
28
27
  icon={DownloadIcon}