@medusajs/promotion 0.0.5-snapshot-20240905140403 → 0.0.5-snapshot-20240906075935

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,uOAEvB,CAAA"}
1
+ {"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,YAAY,uOAGvB,CAAA"}
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  exports.joinerConfig = void 0;
4
7
  const utils_1 = require("@medusajs/utils");
5
8
  const _models_1 = require("./models");
9
+ const schema_1 = __importDefault(require("./schema"));
6
10
  exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.PROMOTION, {
11
+ schema: schema_1.default,
7
12
  models: [_models_1.Promotion, _models_1.Campaign, _models_1.PromotionRule],
8
13
  });
@@ -0,0 +1,3 @@
1
+ declare const _default: "\nenum PromotionTypeValues {\n standard\n buyget\n}\n\nenum PromotionRuleOperatorValues {\n gt\n lt\n eq\n ne\n in\n lte\n gte\n}\n\nenum CampaignBudgetTypeValues {\n spend\n usage\n}\n\nenum ApplicationMethodTypeValues {\n fixed\n percentage\n}\n\nenum ApplicationMethodTargetTypeValues {\n order\n shipping_methods\n items\n}\n\nenum ApplicationMethodAllocationValues {\n each\n across\n}\n\ntype Promotion {\n id: ID!\n code: String\n type: PromotionTypeValues\n is_automatic: Boolean\n application_method: ApplicationMethod\n rules: [PromotionRule]\n campaign_id: String\n campaign: Campaign\n}\n\ntype PromotionRule {\n id: ID!\n description: String\n attribute: String\n operator: PromotionRuleOperatorValues\n values: [PromotionRuleValue!]!\n}\n\ntype PromotionRuleValue {\n id: ID!\n value: String\n}\n\ntype Campaign {\n id: ID!\n name: String\n description: String\n campaign_identifier: String\n starts_at: DateTime\n ends_at: DateTime\n budget: CampaignBudget\n promotions: [Promotion]\n}\n\ntype CampaignBudget {\n id: ID!\n type: CampaignBudgetTypeValues\n limit: Int\n used: Int\n currency_code: String\n}\n\ntype ApplicationMethod {\n id: ID!\n type: ApplicationMethodTypeValues\n target_type: ApplicationMethodTargetTypeValues\n allocation: ApplicationMethodAllocationValues\n value: Float\n currency_code: String\n max_quantity: Int\n buy_rules_min_quantity: Int\n apply_to_quantity: Int\n promotion: Promotion\n target_rules: [PromotionRule]\n buy_rules: [PromotionRule]\n}\n\n";
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";AAAA,wBA+FC"}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = `
4
+ enum PromotionTypeValues {
5
+ standard
6
+ buyget
7
+ }
8
+
9
+ enum PromotionRuleOperatorValues {
10
+ gt
11
+ lt
12
+ eq
13
+ ne
14
+ in
15
+ lte
16
+ gte
17
+ }
18
+
19
+ enum CampaignBudgetTypeValues {
20
+ spend
21
+ usage
22
+ }
23
+
24
+ enum ApplicationMethodTypeValues {
25
+ fixed
26
+ percentage
27
+ }
28
+
29
+ enum ApplicationMethodTargetTypeValues {
30
+ order
31
+ shipping_methods
32
+ items
33
+ }
34
+
35
+ enum ApplicationMethodAllocationValues {
36
+ each
37
+ across
38
+ }
39
+
40
+ type Promotion {
41
+ id: ID!
42
+ code: String
43
+ type: PromotionTypeValues
44
+ is_automatic: Boolean
45
+ application_method: ApplicationMethod
46
+ rules: [PromotionRule]
47
+ campaign_id: String
48
+ campaign: Campaign
49
+ }
50
+
51
+ type PromotionRule {
52
+ id: ID!
53
+ description: String
54
+ attribute: String
55
+ operator: PromotionRuleOperatorValues
56
+ values: [PromotionRuleValue!]!
57
+ }
58
+
59
+ type PromotionRuleValue {
60
+ id: ID!
61
+ value: String
62
+ }
63
+
64
+ type Campaign {
65
+ id: ID!
66
+ name: String
67
+ description: String
68
+ campaign_identifier: String
69
+ starts_at: DateTime
70
+ ends_at: DateTime
71
+ budget: CampaignBudget
72
+ promotions: [Promotion]
73
+ }
74
+
75
+ type CampaignBudget {
76
+ id: ID!
77
+ type: CampaignBudgetTypeValues
78
+ limit: Int
79
+ used: Int
80
+ currency_code: String
81
+ }
82
+
83
+ type ApplicationMethod {
84
+ id: ID!
85
+ type: ApplicationMethodTypeValues
86
+ target_type: ApplicationMethodTargetTypeValues
87
+ allocation: ApplicationMethodAllocationValues
88
+ value: Float
89
+ currency_code: String
90
+ max_quantity: Int
91
+ buy_rules_min_quantity: Int
92
+ apply_to_quantity: Int
93
+ promotion: Promotion
94
+ target_rules: [PromotionRule]
95
+ buy_rules: [PromotionRule]
96
+ }
97
+
98
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medusajs/promotion",
3
- "version": "0.0.5-snapshot-20240905140403",
3
+ "version": "0.0.5-snapshot-20240906075935",
4
4
  "description": "Medusa Promotion module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,11 +33,11 @@
33
33
  "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
34
34
  },
35
35
  "devDependencies": {
36
- "@medusajs/types": "1.12.0-snapshot-20240905140403",
36
+ "@medusajs/types": "1.12.0-snapshot-20240906075935",
37
37
  "@mikro-orm/cli": "5.9.7",
38
38
  "cross-env": "^5.2.1",
39
39
  "jest": "^29.7.0",
40
- "medusa-test-utils": "1.1.45-snapshot-20240905140403",
40
+ "medusa-test-utils": "1.1.45-snapshot-20240906075935",
41
41
  "rimraf": "^3.0.2",
42
42
  "ts-jest": "^29.1.1",
43
43
  "ts-node": "^10.9.1",
@@ -45,7 +45,7 @@
45
45
  "typescript": "^5.1.6"
46
46
  },
47
47
  "dependencies": {
48
- "@medusajs/utils": "1.12.0-snapshot-20240905140403"
48
+ "@medusajs/utils": "1.12.0-snapshot-20240906075935"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@mikro-orm/core": "5.9.7",