@nimee/shared-types 1.0.331 → 1.0.333

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.
@@ -17,7 +17,14 @@ export declare enum IGroupOrderHistoryType {
17
17
  STATUS = "status",
18
18
  DEBT_DOC = "debt_doc",
19
19
  DEBT_DOC_FAILED = "debt_doc_failed",
20
- DEBT_DOC_SKIPPED = "debt_doc_skipped"
20
+ DEBT_DOC_SKIPPED = "debt_doc_skipped",
21
+ CAPTURE = "capture",
22
+ CAPTURE_RELEASED = "capture_released",
23
+ CAPTURE_FAILED = "capture_failed",
24
+ /** A slot was captured beyond its remaining capacity — recorded for a human, never refused (#1002 §6). */
25
+ CAPTURE_OVER_CAPACITY = "capture_over_capacity",
26
+ /** `resend` amend: the admin chose to keep the old seats until the new signature lands (#1002 §4). */
27
+ CAPTURE_RETAINED = "capture_retained"
21
28
  }
22
29
  export interface IGroupOrderEmailContact {
23
30
  email: string;
@@ -22,5 +22,14 @@ var IGroupOrderHistoryType;
22
22
  IGroupOrderHistoryType["DEBT_DOC"] = "debt_doc";
23
23
  IGroupOrderHistoryType["DEBT_DOC_FAILED"] = "debt_doc_failed";
24
24
  IGroupOrderHistoryType["DEBT_DOC_SKIPPED"] = "debt_doc_skipped";
25
+ // #1002 — seat capture. `capture_failed` is recorded rather than thrown: capture runs on the public
26
+ // signing route and must never fail a signature.
27
+ IGroupOrderHistoryType["CAPTURE"] = "capture";
28
+ IGroupOrderHistoryType["CAPTURE_RELEASED"] = "capture_released";
29
+ IGroupOrderHistoryType["CAPTURE_FAILED"] = "capture_failed";
30
+ /** A slot was captured beyond its remaining capacity — recorded for a human, never refused (#1002 §6). */
31
+ IGroupOrderHistoryType["CAPTURE_OVER_CAPACITY"] = "capture_over_capacity";
32
+ /** `resend` amend: the admin chose to keep the old seats until the new signature lands (#1002 §4). */
33
+ IGroupOrderHistoryType["CAPTURE_RETAINED"] = "capture_retained";
25
34
  })(IGroupOrderHistoryType || (exports.IGroupOrderHistoryType = IGroupOrderHistoryType = {}));
26
35
  //# sourceMappingURL=groupOrder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groupOrder.js","sourceRoot":"","sources":["../../src/crm/groupOrder.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AAEH,sFAAsF;AACtF,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;IACjB,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;IACrB,6DAAmC,CAAA;IACnC,+DAAqC,CAAA;AACvC,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC"}
1
+ {"version":3,"file":"groupOrder.js","sourceRoot":"","sources":["../../src/crm/groupOrder.ts"],"names":[],"mappings":";;;AAEA;;;;GAIG;AAEH,sFAAsF;AACtF,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,kCAAa,CAAA;IACb,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,sBAgBX;AAhBD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,2CAAiB,CAAA;IACjB,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;IACrB,6DAAmC,CAAA;IACnC,+DAAqC,CAAA;IACrC,oGAAoG;IACpG,iDAAiD;IACjD,6CAAmB,CAAA;IACnB,+DAAqC,CAAA;IACrC,2DAAiC,CAAA;IACjC,0GAA0G;IAC1G,yEAA+C,CAAA;IAC/C,sGAAsG;IACtG,+DAAqC,CAAA;AACvC,CAAC,EAhBW,sBAAsB,sCAAtB,sBAAsB,QAgBjC"}
@@ -1,7 +1,16 @@
1
1
  export declare enum ITicketTypeEnum {
2
2
  TICKET = "ticket",
3
3
  SYSTEM_FREE_TICKET = "SystemFreeTicket",
4
- SPECIAL = "special"
4
+ SPECIAL = "special",
5
+ /**
6
+ * #1002 — the hidden per-event "קבוצות" ticket every group order's seats are captured on.
7
+ * Its own type, not SYSTEM_FREE_TICKET: `is_enabled: false` gives NO backend protection
8
+ * (nothing filters or validates it, and it is typed as a string in the ticket response
9
+ * schemas so every `!== false` guard on the client is dead), and a hidden ticket added to an
10
+ * enabled event link is publicly buyable. The type is what excludes it from the link picker,
11
+ * the public page and the cashier, and what the order path rejects for non-group callers.
12
+ */
13
+ GROUP_CAPACITY = "GroupCapacity"
5
14
  }
