@mj-biz-apps/orders-entities 5.28.0 → 5.30.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.
Files changed (51) hide show
  1. package/dist/OrderHeaderEntity.d.ts +36 -5
  2. package/dist/OrderHeaderEntity.d.ts.map +1 -1
  3. package/dist/OrderHeaderEntity.js +68 -8
  4. package/dist/OrderHeaderEntity.js.map +1 -1
  5. package/dist/PaymentHeaderEntity.d.ts +11 -0
  6. package/dist/PaymentHeaderEntity.d.ts.map +1 -1
  7. package/dist/PaymentHeaderEntity.js +31 -4
  8. package/dist/PaymentHeaderEntity.js.map +1 -1
  9. package/dist/accessOverride.d.ts +46 -3
  10. package/dist/accessOverride.d.ts.map +1 -1
  11. package/dist/accessOverride.js +95 -4
  12. package/dist/accessOverride.js.map +1 -1
  13. package/dist/checkout-questions.d.ts.map +1 -1
  14. package/dist/checkout-questions.js +4 -2
  15. package/dist/checkout-questions.js.map +1 -1
  16. package/dist/existing-holding.d.ts +69 -0
  17. package/dist/existing-holding.d.ts.map +1 -0
  18. package/dist/existing-holding.js +203 -0
  19. package/dist/existing-holding.js.map +1 -0
  20. package/dist/generated/entities/__mj_BizAppsOrders.d.ts +237 -0
  21. package/dist/generated/entities/__mj_BizAppsOrders.d.ts.map +1 -1
  22. package/dist/generated/entities/__mj_BizAppsOrders.js +352 -0
  23. package/dist/generated/entities/__mj_BizAppsOrders.js.map +1 -1
  24. package/dist/generated/remote_operations.d.ts +126 -9
  25. package/dist/generated/remote_operations.d.ts.map +1 -1
  26. package/dist/generated/remote_operations.js +24 -6
  27. package/dist/generated/remote_operations.js.map +1 -1
  28. package/dist/index.d.ts +2 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +3 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/order-confirm-veto.d.ts +81 -0
  33. package/dist/order-confirm-veto.d.ts.map +1 -0
  34. package/dist/order-confirm-veto.js +89 -0
  35. package/dist/order-confirm-veto.js.map +1 -0
  36. package/dist/pricing/ChargeBehavior.d.ts +6 -0
  37. package/dist/pricing/ChargeBehavior.d.ts.map +1 -1
  38. package/dist/pricing/ChargeBehavior.js.map +1 -1
  39. package/dist/pricing/ChargeEngine.d.ts +44 -1
  40. package/dist/pricing/ChargeEngine.d.ts.map +1 -1
  41. package/dist/pricing/ChargeEngine.js +215 -1
  42. package/dist/pricing/ChargeEngine.js.map +1 -1
  43. package/dist/pricing/OrderPricingService.d.ts +9 -0
  44. package/dist/pricing/OrderPricingService.d.ts.map +1 -1
  45. package/dist/pricing/OrderPricingService.js +24 -11
  46. package/dist/pricing/OrderPricingService.js.map +1 -1
  47. package/dist/pricing/PromotionEngine.d.ts +22 -0
  48. package/dist/pricing/PromotionEngine.d.ts.map +1 -1
  49. package/dist/pricing/PromotionEngine.js +129 -4
  50. package/dist/pricing/PromotionEngine.js.map +1 -1
  51. package/package.json +7 -4
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-questions.js","sourceRoot":"","sources":["../src/checkout-questions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmDH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AACpD,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AACtD,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE/C,mGAAmG;AACnG,MAAM,CAAC,MAAM,kCAAkC,GAAG,wEAAwE,CAAC;AAE3H,MAAM,UAAU,2BAA2B,CAAC,MAAuC;IAC/E,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9D,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,MAAuC;IAC/E,OAAO,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9D,C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AE,OAAO,EAAE,QAAQ,EAAE,CAAC;AACjC,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,oBAAoB,CAAC,YAAqB,EAAE,OAAgB;IACxE,MAAM,IAAI,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1D,OAAO,4BAA4B,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACjE,CAAC"}
@@ -0,0 +1,69 @@
1
+ /**
2
+ * @fileoverview "The customer already holds this product" — the lookup behind the extend-or-new
3
+ * question on a subscription line (golive #299, #318).
4
+ *
5
+ * At confirm, a subscription line whose subscriber already holds a live subscription to the product
6
+ * follows the type's `ConcurrencyMode`, and under `ExtendExisting` it becomes the next term and
7
+ * starts the day after current coverage ends, whatever start the line states. A line can answer the
8
+ * question itself through `OrderLine.SubscriptionAction`. These helpers find the lines that should be
9
+ * asked, so every surface that edits or confirms an order (the order screen, a deal's line editor, a
10
+ * deal's close) asks the same question about the same lines.
11
+ *
12
+ * Browser-safe: `RunView` only, so the screen and a server-side refusal read the same rows.
13
+ *
14
+ * @module @mj-biz-apps/orders-entities
15
+ */
16
+ import { type IRunViewProvider, type UserInfo } from '@memberjunction/core';
17
+ import type { mjBizAppsOrdersOrderHeaderEntity, mjBizAppsOrdersOrderLineEntity } from './generated/entity_subclasses.js';
18
+ /** A live subscription the subscriber already holds for a product, with where its coverage ends. */
19
+ export interface ExistingHolding {
20
+ SubscriptionID: string;
21
+ SubscriptionNumber: string;
22
+ Status: string;
23
+ /** End of the LATEST coverage term — not `Subscription.EndDate`, which is the final service date. */
24
+ LatestTermEnd: Date | null;
25
+ }
26
+ /** Who a line's subscription would be for. */
27
+ export interface HoldingSubscriber {
28
+ OrganizationID: string | null;
29
+ PersonID: string | null;
30
+ }
31
+ /** The line fields the question reads. */
32
+ export type HoldingLine = Pick<mjBizAppsOrdersOrderLineEntity, 'ID' | 'LineNumber' | 'ProductID' | 'ShipToOrganizationID' | 'ShipToPersonID' | 'RenewsSubscriptionID' | 'SubscriptionAction'>;
33
+ /** The order fields the question reads. */
34
+ export type HoldingOrder = Pick<mjBizAppsOrdersOrderHeaderEntity, 'ShipToOrganizationID' | 'ShipToPersonID' | 'BillToOrganizationID' | 'BillToPersonID'>;
35
+ /** A subscription line that has not answered extend-or-new although its subscriber holds the product. */
36
+ export interface UnansweredHeldLine {
37
+ LineID: string;
38
+ LineNumber: number;
39
+ ProductID: string;
40
+ Holding: ExistingHolding;
41
+ }
42
+ /**
43
+ * Who the line is for, resolved the way the server does: the line's ship-to, then the order's
44
+ * ship-to, then its bill-to. Null when the line names nobody.
45
+ */
46
+ export declare function HoldingSubscriberFor(line: HoldingLine, order: HoldingOrder | null): HoldingSubscriber | null;
47
+ /**
48
+ * The live (`Active`/`Trialing`) subscription to `productID` held by this organization or naming
49
+ * this person, newest first, or null.
50
+ *
51
+ * Broader than the server's duplicate test, which keys on the type's `BenefitModel`: matching on
52
+ * either side means a caller may ask about a subscription the server would not extend, never the
53
+ * reverse. Asking when it did not need to costs a click; not asking when it did is the silent date
54
+ * change this exists to prevent. The line's answer is still applied by the server's own rules.
55
+ *
56
+ * Throws when a read fails. A failed read that returned null would read as "holds nothing", which is
57
+ * the one answer that lets a confirm move a line's dates without asking.
58
+ */
59
+ export declare function FindExistingHolding(productID: string, subscriber: HoldingSubscriber, provider?: IRunViewProvider, user?: UserInfo): Promise<ExistingHolding | null>;
60
+ /**
61
+ * The lines a confirm would decide for the user: subscription lines with no `SubscriptionAction`,
62
+ * no renewal target, and a subscriber who already holds the product.
63
+ *
64
+ * Renewal lines are left out: they name the subscription they continue. Lines are returned in the
65
+ * order given. Three reads whatever the line count: products, then the candidate subscriptions,
66
+ * then their terms.
67
+ */
68
+ export declare function FindUnansweredHeldLines(order: HoldingOrder | null, lines: readonly HoldingLine[], provider?: IRunViewProvider, user?: UserInfo): Promise<UnansweredHeldLine[]>;
69
+ //# sourceMappingURL=existing-holding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"existing-holding.d.ts","sourceRoot":"","sources":["../src/existing-holding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAW,KAAK,gBAAgB,EAAE,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErF,OAAO,KAAK,EACR,gCAAgC,EAChC,8BAA8B,EACjC,MAAM,+BAA+B,CAAC;AAQvC,oGAAoG;AACpG,MAAM,WAAW,eAAe;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;CAC9B;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG,IAAI,CAC1B,8BAA8B,EAC9B,IAAI,GAAG,YAAY,GAAG,WAAW,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,oBAAoB,CAChI,CAAC;AAEF,2CAA2C;AAC3C,MAAM,MAAM,YAAY,GAAG,IAAI,CAC3B,gCAAgC,EAChC,sBAAsB,GAAG,gBAAgB,GAAG,sBAAsB,GAAG,gBAAgB,CACxF,CAAC;AAEF,yGAAyG;AACzG,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,eAAe,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,GAAG,IAAI,GAAG,iBAAiB,GAAG,IAAI,CAK5G;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACrC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,iBAAiB,EAC7B,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,IAAI,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAmDjC;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CACzC,KAAK,EAAE,YAAY,GAAG,IAAI,EAC1B,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,QAAQ,CAAC,EAAE,gBAAgB,EAC3B,IAAI,CAAC,EAAE,QAAQ,GAChB,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAgC/B"}
@@ -0,0 +1,203 @@
1
+ /**
2
+ * @fileoverview "The customer already holds this product" — the lookup behind the extend-or-new
3
+ * question on a subscription line (golive #299, #318).
4
+ *
5
+ * At confirm, a subscription line whose subscriber already holds a live subscription to the product
6
+ * follows the type's `ConcurrencyMode`, and under `ExtendExisting` it becomes the next term and
7
+ * starts the day after current coverage ends, whatever start the line states. A line can answer the
8
+ * question itself through `OrderLine.SubscriptionAction`. These helpers find the lines that should be
9
+ * asked, so every surface that edits or confirms an order (the order screen, a deal's line editor, a
10
+ * deal's close) asks the same question about the same lines.
11
+ *
12
+ * Browser-safe: `RunView` only, so the screen and a server-side refusal read the same rows.
13
+ *
14
+ * @module @mj-biz-apps/orders-entities
15
+ */
16
+ import { RunView } from '@memberjunction/core';
17
+ import { UUIDsEqual } from '@memberjunction/global';
18
+ const UUID_PATTERN = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
19
+ const SUBSCRIPTION_ENTITY = 'MJ_BizApps_Orders: Subscriptions';
20
+ const SUBSCRIPTION_TERM_ENTITY = 'MJ_BizApps_Orders: Subscription Terms';
21
+ const PRODUCT_ENTITY = 'MJ_BizApps_Orders: Products';
22
+ /**
23
+ * Who the line is for, resolved the way the server does: the line's ship-to, then the order's
24
+ * ship-to, then its bill-to. Null when the line names nobody.
25
+ */
26
+ export function HoldingSubscriberFor(line, order) {
27
+ const org = line.ShipToOrganizationID ?? order?.ShipToOrganizationID ?? order?.BillToOrganizationID ?? null;
28
+ const person = line.ShipToPersonID ?? order?.ShipToPersonID ?? order?.BillToPersonID ?? null;
29
+ if (!org && !person)
30
+ return null;
31
+ return { OrganizationID: org, PersonID: person };
32
+ }
33
+ /**
34
+ * The live (`Active`/`Trialing`) subscription to `productID` held by this organization or naming
35
+ * this person, newest first, or null.
36
+ *
37
+ * Broader than the server's duplicate test, which keys on the type's `BenefitModel`: matching on
38
+ * either side means a caller may ask about a subscription the server would not extend, never the
39
+ * reverse. Asking when it did not need to costs a click; not asking when it did is the silent date
40
+ * change this exists to prevent. The line's answer is still applied by the server's own rules.
41
+ *
42
+ * Throws when a read fails. A failed read that returned null would read as "holds nothing", which is
43
+ * the one answer that lets a confirm move a line's dates without asking.
44
+ */
45
+ export async function FindExistingHolding(productID, subscriber, provider, user) {
46
+ if (!UUID_PATTERN.test(productID))
47
+ return null;
48
+ const holder = [
49
+ subscriber.OrganizationID && UUID_PATTERN.test(subscriber.OrganizationID)
50
+ ? `HolderOrganizationID = '${subscriber.OrganizationID}'`
51
+ : '',
52
+ subscriber.PersonID && UUID_PATTERN.test(subscriber.PersonID) ? `BeneficiaryPersonID = '${subscriber.PersonID}'` : '',
53
+ ].filter(Boolean);
54
+ if (holder.length === 0)
55
+ return null;
56
+ const rv = new RunView(provider);
57
+ const subs = await rv.RunView({
58
+ EntityName: SUBSCRIPTION_ENTITY,
59
+ ExtraFilter: `ProductID = '${productID}' AND Status IN ('Active', 'Trialing') AND (${holder.join(' OR ')})`,
60
+ OrderBy: '__mj_CreatedAt DESC',
61
+ MaxRows: 1,
62
+ Fields: ['ID', 'SubscriptionNumber', 'Status'],
63
+ ResultType: 'simple',
64
+ }, user);
65
+ if (!subs.Success) {
66
+ throw new Error(`Could not read existing subscriptions for product ${productID}: ${subs.ErrorMessage}`);
67
+ }
68
+ const sub = subs.Results[0];
69
+ if (!sub)
70
+ return null;
71
+ // Newest term first, one row: the same ordering the server reads, so the two agree about which
72
+ // term is "latest" even for a subscription whose terms were not written in order.
73
+ const terms = await rv.RunView({
74
+ EntityName: SUBSCRIPTION_TERM_ENTITY,
75
+ ExtraFilter: `SubscriptionID = '${sub.ID}'`,
76
+ OrderBy: 'TermNumber DESC',
77
+ MaxRows: 1,
78
+ Fields: ['EndDate'],
79
+ ResultType: 'simple',
80
+ }, user);
81
+ if (!terms.Success) {
82
+ throw new Error(`Could not read the terms of subscription ${sub.SubscriptionNumber}: ${terms.ErrorMessage}`);
83
+ }
84
+ const end = terms.Results[0]?.EndDate ?? null;
85
+ return {
86
+ SubscriptionID: sub.ID,
87
+ SubscriptionNumber: sub.SubscriptionNumber,
88
+ Status: sub.Status,
89
+ LatestTermEnd: end === null ? null : end instanceof Date ? end : new Date(end),
90
+ };
91
+ }
92
+ /**
93
+ * The lines a confirm would decide for the user: subscription lines with no `SubscriptionAction`,
94
+ * no renewal target, and a subscriber who already holds the product.
95
+ *
96
+ * Renewal lines are left out: they name the subscription they continue. Lines are returned in the
97
+ * order given. Three reads whatever the line count: products, then the candidate subscriptions,
98
+ * then their terms.
99
+ */
100
+ export async function FindUnansweredHeldLines(order, lines, provider, user) {
101
+ const rv = new RunView(provider);
102
+ const asked = await subscriptionLinesToAsk(rv, order, lines, user);
103
+ if (asked.length === 0)
104
+ return [];
105
+ const subs = await liveSubscriptionsFor(rv, asked, user);
106
+ if (subs.length === 0)
107
+ return [];
108
+ const termEnds = await latestTermEnds(rv, subs.map((s) => s.ID), user);
109
+ const found = [];
110
+ for (const { Line, Subscriber } of asked) {
111
+ // Newest first, as `FindExistingHolding` reads it.
112
+ const sub = subs.find((s) => UUIDsEqual(s.ProductID, Line.ProductID) &&
113
+ ((!!Subscriber.OrganizationID && UUIDsEqual(s.HolderOrganizationID, Subscriber.OrganizationID)) ||
114
+ (!!Subscriber.PersonID && UUIDsEqual(s.BeneficiaryPersonID, Subscriber.PersonID))));
115
+ if (!sub)
116
+ continue;
117
+ found.push({
118
+ LineID: Line.ID,
119
+ LineNumber: Line.LineNumber,
120
+ ProductID: Line.ProductID,
121
+ Holding: {
122
+ SubscriptionID: sub.ID,
123
+ SubscriptionNumber: sub.SubscriptionNumber,
124
+ Status: sub.Status,
125
+ LatestTermEnd: termEnds.get(sub.ID.toLowerCase()) ?? null,
126
+ },
127
+ });
128
+ }
129
+ return found;
130
+ }
131
+ /** Unanswered, non-renewal lines for a subscription product that name a subscriber. */
132
+ async function subscriptionLinesToAsk(rv, order, lines, user) {
133
+ const open = lines.filter((l) => !l.SubscriptionAction && !l.RenewsSubscriptionID && UUID_PATTERN.test(l.ProductID ?? ''));
134
+ if (open.length === 0)
135
+ return [];
136
+ const products = await rv.RunView({
137
+ EntityName: PRODUCT_ENTITY,
138
+ ExtraFilter: `ID IN (${inList(open.map((l) => l.ProductID))})`,
139
+ Fields: ['ID', 'SubscriptionTypeID'],
140
+ ResultType: 'simple',
141
+ }, user);
142
+ if (!products.Success) {
143
+ throw new Error(`Could not read the products on the order: ${products.ErrorMessage}`);
144
+ }
145
+ const asked = [];
146
+ for (const line of open) {
147
+ const isSubscription = products.Results.some((p) => UUIDsEqual(p.ID, line.ProductID) && !!p.SubscriptionTypeID);
148
+ const subscriber = isSubscription ? HoldingSubscriberFor(line, order) : null;
149
+ if (subscriber)
150
+ asked.push({ Line: line, Subscriber: subscriber });
151
+ }
152
+ return asked;
153
+ }
154
+ /** Live subscriptions to any asked product held by any asked subscriber, newest first. */
155
+ async function liveSubscriptionsFor(rv, asked, user) {
156
+ const orgs = asked.map((a) => a.Subscriber.OrganizationID).filter((id) => !!id && UUID_PATTERN.test(id));
157
+ const people = asked.map((a) => a.Subscriber.PersonID).filter((id) => !!id && UUID_PATTERN.test(id));
158
+ const holder = [
159
+ orgs.length ? `HolderOrganizationID IN (${inList(orgs)})` : '',
160
+ people.length ? `BeneficiaryPersonID IN (${inList(people)})` : '',
161
+ ].filter(Boolean);
162
+ if (holder.length === 0)
163
+ return [];
164
+ const subs = await rv.RunView({
165
+ EntityName: SUBSCRIPTION_ENTITY,
166
+ ExtraFilter: `ProductID IN (${inList(asked.map((a) => a.Line.ProductID))}) AND Status IN ('Active', 'Trialing') ` +
167
+ `AND (${holder.join(' OR ')})`,
168
+ OrderBy: '__mj_CreatedAt DESC',
169
+ Fields: ['ID', 'SubscriptionNumber', 'Status', 'ProductID', 'HolderOrganizationID', 'BeneficiaryPersonID'],
170
+ ResultType: 'simple',
171
+ }, user);
172
+ if (!subs.Success) {
173
+ throw new Error(`Could not read existing subscriptions: ${subs.ErrorMessage}`);
174
+ }
175
+ return subs.Results;
176
+ }
177
+ /** Each subscription's latest term end, keyed by lower-cased subscription id. */
178
+ async function latestTermEnds(rv, subscriptionIDs, user) {
179
+ const terms = await rv.RunView({
180
+ EntityName: SUBSCRIPTION_TERM_ENTITY,
181
+ ExtraFilter: `SubscriptionID IN (${inList(subscriptionIDs)})`,
182
+ OrderBy: 'TermNumber DESC',
183
+ Fields: ['SubscriptionID', 'TermNumber', 'EndDate'],
184
+ ResultType: 'simple',
185
+ }, user);
186
+ if (!terms.Success) {
187
+ throw new Error(`Could not read subscription terms: ${terms.ErrorMessage}`);
188
+ }
189
+ const ends = new Map();
190
+ for (const t of terms.Results) {
191
+ const key = t.SubscriptionID.toLowerCase();
192
+ if (ends.has(key))
193
+ continue; // highest TermNumber first
194
+ ends.set(key, t.EndDate === null ? null : t.EndDate instanceof Date ? t.EndDate : new Date(t.EndDate));
195
+ }
196
+ return ends;
197
+ }
198
+ /** A SQL `IN` list of validated, distinct, lower-cased ids. */
199
+ function inList(ids) {
200
+ const valid = [...new Set(ids.filter((id) => UUID_PATTERN.test(id)).map((id) => id.toLowerCase()))];
201
+ return valid.map((id) => `'${id}'`).join(', ');
202
+ }
203
+ //# sourceMappingURL=existing-holding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"existing-holding.js","sourceRoot":"","sources":["../src/existing-holding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,OAAO,EAAwC,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,MAAM,YAAY,GAAG,+EAA+E,CAAC;AAErG,MAAM,mBAAmB,GAAG,kCAAkC,CAAC;AAC/D,MAAM,wBAAwB,GAAG,uCAAuC,CAAC;AACzE,MAAM,cAAc,GAAG,6BAA6B,CAAC;AAqCrD;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAiB,EAAE,KAA0B;IAC9E,MAAM,GAAG,GAAG,IAAI,CAAC,oBAAoB,IAAI,KAAK,EAAE,oBAAoB,IAAI,KAAK,EAAE,oBAAoB,IAAI,IAAI,CAAC;IAC5G,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,IAAI,KAAK,EAAE,cAAc,IAAI,KAAK,EAAE,cAAc,IAAI,IAAI,CAAC;IAC7F,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IACjC,OAAO,EAAE,cAAc,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AACrD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACrC,SAAiB,EACjB,UAA6B,EAC7B,QAA2B,EAC3B,IAAe;IAEf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,MAAM,MAAM,GAAG;QACX,UAAU,CAAC,cAAc,IAAI,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC;YACrE,CAAC,CAAC,2BAA2B,UAAU,CAAC,cAAc,GAAG;YACzD,CAAC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C;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,+DAA+D;AAC/D,SAAS,MAAM,CAAC,GAAsB;IAClC,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;IACpG,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC"}
@@ -2688,6 +2688,68 @@ export declare const mjBizAppsOrdersPaymentTypeSchema: z.ZodObject<{
2688
2688
  BookProcessingFeeInline?: boolean;
2689
2689
  }>;
