univapay-node 3.0.26 → 3.0.27
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/cjs/api/RestAPI.d.ts +5 -5
- package/dist/cjs/api/utils/JWT.d.ts +1 -1
- package/dist/cjs/errors/APIError.d.ts +2 -2
- package/dist/cjs/errors/RequestResponseError.d.ts +2 -2
- package/dist/cjs/resources/BankAccounts.d.ts +4 -4
- package/dist/cjs/resources/Cancels.d.ts +4 -4
- package/dist/cjs/resources/Captures.d.ts +2 -2
- package/dist/cjs/resources/Charges.d.ts +6 -6
- package/dist/cjs/resources/CheckoutInfo.d.ts +4 -4
- package/dist/cjs/resources/ECFormLinks.d.ts +2 -2
- package/dist/cjs/resources/ECForms.d.ts +4 -4
- package/dist/cjs/resources/ECInfo.d.ts +3 -3
- package/dist/cjs/resources/Emails.d.ts +2 -2
- package/dist/cjs/resources/ExchangeRates.d.ts +1 -1
- package/dist/cjs/resources/Ledgers.d.ts +3 -3
- package/dist/cjs/resources/LinksProducts.d.ts +2 -2
- package/dist/cjs/resources/Merchants.d.ts +1 -1
- package/dist/cjs/resources/Platforms.d.ts +1 -1
- package/dist/cjs/resources/Products.d.ts +2 -2
- package/dist/cjs/resources/Refunds.d.ts +4 -4
- package/dist/cjs/resources/Resource.d.ts +2 -2
- package/dist/cjs/resources/Stores.d.ts +3 -3
- package/dist/cjs/resources/Subscriptions.d.ts +32 -15
- package/dist/cjs/resources/Subscriptions.js.map +1 -1
- package/dist/cjs/resources/TemporaryTokenAlias.d.ts +2 -2
- package/dist/cjs/resources/TransactionTokens.d.ts +21 -5
- package/dist/cjs/resources/TransactionTokens.js.map +1 -1
- package/dist/cjs/resources/Transfers.d.ts +4 -4
- package/dist/cjs/resources/Verification.d.ts +4 -4
- package/dist/cjs/resources/WebHooks.d.ts +4 -4
- package/dist/cjs/resources/common/Configuration.d.ts +12 -11
- package/dist/cjs/resources/common/ContactInfo.d.ts +1 -1
- package/dist/cjs/resources/common/Platform.d.ts +2 -2
- package/dist/cjs/resources/common/ignoreDescriptor.d.ts +1 -1
- package/dist/cjs/resources/common/types.d.ts +2 -2
- package/dist/cjs/utils/object.d.ts +1 -1
- package/dist/esm/api/RestAPI.d.ts +5 -5
- package/dist/esm/api/utils/JWT.d.ts +1 -1
- package/dist/esm/errors/APIError.d.ts +2 -2
- package/dist/esm/errors/RequestResponseError.d.ts +2 -2
- package/dist/esm/resources/BankAccounts.d.ts +4 -4
- package/dist/esm/resources/Cancels.d.ts +4 -4
- package/dist/esm/resources/Captures.d.ts +2 -2
- package/dist/esm/resources/Charges.d.ts +6 -6
- package/dist/esm/resources/CheckoutInfo.d.ts +4 -4
- package/dist/esm/resources/ECFormLinks.d.ts +2 -2
- package/dist/esm/resources/ECForms.d.ts +4 -4
- package/dist/esm/resources/ECInfo.d.ts +3 -3
- package/dist/esm/resources/Emails.d.ts +2 -2
- package/dist/esm/resources/ExchangeRates.d.ts +1 -1
- package/dist/esm/resources/Ledgers.d.ts +3 -3
- package/dist/esm/resources/LinksProducts.d.ts +2 -2
- package/dist/esm/resources/Merchants.d.ts +1 -1
- package/dist/esm/resources/Platforms.d.ts +1 -1
- package/dist/esm/resources/Products.d.ts +2 -2
- package/dist/esm/resources/Refunds.d.ts +4 -4
- package/dist/esm/resources/Resource.d.ts +2 -2
- package/dist/esm/resources/Stores.d.ts +3 -3
- package/dist/esm/resources/Subscriptions.d.ts +32 -15
- package/dist/esm/resources/Subscriptions.js.map +1 -1
- package/dist/esm/resources/TemporaryTokenAlias.d.ts +2 -2
- package/dist/esm/resources/TransactionTokens.d.ts +21 -5
- package/dist/esm/resources/TransactionTokens.js.map +1 -1
- package/dist/esm/resources/Transfers.d.ts +4 -4
- package/dist/esm/resources/Verification.d.ts +4 -4
- package/dist/esm/resources/WebHooks.d.ts +4 -4
- package/dist/esm/resources/common/Configuration.d.ts +12 -11
- package/dist/esm/resources/common/ContactInfo.d.ts +1 -1
- package/dist/esm/resources/common/Platform.d.ts +2 -2
- package/dist/esm/resources/common/ignoreDescriptor.d.ts +1 -1
- package/dist/esm/resources/common/types.d.ts +2 -2
- package/dist/esm/utils/object.d.ts +1 -1
- package/package.json +9 -9
|
@@ -6,7 +6,7 @@ import { EventEmitter } from "events";
|
|
|
6
6
|
import { RequestErrorCode, ResponseErrorCode } from "../errors/APIError.js";
|
|
7
7
|
import { ProcessingMode } from "../resources/common/enums.js";
|
|
8
8
|
import { JWTPayload } from "./utils/JWT.js";
|
|
9
|
-
export
|
|
9
|
+
export type PollParams<Response> = {
|
|
10
10
|
/**
|
|
11
11
|
* Condition for which the response is considered to be successful and stop the polling
|
|
12
12
|
*/
|
|
@@ -75,12 +75,12 @@ export interface AuthParams {
|
|
|
75
75
|
authToken?: string;
|
|
76
76
|
appId?: string;
|
|
77
77
|
}
|
|
78
|
-
export
|
|
78
|
+
export type PollData = {
|
|
79
79
|
polling?: boolean;
|
|
80
80
|
};
|
|
81
|
-
export
|
|
82
|
-
export
|
|
83
|
-
export
|
|
81
|
+
export type PollExecute<A> = () => Promise<A>;
|
|
82
|
+
export type SendData<Data> = Data;
|
|
83
|
+
export type ApiSendOptions = {
|
|
84
84
|
/**
|
|
85
85
|
* Validate the JWT before calling the route and adds the authorization header to the request.
|
|
86
86
|
*/
|
|
@@ -7,7 +7,7 @@ export interface JWTBasePayload {
|
|
|
7
7
|
iat?: number;
|
|
8
8
|
jti?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
10
|
+
export type JWTPayload<Payload> = JWTBasePayload & Payload;
|
|
11
11
|
export declare const parseJWT: <Payload>(jwt?: string | null, keepKeys?: boolean) => JWTPayload<Payload>;
|
|
12
12
|
/**
|
|
13
13
|
* @internal
|
|
@@ -442,12 +442,12 @@ export declare enum NotSelectedReason {
|
|
|
442
442
|
PlatformCredentialsDisabled = "platform_credentials_disabled",
|
|
443
443
|
TaggedPlatformCredentialsDisabled = "tagged_platform_credentials_disabled"
|
|
444
444
|
}
|
|
445
|
-
|
|
445
|
+
type PaymentSubError = {
|
|
446
446
|
type: PaymentErrorType;
|
|
447
447
|
message: NotSelectedReason[];
|
|
448
448
|
credentialId: string;
|
|
449
449
|
};
|
|
450
|
-
export
|
|
450
|
+
export type PaymentError = {
|
|
451
451
|
message: string;
|
|
452
452
|
code: number;
|
|
453
453
|
details?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ErrorResponse, SubError, ValidationError } from "../api/RestAPI.js";
|
|
2
2
|
import { RequestErrorCode, ResponseErrorCode } from "./APIError.js";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type ErrorItem = boolean | number | string | SubError | ValidationError;
|
|
4
|
+
type RawErrorRequest = {
|
|
5
5
|
httpCode?: number;
|
|
6
6
|
code: ResponseErrorCode | RequestErrorCode;
|
|
7
7
|
errors: ErrorItem | ErrorItem[];
|
|
@@ -31,7 +31,7 @@ export interface BankAccountCreateParams {
|
|
|
31
31
|
accountType: BankAccountType;
|
|
32
32
|
primary?: boolean;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export type BankAccountUpdateParams = Partial<BankAccountCreateParams>;
|
|
35
35
|
export interface BankAccountItem {
|
|
36
36
|
id: string;
|
|
37
37
|
holderName: string;
|
|
@@ -51,9 +51,9 @@ export interface BankAccountItem {
|
|
|
51
51
|
accountNumber: string;
|
|
52
52
|
accountType: BankAccountType;
|
|
53
53
|
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
54
|
+
export type BankAccountListItem = BankAccountItem;
|
|
55
|
+
export type ResponseBankAccount = BankAccountItem;
|
|
56
|
+
export type ResponseBankAccounts = CRUDItemsResponse<BankAccountListItem>;
|
|
57
57
|
export declare class BankAccounts extends CRUDResource {
|
|
58
58
|
static requiredParams: string[];
|
|
59
59
|
static routeBase: string;
|
|
@@ -12,7 +12,7 @@ export declare enum CancelStatus {
|
|
|
12
12
|
FAILED = "failed",
|
|
13
13
|
ERROR = "error"
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type CancelsListParams = CRUDPaginationParams;
|
|
16
16
|
export interface CancelCreateParams<T extends Metadata = Metadata> {
|
|
17
17
|
metadata?: T;
|
|
18
18
|
}
|
|
@@ -26,9 +26,9 @@ export interface CancelItem<T extends Metadata = Metadata> {
|
|
|
26
26
|
mode: ProcessingMode;
|
|
27
27
|
createdOn: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
29
|
+
export type CancelListItem = CancelItem;
|
|
30
|
+
export type ResponseCancel = CancelItem;
|
|
31
|
+
export type ResponseCancels = CRUDItemsResponse<CancelListItem>;
|
|
32
32
|
export declare class Cancels extends CRUDResource {
|
|
33
33
|
static requiredParams: string[];
|
|
34
34
|
static routeBase: string;
|
|
@@ -8,11 +8,11 @@ export declare enum CaptureStatus {
|
|
|
8
8
|
Captured = "captured",
|
|
9
9
|
NotAuthorized = "not_authorized"
|
|
10
10
|
}
|
|
11
|
-
export
|
|
11
|
+
export type CaptureItem = {
|
|
12
12
|
amount: number;
|
|
13
13
|
currency: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type CaptureCreateParams = {
|
|
16
16
|
amount: number;
|
|
17
17
|
currency: string;
|
|
18
18
|
};
|
|
@@ -17,7 +17,7 @@ export declare enum ChargeStatus {
|
|
|
17
17
|
AWAITING = "awaiting",
|
|
18
18
|
AUTHORIZED = "authorized"
|
|
19
19
|
}
|
|
20
|
-
export
|
|
20
|
+
export type ChargesListParams = CRUDPaginationParams;
|
|
21
21
|
export interface ChargeCreateParams<T extends Metadata = Metadata> {
|
|
22
22
|
transactionTokenId: string;
|
|
23
23
|
amount: number;
|
|
@@ -29,7 +29,7 @@ export interface ChargeCreateParams<T extends Metadata = Metadata> {
|
|
|
29
29
|
onlyDirectCurrency?: boolean;
|
|
30
30
|
metadata?: T;
|
|
31
31
|
}
|
|
32
|
-
export
|
|
32
|
+
export type ChargeIssuerTokenGetParams = void;
|
|
33
33
|
export interface ChargeItem<T extends Metadata = Metadata> {
|
|
34
34
|
id: string;
|
|
35
35
|
merchantId: string;
|
|
@@ -58,10 +58,10 @@ export interface IssuerTokenItem {
|
|
|
58
58
|
issuerToken: string;
|
|
59
59
|
callMethod: "http_get" | "http_post" | "sdk";
|
|
60
60
|
}
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
61
|
+
export type ChargeListItem = WithStoreMerchantName<ChargeItem>;
|
|
62
|
+
export type ResponseCharge = ChargeItem;
|
|
63
|
+
export type ResponseCharges = CRUDItemsResponse<ChargeListItem>;
|
|
64
|
+
export type ResponseIssuerToken = IssuerTokenItem;
|
|
65
65
|
export declare class Charges extends CRUDResource {
|
|
66
66
|
static requiredParams: string[];
|
|
67
67
|
static routeBase: string;
|
|
@@ -54,7 +54,7 @@ export interface CheckoutInfoItem {
|
|
|
54
54
|
};
|
|
55
55
|
supportedBrands: SupportedBrand[];
|
|
56
56
|
}
|
|
57
|
-
export
|
|
57
|
+
export type CheckoutInfoBrandPayload = {
|
|
58
58
|
amount: number;
|
|
59
59
|
currency: string;
|
|
60
60
|
callMethod: OnlineCallMethod;
|
|
@@ -63,7 +63,7 @@ export declare type CheckoutInfoBrandPayload = {
|
|
|
63
63
|
*/
|
|
64
64
|
osType?: OSType;
|
|
65
65
|
};
|
|
66
|
-
|
|
66
|
+
type CheckoutInfoBrandItemBrand = {
|
|
67
67
|
brandName: string;
|
|
68
68
|
brandDisplayName: string;
|
|
69
69
|
extras: {
|
|
@@ -77,12 +77,12 @@ declare type CheckoutInfoBrandItemBrand = {
|
|
|
77
77
|
promoNames?: string[];
|
|
78
78
|
};
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type CheckoutInfoBrandItem = {
|
|
81
81
|
service: OnlineBrand;
|
|
82
82
|
serviceName: string;
|
|
83
83
|
brands: CheckoutInfoBrandItemBrand[];
|
|
84
84
|
};
|
|
85
|
-
export
|
|
85
|
+
export type ResponseCheckoutInfo = CheckoutInfoItem;
|
|
86
86
|
export declare class CheckoutInfo extends Resource {
|
|
87
87
|
private _get?;
|
|
88
88
|
get(data?: SendData<CheckoutInfoParams>, auth?: AuthParams): Promise<ResponseCheckoutInfo>;
|
|
@@ -6,7 +6,7 @@ import { Metadata } from "./common/types.js";
|
|
|
6
6
|
import { CRUDResource } from "./CRUDResource.js";
|
|
7
7
|
import { InstallmentPlan, SubscriptionPeriod } from "./Subscriptions.js";
|
|
8
8
|
import { TransactionTokenType } from "./TransactionTokens.js";
|
|
9
|
-
export
|
|
9
|
+
export type ECFormLinkItem = {
|
|
10
10
|
id: string;
|
|
11
11
|
merchantId: string;
|
|
12
12
|
storeId: string;
|
|
@@ -43,7 +43,7 @@ export declare type ECFormLinkItem = {
|
|
|
43
43
|
installmentCycles?: number;
|
|
44
44
|
installmentCycleAmount?: number;
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type ResponseECFormLink = ECFormLinkItem;
|
|
47
47
|
export declare class ECFormLinks extends CRUDResource {
|
|
48
48
|
static routeBase: string;
|
|
49
49
|
private _get?;
|
|
@@ -7,7 +7,7 @@ import { AmountWithCurrency } from "./common/types.js";
|
|
|
7
7
|
import { CRUDResource } from "./CRUDResource.js";
|
|
8
8
|
import { InstallmentPlan, SubscriptionPeriod } from "./Subscriptions.js";
|
|
9
9
|
import { PaymentType, TransactionTokenType, UsageLimit } from "./TransactionTokens.js";
|
|
10
|
-
|
|
10
|
+
type BaseMetadata = Record<string, string>;
|
|
11
11
|
export declare enum CheckoutType {
|
|
12
12
|
PAYMENT = "payment",
|
|
13
13
|
TOKEN = "token"
|
|
@@ -21,14 +21,14 @@ export declare enum Languages {
|
|
|
21
21
|
JA_JP = "ja_jp",
|
|
22
22
|
ZH_TW = "zh_tw"
|
|
23
23
|
}
|
|
24
|
-
export
|
|
24
|
+
export type ECFormCustomField = {
|
|
25
25
|
key: string;
|
|
26
26
|
label: string;
|
|
27
27
|
type: ECFormCustomFieldType;
|
|
28
28
|
required?: boolean;
|
|
29
29
|
options?: string[];
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type ECFormItem<Metadata = BaseMetadata> = {
|
|
32
32
|
id: string;
|
|
33
33
|
merchantId: string;
|
|
34
34
|
storeId: string;
|
|
@@ -93,7 +93,7 @@ export declare type ECFormItem<Metadata = BaseMetadata> = {
|
|
|
93
93
|
orderSummaryTitles?: Partial<Record<Languages, string>> | null;
|
|
94
94
|
customFields?: Partial<Record<Languages, ECFormCustomField[]>> | null;
|
|
95
95
|
};
|
|
96
|
-
export
|
|
96
|
+
export type ResponseECForm<Metadata = BaseMetadata> = ECFormItem<Metadata>;
|
|
97
97
|
export declare class ECForms extends CRUDResource {
|
|
98
98
|
static requiredParams: string[];
|
|
99
99
|
static routeBase: string;
|
|
@@ -5,14 +5,14 @@ import { AuthParams, SendData } from "../api/RestAPI.js";
|
|
|
5
5
|
import { CRUDResource } from "./CRUDResource.js";
|
|
6
6
|
import { ECFormLinkItem } from "./ECFormLinks.js";
|
|
7
7
|
import { ECFormItem } from "./ECForms.js";
|
|
8
|
-
export
|
|
8
|
+
export type ECInfoItem = {
|
|
9
9
|
form: ECFormItem;
|
|
10
10
|
link: ECFormLinkItem;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ECInfoGetParams = {
|
|
13
13
|
secret: string;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type ResponseECInfo = ECInfoItem;
|
|
16
16
|
export declare class ECInfo extends CRUDResource {
|
|
17
17
|
static routeBase: string;
|
|
18
18
|
private _get?;
|
|
@@ -10,7 +10,7 @@ export declare enum EmailStatus {
|
|
|
10
10
|
FAILED = "failed",
|
|
11
11
|
ERROR = "error"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type EmailItem = {
|
|
14
14
|
id: string;
|
|
15
15
|
merchantId: string;
|
|
16
16
|
storeId: string;
|
|
@@ -22,7 +22,7 @@ export declare type EmailItem = {
|
|
|
22
22
|
createdOn: string;
|
|
23
23
|
status: EmailStatus;
|
|
24
24
|
};
|
|
25
|
-
export
|
|
25
|
+
export type ResponseEmail = EmailItem;
|
|
26
26
|
export declare class Emails extends CRUDResource {
|
|
27
27
|
static routeBase: string;
|
|
28
28
|
private _get?;
|
|
@@ -9,7 +9,7 @@ export interface ExchangeRateItem {
|
|
|
9
9
|
amount: number;
|
|
10
10
|
currency: string;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export type ResponseExchangeRate = ExchangeRateItem;
|
|
13
13
|
export declare class ExchangeRates extends Resource {
|
|
14
14
|
private _calculate?;
|
|
15
15
|
calculate(data: SendData<ExchangeRateParams>, auth?: AuthParams): Promise<ResponseExchangeRate>;
|
|
@@ -33,9 +33,9 @@ export interface LedgerItem {
|
|
|
33
33
|
note?: string;
|
|
34
34
|
createdOn: string;
|
|
35
35
|
}
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
36
|
+
export type LedgerListItem = LedgerItem;
|
|
37
|
+
export type ResponseLedgers = CRUDItemsResponse<LedgerListItem>;
|
|
38
|
+
export type ResponseLedger = LedgerItem;
|
|
39
39
|
export declare class Ledgers extends CRUDResource {
|
|
40
40
|
static routeBase: string;
|
|
41
41
|
private _list?;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { AuthParams, SendData } from "../api/RestAPI.js";
|
|
5
5
|
import { CRUDItemsResponse, CRUDResource } from "./CRUDResource.js";
|
|
6
6
|
import { TransactionTokenType } from "./TransactionTokens.js";
|
|
7
|
-
export
|
|
7
|
+
export type LinkProductListItem = {
|
|
8
8
|
id: string;
|
|
9
9
|
merchantId: string;
|
|
10
10
|
storeId: string;
|
|
@@ -19,7 +19,7 @@ export declare type LinkProductListItem = {
|
|
|
19
19
|
code: string | null;
|
|
20
20
|
quantity: number;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type ResponseLinkProducts = CRUDItemsResponse<LinkProductListItem> & {
|
|
23
23
|
hasMore: false;
|
|
24
24
|
};
|
|
25
25
|
export declare class LinksProducts extends CRUDResource {
|
|
@@ -19,7 +19,7 @@ export interface MerchantItem {
|
|
|
19
19
|
configuration: MerchantConfigurationItem;
|
|
20
20
|
notificationEmail?: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type ResponseMerchant = MerchantItem;
|
|
23
23
|
export interface MerchantBanParams {
|
|
24
24
|
reason: string;
|
|
25
25
|
}
|
|
@@ -11,7 +11,7 @@ export interface PlatformConfigurationItem extends PlatformItem, WithConfig<Plat
|
|
|
11
11
|
supportedPaymentTypes?: PaymentType[];
|
|
12
12
|
supportedCardBrands?: CardBrand[];
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type ResponsePlatformConfiguration = Readonly<PlatformConfigurationItem>;
|
|
15
15
|
export declare class Platforms extends CRUDResource {
|
|
16
16
|
private _getConfiguration?;
|
|
17
17
|
getConfiguration(data?: SendData<void>, auth?: AuthParams): Promise<ResponsePlatformConfiguration>;
|
|
@@ -5,7 +5,7 @@ import { AuthParams, SendData } from "../api/RestAPI.js";
|
|
|
5
5
|
import { CRUDResource } from "./CRUDResource.js";
|
|
6
6
|
import { SubscriptionPeriod } from "./Subscriptions.js";
|
|
7
7
|
import { TransactionTokenType } from "./TransactionTokens.js";
|
|
8
|
-
export
|
|
8
|
+
export type ProductItem = {
|
|
9
9
|
id: string;
|
|
10
10
|
storeId: string;
|
|
11
11
|
merchantId: string;
|
|
@@ -27,7 +27,7 @@ export declare type ProductItem = {
|
|
|
27
27
|
updatedOn: string;
|
|
28
28
|
active: boolean;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
30
|
+
export type ResponseProduct = ProductItem;
|
|
31
31
|
export declare class Products extends CRUDResource {
|
|
32
32
|
static routeBase: string;
|
|
33
33
|
private _get?;
|
|
@@ -19,7 +19,7 @@ export declare enum RefundReason {
|
|
|
19
19
|
CHARGEBACK = "chargeback",
|
|
20
20
|
SYSTEM_FAILURE = "system_failure"
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type RefundsListParams = CRUDPaginationParams;
|
|
23
23
|
export interface RefundCreateParams<T extends Metadata = Metadata> {
|
|
24
24
|
amount: number;
|
|
25
25
|
currency: string;
|
|
@@ -49,9 +49,9 @@ export interface RefundItem<T extends Metadata = Metadata> {
|
|
|
49
49
|
mode: ProcessingMode;
|
|
50
50
|
createdOn: string;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
52
|
+
export type RefundListItem = RefundItem;
|
|
53
|
+
export type ResponseRefund = RefundItem;
|
|
54
|
+
export type ResponseRefunds = CRUDItemsResponse<RefundListItem>;
|
|
55
55
|
export declare class Refunds extends CRUDResource {
|
|
56
56
|
static requiredParams: string[];
|
|
57
57
|
static routeBase: string;
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { EventEmitter } from "events";
|
|
7
7
|
import { ApiSendOptions, AuthParams, HTTPMethod, RestAPI } from "../api/RestAPI.js";
|
|
8
|
-
export
|
|
9
|
-
export
|
|
8
|
+
export type DefinedRoute = (data?: unknown, auth?: AuthParams, pathParams?: Record<string, string>) => Promise<any>;
|
|
9
|
+
export type DefineRouteOptions = ApiSendOptions & {
|
|
10
10
|
/**
|
|
11
11
|
* Parameters required for the route to be called.
|
|
12
12
|
*/
|
|
@@ -25,9 +25,9 @@ export interface StoreItem {
|
|
|
25
25
|
createdOn: string;
|
|
26
26
|
configuration: ConfigurationItem;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
28
|
+
export type StoreListItem = WithMerchantName<StoreItem>;
|
|
29
|
+
export type ResponseStore = StoreItem;
|
|
30
|
+
export type ResponseStores = CRUDItemsResponse<StoreListItem>;
|
|
31
31
|
export declare class Stores extends CRUDResource {
|
|
32
32
|
static requiredParams: string[];
|
|
33
33
|
static routeBase: string;
|
|
@@ -59,14 +59,14 @@ export interface ScheduledPaymentItem {
|
|
|
59
59
|
createdOn: string;
|
|
60
60
|
successfulPaymentDate?: string;
|
|
61
61
|
}
|
|
62
|
-
export
|
|
63
|
-
export
|
|
62
|
+
export type SchedulePaymentListItem = ScheduledPaymentItem;
|
|
63
|
+
export type InstallmentPlanItem<InstallmentPlanData extends InstallmentBaseParams> = InstallmentPlanData;
|
|
64
64
|
export interface SubscriptionsListParams extends CRUDPaginationParams {
|
|
65
65
|
search?: string;
|
|
66
66
|
status?: SubscriptionStatus;
|
|
67
67
|
mode?: ProcessingMode;
|
|
68
68
|
}
|
|
69
|
-
export
|
|
69
|
+
export type ScheduledPaymentsListParams = CRUDPaginationParams;
|
|
70
70
|
export interface SubscriptionCreateBaseParams<T extends Metadata = Metadata> {
|
|
71
71
|
transactionTokenId: string;
|
|
72
72
|
amount: number;
|
|
@@ -77,14 +77,24 @@ export interface SubscriptionCreateBaseParams<T extends Metadata = Metadata> {
|
|
|
77
77
|
initialAmount?: number;
|
|
78
78
|
installmentPlan?: InstallmentPlanItem<any>;
|
|
79
79
|
onlyDirectCurrency?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Interval (e.g: P7D)
|
|
82
|
+
*
|
|
83
|
+
* Needs firstChargeAuthorizationOnly to be true to be used
|
|
84
|
+
*/
|
|
85
|
+
firstChargeCaptureAfter?: string;
|
|
86
|
+
firstChargeAuthorizationOnly?: boolean;
|
|
80
87
|
}
|
|
81
88
|
export interface SubscriptionCreateLegacyParams extends SubscriptionCreateBaseParams {
|
|
89
|
+
/**
|
|
90
|
+
* @deprecated Used scheduleSettings instead
|
|
91
|
+
*/
|
|
82
92
|
subsequentCyclesStart?: string | number;
|
|
83
93
|
}
|
|
84
94
|
export interface SubscriptionCreateNewParams extends SubscriptionCreateBaseParams {
|
|
85
95
|
scheduleSettings: Partial<ScheduleSettings>;
|
|
86
96
|
}
|
|
87
|
-
export
|
|
97
|
+
export type SubscriptionCreateParams = SubscriptionCreateLegacyParams | SubscriptionCreateNewParams;
|
|
88
98
|
export interface SubscriptionUpdateParams<T extends Metadata = Metadata> {
|
|
89
99
|
transactionTokenId?: string;
|
|
90
100
|
amount?: number;
|
|
@@ -92,8 +102,15 @@ export interface SubscriptionUpdateParams<T extends Metadata = Metadata> {
|
|
|
92
102
|
metadata?: T;
|
|
93
103
|
installmentPlan?: Partial<InstallmentPlanItem<any>>;
|
|
94
104
|
onlyDirectCurrency?: boolean;
|
|
95
|
-
|
|
96
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Interval (e.g: P7D)
|
|
107
|
+
*
|
|
108
|
+
* Needs firstChargeAuthorizationOnly to be true to be used
|
|
109
|
+
*/
|
|
110
|
+
firstChargeCaptureAfter?: string;
|
|
111
|
+
firstChargeAuthorizationOnly?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export type PaymentUpdateParams = Partial<ScheduledPaymentItem>;
|
|
97
114
|
export interface ScheduleSettings {
|
|
98
115
|
startOn?: string;
|
|
99
116
|
zoneId: string;
|
|
@@ -123,7 +140,7 @@ export interface SubscriptionItem<T extends Metadata = Metadata> {
|
|
|
123
140
|
descriptor: string;
|
|
124
141
|
onlyDirectCurrency: boolean;
|
|
125
142
|
}
|
|
126
|
-
export
|
|
143
|
+
export type SubscriptionListItem = WithStoreMerchantName<SubscriptionItem>;
|
|
127
144
|
interface SubscriptionSimulationBaseParams<InstallmentPlanData extends InstallmentBaseParams> {
|
|
128
145
|
installmentPlan?: InstallmentPlanData;
|
|
129
146
|
amount: number;
|
|
@@ -132,7 +149,7 @@ interface SubscriptionSimulationBaseParams<InstallmentPlanData extends Installme
|
|
|
132
149
|
paymentType: PaymentType;
|
|
133
150
|
period: SubscriptionPeriod;
|
|
134
151
|
}
|
|
135
|
-
export
|
|
152
|
+
export type SimulationInstallmentPayment = {
|
|
136
153
|
amount: number;
|
|
137
154
|
currency: string;
|
|
138
155
|
dueDate: string;
|
|
@@ -146,22 +163,22 @@ export interface SubscriptionSimulationLegacyParams<InstallmentPlanData extends
|
|
|
146
163
|
export interface SubscriptionSimulationNewParams<InstallmentPlanData extends InstallmentBaseParams> extends SubscriptionSimulationBaseParams<InstallmentPlanData> {
|
|
147
164
|
scheduleSettings: ScheduleSettings;
|
|
148
165
|
}
|
|
149
|
-
export
|
|
166
|
+
export type SubscriptionSimulationParams<InstallmentPlanData extends InstallmentBaseParams> = SubscriptionSimulationLegacyParams<InstallmentPlanData> | SubscriptionSimulationNewParams<InstallmentPlanData>;
|
|
150
167
|
export interface CycleAmount {
|
|
151
168
|
cycleDate: string;
|
|
152
169
|
amount: number;
|
|
153
170
|
}
|
|
154
|
-
export
|
|
171
|
+
export type SubscriptionSimulationLegacyItem<InstallmentPlanData extends InstallmentBaseParams> = Required<SubscriptionSimulationLegacyParams<InstallmentPlanData>> & {
|
|
155
172
|
cycles: CycleAmount[];
|
|
156
173
|
};
|
|
157
174
|
export interface SubscriptionSimulationNewItem {
|
|
158
175
|
[index: string]: Omit<ScheduledPaymentItem, "id" | "createdOn">;
|
|
159
176
|
}
|
|
160
|
-
export
|
|
161
|
-
export
|
|
162
|
-
export
|
|
163
|
-
export
|
|
164
|
-
export
|
|
177
|
+
export type SubscriptionSimulationItem<InstallmentPlanData extends InstallmentBaseParams> = SubscriptionSimulationLegacyItem<InstallmentPlanData> | SubscriptionSimulationNewItem;
|
|
178
|
+
export type ResponseSubscription = SubscriptionItem;
|
|
179
|
+
export type ResponseSubscriptions = CRUDItemsResponse<SubscriptionListItem>;
|
|
180
|
+
export type ResponsePayment = ScheduledPaymentItem;
|
|
181
|
+
export type ResponsePayments = CRUDItemsResponse<SchedulePaymentListItem>;
|
|
165
182
|
export declare class ScheduledPayments extends CRUDResource {
|
|
166
183
|
static routeBase: string;
|
|
167
184
|
private _list?;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Subscriptions.js","sourceRoot":"","sources":["../../../src/resources/Subscriptions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAoG;AAGpG,sEAAgE;AAEhE,6CAAuC;AAEvC,uDAA0F;AAK1F,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;IAC7B,2CAAqB,CAAA;AACzB,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,+CAAyB,CAAA;IACzB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;IACrB,iDAA2B,CAAA;IAC3B,6CAAuB,CAAA;IACvB,+CAAyB,CAAA;AAC7B,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,gDAA6B,CAAA;IAC7B,4DAAyC,CAAA;AAC7C,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;
|
|
1
|
+
{"version":3,"file":"Subscriptions.js","sourceRoot":"","sources":["../../../src/resources/Subscriptions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAoG;AAGpG,sEAAgE;AAEhE,6CAAuC;AAEvC,uDAA0F;AAK1F,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,qCAAe,CAAA;IACf,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,6CAAuB,CAAA;IACvB,6CAAuB,CAAA;IACvB,mDAA6B,CAAA;IAC7B,2CAAqB,CAAA;AACzB,CAAC,EATW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAS7B;AAED,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC1B,+CAAyB,CAAA;IACzB,yCAAmB,CAAA;IACnB,6CAAuB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,EAAE,EAAE,EAAE,CACzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAC3E;YACP,CAAC,CAAC,IAAI,CAAC;QAEX,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IACpC,CAAC;IAGD,UAAU,CACN,IAAiE,EACjE,IAAiB,EACjB,OAAgB;QAEhB,IAAI,CAAC,WAAW;YACZ,IAAI,CAAC,WAAW;gBAChB,IAAI,CAAC,WAAW,CAAC,uBAAU,CAAC,IAAI,EAAE,gDAAgD,EAAE;oBAChF,cAAc,EAAE,aAAa,CAAC,wBAAwB;iBACzD,CAAC,CAAC;QACP,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IACrD,CAAC;;AAvHL,sCAwHC;AAvHU,4BAAc,GAAa,CAAC,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAClF,sCAAwB,GAAa,CAAC,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAE9F,uBAAS,GAAG,gCAAgC,CAAC"}
|
|
@@ -51,8 +51,8 @@ export interface TemporaryTokenAliasQrOptions {
|
|
|
51
51
|
logo?: TemporaryTokenAliasQrLogoType;
|
|
52
52
|
color?: string;
|
|
53
53
|
}
|
|
54
|
-
export
|
|
55
|
-
export
|
|
54
|
+
export type ResponseTemporaryTokenAlias = TemporaryTokenAliasItem;
|
|
55
|
+
export type MethodGet<P, R> = (storeId: string, id: string, data?: SendData<P>) => Promise<R>;
|
|
56
56
|
export declare class TemporaryTokenAlias extends CRUDResource {
|
|
57
57
|
static requiredParams: string[];
|
|
58
58
|
static routeBase: string;
|
|
@@ -89,7 +89,15 @@ export interface TransactionTokenConvenienceData {
|
|
|
89
89
|
customerName: string;
|
|
90
90
|
convenienceStore: ConvenienceStore;
|
|
91
91
|
phoneNumber: PhoneNumber;
|
|
92
|
+
/**
|
|
93
|
+
* Time with Time Zone.
|
|
94
|
+
* HH:mm:ss.SSSZ (e.g: 09:00:00.000+09:00)
|
|
95
|
+
*/
|
|
92
96
|
expirationTimeShift?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Interval (e.g P7D)
|
|
99
|
+
*/
|
|
100
|
+
expirationPeriod?: string;
|
|
93
101
|
}
|
|
94
102
|
export interface TransactionTokenOnlineData {
|
|
95
103
|
brand: OnlineBrand;
|
|
@@ -102,7 +110,7 @@ export interface TransactionTokenPaidyData {
|
|
|
102
110
|
phoneNumber?: PhoneNumber;
|
|
103
111
|
shippingAddress: TransactionTokenPaidyBilling;
|
|
104
112
|
}
|
|
105
|
-
export
|
|
113
|
+
export type TransactionTokenBankTransferData = {
|
|
106
114
|
accountHolderName: string | null;
|
|
107
115
|
accountId: string | null;
|
|
108
116
|
accountNumber: string | null;
|
|
@@ -112,9 +120,17 @@ export declare type TransactionTokenBankTransferData = {
|
|
|
112
120
|
branchName: string | null;
|
|
113
121
|
brand: BankTransferBrand;
|
|
114
122
|
};
|
|
115
|
-
export
|
|
123
|
+
export type TransactionTokenBankTransferCreateData = {
|
|
116
124
|
brand: BankTransferBrand;
|
|
125
|
+
/**
|
|
126
|
+
* Time with Time Zone.
|
|
127
|
+
* HH:mm:ss.SSSZ (e.g: 09:00:00.000+09:00)
|
|
128
|
+
*/
|
|
117
129
|
expirationTimeShift?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Interval (e.g P7D)
|
|
132
|
+
*/
|
|
133
|
+
expirationPeriod?: string;
|
|
118
134
|
};
|
|
119
135
|
export interface TransactionTokenCreateParams<T extends Metadata = Metadata> {
|
|
120
136
|
paymentType: PaymentType;
|
|
@@ -217,9 +233,9 @@ export interface TransactionTokenItem<T extends Metadata = Metadata> {
|
|
|
217
233
|
};
|
|
218
234
|
metadata?: T;
|
|
219
235
|
}
|
|
220
|
-
export
|
|
221
|
-
export
|
|
222
|
-
export
|
|
236
|
+
export type TransactionTokenListItem = WithStoreMerchantName<TransactionTokenItem>;
|
|
237
|
+
export type ResponseTransactionToken = TransactionTokenItem;
|
|
238
|
+
export type ResponseTransactionTokens = CRUDItemsResponse<TransactionTokenListItem>;
|
|
223
239
|
export declare class TransactionTokens extends CRUDResource {
|
|
224
240
|
static requiredParams: string[];
|
|
225
241
|
static routeBase: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionTokens.js","sourceRoot":"","sources":["../../../src/resources/TransactionTokens.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAerE,uDAA0F;AAG1F,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;AACzB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAED,IAAY,WASX;AATD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;IACvB,8BAAe,CAAA;IACf,0CAA2B,CAAA;IAC3B,gCAAiB,CAAA;IACjB,8CAA+B,CAAA;AACnC,CAAC,EATW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAStB;AAED,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IACxB,iDAA6B,CAAA;IAC7B,+CAA2B,CAAA;IAC3B,qCAAiB,CAAA;IACjB,2CAAuB,CAAA;IACvB,6CAAyB,CAAA;IACzB,yCAAqB,CAAA;IACrB,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,qDAAiC,CAAA;IACjC,iEAA6C,CAAA;AACjD,CAAC,EAXW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAW3B;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,6CAAqB,CAAA;IACrB,qDAA6B,CAAA;IAC7B,+CAAuB,CAAA;AAC3B,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,wCAAa,CAAA;IACb,8CAAmB,CAAA;IACnB,gDAAqB,CAAA;AACzB,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC;AAED,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC3B,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;IACnB,4CAAqB,CAAA;AACzB,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAED,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IACxB,yCAAqB,CAAA;IACrB,uDAAmC,CAAA;IACnC,2CAAuB,CAAA;IACvB,+BAAW,CAAA;IACX,+BAAW,CAAA;IACX,+BAAW,CAAA;AACf,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B;AAED,IAAY,MAGX;AAHD,WAAY,MAAM;IACd,qBAAW,CAAA;IACX,6BAAmB,CAAA;AACvB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB;
|
|
1
|
+
{"version":3,"file":"TransactionTokens.js","sourceRoot":"","sources":["../../../src/resources/TransactionTokens.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,kDAAqE;AAerE,uDAA0F;AAG1F,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;AACzB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAED,IAAY,WASX;AATD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,kCAAmB,CAAA;IACnB,kCAAmB,CAAA;IACnB,sCAAuB,CAA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