@nimee/shared-types 1.0.257 → 1.0.259
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/account/account.d.ts +16 -1
- package/dist/account/account.js +6 -1
- package/dist/account/account.js.map +1 -1
- package/dist/account/marketPlace.d.ts +2 -1
- package/dist/account/marketPlace.js.map +1 -1
- package/dist/payment/endUserSeasonTicket.d.ts +8 -1
- package/dist/payment/endUserSeasonTicket.js +1 -0
- package/dist/payment/endUserSeasonTicket.js.map +1 -1
- package/dist/payment/index.d.ts +1 -0
- package/dist/payment/index.js +1 -0
- package/dist/payment/index.js.map +1 -1
- package/dist/payment/seasonTicket.d.ts +2 -0
- package/dist/payment/seasonTicket.js.map +1 -1
- package/dist/user/endUser.d.ts +3 -0
- package/dist/userEvent/eventOrder.d.ts +4 -0
- package/package.json +1 -1
- package/src/account/account.ts +17 -1
- package/src/account/marketPlace.ts +2 -1
- package/src/payment/endUserSeasonTicket.ts +11 -1
- package/src/payment/index.ts +1 -0
- package/src/payment/paymentProvider.ts +8 -0
- package/src/payment/seasonTicket.ts +3 -0
- package/src/user/endUser.ts +1 -0
- package/src/userEvent/eventOrder.ts +4 -0
|
@@ -2,6 +2,7 @@ import { IMarketPlace } from "./marketPlace";
|
|
|
2
2
|
import { ILanguageEnum } from "../common/common";
|
|
3
3
|
import { IDynamicFieldDefinition } from "../common/dynamicFields";
|
|
4
4
|
import { IMailPostSQSType } from "../send-notification/sqs";
|
|
5
|
+
import { PaymentProviders } from "../payment/paymentProvider";
|
|
5
6
|
export declare enum IRoleTypeOrderEnum {
|
|
6
7
|
endUser = 0,
|
|
7
8
|
scanner = 1,
|
|
@@ -59,6 +60,10 @@ export interface IWebhook {
|
|
|
59
60
|
export declare enum InvoiceProviderType {
|
|
60
61
|
ICOUNT = "icount"
|
|
61
62
|
}
|
|
63
|
+
export declare enum InvoiceDocTypeEnum {
|
|
64
|
+
INVOICE_RECEIPT = "invrec",
|
|
65
|
+
RECEIPT = "receipt"
|
|
66
|
+
}
|
|
62
67
|
export interface IAccountModel {
|
|
63
68
|
idInsidePaymentProvider: string;
|
|
64
69
|
name: string;
|
|
@@ -76,7 +81,7 @@ export interface IAccountModel {
|
|
|
76
81
|
isAccountVerified: boolean;
|
|
77
82
|
isEmailVerified: boolean;
|
|
78
83
|
transactionPercentage: number;
|
|
79
|
-
paymentProvider:
|
|
84
|
+
paymentProvider: PaymentProviders;
|
|
80
85
|
marketFee: number;
|
|
81
86
|
marketFeeWithoutVAT: number;
|
|
82
87
|
originalMarketFee: number;
|
|
@@ -160,9 +165,19 @@ export interface IAccountModel {
|
|
|
160
165
|
shouldSendInvoice?: boolean;
|
|
161
166
|
invoiceProvider?: InvoiceProviderType;
|
|
162
167
|
invoiceProviderToken?: string;
|
|
168
|
+
invoiceDocType?: InvoiceDocTypeEnum;
|
|
163
169
|
crmDynamicFields?: IDynamicFieldDefinition[];
|
|
164
170
|
disabledMailTypes?: IMailPostSQSType[];
|
|
165
171
|
autoExitVisits?: boolean;
|
|
172
|
+
stripeConnectAccountId?: string;
|
|
173
|
+
stripeConnectStatus?: "not_started" | "pending" | "enabled" | "disabled" | "rejected";
|
|
174
|
+
stripeConnectOnboardingLink?: string;
|
|
175
|
+
stripeConnectChargesEnabled?: boolean;
|
|
176
|
+
stripeConnectPayoutsEnabled?: boolean;
|
|
177
|
+
stripeConnectDetailsSubmitted?: boolean;
|
|
178
|
+
stripeCurrency?: string;
|
|
179
|
+
stripeCountry?: string;
|
|
180
|
+
platformFeePercent?: number;
|
|
166
181
|
}
|
|
167
182
|
export interface IPaymeUpdateOrCreateSellerWebhookPayload {
|
|
168
183
|
seller_payme_id: string;
|
package/dist/account/account.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IAccountStatusEnum = exports.InvoiceProviderType = exports.IInviteeStateTypeEnum = exports.InputDataEnumType = exports.IRoleTypeEnum = exports.IRoleTypeOrderEnum = void 0;
|
|
3
|
+
exports.IAccountStatusEnum = exports.InvoiceDocTypeEnum = exports.InvoiceProviderType = exports.IInviteeStateTypeEnum = exports.InputDataEnumType = exports.IRoleTypeEnum = exports.IRoleTypeOrderEnum = void 0;
|
|
4
4
|
var IRoleTypeOrderEnum;
|
|
5
5
|
(function (IRoleTypeOrderEnum) {
|
|
6
6
|
IRoleTypeOrderEnum[IRoleTypeOrderEnum["endUser"] = 0] = "endUser";
|
|
@@ -43,6 +43,11 @@ var InvoiceProviderType;
|
|
|
43
43
|
(function (InvoiceProviderType) {
|
|
44
44
|
InvoiceProviderType["ICOUNT"] = "icount";
|
|
45
45
|
})(InvoiceProviderType || (exports.InvoiceProviderType = InvoiceProviderType = {}));
|
|
46
|
+
var InvoiceDocTypeEnum;
|
|
47
|
+
(function (InvoiceDocTypeEnum) {
|
|
48
|
+
InvoiceDocTypeEnum["INVOICE_RECEIPT"] = "invrec";
|
|
49
|
+
InvoiceDocTypeEnum["RECEIPT"] = "receipt";
|
|
50
|
+
})(InvoiceDocTypeEnum || (exports.InvoiceDocTypeEnum = InvoiceDocTypeEnum = {}));
|
|
46
51
|
var IAccountStatusEnum;
|
|
47
52
|
(function (IAccountStatusEnum) {
|
|
48
53
|
IAccountStatusEnum["CREATED"] = "created";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../src/account/account.ts"],"names":[],"mappings":";;;AAMA,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,iEAAW,CAAA;IACX,iEAAW,CAAA;IACX,iEAAW,CAAA;IACX,mEAAY,CAAA;IACZ,+DAAU,CAAA;IACV,+DAAU,CAAA;IACV,6DAAS,CAAA;IACT,6DAAS,CAAA;AACX,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B;AACD,IAAY,aASX;AATD,WAAY,aAAa;IACvB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,kCAAiB,CAAA;IACjB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,sCAAqB,CAAA;AACvB,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AACD,IAAY,iBAQX;AARD,WAAY,iBAAiB;IAC3B,kDAA6B,CAAA;IAC7B,kDAA6B,CAAA;IAC7B,sCAAiB,CAAA;IACjB,oCAAe,CAAA;IACf,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,0CAAqB,CAAA;AACvB,CAAC,EARW,iBAAiB,iCAAjB,iBAAiB,QAQ5B;AAgBD,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,sCAAa,CAAA;IACb,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;AACvB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC;AAMD,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;AACnB,CAAC,EAFW,mBAAmB,mCAAnB,mBAAmB,QAE9B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,gDAA0B,CAAA;IAC1B,yCAAmB,CAAA;AACrB,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAwJD,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;AACrB,CAAC,EANW,kBAAkB,kCAAlB,kBAAkB,QAM7B"}
|
|
@@ -3,6 +3,7 @@ import { IAutomationProvider } from "../crm/automation";
|
|
|
3
3
|
import { ILanguageEnum } from "../common/common";
|
|
4
4
|
import { IDynamicFieldDefinition } from "../common/dynamicFields";
|
|
5
5
|
import { ICalendarEventType } from "../crm/calendarEvent";
|
|
6
|
+
import { PaymentProviders } from "../payment/paymentProvider";
|
|
6
7
|
export declare enum IMailProvider {
|
|
7
8
|
sendgrid = "sendgrid",
|
|
8
9
|
inforu = "inforu",
|
|
@@ -36,7 +37,7 @@ export interface IMarketPlace {
|
|
|
36
37
|
address: string;
|
|
37
38
|
owners: string[];
|
|
38
39
|
logoForMail?: string;
|
|
39
|
-
paymentProvider:
|
|
40
|
+
paymentProvider: PaymentProviders;
|
|
40
41
|
sellerPaymeId: string;
|
|
41
42
|
sellerPublicKey: string;
|
|
42
43
|
seatsWorkspaceKey?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketPlace.js","sourceRoot":"","sources":["../../src/account/marketPlace.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"marketPlace.js","sourceRoot":"","sources":["../../src/account/marketPlace.ts"],"names":[],"mappings":";;;AAOA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,8BAAa,CAAA;AACf,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACf,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB;AAQD,uEAAuE;AACvE,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB"}
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
import mongoose from "mongoose";
|
|
27
27
|
import { IPaymentSeasonTicketIterationType, ISeasonTicketType } from "./seasonTicket";
|
|
28
28
|
import { IPaymentCouponTypeEnum } from "./coupon";
|
|
29
|
+
import { PaymentProviders } from "./paymentProvider";
|
|
29
30
|
export interface IEndUserSeasonTicketModel {
|
|
30
31
|
discountType?: IPaymentCouponTypeEnum;
|
|
31
32
|
discountValue?: number;
|
|
@@ -39,6 +40,7 @@ export interface IEndUserSeasonTicketModel {
|
|
|
39
40
|
nextDate?: Date;
|
|
40
41
|
prevDate?: Date;
|
|
41
42
|
name: string;
|
|
43
|
+
memberName?: string;
|
|
42
44
|
eventTransactionAllowed: number;
|
|
43
45
|
eventTransactionUsed: number;
|
|
44
46
|
price: number;
|
|
@@ -88,11 +90,16 @@ export interface IEndUserSeasonTicketModel {
|
|
|
88
90
|
comment?: string;
|
|
89
91
|
businessCode?: string;
|
|
90
92
|
businessName?: string;
|
|
93
|
+
paymentProvider?: PaymentProviders;
|
|
94
|
+
externalCustomerId?: string;
|
|
95
|
+
externalPaymentMethodId?: string;
|
|
96
|
+
stripeSubscriptionId?: string;
|
|
91
97
|
}
|
|
92
98
|
export declare enum ISeasonTicketStatusType {
|
|
93
99
|
ACTIVE = "active",// the season ticket is active
|
|
94
100
|
INITIAL = "initial",// not yet paid
|
|
95
|
-
CANCELLED = "cancelled",// the season ticket has been cancelled
|
|
101
|
+
CANCELLED = "cancelled",// the season ticket has been cancelled immediately
|
|
102
|
+
CANCEL_AT_PERIOD_END = "cancel_at_period_end",// the season ticket will cancel at the end of current period
|
|
96
103
|
FAILED = "failed",// one of the payments has failed
|
|
97
104
|
COMPLETED = "completed",// all payments have been completed
|
|
98
105
|
EXPIRED = "expired",// the season ticket has expired - end date has passed
|
|
@@ -6,6 +6,7 @@ var ISeasonTicketStatusType;
|
|
|
6
6
|
ISeasonTicketStatusType["ACTIVE"] = "active";
|
|
7
7
|
ISeasonTicketStatusType["INITIAL"] = "initial";
|
|
8
8
|
ISeasonTicketStatusType["CANCELLED"] = "cancelled";
|
|
9
|
+
ISeasonTicketStatusType["CANCEL_AT_PERIOD_END"] = "cancel_at_period_end";
|
|
9
10
|
ISeasonTicketStatusType["FAILED"] = "failed";
|
|
10
11
|
ISeasonTicketStatusType["COMPLETED"] = "completed";
|
|
11
12
|
ISeasonTicketStatusType["EXPIRED"] = "expired";
|
|
@@ -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":";;;AA4EA,IAAY,uBAWX;AAXD,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;AACjD,CAAC,EAXW,uBAAuB,uCAAvB,uBAAuB,QAWlC"}
|
package/dist/payment/index.d.ts
CHANGED
package/dist/payment/index.js
CHANGED
|
@@ -17,6 +17,7 @@ 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("./paymentProvider"), exports);
|
|
20
21
|
__exportStar(require("./seasonTicket"), exports);
|
|
21
22
|
__exportStar(require("./endUserSeasonTicket"), exports);
|
|
22
23
|
//# 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;AAC1B,iDAA+B;AAC/B,wDAAsC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,oDAAkC;AAClC,iDAA+B;AAC/B,wDAAsC"}
|
|
@@ -42,6 +42,8 @@ export interface ISeasonTicketModel {
|
|
|
42
42
|
entryPassTotalTicketsAllowed?: number;
|
|
43
43
|
isPublic: boolean;
|
|
44
44
|
description?: string;
|
|
45
|
+
externalProductId?: string;
|
|
46
|
+
externalPriceId?: string;
|
|
45
47
|
}
|
|
46
48
|
export declare enum IPaymentSeasonTicketIterationType {
|
|
47
49
|
DAILY = 1,
|
|
@@ -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":";;;AAuBA,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/endUser.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface IEventOrderModel {
|
|
|
26
26
|
coupon?: string;
|
|
27
27
|
externalSaleId?: string;
|
|
28
28
|
externalAuthorizationNumber?: string;
|
|
29
|
+
externalCustomerId?: string;
|
|
29
30
|
isTicketLimitReached?: boolean;
|
|
30
31
|
price?: number;
|
|
31
32
|
nimiFeeType?: IFeeCollectionType;
|
|
@@ -49,4 +50,7 @@ export interface IEventOrderModel {
|
|
|
49
50
|
timeSlotQuantity?: number;
|
|
50
51
|
timeSlotDuration?: number;
|
|
51
52
|
eventLinkName?: string;
|
|
53
|
+
paymentProvider?: string;
|
|
54
|
+
externalTransactionId?: string;
|
|
55
|
+
currency?: string;
|
|
52
56
|
}
|
package/package.json
CHANGED
package/src/account/account.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IMarketPlace } from "./marketPlace";
|
|
|
2
2
|
import { ILanguageEnum } from "../common/common";
|
|
3
3
|
import { IDynamicFieldDefinition } from "../common/dynamicFields";
|
|
4
4
|
import { IMailPostSQSType } from "../send-notification/sqs";
|
|
5
|
+
import { PaymentProviders } from "../payment/paymentProvider";
|
|
5
6
|
|
|
6
7
|
export enum IRoleTypeOrderEnum {
|
|
7
8
|
endUser = 0,
|
|
@@ -61,6 +62,11 @@ export enum InvoiceProviderType {
|
|
|
61
62
|
ICOUNT = "icount",
|
|
62
63
|
}
|
|
63
64
|
|
|
65
|
+
export enum InvoiceDocTypeEnum {
|
|
66
|
+
INVOICE_RECEIPT = "invrec",
|
|
67
|
+
RECEIPT = "receipt",
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
export interface IAccountModel {
|
|
65
71
|
idInsidePaymentProvider: string;
|
|
66
72
|
name: string;
|
|
@@ -72,7 +78,7 @@ export interface IAccountModel {
|
|
|
72
78
|
isAccountVerified: boolean;
|
|
73
79
|
isEmailVerified: boolean;
|
|
74
80
|
transactionPercentage: number;
|
|
75
|
-
paymentProvider:
|
|
81
|
+
paymentProvider: PaymentProviders;
|
|
76
82
|
marketFee: number;
|
|
77
83
|
marketFeeWithoutVAT: number;
|
|
78
84
|
originalMarketFee: number;
|
|
@@ -156,9 +162,19 @@ export interface IAccountModel {
|
|
|
156
162
|
shouldSendInvoice?: boolean;
|
|
157
163
|
invoiceProvider?: InvoiceProviderType;
|
|
158
164
|
invoiceProviderToken?: string;
|
|
165
|
+
invoiceDocType?: InvoiceDocTypeEnum;
|
|
159
166
|
crmDynamicFields?: IDynamicFieldDefinition[];
|
|
160
167
|
disabledMailTypes?: IMailPostSQSType[];
|
|
161
168
|
autoExitVisits?: boolean;
|
|
169
|
+
stripeConnectAccountId?: string;
|
|
170
|
+
stripeConnectStatus?: "not_started" | "pending" | "enabled" | "disabled" | "rejected";
|
|
171
|
+
stripeConnectOnboardingLink?: string;
|
|
172
|
+
stripeConnectChargesEnabled?: boolean;
|
|
173
|
+
stripeConnectPayoutsEnabled?: boolean;
|
|
174
|
+
stripeConnectDetailsSubmitted?: boolean;
|
|
175
|
+
stripeCurrency?: string;
|
|
176
|
+
stripeCountry?: string;
|
|
177
|
+
platformFeePercent?: number;
|
|
162
178
|
}
|
|
163
179
|
// {"payme_status":"success","status_error_code":0,"status_code":0,"seller_payme_id":"MPL16720-72349IAE-FRITPXY5-TFLDUEWF","seller_created":"2022-12-26 18:32:29","seller_first_name":"Ron","seller_last_name":"Dahan","seller_social_id":"205569163","seller_birthdate":"1994-07-01","seller_date_of_birth":"1994-07-01","seller_gender":0,"seller_email":"roncho1794@gmail.com","seller_contact_email":"roncho1794@gmail.com","seller_phone":"+972542323517","seller_contact_phone":"+972542323517","seller_address_city":"Tel Aviv","seller_address_street":"Tel Aviv","seller_address_street_number":"12","seller_address_country":"IL","seller_inc":0,"seller_inc_code":"12345","seller_merchant_name":"Ronen","seller_site_url":"www.no.co.il","seller_custom_details":"No existing Isracard MID","seller_active":true,"seller_approved":false,"seller_market_fee":0,"seller_currencies":,"fee_default_processing_fee":"1.50","fee_default_processing_charge":"0.100000000000000000","fee_default_discount_fee":"0.50","fee_foreign_processing_fee":"2.95","fee_foreign_processing_charge":"0.100000000000000000","fee_forcurr_processing_charge":"0.100000000000000000","seller_public_key":{"uuid":"b40a5251-9907-4db1-8f26-c015dd9466df","description":"PayMe-Public-Key","is_active":true},"notify_type":"seller-create"}
|
|
164
180
|
|
|
@@ -3,6 +3,7 @@ import { IAutomationProvider } from "../crm/automation";
|
|
|
3
3
|
import { ILanguageEnum } from "../common/common";
|
|
4
4
|
import { IDynamicFieldDefinition } from "../common/dynamicFields";
|
|
5
5
|
import { ICalendarEventType } from "../crm/calendarEvent";
|
|
6
|
+
import { PaymentProviders } from "../payment/paymentProvider";
|
|
6
7
|
|
|
7
8
|
export enum IMailProvider {
|
|
8
9
|
sendgrid = "sendgrid",
|
|
@@ -41,7 +42,7 @@ export interface IMarketPlace {
|
|
|
41
42
|
address: string;
|
|
42
43
|
owners: string[];
|
|
43
44
|
logoForMail?: string;
|
|
44
|
-
paymentProvider:
|
|
45
|
+
paymentProvider: PaymentProviders;
|
|
45
46
|
sellerPaymeId: string;
|
|
46
47
|
sellerPublicKey: string;
|
|
47
48
|
seatsWorkspaceKey?: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
2
|
import { IPaymentSeasonTicketIterationType, ISeasonTicketType } from "./seasonTicket";
|
|
3
3
|
import { IPaymentCouponTypeEnum } from "./coupon";
|
|
4
|
+
import { PaymentProviders } from "./paymentProvider";
|
|
5
|
+
|
|
4
6
|
export interface IEndUserSeasonTicketModel {
|
|
5
7
|
discountType?: IPaymentCouponTypeEnum;
|
|
6
8
|
discountValue?: number;
|
|
@@ -14,6 +16,7 @@ export interface IEndUserSeasonTicketModel {
|
|
|
14
16
|
nextDate?: Date;
|
|
15
17
|
prevDate?: Date;
|
|
16
18
|
name: string;
|
|
19
|
+
memberName?: string; // Customer's actual name (fname + lname) for Stripe customer name
|
|
17
20
|
eventTransactionAllowed: number; // how many events can be attended
|
|
18
21
|
eventTransactionUsed: number; // how many events have been attended
|
|
19
22
|
price: number; // the price per each iteration
|
|
@@ -64,11 +67,18 @@ export interface IEndUserSeasonTicketModel {
|
|
|
64
67
|
comment?: string;
|
|
65
68
|
businessCode?: string;
|
|
66
69
|
businessName?: string;
|
|
70
|
+
// Provider-agnostic fields for multi-provider support
|
|
71
|
+
paymentProvider?: PaymentProviders;
|
|
72
|
+
externalCustomerId?: string; // Stripe: cus_xxx, Payme: BUYER-xxx
|
|
73
|
+
externalPaymentMethodId?: string; // Stripe: pm_xxx, Payme: token
|
|
74
|
+
// Stripe-specific fields
|
|
75
|
+
stripeSubscriptionId?: string;
|
|
67
76
|
}
|
|
68
77
|
export enum ISeasonTicketStatusType {
|
|
69
78
|
ACTIVE = "active", // the season ticket is active
|
|
70
79
|
INITIAL = "initial", // not yet paid
|
|
71
|
-
CANCELLED = "cancelled", // the season ticket has been cancelled
|
|
80
|
+
CANCELLED = "cancelled", // the season ticket has been cancelled immediately
|
|
81
|
+
CANCEL_AT_PERIOD_END = "cancel_at_period_end", // the season ticket will cancel at the end of current period
|
|
72
82
|
FAILED = "failed", // one of the payments has failed
|
|
73
83
|
COMPLETED = "completed", // all payments have been completed
|
|
74
84
|
EXPIRED = "expired", // the season ticket has expired - end date has passed
|
package/src/payment/index.ts
CHANGED
|
@@ -17,6 +17,9 @@ export interface ISeasonTicketModel {
|
|
|
17
17
|
entryPassTotalTicketsAllowed?: number;
|
|
18
18
|
isPublic: boolean;
|
|
19
19
|
description?: string;
|
|
20
|
+
// Provider-agnostic fields for multi-provider support
|
|
21
|
+
externalProductId?: string; // Stripe: prod_xxx, Payme: product_id
|
|
22
|
+
externalPriceId?: string; // Stripe: price_xxx, Payme: plan_id
|
|
20
23
|
}
|
|
21
24
|
export enum IPaymentSeasonTicketIterationType {
|
|
22
25
|
DAILY = 1,
|
package/src/user/endUser.ts
CHANGED
|
@@ -41,6 +41,7 @@ export interface IEndUserModel {
|
|
|
41
41
|
origin?: string;
|
|
42
42
|
credits?: number;
|
|
43
43
|
externalPurchaseToken?: { [paymentProvider: string]: string };
|
|
44
|
+
externalCustomerId?: { [paymentProvider: string]: string };
|
|
44
45
|
selectedHrc?: string;
|
|
45
46
|
allergies?: string;
|
|
46
47
|
idOrPassport?: string;
|
|
@@ -28,6 +28,7 @@ export interface IEventOrderModel {
|
|
|
28
28
|
coupon?: string;
|
|
29
29
|
externalSaleId?: string;
|
|
30
30
|
externalAuthorizationNumber?: string;
|
|
31
|
+
externalCustomerId?: string;
|
|
31
32
|
isTicketLimitReached?: boolean;
|
|
32
33
|
price?: number;
|
|
33
34
|
nimiFeeType?: IFeeCollectionType;
|
|
@@ -51,4 +52,7 @@ export interface IEventOrderModel {
|
|
|
51
52
|
timeSlotQuantity?: number;
|
|
52
53
|
timeSlotDuration?: number;
|
|
53
54
|
eventLinkName?: string;
|
|
55
|
+
paymentProvider?: string;
|
|
56
|
+
externalTransactionId?: string;
|
|
57
|
+
currency?: string;
|
|
54
58
|
}
|