@vendure/core 2.1.0-next.3 → 2.1.0-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/common/request-context.d.ts +1 -1
- package/dist/api/common/request-context.js +1 -1
- package/dist/api/decorators/allow.decorator.d.ts +2 -2
- package/dist/api/decorators/allow.decorator.js +2 -2
- package/dist/api/decorators/api.decorator.d.ts +1 -1
- package/dist/api/decorators/api.decorator.js +1 -1
- package/dist/api/decorators/relations.decorator.d.ts +3 -3
- package/dist/api/decorators/relations.decorator.js +3 -3
- package/dist/api/decorators/request-context.decorator.d.ts +1 -1
- package/dist/api/decorators/request-context.decorator.js +1 -1
- package/dist/api/decorators/transaction.decorator.d.ts +2 -2
- package/dist/api/decorators/transaction.decorator.js +1 -1
- package/dist/api/decorators/transaction.decorator.js.map +1 -1
- package/dist/api/middleware/transaction-interceptor.js.map +1 -1
- package/dist/bootstrap.d.ts +3 -3
- package/dist/bootstrap.js +3 -3
- package/dist/common/configurable-operation.d.ts +5 -5
- package/dist/common/configurable-operation.js +1 -1
- package/dist/common/error/error-result.d.ts +2 -2
- package/dist/common/error/error-result.js.map +1 -1
- package/dist/common/finite-state-machine/types.d.ts +1 -1
- package/dist/common/permission-definition.d.ts +6 -6
- package/dist/common/permission-definition.js +6 -6
- package/dist/common/types/common-types.d.ts +2 -1
- package/dist/common/types/entity-relation-paths.d.ts +1 -1
- package/dist/common/types/injectable-strategy.d.ts +1 -1
- package/dist/common/utils.d.ts +1 -1
- package/dist/common/utils.js +1 -1
- package/dist/config/asset-import-strategy/asset-import-strategy.d.ts +7 -0
- package/dist/config/asset-naming-strategy/asset-naming-strategy.d.ts +7 -0
- package/dist/config/asset-preview-strategy/asset-preview-strategy.d.ts +8 -0
- package/dist/config/asset-storage-strategy/asset-storage-strategy.d.ts +7 -0
- package/dist/config/auth/authentication-strategy.d.ts +9 -2
- package/dist/config/auth/password-hashing-strategy.d.ts +7 -0
- package/dist/config/auth/password-validation-strategy.d.ts +7 -0
- package/dist/config/catalog/collection-filter.d.ts +1 -1
- package/dist/config/catalog/collection-filter.js +1 -1
- package/dist/config/catalog/product-variant-price-calculation-strategy.d.ts +7 -0
- package/dist/config/catalog/product-variant-price-selection-strategy.d.ts +7 -0
- package/dist/config/catalog/stock-display-strategy.d.ts +7 -0
- package/dist/config/catalog/stock-location-strategy.d.ts +7 -0
- package/dist/config/custom-field/custom-field-types.d.ts +1 -66
- package/dist/config/entity/entity-id-strategy.d.ts +9 -2
- package/dist/config/entity/money-strategy.d.ts +10 -3
- package/dist/config/entity/uuid-id-strategy.d.ts +1 -1
- package/dist/config/entity/uuid-id-strategy.js +1 -1
- package/dist/config/entity-metadata/entity-metadata-modifier.d.ts +4 -4
- package/dist/config/fulfillment/fulfillment-handler.d.ts +3 -3
- package/dist/config/fulfillment/fulfillment-handler.js +3 -3
- package/dist/config/job-queue/job-queue-strategy.d.ts +7 -0
- package/dist/config/merge-config.d.ts +1 -1
- package/dist/config/merge-config.js +1 -1
- package/dist/config/order/active-order-strategy.d.ts +2 -2
- package/dist/config/order/changed-price-handling-strategy.d.ts +7 -0
- package/dist/config/order/default-guest-checkout-strategy.d.ts +1 -1
- package/dist/config/order/default-guest-checkout-strategy.js +1 -1
- package/dist/config/order/default-order-process.d.ts +1 -1
- package/dist/config/order/default-order-process.js +1 -1
- package/dist/config/order/guest-checkout-strategy.d.ts +7 -0
- package/dist/config/order/order-by-code-access-strategy.d.ts +8 -1
- package/dist/config/order/order-by-code-access-strategy.js.map +1 -1
- package/dist/config/order/order-code-strategy.d.ts +8 -1
- package/dist/config/order/order-code-strategy.js.map +1 -1
- package/dist/config/order/order-item-price-calculation-strategy.d.ts +8 -1
- package/dist/config/order/order-merge-strategy.d.ts +7 -0
- package/dist/config/order/order-placed-strategy.d.ts +7 -0
- package/dist/config/order/order-process.d.ts +7 -0
- package/dist/config/order/order-seller-strategy.d.ts +7 -0
- package/dist/config/order/stock-allocation-strategy.d.ts +7 -0
- package/dist/config/payment/payment-process.d.ts +7 -0
- package/dist/config/promotion/utils/facet-value-checker.d.ts +1 -1
- package/dist/config/promotion/utils/facet-value-checker.js +1 -1
- package/dist/config/session-cache/session-cache-strategy.d.ts +8 -1
- package/dist/config/shipping-method/shipping-eligibility-checker.d.ts +1 -1
- package/dist/config/shipping-method/shipping-eligibility-checker.js.map +1 -1
- package/dist/config/shipping-method/shipping-line-assignment-strategy.d.ts +34 -0
- package/dist/config/system/health-check-strategy.d.ts +7 -1
- package/dist/config/tax/tax-line-calculation-strategy.d.ts +7 -0
- package/dist/config/tax/tax-zone-strategy.d.ts +7 -0
- package/dist/config/vendure-config.d.ts +4 -4
- package/dist/connection/transactional-connection.d.ts +1 -1
- package/dist/data-import/providers/import-parser/import-parser.d.ts +1 -1
- package/dist/data-import/providers/import-parser/import-parser.js +1 -1
- package/dist/data-import/providers/importer/importer.d.ts +1 -1
- package/dist/data-import/providers/importer/importer.js +1 -1
- package/dist/entity/channel/channel.entity.d.ts +9 -0
- package/dist/entity/channel/channel.entity.js.map +1 -1
- package/dist/entity/entity-id.decorator.d.ts +4 -0
- package/dist/entity/entity-id.decorator.js +4 -0
- package/dist/entity/entity-id.decorator.js.map +1 -1
- package/dist/entity/index.d.ts +2 -0
- package/dist/entity/index.js +2 -0
- package/dist/entity/index.js.map +1 -1
- package/dist/entity/money.decorator.d.ts +1 -0
- package/dist/entity/money.decorator.js +1 -0
- package/dist/entity/money.decorator.js.map +1 -1
- package/dist/event-bus/event-bus.d.ts +1 -1
- package/dist/event-bus/event-bus.js +1 -1
- package/dist/health-check/health-check-registry.service.d.ts +1 -1
- package/dist/health-check/health-check-registry.service.js +1 -1
- package/dist/health-check/http-health-check-strategy.d.ts +1 -1
- package/dist/health-check/http-health-check-strategy.js +1 -1
- package/dist/health-check/typeorm-health-check-strategy.d.ts +1 -1
- package/dist/health-check/typeorm-health-check-strategy.js +1 -1
- package/dist/job-queue/in-memory-job-queue-strategy.d.ts +1 -1
- package/dist/job-queue/in-memory-job-queue-strategy.js +1 -1
- package/dist/job-queue/job-buffer/job-buffer-storage-strategy.d.ts +9 -2
- package/dist/job-queue/job-buffer/job-buffer.d.ts +2 -2
- package/dist/job-queue/job-queue.d.ts +2 -2
- package/dist/job-queue/job-queue.js +2 -2
- package/dist/job-queue/job-queue.service.d.ts +2 -2
- package/dist/job-queue/job-queue.service.js +2 -2
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.d.ts +5 -5
- package/dist/plugin/default-job-queue-plugin/default-job-queue-plugin.js +4 -4
- package/dist/plugin/default-search-plugin/default-search-plugin.d.ts +4 -4
- package/dist/plugin/default-search-plugin/default-search-plugin.js +4 -4
- package/dist/plugin/default-search-plugin/search-strategy/search-strategy.d.ts +7 -0
- package/dist/plugin/default-search-plugin/types.d.ts +2 -2
- package/dist/plugin/vendure-plugin.d.ts +3 -3
- package/dist/plugin/vendure-plugin.js +1 -1
- package/dist/process-context/process-context.d.ts +1 -1
- package/dist/process-context/process-context.js +1 -1
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.d.ts +3 -3
- package/dist/service/helpers/entity-hydrator/entity-hydrator.service.js +3 -3
- package/dist/service/helpers/list-query-builder/list-query-builder.d.ts +2 -2
- package/dist/service/helpers/list-query-builder/list-query-builder.js +2 -2
- package/dist/service/helpers/product-price-applicator/product-price-applicator.d.ts +1 -1
- package/dist/service/helpers/product-price-applicator/product-price-applicator.js +1 -1
- package/dist/service/helpers/translatable-saver/translatable-saver.d.ts +1 -1
- package/dist/service/helpers/translatable-saver/translatable-saver.js +1 -1
- package/dist/service/helpers/translator/translator.service.d.ts +33 -0
- package/dist/service/helpers/translator/translator.service.js +33 -0
- package/dist/service/helpers/translator/translator.service.js.map +1 -1
- package/dist/service/services/asset.service.d.ts +1 -1
- package/dist/service/services/asset.service.js +1 -1
- package/dist/service/services/history.service.d.ts +6 -6
- package/dist/service/services/history.service.js +6 -6
- package/dist/service/services/order.service.d.ts +1 -2
- package/dist/service/services/order.service.js +1 -2
- package/dist/service/services/order.service.js.map +1 -1
- package/dist/service/services/product.service.js +6 -1
- package/dist/service/services/product.service.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -6
|
@@ -27,7 +27,7 @@ export type SerializedRequestContext = {
|
|
|
27
27
|
* presence of the RequestContext object in order to correctly handle per-request database transactions.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* ```
|
|
30
|
+
* ```ts
|
|
31
31
|
* \@Query()
|
|
32
32
|
* myQuery(\@Ctx() ctx: RequestContext) {
|
|
33
33
|
* return this.myService.getData(ctx);
|
|
@@ -17,7 +17,7 @@ const channel_entity_1 = require("../../entity/channel/channel.entity");
|
|
|
17
17
|
* presence of the RequestContext object in order to correctly handle per-request database transactions.
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
|
-
* ```
|
|
20
|
+
* ```ts
|
|
21
21
|
* \@Query()
|
|
22
22
|
* myQuery(\@Ctx() ctx: RequestContext) {
|
|
23
23
|
* return this.myService.getData(ctx);
|
|
@@ -18,10 +18,10 @@ export declare const PERMISSIONS_METADATA_KEY = "__permissions__";
|
|
|
18
18
|
* to give access to certain resources to potentially un-authenticated users. For this reason, any operation decorated with this permission
|
|
19
19
|
* will always have an anonymous session created if no session is currently in progress.
|
|
20
20
|
*
|
|
21
|
-
* For more information see [Understanding Permission.Owner](/
|
|
21
|
+
* For more information see [Understanding Permission.Owner](/reference/typescript-api/common/permission/#understanding-permissionowner).
|
|
22
22
|
*
|
|
23
23
|
* @example
|
|
24
|
-
* ```
|
|
24
|
+
* ```ts
|
|
25
25
|
* \@Allow(Permission.SuperAdmin)
|
|
26
26
|
* \@Query()
|
|
27
27
|
* getAdministrators() {
|
|
@@ -21,10 +21,10 @@ exports.PERMISSIONS_METADATA_KEY = '__permissions__';
|
|
|
21
21
|
* to give access to certain resources to potentially un-authenticated users. For this reason, any operation decorated with this permission
|
|
22
22
|
* will always have an anonymous session created if no session is currently in progress.
|
|
23
23
|
*
|
|
24
|
-
* For more information see [Understanding Permission.Owner](/
|
|
24
|
+
* For more information see [Understanding Permission.Owner](/reference/typescript-api/common/permission/#understanding-permissionowner).
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
* ```
|
|
27
|
+
* ```ts
|
|
28
28
|
* \@Allow(Permission.SuperAdmin)
|
|
29
29
|
* \@Query()
|
|
30
30
|
* getAdministrators() {
|
|
@@ -23,7 +23,7 @@ export type FieldsDecoratorConfig<T extends VendureEntity> = Type<T> | {
|
|
|
23
23
|
* not include many deep nested relations.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
* ```
|
|
26
|
+
* ```ts
|
|
27
27
|
* \@Query()
|
|
28
28
|
* \@Allow(Permission.ReadOrder)
|
|
29
29
|
* orders(
|
|
@@ -92,7 +92,7 @@ export type FieldsDecoratorConfig<T extends VendureEntity> = Type<T> | {
|
|
|
92
92
|
* use the decorator like this:
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
|
-
* ```
|
|
95
|
+
* ```ts
|
|
96
96
|
* \@Relations({ entity: Order, depth: 2 }) relations: RelationPaths<Order>,
|
|
97
97
|
* ```
|
|
98
98
|
*
|
|
@@ -105,7 +105,7 @@ export type FieldsDecoratorConfig<T extends VendureEntity> = Type<T> | {
|
|
|
105
105
|
* PaginatedList query rather than a simple array.
|
|
106
106
|
*
|
|
107
107
|
* @example
|
|
108
|
-
* ```
|
|
108
|
+
* ```ts
|
|
109
109
|
* \@Relations({ entity: Collection, omit: ['productVariant'] }) relations: RelationPaths<Collection>,
|
|
110
110
|
* ```
|
|
111
111
|
*
|
|
@@ -27,7 +27,7 @@ const cache = new index_1.TtlCache({ cacheSize: 500, ttl: 5 * 60 * 1000 });
|
|
|
27
27
|
* not include many deep nested relations.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* ```
|
|
30
|
+
* ```ts
|
|
31
31
|
* \@Query()
|
|
32
32
|
* \@Allow(Permission.ReadOrder)
|
|
33
33
|
* orders(
|
|
@@ -96,7 +96,7 @@ const cache = new index_1.TtlCache({ cacheSize: 500, ttl: 5 * 60 * 1000 });
|
|
|
96
96
|
* use the decorator like this:
|
|
97
97
|
*
|
|
98
98
|
* @example
|
|
99
|
-
* ```
|
|
99
|
+
* ```ts
|
|
100
100
|
* \@Relations({ entity: Order, depth: 2 }) relations: RelationPaths<Order>,
|
|
101
101
|
* ```
|
|
102
102
|
*
|
|
@@ -109,7 +109,7 @@ const cache = new index_1.TtlCache({ cacheSize: 500, ttl: 5 * 60 * 1000 });
|
|
|
109
109
|
* PaginatedList query rather than a simple array.
|
|
110
110
|
*
|
|
111
111
|
* @example
|
|
112
|
-
* ```
|
|
112
|
+
* ```ts
|
|
113
113
|
* \@Relations({ entity: Collection, omit: ['productVariant'] }) relations: RelationPaths<Collection>,
|
|
114
114
|
* ```
|
|
115
115
|
*
|
|
@@ -6,7 +6,7 @@ export declare const TRANSACTION_MODE_METADATA_KEY = "__transaction_mode__";
|
|
|
6
6
|
* methods must them be used.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
* ```
|
|
9
|
+
* ```ts
|
|
10
10
|
* // in a GraphQL resolver file
|
|
11
11
|
*
|
|
12
12
|
* \@Transaction('manual')
|
|
@@ -50,7 +50,7 @@ export type TransactionIsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' |
|
|
|
50
50
|
* error is thrown.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* ```
|
|
53
|
+
* ```ts
|
|
54
54
|
* // in a GraphQL resolver file
|
|
55
55
|
*
|
|
56
56
|
* \@Transaction()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.decorator.js","sourceRoot":"","sources":["../../../src/api/decorators/transaction.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA+E;AAE/E,mFAA+E;AAElE,QAAA,6BAA6B,GAAG,sBAAsB,CAAC;AA6BvD,QAAA,wCAAwC,GAAG,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.decorator.js","sourceRoot":"","sources":["../../../src/api/decorators/transaction.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAA+E;AAE/E,mFAA+E;AAElE,QAAA,6BAA6B,GAAG,sBAAsB,CAAC;AA6BvD,QAAA,wCAAwC,GAAG,iCAAiC,CAAC;AAiB1F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACI,MAAM,WAAW,GAAG,CACvB,kBAAmC,MAAM,EACzC,yBAAqD,EACvD,EAAE;IACA,OAAO,IAAA,wBAAe,EAClB,IAAA,oBAAW,EAAC,qCAA6B,EAAE,eAAe,CAAC,EAC3D,IAAA,oBAAW,EAAC,gDAAwC,EAAE,yBAAyB,CAAC,EAChF,IAAA,wBAAe,EAAC,gDAAsB,CAAC,CAC1C,CAAC;AACN,CAAC,CAAC;AATW,QAAA,WAAW,eAStB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction-interceptor.js","sourceRoot":"","sources":["../../../src/api/middleware/transaction-interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAC5F,uCAAyC;AACzC,+BAAsC;AAGtC,sDAAsF;AACtF,8EAA0E;AAC1E,wFAAoF;AACpF,2DAAuD;AACvD,+
|
|
1
|
+
{"version":3,"file":"transaction-interceptor.js","sourceRoot":"","sources":["../../../src/api/middleware/transaction-interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4F;AAC5F,uCAAyC;AACzC,+BAAsC;AAGtC,sDAAsF;AACtF,8EAA0E;AAC1E,wFAAoF;AACpF,2DAAuD;AACvD,+EAK6C;AAE7C;;;;GAIG;AAEI,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC/B,YACY,UAAmC,EACnC,kBAAsC,EACtC,SAAoB;QAFpB,eAAU,GAAV,UAAU,CAAyB;QACnC,uBAAkB,GAAlB,kBAAkB,CAAoB;QACtC,cAAS,GAAT,SAAS,CAAW;IAC7B,CAAC;IAEJ,SAAS,CAAC,OAAyB,EAAE,IAAiB;QAClD,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,GAAG,IAAA,4BAAY,EAAC,OAAO,CAAC,CAAC;QACjD,MAAM,GAAG,GAAgC,GAAW,CAAC,+BAAmB,CAAC,CAAC;QAC1E,IAAI,GAAG,EAAE;YACL,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CACtC,qDAA6B,EAC7B,OAAO,CAAC,UAAU,EAAE,CACvB,CAAC;YACF,MAAM,yBAAyB,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAChD,gEAAwC,EACxC,OAAO,CAAC,UAAU,EAAE,CACvB,CAAC;YAEF,OAAO,IAAA,SAAE,EACL,IAAI,CAAC,kBAAkB,CAAC,oBAAoB,CACxC,GAAG,EACH,IAAI,CAAC,EAAE;gBACH,IAAI,CAAC,4BAA4B,CAAC,IAAI,EAAE,OAAO,CAAC,UAAU,EAAE,EAAE,GAAG,CAAC,CAAC;gBAEnE,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;YACzB,CAAC,EACD,eAAe,EACf,yBAAyB,EACzB,IAAI,CAAC,UAAU,CAAC,aAAa,CAChC,CACJ,CAAC;SACL;aAAM;YACH,OAAO,IAAI,CAAC,MAAM,EAAE,CAAC;SACxB;IACL,CAAC;IAED;;;;;;OAMG;IACH,wDAAwD;IACxD,4BAA4B,CAAC,GAAmB,EAAE,OAAiB,EAAE,GAAQ;QACzE,wDAAwD;QACxD,MAAM,GAAG,GAAkC,GAAG,CAAC,mCAAuB,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;QACrF,GAAG,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QAEtB,GAAG,CAAC,mCAAuB,CAAC,GAAG,GAAG,CAAC;IACvC,CAAC;CACJ,CAAA;AArDY,sBAAsB;IADlC,IAAA,mBAAU,GAAE;qCAGe,kDAAuB;QACf,wCAAkB;QAC3B,gBAAS;GAJvB,sBAAsB,CAqDlC;AArDY,wDAAsB"}
|
package/dist/bootstrap.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type VendureBootstrapFunction = (config: VendureConfig) => Promise<INestA
|
|
|
8
8
|
* Bootstraps the Vendure server. This is the entry point to the application.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
|
-
* ```
|
|
11
|
+
* ```ts
|
|
12
12
|
* import { bootstrap } from '\@vendure/core';
|
|
13
13
|
* import { config } from './vendure-config';
|
|
14
14
|
*
|
|
@@ -25,10 +25,10 @@ export declare function bootstrap(userConfig: Partial<VendureConfig>): Promise<I
|
|
|
25
25
|
* NestJs [standalone application](https://docs.nestjs.com/standalone-applications) as well as convenience
|
|
26
26
|
* methods for starting the job queue and health check server.
|
|
27
27
|
*
|
|
28
|
-
* Read more about the [Vendure Worker](
|
|
28
|
+
* Read more about the [Vendure Worker](/guides/developer-guide/worker-job-queue/).
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
|
-
* ```
|
|
31
|
+
* ```ts
|
|
32
32
|
* import { bootstrapWorker } from '\@vendure/core';
|
|
33
33
|
* import { config } from './vendure-config';
|
|
34
34
|
*
|
package/dist/bootstrap.js
CHANGED
|
@@ -26,7 +26,7 @@ const vendure_worker_1 = require("./worker/vendure-worker");
|
|
|
26
26
|
* Bootstraps the Vendure server. This is the entry point to the application.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
|
-
* ```
|
|
29
|
+
* ```ts
|
|
30
30
|
* import { bootstrap } from '\@vendure/core';
|
|
31
31
|
* import { config } from './vendure-config';
|
|
32
32
|
*
|
|
@@ -76,10 +76,10 @@ exports.bootstrap = bootstrap;
|
|
|
76
76
|
* NestJs [standalone application](https://docs.nestjs.com/standalone-applications) as well as convenience
|
|
77
77
|
* methods for starting the job queue and health check server.
|
|
78
78
|
*
|
|
79
|
-
* Read more about the [Vendure Worker](
|
|
79
|
+
* Read more about the [Vendure Worker](/guides/developer-guide/worker-job-queue/).
|
|
80
80
|
*
|
|
81
81
|
* @example
|
|
82
|
-
* ```
|
|
82
|
+
* ```ts
|
|
83
83
|
* import { bootstrapWorker } from '\@vendure/core';
|
|
84
84
|
* import { config } from './vendure-config';
|
|
85
85
|
*
|
|
@@ -10,7 +10,7 @@ import { InjectableStrategy } from './types/injectable-strategy';
|
|
|
10
10
|
* component.
|
|
11
11
|
*
|
|
12
12
|
* @example
|
|
13
|
-
* ```
|
|
13
|
+
* ```ts
|
|
14
14
|
* const title: LocalizedStringArray = [
|
|
15
15
|
* { languageCode: LanguageCode.en, value: 'English Title' },
|
|
16
16
|
* { languageCode: LanguageCode.de, value: 'German Title' },
|
|
@@ -52,7 +52,7 @@ export type ConfigArgDef<T extends ConfigArgType> = T extends 'string' ? ConfigA
|
|
|
52
52
|
* Each argument has a data type, which must be one of {@link ConfigArgType}.
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
|
-
* ```
|
|
55
|
+
* ```ts
|
|
56
56
|
* {
|
|
57
57
|
* apiKey: { type: 'string' },
|
|
58
58
|
* maxRetries: { type: 'int' },
|
|
@@ -65,7 +65,7 @@ export type ConfigArgDef<T extends ConfigArgType> = T extends 'string' ? ConfigA
|
|
|
65
65
|
* data type. For example, if you want to store an array of strings:
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
|
-
* ```
|
|
68
|
+
* ```ts
|
|
69
69
|
* {
|
|
70
70
|
* aliases: {
|
|
71
71
|
* type: 'string',
|
|
@@ -80,7 +80,7 @@ export type ConfigArgDef<T extends ConfigArgType> = T extends 'string' ? ConfigA
|
|
|
80
80
|
* When not set, a default input component is used appropriate to the data type.
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
|
-
* ```
|
|
83
|
+
* ```ts
|
|
84
84
|
* {
|
|
85
85
|
* operator: {
|
|
86
86
|
* type: 'string',
|
|
@@ -211,7 +211,7 @@ export interface ConfigurableOperationDefOptions<T extends ConfigArgs> extends I
|
|
|
211
211
|
* Here's an example of a ShippingCalculator that injects a service which has been defined in a plugin:
|
|
212
212
|
*
|
|
213
213
|
* @example
|
|
214
|
-
* ```
|
|
214
|
+
* ```ts
|
|
215
215
|
* import { Injector, ShippingCalculator } from '\@vendure/core';
|
|
216
216
|
* import { ShippingRatesService } from './shipping-rates.service';
|
|
217
217
|
*
|
|
@@ -44,7 +44,7 @@ const errors_1 = require("./error/errors");
|
|
|
44
44
|
* Here's an example of a ShippingCalculator that injects a service which has been defined in a plugin:
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
|
-
* ```
|
|
47
|
+
* ```ts
|
|
48
48
|
* import { Injector, ShippingCalculator } from '\@vendure/core';
|
|
49
49
|
* import { ShippingRatesService } from './shipping-rates.service';
|
|
50
50
|
*
|
|
@@ -9,7 +9,7 @@ export type GraphQLErrorResult = {
|
|
|
9
9
|
* plus one or more ErrorResult types) and returns a union of _just_ the ErrorResult types.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* ```
|
|
12
|
+
* ```ts
|
|
13
13
|
* type UpdateOrderItemsResult = Order | OrderModificationError | OrderLimitError | NegativeQuantityError;
|
|
14
14
|
*
|
|
15
15
|
* type T1 = JustErrorResults<UpdateOrderItemsResult>;
|
|
@@ -27,7 +27,7 @@ export type JustErrorResults<T extends GraphQLErrorResult | U, U = any> = Exclud
|
|
|
27
27
|
* we use this type to substitute them.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
* ```
|
|
30
|
+
* ```ts
|
|
31
31
|
* type UpdateOrderItemsResult = Order | OrderModificationError | OrderLimitError | NegativeQuantityError;
|
|
32
32
|
* type T1 = ErrorResultUnion<UpdateOrderItemsResult, VendureEntityOrder>;
|
|
33
33
|
* // T1 = VendureEntityOrder | OrderModificationError | OrderLimitError | NegativeQuantityError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-result.js","sourceRoot":"","sources":["../../../src/common/error/error-result.ts"],"names":[],"mappings":";;;AAmDA,SAAgB,oBAAoB,CAChC,KAA6B;IAE7B,OAAO,CACH,KAAK;QACL,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"error-result.js","sourceRoot":"","sources":["../../../src/common/error/error-result.ts"],"names":[],"mappings":";;;AAmDA,SAAgB,oBAAoB,CAChC,KAA6B;IAE7B,OAAO,CACH,KAAK;QACL,CAAC,CAAC,CACG,KAAuC,CAAC,SAAS;YACjD,KAAuC,CAAC,OAAO,IAAI,IAAI,CAC3D;QACA,KAAa,CAAC,UAAU,CAC5B,CAAC;AACN,CAAC;AAXD,oDAWC"}
|
|
@@ -50,14 +50,14 @@ export type PermissionMetadata = Required<PermissionDefinitionConfig>;
|
|
|
50
50
|
* **Note:** To define CRUD permissions, use the {@link CrudPermissionDefinition}.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
|
-
* ```
|
|
53
|
+
* ```ts
|
|
54
54
|
* export const sync = new PermissionDefinition({
|
|
55
55
|
* name: 'SyncInventory',
|
|
56
56
|
* description: 'Allows syncing stock levels via Admin API'
|
|
57
57
|
* });
|
|
58
58
|
* ```
|
|
59
59
|
*
|
|
60
|
-
* ```
|
|
60
|
+
* ```ts
|
|
61
61
|
* const config: VendureConfig = {
|
|
62
62
|
* authOptions: {
|
|
63
63
|
* customPermissions: [sync],
|
|
@@ -65,7 +65,7 @@ export type PermissionMetadata = Required<PermissionDefinitionConfig>;
|
|
|
65
65
|
* }
|
|
66
66
|
* ```
|
|
67
67
|
*
|
|
68
|
-
* ```
|
|
68
|
+
* ```ts
|
|
69
69
|
* \@Resolver()
|
|
70
70
|
* export class ExternalSyncResolver {
|
|
71
71
|
*
|
|
@@ -98,11 +98,11 @@ export declare class PermissionDefinition {
|
|
|
98
98
|
* 4 Permissions: 'CreateWishlist', 'ReadWishlist', 'UpdateWishlist' & 'DeleteWishlist'.
|
|
99
99
|
*
|
|
100
100
|
* @example
|
|
101
|
-
* ```
|
|
101
|
+
* ```ts
|
|
102
102
|
* export const wishlist = new CrudPermissionDefinition('Wishlist');
|
|
103
103
|
* ```
|
|
104
104
|
*
|
|
105
|
-
* ```
|
|
105
|
+
* ```ts
|
|
106
106
|
* const config: VendureConfig = {
|
|
107
107
|
* authOptions: {
|
|
108
108
|
* customPermissions: [wishlist],
|
|
@@ -110,7 +110,7 @@ export declare class PermissionDefinition {
|
|
|
110
110
|
* }
|
|
111
111
|
* ```
|
|
112
112
|
*
|
|
113
|
-
* ```
|
|
113
|
+
* ```ts
|
|
114
114
|
* \@Resolver()
|
|
115
115
|
* export class WishlistResolver {
|
|
116
116
|
*
|
|
@@ -9,14 +9,14 @@ exports.CrudPermissionDefinition = exports.PermissionDefinition = void 0;
|
|
|
9
9
|
* **Note:** To define CRUD permissions, use the {@link CrudPermissionDefinition}.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* ```
|
|
12
|
+
* ```ts
|
|
13
13
|
* export const sync = new PermissionDefinition({
|
|
14
14
|
* name: 'SyncInventory',
|
|
15
15
|
* description: 'Allows syncing stock levels via Admin API'
|
|
16
16
|
* });
|
|
17
17
|
* ```
|
|
18
18
|
*
|
|
19
|
-
* ```
|
|
19
|
+
* ```ts
|
|
20
20
|
* const config: VendureConfig = {
|
|
21
21
|
* authOptions: {
|
|
22
22
|
* customPermissions: [sync],
|
|
@@ -24,7 +24,7 @@ exports.CrudPermissionDefinition = exports.PermissionDefinition = void 0;
|
|
|
24
24
|
* }
|
|
25
25
|
* ```
|
|
26
26
|
*
|
|
27
|
-
* ```
|
|
27
|
+
* ```ts
|
|
28
28
|
* \@Resolver()
|
|
29
29
|
* export class ExternalSyncResolver {
|
|
30
30
|
*
|
|
@@ -71,11 +71,11 @@ exports.PermissionDefinition = PermissionDefinition;
|
|
|
71
71
|
* 4 Permissions: 'CreateWishlist', 'ReadWishlist', 'UpdateWishlist' & 'DeleteWishlist'.
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
|
-
* ```
|
|
74
|
+
* ```ts
|
|
75
75
|
* export const wishlist = new CrudPermissionDefinition('Wishlist');
|
|
76
76
|
* ```
|
|
77
77
|
*
|
|
78
|
-
* ```
|
|
78
|
+
* ```ts
|
|
79
79
|
* const config: VendureConfig = {
|
|
80
80
|
* authOptions: {
|
|
81
81
|
* customPermissions: [wishlist],
|
|
@@ -83,7 +83,7 @@ exports.PermissionDefinition = PermissionDefinition;
|
|
|
83
83
|
* }
|
|
84
84
|
* ```
|
|
85
85
|
*
|
|
86
|
-
* ```
|
|
86
|
+
* ```ts
|
|
87
87
|
* \@Resolver()
|
|
88
88
|
* export class WishlistResolver {
|
|
89
89
|
*
|
|
@@ -156,7 +156,7 @@ export type MiddlewareHandler = Type<any> | Function;
|
|
|
156
156
|
* `PayloadTooLargeError`. To increase this limit, we can manually configure the body-parser middleware:
|
|
157
157
|
*
|
|
158
158
|
* @example
|
|
159
|
-
* ```
|
|
159
|
+
* ```ts
|
|
160
160
|
* import { VendureConfig } from '\@vendure/core';
|
|
161
161
|
* import { json } from 'body-parser';
|
|
162
162
|
*
|
|
@@ -170,6 +170,7 @@ export type MiddlewareHandler = Type<any> | Function;
|
|
|
170
170
|
* }],
|
|
171
171
|
* },
|
|
172
172
|
* };
|
|
173
|
+
* ```
|
|
173
174
|
*
|
|
174
175
|
* @docsCategory Common
|
|
175
176
|
*/
|
|
@@ -5,7 +5,7 @@ import { VendureEntity } from '../../entity/base/base.entity';
|
|
|
5
5
|
* It works to 2 levels deep.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
|
-
* ```
|
|
8
|
+
* ```ts
|
|
9
9
|
* type T1 = EntityRelationPaths<Product>;
|
|
10
10
|
* ```
|
|
11
11
|
* In the above example, the type `T1` will be a string union of all relations of the
|
package/dist/common/utils.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export declare function awaitPromiseOrObservable<T>(value: T | Promise<T> | Obse
|
|
|
49
49
|
* an Observable but also want to work with async (Promise-returning) code.
|
|
50
50
|
*
|
|
51
51
|
* @example
|
|
52
|
-
* ```
|
|
52
|
+
* ```ts
|
|
53
53
|
* \@Controller()
|
|
54
54
|
* export class MyWorkerController {
|
|
55
55
|
*
|
package/dist/common/utils.js
CHANGED
|
@@ -11,6 +11,13 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
11
11
|
*
|
|
12
12
|
* A custom strategy could be created which could e.g. get the asset file from an S3 bucket.
|
|
13
13
|
*
|
|
14
|
+
* :::info
|
|
15
|
+
*
|
|
16
|
+
* This is configured via the `importExportOptions.assetImportStrategy` property of
|
|
17
|
+
* your VendureConfig.
|
|
18
|
+
*
|
|
19
|
+
* :::
|
|
20
|
+
*
|
|
14
21
|
* @since 1.7.0
|
|
15
22
|
* @docsCategory import-export
|
|
16
23
|
*/
|
|
@@ -5,6 +5,13 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
5
5
|
* The AssetNamingStrategy determines how file names are generated based on the uploaded source file name,
|
|
6
6
|
* as well as how to handle naming conflicts.
|
|
7
7
|
*
|
|
8
|
+
* :::info
|
|
9
|
+
*
|
|
10
|
+
* This is configured via the `assetOptions.assetNamingStrategy` property of
|
|
11
|
+
* your VendureConfig.
|
|
12
|
+
*
|
|
13
|
+
* :::
|
|
14
|
+
*
|
|
8
15
|
* @docsCategory assets
|
|
9
16
|
*/
|
|
10
17
|
export interface AssetNamingStrategy extends InjectableStrategy {
|
|
@@ -6,10 +6,18 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
6
6
|
* The AssetPreviewStrategy determines how preview images for assets are created. For image
|
|
7
7
|
* assets, this would usually typically involve resizing to sensible dimensions. Other file types
|
|
8
8
|
* could be previewed in a variety of ways, e.g.:
|
|
9
|
+
*
|
|
9
10
|
* - waveform images generated for audio files
|
|
10
11
|
* - preview images generated for pdf documents
|
|
11
12
|
* - watermarks added to preview images
|
|
12
13
|
*
|
|
14
|
+
* :::info
|
|
15
|
+
*
|
|
16
|
+
* This is configured via the `assetOptions.assetPreviewStrategy` property of
|
|
17
|
+
* your VendureConfig.
|
|
18
|
+
*
|
|
19
|
+
* :::
|
|
20
|
+
*
|
|
13
21
|
* @docsCategory assets
|
|
14
22
|
*/
|
|
15
23
|
export interface AssetPreviewStrategy extends InjectableStrategy {
|
|
@@ -8,6 +8,13 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
8
8
|
* The AssetPersistenceStrategy determines how Asset files are physically stored
|
|
9
9
|
* and retrieved.
|
|
10
10
|
*
|
|
11
|
+
* :::info
|
|
12
|
+
*
|
|
13
|
+
* This is configured via the `assetOptions.assetStorageStrategy` property of
|
|
14
|
+
* your VendureConfig.
|
|
15
|
+
*
|
|
16
|
+
* :::
|
|
17
|
+
*
|
|
11
18
|
* @docsCategory assets
|
|
12
19
|
*/
|
|
13
20
|
export interface AssetStorageStrategy extends InjectableStrategy {
|
|
@@ -7,7 +7,14 @@ import { User } from '../../entity/user/user.entity';
|
|
|
7
7
|
* An AuthenticationStrategy defines how a User (which can be a Customer in the Shop API or
|
|
8
8
|
* and Administrator in the Admin API) may be authenticated.
|
|
9
9
|
*
|
|
10
|
-
* Real-world examples can be found in the [Authentication guide](/
|
|
10
|
+
* Real-world examples can be found in the [Authentication guide](/guides/core-concepts/auth/).
|
|
11
|
+
*
|
|
12
|
+
* :::info
|
|
13
|
+
*
|
|
14
|
+
* This is configured via the `authOptions.shopAuthenticationStrategy` and `authOptions.adminAuthenticationStrategy`
|
|
15
|
+
* properties of your VendureConfig.
|
|
16
|
+
*
|
|
17
|
+
* :::
|
|
11
18
|
*
|
|
12
19
|
* @docsCategory auth
|
|
13
20
|
*/
|
|
@@ -27,7 +34,7 @@ export interface AuthenticationStrategy<Data = unknown> extends InjectableStrate
|
|
|
27
34
|
* @example
|
|
28
35
|
* For example, given the following:
|
|
29
36
|
*
|
|
30
|
-
* ```
|
|
37
|
+
* ```ts
|
|
31
38
|
* defineInputType() {
|
|
32
39
|
* return gql`
|
|
33
40
|
* input MyAuthInput {
|
|
@@ -3,6 +3,13 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
3
3
|
* @description
|
|
4
4
|
* Defines how user passwords get hashed when using the {@link NativeAuthenticationStrategy}.
|
|
5
5
|
*
|
|
6
|
+
* :::info
|
|
7
|
+
*
|
|
8
|
+
* This is configured via the `authOptions.passwordHashingStrategy` property of
|
|
9
|
+
* your VendureConfig.
|
|
10
|
+
*
|
|
11
|
+
* :::
|
|
12
|
+
*
|
|
6
13
|
* @docsCategory auth
|
|
7
14
|
* @since 1.3.0
|
|
8
15
|
*/
|
|
@@ -5,6 +5,13 @@ import { InjectableStrategy } from '../../common/types/injectable-strategy';
|
|
|
5
5
|
* Defines validation to apply to new password (when creating an account or updating an existing account's
|
|
6
6
|
* password when using the {@link NativeAuthenticationStrategy}.
|
|
7
7
|
*
|
|
8
|
+
* :::info
|
|
9
|
+
*
|
|
10
|
+
* This is configured via the `authOptions.passwordValidationStrategy` property of
|
|
11
|
+
* your VendureConfig.
|
|
12
|
+
*
|
|
13
|
+
* :::
|
|
14
|
+
*
|
|
8
15
|
* @docsCategory auth
|
|
9
16
|
* @since 1.5.0
|
|
10
17
|
*/
|
|
@@ -18,7 +18,7 @@ export interface CollectionFilterConfig<T extends ConfigArgs> extends Configurab
|
|
|
18
18
|
* Here's a simple example of a custom CollectionFilter:
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
|
-
* ```
|
|
21
|
+
* ```ts
|
|
22
22
|
* import { CollectionFilter, LanguageCode } from '\@vendure/core';
|
|
23
23
|
*
|
|
24
24
|
* export const skuCollectionFilter = new CollectionFilter({
|
|
@@ -15,7 +15,7 @@ const configurable_operation_1 = require("../../common/configurable-operation");
|
|
|
15
15
|
* Here's a simple example of a custom CollectionFilter:
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
|
-
* ```
|
|
18
|
+
* ```ts
|
|
19
19
|
* import { CollectionFilter, LanguageCode } from '\@vendure/core';
|
|
20
20
|
*
|
|
21
21
|
* export const skuCollectionFilter = new CollectionFilter({
|
|
@@ -7,6 +7,13 @@ import { Zone } from '../../entity/zone/zone.entity';
|
|
|
7
7
|
* @description
|
|
8
8
|
* Defines how ProductVariant are calculated based on the input price, tax zone and current request context.
|
|
9
9
|
*
|
|
10
|
+
* :::info
|
|
11
|
+
*
|
|
12
|
+
* This is configured via the `catalogOptions.productVariantPriceCalculationStrategy` property of
|
|
13
|
+
* your VendureConfig.
|
|
14
|
+
*
|
|
15
|
+
* :::
|
|
16
|
+
*
|
|
10
17
|
* @docsCategory products & stock
|
|
11
18
|
* @docsPage ProductVariantPriceCalculationStrategy
|
|
12
19
|
*/
|
|
@@ -5,6 +5,13 @@ import { ProductVariantPrice } from '../../entity/product-variant/product-varian
|
|
|
5
5
|
* @description
|
|
6
6
|
* The strategy for selecting the price for a ProductVariant in a given Channel.
|
|
7
7
|
*
|
|
8
|
+
* :::info
|
|
9
|
+
*
|
|
10
|
+
* This is configured via the `catalogOptions.productVariantPriceSelectionStrategy` property of
|
|
11
|
+
* your VendureConfig.
|
|
12
|
+
*
|
|
13
|
+
* :::
|
|
14
|
+
*
|
|
8
15
|
* @docsCategory configuration
|
|
9
16
|
* @docsPage ProductVariantPriceSelectionStrategy
|
|
10
17
|
* @docsWeight 0
|