2690
2690
  export type mjBizAppsOrdersPaymentTypeEntityType = z.infer<typeof mjBizAppsOrdersPaymentTypeSchema>;
2691
+ /**
2692
+ * zod schema definition for the entity MJ_BizApps_Orders: Payment Webhook Deliveries
2693
+ */
2694
+ export declare const mjBizAppsOrdersPaymentWebhookDeliverySchema: z.ZodObject<{
2695
+ ID: z.ZodString;
2696
+ PaymentProviderID: z.ZodString;
2697
+ ProviderEventID: z.ZodNullable<z.ZodString>;
2698
+ EventKind: z.ZodNullable<z.ZodString>;
2699
+ PaymentIntentID: z.ZodNullable<z.ZodString>;
2700
+ ProviderIntentID: z.ZodNullable<z.ZodString>;
2701
+ ProviderChargeID: z.ZodNullable<z.ZodString>;
2702
+ Outcome: z.ZodUnion<[z.ZodLiteral<"AlreadyApplied">, z.ZodLiteral<"Applied">, z.ZodLiteral<"Failed">, z.ZodLiteral<"Ignored">, z.ZodLiteral<"Rejected">]>;
2703
+ ReasonCode: z.ZodNullable<z.ZodString>;
2704
+ Reason: z.ZodNullable<z.ZodString>;
2705
+ OccurredAt: z.ZodNullable<z.ZodDate>;
2706
+ FirstReceivedAt: z.ZodDate;
2707
+ LastReceivedAt: z.ZodDate;
2708
+ DeliveryCount: z.ZodNumber;
2709
+ __mj_CreatedAt: z.ZodDate;
2710
+ __mj_UpdatedAt: z.ZodDate;
2711
+ PaymentProvider: z.ZodString;
2712
+ PaymentIntent: z.ZodNullable<z.ZodString>;
2713
+ }, "strip", z.ZodTypeAny, {
2714
+ ID?: string;
2715
+ __mj_CreatedAt?: Date;
2716
+ __mj_UpdatedAt?: Date;
2717
+ PaymentIntentID?: string;
2718
+ PaymentIntent?: string;
2719
+ Reason?: string;
2720
+ PaymentProviderID?: string;
2721
+ PaymentProvider?: string;
2722
+ OccurredAt?: Date;
2723
+ ProviderChargeID?: string;
2724
+ ProviderIntentID?: string;
2725
+ ProviderEventID?: string;
2726
+ EventKind?: string;
2727
+ Outcome?: "Failed" | "Rejected" | "Ignored" | "AlreadyApplied" | "Applied";
2728
+ ReasonCode?: string;
2729
+ FirstReceivedAt?: Date;
2730
+ LastReceivedAt?: Date;
2731
+ DeliveryCount?: number;
2732
+ }, {
2733
+ ID?: string;
2734
+ __mj_CreatedAt?: Date;
2735
+ __mj_UpdatedAt?: Date;
2736
+ PaymentIntentID?: string;
2737
+ PaymentIntent?: string;
2738
+ Reason?: string;
2739
+ PaymentProviderID?: string;
2740
+ PaymentProvider?: string;
2741
+ OccurredAt?: Date;
2742
+ ProviderChargeID?: string;
2743
+ ProviderIntentID?: string;
2744
+ ProviderEventID?: string;
2745
+ EventKind?: string;
2746
+ Outcome?: "Failed" | "Rejected" | "Ignored" | "AlreadyApplied" | "Applied";
2747
+ ReasonCode?: string;
2748
+ FirstReceivedAt?: Date;
2749
+ LastReceivedAt?: Date;
2750
+ DeliveryCount?: number;
2751
+ }>;
2752
+ export type mjBizAppsOrdersPaymentWebhookDeliveryEntityType = z.infer<typeof mjBizAppsOrdersPaymentWebhookDeliverySchema>;
2691
2753
  /**
2692
2754
  * zod schema definition for the entity MJ_BizApps_Orders: Price List Assignments
2693
2755
  */
