@nimee/shared-types 1.0.97 → 1.0.99
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.
- package/dist/event/ticket.d.ts +1 -0
- package/dist/payment/endUserSeasonTicket.d.ts +37 -0
- package/dist/payment/endUserSeasonTicket.js +13 -0
- package/dist/payment/endUserSeasonTicket.js.map +1 -0
- package/dist/payment/index.d.ts +2 -0
- package/dist/payment/index.js +2 -0
- package/dist/payment/index.js.map +1 -1
- package/dist/payment/seasonTicket.d.ts +28 -0
- package/dist/payment/seasonTicket.js +11 -0
- package/dist/payment/seasonTicket.js.map +1 -0
- package/dist/user/endUser.d.ts +1 -1
- package/dist/userEvent/userEvent.d.ts +2 -1
- package/package.json +1 -1
- package/src/event/ticket.ts +1 -0
- package/src/payment/endUserSeasonTicket.ts +31 -0
- package/src/payment/index.ts +2 -0
- package/src/payment/seasonTicket.ts +21 -0
- package/src/user/endUser.ts +1 -1
- package/src/userEvent/userEvent.ts +2 -1
package/dist/event/ticket.d.ts
CHANGED
|
@@ -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"}
|
package/dist/payment/index.d.ts
CHANGED
package/dist/payment/index.js
CHANGED
|
@@ -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"}
|
package/dist/user/endUser.d.ts
CHANGED
|
@@ -12,7 +12,6 @@ export interface ITicketInfoModel {
|
|
|
12
12
|
export interface IUserEventModel {
|
|
13
13
|
event: string;
|
|
14
14
|
account: string;
|
|
15
|
-
user: string;
|
|
16
15
|
ticket: string;
|
|
17
16
|
isApproved: boolean;
|
|
18
17
|
isCheckedIn: boolean;
|
|
@@ -32,4 +31,6 @@ export interface IUserEventModel {
|
|
|
32
31
|
identificationNumber: string;
|
|
33
32
|
isOrderCreator: boolean;
|
|
34
33
|
ticketsInfo: ITicketInfoModel[];
|
|
34
|
+
endUser: string;
|
|
35
|
+
seller: string;
|
|
35
36
|
}
|
package/package.json
CHANGED
package/src/event/ticket.ts
CHANGED
|
@@ -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
|
+
}
|
package/src/payment/index.ts
CHANGED
|
@@ -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
|
+
}
|
package/src/user/endUser.ts
CHANGED
|
@@ -12,7 +12,6 @@ export interface ITicketInfoModel {
|
|
|
12
12
|
export interface IUserEventModel {
|
|
13
13
|
event: string;
|
|
14
14
|
account: string;
|
|
15
|
-
user: string;
|
|
16
15
|
ticket: string;
|
|
17
16
|
isApproved: boolean;
|
|
18
17
|
isCheckedIn: boolean;
|
|
@@ -32,4 +31,6 @@ export interface IUserEventModel {
|
|
|
32
31
|
identificationNumber: string;
|
|
33
32
|
isOrderCreator: boolean;
|
|
34
33
|
ticketsInfo: ITicketInfoModel[];
|
|
34
|
+
endUser: string;
|
|
35
|
+
seller: string;
|
|
35
36
|
}
|