@voyantjs/pricing 0.6.7 → 0.6.9
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/schema-catalogs.d.ts.map +1 -1
- package/dist/schema-catalogs.js +7 -5
- package/dist/schema-categories.d.ts.map +1 -1
- package/dist/schema-categories.js +11 -7
- package/dist/schema-option-rules.d.ts.map +1 -1
- package/dist/schema-option-rules.js +33 -26
- package/dist/schema-policies.d.ts.map +1 -1
- package/dist/schema-policies.js +7 -4
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-catalogs.d.ts","sourceRoot":"","sources":["../src/schema-catalogs.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema-catalogs.d.ts","sourceRoot":"","sources":["../src/schema-catalogs.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBzB,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+B1B,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,aAAa,CAAC,YAAY,CAAA;AAC5D,MAAM,MAAM,eAAe,GAAG,OAAO,aAAa,CAAC,YAAY,CAAA;AAC/D,MAAM,MAAM,aAAa,GAAG,OAAO,cAAc,CAAC,YAAY,CAAA;AAC9D,MAAM,MAAM,gBAAgB,GAAG,OAAO,cAAc,CAAC,YAAY,CAAA"}
|
package/dist/schema-catalogs.js
CHANGED
|
@@ -15,9 +15,10 @@ export const priceCatalogs = pgTable("price_catalogs", {
|
|
|
15
15
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
16
16
|
}, (table) => [
|
|
17
17
|
uniqueIndex("uidx_price_catalogs_code").on(table.code),
|
|
18
|
-
index("
|
|
19
|
-
index("
|
|
20
|
-
index("
|
|
18
|
+
index("idx_price_catalogs_name").on(table.name),
|
|
19
|
+
index("idx_price_catalogs_currency_name").on(table.currencyCode, table.name),
|
|
20
|
+
index("idx_price_catalogs_type_name").on(table.catalogType, table.name),
|
|
21
|
+
index("idx_price_catalogs_active_name").on(table.active, table.name),
|
|
21
22
|
]);
|
|
22
23
|
export const priceSchedules = pgTable("price_schedules", {
|
|
23
24
|
id: typeId("price_schedules"),
|
|
@@ -38,7 +39,8 @@ export const priceSchedules = pgTable("price_schedules", {
|
|
|
38
39
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
39
40
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
40
41
|
}, (table) => [
|
|
41
|
-
index("
|
|
42
|
-
index("
|
|
42
|
+
index("idx_price_schedules_priority_name").on(table.priority, table.name),
|
|
43
|
+
index("idx_price_schedules_catalog_priority_name").on(table.priceCatalogId, table.priority, table.name),
|
|
44
|
+
index("idx_price_schedules_active_priority_name").on(table.active, table.priority, table.name),
|
|
43
45
|
uniqueIndex("uidx_price_schedules_catalog_code").on(table.priceCatalogId, table.code),
|
|
44
46
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-categories.d.ts","sourceRoot":"","sources":["../src/schema-categories.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema-categories.d.ts","sourceRoot":"","sources":["../src/schema-categories.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C7B,CAAA;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCvC,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACnE,MAAM,MAAM,kBAAkB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACtE,MAAM,MAAM,yBAAyB,GAAG,OAAO,2BAA2B,CAAC,YAAY,CAAA;AACvF,MAAM,MAAM,4BAA4B,GAAG,OAAO,2BAA2B,CAAC,YAAY,CAAA"}
|
|
@@ -21,11 +21,12 @@ export const pricingCategories = pgTable("pricing_categories", {
|
|
|
21
21
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
22
22
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
23
23
|
}, (table) => [
|
|
24
|
-
index("
|
|
25
|
-
index("
|
|
26
|
-
index("
|
|
27
|
-
index("
|
|
28
|
-
index("
|
|
24
|
+
index("idx_pricing_categories_sort_name").on(table.sortOrder, table.name),
|
|
25
|
+
index("idx_pricing_categories_product_sort_name").on(table.productId, table.sortOrder, table.name),
|
|
26
|
+
index("idx_pricing_categories_option_sort_name").on(table.optionId, table.sortOrder, table.name),
|
|
27
|
+
index("idx_pricing_categories_unit_sort_name").on(table.unitId, table.sortOrder, table.name),
|
|
28
|
+
index("idx_pricing_categories_type_sort_name").on(table.categoryType, table.sortOrder, table.name),
|
|
29
|
+
index("idx_pricing_categories_active_sort_name").on(table.active, table.sortOrder, table.name),
|
|
29
30
|
uniqueIndex("uidx_pricing_categories_option_code").on(table.optionId, table.code),
|
|
30
31
|
]);
|
|
31
32
|
export const pricingCategoryDependencies = pgTable("pricing_category_dependencies", {
|
|
@@ -44,7 +45,10 @@ export const pricingCategoryDependencies = pgTable("pricing_category_dependencie
|
|
|
44
45
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
45
46
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
46
47
|
}, (table) => [
|
|
47
|
-
index("
|
|
48
|
-
index("
|
|
48
|
+
index("idx_pricing_category_dependencies_created").on(table.createdAt),
|
|
49
|
+
index("idx_pricing_category_dependencies_category_created").on(table.pricingCategoryId, table.createdAt),
|
|
50
|
+
index("idx_pricing_category_dependencies_master_created").on(table.masterPricingCategoryId, table.createdAt),
|
|
51
|
+
index("idx_pricing_category_dependencies_type_created").on(table.dependencyType, table.createdAt),
|
|
52
|
+
index("idx_pricing_category_dependencies_active_created").on(table.active, table.createdAt),
|
|
49
53
|
uniqueIndex("uidx_pricing_category_dependencies_pair_type").on(table.pricingCategoryId, table.masterPricingCategoryId, table.dependencyType),
|
|
50
54
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-option-rules.d.ts","sourceRoot":"","sources":["../src/schema-option-rules.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema-option-rules.d.ts","sourceRoot":"","sources":["../src/schema-option-rules.ts"],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BAAkB,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AACrE,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AAC1E,MAAM,MAAM,sBAAsB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AAC7E,MAAM,MAAM,mBAAmB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AAC1E,MAAM,MAAM,sBAAsB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AAC7E,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA;AAChE,MAAM,MAAM,iBAAiB,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA;AACnE,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AAClE,MAAM,MAAM,kBAAkB,GAAG,OAAO,gBAAgB,CAAC,YAAY,CAAA;AACrE,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACpE,MAAM,MAAM,mBAAmB,GAAG,OAAO,iBAAiB,CAAC,YAAY,CAAA;AACvE,MAAM,MAAM,cAAc,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA;AAChE,MAAM,MAAM,iBAAiB,GAAG,OAAO,eAAe,CAAC,YAAY,CAAA"}
|
|
@@ -31,12 +31,14 @@ export const optionPriceRules = pgTable("option_price_rules", {
|
|
|
31
31
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
32
32
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
33
33
|
}, (table) => [
|
|
34
|
-
index("
|
|
35
|
-
index("
|
|
36
|
-
index("
|
|
37
|
-
index("
|
|
38
|
-
index("
|
|
39
|
-
index("
|
|
34
|
+
index("idx_option_price_rules_updated").on(table.updatedAt),
|
|
35
|
+
index("idx_option_price_rules_product_updated").on(table.productId, table.updatedAt),
|
|
36
|
+
index("idx_option_price_rules_option_updated").on(table.optionId, table.updatedAt),
|
|
37
|
+
index("idx_option_price_rules_catalog_updated").on(table.priceCatalogId, table.updatedAt),
|
|
38
|
+
index("idx_option_price_rules_schedule_updated").on(table.priceScheduleId, table.updatedAt),
|
|
39
|
+
index("idx_option_price_rules_policy_updated").on(table.cancellationPolicyId, table.updatedAt),
|
|
40
|
+
index("idx_option_price_rules_pricing_mode_updated").on(table.pricingMode, table.updatedAt),
|
|
41
|
+
index("idx_option_price_rules_active_updated").on(table.active, table.updatedAt),
|
|
40
42
|
uniqueIndex("uidx_option_price_rules_option_code").on(table.optionId, table.code),
|
|
41
43
|
]);
|
|
42
44
|
export const optionUnitPriceRules = pgTable("option_unit_price_rules", {
|
|
@@ -61,11 +63,11 @@ export const optionUnitPriceRules = pgTable("option_unit_price_rules", {
|
|
|
61
63
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
62
64
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
63
65
|
}, (table) => [
|
|
64
|
-
index("
|
|
65
|
-
index("
|
|
66
|
-
index("
|
|
67
|
-
index("
|
|
68
|
-
index("
|
|
66
|
+
index("idx_option_unit_price_rules_rule_sort_created").on(table.optionPriceRuleId, table.sortOrder, table.createdAt),
|
|
67
|
+
index("idx_option_unit_price_rules_option_sort_created").on(table.optionId, table.sortOrder, table.createdAt),
|
|
68
|
+
index("idx_option_unit_price_rules_unit_sort_created").on(table.unitId, table.sortOrder, table.createdAt),
|
|
69
|
+
index("idx_option_unit_price_rules_category_sort_created").on(table.pricingCategoryId, table.sortOrder, table.createdAt),
|
|
70
|
+
index("idx_option_unit_price_rules_active_sort_created").on(table.active, table.sortOrder, table.createdAt),
|
|
69
71
|
]);
|
|
70
72
|
export const optionStartTimeRules = pgTable("option_start_time_rules", {
|
|
71
73
|
id: typeId("option_start_time_rules"),
|
|
@@ -84,9 +86,11 @@ export const optionStartTimeRules = pgTable("option_start_time_rules", {
|
|
|
84
86
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
85
87
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
86
88
|
}, (table) => [
|
|
87
|
-
index("
|
|
88
|
-
index("
|
|
89
|
-
index("
|
|
89
|
+
index("idx_option_start_time_rules_created").on(table.createdAt),
|
|
90
|
+
index("idx_option_start_time_rules_rule_created").on(table.optionPriceRuleId, table.createdAt),
|
|
91
|
+
index("idx_option_start_time_rules_option_created").on(table.optionId, table.createdAt),
|
|
92
|
+
index("idx_option_start_time_rules_start_time_created").on(table.startTimeId, table.createdAt),
|
|
93
|
+
index("idx_option_start_time_rules_active_created").on(table.active, table.createdAt),
|
|
90
94
|
uniqueIndex("uidx_option_start_time_rules_rule_start_time").on(table.optionPriceRuleId, table.startTimeId),
|
|
91
95
|
]);
|
|
92
96
|
export const optionUnitTiers = pgTable("option_unit_tiers", {
|
|
@@ -103,8 +107,8 @@ export const optionUnitTiers = pgTable("option_unit_tiers", {
|
|
|
103
107
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
104
108
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
105
109
|
}, (table) => [
|
|
106
|
-
index("
|
|
107
|
-
index("
|
|
110
|
+
index("idx_option_unit_tiers_rule_sort_min_quantity").on(table.optionUnitPriceRuleId, table.sortOrder, table.minQuantity),
|
|
111
|
+
index("idx_option_unit_tiers_active_sort_min_quantity").on(table.active, table.sortOrder, table.minQuantity),
|
|
108
112
|
]);
|
|
109
113
|
export const pickupPriceRules = pgTable("pickup_price_rules", {
|
|
110
114
|
id: typeId("pickup_price_rules"),
|
|
@@ -122,9 +126,10 @@ export const pickupPriceRules = pgTable("pickup_price_rules", {
|
|
|
122
126
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
123
127
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
124
128
|
}, (table) => [
|
|
125
|
-
index("
|
|
126
|
-
index("
|
|
127
|
-
index("
|
|
129
|
+
index("idx_pickup_price_rules_rule_sort_created").on(table.optionPriceRuleId, table.sortOrder, table.createdAt),
|
|
130
|
+
index("idx_pickup_price_rules_option_sort_created").on(table.optionId, table.sortOrder, table.createdAt),
|
|
131
|
+
index("idx_pickup_price_rules_pickup_sort_created").on(table.pickupPointId, table.sortOrder, table.createdAt),
|
|
132
|
+
index("idx_pickup_price_rules_active_sort_created").on(table.active, table.sortOrder, table.createdAt),
|
|
128
133
|
uniqueIndex("uidx_pickup_price_rules_rule_pickup").on(table.optionPriceRuleId, table.pickupPointId),
|
|
129
134
|
]);
|
|
130
135
|
export const dropoffPriceRules = pgTable("dropoff_price_rules", {
|
|
@@ -145,9 +150,10 @@ export const dropoffPriceRules = pgTable("dropoff_price_rules", {
|
|
|
145
150
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
146
151
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
147
152
|
}, (table) => [
|
|
148
|
-
index("
|
|
149
|
-
index("
|
|
150
|
-
index("
|
|
153
|
+
index("idx_dropoff_price_rules_rule_sort_created").on(table.optionPriceRuleId, table.sortOrder, table.createdAt),
|
|
154
|
+
index("idx_dropoff_price_rules_option_sort_created").on(table.optionId, table.sortOrder, table.createdAt),
|
|
155
|
+
index("idx_dropoff_price_rules_facility_sort_created").on(table.facilityId, table.sortOrder, table.createdAt),
|
|
156
|
+
index("idx_dropoff_price_rules_active_sort_created").on(table.active, table.sortOrder, table.createdAt),
|
|
151
157
|
]);
|
|
152
158
|
export const extraPriceRules = pgTable("extra_price_rules", {
|
|
153
159
|
id: typeId("extra_price_rules"),
|
|
@@ -167,8 +173,9 @@ export const extraPriceRules = pgTable("extra_price_rules", {
|
|
|
167
173
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
168
174
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
169
175
|
}, (table) => [
|
|
170
|
-
index("
|
|
171
|
-
index("
|
|
172
|
-
index("
|
|
173
|
-
index("
|
|
176
|
+
index("idx_extra_price_rules_rule_sort_created").on(table.optionPriceRuleId, table.sortOrder, table.createdAt),
|
|
177
|
+
index("idx_extra_price_rules_option_sort_created").on(table.optionId, table.sortOrder, table.createdAt),
|
|
178
|
+
index("idx_extra_price_rules_product_extra_sort_created").on(table.productExtraId, table.sortOrder, table.createdAt),
|
|
179
|
+
index("idx_extra_price_rules_option_extra_config_sort_created").on(table.optionExtraConfigId, table.sortOrder, table.createdAt),
|
|
180
|
+
index("idx_extra_price_rules_active_sort_created").on(table.active, table.sortOrder, table.createdAt),
|
|
174
181
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-policies.d.ts","sourceRoot":"","sources":["../src/schema-policies.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schema-policies.d.ts","sourceRoot":"","sources":["../src/schema-policies.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsBhC,CAAA;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BnC,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AACzE,MAAM,MAAM,qBAAqB,GAAG,OAAO,oBAAoB,CAAC,YAAY,CAAA;AAC5E,MAAM,MAAM,sBAAsB,GAAG,OAAO,uBAAuB,CAAC,YAAY,CAAA;AAChF,MAAM,MAAM,yBAAyB,GAAG,OAAO,uBAAuB,CAAC,YAAY,CAAA"}
|
package/dist/schema-policies.js
CHANGED
|
@@ -14,8 +14,10 @@ export const cancellationPolicies = pgTable("cancellation_policies", {
|
|
|
14
14
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
15
15
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
16
16
|
}, (table) => [
|
|
17
|
-
index("
|
|
18
|
-
index("
|
|
17
|
+
index("idx_cancellation_policies_updated").on(table.updatedAt),
|
|
18
|
+
index("idx_cancellation_policies_type_updated").on(table.policyType, table.updatedAt),
|
|
19
|
+
index("idx_cancellation_policies_active_updated").on(table.active, table.updatedAt),
|
|
20
|
+
index("idx_cancellation_policies_default_updated").on(table.isDefault, table.updatedAt),
|
|
19
21
|
uniqueIndex("uidx_cancellation_policies_code").on(table.code),
|
|
20
22
|
]);
|
|
21
23
|
export const cancellationPolicyRules = pgTable("cancellation_policy_rules", {
|
|
@@ -33,6 +35,7 @@ export const cancellationPolicyRules = pgTable("cancellation_policy_rules", {
|
|
|
33
35
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
34
36
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
35
37
|
}, (table) => [
|
|
36
|
-
index("
|
|
37
|
-
index("
|
|
38
|
+
index("idx_cancellation_policy_rules_created").on(table.createdAt),
|
|
39
|
+
index("idx_cancellation_policy_rules_policy_sort_created").on(table.cancellationPolicyId, table.sortOrder, table.createdAt),
|
|
40
|
+
index("idx_cancellation_policy_rules_active_sort_created").on(table.active, table.sortOrder, table.createdAt),
|
|
38
41
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/pricing",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.9",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -33,16 +33,16 @@
|
|
|
33
33
|
"drizzle-orm": "^0.45.2",
|
|
34
34
|
"hono": "^4.12.10",
|
|
35
35
|
"zod": "^4.3.6",
|
|
36
|
-
"@voyantjs/availability": "0.6.
|
|
37
|
-
"@voyantjs/core": "0.6.
|
|
38
|
-
"@voyantjs/db": "0.6.
|
|
39
|
-
"@voyantjs/hono": "0.6.
|
|
40
|
-
"@voyantjs/products": "0.6.
|
|
36
|
+
"@voyantjs/availability": "0.6.9",
|
|
37
|
+
"@voyantjs/core": "0.6.9",
|
|
38
|
+
"@voyantjs/db": "0.6.9",
|
|
39
|
+
"@voyantjs/hono": "0.6.9",
|
|
40
|
+
"@voyantjs/products": "0.6.9"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"typescript": "^6.0.2",
|
|
44
|
-
"@voyantjs/extras": "0.6.
|
|
45
|
-
"@voyantjs/facilities": "0.6.
|
|
44
|
+
"@voyantjs/extras": "0.6.9",
|
|
45
|
+
"@voyantjs/facilities": "0.6.9",
|
|
46
46
|
"@voyantjs/voyant-typescript-config": "0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|