@mj-biz-apps/orders-entities 5.22.0 → 5.23.0
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/OrderHeaderEntity.d.ts +74 -4
- package/dist/OrderHeaderEntity.d.ts.map +1 -1
- package/dist/OrderHeaderEntity.js +146 -20
- package/dist/OrderHeaderEntity.js.map +1 -1
- package/dist/OrderLineEntity.d.ts +0 -2
- package/dist/OrderLineEntity.d.ts.map +1 -1
- package/dist/OrderLineEntity.js +4 -54
- package/dist/OrderLineEntity.js.map +1 -1
- package/dist/SubscriptionTermEntity.d.ts +29 -0
- package/dist/SubscriptionTermEntity.d.ts.map +1 -0
- package/dist/SubscriptionTermEntity.js +56 -0
- package/dist/SubscriptionTermEntity.js.map +1 -0
- package/dist/checkout-choices.d.ts +82 -0
- package/dist/checkout-choices.d.ts.map +1 -0
- package/dist/checkout-choices.js +143 -0
- package/dist/checkout-choices.js.map +1 -0
- package/dist/configuration-types.d.ts +9 -0
- package/dist/configuration-types.d.ts.map +1 -1
- package/dist/generated/entities/__mj_BizAppsOrders.d.ts +414 -6
- package/dist/generated/entities/__mj_BizAppsOrders.d.ts.map +1 -1
- package/dist/generated/entities/__mj_BizAppsOrders.js +625 -3
- package/dist/generated/entities/__mj_BizAppsOrders.js.map +1 -1
- package/dist/generated/remote_operations.d.ts +115 -0
- package/dist/generated/remote_operations.d.ts.map +1 -1
- package/dist/generated/remote_operations.js +36 -0
- package/dist/generated/remote_operations.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/pricing/ConcessionBehavior.d.ts +102 -0
- package/dist/pricing/ConcessionBehavior.d.ts.map +1 -0
- package/dist/pricing/ConcessionBehavior.js +181 -0
- package/dist/pricing/ConcessionBehavior.js.map +1 -0
- package/dist/pricing/PromotionEngine.d.ts +2 -0
- package/dist/pricing/PromotionEngine.d.ts.map +1 -1
- package/dist/pricing/PromotionEngine.js +15 -13
- package/dist/pricing/PromotionEngine.js.map +1 -1
- package/dist/pricing/linePriceContext.d.ts +37 -0
- package/dist/pricing/linePriceContext.d.ts.map +1 -0
- package/dist/pricing/linePriceContext.js +87 -0
- package/dist/pricing/linePriceContext.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @fileoverview `SubscriptionTermEntity` — shared entity subclass for Subscription Terms.
|
|
9
|
+
*
|
|
10
|
+
* A term is written once, when the order line that bought it is confirmed. Its dates and amount are
|
|
11
|
+
* what the journal entries and the recognition schedule were built from, and what the renewal keys
|
|
12
|
+
* off. Nothing guarded them, so a booked term's end date could be moved on any save — which is also
|
|
13
|
+
* how a term was extended at no charge with no value recorded and no approval sought.
|
|
14
|
+
*
|
|
15
|
+
* So a saved term's dates and amount are fixed. Extending one is a concession: record it as a
|
|
16
|
+
* Duration `OrderConcession`, which values it at the term's own rate and routes it for approval. The
|
|
17
|
+
* approved concession applies the extension, and that server-side write is the only one this admits
|
|
18
|
+
* (`BookedTermEditSanctioned`).
|
|
19
|
+
*
|
|
20
|
+
* @module @mj-biz-apps/orders-entities
|
|
21
|
+
*/
|
|
22
|
+
import { BaseEntity, ValidationErrorInfo, ValidationErrorType } from '@memberjunction/core';
|
|
23
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
24
|
+
import { mjBizAppsOrdersSubscriptionTermEntity } from './generated/entity_subclasses.js';
|
|
25
|
+
/** Term columns the booking and the recognition schedule were built from. */
|
|
26
|
+
export const SUBSCRIPTION_TERM_BOOKED_FIELDS = ['StartDate', 'EndDate', 'Amount'];
|
|
27
|
+
let SubscriptionTermEntity = class SubscriptionTermEntity extends mjBizAppsOrdersSubscriptionTermEntity {
|
|
28
|
+
Validate() {
|
|
29
|
+
const result = super.Validate();
|
|
30
|
+
this.refuseBookedTermEdits(result);
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* True only for the server's own amendment write. The server subclass overrides it; here, where
|
|
35
|
+
* any caller could set a flag, nothing is sanctioned.
|
|
36
|
+
*/
|
|
37
|
+
BookedTermEditSanctioned() {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
refuseBookedTermEdits(result) {
|
|
41
|
+
if (!this.IsSaved || this.BookedTermEditSanctioned())
|
|
42
|
+
return;
|
|
43
|
+
const dirty = SUBSCRIPTION_TERM_BOOKED_FIELDS.filter((name) => this.GetFieldByName(name)?.Dirty === true);
|
|
44
|
+
if (dirty.length === 0)
|
|
45
|
+
return;
|
|
46
|
+
result.Success = false;
|
|
47
|
+
result.Errors.push(new ValidationErrorInfo(dirty[0], `A booked term cannot change ${dirty.join(', ')}: the order's journal entries and the ` +
|
|
48
|
+
`recognition schedule were built from them. To extend a term at no charge, record a ` +
|
|
49
|
+
`Duration concession against it; approving it applies the extension.`, this.GetFieldByName(dirty[0])?.Value, ValidationErrorType.Failure));
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
SubscriptionTermEntity = __decorate([
|
|
53
|
+
RegisterClass(BaseEntity, 'MJ_BizApps_Orders: Subscription Terms')
|
|
54
|
+
], SubscriptionTermEntity);
|
|
55
|
+
export { SubscriptionTermEntity };
|
|
56
|
+
//# sourceMappingURL=SubscriptionTermEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
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AI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EACpC,mBAAmB,CAAC,OAAO,CAC9B,CACJ,CAAC;IACN,CAAC;CACJ,CAAA;AA/BY,sBAAsB;IADlC,aAAa,CAAC,UAAU,EAAE,uCAAuC,CAAC;GACtD,sBAAsB,CA+BlC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Choice groups a checkout widget offers the buyer — "choose N of these M options" — and the check
|
|
3
|
+
* the buyer's picks pass.
|
|
4
|
+
*
|
|
5
|
+
* The groups live in the widget's Configuration (`choiceGroups`). Unlike a question's answer, a
|
|
6
|
+
* pick decides what the buyer is entitled to: it is recorded on the order line as Order Line
|
|
7
|
+
* Choices, a Product Entitlement with a matching `ChoiceGroupKey` / `ChoiceOptionValue` grants only
|
|
8
|
+
* on a line that carries it, and a renewal copies the picks onto its own line.
|
|
9
|
+
*
|
|
10
|
+
* Pure; no database, no provider. The browser runs the same check to gate the Pay button, and the
|
|
11
|
+
* server runs it on the picks it stored before it opens a payment intent or completes the
|
|
12
|
+
* checkout — the server check is the one that counts. Picks are judged against the widget's own
|
|
13
|
+
* groups, never against anything the buyer sent.
|
|
14
|
+
*/
|
|
15
|
+
/** One option of a choice group. A bare string is both its value and its label. */
|
|
16
|
+
export interface CheckoutChoiceOption {
|
|
17
|
+
value: string;
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
|
20
|
+
export interface CheckoutChoiceGroup {
|
|
21
|
+
/** Stable identifier, recorded on the line as `GroupKey` and matched by `ProductEntitlement.ChoiceGroupKey`. */
|
|
22
|
+
key: string;
|
|
23
|
+
/** The group as the buyer sees it, e.g. "Choose your department". */
|
|
24
|
+
label: string;
|
|
25
|
+
options: Array<string | CheckoutChoiceOption>;
|
|
26
|
+
/** Fewest options the buyer must pick. 0 makes the group optional. */
|
|
27
|
+
min: number;
|
|
28
|
+
/** Most options the buyer may pick. At least `min`, and no more than the number of options. */
|
|
29
|
+
max: number;
|
|
30
|
+
}
|
|
31
|
+
/** The buyer's picks, keyed by group key: the option values chosen. */
|
|
32
|
+
export type CheckoutChoicesInput = Record<string, string[]>;
|
|
33
|
+
/** One pick that passed the check, shaped as the order line records it. */
|
|
34
|
+
export interface ResolvedCheckoutChoice {
|
|
35
|
+
GroupKey: string;
|
|
36
|
+
GroupLabel: string;
|
|
37
|
+
OptionValue: string;
|
|
38
|
+
OptionLabel: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CheckoutChoicesCheck {
|
|
41
|
+
/** Every pick, in the widget's group and option order. Empty when `Error` is set. */
|
|
42
|
+
Choices: ResolvedCheckoutChoice[];
|
|
43
|
+
/** Why the picks were refused, worded for the buyer. */
|
|
44
|
+
Error?: string;
|
|
45
|
+
}
|
|
46
|
+
/** Column widths of OrderLineChoice. */
|
|
47
|
+
export declare const MAX_CHECKOUT_CHOICE_KEY_LENGTH = 100;
|
|
48
|
+
export declare const MAX_CHECKOUT_CHOICE_LABEL_LENGTH = 500;
|
|
49
|
+
/** Message for a widget whose `choiceGroups` cannot be read; the checkout is refused, not skipped. */
|
|
50
|
+
export declare const INVALID_CHECKOUT_CHOICE_GROUPS_MESSAGE = "This checkout is not configured correctly (its choices are invalid).";
|
|
51
|
+
export declare function CheckoutChoiceOptionValue(option: string | CheckoutChoiceOption): string;
|
|
52
|
+
export declare function CheckoutChoiceOptionLabel(option: string | CheckoutChoiceOption): string;
|
|
53
|
+
/**
|
|
54
|
+
* The widget's choice groups, or an error when `choiceGroups` is present but malformed.
|
|
55
|
+
*
|
|
56
|
+
* A malformed list refuses the checkout rather than dropping the bad entries: a group that
|
|
57
|
+
* silently disappeared would sell the product without the pick its entitlements depend on.
|
|
58
|
+
*/
|
|
59
|
+
export declare function ReadCheckoutChoiceGroups(raw: unknown): {
|
|
60
|
+
Groups: CheckoutChoiceGroup[];
|
|
61
|
+
Error?: string;
|
|
62
|
+
};
|
|
63
|
+
/** How many options a group asks for, worded for the buyer: "exactly 2", "1 to 3", "up to 2". */
|
|
64
|
+
export declare function DescribeChoiceCount(group: CheckoutChoiceGroup): string;
|
|
65
|
+
/**
|
|
66
|
+
* Check the buyer's picks against the widget's choice groups.
|
|
67
|
+
*
|
|
68
|
+
* Refuses: picks that are not an object of lists, a group the widget does not offer, an option
|
|
69
|
+
* that is not one of the group's, more picks than `max`, and — unless `partial` — fewer than `min`.
|
|
70
|
+
* A repeated option counts once. `partial` is for the draft, which is priced before the buyer has
|
|
71
|
+
* finished choosing; the payment intent and completion check in full.
|
|
72
|
+
*/
|
|
73
|
+
export declare function CheckChoicesAgainstGroups(groups: CheckoutChoiceGroup[], picks: unknown, options?: {
|
|
74
|
+
partial?: boolean;
|
|
75
|
+
}): CheckoutChoicesCheck;
|
|
76
|
+
/** {@link ReadCheckoutChoiceGroups} then {@link CheckChoicesAgainstGroups}, for a raw Configuration value. */
|
|
77
|
+
export declare function CheckCheckoutChoices(rawGroups: unknown, picks: unknown, options?: {
|
|
78
|
+
partial?: boolean;
|
|
79
|
+
}): CheckoutChoicesCheck;
|
|
80
|
+
/** Resolved picks back into the input shape, as the session metadata stores them. */
|
|
81
|
+
export declare function ChoicesForStorage(choices: ResolvedCheckoutChoice[]): CheckoutChoicesInput;
|
|
82
|
+
//# sourceMappingURL=checkout-choices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-choices.d.ts","sourceRoot":"","sources":["../src/checkout-choices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,mFAAmF;AACnF,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAChC,gHAAgH;IAChH,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,oBAAoB,CAAC,CAAC;IAC9C,sEA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C9G,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,oBAAoB,CAI9H;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,EAAE,GAAG,oBAAoB,CAIzF"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Choice groups a checkout widget offers the buyer — "choose N of these M options" — and the check
|
|
3
|
+
* the buyer's picks pass.
|
|
4
|
+
*
|
|
5
|
+
* The groups live in the widget's Configuration (`choiceGroups`). Unlike a question's answer, a
|
|
6
|
+
* pick decides what the buyer is entitled to: it is recorded on the order line as Order Line
|
|
7
|
+
* Choices, a Product Entitlement with a matching `ChoiceGroupKey` / `ChoiceOptionValue` grants only
|
|
8
|
+
* on a line that carries it, and a renewal copies the picks onto its own line.
|
|
9
|
+
*
|
|
10
|
+
* Pure; no database, no provider. The browser runs the same check to gate the Pay button, and the
|
|
11
|
+
* server runs it on the picks it stored before it opens a payment intent or completes the
|
|
12
|
+
* checkout — the server check is the one that counts. Picks are judged against the widget's own
|
|
13
|
+
* groups, never against anything the buyer sent.
|
|
14
|
+
*/
|
|
15
|
+
/** Column widths of OrderLineChoice. */
|
|
16
|
+
export const MAX_CHECKOUT_CHOICE_KEY_LENGTH = 100;
|
|
17
|
+
export const MAX_CHECKOUT_CHOICE_LABEL_LENGTH = 500;
|
|
18
|
+
/** Message for a widget whose `choiceGroups` cannot be read; the checkout is refused, not skipped. */
|
|
19
|
+
export const INVALID_CHECKOUT_CHOICE_GROUPS_MESSAGE = 'This checkout is not configured correctly (its choices are invalid).';
|
|
20
|
+
export function CheckoutChoiceOptionValue(option) {
|
|
21
|
+
return typeof option === 'string' ? option : option.value;
|
|
22
|
+
}
|
|
23
|
+
export function CheckoutChoiceOptionLabel(option) {
|
|
24
|
+
return typeof option === 'string' ? option : option.label;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The widget's choice groups, or an error when `choiceGroups` is present but malformed.
|
|
28
|
+
*
|
|
29
|
+
* A malformed list refuses the checkout rather than dropping the bad entries: a group that
|
|
30
|
+
* silently disappeared would sell the product without the pick its entitlements depend on.
|
|
31
|
+
*/
|
|
32
|
+
export function ReadCheckoutChoiceGroups(raw) {
|
|
33
|
+
if (raw === undefined || raw === null)
|
|
34
|
+
return { Groups: [] };
|
|
35
|
+
if (!Array.isArray(raw))
|
|
36
|
+
return { Groups: [], Error: INVALID_CHECKOUT_CHOICE_GROUPS_MESSAGE };
|
|
37
|
+
const keys = new Set();
|
|
38
|
+
for (const g of raw) {
|
|
39
|
+
if (!IsValidChoiceGroup(g) || keys.has(g.key)) {
|
|
40
|
+
return { Groups: [], Error: INVALID_CHECKOUT_CHOICE_GROUPS_MESSAGE };
|
|
41
|
+
}
|
|
42
|
+
keys.add(g.key);
|
|
43
|
+
}
|
|
44
|
+
return { Groups: raw };
|
|
45
|
+
}
|
|
46
|
+
function IsValidChoiceGroup(g) {
|
|
47
|
+
if (!g || typeof g !== 'object')
|
|
48
|
+
return false;
|
|
49
|
+
const c = g;
|
|
50
|
+
if (typeof c.key !== 'string' || !c.key.trim() || c.key.length > MAX_CHECKOUT_CHOICE_KEY_LENGTH)
|
|
51
|
+
return false;
|
|
52
|
+
if (typeof c.label !== 'string' || !c.label.trim() || c.label.length > MAX_CHECKOUT_CHOICE_LABEL_LENGTH)
|
|
53
|
+
return false;
|
|
54
|
+
if (!Array.isArray(c.options) || c.options.length === 0)
|
|
55
|
+
return false;
|
|
56
|
+
const values = new Set();
|
|
57
|
+
for (const o of c.options) {
|
|
58
|
+
const value = typeof o === 'string' ? o : o && typeof o === 'object' ? o.value : undefined;
|
|
59
|
+
const label = typeof o === 'string' ? o : o && typeof o === 'object' ? o.label : undefined;
|
|
60
|
+
if (typeof value !== 'string' || !value || value.length > MAX_CHECKOUT_CHOICE_KEY_LENGTH || values.has(value))
|
|
61
|
+
return false;
|
|
62
|
+
if (typeof label !== 'string' || !label || label.length > MAX_CHECKOUT_CHOICE_LABEL_LENGTH)
|
|
63
|
+
return false;
|
|
64
|
+
values.add(value);
|
|
65
|
+
}
|
|
66
|
+
if (!Number.isInteger(c.min) || !Number.isInteger(c.max))
|
|
67
|
+
return false;
|
|
68
|
+
const min = c.min;
|
|
69
|
+
const max = c.max;
|
|
70
|
+
return min >= 0 && max >= 1 && min <= max && max <= values.size;
|
|
71
|
+
}
|
|
72
|
+
/** How many options a group asks for, worded for the buyer: "exactly 2", "1 to 3", "up to 2". */
|
|
73
|
+
export function DescribeChoiceCount(group) {
|
|
74
|
+
if (group.min === group.max)
|
|
75
|
+
return `exactly ${group.min}`;
|
|
76
|
+
if (group.min === 0)
|
|
77
|
+
return `up to ${group.max}`;
|
|
78
|
+
return `${group.min} to ${group.max}`;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check the buyer's picks against the widget's choice groups.
|
|
82
|
+
*
|
|
83
|
+
* Refuses: picks that are not an object of lists, a group the widget does not offer, an option
|
|
84
|
+
* that is not one of the group's, more picks than `max`, and — unless `partial` — fewer than `min`.
|
|
85
|
+
* A repeated option counts once. `partial` is for the draft, which is priced before the buyer has
|
|
86
|
+
* finished choosing; the payment intent and completion check in full.
|
|
87
|
+
*/
|
|
88
|
+
export function CheckChoicesAgainstGroups(groups, picks, options) {
|
|
89
|
+
const refuse = (error) => ({ Choices: [], Error: error });
|
|
90
|
+
if (picks !== undefined && picks !== null && (typeof picks !== 'object' || Array.isArray(picks))) {
|
|
91
|
+
return refuse('The checkout choices could not be read.');
|
|
92
|
+
}
|
|
93
|
+
const input = (picks ?? {});
|
|
94
|
+
const offered = new Set(groups.map((g) => g.key));
|
|
95
|
+
for (const key of Object.keys(input)) {
|
|
96
|
+
if (!offered.has(key))
|
|
97
|
+
return refuse('A choice was sent for a group this checkout does not offer.');
|
|
98
|
+
}
|
|
99
|
+
const resolved = [];
|
|
100
|
+
for (const g of groups) {
|
|
101
|
+
const raw = input[g.key];
|
|
102
|
+
if (raw !== undefined && raw !== null && !Array.isArray(raw)) {
|
|
103
|
+
return refuse(`The choices for "${g.label}" could not be read.`);
|
|
104
|
+
}
|
|
105
|
+
const chosen = new Set();
|
|
106
|
+
for (const v of (raw ?? [])) {
|
|
107
|
+
if (typeof v !== 'string')
|
|
108
|
+
return refuse(`The choices for "${g.label}" could not be read.`);
|
|
109
|
+
chosen.add(v);
|
|
110
|
+
}
|
|
111
|
+
for (const v of chosen) {
|
|
112
|
+
if (!g.options.some((o) => CheckoutChoiceOptionValue(o) === v)) {
|
|
113
|
+
return refuse(`"${v}" is not one of the options for "${g.label}".`);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
if (chosen.size > g.max || (!options?.partial && chosen.size < g.min)) {
|
|
117
|
+
return refuse(`Please choose ${DescribeChoiceCount(g)} for "${g.label}".`);
|
|
118
|
+
}
|
|
119
|
+
// Option order, not the order the buyer clicked, so the record reads the same either way.
|
|
120
|
+
for (const o of g.options) {
|
|
121
|
+
const value = CheckoutChoiceOptionValue(o);
|
|
122
|
+
if (!chosen.has(value))
|
|
123
|
+
continue;
|
|
124
|
+
resolved.push({ GroupKey: g.key, GroupLabel: g.label, OptionValue: value, OptionLabel: CheckoutChoiceOptionLabel(o) });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
return { Choices: resolved };
|
|
128
|
+
}
|
|
129
|
+
/** {@link ReadCheckoutChoiceGroups} then {@link CheckChoicesAgainstGroups}, for a raw Configuration value. */
|
|
130
|
+
export function CheckCheckoutChoices(rawGroups, picks, options) {
|
|
131
|
+
const read = ReadCheckoutChoiceGroups(rawGroups);
|
|
132
|
+
if (read.Error)
|
|
133
|
+
return { Choices: [], Error: read.Error };
|
|
134
|
+
return CheckChoicesAgainstGroups(read.Groups, picks, options);
|
|
135
|
+
}
|
|
136
|
+
/** Resolved picks back into the input shape, as the session metadata stores them. */
|
|
137
|
+
export function ChoicesForStorage(choices) {
|
|
138
|
+
const stored = {};
|
|
139
|
+
for (const c of choices)
|
|
140
|
+
(stored[c.GroupKey] ??= []).push(c.OptionValue);
|
|
141
|
+
return stored;
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=checkout-choices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkout-choices.js","sourceRoot":"","sources":["../src/checkout-choices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAsCH,wCAAwC;AACxC,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAClD,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,sGAAsG;AACtG,MAAM,CAAC,MAAM,sCAAsC,GAAG,sEAAsE,CAAC;AAE7H,MAAM,UAAU,yBAAyB,CAAC,MAAqC;IAC3E,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,MAAqC;IAC3E,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,GAAY;IACjD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC7D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,sCAAsC,EAAE,CAAC;IAE9F,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,CAAC,IAAI,GAAgB,EAAE,CAAC;QAC/B,IAAI,CAAC,kBAAk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AAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,oBAAoB,CAAC,SAAkB,EAAE,KAAc,EAAE,OAA+B;IACpG,MAAM,IAAI,GAAG,wBAAwB,CAAC,SAAS,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1D,OAAO,yBAAyB,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;AAClE,CAAC;AAED,qFAAqF;AACrF,MAAM,UAAU,iBAAiB,CAAC,OAAiC;IAC/D,MAAM,MAAM,GAAyB,EAAE,CAAC;IACxC,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACzE,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module @mj-biz-apps/orders-entities/configuration-types
|
|
8
8
|
*/
|
|
9
|
+
import type { CheckoutChoiceGroup } from './checkout-choices.js';
|
|
9
10
|
import type { CheckoutQuestion } from './checkout-questions.js';
|
|
10
11
|
export interface CustomUIThemeConfiguration {
|
|
11
12
|
primaryColor?: string;
|
|
@@ -128,6 +129,14 @@ export interface CheckoutWidgetConfiguration {
|
|
|
128
129
|
* Answers. A required question blocks the payment intent and completion until answered.
|
|
129
130
|
*/
|
|
130
131
|
questions?: CheckoutQuestion[];
|
|
132
|
+
/**
|
|
133
|
+
* Groups the buyer chooses from before paying: "choose N of these M options". Each pick is
|
|
134
|
+
* recorded on the order line as an Order Line Choice, and a Product Entitlement with a matching
|
|
135
|
+
* `ChoiceGroupKey` / `ChoiceOptionValue` grants only on a line that carries it. Picks outside
|
|
136
|
+
* `min`..`max`, or options not in the list, block the payment intent and completion. The widget
|
|
137
|
+
* must sell a single line.
|
|
138
|
+
*/
|
|
139
|
+
choiceGroups?: CheckoutChoiceGroup[];
|
|
131
140
|
/**
|
|
132
141
|
* The PaymentProvider row id used to open payment intents for this widget's sessions.
|
|
133
142
|
* Admin-authored, server-resolved — never accepted from the client. Required before a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configuration-types.d.ts","sourceRoot":"","sources":["../src/configuration-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,WAAW,0BAA0B;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,0BAA0B,CAAC;IACnC;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,KAAK,CAAC,EA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