@nimee/shared-types 1.0.307 → 1.0.308

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.
@@ -49,6 +49,7 @@ export interface IEndUserSeasonTicketModel {
49
49
  seller: string | mongoose.Types.ObjectId;
50
50
  endUser?: string | mongoose.Types.ObjectId | null;
51
51
  status: ISeasonTicketStatusType;
52
+ isDelete?: boolean;
52
53
  _id?: string | mongoose.Types.ObjectId;
53
54
  email?: string | null;
54
55
  phone?: string | null;
@@ -127,6 +128,7 @@ export declare enum ISeasonTicketStatusType {
127
128
  SUB_ITERATION_SKIPPED = "sub-iteration-skipped",// the subscription iteration was skipped
128
129
  INACTIVE = "inactive"
129
130
  }
131
+ export declare const LIVE_SEASON_TICKET_STATUSES: ISeasonTicketStatusType[];
130
132
  export declare enum IFamilyRole {
131
133
  PARENT = "parent",
132
134
  ADULT = "adult",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IFamilyRole = exports.ISeasonTicketStatusType = void 0;
3
+ exports.IFamilyRole = exports.LIVE_SEASON_TICKET_STATUSES = exports.ISeasonTicketStatusType = void 0;
4
4
  var ISeasonTicketStatusType;
5
5
  (function (ISeasonTicketStatusType) {
6
6
  ISeasonTicketStatusType["ACTIVE"] = "active";
@@ -15,6 +15,15 @@ var ISeasonTicketStatusType;
15
15
  ISeasonTicketStatusType["SUB_ITERATION_SKIPPED"] = "sub-iteration-skipped";
16
16
  ISeasonTicketStatusType["INACTIVE"] = "inactive";
17
17
  })(ISeasonTicketStatusType || (exports.ISeasonTicketStatusType = ISeasonTicketStatusType = {}));
18
+ // Statuses where the provider subscription is still live — billing now (ACTIVE, CANCEL_AT_PERIOD_END)
19
+ // or resumable (PAUSED). An end user holding any of these must NOT be soft-deleted: the provider would
20
+ // keep charging or could resume a "deleted" member. Shared so the user-service delete block and the
21
+ // payment-service cascade guard stay in lockstep. See issue #785.
22
+ exports.LIVE_SEASON_TICKET_STATUSES = [
23
+ ISeasonTicketStatusType.ACTIVE,
24
+ ISeasonTicketStatusType.CANCEL_AT_PERIOD_END,
25
+ ISeasonTicketStatusType.PAUSED,
26
+ ];
18
27
  var IFamilyRole;
19
28
  (function (IFamilyRole) {
20
29
  IFamilyRole["PARENT"] = "parent";
@@ -1 +1 @@
1
- {"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AAiGA,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,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":";;;AAkGA,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"}
@@ -59,6 +59,7 @@ export interface IEndUserModel {
59
59
  seller: string | mongoose.Types.ObjectId;
60
60
  source?: string;
61
61
  isActive?: boolean;
62
+ isDelete?: boolean;
62
63
  isAllowMarketingDelivery?: boolean;
63
64
  origin?: string;
64
65
  credits?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.307",
3
+ "version": "1.0.308",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -25,6 +25,7 @@ export interface IEndUserSeasonTicketModel {
25
25
  seller: string | mongoose.Types.ObjectId;
26
26
  endUser?: string | mongoose.Types.ObjectId | null;
27
27
  status: ISeasonTicketStatusType;
28
+ isDelete?: boolean;
28
29
  _id?: string | mongoose.Types.ObjectId;
29
30
  email?: string | null; // email of the end user
30
31
  phone?: string | null; // phone number of the end user
@@ -109,6 +110,16 @@ export enum ISeasonTicketStatusType {
109
110
  INACTIVE = "inactive", // paid but awaiting profile completion (family members)
110
111
  }
111
112
 
113
+ // Statuses where the provider subscription is still live — billing now (ACTIVE, CANCEL_AT_PERIOD_END)
114
+ // or resumable (PAUSED). An end user holding any of these must NOT be soft-deleted: the provider would
115
+ // keep charging or could resume a "deleted" member. Shared so the user-service delete block and the
116
+ // payment-service cascade guard stay in lockstep. See issue #785.
117
+ export const LIVE_SEASON_TICKET_STATUSES: ISeasonTicketStatusType[] = [
118
+ ISeasonTicketStatusType.ACTIVE,
119
+ ISeasonTicketStatusType.CANCEL_AT_PERIOD_END,
120
+ ISeasonTicketStatusType.PAUSED,
121
+ ];
122
+
112
123
  export enum IFamilyRole {
113
124
  PARENT = "parent",
114
125
  ADULT = "adult",
@@ -37,6 +37,7 @@ export interface IEndUserModel {
37
37
  seller: string | mongoose.Types.ObjectId;
38
38
  source?: string;
39
39
  isActive?: boolean;
40
+ isDelete?: boolean;
40
41
  isAllowMarketingDelivery?: boolean;
41
42
  origin?: string;
42
43
  credits?: number;