@nimee/shared-types 1.0.258 → 1.0.262
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 +19 -1
- package/dist/account/account.js.map +1 -1
- package/dist/account/marketPlace.d.ts +19 -4
- package/dist/account/marketPlace.js +1 -0
- package/dist/account/marketPlace.js.map +1 -1
- package/dist/payment/endUserSeasonTicket.d.ts +9 -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/send-notification/sms.d.ts +5 -1
- package/dist/send-notification/sms.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 +20 -1
- package/src/account/marketPlace.ts +26 -4
- package/src/payment/endUserSeasonTicket.ts +12 -1
- package/src/payment/index.ts +1 -0
- package/src/payment/paymentProvider.ts +8 -0
- package/src/payment/seasonTicket.ts +3 -0
- package/src/send-notification/sms.ts +6 -1
- 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,
|
|
@@ -63,6 +64,13 @@ export declare enum InvoiceDocTypeEnum {
|
|
|
63
64
|
INVOICE_RECEIPT = "invrec",
|
|
64
65
|
RECEIPT = "receipt"
|
|
65
66
|
}
|
|
67
|
+
export interface IBankDetails {
|
|
68
|
+
bankNumber: string;
|
|
69
|
+
branchNumber: string;
|
|
70
|
+
accountNumber: string;
|
|
71
|
+
accountName: string;
|
|
72
|
+
iban: string;
|
|
73
|
+
}
|
|
66
74
|
export interface IAccountModel {
|
|
67
75
|
idInsidePaymentProvider: string;
|
|
68
76
|
name: string;
|
|
@@ -80,7 +88,7 @@ export interface IAccountModel {
|
|
|
80
88
|
isAccountVerified: boolean;
|
|
81
89
|
isEmailVerified: boolean;
|
|
82
90
|
transactionPercentage: number;
|
|
83
|
-
paymentProvider:
|
|
91
|
+
paymentProvider: PaymentProviders;
|
|
84
92
|
marketFee: number;
|
|
85
93
|
marketFeeWithoutVAT: number;
|
|
86
94
|
originalMarketFee: number;
|
|
@@ -104,6 +112,7 @@ export interface IAccountModel {
|
|
|
104
112
|
bankAccountOwnershipFilePath: string;
|
|
105
113
|
corporateCertificateFilePath: string;
|
|
106
114
|
requirePayerSocialId?: boolean;
|
|
115
|
+
bank?: IBankDetails;
|
|
107
116
|
design?: {
|
|
108
117
|
profileImage: string;
|
|
109
118
|
profileImageIsHero?: boolean;
|
|
@@ -168,6 +177,15 @@ export interface IAccountModel {
|
|
|
168
177
|
crmDynamicFields?: IDynamicFieldDefinition[];
|
|
169
178
|
disabledMailTypes?: IMailPostSQSType[];
|
|
170
179
|
autoExitVisits?: boolean;
|
|
180
|
+
stripeConnectAccountId?: string;
|
|
181
|
+
stripeConnectStatus?: "not_started" | "pending" | "enabled" | "disabled" | "rejected";
|
|
182
|
+
stripeConnectOnboardingLink?: string;
|
|
183
|
+
stripeConnectChargesEnabled?: boolean;
|
|
184
|
+
stripeConnectPayoutsEnabled?: boolean;
|
|
185
|
+
stripeConnectDetailsSubmitted?: boolean;
|
|
186
|
+
stripeCurrency?: string;
|
|
187
|
+
stripeCountry?: string;
|
|
188
|
+
platformFeePercent?: number;
|
|
171
189
|
}
|
|
172
190
|
export interface IPaymeUpdateOrCreateSellerWebhookPayload {
|
|
173
191
|
seller_payme_id: string;
|
|
@@ -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;AAiKD,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",
|
|
@@ -11,13 +12,27 @@ export declare enum IMailProvider {
|
|
|
11
12
|
export declare enum ISMSProvider {
|
|
12
13
|
ACTIVE_TRAIL = "ACTIVE_TRAIL",
|
|
13
14
|
INFORU = "INFORU",
|
|
15
|
+
TWILIO = "TWILIO",
|
|
14
16
|
NONE = "none"
|
|
15
17
|
}
|
|
16
|
-
export interface
|
|
17
|
-
|
|
18
|
-
apiKey: string;
|
|
18
|
+
export interface IProviderCredentials {
|
|
19
|
+
apiKey?: string;
|
|
19
20
|
campaignApiKey?: string;
|
|
20
21
|
smsSendingProfileId?: number;
|
|
22
|
+
twilioAccountSid?: string;
|
|
23
|
+
twilioAuthToken?: string;
|
|
24
|
+
twilioPhoneNumber?: string;
|
|
25
|
+
twilioSenderId?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ICountryProviderRule {
|
|
28
|
+
prefix: string;
|
|
29
|
+
provider: ISMSProvider;
|
|
30
|
+
credentials: IProviderCredentials;
|
|
31
|
+
description?: string;
|
|
32
|
+
isEnabled?: boolean;
|
|
33
|
+
}
|
|
34
|
+
export interface ISMSProviderConfig {
|
|
35
|
+
countryRules: ICountryProviderRule[];
|
|
21
36
|
}
|
|
22
37
|
export declare enum MainPageEnum {
|
|
23
38
|
PRIVATE_CLUB = "private_club",
|
|
@@ -36,7 +51,7 @@ export interface IMarketPlace {
|
|
|
36
51
|
address: string;
|
|
37
52
|
owners: string[];
|
|
38
53
|
logoForMail?: string;
|
|
39
|
-
paymentProvider:
|
|
54
|
+
paymentProvider: PaymentProviders;
|
|
40
55
|
sellerPaymeId: string;
|
|
41
56
|
sellerPublicKey: string;
|
|
42
57
|
seatsWorkspaceKey?: string;
|
|
@@ -11,6 +11,7 @@ var ISMSProvider;
|
|
|
11
11
|
(function (ISMSProvider) {
|
|
12
12
|
ISMSProvider["ACTIVE_TRAIL"] = "ACTIVE_TRAIL";
|
|
13
13
|
ISMSProvider["INFORU"] = "INFORU";
|
|
14
|
+
ISMSProvider["TWILIO"] = "TWILIO";
|
|
14
15
|
ISMSProvider["NONE"] = "none";
|
|
15
16
|
})(ISMSProvider || (exports.ISMSProvider = ISMSProvider = {}));
|
|
16
17
|
// MainPage enum holds the possible values for the main page of the app
|
|
@@ -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,YAKX;AALD,WAAY,YAAY;IACtB,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;IACjB,iCAAiB,CAAA;IACjB,6BAAa,CAAA;AACf,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AA4BD,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,17 @@ 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
|
+
externalPriceId?: string;
|
|
97
|
+
stripeSubscriptionId?: string;
|
|
91
98
|
}
|
|
92
99
|
export declare enum ISeasonTicketStatusType {
|
|
93
100
|
ACTIVE = "active",// the season ticket is active
|
|
94
101
|
INITIAL = "initial",// not yet paid
|
|
95
|
-
CANCELLED = "cancelled",// the season ticket has been cancelled
|
|
102
|
+
CANCELLED = "cancelled",// the season ticket has been cancelled immediately
|
|
103
|
+
CANCEL_AT_PERIOD_END = "cancel_at_period_end",// the season ticket will cancel at the end of current period
|
|
96
104
|
FAILED = "failed",// one of the payments has failed
|
|
97
105
|
COMPLETED = "completed",// all payments have been completed
|
|
98
106
|
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":";;;AA6EA,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"}
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
26
|
import mongoose from "mongoose";
|
|
27
|
+
import { ISMSProvider } from "../account/marketPlace";
|
|
27
28
|
export declare enum IPostSMSType {
|
|
28
29
|
FORGOT_PASSWORD_EMAIL = "FORGOT_PASSWORD_EMAIL",
|
|
29
30
|
FORGOT_PASSWORD_SMS = "FORGOT_PASSWORD_SMS",
|
|
@@ -63,7 +64,10 @@ export interface ISMSCampaignModel {
|
|
|
63
64
|
account?: string | mongoose.Types.ObjectId;
|
|
64
65
|
content: string;
|
|
65
66
|
externalId?: string;
|
|
66
|
-
smsProvider
|
|
67
|
+
smsProvider: ISMSProvider;
|
|
67
68
|
sentCounter: number;
|
|
68
69
|
internalName: string;
|
|
70
|
+
campaignGroupId?: string;
|
|
71
|
+
createdAt?: Date;
|
|
72
|
+
updatedAt?: Date;
|
|
69
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/send-notification/sms.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"sms.js","sourceRoot":"","sources":["../../src/send-notification/sms.ts"],"names":[],"mappings":";;;AAGA,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/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,
|
|
@@ -66,6 +67,14 @@ export enum InvoiceDocTypeEnum {
|
|
|
66
67
|
RECEIPT = "receipt",
|
|
67
68
|
}
|
|
68
69
|
|
|
70
|
+
export interface IBankDetails {
|
|
71
|
+
bankNumber: string;
|
|
72
|
+
branchNumber: string;
|
|
73
|
+
accountNumber: string;
|
|
74
|
+
accountName: string;
|
|
75
|
+
iban: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
69
78
|
export interface IAccountModel {
|
|
70
79
|
idInsidePaymentProvider: string;
|
|
71
80
|
name: string;
|
|
@@ -77,7 +86,7 @@ export interface IAccountModel {
|
|
|
77
86
|
isAccountVerified: boolean;
|
|
78
87
|
isEmailVerified: boolean;
|
|
79
88
|
transactionPercentage: number;
|
|
80
|
-
paymentProvider:
|
|
89
|
+
paymentProvider: PaymentProviders;
|
|
81
90
|
marketFee: number;
|
|
82
91
|
marketFeeWithoutVAT: number;
|
|
83
92
|
originalMarketFee: number;
|
|
@@ -101,6 +110,7 @@ export interface IAccountModel {
|
|
|
101
110
|
bankAccountOwnershipFilePath: string;
|
|
102
111
|
corporateCertificateFilePath: string;
|
|
103
112
|
requirePayerSocialId?: boolean;
|
|
113
|
+
bank?: IBankDetails;
|
|
104
114
|
design?: {
|
|
105
115
|
profileImage: string;
|
|
106
116
|
profileImageIsHero?: boolean;
|
|
@@ -165,6 +175,15 @@ export interface IAccountModel {
|
|
|
165
175
|
crmDynamicFields?: IDynamicFieldDefinition[];
|
|
166
176
|
disabledMailTypes?: IMailPostSQSType[];
|
|
167
177
|
autoExitVisits?: boolean;
|
|
178
|
+
stripeConnectAccountId?: string;
|
|
179
|
+
stripeConnectStatus?: "not_started" | "pending" | "enabled" | "disabled" | "rejected";
|
|
180
|
+
stripeConnectOnboardingLink?: string;
|
|
181
|
+
stripeConnectChargesEnabled?: boolean;
|
|
182
|
+
stripeConnectPayoutsEnabled?: boolean;
|
|
183
|
+
stripeConnectDetailsSubmitted?: boolean;
|
|
184
|
+
stripeCurrency?: string;
|
|
185
|
+
stripeCountry?: string;
|
|
186
|
+
platformFeePercent?: number;
|
|
168
187
|
}
|
|
169
188
|
// {"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"}
|
|
170
189
|
|
|
@@ -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",
|
|
@@ -13,13 +14,34 @@ export enum IMailProvider {
|
|
|
13
14
|
export enum ISMSProvider {
|
|
14
15
|
ACTIVE_TRAIL = "ACTIVE_TRAIL",
|
|
15
16
|
INFORU = "INFORU",
|
|
17
|
+
TWILIO = "TWILIO",
|
|
16
18
|
NONE = "none",
|
|
17
19
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
export interface IProviderCredentials {
|
|
22
|
+
// ActiveTrail / InfoRu
|
|
23
|
+
apiKey?: string;
|
|
21
24
|
campaignApiKey?: string;
|
|
22
25
|
smsSendingProfileId?: number;
|
|
26
|
+
|
|
27
|
+
// Twilio
|
|
28
|
+
twilioAccountSid?: string;
|
|
29
|
+
twilioAuthToken?: string;
|
|
30
|
+
twilioPhoneNumber?: string;
|
|
31
|
+
twilioSenderId?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ICountryProviderRule {
|
|
35
|
+
prefix: string; // e.g., "+972", "+1", "+44"
|
|
36
|
+
provider: ISMSProvider;
|
|
37
|
+
credentials: IProviderCredentials;
|
|
38
|
+
description?: string;
|
|
39
|
+
isEnabled?: boolean; // Default true. Set to false to disable this rule without removing it
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ISMSProviderConfig {
|
|
43
|
+
// Country-specific routing rules (required)
|
|
44
|
+
countryRules: ICountryProviderRule[];
|
|
23
45
|
}
|
|
24
46
|
|
|
25
47
|
// MainPage enum holds the possible values for the main page of the app
|
|
@@ -41,7 +63,7 @@ export interface IMarketPlace {
|
|
|
41
63
|
address: string;
|
|
42
64
|
owners: string[];
|
|
43
65
|
logoForMail?: string;
|
|
44
|
-
paymentProvider:
|
|
66
|
+
paymentProvider: PaymentProviders;
|
|
45
67
|
sellerPaymeId: string;
|
|
46
68
|
sellerPublicKey: string;
|
|
47
69
|
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,19 @@ 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
|
+
externalPriceId?: string; // Stripe: price_xxx - the price ID used for this subscription
|
|
75
|
+
// Stripe-specific fields
|
|
76
|
+
stripeSubscriptionId?: string;
|
|
67
77
|
}
|
|
68
78
|
export enum ISeasonTicketStatusType {
|
|
69
79
|
ACTIVE = "active", // the season ticket is active
|
|
70
80
|
INITIAL = "initial", // not yet paid
|
|
71
|
-
CANCELLED = "cancelled", // the season ticket has been cancelled
|
|
81
|
+
CANCELLED = "cancelled", // the season ticket has been cancelled immediately
|
|
82
|
+
CANCEL_AT_PERIOD_END = "cancel_at_period_end", // the season ticket will cancel at the end of current period
|
|
72
83
|
FAILED = "failed", // one of the payments has failed
|
|
73
84
|
COMPLETED = "completed", // all payments have been completed
|
|
74
85
|
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,
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import mongoose from "mongoose";
|
|
2
|
+
import { ISMSProvider } from "../account/marketPlace";
|
|
3
|
+
|
|
2
4
|
export enum IPostSMSType {
|
|
3
5
|
FORGOT_PASSWORD_EMAIL = "FORGOT_PASSWORD_EMAIL",
|
|
4
6
|
FORGOT_PASSWORD_SMS = "FORGOT_PASSWORD_SMS",
|
|
@@ -39,7 +41,10 @@ export interface ISMSCampaignModel {
|
|
|
39
41
|
account?: string | mongoose.Types.ObjectId;
|
|
40
42
|
content: string;
|
|
41
43
|
externalId?: string;
|
|
42
|
-
smsProvider
|
|
44
|
+
smsProvider: ISMSProvider;
|
|
43
45
|
sentCounter: number;
|
|
44
46
|
internalName: string;
|
|
47
|
+
campaignGroupId?: string;
|
|
48
|
+
createdAt?: Date;
|
|
49
|
+
updatedAt?: Date;
|
|
45
50
|
}
|
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
|
}
|