@nimee/shared-types 1.0.130 → 1.0.132
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/crm/endUserNotification.d.ts +35 -0
- package/dist/crm/endUserNotification.js +17 -0
- package/dist/crm/endUserNotification.js.map +1 -0
- package/dist/crm/index.d.ts +1 -0
- package/dist/crm/index.js +1 -0
- package/dist/crm/index.js.map +1 -1
- package/dist/payment/endUserSeasonTicket.d.ts +10 -2
- package/dist/payment/endUserSeasonTicket.js +1 -0
- package/dist/payment/endUserSeasonTicket.js.map +1 -1
- package/dist/payment/seasonTicket.d.ts +7 -0
- package/dist/payment/seasonTicket.js +6 -1
- package/dist/payment/seasonTicket.js.map +1 -1
- package/dist/user/segment.d.ts +9 -0
- package/dist/user/segment.js +8 -0
- package/dist/user/segment.js.map +1 -1
- package/dist/userEvent/eventOrder.d.ts +1 -0
- package/package.json +1 -1
- package/src/crm/endUserNotification.ts +28 -0
- package/src/crm/index.ts +1 -0
- package/src/payment/endUserSeasonTicket.ts +9 -1
- package/src/payment/seasonTicket.ts +8 -0
- package/src/user/segment.ts +9 -0
- package/src/userEvent/eventOrder.ts +1 -0
|
@@ -0,0 +1,35 @@
|
|
|
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 * as mongoose from "mongoose";
|
|
9
|
+
export declare enum IPlatform {
|
|
10
|
+
IOS = "IOS",
|
|
11
|
+
ANDROID = "ANDROID",
|
|
12
|
+
WEB = "WEB"
|
|
13
|
+
}
|
|
14
|
+
export declare enum IAppNotificationStatus {
|
|
15
|
+
PENDING = "pending",
|
|
16
|
+
SENT = "sent",
|
|
17
|
+
FAILED = "failed",
|
|
18
|
+
RECEIVED = "received"
|
|
19
|
+
}
|
|
20
|
+
export interface IEndUserNotificationModel {
|
|
21
|
+
_id?: string | mongoose.Types.ObjectId;
|
|
22
|
+
marketplace: string | mongoose.Types.ObjectId;
|
|
23
|
+
seller: string | mongoose.Types.ObjectId;
|
|
24
|
+
description?: string;
|
|
25
|
+
endUser: string | mongoose.Types.ObjectId;
|
|
26
|
+
segment?: string | mongoose.Types.ObjectId;
|
|
27
|
+
data?: object;
|
|
28
|
+
action?: string;
|
|
29
|
+
message: string;
|
|
30
|
+
status: IAppNotificationStatus;
|
|
31
|
+
platform: IPlatform;
|
|
32
|
+
sentAt?: Date;
|
|
33
|
+
receivedAt?: Date;
|
|
34
|
+
error?: string;
|
|
35
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IAppNotificationStatus = exports.IPlatform = void 0;
|
|
4
|
+
var IPlatform;
|
|
5
|
+
(function (IPlatform) {
|
|
6
|
+
IPlatform["IOS"] = "IOS";
|
|
7
|
+
IPlatform["ANDROID"] = "ANDROID";
|
|
8
|
+
IPlatform["WEB"] = "WEB";
|
|
9
|
+
})(IPlatform || (exports.IPlatform = IPlatform = {}));
|
|
10
|
+
var IAppNotificationStatus;
|
|
11
|
+
(function (IAppNotificationStatus) {
|
|
12
|
+
IAppNotificationStatus["PENDING"] = "pending";
|
|
13
|
+
IAppNotificationStatus["SENT"] = "sent";
|
|
14
|
+
IAppNotificationStatus["FAILED"] = "failed";
|
|
15
|
+
IAppNotificationStatus["RECEIVED"] = "received";
|
|
16
|
+
})(IAppNotificationStatus || (exports.IAppNotificationStatus = IAppNotificationStatus = {}));
|
|
17
|
+
//# sourceMappingURL=endUserNotification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endUserNotification.js","sourceRoot":"","sources":["../../src/crm/endUserNotification.ts"],"names":[],"mappings":";;;AACA,IAAY,SAIX;AAJD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,gCAAmB,CAAA;IACnB,wBAAW,CAAA;AACb,CAAC,EAJW,SAAS,yBAAT,SAAS,QAIpB;AACD,IAAY,sBAKX;AALD,WAAY,sBAAsB;IAChC,6CAAmB,CAAA;IACnB,uCAAa,CAAA;IACb,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;AACvB,CAAC,EALW,sBAAsB,sCAAtB,sBAAsB,QAKjC"}
|
package/dist/crm/index.d.ts
CHANGED
package/dist/crm/index.js
CHANGED
|
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./endUserCRMEvent"), exports);
|
|
18
18
|
__exportStar(require("./deviceNotification"), exports);
|
|
19
|
+
__exportStar(require("./endUserNotification"), exports);
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
package/dist/crm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/crm/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,uDAAqC;AACrC,wDAAsC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/// <reference types="mongoose/types/mongooseoptions" />
|
|
7
7
|
/// <reference types="mongoose/types/schemaoptions" />
|
|
8
8
|
import mongoose from "mongoose";
|
|
9
|
-
import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
|
|
9
|
+
import { IPaymentSeasonTicketIterationType, ISeasonTicketType } from "./seasonTicket";
|
|
10
10
|
import { IPaymentCouponTypeEnum } from "./coupon";
|
|
11
11
|
export interface IEndUserSeasonTicketModel {
|
|
12
12
|
discountType?: IPaymentCouponTypeEnum;
|
|
@@ -56,7 +56,14 @@ export interface IEndUserSeasonTicketModel {
|
|
|
56
56
|
memberBringFriendCreatedCoupons?: Array<{
|
|
57
57
|
couponId: string;
|
|
58
58
|
date: Date;
|
|
59
|
+
couponCode: string;
|
|
60
|
+
event: string | mongoose.Types.ObjectId;
|
|
61
|
+
numberOfTickets: string;
|
|
59
62
|
}>;
|
|
63
|
+
seasonTicketType: ISeasonTicketType;
|
|
64
|
+
entryPassTicketsUsed?: number;
|
|
65
|
+
entryPassTicketsAllowedPerEvent?: number;
|
|
66
|
+
entryPassTotalTicketsAllowed?: number;
|
|
60
67
|
}
|
|
61
68
|
export declare enum ISeasonTicketStatusType {
|
|
62
69
|
ACTIVE = "active",// the season ticket is active
|
|
@@ -66,5 +73,6 @@ export declare enum ISeasonTicketStatusType {
|
|
|
66
73
|
COMPLETED = "completed",// all payments have been completed
|
|
67
74
|
EXPIRED = "expired",// the season ticket has expired - end date has passed
|
|
68
75
|
PAUSED = "paused",// the season ticket has been paused
|
|
69
|
-
SUB_ITERATION_SUCCESS = "sub-iteration-success"
|
|
76
|
+
SUB_ITERATION_SUCCESS = "sub-iteration-success",// the subscription iteration was successful
|
|
77
|
+
SUB_ITERATION_SKIPPED = "sub-iteration-skipped"
|
|
70
78
|
}
|
|
@@ -11,5 +11,6 @@ var ISeasonTicketStatusType;
|
|
|
11
11
|
ISeasonTicketStatusType["EXPIRED"] = "expired";
|
|
12
12
|
ISeasonTicketStatusType["PAUSED"] = "paused";
|
|
13
13
|
ISeasonTicketStatusType["SUB_ITERATION_SUCCESS"] = "sub-iteration-success";
|
|
14
|
+
ISeasonTicketStatusType["SUB_ITERATION_SKIPPED"] = "sub-iteration-skipped";
|
|
14
15
|
})(ISeasonTicketStatusType || (exports.ISeasonTicketStatusType = ISeasonTicketStatusType = {}));
|
|
15
16
|
//# sourceMappingURL=endUserSeasonTicket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"endUserSeasonTicket.js","sourceRoot":"","sources":["../../src/payment/endUserSeasonTicket.ts"],"names":[],"mappings":";;;AA6DA,IAAY,uBAUX;AAVD,WAAY,uBAAuB;IACjC,4CAAiB,CAAA;IACjB,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,4CAAiB,CAAA;IACjB,kDAAuB,CAAA;IACvB,8CAAmB,CAAA;IACnB,4CAAiB,CAAA;IACjB,0EAA+C,CAAA;IAC/C,0EAA+C,CAAA;AACjD,CAAC,EAVW,uBAAuB,uCAAvB,uBAAuB,QAUlC"}
|
|
@@ -19,6 +19,9 @@ export interface ISeasonTicketModel {
|
|
|
19
19
|
isEnabled: boolean;
|
|
20
20
|
paymentIterationType: IPaymentSeasonTicketIterationType;
|
|
21
21
|
iterations: number;
|
|
22
|
+
seasonTicketType: ISeasonTicketType;
|
|
23
|
+
entryPassTicketsAllowedPerEvent?: number;
|
|
24
|
+
entryPassTotalTicketsAllowed?: number;
|
|
22
25
|
}
|
|
23
26
|
export declare enum IPaymentSeasonTicketIterationType {
|
|
24
27
|
DAILY = 1,
|
|
@@ -26,3 +29,7 @@ export declare enum IPaymentSeasonTicketIterationType {
|
|
|
26
29
|
MONTHLY = 3,
|
|
27
30
|
YEARLY = 4
|
|
28
31
|
}
|
|
32
|
+
export declare enum ISeasonTicketType {
|
|
33
|
+
SEASON_TICKET = "season-ticket",
|
|
34
|
+
ENTRY_PASS = "entry-pass"
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IPaymentSeasonTicketIterationType = void 0;
|
|
3
|
+
exports.ISeasonTicketType = exports.IPaymentSeasonTicketIterationType = void 0;
|
|
4
4
|
var IPaymentSeasonTicketIterationType;
|
|
5
5
|
(function (IPaymentSeasonTicketIterationType) {
|
|
6
6
|
IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["DAILY"] = 1] = "DAILY";
|
|
@@ -8,4 +8,9 @@ var IPaymentSeasonTicketIterationType;
|
|
|
8
8
|
IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["MONTHLY"] = 3] = "MONTHLY";
|
|
9
9
|
IPaymentSeasonTicketIterationType[IPaymentSeasonTicketIterationType["YEARLY"] = 4] = "YEARLY";
|
|
10
10
|
})(IPaymentSeasonTicketIterationType || (exports.IPaymentSeasonTicketIterationType = IPaymentSeasonTicketIterationType = {}));
|
|
11
|
+
var ISeasonTicketType;
|
|
12
|
+
(function (ISeasonTicketType) {
|
|
13
|
+
ISeasonTicketType["SEASON_TICKET"] = "season-ticket";
|
|
14
|
+
ISeasonTicketType["ENTRY_PASS"] = "entry-pass";
|
|
15
|
+
})(ISeasonTicketType || (exports.ISeasonTicketType = ISeasonTicketType = {}));
|
|
11
16
|
//# sourceMappingURL=seasonTicket.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"seasonTicket.js","sourceRoot":"","sources":["../../src/payment/seasonTicket.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"seasonTicket.js","sourceRoot":"","sources":["../../src/payment/seasonTicket.ts"],"names":[],"mappings":";;;AAkBA,IAAY,iCAKX;AALD,WAAY,iCAAiC;IAC3C,2FAAS,CAAA;IACT,6FAAU,CAAA;IACV,+FAAW,CAAA;IACX,6FAAU,CAAA;AACZ,CAAC,EALW,iCAAiC,iDAAjC,iCAAiC,QAK5C;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oDAA+B,CAAA;IAC/B,8CAAyB,CAAA;AAC3B,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
|
package/dist/user/segment.d.ts
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
/// <reference types="mongoose/types/mongooseoptions" />
|
|
7
7
|
/// <reference types="mongoose/types/schemaoptions" />
|
|
8
8
|
import mongoose from "mongoose";
|
|
9
|
+
export declare enum ISegmentType {
|
|
10
|
+
USER_CREATED = "user-created",
|
|
11
|
+
EVENT = "event",
|
|
12
|
+
SEASON_TICKET_ENTRY_PASS = "season-ticket-entry-pass",
|
|
13
|
+
SEASON_TICKET = "season-ticket"
|
|
14
|
+
}
|
|
9
15
|
export interface ISegmentModel {
|
|
10
16
|
_id?: string;
|
|
11
17
|
name: string;
|
|
@@ -13,6 +19,9 @@ export interface ISegmentModel {
|
|
|
13
19
|
account: string | mongoose.Types.ObjectId;
|
|
14
20
|
description?: string;
|
|
15
21
|
handler: string;
|
|
22
|
+
type: ISegmentType;
|
|
23
|
+
seasonTicket?: string | mongoose.Types.ObjectId;
|
|
24
|
+
event?: string | mongoose.Types.ObjectId;
|
|
16
25
|
}
|
|
17
26
|
export interface ISegmentEndUserModel {
|
|
18
27
|
_id?: string;
|
package/dist/user/segment.js
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ISegmentType = void 0;
|
|
4
|
+
var ISegmentType;
|
|
5
|
+
(function (ISegmentType) {
|
|
6
|
+
ISegmentType["USER_CREATED"] = "user-created";
|
|
7
|
+
ISegmentType["EVENT"] = "event";
|
|
8
|
+
ISegmentType["SEASON_TICKET_ENTRY_PASS"] = "season-ticket-entry-pass";
|
|
9
|
+
ISegmentType["SEASON_TICKET"] = "season-ticket";
|
|
10
|
+
})(ISegmentType || (exports.ISegmentType = ISegmentType = {}));
|
|
3
11
|
//# sourceMappingURL=segment.js.map
|
package/dist/user/segment.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segment.js","sourceRoot":"","sources":["../../src/user/segment.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"segment.js","sourceRoot":"","sources":["../../src/user/segment.ts"],"names":[],"mappings":";;;AACA,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,+BAAe,CAAA;IACf,qEAAqD,CAAA;IACrD,+CAA+B,CAAA;AACjC,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as mongoose from "mongoose";
|
|
2
|
+
export enum IPlatform {
|
|
3
|
+
IOS = "IOS",
|
|
4
|
+
ANDROID = "ANDROID",
|
|
5
|
+
WEB = "WEB",
|
|
6
|
+
}
|
|
7
|
+
export enum IAppNotificationStatus {
|
|
8
|
+
PENDING = "pending",
|
|
9
|
+
SENT = "sent",
|
|
10
|
+
FAILED = "failed",
|
|
11
|
+
RECEIVED = "received",
|
|
12
|
+
}
|
|
13
|
+
export interface IEndUserNotificationModel {
|
|
14
|
+
_id?: string | mongoose.Types.ObjectId;
|
|
15
|
+
marketplace: string | mongoose.Types.ObjectId;
|
|
16
|
+
seller: string | mongoose.Types.ObjectId;
|
|
17
|
+
description?: string;
|
|
18
|
+
endUser: string | mongoose.Types.ObjectId;
|
|
19
|
+
segment?: string | mongoose.Types.ObjectId;
|
|
20
|
+
data?: object;
|
|
21
|
+
action?: string;
|
|
22
|
+
message: string;
|
|
23
|
+
status: IAppNotificationStatus;
|
|
24
|
+
platform: IPlatform;
|
|
25
|
+
sentAt?: Date;
|
|
26
|
+
receivedAt?: Date;
|
|
27
|
+
error?: string;
|
|
28
|
+
}
|
package/src/crm/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
-
import { IPaymentSeasonTicketIterationType } from "./seasonTicket";
|
|
2
|
+
import { IPaymentSeasonTicketIterationType, ISeasonTicketType } from "./seasonTicket";
|
|
3
3
|
import { IPaymentCouponTypeEnum } from "./coupon";
|
|
4
4
|
export interface IEndUserSeasonTicketModel {
|
|
5
5
|
discountType?: IPaymentCouponTypeEnum;
|
|
@@ -50,7 +50,14 @@ export interface IEndUserSeasonTicketModel {
|
|
|
50
50
|
memberBringFriendCreatedCoupons?: Array<{
|
|
51
51
|
couponId: string;
|
|
52
52
|
date: Date;
|
|
53
|
+
couponCode: string;
|
|
54
|
+
event: string | mongoose.Types.ObjectId;
|
|
55
|
+
numberOfTickets: string;
|
|
53
56
|
}>;
|
|
57
|
+
seasonTicketType: ISeasonTicketType;
|
|
58
|
+
entryPassTicketsUsed?: number;
|
|
59
|
+
entryPassTicketsAllowedPerEvent?: number;
|
|
60
|
+
entryPassTotalTicketsAllowed?: number;
|
|
54
61
|
}
|
|
55
62
|
export enum ISeasonTicketStatusType {
|
|
56
63
|
ACTIVE = "active", // the season ticket is active
|
|
@@ -61,4 +68,5 @@ export enum ISeasonTicketStatusType {
|
|
|
61
68
|
EXPIRED = "expired", // the season ticket has expired - end date has passed
|
|
62
69
|
PAUSED = "paused", // the season ticket has been paused
|
|
63
70
|
SUB_ITERATION_SUCCESS = "sub-iteration-success", // the subscription iteration was successful
|
|
71
|
+
SUB_ITERATION_SKIPPED = "sub-iteration-skipped", // the subscription iteration was skipped
|
|
64
72
|
}
|
|
@@ -12,6 +12,9 @@ export interface ISeasonTicketModel {
|
|
|
12
12
|
isEnabled: boolean;
|
|
13
13
|
paymentIterationType: IPaymentSeasonTicketIterationType;
|
|
14
14
|
iterations: number;
|
|
15
|
+
seasonTicketType: ISeasonTicketType;
|
|
16
|
+
entryPassTicketsAllowedPerEvent?: number;
|
|
17
|
+
entryPassTotalTicketsAllowed?: number;
|
|
15
18
|
}
|
|
16
19
|
export enum IPaymentSeasonTicketIterationType {
|
|
17
20
|
DAILY = 1,
|
|
@@ -19,3 +22,8 @@ export enum IPaymentSeasonTicketIterationType {
|
|
|
19
22
|
MONTHLY = 3,
|
|
20
23
|
YEARLY = 4,
|
|
21
24
|
}
|
|
25
|
+
|
|
26
|
+
export enum ISeasonTicketType {
|
|
27
|
+
SEASON_TICKET = "season-ticket",
|
|
28
|
+
ENTRY_PASS = "entry-pass",
|
|
29
|
+
}
|
package/src/user/segment.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
+
export enum ISegmentType {
|
|
3
|
+
USER_CREATED = "user-created",
|
|
4
|
+
EVENT = "event",
|
|
5
|
+
SEASON_TICKET_ENTRY_PASS = "season-ticket-entry-pass",
|
|
6
|
+
SEASON_TICKET = "season-ticket",
|
|
7
|
+
}
|
|
2
8
|
export interface ISegmentModel {
|
|
3
9
|
_id?: string;
|
|
4
10
|
name: string;
|
|
@@ -6,6 +12,9 @@ export interface ISegmentModel {
|
|
|
6
12
|
account: string | mongoose.Types.ObjectId;
|
|
7
13
|
description?: string;
|
|
8
14
|
handler: string;
|
|
15
|
+
type: ISegmentType;
|
|
16
|
+
seasonTicket?: string | mongoose.Types.ObjectId;
|
|
17
|
+
event?: string | mongoose.Types.ObjectId;
|
|
9
18
|
}
|
|
10
19
|
|
|
11
20
|
export interface ISegmentEndUserModel {
|