@unchainedshop/core-orders 4.3.3 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/package.json +1 -1
  2. package/lib/db/OrderDeliveriesSchema.d.ts +0 -3
  3. package/lib/db/OrderDeliveriesSchema.d.ts.map +0 -1
  4. package/lib/db/OrderDeliveriesSchema.js +0 -20
  5. package/lib/db/OrderDeliveriesSchema.js.map +0 -1
  6. package/lib/db/OrderDiscountTrigger.d.ts +0 -5
  7. package/lib/db/OrderDiscountTrigger.d.ts.map +0 -1
  8. package/lib/db/OrderDiscountTrigger.js +0 -6
  9. package/lib/db/OrderDiscountTrigger.js.map +0 -1
  10. package/lib/db/OrderDiscountsSchema.d.ts +0 -3
  11. package/lib/db/OrderDiscountsSchema.d.ts.map +0 -1
  12. package/lib/db/OrderDiscountsSchema.js +0 -12
  13. package/lib/db/OrderDiscountsSchema.js.map +0 -1
  14. package/lib/db/OrderPaymentsSchema.d.ts +0 -3
  15. package/lib/db/OrderPaymentsSchema.d.ts.map +0 -1
  16. package/lib/db/OrderPaymentsSchema.js +0 -20
  17. package/lib/db/OrderPaymentsSchema.js.map +0 -1
  18. package/lib/db/OrderPositionsSchema.d.ts +0 -3
  19. package/lib/db/OrderPositionsSchema.d.ts.map +0 -1
  20. package/lib/db/OrderPositionsSchema.js +0 -37
  21. package/lib/db/OrderPositionsSchema.js.map +0 -1
  22. package/lib/db/OrdersSchema.d.ts +0 -3
  23. package/lib/db/OrdersSchema.d.ts.map +0 -1
  24. package/lib/db/OrdersSchema.js +0 -30
  25. package/lib/db/OrdersSchema.js.map +0 -1
  26. package/lib/director/OrderDiscountAdapter.d.ts +0 -4
  27. package/lib/director/OrderDiscountAdapter.d.ts.map +0 -1
  28. package/lib/director/OrderDiscountAdapter.js +0 -3
  29. package/lib/director/OrderDiscountAdapter.js.map +0 -1
  30. package/lib/director/OrderDiscountConfiguration.d.ts +0 -6
  31. package/lib/director/OrderDiscountConfiguration.d.ts.map +0 -1
  32. package/lib/director/OrderDiscountConfiguration.js +0 -2
  33. package/lib/director/OrderDiscountConfiguration.js.map +0 -1
  34. package/lib/director/OrderDiscountDirector.d.ts +0 -3
  35. package/lib/director/OrderDiscountDirector.d.ts.map +0 -1
  36. package/lib/director/OrderDiscountDirector.js +0 -3
  37. package/lib/director/OrderDiscountDirector.js.map +0 -1
  38. package/lib/director/OrderPricingAdapter.d.ts +0 -4
  39. package/lib/director/OrderPricingAdapter.d.ts.map +0 -1
  40. package/lib/director/OrderPricingAdapter.js +0 -25
  41. package/lib/director/OrderPricingAdapter.js.map +0 -1
  42. package/lib/director/OrderPricingDirector.d.ts +0 -3
  43. package/lib/director/OrderPricingDirector.d.ts.map +0 -1
  44. package/lib/director/OrderPricingDirector.js +0 -39
  45. package/lib/director/OrderPricingDirector.js.map +0 -1
  46. package/lib/director/OrderPricingSheet.d.ts +0 -4
  47. package/lib/director/OrderPricingSheet.d.ts.map +0 -1
  48. package/lib/director/OrderPricingSheet.js +0 -101
  49. package/lib/director/OrderPricingSheet.js.map +0 -1
  50. package/lib/migrations/20250502111800-currency-code copy.d.ts +0 -3
  51. package/lib/migrations/20250502111800-currency-code copy.d.ts.map +0 -1
  52. package/lib/migrations/20250502111800-currency-code copy.js +0 -14
  53. package/lib/migrations/20250502111800-currency-code copy.js.map +0 -1
  54. package/lib/migrations/20251020080000-position-config.d.ts +0 -3
  55. package/lib/migrations/20251020080000-position-config.d.ts.map +0 -1
  56. package/lib/migrations/20251020080000-position-config.js +0 -14
  57. package/lib/migrations/20251020080000-position-config.js.map +0 -1
  58. package/lib/module/configureOrdersModule-processing.d.ts +0 -14
  59. package/lib/module/configureOrdersModule-processing.d.ts.map +0 -1
  60. package/lib/module/configureOrdersModule-processing.js +0 -348
  61. package/lib/module/configureOrdersModule-processing.js.map +0 -1
  62. package/lib/module/configureOrdersModule-transformations.d.ts +0 -6
  63. package/lib/module/configureOrdersModule-transformations.d.ts.map +0 -1
  64. package/lib/module/configureOrdersModule-transformations.js +0 -112
  65. package/lib/module/configureOrdersModule-transformations.js.map +0 -1
  66. package/lib/service/migrateOrderCartService.d.ts +0 -3
  67. package/lib/service/migrateOrderCartService.d.ts.map +0 -1
  68. package/lib/service/migrateOrderCartService.js +0 -32
  69. package/lib/service/migrateOrderCartService.js.map +0 -1
  70. package/lib/service/nextUserCartService.d.ts +0 -3
  71. package/lib/service/nextUserCartService.d.ts.map +0 -1
  72. package/lib/service/nextUserCartService.js +0 -34
  73. package/lib/service/nextUserCartService.js.map +0 -1
  74. package/lib/service/orderServices.d.ts +0 -3
  75. package/lib/service/orderServices.d.ts.map +0 -1
  76. package/lib/service/orderServices.js +0 -7
  77. package/lib/service/orderServices.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unchainedshop/core-orders",