6
15
  export interface IGroupDiscountRule {
7
16
  minQuantity: number;
@@ -6,5 +6,14 @@ var ITicketTypeEnum;
6
6
  ITicketTypeEnum["TICKET"] = "ticket";
7
7
  ITicketTypeEnum["SYSTEM_FREE_TICKET"] = "SystemFreeTicket";
8
8
  ITicketTypeEnum["SPECIAL"] = "special";
9
+ /**
10
+ * #1002 — the hidden per-event "קבוצות" ticket every group order's seats are captured on.
11
+ * Its own type, not SYSTEM_FREE_TICKET: `is_enabled: false` gives NO backend protection
12
+ * (nothing filters or validates it, and it is typed as a string in the ticket response
13
+ * schemas so every `!== false` guard on the client is dead), and a hidden ticket added to an
14
+ * enabled event link is publicly buyable. The type is what excludes it from the link picker,
15
+ * the public page and the cashier, and what the order path rejects for non-group callers.
16
+ */
17
+ ITicketTypeEnum["GROUP_CAPACITY"] = "GroupCapacity";
9
18
  })(ITicketTypeEnum || (exports.ITicketTypeEnum = ITicketTypeEnum = {}));
10
19
  //# sourceMappingURL=ticket.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ticket.js","sourceRoot":"","sources":["../../src/event/ticket.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,0DAAuC,CAAA;IACvC,sCAAmB,CAAA;AACrB,CAAC,EAJW,eAAe,+BAAf,eAAe,QAI1B"}
