@nimee/shared-types 1.0.98 → 1.0.100

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.
@@ -0,0 +1,37 @@
1
+ /// <reference types="mongoose/types/pipelinestage" />
2
+ /// <reference types="mongoose/types/connection" />
3
+ /// <reference types="mongoose/types/cursor" />
4
+ /// <reference types="mongoose/types/document" />
5
+ /// <reference types="mongoose/types/error" />
6
+ /// <reference types="mongoose/types/mongooseoptions" />
7
+ /// <reference types="mongoose/types/schemaoptions" />
8
+ import mongoose from "mongoose";
9
+ import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
10
+ export interface IEndUserSeasonTicketModel {
11
+ name: string;
12
+ eventTransactionAllowed: number;
13
+ eventTransactionUsed: number;
14
+ price: number;
15
+ seasonTicket: string | mongoose.Types.ObjectId;
16
+ marketplace: string | mongoose.Types.ObjectId;
17
+ seller: string | mongoose.Types.ObjectId;
18
+ endUser: string | mongoose.Types.ObjectId;
19
+ status: ISeasonTicketStatusType;
20
+ _id?: string | mongoose.Types.ObjectId;
21
+ email: string;
22
+ phone: string;
23
+ iterations: number;
24
+ paymentIterationType: IPaymentSeasonTicketIterationType;
25
+ purchaseToken: string;
26
+ customPaymentJWT: string;
27
+ startDate: Date;
28
+ endDate: Date;
29
+ }
30
+ export declare enum ISeasonTicketStatusType {
31
+ ACTIVE = "active",// the season ticket is active
32
+ INITIAL = "Initial",// not yet paid
33
+ CANCELLED = "cancelled",// the season ticket has been cancelled
34
+ FAILED = "failed",// one of the payments has failed
35
+ COMPLETED = "completed",// all payments have been completed
36
+ EXPIRED = "expired"
37
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ISeasonTicketStatusType = void 0;
4
+ var ISeasonTicketStatusType;
5
+ (function (ISeasonTicketStatusType) {
6
+ ISeasonTicketStatusType["ACTIVE"] = "active";
7
+ ISeasonTicketStatusType["INITIAL"] = "Initial";
8
+ ISeasonTicketStatusType["CANCELLED"] = "cancelled";
9
+ ISeasonTicketStatusType["FAILED"] = "failed";
10
+ ISeasonTicketStatusType["COMPLETED"] = "completed";
11
+ ISeasonTicketStatusType["EXPIRED"] = "expired";
12
+ })(ISeasonTicketStatusType || (exports.ISeasonTicketStatusType = ISeasonTicketStatusType = {}));
13
+ //# sourceMappingURL=endUserSeasonTicket.js.map
@@ -0,0 +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,3 +1,5 @@
1
1
  export * from "./charge";
2
2
  export * from "./coupon";
3
3
  export * from "./payment";
4
+ export * from "./seasonTicket";
5
+ export * from "./endUserSeasonTicket";
@@ -17,4 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./charge"), exports);
18
18
  __exportStar(require("./coupon"), exports);
19
19
  __exportStar(require("./payment"), exports);
20
+ __exportStar(require("./seasonTicket"), exports);
21
+ __exportStar(require("./endUserSeasonTicket"), exports);
20
22
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,iDAA+B;AAC/B,wDAAsC"}
@@ -0,0 +1,28 @@
1
+ /// <reference types="mongoose/types/pipelinestage" />
2
+ /// <reference types="mongoose/types/connection" />
3
+ /// <reference types="mongoose/types/cursor" />
4
+ /// <reference types="mongoose/types/document" />
5
+ /// <reference types="mongoose/types/error" />
6
+ /// <reference types="mongoose/types/mongooseoptions" />
7
+ /// <reference types="mongoose/types/schemaoptions" />
8
+ import mongoose from "mongoose";
9
+ export interface ISeasonTicketModel {
10
+ _id?: string | mongoose.Types.ObjectId;
11
+ name: string;
12
+ startDate?: Date;
13
+ endDate?: Date;
14
+ eventTransactionAllowed: number;
15
+ price: number;
16
+ marketplace: string | mongoose.Types.ObjectId;
17
+ seller: string | mongoose.Types.ObjectId;
18
+ numberOfPayments?: number;
19
+ isEnabled: boolean;
20
+ paymentIterationType: IPaymentSeasonTicketIterationType;
21
+ iterations: number;
22
+ }
23
+ export declare enum IPaymentSeasonTicketIterationType {
24
+ DAILY = 1,
25
+ WEEKLY = 2,
26
+ MONTHLY = 3,
27
+ YEARLY = 4
28
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IPaymentSeasonTicketIterationType = void 0;
4
+ var IPaymentSeasonTicketIterationType;
5
+ (function (IPaymentSeasonTicketIterationType) {
6
+ IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["DAILY"] = 1] = "DAILY";
7
+ IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["WEEKLY"] = 2] = "WEEKLY";
8
+ IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["MONTHLY"] = 3] = "MONTHLY";
9
+ IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["YEARLY"] = 4] = "YEARLY";
10
+ })(IPaymentSeasonTicketIterationType || (exports.IPaymentSeasonTicketIterationType = IPaymentSeasonTicketIterationType = {}));
11
+ //# sourceMappingURL=seasonTicket.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seasonTicket.js","sourceRoot":"","sources":["../../src/payment/seasonTicket.ts"],"names":[],"mappings":";;;AAeA,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,2FAAS,CAAA;IACT,6FAAU,CAAA;IACV,+FAAW,CAAA;IACX,6FAAU,CAAA;AACZ,CAAC,EALW,iCAAiC,iDAAjC,iCAAiC,QAK5C"}
@@ -1,3 +1,11 @@
1
+ /// <reference types="mongoose/types/pipelinestage" />
2
+ /// <reference types="mongoose/types/connection" />
3
+ /// <reference types="mongoose/types/cursor" />
4
+ /// <reference types="mongoose/types/document" />
5
+ /// <reference types="mongoose/types/error" />
6
+ /// <reference types="mongoose/types/mongooseoptions" />
7
+ /// <reference types="mongoose/types/schemaoptions" />
8
+ import mongoose from "mongoose";
1
9
  export declare enum IPostSMSType {
2
10
  FORGOT_PASSWORD_EMAIL = "FORGOT_PASSWORD_EMAIL",
3
11
  FORGOT_PASSWORD_SMS = "FORGOT_PASSWORD_SMS",
@@ -26,3 +34,17 @@ export interface ISMSGroup {
26
34
  active_counter?: number;
27
35
  _id?: string;
28
36
  }
37
+ export interface ISMSCampaignModel {
38
+ name: string;
39
+ event?: string | mongoose.Types.ObjectId;
40
+ type: IPostSMSType;
41
+ user: string | mongoose.Types.ObjectId;
42
+ _id?: string | mongoose.Types.ObjectId;
43
+ seller?: string | mongoose.Types.ObjectId;
44
+ marketplace: string | mongoose.Types.ObjectId;
45
+ account?: string | mongoose.Types.ObjectId;
46
+ content: string;
47
+ externalId?: string;
48
+ smsProvider?: string;
49
+ sentCounter: number;
50
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/send-notification/sms.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAkBX;AAlBD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,2DAA2C,CAAA;IAC3C,qEAAqD,CAAA;IACrD,6CAA6B,CAAA;IAC7B,qDAAqC,CAAA;IACrC,qDAAqC,CAAA;IACrC,+CAA+B,CAAA;IAC/B,yEAAyD,CAAA;IACzD,iDAAiC,CAAA;IACjC,yDAAyC,CAAA;IACzC,iEAAiD,CAAA;IACjD,iCAAiB,CAAA;IACjB,2DAA2C,CAAA;IAC3C,+DAA+C,CAAA;IAC/C,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qCAAqB,CAAA;AACvB,CAAC,EAlBW,YAAY,4BAAZ,YAAY,QAkBvB"}
1
+ {"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/send-notification/sms.ts"],"names":[],"mappings":";;;AACA,IAAY,YAkBX;AAlBD,WAAY,YAAY;IACtB,+DAA+C,CAAA;IAC/C,2DAA2C,CAAA;IAC3C,qEAAqD,CAAA;IACrD,6CAA6B,CAAA;IAC7B,qDAAqC,CAAA;IACrC,qDAAqC,CAAA;IACrC,+CAA+B,CAAA;IAC/B,yEAAyD,CAAA;IACzD,iDAAiC,CAAA;IACjC,yDAAyC,CAAA;IACzC,iEAAiD,CAAA;IACjD,iCAAiB,CAAA;IACjB,2DAA2C,CAAA;IAC3C,+DAA+C,CAAA;IAC/C,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qCAAqB,CAAA;AACvB,CAAC,EAlBW,YAAY,4BAAZ,YAAY,QAkBvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimee/shared-types",
3
- "version": "1.0.98",
3
+ "version": "1.0.100",
4
4
  "description": "Types and interfaces that any service can access if needed",
5
5
  "main": "dist/index.js",
6
6
  "author": "dan goldberg",
@@ -0,0 +1,31 @@
1
+ import mongoose from "mongoose";
2
+ import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
3
+ export interface IEndUserSeasonTicketModel {
4
+ name: string;
5
+ eventTransactionAllowed: number; // how many events can be attended
6
+ eventTransactionUsed: number; // how many events have been attended
7
+ price: number; // the price per each iteration
8
+ seasonTicket: string | mongoose.Types.ObjectId;
9
+ marketplace: string | mongoose.Types.ObjectId;
10
+ seller: string | mongoose.Types.ObjectId;
11
+ endUser: string | mongoose.Types.ObjectId;
12
+ status: ISeasonTicketStatusType;
13
+ _id?: string | mongoose.Types.ObjectId;
14
+ email: string; // email of the end user
15
+ phone: string; // phone number of the end user
16
+ iterations: number; // how many payment iterations are there: -1 means infinite
17
+ paymentIterationType: IPaymentSeasonTicketIterationType; // daily, weekly, monthly, yearly
18
+ purchaseToken: string; // the token used to purchase the season ticket
19
+ customPaymentJWT: string;
20
+ startDate: Date; // the start date of the season ticket - if the seller wants one purchase to be valid for a certain period
21
+ endDate: Date; // the end date of the season ticket - if the seller wants one purchase to be valid for a certain period
22
+ // so when the end date is over the season ticket is no longer valid and the status should be expired
23
+ }
24
+ export enum ISeasonTicketStatusType {
25
+ ACTIVE = "active", // the season ticket is active
26
+ INITIAL = "Initial", // not yet paid
27
+ CANCELLED = "cancelled", // the season ticket has been cancelled
28
+ FAILED = "failed", // one of the payments has failed
29
+ COMPLETED = "completed", // all payments have been completed
30
+ EXPIRED = "expired", // the season ticket has expired - end date has passed
31
+ }
@@ -1,3 +1,5 @@
1
1
  export * from "./charge";
2
2
  export * from "./coupon";
3
3
  export * from "./payment";
4
+ export * from "./seasonTicket";
5
+ export * from "./endUserSeasonTicket";
@@ -0,0 +1,21 @@
1
+ import mongoose from "mongoose";
2
+ export interface ISeasonTicketModel {
3
+ _id?: string | mongoose.Types.ObjectId;
4
+ name: string;
5
+ startDate?: Date;
6
+ endDate?: Date;
7
+ eventTransactionAllowed: number;
8
+ price: number;
9
+ marketplace: string | mongoose.Types.ObjectId;
10
+ seller: string | mongoose.Types.ObjectId;
11
+ numberOfPayments?: number;
12
+ isEnabled: boolean;
13
+ paymentIterationType: IPaymentSeasonTicketIterationType;
14
+ iterations: number;
15
+ }
16
+ export enum IPaymentSeasonTicketIterationType {
17
+ DAILY = 1,
18
+ WEEKLY = 2,
19
+ MONTHLY = 3,
20
+ YEARLY = 4,
21
+ }
@@ -1,3 +1,4 @@
1
+ import mongoose from "mongoose";
1
2
  export enum IPostSMSType {
2
3
  FORGOT_PASSWORD_EMAIL = "FORGOT_PASSWORD_EMAIL",
3
4
  FORGOT_PASSWORD_SMS = "FORGOT_PASSWORD_SMS",
@@ -26,3 +27,18 @@ export interface ISMSGroup {
26
27
  active_counter?: number;
27
28
  _id?: string;
28
29
  }
30
+
31
+ export interface ISMSCampaignModel {
32
+ name: string;
33
+ event?: string | mongoose.Types.ObjectId;
34
+ type: IPostSMSType;
35
+ user: string | mongoose.Types.ObjectId;
36
+ _id?: string | mongoose.Types.ObjectId;
37
+ seller?: string | mongoose.Types.ObjectId;
38
+ marketplace: string | mongoose.Types.ObjectId;
39
+ account?: string | mongoose.Types.ObjectId;
40
+ content: string;
41
+ externalId?: string;
42
+ smsProvider?: string;
43
+ sentCounter: number;
44
+ }