@nimee/shared-types 1.0.100 → 1.0.101

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.
@@ -8,6 +8,15 @@
8
8
  import mongoose from "mongoose";
9
9
  import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
10
10
  export interface IEndUserSeasonTicketModel {
11
+ externalId: string;
12
+ externalCode: string;
13
+ paymentDate: Date;
14
+ externalSubscriptionUrl: string;
15
+ iterationsCompleted: number;
16
+ iterationsLeft: number;
17
+ iterationsSkipped: number;
18
+ nextDate: Date;
19
+ prevDate: Date;
11
20
  name: string;
12
21
  eventTransactionAllowed: number;
13
22
  eventTransactionUsed: number;
@@ -23,9 +32,12 @@ export interface IEndUserSeasonTicketModel {
23
32
  iterations: number;
24
33
  paymentIterationType: IPaymentSeasonTicketIterationType;
25
34
  purchaseToken: string;
26
- customPaymentJWT: string;
27
35
  startDate: Date;
28
36
  endDate: Date;
37
+ token?: string;
38
+ externalSubStatus: number;
39
+ currency: string;
40
+ externalSubscriptionIdOfNimiId: string;
29
41
  }
30
42
  export declare enum ISeasonTicketStatusType {
31
43
  ACTIVE = "active",// the season ticket is active
@@ -1 +1 @@
1
- {"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AAuBA,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;AACrB,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC"}
1
+ {"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AAmCA,IAAY,uBAOX;AAPD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;AACrB,CAAC,EAPW,uBAAuB,uCAAvB,uBAAuB,QAOlC"}
@@ -47,4 +47,5 @@ export interface ISMSCampaignModel {
47
47
  externalId?: string;
48
48
  smsProvider?: string;
49
49
  sentCounter: number;
50
+ internalName: string;
50
51
  }
@@ -11,6 +11,8 @@ export interface ISegmentModel {
11
11
  name: string;
12
12
  marketplace: string | mongoose.Types.ObjectId;
13
13
  account: string | mongoose.Types.ObjectId;
14
+ description?: string;
15
+ handler: string;
14
16
  }
15
17
  export interface ISegmentEndUserModel {
16
18
  _id?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -1,6 +1,15 @@
1
1
  import mongoose from "mongoose";
2
2
  import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
3
3
  export interface IEndUserSeasonTicketModel {
4
+ externalId: string; // the id of the season ticket in the payment service
5
+ externalCode: string; // the code of the season ticket in the payment service
6
+ paymentDate: Date;
7
+ externalSubscriptionUrl: string;
8
+ iterationsCompleted: number;
9
+ iterationsLeft: number;
10
+ iterationsSkipped: number;
11
+ nextDate: Date;
12
+ prevDate: Date;
4
13
  name: string;
5
14
  eventTransactionAllowed: number; // how many events can be attended
6
15
  eventTransactionUsed: number; // how many events have been attended
@@ -16,10 +25,13 @@ export interface IEndUserSeasonTicketModel {
16
25
  iterations: number; // how many payment iterations are there: -1 means infinite
17
26
  paymentIterationType: IPaymentSeasonTicketIterationType; // daily, weekly, monthly, yearly
18
27
  purchaseToken: string; // the token used to purchase the season ticket
19
- customPaymentJWT: string;
20
28
  startDate: Date; // the start date of the season ticket - if the seller wants one purchase to be valid for a certain period
21
29
  endDate: Date; // the end date of the season ticket - if the seller wants one purchase to be valid for a certain period
22
30
  // so when the end date is over the season ticket is no longer valid and the status should be expired
31
+ token?: string; // the token generated when created this object and use to call createSubscription on the payment service
32
+ externalSubStatus: number; // the status of the subscription in the payment service
33
+ currency: string;
34
+ externalSubscriptionIdOfNimiId: string;
23
35
  }
24
36
  export enum ISeasonTicketStatusType {
25
37
  ACTIVE = "active", // the season ticket is active
@@ -41,4 +41,5 @@ export interface ISMSCampaignModel {
41
41
  externalId?: string;
42
42
  smsProvider?: string;
43
43
  sentCounter: number;
44
+ internalName: string;
44
45
  }
@@ -4,6 +4,8 @@ export interface ISegmentModel {
4
4
  name: string;
5
5
  marketplace: string | mongoose.Types.ObjectId;
6
6
  account: string | mongoose.Types.ObjectId;
7
+ description?: string;
8
+ handler: string;
7
9
  }
8
10
 
9
11
  export interface ISegmentEndUserModel {