3
- "version": "4.3.3",
3
+ "version": "4.3.4",
4
4
  "main": "lib/orders-index.js",
5
5
  "types": "lib/orders-index.d.ts",
6
6
  "type": "module",
@@ -1,3 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- export declare const OrderDeliveriesSchema: SimpleSchema;
3
- //# sourceMappingURL=OrderDeliveriesSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDeliveriesSchema.d.ts","sourceRoot":"","sources":["../../src/db/OrderDeliveriesSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAUxC,eAAO,MAAM,qBAAqB,cAYjC,CAAC"}
@@ -1,20 +0,0 @@
1
- import { Schemas } from '@unchainedshop/utils';
2
- import SimpleSchema from 'simpl-schema';
3
- const calculationFields = {
4
- calculation: Array,
5
- 'calculation.$': {
6
- type: Object,
7
- blackbox: true,
8
- },
9
- };
10
- export const OrderDeliveriesSchema = new SimpleSchema({
11
- delivered: Date,
12
- deliveryProviderId: String,
13
- orderId: String,
14
- status: String,
15
- ...calculationFields,
16
- ...Schemas.contextFields,
17
- ...Schemas.logFields,
18
- ...Schemas.timestampFields,
19
- }, { requiredByDefault: false });
20
- //# sourceMappingURL=OrderDeliveriesSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDeliveriesSchema.js","sourceRoot":"","sources":["../../src/db/OrderDeliveriesSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,iBAAiB,GAAG;IACxB,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,YAAY,CACnD;IACE,SAAS,EAAE,IAAI;IACf,kBAAkB,EAAE,MAAM;IAC1B,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,MAAM;IACd,GAAG,iBAAiB;IACpB,GAAG,OAAO,CAAC,aAAa;IACxB,GAAG,OAAO,CAAC,SAAS;IACpB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare enum OrderDiscountTrigger {
2
- USER = "USER",
3
- SYSTEM = "SYSTEM"
4
- }
5
- //# sourceMappingURL=OrderDiscountTrigger.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountTrigger.d.ts","sourceRoot":"","sources":["../../src/db/OrderDiscountTrigger.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
@@ -1,6 +0,0 @@
1
- export var OrderDiscountTrigger;
2
- (function (OrderDiscountTrigger) {
3
- OrderDiscountTrigger["USER"] = "USER";
4
- OrderDiscountTrigger["SYSTEM"] = "SYSTEM";
5
- })(OrderDiscountTrigger || (OrderDiscountTrigger = {}));
6
- //# sourceMappingURL=OrderDiscountTrigger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountTrigger.js","sourceRoot":"","sources":["../../src/db/OrderDiscountTrigger.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,yCAAiB,CAAA;AACnB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}
@@ -1,3 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- export declare const OrderDiscountsSchema: SimpleSchema;
3
- //# sourceMappingURL=OrderDiscountsSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountsSchema.d.ts","sourceRoot":"","sources":["../../src/db/OrderDiscountsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,eAAO,MAAM,oBAAoB,cAWhC,CAAC"}
@@ -1,12 +0,0 @@
1
- import { Schemas } from '@unchainedshop/utils';
2
- import SimpleSchema from 'simpl-schema';
3
- export const OrderDiscountsSchema = new SimpleSchema({
4
- orderId: String,
5
- code: String,
6
- trigger: { type: String, required: true },
7
- discountKey: { type: String, required: true },
8
- reservation: { type: Object, blackbox: true },
9
- ...Schemas.contextFields,
10
- ...Schemas.timestampFields,
11
- }, { requiredByDefault: false });
12
- //# sourceMappingURL=OrderDiscountsSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountsSchema.js","sourceRoot":"","sources":["../../src/db/OrderDiscountsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,YAAY,CAClD;IACE,OAAO,EAAE,MAAM;IACf,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IACzC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC7C,GAAG,OAAO,CAAC,aAAa;IACxB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
@@ -1,3 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- export declare const OrderPaymentsSchema: SimpleSchema;
3
- //# sourceMappingURL=OrderPaymentsSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPaymentsSchema.d.ts","sourceRoot":"","sources":["../../src/db/OrderPaymentsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAUxC,eAAO,MAAM,mBAAmB,cAY/B,CAAC"}
@@ -1,20 +0,0 @@
1
- import { Schemas } from '@unchainedshop/utils';
2
- import SimpleSchema from 'simpl-schema';
3
- const calculationFields = {
4
- calculation: Array,
5
- 'calculation.$': {
6
- type: Object,
7
- blackbox: true,
8
- },
9
- };
10
- export const OrderPaymentsSchema = new SimpleSchema({
11
- orderId: String,
12
- paymentProviderId: String,
13
- paid: Date,
14
- status: String,
15
- ...calculationFields,
16
- ...Schemas.contextFields,
17
- ...Schemas.logFields,
18
- ...Schemas.timestampFields,
19
- }, { requiredByDefault: false });
20
- //# sourceMappingURL=OrderPaymentsSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPaymentsSchema.js","sourceRoot":"","sources":["../../src/db/OrderPaymentsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,iBAAiB,GAAG;IACxB,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,YAAY,CACjD;IACE,OAAO,EAAE,MAAM;IACf,iBAAiB,EAAE,MAAM;IACzB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,MAAM;IACd,GAAG,iBAAiB;IACpB,GAAG,OAAO,CAAC,aAAa;IACxB,GAAG,OAAO,CAAC,SAAS;IACpB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
@@ -1,3 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- export declare const OrderPositionsSchema: SimpleSchema;
3
- //# sourceMappingURL=OrderPositionsSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPositionsSchema.d.ts","sourceRoot":"","sources":["../../src/db/OrderPositionsSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAexC,eAAO,MAAM,oBAAoB,cAwBhC,CAAC"}
@@ -1,37 +0,0 @@
1
- import { Schemas } from '@unchainedshop/utils';
2
- import SimpleSchema from 'simpl-schema';
3
- const calculationFields = {
4
- calculation: Array,
5
- 'calculation.$': {
6
- type: Object,
7
- blackbox: true,
8
- },
9
- scheduling: Array,
10
- 'scheduling.$': {
11
- type: Object,
12
- blackbox: true,
13
- },
14
- };
15
- export const OrderPositionsSchema = new SimpleSchema({
16
- productId: String,
17
- orderId: String,
18
- originalProductId: { type: String },
19
- quotationId: { type: String },
20
- quantity: Number,
21
- configuration: Array,
22
- 'configuration.$': {
23
- type: Object,
24
- required: true,
25
- },
26
- 'configuration.$.key': {
27
- type: String,
28
- required: true,
29
- },
30
- 'configuration.$.value': {
31
- type: String,
32
- },
33
- ...calculationFields,
34
- ...Schemas.contextFields,
35
- ...Schemas.timestampFields,
36
- }, { requiredByDefault: false });
37
- //# sourceMappingURL=OrderPositionsSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPositionsSchema.js","sourceRoot":"","sources":["../../src/db/OrderPositionsSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,iBAAiB,GAAG;IACxB,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,UAAU,EAAE,KAAK;IACjB,cAAc,EAAE;QACd,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,YAAY,CAClD;IACE,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACnC,WAAW,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IAC7B,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,KAAK;IACpB,iBAAiB,EAAE;QACjB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,qBAAqB,EAAE;QACrB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;IACD,uBAAuB,EAAE;QACvB,IAAI,EAAE,MAAM;KACb;IACD,GAAG,iBAAiB;IACpB,GAAG,OAAO,CAAC,aAAa;IACxB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
@@ -1,3 +0,0 @@
1
- import SimpleSchema from 'simpl-schema';
2
- export declare const OrdersSchema: SimpleSchema;
3
- //# sourceMappingURL=OrdersSchema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrdersSchema.d.ts","sourceRoot":"","sources":["../../src/db/OrdersSchema.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAUxC,eAAO,MAAM,YAAY,cAsBxB,CAAC"}
@@ -1,30 +0,0 @@
1
- import { Schemas } from '@unchainedshop/utils';
2
- import SimpleSchema from 'simpl-schema';
3
- const calculationFields = {
4
- calculation: Array,
5
- 'calculation.$': {
6
- type: Object,
7
- blackbox: true,
8
- },
9
- };
10
- export const OrdersSchema = new SimpleSchema({
11
- billingAddress: Schemas.Address,
12
- confirmed: Date,
13
- rejected: Date,
14
- contact: Schemas.Contact,
15
- countryCode: String,
16
- currency: String,
17
- deliveryId: String,
18
- fullfilled: Date,
19
- ordered: Date,
20
- orderNumber: String,
21
- originEnrollmentId: String,
22
- paymentId: String,
23
- status: String,
24
- userId: String,
25
- ...calculationFields,
26
- ...Schemas.contextFields,
27
- ...Schemas.logFields,
28
- ...Schemas.timestampFields,
29
- }, { requiredByDefault: false });
30
- //# sourceMappingURL=OrdersSchema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrdersSchema.js","sourceRoot":"","sources":["../../src/db/OrdersSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,YAAY,MAAM,cAAc,CAAC;AAExC,MAAM,iBAAiB,GAAG;IACxB,WAAW,EAAE,KAAK;IAClB,eAAe,EAAE;QACf,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,YAAY,CAC1C;IACE,cAAc,EAAE,OAAO,CAAC,OAAO;IAC/B,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,WAAW,EAAE,MAAM;IACnB,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,kBAAkB,EAAE,MAAM;IAC1B,SAAS,EAAE,MAAM;IACjB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,MAAM;IACd,GAAG,iBAAiB;IACpB,GAAG,OAAO,CAAC,aAAa;IACxB,GAAG,OAAO,CAAC,SAAS;IACpB,GAAG,OAAO,CAAC,eAAe;CAC3B,EACD,EAAE,iBAAiB,EAAE,KAAK,EAAE,CAC7B,CAAC"}
@@ -1,4 +0,0 @@
1
- import { IDiscountAdapter } from '@unchainedshop/types/discount.js';
2
- import { OrderDiscountConfiguration } from './OrderDiscountConfiguration.js';
3
- export declare const OrderDiscountAdapter: Omit<IDiscountAdapter<OrderDiscountConfiguration>, 'key' | 'label' | 'version'>;
4
- //# sourceMappingURL=OrderDiscountAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountAdapter.d.ts","sourceRoot":"","sources":["../../src/director/OrderDiscountAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,eAAO,MAAM,oBAAoB,EAAE,IAAI,CACrC,gBAAgB,CAAC,0BAA0B,CAAC,EAC5C,KAAK,GAAG,OAAO,GAAG,SAAS,CACN,CAAC"}
@@ -1,3 +0,0 @@
1
- import { BaseDiscountAdapter } from '@unchainedshop/utils';
2
- export const OrderDiscountAdapter = BaseDiscountAdapter;
3
- //# sourceMappingURL=OrderDiscountAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountAdapter.js","sourceRoot":"","sources":["../../src/director/OrderDiscountAdapter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG3D,MAAM,CAAC,MAAM,oBAAoB,GAG7B,mBAAmB,CAAC"}
@@ -1,6 +0,0 @@
1
- export interface OrderDiscountConfiguration {
2
- fixedRate?: number;
3
- rate?: number;
4
- isNetPrice?: boolean;
5
- }
6
- //# sourceMappingURL=OrderDiscountConfiguration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountConfiguration.d.ts","sourceRoot":"","sources":["../../src/director/OrderDiscountConfiguration.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=OrderDiscountConfiguration.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountConfiguration.js","sourceRoot":"","sources":["../../src/director/OrderDiscountConfiguration.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- import { OrderDiscountConfiguration } from './OrderDiscountConfiguration.js';
2
- export declare const OrderDiscountDirector: import("@unchainedshop/types/discount.js").IDiscountDirector<OrderDiscountConfiguration>;
3
- //# sourceMappingURL=OrderDiscountDirector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountDirector.d.ts","sourceRoot":"","sources":["../../src/director/OrderDiscountDirector.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,eAAO,MAAM,qBAAqB,0FACyC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { BaseDiscountDirector } from '@unchainedshop/utils';
2
- export const OrderDiscountDirector = BaseDiscountDirector('OrderDiscountDirector');
3
- //# sourceMappingURL=OrderDiscountDirector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderDiscountDirector.js","sourceRoot":"","sources":["../../src/director/OrderDiscountDirector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG5D,MAAM,CAAC,MAAM,qBAAqB,GAChC,oBAAoB,CAA6B,uBAAuB,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import { IOrderPricingSheet, OrderPricingAdapterContext, OrderPricingCalculation } from '@unchainedshop/types/orders.pricing.js';
2
- import { IPricingAdapter } from '@unchainedshop/types/pricing.js';
3
- export declare const OrderPricingAdapter: IPricingAdapter<OrderPricingAdapterContext, OrderPricingCalculation, IOrderPricingSheet>;
4
- //# sourceMappingURL=OrderPricingAdapter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingAdapter.d.ts","sourceRoot":"","sources":["../../src/director/OrderPricingAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,eAAO,MAAM,mBAAmB,EAAE,eAAe,CAC/C,0BAA0B,EAC1B,uBAAuB,EACvB,kBAAkB,CA0BnB,CAAC"}
@@ -1,25 +0,0 @@
1
- import { BasePricingAdapter } from '@unchainedshop/utils';
2
- import { OrderPricingSheet } from './OrderPricingSheet.js';
3
- const basePricingAdapter = BasePricingAdapter();
4
- export const OrderPricingAdapter = {
5
- ...basePricingAdapter,
6
- isActivatedFor: () => {
7
- return false;
8
- },
9
- actions: (params) => {
10
- const { context } = params;
11
- const { currency } = context;
12
- const baseActions = basePricingAdapter.actions(params);
13
- const resultSheet = OrderPricingSheet({ currency });
14
- return {
15
- ...baseActions,
16
- calculate: async () => {
17
- const resultRaw = resultSheet.getRawPricingSheet();
18
- resultRaw.forEach(({ amount, category }) => basePricingAdapter.log(`Order Pricing Calculation -> ${category} ${amount}`));
19
- return resultRaw;
20
- },
21
- resultSheet: () => resultSheet,
22
- };
23
- },
24
- };
25
- //# sourceMappingURL=OrderPricingAdapter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingAdapter.js","sourceRoot":"","sources":["../../src/director/OrderPricingAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,kBAAkB,GAAG,kBAAkB,EAAuD,CAAC;AAErG,MAAM,CAAC,MAAM,mBAAmB,GAI5B;IACF,GAAG,kBAAkB;IAErB,cAAc,EAAE,GAAG,EAAE;QACnB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,EAAE,CAAC,MAAM,EAAE,EAAE;QAClB,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;QAC3B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC;QAC7B,MAAM,WAAW,GAAG,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACvD,MAAM,WAAW,GAAG,iBAAiB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEpD,OAAO;YACL,GAAG,WAAW;YACd,SAAS,EAAE,KAAK,IAAI,EAAE;gBACpB,MAAM,SAAS,GAAG,WAAW,CAAC,kBAAkB,EAAE,CAAC;gBACnD,SAAS,CAAC,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CACzC,kBAAkB,CAAC,GAAG,CAAC,gCAAgC,QAAQ,IAAI,MAAM,EAAE,CAAC,CAC7E,CAAC;gBACF,OAAO,SAAS,CAAC;YACnB,CAAC;YACD,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW;SAC/B,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { IOrderPricingDirector } from '@unchainedshop/types/orders.pricing.js';
2
- export declare const OrderPricingDirector: IOrderPricingDirector;
3
- //# sourceMappingURL=OrderPricingDirector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingDirector.d.ts","sourceRoot":"","sources":["../../src/director/OrderPricingDirector.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EAItB,MAAM,wCAAwC,CAAC;AAWhD,eAAO,MAAM,oBAAoB,EAAE,qBAsClC,CAAC"}
@@ -1,39 +0,0 @@
1
- import { BasePricingDirector } from '@unchainedshop/utils';
2
- import { OrderPricingSheet } from './OrderPricingSheet.js';
3
- const baseDirector = BasePricingDirector('OrderPricingDirector');
4
- export const OrderPricingDirector = {
5
- ...baseDirector,
6
- buildPricingContext: async (context, unchainedAPI) => {
7
- const { modules } = unchainedAPI;
8
- const { order } = context;
9
- const user = await modules.users.findUserById(order.userId);
10
- const discounts = await modules.orders.discounts.findOrderDiscounts({
11
- orderId: order._id,
12
- });
13
- return {
14
- ...unchainedAPI,
15
- country: order.countryCode,
16
- currency: order.currency,
17
- discounts,
18
- order,
19
- orderDelivery: context.orderDelivery,
20
- orderPayment: context.orderPayment,
21
- orderPositions: context.orderPositions,
22
- user,
23
- };
24
- },
25
- async actions(pricingContext, unchainedAPI) {
26
- const actions = await baseDirector.actions(pricingContext, unchainedAPI, this.buildPricingContext);
27
- return {
28
- ...actions,
29
- calculationSheet() {
30
- const context = actions.getContext();
31
- return OrderPricingSheet({
32
- calculation: actions.getCalculation(),
33
- currency: context.currency,
34
- });
35
- },
36
- };
37
- },
38
- };
39
- //# sourceMappingURL=OrderPricingDirector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingDirector.js","sourceRoot":"","sources":["../../src/director/OrderPricingDirector.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,YAAY,GAAG,mBAAmB,CAKtC,sBAAsB,CAAC,CAAC;AAE1B,MAAM,CAAC,MAAM,oBAAoB,GAA0B;IACzD,GAAG,YAAY;IAEf,mBAAmB,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,EAAE;QACnD,MAAM,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC;QACjC,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;QAE1B,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,kBAAkB,CAAC;YAClE,OAAO,EAAE,KAAK,CAAC,GAAG;SACnB,CAAC,CAAC;QAEH,OAAO;YACL,GAAG,YAAY;YACf,OAAO,EAAE,KAAK,CAAC,WAAW;YAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS;YACT,KAAK;YACL,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,cAAc,EAAE,OAAO,CAAC,cAAc;YACtC,IAAI;SACL,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,YAAY;QACxC,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE,YAAY,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC;QACnG,OAAO;YACL,GAAG,OAAO;YACV,gBAAgB;gBACd,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;gBACrC,OAAO,iBAAiB,CAAC;oBACvB,WAAW,EAAE,OAAO,CAAC,cAAc,EAAE;oBACrC,QAAQ,EAAE,OAAO,CAAC,QAAQ;iBAC3B,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,4 +0,0 @@
1
- import { OrderPricingCalculation, IOrderPricingSheet } from '@unchainedshop/types/orders.pricing.js';
2
- import { PricingSheetParams } from '@unchainedshop/types/pricing.js';
3
- export declare const OrderPricingSheet: (params: PricingSheetParams<OrderPricingCalculation>) => IOrderPricingSheet;
4
- //# sourceMappingURL=OrderPricingSheet.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingSheet.d.ts","sourceRoot":"","sources":["../../src/director/OrderPricingSheet.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EAEvB,kBAAkB,EACnB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAqB,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAExF,eAAO,MAAM,iBAAiB,WACpB,kBAAkB,CAAC,uBAAuB,CAAC,KAClD,kBAoHF,CAAC"}
@@ -1,101 +0,0 @@
1
- import { BasePricingSheet } from '@unchainedshop/utils';
2
- import { OrderPricingRowCategory, } from '@unchainedshop/types/orders.pricing.js';
3
- export const OrderPricingSheet = (params) => {
4
- const basePricingSheet = BasePricingSheet(params);
5
- const addTaxIfAvailabile = (category, taxAmount, meta, discountId) => {
6
- if (taxAmount) {
7
- basePricingSheet.calculation.push({
8
- category: OrderPricingRowCategory.Taxes,
9
- amount: taxAmount,
10
- baseCategory: category,
11
- discountId,
12
- meta,
13
- });
14
- }
15
- };
16
- const pricingSheet = {
17
- ...basePricingSheet,
18
- addItems({ amount, taxAmount, meta }) {
19
- basePricingSheet.calculation.push({
20
- category: OrderPricingRowCategory.Items,
21
- amount,
22
- meta,
23
- });
24
- addTaxIfAvailabile(OrderPricingRowCategory.Items, taxAmount, meta);
25
- },
26
- addDiscount({ amount, taxAmount, discountId, meta }) {
27
- basePricingSheet.calculation.push({
28
- category: OrderPricingRowCategory.Discounts,
29
- amount,
30
- discountId,
31
- meta,
32
- });
33
- addTaxIfAvailabile(OrderPricingRowCategory.Discounts, taxAmount, meta, discountId);
34
- },
35
- addDelivery({ amount, taxAmount, meta }) {
36
- basePricingSheet.calculation.push({
37
- category: OrderPricingRowCategory.Delivery,
38
- amount,
39
- meta,
40
- });
41
- addTaxIfAvailabile(OrderPricingRowCategory.Delivery, taxAmount, meta);
42
- },
43
- addPayment({ amount, taxAmount, meta }) {
44
- basePricingSheet.calculation.push({
45
- category: OrderPricingRowCategory.Payment,
46
- amount,
47
- meta,
48
- });
49
- addTaxIfAvailabile(OrderPricingRowCategory.Payment, taxAmount, meta);
50
- },
51
- taxSum(filter) {
52
- return basePricingSheet.sum({
53
- category: OrderPricingRowCategory.Taxes,
54
- ...(filter || {}),
55
- });
56
- },
57
- gross() {
58
- // tax is included 2 times, this is only true for Order Pricing!
59
- return basePricingSheet.sum() - this.taxSum();
60
- },
61
- net() {
62
- return basePricingSheet.sum() - this.taxSum() - this.taxSum();
63
- },
64
- total({ category, useNetPrice, discountId } = { useNetPrice: false }) {
65
- const taxAmount = this.taxSum({ baseCategory: category, discountId });
66
- const amount = this.sum({ category, discountId }) - taxAmount;
67
- // Sum does not contain taxes when filtering by category, it's net in that case and gross if there is no category
68
- const netAmount = !category ? amount - taxAmount : amount;
69
- return {
70
- amount: Math.round(useNetPrice ? netAmount : netAmount + taxAmount),
71
- currency: this.currency,
72
- };
73
- },
74
- discountPrices(explicitDiscountId) {
75
- const discountIds = pricingSheet
76
- .filterBy({
77
- category: OrderPricingRowCategory.Discounts,
78
- discountId: explicitDiscountId,
79
- })
80
- .map(({ discountId }) => discountId);
81
- return [...new Set(discountIds)]
82
- .map((discountId) => {
83
- const amount = basePricingSheet.sum({
84
- category: OrderPricingRowCategory.Discounts,
85
- discountId,
86
- });
87
- if (!amount) {
88
- return null;
89
- }
90
- return {
91
- discountId,
92
- amount: Math.round(amount),
93
- currency: basePricingSheet.currency,
94
- };
95
- })
96
- .filter(Boolean);
97
- },
98
- };
99
- return pricingSheet;
100
- };
101
- //# sourceMappingURL=OrderPricingSheet.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OrderPricingSheet.js","sourceRoot":"","sources":["../../src/director/OrderPricingSheet.ts"],"names":[],"mappings":"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"}
@@ -1,3 +0,0 @@
1
- import { MigrationRepository } from '@unchainedshop/mongodb';
2
- export default function renameCurrencyCode(repository: MigrationRepository): void;
3
- //# sourceMappingURL=20250502111800-currency-code%20copy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"20250502111800-currency-code copy.d.ts","sourceRoot":"","sources":["../../src/migrations/20250502111800-currency-code copy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,UAAU,EAAE,mBAAmB,QAczE"}
@@ -1,14 +0,0 @@
1
- import { OrdersCollection } from '../orders-index.js';
2
- export default function renameCurrencyCode(repository) {
3
- repository?.register({
4
- id: 20250502111800,
5
- name: 'Rename order.currency to order.currencyCode',
6
- up: async () => {
7
- const Orders = await OrdersCollection(repository.db);
8
- await Orders.updateMany({}, {
9
- $rename: { currency: 'currencyCode' },
10
- });
11
- },
12
- });
13
- }
14
- //# sourceMappingURL=20250502111800-currency-code%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"20250502111800-currency-code copy.js","sourceRoot":"","sources":["../../src/migrations/20250502111800-currency-code copy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,UAA+B;IACxE,UAAU,EAAE,QAAQ,CAAC;QACnB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,6CAA6C;QACnD,EAAE,EAAE,KAAK,IAAI,EAAE;YACb,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACrD,MAAM,MAAM,CAAC,UAAU,CACrB,EAAE,EACF;gBACE,OAAO,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE;aACtC,CACF,CAAC;QACJ,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,3 +0,0 @@
1
- import { MigrationRepository } from '@unchainedshop/mongodb';
2
- export default function enforcePositionConfig(repository: MigrationRepository): void;
3
- //# sourceMappingURL=20251020080000-position-config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"20251020080000-position-config.d.ts","sourceRoot":"","sources":["../../src/migrations/20251020080000-position-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAG7D,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,UAAU,EAAE,mBAAmB,QAW5E"}
@@ -1,14 +0,0 @@
1
- import { OrderPositionsCollection } from '../orders-index.js';
2
- export default function enforcePositionConfig(repository) {
3
- repository?.register({
4
- id: 20251020080000,
5
- name: 'Make sure all order positions have at least an empty array as configuration',
6
- up: async () => {
7
- const OrderPositions = await OrderPositionsCollection(repository.db);
8
- await OrderPositions.updateMany({ configuration: null }, {
9
- $set: { configuration: [] },
10
- });
11
- },
12
- });
13
- }
14
- //# sourceMappingURL=20251020080000-position-config.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"20251020080000-position-config.js","sourceRoot":"","sources":["../../src/migrations/20251020080000-position-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,UAA+B;IAC3E,UAAU,EAAE,QAAQ,CAAC;QACnB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,6EAA6E;QACnF,EAAE,EAAE,KAAK,IAAI,EAAE;YACb,MAAM,cAAc,GAAG,MAAM,wBAAwB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YACrE,MAAM,cAAc,CAAC,UAAU,CAAC,EAAE,aAAa,EAAE,IAAI,EAAS,EAAE;gBAC9D,IAAI,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE;aAC5B,CAAC,CAAC;QACL,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,14 +0,0 @@
1
- import { mongodb } from '@unchainedshop/mongodb';
2
- import { Order, OrderProcessing } from '@unchainedshop/types/orders.js';
3
- import type { Locker } from '@kontsedal/locco';
4
- import { OrderDelivery } from '@unchainedshop/types/orders.deliveries.js';
5
- import { OrderPayment } from '@unchainedshop/types/orders.payments.js';
6
- import { OrderPosition } from '@unchainedshop/types/orders.positions.js';
7
- export declare const configureOrderModuleProcessing: ({ Orders, OrderPositions, OrderDeliveries, OrderPayments, locker, }: {
8
- Orders: mongodb.Collection<Order>;
9
- OrderPositions: mongodb.Collection<OrderPosition>;
10
- OrderDeliveries: mongodb.Collection<OrderDelivery>;
11
- OrderPayments: mongodb.Collection<OrderPayment>;
12
- locker: Locker;
13
- }) => OrderProcessing;
14
- //# sourceMappingURL=configureOrdersModule-processing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"configureOrdersModule-processing.d.ts","sourceRoot":"","sources":["../../src/module/configureOrdersModule-processing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwB,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,KAAK,EAAe,eAAe,EAAgB,MAAM,gCAAgC,CAAC;AACnG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAczE,eAAO,MAAM,8BAA8B,wEAMxC;IACD,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,cAAc,EAAE,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IAClD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACnD,aAAa,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,EAAE,MAAM,CAAC;CAChB,KAAG,eA6cH,CAAC"}