@medusajs/promotion 0.0.5-snapshot-20240916110643 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -5
- package/dist/initialize/index.d.ts +5 -0
- package/dist/initialize/index.d.ts.map +1 -0
- package/dist/initialize/index.js +16 -0
- package/dist/joiner-config.d.ts +8 -1
- package/dist/joiner-config.d.ts.map +1 -1
- package/dist/joiner-config.js +35 -9
- package/dist/loaders/connection.d.ts +5 -0
- package/dist/loaders/connection.d.ts.map +1 -0
- package/dist/loaders/connection.js +41 -0
- package/dist/loaders/container.d.ts +3 -0
- package/dist/loaders/container.d.ts.map +1 -0
- package/dist/loaders/container.js +34 -0
- package/dist/loaders/index.d.ts +3 -0
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/index.js +18 -0
- package/dist/migrations/Migration20240227120221.d.ts.map +1 -1
- package/dist/migrations/Migration20240227120221.js +2 -10
- package/dist/models/application-method.d.ts +6 -4
- package/dist/models/application-method.d.ts.map +1 -1
- package/dist/models/application-method.js +6 -16
- package/dist/models/campaign-budget.d.ts +5 -6
- package/dist/models/campaign-budget.d.ts.map +1 -1
- package/dist/models/campaign-budget.js +4 -8
- package/dist/models/campaign.d.ts +4 -3
- package/dist/models/campaign.d.ts.map +1 -1
- package/dist/models/campaign.js +13 -10
- package/dist/models/promotion-rule-value.d.ts +1 -2
- package/dist/models/promotion-rule-value.d.ts.map +1 -1
- package/dist/models/promotion-rule-value.js +1 -1
- package/dist/models/promotion-rule.d.ts +1 -1
- package/dist/models/promotion-rule.d.ts.map +1 -1
- package/dist/models/promotion.d.ts +4 -5
- package/dist/models/promotion.d.ts.map +1 -1
- package/dist/models/promotion.js +4 -8
- package/dist/module-definition.d.ts +5 -0
- package/dist/module-definition.d.ts.map +1 -0
- package/dist/module-definition.js +50 -0
- package/dist/repositories/campaign.d.ts +16 -0
- package/dist/repositories/campaign.d.ts.map +1 -0
- package/dist/repositories/campaign.js +90 -0
- package/dist/repositories/index.d.ts +3 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/index.js +7 -0
- package/dist/services/promotion-module.d.ts +26 -41
- package/dist/services/promotion-module.d.ts.map +1 -1
- package/dist/services/promotion-module.js +72 -271
- package/dist/types/application-method.d.ts +10 -12
- package/dist/types/application-method.d.ts.map +1 -1
- package/dist/types/campaign-budget.d.ts +6 -8
- package/dist/types/campaign-budget.d.ts.map +1 -1
- package/dist/types/campaign.d.ts +8 -6
- package/dist/types/campaign.d.ts.map +1 -1
- package/dist/types/promotion.d.ts +2 -2
- package/dist/types/promotion.d.ts.map +1 -1
- package/dist/utils/compute-actions/buy-get.d.ts +3 -6
- package/dist/utils/compute-actions/buy-get.d.ts.map +1 -1
- package/dist/utils/compute-actions/buy-get.js +30 -94
- package/dist/utils/compute-actions/line-items.d.ts.map +1 -1
- package/dist/utils/compute-actions/line-items.js +5 -5
- package/dist/utils/compute-actions/shipping-methods.d.ts +2 -2
- package/dist/utils/compute-actions/shipping-methods.d.ts.map +1 -1
- package/dist/utils/compute-actions/shipping-methods.js +18 -16
- package/dist/utils/compute-actions/usage.d.ts +3 -2
- package/dist/utils/compute-actions/usage.d.ts.map +1 -1
- package/dist/utils/compute-actions/usage.js +11 -4
- package/dist/utils/validations/application-method.d.ts.map +1 -1
- package/dist/utils/validations/application-method.js +2 -2
- package/dist/utils/validations/promotion-rule.d.ts +2 -2
- package/dist/utils/validations/promotion-rule.d.ts.map +1 -1
- package/dist/utils/validations/promotion-rule.js +2 -22
- package/package.json +14 -9
- package/dist/migrations/Migration20240617102917.d.ts +0 -6
- package/dist/migrations/Migration20240617102917.d.ts.map +0 -1
- package/dist/migrations/Migration20240617102917.js +0 -15
- package/dist/migrations/Migration20240624153824.d.ts +0 -6
- package/dist/migrations/Migration20240624153824.d.ts.map +0 -1
- package/dist/migrations/Migration20240624153824.js +0 -15
- package/dist/schema/index.d.ts +0 -3
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js +0 -98
package/dist/schema/index.d.ts
DELETED
@@ -1,3 +0,0 @@
|
|
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
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";AAAA,wBA+FC"}
|
package/dist/schema/index.js
DELETED
@@ -1,98 +0,0 @@
|
|
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
|
-
`;
|