univapay-node 4.0.173 → 4.0.174

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.
@@ -1 +1,2 @@
1
1
  export * from "./constants.js";
2
+ export * from "./types.js";
@@ -2,4 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./constants.js"), exports);
5
+ tslib_1.__exportStar(require("./types.js"), exports);
5
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,qDAA2B"}
@@ -0,0 +1,10 @@
1
+ type AnyFunction = (...args: unknown[]) => unknown;
2
+ type Primitive = string | number | boolean | bigint | symbol | undefined | null;
3
+ type Leaf = Primitive | Date | RegExp | Error | AnyFunction | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown>;
4
+ type DeepNullInner<T> = T extends Leaf ? T : T extends Map<infer K, infer V> ? Map<K, DeepNullInner<V>> : T extends Set<infer U> ? Set<DeepNullInner<U>> : T extends readonly unknown[] ? {
5
+ [K in keyof T]: DeepNullInner<T[K]>;
6
+ } : T extends object ? {
7
+ [K in keyof T]: RecursiveNull<T[K]>;
8
+ } : T;
9
+ export type RecursiveNull<T> = DeepNullInner<T> | null;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
@@ -21,7 +21,7 @@ export interface CancelItem<T extends Metadata = Metadata> {
21
21
  chargeId: string;
22
22
  storeId?: string;
23
23
  status: CancelStatus;
24
- error?: PaymentError;
24
+ error?: PaymentError | null;
25
25
  metadata?: T;
26
26
  mode: ProcessingMode;
27
27
  createdOn: string;
@@ -106,7 +106,7 @@ export interface ChargeItem<T extends Metadata = Metadata> {
106
106
  subscriptionId?: string;
107
107
  captureAt?: string;
108
108
  captureStatus?: CaptureStatus;
109
- error?: PaymentError;
109
+ error?: PaymentError | null;
110
110
  transactionTokenId?: string;
111
111
  redirect?: {
112
112
  redirectId?: string;
@@ -37,18 +37,18 @@ export type ECFormLinkItem<T extends Metadata = Metadata> = {
37
37
  * null for subscriptions
38
38
  */
39
39
  allowCardInstallments: boolean | null;
40
- subscriptionStartOn?: string;
41
- subscriptionStartIn?: string;
42
- subscriptionStartInMonths?: number;
43
- subscriptionStartDayOfMonth?: number;
44
- subscriptionPreserveEndOfMonth?: boolean;
45
- subscriptionInitialAmount?: number;
46
- subscriptionCycles?: number;
40
+ subscriptionStartOn?: string | null;
41
+ subscriptionStartIn?: string | null;
42
+ subscriptionStartInMonths?: number | null;
43
+ subscriptionStartDayOfMonth?: number | null;
44
+ subscriptionPreserveEndOfMonth?: boolean | null;
45
+ subscriptionInitialAmount?: number | null;
46
+ subscriptionCycles?: number | null;
47
47
  /**
48
48
  * ISO 8601 period. e.g P1M, P23D. Can not be used with the `period` parameter
49
49
  */
50
50
  subscriptionCyclicalPeriod?: string | null;
51
- subscriptionPeriod?: SubscriptionPeriod;
51
+ subscriptionPeriod?: SubscriptionPeriod | null;
52
52
  /**
53
53
  * ISO 8601 period. e.g P1M, P23D. Can not be used with the `period` parameter
54
54
  */
@@ -5,11 +5,11 @@ import { AuthParams, SendData } from "../api/RestAPI.js";
5
5
  import { ConfigurationItem } from "./common/Configuration.js";
6
6
  import { TransferScheduleItem } from "./common/TransferSchedule.js";
7
7
  import { CRUDResource } from "./CRUDResource.js";
8
- export interface MerchantConfigurationItem extends ConfigurationItem {
8
+ export type MerchantConfigurationItem = ConfigurationItem & {
9
9
  waitPeriod?: string;
10
10
  transferSchedule?: TransferScheduleItem;
11
- }
12
- export interface MerchantItem {
11
+ };
12
+ export type MerchantItem = {
13
13
  id: string;
14
14
  verificationDataId?: string;
15
15
  name: string;
@@ -19,11 +19,11 @@ export interface MerchantItem {
19
19
  configuration: MerchantConfigurationItem;
20
20
  notificationEmail?: string;
21
21
  financeNotificationEmail?: string;
22
- }
22
+ };
23
23
  export type ResponseMerchant = MerchantItem;
24
- export interface MerchantBanParams {
24
+ export type MerchantBanParams = {
25
25
  reason: string;
26
- }
26
+ };
27
27
  export declare class Merchants extends CRUDResource {
28
28
  private _me?;
29
29
  me(data?: SendData<void>, auth?: AuthParams): Promise<ResponseMerchant>;
@@ -55,7 +55,7 @@ export interface RefundItem<T extends Metadata = Metadata> {
55
55
  amountFormatted: number;
56
56
  reason?: RefundReason;
57
57
  message?: string;
58
- error?: PaymentError;
58
+ error?: PaymentError | null;
59
59
  metadata?: T;
60
60
  mode: ProcessingMode;
61
61
  createdOn: string;
@@ -186,7 +186,7 @@ export type SubscriptionItem<T extends Metadata = Metadata> = {
186
186
  subsequentCyclesStart?: string;
187
187
  installmentPlan?: InstallmentPlanItem;
188
188
  subscriptionPlan?: SubscriptionPlanItem;
189
- period?: SubscriptionPeriod;
189
+ period?: SubscriptionPeriod | null;
190
190
  cyclicalPeriod?: string | null;
191
191
  cyclesLeft?: number;
192
192
  metadata?: T;
@@ -2,6 +2,7 @@
2
2
  * @internal
3
3
  * @module Types
4
4
  */
5
+ import { RecursiveNull } from "../../common/types.js";
5
6
  import { RecurringTokenPrivilege } from "../TransactionTokens.js";
6
7
  import { CardBrand, ProcessingMode } from "./enums.js";
7
8
  import { AmountWithCurrency } from "./types.js";
@@ -23,15 +24,15 @@ export declare enum CustomerRole {
23
24
  SUBSCRIPTION_SUSPEND = "subscription_suspend",// Also controls resume functionality
24
25
  SUBSCRIPTION_DELETE = "subscription_delete"
25
26
  }
26
- export type CustomerManagementConfiguration = {
27
+ export type CustomerManagementConfiguration = RecursiveNull<{
27
28
  enabled: boolean;
28
29
  defaultRoles: CustomerRole[];
29
30
  defaultMode: ProcessingMode;
30
- };
31
- export interface PaymentTypeConfiguration {
31
+ }>;
32
+ export type PaymentTypeConfiguration = RecursiveNull<{
32
33
  enabled?: boolean;
33
- }
34
- export interface CardBrandPercentFeesItem {
34
+ }>;
35
+ export type CardBrandPercentFeesItem = {
35
36
  americanExpress?: number;
36
37
  dinersClub?: number;
37
38
  discover?: number;
@@ -40,7 +41,7 @@ export interface CardBrandPercentFeesItem {
40
41
  mastercard?: number;
41
42
  unionPay?: number;
42
43
  visa?: number;
43
- }
44
+ };
44
45
  export type CardConfigurationMonthlyLimit = AmountWithCurrency & {
45
46
  duration: string;
46
47
  };
@@ -48,16 +49,16 @@ export declare enum DirectDebitTransferDateType {
48
49
  MIDDLE_OF_MONTH = "fourteen",
49
50
  END_OF_MONTH = "twenty_seven"
50
51
  }
51
- export interface CardConfigurationItem extends PaymentTypeConfiguration {
52
+ export type CardConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
52
53
  debitEnabled: boolean;
53
54
  debitAuthorizationEnabled: boolean;
54
55
  prepaidEnabled: boolean;
55
56
  prepaidAuthorizationEnabled: boolean;
56
57
  forbiddenCardBrands: CardBrand[];
57
58
  foreignCardsAllowed: boolean;
58
- failOnNewEmail: boolean;
59
- allowedCountriesByIp: string[];
60
- cardLimit: CardConfigurationMonthlyLimit;
59
+ failOnNewEmail: boolean | null;
60
+ allowedCountriesByIp: string[] | null;
61
+ cardLimit: RecursiveNull<CardConfigurationMonthlyLimit> | null;
61
62
  allowEmptyCvv: boolean;
62
63
  onlyDirectCurrency: boolean;
63
64
  allowDirectTokenCreation: boolean;
@@ -65,12 +66,12 @@ export interface CardConfigurationItem extends PaymentTypeConfiguration {
65
66
  threeDsPhoneNumberRequired?: boolean;
66
67
  threeDsRequired?: boolean;
67
68
  threeDsSkipEnabled?: boolean;
68
- }
69
- export interface QRScanConfigurationItem extends PaymentTypeConfiguration {
69
+ }>;
70
+ export type QRScanConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
70
71
  forbiddenQrScanGateways: string[];
71
- }
72
+ }>;
72
73
  export type QRMerchantConfigurationItem = PaymentTypeConfiguration;
73
- export type ConvenienceConfigurationItem = PaymentTypeConfiguration & {
74
+ export type ConvenienceConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
74
75
  expiration: string;
75
76
  /**
76
77
  * Ensure that the charge expires when the merchant "expects" it to expire.
@@ -83,10 +84,10 @@ export type ConvenienceConfigurationItem = PaymentTypeConfiguration & {
83
84
  */
84
85
  value: string;
85
86
  };
86
- };
87
+ }>;
87
88
  export type OnlineConfigurationItem = PaymentTypeConfiguration;
88
89
  export type PaidyConfigurationItem = PaymentTypeConfiguration;
89
- export type BankTransferConfiguration = PaymentTypeConfiguration & {
90
+ export type BankTransferConfiguration = PaymentTypeConfiguration & RecursiveNull<{
90
91
  matchAmount: TransferMatchAmount;
91
92
  expiration: string;
92
93
  /**
@@ -156,15 +157,15 @@ export type BankTransferConfiguration = PaymentTypeConfiguration & {
156
157
  * Boolean when a charge cancel should be notified
157
158
  */
158
159
  chargeRequestCanceledNotificationEnabled?: boolean;
159
- };
160
- export type DirectDebitConfiguration = PaymentTypeConfiguration & {
160
+ }>;
161
+ export type DirectDebitConfiguration = PaymentTypeConfiguration & RecursiveNull<{
161
162
  legacyId?: string;
162
163
  debitDate?: DirectDebitTransferDateType;
163
164
  consignorCode?: string;
164
165
  classifier?: string;
165
166
  signature?: string;
166
- };
167
- export interface InstallmentsConfiguration {
167
+ }>;
168
+ export type InstallmentsConfiguration = RecursiveNull<{
168
169
  enabled?: boolean;
169
170
  minChargeAmount?: AmountWithCurrency;
170
171
  maxPayoutPeriod?: string;
@@ -174,10 +175,9 @@ export interface InstallmentsConfiguration {
174
175
  fixedCycle: boolean;
175
176
  revolving: boolean;
176
177
  } | null;
177
- }
178
- export interface InstallmentsConfigurationItem extends PaymentTypeConfiguration, InstallmentsConfiguration {
179
- }
180
- export type SubscriptionPlanConfiguration = {
178
+ }>;
179
+ export type InstallmentsConfigurationItem = PaymentTypeConfiguration & InstallmentsConfiguration;
180
+ export type SubscriptionPlanConfiguration = RecursiveNull<{
181
181
  enabled: boolean | null;
182
182
  fixedCycle: boolean | null;
183
183
  fixedCycleAmount: boolean | null;
@@ -191,8 +191,8 @@ export type SubscriptionPlanConfiguration = {
191
191
  * Period e.g: P1Y
192
192
  */
193
193
  maxPayoutPeriod: string | null;
194
- };
195
- export interface SecurityConfiguration {
194
+ }>;
195
+ export type SecurityConfiguration = RecursiveNull<{
196
196
  inspectSuspiciousLoginAfter?: string;
197
197
  limitChargeByCardConfiguration?: {
198
198
  quantityOfCharges: number;
@@ -214,8 +214,8 @@ export interface SecurityConfiguration {
214
214
  period?: Period;
215
215
  rollingWindow?: boolean;
216
216
  };
217
- }
218
- export interface UserTransactionsConfiguration {
217
+ }>;
218
+ export type UserTransactionsConfiguration = RecursiveNull<{
219
219
  enabled?: boolean;
220
220
  notifyCustomer?: boolean;
221
221
  notifyOnTest?: boolean;
@@ -242,34 +242,34 @@ export interface UserTransactionsConfiguration {
242
242
  * Boolean when the customer management system link (`${customer_refer_link}` parameter) should be shown on the subscription templates
243
243
  */
244
244
  customerReferLinkEnabled?: boolean;
245
- }
246
- export interface RecurringTokenConfiguration {
245
+ }>;
246
+ export type RecurringTokenConfiguration = RecursiveNull<{
247
247
  recurringType?: RecurringTokenPrivilege;
248
248
  chargeWaitPeriod?: string;
249
249
  cardChargeCvvConfirmation?: {
250
250
  enabled?: boolean;
251
251
  threshold?: AmountWithCurrency[];
252
252
  };
253
- }
254
- export interface SubscriptionsConfiguration {
253
+ }>;
254
+ export type SubscriptionsConfiguration = RecursiveNull<{
255
255
  enabled?: boolean;
256
256
  failedChargesToCancel: number;
257
257
  suspendOnCancel: boolean;
258
258
  allowMerchantAmountPatch?: boolean;
259
259
  allowMerchantDueDatePatch?: boolean;
260
- }
261
- export interface DescriptorProvidedConfiguration {
260
+ }>;
261
+ export type DescriptorProvidedConfiguration = RecursiveNull<{
262
262
  name: string;
263
263
  phoneNumber: string;
264
- }
265
- export type CheckoutConfiguration = {
264
+ }>;
265
+ export type CheckoutConfiguration = RecursiveNull<{
266
266
  ecEmail: {
267
267
  enabled?: boolean;
268
268
  };
269
269
  ecProducts: {
270
270
  enabled?: boolean;
271
271
  };
272
- };
272
+ }>;
273
273
  export declare enum Period {
274
274
  DAILY = "daily",
275
275
  WEEKLY = "weekly",
@@ -280,7 +280,7 @@ export declare enum Period {
280
280
  SEMIANNUALLY = "semiannually",
281
281
  ANNUALLY = "annually"
282
282
  }
283
- export interface ConfigurationItem {
283
+ export type ConfigurationItem = RecursiveNull<{
284
284
  bankTransferConfiguration: BankTransferConfiguration;
285
285
  cardBrandPercentFees: CardBrandPercentFeesItem;
286
286
  cardConfiguration: CardConfigurationItem;
@@ -312,8 +312,8 @@ export interface ConfigurationItem {
312
312
  platformCredentialsEnabled?: boolean;
313
313
  taggedPlatformCredentialsEnabled?: boolean;
314
314
  foreignCardsEnabled?: boolean;
315
- }
316
- export interface ConfigurationParams {
315
+ }>;
316
+ export type ConfigurationParams = RecursiveNull<{
317
317
  logoUrl?: string;
318
318
  paymentErrorTranslationEnabled?: boolean;
319
319
  bankTransferConfiguration?: Partial<BankTransferConfiguration>;
@@ -332,6 +332,6 @@ export interface ConfigurationParams {
332
332
  subscriptionPlanConfiguration?: SubscriptionPlanConfiguration;
333
333
  securityConfiguration?: Partial<SecurityConfiguration>;
334
334
  customerManagementConfiguration?: Partial<CustomerManagementConfiguration>;
335
- }
335
+ }>;
336
336
  export type ConfigurationCreateParams = ConfigurationParams;
337
337
  export type ConfigurationUpdateParams = ConfigurationParams;
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../src/resources/common/Configuration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACzB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,YAYX;AAZD,WAAY,YAAY;IACpB,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,iEAAiD,CAAA;IACjD,qFAAqE,CAAA;IAErE,uDAAuC,CAAA;IACvC,uEAAuD,CAAA;IACvD,6DAA6C,CAAA;IAC7C,2DAA2C,CAAA;AAC/C,CAAC,EAZW,YAAY,4BAAZ,YAAY,QAYvB;AAyBD,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,2DAA4B,CAAA;IAC5B,4DAA6B,CAAA;AACjC,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AA2PD,IAAY,MASX;AATD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACzB,CAAC,EATW,MAAM,sBAAN,MAAM,QASjB"}
1
+ {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../src/resources/common/Configuration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACzB,CAAC,EALW,mBAAmB,mCAAnB,mBAAmB,QAK9B;AAED,IAAY,YAYX;AAZD,WAAY,YAAY;IACpB,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,iEAAiD,CAAA;IACjD,qFAAqE,CAAA;IAErE,uDAAuC,CAAA;IACvC,uEAAuD,CAAA;IACvD,6DAA6C,CAAA;IAC7C,2DAA2C,CAAA;AAC/C,CAAC,EAZW,YAAY,4BAAZ,YAAY,QAYvB;AAyBD,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,2DAA4B,CAAA;IAC5B,4DAA6B,CAAA;AACjC,CAAC,EAHW,2BAA2B,2CAA3B,2BAA2B,QAGtC;AAiQD,IAAY,MASX;AATD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACzB,CAAC,EATW,MAAM,sBAAN,MAAM,QASjB"}
@@ -3,7 +3,7 @@
3
3
  * @module Types
4
4
  */
5
5
  import { PhoneNumber } from "./types.js";
6
- export interface ContactInfo {
6
+ export type ContactInfo = {
7
7
  name: string;
8
8
  companyName: string;
9
9
  phoneNumber: PhoneNumber;
@@ -13,5 +13,5 @@ export interface ContactInfo {
13
13
  state: string;
14
14
  country: string;
15
15
  zip: string;
16
- }
16
+ };
17
17
  export type ContactInfoPartial = Partial<ContactInfo>;
@@ -1 +1,2 @@
1
1
  export * from "./constants.js";
2
+ export * from "./types.js";
@@ -1,2 +1,3 @@
1
1
  export * from "./constants.js";
2
+ export * from "./types.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ type AnyFunction = (...args: unknown[]) => unknown;
2
+ type Primitive = string | number | boolean | bigint | symbol | undefined | null;
3
+ type Leaf = Primitive | Date | RegExp | Error | AnyFunction | ReadonlyMap<unknown, unknown> | ReadonlySet<unknown>;
4
+ type DeepNullInner<T> = T extends Leaf ? T : T extends Map<infer K, infer V> ? Map<K, DeepNullInner<V>> : T extends Set<infer U> ? Set<DeepNullInner<U>> : T extends readonly unknown[] ? {
5
+ [K in keyof T]: DeepNullInner<T[K]>;
6
+ } : T extends object ? {
7
+ [K in keyof T]: RecursiveNull<T[K]>;
8
+ } : T;
9
+ export type RecursiveNull<T> = DeepNullInner<T> | null;
10
+ export {};
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
@@ -21,7 +21,7 @@ export interface CancelItem<T extends Metadata = Metadata> {
21
21
  chargeId: string;
22
22
  storeId?: string;
23
23
  status: CancelStatus;
24
- error?: PaymentError;
24
+ error?: PaymentError | null;
25
25
  metadata?: T;
26
26
  mode: ProcessingMode;
27
27
  createdOn: string;
@@ -106,7 +106,7 @@ export interface ChargeItem<T extends Metadata = Metadata> {
106
106
  subscriptionId?: string;
107
107
  captureAt?: string;
108
108
  captureStatus?: CaptureStatus;
109
- error?: PaymentError;
109
+ error?: PaymentError | null;
110
110
  transactionTokenId?: string;
111
111
  redirect?: {
112
112
  redirectId?: string;
@@ -37,18 +37,18 @@ export type ECFormLinkItem<T extends Metadata = Metadata> = {
37
37
  * null for subscriptions
38
38
  */
39
39
  allowCardInstallments: boolean | null;
40
- subscriptionStartOn?: string;
41
- subscriptionStartIn?: string;
42
- subscriptionStartInMonths?: number;
43
- subscriptionStartDayOfMonth?: number;
44
- subscriptionPreserveEndOfMonth?: boolean;
45
- subscriptionInitialAmount?: number;
46
- subscriptionCycles?: number;
40
+ subscriptionStartOn?: string | null;
41
+ subscriptionStartIn?: string | null;
42
+ subscriptionStartInMonths?: number | null;
43
+ subscriptionStartDayOfMonth?: number | null;
44
+ subscriptionPreserveEndOfMonth?: boolean | null;
45
+ subscriptionInitialAmount?: number | null;
46
+ subscriptionCycles?: number | null;
47
47
  /**
48
48
  * ISO 8601 period. e.g P1M, P23D. Can not be used with the `period` parameter
49
49
  */
50
50
  subscriptionCyclicalPeriod?: string | null;
51
- subscriptionPeriod?: SubscriptionPeriod;
51
+ subscriptionPeriod?: SubscriptionPeriod | null;
52
52
  /**
53
53
  * ISO 8601 period. e.g P1M, P23D. Can not be used with the `period` parameter
54
54
  */
@@ -5,11 +5,11 @@ import { AuthParams, SendData } from "../api/RestAPI.js";
5
5
  import { ConfigurationItem } from "./common/Configuration.js";
6
6
  import { TransferScheduleItem } from "./common/TransferSchedule.js";
7
7
  import { CRUDResource } from "./CRUDResource.js";
8
- export interface MerchantConfigurationItem extends ConfigurationItem {
8
+ export type MerchantConfigurationItem = ConfigurationItem & {
9
9
  waitPeriod?: string;
10
10
  transferSchedule?: TransferScheduleItem;
11
- }
12
- export interface MerchantItem {
11
+ };
12
+ export type MerchantItem = {
13
13
  id: string;
14
14
  verificationDataId?: string;
15
15
  name: string;
@@ -19,11 +19,11 @@ export interface MerchantItem {
19
19
  configuration: MerchantConfigurationItem;
20
20
  notificationEmail?: string;
21
21
  financeNotificationEmail?: string;
22
- }
22
+ };
23
23
  export type ResponseMerchant = MerchantItem;
24
- export interface MerchantBanParams {
24
+ export type MerchantBanParams = {
25
25
  reason: string;
26
- }
26
+ };
27
27
  export declare class Merchants extends CRUDResource {
28
28
  private _me?;
29
29
  me(data?: SendData<void>, auth?: AuthParams): Promise<ResponseMerchant>;
@@ -55,7 +55,7 @@ export interface RefundItem<T extends Metadata = Metadata> {
55
55
  amountFormatted: number;
56
56
  reason?: RefundReason;
57
57
  message?: string;
58
- error?: PaymentError;
58
+ error?: PaymentError | null;
59
59
  metadata?: T;
60
60
  mode: ProcessingMode;
61
61
  createdOn: string;
@@ -186,7 +186,7 @@ export type SubscriptionItem<T extends Metadata = Metadata> = {
186
186
  subsequentCyclesStart?: string;
187
187
  installmentPlan?: InstallmentPlanItem;
188
188
  subscriptionPlan?: SubscriptionPlanItem;
189
- period?: SubscriptionPeriod;
189
+ period?: SubscriptionPeriod | null;
190
190
  cyclicalPeriod?: string | null;
191
191
  cyclesLeft?: number;
192
192
  metadata?: T;
@@ -2,6 +2,7 @@
2
2
  * @internal
3
3
  * @module Types
4
4
  */
5
+ import { RecursiveNull } from "../../common/types.js";
5
6
  import { RecurringTokenPrivilege } from "../TransactionTokens.js";
6
7
  import { CardBrand, ProcessingMode } from "./enums.js";
7
8
  import { AmountWithCurrency } from "./types.js";
@@ -23,15 +24,15 @@ export declare enum CustomerRole {
23
24
  SUBSCRIPTION_SUSPEND = "subscription_suspend",// Also controls resume functionality
24
25
  SUBSCRIPTION_DELETE = "subscription_delete"
25
26
  }
26
- export type CustomerManagementConfiguration = {
27
+ export type CustomerManagementConfiguration = RecursiveNull<{
27
28
  enabled: boolean;
28
29
  defaultRoles: CustomerRole[];
29
30
  defaultMode: ProcessingMode;
30
- };
31
- export interface PaymentTypeConfiguration {
31
+ }>;
32
+ export type PaymentTypeConfiguration = RecursiveNull<{
32
33
  enabled?: boolean;
33
- }
34
- export interface CardBrandPercentFeesItem {
34
+ }>;
35
+ export type CardBrandPercentFeesItem = {
35
36
  americanExpress?: number;
36
37
  dinersClub?: number;
37
38
  discover?: number;
@@ -40,7 +41,7 @@ export interface CardBrandPercentFeesItem {
40
41
  mastercard?: number;
41
42
  unionPay?: number;
42
43
  visa?: number;
43
- }
44
+ };
44
45
  export type CardConfigurationMonthlyLimit = AmountWithCurrency & {
45
46
  duration: string;
46
47
  };
@@ -48,16 +49,16 @@ export declare enum DirectDebitTransferDateType {
48
49
  MIDDLE_OF_MONTH = "fourteen",
49
50
  END_OF_MONTH = "twenty_seven"
50
51
  }
51
- export interface CardConfigurationItem extends PaymentTypeConfiguration {
52
+ export type CardConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
52
53
  debitEnabled: boolean;
53
54
  debitAuthorizationEnabled: boolean;
54
55
  prepaidEnabled: boolean;
55
56
  prepaidAuthorizationEnabled: boolean;
56
57
  forbiddenCardBrands: CardBrand[];
57
58
  foreignCardsAllowed: boolean;
58
- failOnNewEmail: boolean;
59
- allowedCountriesByIp: string[];
60
- cardLimit: CardConfigurationMonthlyLimit;
59
+ failOnNewEmail: boolean | null;
60
+ allowedCountriesByIp: string[] | null;
61
+ cardLimit: RecursiveNull<CardConfigurationMonthlyLimit> | null;
61
62
  allowEmptyCvv: boolean;
62
63
  onlyDirectCurrency: boolean;
63
64
  allowDirectTokenCreation: boolean;
@@ -65,12 +66,12 @@ export interface CardConfigurationItem extends PaymentTypeConfiguration {
65
66
  threeDsPhoneNumberRequired?: boolean;
66
67
  threeDsRequired?: boolean;
67
68
  threeDsSkipEnabled?: boolean;
68
- }
69
- export interface QRScanConfigurationItem extends PaymentTypeConfiguration {
69
+ }>;
70
+ export type QRScanConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
70
71
  forbiddenQrScanGateways: string[];
71
- }
72
+ }>;
72
73
  export type QRMerchantConfigurationItem = PaymentTypeConfiguration;
73
- export type ConvenienceConfigurationItem = PaymentTypeConfiguration & {
74
+ export type ConvenienceConfigurationItem = PaymentTypeConfiguration & RecursiveNull<{
74
75
  expiration: string;
75
76
  /**
76
77
  * Ensure that the charge expires when the merchant "expects" it to expire.
@@ -83,10 +84,10 @@ export type ConvenienceConfigurationItem = PaymentTypeConfiguration & {
83
84
  */
84
85
  value: string;
85
86
  };
86
- };
87
+ }>;
87
88
  export type OnlineConfigurationItem = PaymentTypeConfiguration;
88
89
  export type PaidyConfigurationItem = PaymentTypeConfiguration;
89
- export type BankTransferConfiguration = PaymentTypeConfiguration & {
90
+ export type BankTransferConfiguration = PaymentTypeConfiguration & RecursiveNull<{
90
91
  matchAmount: TransferMatchAmount;
91
92
  expiration: string;
92
93
  /**
@@ -156,15 +157,15 @@ export type BankTransferConfiguration = PaymentTypeConfiguration & {
156
157
  * Boolean when a charge cancel should be notified
157
158
  */
158
159
  chargeRequestCanceledNotificationEnabled?: boolean;
159
- };
160
- export type DirectDebitConfiguration = PaymentTypeConfiguration & {
160
+ }>;
161
+ export type DirectDebitConfiguration = PaymentTypeConfiguration & RecursiveNull<{
161
162
  legacyId?: string;
162
163
  debitDate?: DirectDebitTransferDateType;
163
164
  consignorCode?: string;
164
165
  classifier?: string;
165
166
  signature?: string;
166
- };
167
- export interface InstallmentsConfiguration {
167
+ }>;
168
+ export type InstallmentsConfiguration = RecursiveNull<{
168
169
  enabled?: boolean;
169
170
  minChargeAmount?: AmountWithCurrency;
170
171
  maxPayoutPeriod?: string;
@@ -174,10 +175,9 @@ export interface InstallmentsConfiguration {
174
175
  fixedCycle: boolean;
175
176
  revolving: boolean;
176
177
  } | null;
177
- }
178
- export interface InstallmentsConfigurationItem extends PaymentTypeConfiguration, InstallmentsConfiguration {
179
- }
180
- export type SubscriptionPlanConfiguration = {
178
+ }>;
179
+ export type InstallmentsConfigurationItem = PaymentTypeConfiguration & InstallmentsConfiguration;
180
+ export type SubscriptionPlanConfiguration = RecursiveNull<{
181
181
  enabled: boolean | null;
182
182
  fixedCycle: boolean | null;
183
183
  fixedCycleAmount: boolean | null;
@@ -191,8 +191,8 @@ export type SubscriptionPlanConfiguration = {
191
191
  * Period e.g: P1Y
192
192
  */
193
193
  maxPayoutPeriod: string | null;
194
- };
195
- export interface SecurityConfiguration {
194
+ }>;
195
+ export type SecurityConfiguration = RecursiveNull<{
196
196
  inspectSuspiciousLoginAfter?: string;
197
197
  limitChargeByCardConfiguration?: {
198
198
  quantityOfCharges: number;
@@ -214,8 +214,8 @@ export interface SecurityConfiguration {
214
214
  period?: Period;
215
215
  rollingWindow?: boolean;
216
216
  };
217
- }
218
- export interface UserTransactionsConfiguration {
217
+ }>;
218
+ export type UserTransactionsConfiguration = RecursiveNull<{
219
219
  enabled?: boolean;
220
220
  notifyCustomer?: boolean;
221
221
  notifyOnTest?: boolean;
@@ -242,34 +242,34 @@ export interface UserTransactionsConfiguration {
242
242
  * Boolean when the customer management system link (`${customer_refer_link}` parameter) should be shown on the subscription templates
243
243
  */
244
244
  customerReferLinkEnabled?: boolean;
245
- }
246
- export interface RecurringTokenConfiguration {
245
+ }>;
246
+ export type RecurringTokenConfiguration = RecursiveNull<{
247
247
  recurringType?: RecurringTokenPrivilege;
248
248
  chargeWaitPeriod?: string;
249
249
  cardChargeCvvConfirmation?: {
250
250
  enabled?: boolean;
251
251
  threshold?: AmountWithCurrency[];
252
252
  };
253
- }
254
- export interface SubscriptionsConfiguration {
253
+ }>;
254
+ export type SubscriptionsConfiguration = RecursiveNull<{
255
255
  enabled?: boolean;
256
256
  failedChargesToCancel: number;
257
257
  suspendOnCancel: boolean;
258
258
  allowMerchantAmountPatch?: boolean;
259
259
  allowMerchantDueDatePatch?: boolean;
260
- }
261
- export interface DescriptorProvidedConfiguration {
260
+ }>;
261
+ export type DescriptorProvidedConfiguration = RecursiveNull<{
262
262
  name: string;
263
263
  phoneNumber: string;
264
- }
265
- export type CheckoutConfiguration = {
264
+ }>;
265
+ export type CheckoutConfiguration = RecursiveNull<{
266
266
  ecEmail: {
267
267
  enabled?: boolean;
268
268
  };
269
269
  ecProducts: {
270
270
  enabled?: boolean;
271
271
  };
272
- };
272
+ }>;
273
273
  export declare enum Period {
274
274
  DAILY = "daily",
275
275
  WEEKLY = "weekly",
@@ -280,7 +280,7 @@ export declare enum Period {
280
280
  SEMIANNUALLY = "semiannually",
281
281
  ANNUALLY = "annually"
282
282
  }
283
- export interface ConfigurationItem {
283
+ export type ConfigurationItem = RecursiveNull<{
284
284
  bankTransferConfiguration: BankTransferConfiguration;
285
285
  cardBrandPercentFees: CardBrandPercentFeesItem;
286
286
  cardConfiguration: CardConfigurationItem;
@@ -312,8 +312,8 @@ export interface ConfigurationItem {
312
312
  platformCredentialsEnabled?: boolean;
313
313
  taggedPlatformCredentialsEnabled?: boolean;
314
314
  foreignCardsEnabled?: boolean;
315
- }
316
- export interface ConfigurationParams {
315
+ }>;
316
+ export type ConfigurationParams = RecursiveNull<{
317
317
  logoUrl?: string;
318
318
  paymentErrorTranslationEnabled?: boolean;
319
319
  bankTransferConfiguration?: Partial<BankTransferConfiguration>;
@@ -332,6 +332,6 @@ export interface ConfigurationParams {
332
332
  subscriptionPlanConfiguration?: SubscriptionPlanConfiguration;
333
333
  securityConfiguration?: Partial<SecurityConfiguration>;
334
334
  customerManagementConfiguration?: Partial<CustomerManagementConfiguration>;
335
- }
335
+ }>;
336
336
  export type ConfigurationCreateParams = ConfigurationParams;
337
337
  export type ConfigurationUpdateParams = ConfigurationParams;
@@ -1 +1 @@
1
- {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../src/resources/common/Configuration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACzB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACpB,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,iEAAiD,CAAA;IACjD,qFAAqE,CAAA;IAErE,uDAAuC,CAAA;IACvC,uEAAuD,CAAA;IACvD,6DAA6C,CAAA;IAC7C,2DAA2C,CAAA;AAC/C,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB;AAyBD,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,2DAA4B,CAAA;IAC5B,4DAA6B,CAAA;AACjC,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AA2PD,MAAM,CAAN,IAAY,MASX;AATD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACzB,CAAC,EATW,MAAM,KAAN,MAAM,QASjB"}
1
+ {"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../../src/resources/common/Configuration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,4CAAqB,CAAA;AACzB,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAED,MAAM,CAAN,IAAY,YAYX;AAZD,WAAY,YAAY;IACpB,iEAAiD,CAAA;IACjD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,qEAAqD,CAAA;IACrD,iEAAiD,CAAA;IACjD,qFAAqE,CAAA;IAErE,uDAAuC,CAAA;IACvC,uEAAuD,CAAA;IACvD,6DAA6C,CAAA;IAC7C,2DAA2C,CAAA;AAC/C,CAAC,EAZW,YAAY,KAAZ,YAAY,QAYvB;AAyBD,MAAM,CAAN,IAAY,2BAGX;AAHD,WAAY,2BAA2B;IACnC,2DAA4B,CAAA;IAC5B,4DAA6B,CAAA;AACjC,CAAC,EAHW,2BAA2B,KAA3B,2BAA2B,QAGtC;AAiQD,MAAM,CAAN,IAAY,MASX;AATD,WAAY,MAAM;IACd,yBAAe,CAAA;IACf,2BAAiB,CAAA;IACjB,+BAAqB,CAAA;IACrB,6BAAmB,CAAA;IACnB,iCAAuB,CAAA;IACvB,iCAAuB,CAAA;IACvB,uCAA6B,CAAA;IAC7B,+BAAqB,CAAA;AACzB,CAAC,EATW,MAAM,KAAN,MAAM,QASjB"}
@@ -3,7 +3,7 @@
3
3
  * @module Types
4
4
  */
5
5
  import { PhoneNumber } from "./types.js";
6
- export interface ContactInfo {
6
+ export type ContactInfo = {
7
7
  name: string;
8
8
  companyName: string;
9
9
  phoneNumber: PhoneNumber;
@@ -13,5 +13,5 @@ export interface ContactInfo {
13
13
  state: string;
14
14
  country: string;
15
15
  zip: string;
16
- }
16
+ };
17
17
  export type ContactInfoPartial = Partial<ContactInfo>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "univapay-node",
3
- "version": "4.0.173",
3
+ "version": "4.0.174",
4
4
  "description": "UnivaPay SDK library for Node.js",
5
5
  "license": "MIT",
6
6
  "repository": {