1
+ {"version":3,"file":"ticket.js","sourceRoot":"","sources":["../../src/event/ticket.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAaX;AAbD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,0DAAuC,CAAA;IACvC,sCAAmB,CAAA;IACnB;;;;;;;OAOG;IACH,mDAAgC,CAAA;AAClC,CAAC,EAbW,eAAe,+BAAf,eAAe,QAa1B"}
@@ -53,6 +53,7 @@ export interface IEndUserSeasonTicketModel {
53
53
  _id?: string | mongoose.Types.ObjectId;
54
54
  email?: string | null;
55
55
  phone?: string | null;
56
+ smsOptIn?: boolean;
56
57
  iterations: number;
57
58
  paymentIterationType: IPaymentSeasonTicketIterationType;
58
59
  purchaseToken?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AAuGA,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,wEAA6C,CAAA;IAC7C,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;IACnB,4CAAiB,CAAA;IACjB,0EAA+C,CAAA;IAC/C,0EAA+C,CAAA;IAC/C,gDAAqB,CAAA;AACvB,CAAC,EAZW,uBAAuB,uCAAvB,uBAAuB,QAYlC;AAED,sGAAsG;AACtG,uGAAuG;AACvG,oGAAoG;AACpG,kEAAkE;AACrD,QAAA,2BAA2B,GAA8B;IACpE,uBAAuB,CAAC,MAAM;IAC9B,uBAAuB,CAAC,oBAAoB;IAC5C,uBAAuB,CAAC,MAAM;CAC/B,CAAC;AAEF,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,8BAAe,CAAA;AACjB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
1
+ {"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AA6GA,IAAY,uBAYX;AAZD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,wEAA6C,CAAA;IAC7C,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;IACnB,4CAAiB,CAAA;IACjB,0EAA+C,CAAA;IAC/C,0EAA+C,CAAA;IAC/C,gDAAqB,CAAA;AACvB,CAAC,EAZW,uBAAuB,uCAAvB,uBAAuB,QAYlC;AAED,sGAAsG;AACtG,uGAAuG;AACvG,oGAAoG;AACpG,kEAAkE;AACrD,QAAA,2BAA2B,GAA8B;IACpE,uBAAuB,CAAC,MAAM;IAC9B,uBAAuB,CAAC,oBAAoB;IAC5C,uBAAuB,CAAC,MAAM;CAC/B,CAAC;AAEF,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,8BAAe,CAAA;AACjB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.331",
3
+ "version": "1.0.333",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -21,6 +21,15 @@ export enum IGroupOrderHistoryType {
21
21
  DEBT_DOC = "debt_doc",
22
22
  DEBT_DOC_FAILED = "debt_doc_failed",
23
23
  DEBT_DOC_SKIPPED = "debt_doc_skipped",
24
+ // #1002 — seat capture. `capture_failed` is recorded rather than thrown: capture runs on the public
25
+ // signing route and must never fail a signature.
26
+ CAPTURE = "capture",
27
+ CAPTURE_RELEASED = "capture_released",
28
+ CAPTURE_FAILED = "capture_failed",
29
+ /** A slot was captured beyond its remaining capacity — recorded for a human, never refused (#1002 §6). */
30
+ CAPTURE_OVER_CAPACITY = "capture_over_capacity",
31
+ /** `resend` amend: the admin chose to keep the old seats until the new signature lands (#1002 §4). */
32
+ CAPTURE_RETAINED = "capture_retained",
24
33
  }
25
34
 
26
35
  export interface IGroupOrderEmailContact {
@@ -2,6 +2,15 @@ export enum ITicketTypeEnum {
2
2
  TICKET = "ticket",
3
3
  SYSTEM_FREE_TICKET = "SystemFreeTicket",
4
4
  SPECIAL = "special",
5
+ /**
6
+ * #1002 — the hidden per-event "קבוצות" ticket every group order's seats are captured on.
7
+ * Its own type, not SYSTEM_FREE_TICKET: `is_enabled: false` gives NO backend protection
8
+ * (nothing filters or validates it, and it is typed as a string in the ticket response
9
+ * schemas so every `!== false` guard on the client is dead), and a hidden ticket added to an
10
+ * enabled event link is publicly buyable. The type is what excludes it from the link picker,
11
+ * the public page and the cashier, and what the order path rejects for non-group callers.
12
+ */
13
+ GROUP_CAPACITY = "GroupCapacity",
5
14
  }
6
15
 
7
16
  export interface IGroupDiscountRule {
@@ -29,6 +29,12 @@ export interface IEndUserSeasonTicketModel {
29
29
  _id?: string | mongoose.Types.ObjectId;
30
30
  email?: string | null; // email of the end user
31
31
  phone?: string | null; // phone number of the end user
32
+ // Admin's per-purchase opt-in for the purchase-confirmation SMS (asked in the UI at creation
33
+ // time; default false — SMS only fires when this is explicitly true). Persisted rather than a
34
+ // one-request-only param because the Stripe/Payme recurring-subscription first-payment SMS fires
35
+ // from an async webhook long after the original request, with no request body to read a toggle
36
+ // from — this stored value is the only way that path can know what was chosen at signup. #1042
37
+ smsOptIn?: boolean;
32
38
  iterations: number; // how many payment iterations are there: -1 means infinite
33
39
  paymentIterationType: IPaymentSeasonTicketIterationType; // daily, weekly, monthly, yearly
34
40
  purchaseToken?: string; // the token used to purchase the season ticket