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
|
@@ -34,7 +34,7 @@ export interface TransferItem<T extends Metadata = Metadata> {
|
|
|
34
34
|
from: string;
|
|
35
35
|
to: string;
|
|
36
36
|
}
|
|
37
|
-
export
|
|
37
|
+
export type TransferListItem = WithMerchantName<TransferItem>;
|
|
38
38
|
export interface TransferStatusChangeItem {
|
|
39
39
|
id: string;
|
|
40
40
|
merchantId: string;
|
|
@@ -44,9 +44,9 @@ export interface TransferStatusChangeItem {
|
|
|
44
44
|
reason?: string;
|
|
45
45
|
createdOn: string;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
47
|
+
export type ResponseTransfer = TransferItem;
|
|
48
|
+
export type ResponseTransfers = CRUDItemsResponse<TransferListItem>;
|
|
49
|
+
export type ResponseTransferStatusChanges = CRUDItemsResponse<TransferStatusChangeItem>;
|
|
50
50
|
export declare class Transfers extends CRUDResource {
|
|
51
51
|
static routeBase: string;
|
|
52
52
|
private _list?;
|
|
@@ -11,7 +11,7 @@ export interface BaseVerification<T> {
|
|
|
11
11
|
companyDescription: string;
|
|
12
12
|
companyContactInfo: T;
|
|
13
13
|
businessType: string;
|
|
14
|
-
systemManagerName
|
|
14
|
+
systemManagerName?: string;
|
|
15
15
|
systemManagerNumber?: PhoneNumber;
|
|
16
16
|
systemManagerEmail?: string;
|
|
17
17
|
customerContactEmail?: string;
|
|
@@ -20,13 +20,13 @@ export interface BaseVerification<T> {
|
|
|
20
20
|
recurringTokenRequestReason?: string;
|
|
21
21
|
allowEmptyCvv?: boolean;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type VerificationCreateParams = BaseVerification<ContactInfo>;
|
|
24
|
+
export type VerificationUpdateParams = Partial<BaseVerification<ContactInfoPartial>>;
|
|
25
25
|
export interface VerificationItem extends BaseVerification<ContactInfo> {
|
|
26
26
|
id: string;
|
|
27
27
|
createdOn: string;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type ResponseVerification = VerificationItem;
|
|
30
30
|
export declare class Verification extends CRUDResource {
|
|
31
31
|
static requiredParams: string[];
|
|
32
32
|
static routeBase: string;
|
|
@@ -22,7 +22,7 @@ export declare enum WebHookTrigger {
|
|
|
22
22
|
TRANSFER_UPDATED = "transfer_updated",
|
|
23
23
|
TRANSFER_FINALIZED = "transfer_finalized"
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export type WebHooksListParams = CRUDPaginationParams;
|
|
26
26
|
export interface WebHookCreateParams<Trigger = WebHookTrigger> {
|
|
27
27
|
triggers: Trigger[];
|
|
28
28
|
url: string;
|
|
@@ -42,9 +42,9 @@ export interface WebHookItem<Trigger = WebHookTrigger> {
|
|
|
42
42
|
authToken?: string;
|
|
43
43
|
createdOn: string;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
45
|
+
export type WebHookListItem<TriggerType> = WithStoreMerchantName<WebHookItem<TriggerType>>;
|
|
46
|
+
export type ResponseWebHook<TriggerType> = WebHookItem<TriggerType>;
|
|
47
|
+
export type ResponseWebHooks<TriggerType> = CRUDItemsResponse<WebHookListItem<TriggerType>>;
|
|
48
48
|
export declare class WebHooks<TriggerType = WebHookTrigger> extends CRUDResource {
|
|
49
49
|
static requiredParams: string[];
|
|
50
50
|
static routeBase: string;
|
|
@@ -24,7 +24,7 @@ export interface CardBrandPercentFeesItem {
|
|
|
24
24
|
unionPay?: number;
|
|
25
25
|
visa?: number;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export type CardConfigurationMonthlyLimit = AmountWithCurrency & {
|
|
28
28
|
duration: string;
|
|
29
29
|
};
|
|
30
30
|
export interface CardConfigurationItem extends PaymentTypeConfiguration {
|
|
@@ -43,20 +43,21 @@ export interface CardConfigurationItem extends PaymentTypeConfiguration {
|
|
|
43
43
|
export interface QRScanConfigurationItem extends PaymentTypeConfiguration {
|
|
44
44
|
forbiddenQrScanGateways: string[];
|
|
45
45
|
}
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
46
|
+
export type QRMerchantConfigurationItem = PaymentTypeConfiguration;
|
|
47
|
+
export type ConvenienceConfigurationItem = PaymentTypeConfiguration;
|
|
48
|
+
export type OnlineConfigurationItem = PaymentTypeConfiguration;
|
|
49
|
+
export type PaidyConfigurationItem = PaymentTypeConfiguration;
|
|
50
|
+
export type BankTransferConfiguration = PaymentTypeConfiguration & {
|
|
51
51
|
matchAmount: TransferMatchAmount;
|
|
52
52
|
expiration: string;
|
|
53
53
|
/**
|
|
54
|
-
*Ensure that the charge expires when the merchant "expects" it to expire.
|
|
54
|
+
* Ensure that the charge expires when the merchant "expects" it to expire.
|
|
55
55
|
*/
|
|
56
56
|
expirationTimeShift: {
|
|
57
57
|
enabled: boolean;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Time with Time Zone.
|
|
60
|
+
* HH:mm:ss.SSSZ (e.g: 09:00:00.000+09:00)
|
|
60
61
|
*/
|
|
61
62
|
value: string;
|
|
62
63
|
};
|
|
@@ -164,7 +165,7 @@ export interface DescriptorProvidedConfiguration {
|
|
|
164
165
|
name: string;
|
|
165
166
|
phoneNumber: string;
|
|
166
167
|
}
|
|
167
|
-
export
|
|
168
|
+
export type CheckoutConfiguration = {
|
|
168
169
|
ecEmail: {
|
|
169
170
|
enabled?: boolean;
|
|
170
171
|
};
|
|
@@ -216,5 +217,5 @@ export interface ConfigurationParams {
|
|
|
216
217
|
subscriptionConfiguration?: Partial<SubscriptionsConfiguration>;
|
|
217
218
|
securityConfiguration?: Partial<SecurityConfiguration>;
|
|
218
219
|
}
|
|
219
|
-
export
|
|
220
|
-
export
|
|
220
|
+
export type ConfigurationCreateParams = ConfigurationParams;
|
|
221
|
+
export type ConfigurationUpdateParams = ConfigurationParams;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BankTransferConfiguration, CardBrandPercentFeesItem, InstallmentsConfiguration, SubscriptionsConfiguration, UserTransactionsConfiguration } from "./Configuration.js";
|
|
2
2
|
import { TransferScheduleItem } from "./TransferSchedule.js";
|
|
3
3
|
import { AmountWithCurrency, InvoiceChargeFee, WithCreatedOn } from "./types.js";
|
|
4
|
-
|
|
4
|
+
type CheckoutConfiguration = {
|
|
5
5
|
ecEmail: {
|
|
6
6
|
enabled: boolean;
|
|
7
7
|
};
|
|
@@ -9,7 +9,7 @@ declare type CheckoutConfiguration = {
|
|
|
9
9
|
enabled: boolean;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type ConvenienceConfiguration = {
|
|
13
13
|
/**
|
|
14
14
|
* Period (e.g.: P1DT9H)
|
|
15
15
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type WithOptionalDescriptor<Data> = Data | Omit<Data, "descriptor">;
|
|
2
2
|
export declare const ignoreDescriptor: <Data extends {
|
|
3
3
|
descriptor?: string;
|
|
4
4
|
}>(execute: (data: WithOptionalDescriptor<Data>) => Promise<WithOptionalDescriptor<Data>>, data: Data) => Promise<WithOptionalDescriptor<Data>>;
|
|
@@ -27,10 +27,10 @@ export interface InvoiceChargeFee {
|
|
|
27
27
|
chargeVolume: number;
|
|
28
28
|
chargeInvoiceFee: number;
|
|
29
29
|
}
|
|
30
|
-
export
|
|
30
|
+
export type WithMerchantName<Item> = Item & {
|
|
31
31
|
merchantName: string;
|
|
32
32
|
};
|
|
33
|
-
export
|
|
33
|
+
export type WithStoreMerchantName<Item> = Item & {
|
|
34
34
|
merchantName: string;
|
|
35
35
|
storeName: string;
|
|
36
36
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @internal
|
|
3
3
|
* @module Utils
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type Transformer = (...args: any[]) => string;
|
|
6
6
|
export declare const toCamelCase: (key: string) => string;
|
|
7
7
|
export declare const toSnakeCase: (key: string) => string;
|
|
8
8
|
export declare const isBlob: (data: unknown) => data is Blob;
|
|
@@ -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;
|