@@ -12105,6 +12167,181 @@ export declare class mjBizAppsOrdersPaymentTypeEntity extends BaseEntity<mjBizAp
12105
12167
  */
12106
12168
  get __mj_UpdatedAt(): Date;
12107
12169
  }
12170
+ /**
12171
+ * MJ_BizApps_Orders: Payment Webhook Deliveries - strongly typed entity sub-class
12172
+ * * Schema: __mj_BizAppsOrders
12173
+ * * Base Table: PaymentWebhookDelivery
12174
+ * * Base View: vwPaymentWebhookDeliveries
12175
+ * * @description One row per verified webhook delivery from a payment gateway, with what Orders decided to do with it and why. Written after the signature check; a delivery whose signature failed is not recorded. A redelivery of the same event updates its row.
12176
+ * * Primary Key: ID
12177
+ * @extends {BaseEntity}
12178
+ * @class
12179
+ * @public
12180
+ */
12181
+ export declare class mjBizAppsOrdersPaymentWebhookDeliveryEntity extends BaseEntity<mjBizAppsOrdersPaymentWebhookDeliveryEntityType> {
12182
+ /**
12183
+ * Loads the MJ_BizApps_Orders: Payment Webhook Deliveries record from the database
12184
+ * @param ID: string - primary key value to load the MJ_BizApps_Orders: Payment Webhook Deliveries record.
12185
+ * @param EntityRelationshipsToLoad - (optional) the relationships to load
12186
+ * @returns {Promise<boolean>} - true if successful, false otherwise
12187
+ * @public
12188
+ * @async
12189
+ * @memberof mjBizAppsOrdersPaymentWebhookDeliveryEntity
12190
+ * @method
12191
+ * @override
12192
+ */
12193
+ Load(ID: string, EntityRelationshipsToLoad?: string[]): Promise<boolean>;
12194
+ /**
12195
+ * * Field Name: ID
12196
+ * * Display Name: ID
12197
+ * * SQL Data Type: uniqueidentifier
12198
+ * * Default Value: newsequentialid()
12199
+ */
12200
+ get ID(): string;
12201
+ set ID(value: string);
12202
+ /**
12203
+ * * Field Name: PaymentProviderID
12204
+ * * Display Name: Payment Provider ID
12205
+ * * SQL Data Type: uniqueidentifier
12206
+ * * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Providers (vwPaymentProviders.ID)
12207
+ * * Description: The configured payment provider whose webhook endpoint received the delivery.
12208
+ */
12209
+ get PaymentProviderID(): string;
12210
+ set PaymentProviderID(value: string);
12211
+ /**
12212
+ * * Field Name: ProviderEventID
12213
+ * * Display Name: Provider Event ID
12214
+ * * SQL Data Type: nvarchar(100)
12215
+ * * Description: The gateway's own event id (for Stripe, evt_...). Unique per provider. Null only when the verified body could not be read or carried no id.
12216
+ */
12217
+ get ProviderEventID(): string | null;
12218
+ set ProviderEventID(value: string | null);
12219
+ /**
12220
+ * * Field Name: EventKind
12221
+ * * Display Name: Event Kind
12222
+ * * SQL Data Type: nvarchar(100)
12223
+ * * Description: The gateway's event type, unmapped (for example payment_intent.succeeded or charge.refunded).
12224
+ */
12225
+ get EventKind(): string | null;
12226
+ set EventKind(value: string | null);
12227
+ /**
12228
+ * * Field Name: PaymentIntentID
12229
+ * * Display Name: Payment Intent ID
12230
+ * * SQL Data Type: uniqueidentifier
12231
+ * * Related Entity/Foreign Key: MJ_BizApps_Orders: Payment Intents (vwPaymentIntents.ID)
12232
+ * * Description: The payment intent Orders opened that this event is about. Null when the event names an intent Orders did not open, or no intent at all.
12233
+ */
12234
+ get PaymentIntentID(): string | null;
12235
+ set PaymentIntentID(value: string | null);
12236
+ /**
12237
+ * * Field Name: ProviderIntentID
12238
+ * * Display Name: Provider Intent ID
12239
+ * * SQL Data Type: nvarchar(100)
12240
+ * * Description: The gateway's intent id as the event reported it (for Stripe, pi_...), kept even when Orders has no intent with that id.
12241
+ */
12242
+ get ProviderIntentID(): string | null;
12243
+ set ProviderIntentID(value: string | null);
12244
+ /**
12245
+ * * Field Name: ProviderChargeID
12246
+ * * Display Name: Provider Charge ID
12247
+ * * SQL Data Type: nvarchar(100)
12248
+ * * Description: The gateway's charge id as the event reported it (for Stripe, ch_... or py_...), when it named one.
12249
+ */
12250
+ get ProviderChargeID(): string | null;
12251
+ set ProviderChargeID(value: string | null);
12252
+ /**
12253
+ * * Field Name: Outcome
12254
+ * * Display Name: Outcome
12255
+ * * SQL Data Type: nvarchar(20)
12256
+ * * Value List Type: List
12257
+ * * Possible Values
12258
+ * * AlreadyApplied
12259
+ * * Applied
12260
+ * * Failed
12261
+ * * Ignored
12262
+ * * Rejected
12263
+ * * Description: What Orders did with the latest delivery of this event. Applied: recorded against the intent. AlreadyApplied: a repeat or out-of-order event, answered without changing anything. Ignored: an event kind Orders does not act on, or an intent it did not open. Rejected: verified but unreadable or without an id. Failed: Orders could not record a valid event and asked the gateway to retry.
12264
+ */
12265
+ get Outcome(): 'AlreadyApplied' | 'Applied' | 'Failed' | 'Ignored' | 'Rejected';
12266
+ set Outcome(value: 'AlreadyApplied' | 'Applied' | 'Failed' | 'Ignored' | 'Rejected');
12267
+ /**
12268
+ * * Field Name: ReasonCode
12269
+ * * Display Name: Reason Code
12270
+ * * SQL Data Type: nvarchar(40)
12271
+ * * Description: Short machine-readable reason for the outcome, for filtering: kind_not_handled, unknown_intent, no_event_id, unreadable, duplicate, out_of_order, apply_failed. Null when the event was applied.
12272
+ */
12273
+ get ReasonCode(): string | null;
12274
+ set ReasonCode(value: string | null);
12275
+ /**
12276
+ * * Field Name: Reason
12277
+ * * Display Name: Reason
12278
+ * * SQL Data Type: nvarchar(1000)
12279
+ * * Description: The reason for the outcome, in words.
12280
+ */
12281
+ get Reason(): string | null;
12282
+ set Reason(value: string | null);
12283
+ /**
12284
+ * * Field Name: OccurredAt
12285
+ * * Display Name: Occurred At
12286
+ * * SQL Data Type: datetimeoffset
12287
+ * * Description: When the gateway says the event happened (Stripe's created time). Null when the event did not say.
12288
+ */
12289
+ get OccurredAt(): Date | null;
12290
+ set OccurredAt(value: Date | null);
12291
+ /**
12292
+ * * Field Name: FirstReceivedAt
12293
+ * * Display Name: First Received At
12294
+ * * SQL Data Type: datetimeoffset
12295
+ * * Default Value: sysdatetimeoffset()
12296
+ * * Description: When Orders first received this event.
12297
+ */
12298
+ get FirstReceivedAt(): Date;
12299
+ set FirstReceivedAt(value: Date);
12300
+ /**
12301
+ * * Field Name: LastReceivedAt
12302
+ * * Display Name: Last Received At
12303
+ * * SQL Data Type: datetimeoffset
12304
+ * * Default Value: sysdatetimeoffset()
12305
+ * * Description: When Orders last received this event. Differs from FirstReceivedAt when the gateway redelivered it.
12306
+ */
12307
+ get LastReceivedAt(): Date;
12308
+ set LastReceivedAt(value: Date);
12309
+ /**
12310
+ * * Field Name: DeliveryCount
12311
+ * * Display Name: Delivery Count
12312
+ * * SQL Data Type: int
12313
+ * * Default Value: 1
12314
+ * * Description: How many times the gateway delivered this event.
12315
+ */
12316
+ get DeliveryCount(): number;
12317
+ set DeliveryCount(value: number);
12318
+ /**
12319
+ * * Field Name: __mj_CreatedAt
12320
+ * * Display Name: Created At
12321
+ * * SQL Data Type: datetimeoffset
12322
+ * * Default Value: getutcdate()
12323
+ */
12324
+ get __mj_CreatedAt(): Date;
12325
+ /**
12326
+ * * Field Name: __mj_UpdatedAt
12327
+ * * Display Name: Updated At
12328
+ * * SQL Data Type: datetimeoffset
12329
+ * * Default Value: getutcdate()
12330
+ */
12331
+ get __mj_UpdatedAt(): Date;
12332
+ /**
12333
+ * * Field Name: PaymentProvider
12334
+ * * Display Name: Payment Provider
12335
+ * * SQL Data Type: nvarchar(200)
12336
+ */
12337
+ get PaymentProvider(): string;
12338
+ /**
12339
+ * * Field Name: PaymentIntent
12340
+ * * Display Name: Payment Intent
12341
+ * * SQL Data Type: nvarchar(100)
12342
+ */
12343
+ get PaymentIntent(): string | null;
12344
+ }
12108
12345
  /**
12109
12346
  * MJ_BizApps_Orders: Price List Assignments - strongly typed entity sub-class
12110
12347
  * * Schema: __mj_BizAppsOrders