@delopay/sdk 0.2.0 → 0.3.0
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/index.cjs +15 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +92 -13
- package/dist/index.d.ts +92 -13
- package/dist/index.js +15 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -71,14 +71,18 @@ interface CardDetail {
|
|
|
71
71
|
interface CardDetailFromLocker {
|
|
72
72
|
scheme?: string | null;
|
|
73
73
|
issuer_country?: string | null;
|
|
74
|
+
issuer_country_code?: string | null;
|
|
74
75
|
last4_digits?: string | null;
|
|
75
76
|
expiry_month?: string | null;
|
|
76
77
|
expiry_year?: string | null;
|
|
78
|
+
card_token?: string | null;
|
|
77
79
|
card_holder_name?: string | null;
|
|
78
80
|
card_fingerprint?: string | null;
|
|
79
81
|
nick_name?: string | null;
|
|
80
82
|
card_network?: string | null;
|
|
81
83
|
card_isin?: string | null;
|
|
84
|
+
card_issuer?: string | null;
|
|
85
|
+
card_type?: string | null;
|
|
82
86
|
card_extended_bin?: string | null;
|
|
83
87
|
card_exp_month?: string | null;
|
|
84
88
|
card_exp_year?: string | null;
|
|
@@ -374,6 +378,8 @@ interface RefundResponse {
|
|
|
374
378
|
currency: string;
|
|
375
379
|
/** Current status of the refund. */
|
|
376
380
|
status: RefundStatus;
|
|
381
|
+
/** Connector that processed the refund. */
|
|
382
|
+
connector: string;
|
|
377
383
|
/** Reason provided at creation. */
|
|
378
384
|
reason?: string | null;
|
|
379
385
|
/** Arbitrary key-value metadata. */
|
|
@@ -390,12 +396,18 @@ interface RefundResponse {
|
|
|
390
396
|
created_at?: string | null;
|
|
391
397
|
/** ISO 8601 timestamp of the last status update. */
|
|
392
398
|
updated_at?: string | null;
|
|
393
|
-
/** Connector that processed the refund. */
|
|
394
|
-
connector?: string | null;
|
|
395
399
|
/** Shop (business profile) ID the refund was processed under. */
|
|
396
400
|
profile_id?: string | null;
|
|
397
401
|
/** Connector account ID used. */
|
|
398
402
|
merchant_connector_id?: string | null;
|
|
403
|
+
/** Connector-assigned refund identifier. */
|
|
404
|
+
connector_refund_id?: string | null;
|
|
405
|
+
/** Error code received from the issuer for failed refunds. */
|
|
406
|
+
issuer_error_code?: string | null;
|
|
407
|
+
/** Error message received from the issuer for failed refunds. */
|
|
408
|
+
issuer_error_message?: string | null;
|
|
409
|
+
/** Raw connector response payload (debugging). */
|
|
410
|
+
raw_connector_response?: string | null;
|
|
399
411
|
}
|
|
400
412
|
interface RefundListParams {
|
|
401
413
|
payment_id?: string | null;
|
|
@@ -467,6 +479,10 @@ interface CustomerResponse {
|
|
|
467
479
|
metadata?: Record<string, unknown> | null;
|
|
468
480
|
/** ID of the customer's default saved payment method, if any. */
|
|
469
481
|
default_payment_method_id?: string | null;
|
|
482
|
+
/** VAT or tax registration number for B2B invoicing. */
|
|
483
|
+
tax_registration_id?: string | null;
|
|
484
|
+
/** Structured identity / KYC documents attached to the customer. */
|
|
485
|
+
document_details?: Record<string, unknown> | null;
|
|
470
486
|
}
|
|
471
487
|
interface CustomerListParams {
|
|
472
488
|
limit?: number | null;
|
|
@@ -1015,14 +1031,16 @@ interface SignUpRequest {
|
|
|
1015
1031
|
email: string;
|
|
1016
1032
|
password: string;
|
|
1017
1033
|
}
|
|
1018
|
-
/** Full signup with merchant details */
|
|
1019
|
-
interface
|
|
1034
|
+
/** Full signup with merchant details — creates a merchant admin user and the merchant account atomically. */
|
|
1035
|
+
interface SignUpWithMerchantIdRequest {
|
|
1020
1036
|
name: string;
|
|
1021
1037
|
email: string;
|
|
1022
1038
|
password: string;
|
|
1023
1039
|
company_name: string;
|
|
1024
1040
|
organization_type?: string | null;
|
|
1025
1041
|
}
|
|
1042
|
+
/** @deprecated Use `SignUpWithMerchantIdRequest`. */
|
|
1043
|
+
type SignUpWithMerchantRequest = SignUpWithMerchantIdRequest;
|
|
1026
1044
|
interface SignInRequest {
|
|
1027
1045
|
email: string;
|
|
1028
1046
|
password: string;
|
|
@@ -1103,6 +1121,57 @@ interface AdminSignInRequest {
|
|
|
1103
1121
|
email: string;
|
|
1104
1122
|
password: string;
|
|
1105
1123
|
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Response returned by admin signup/signin endpoints.
|
|
1126
|
+
*
|
|
1127
|
+
* The admin flow is passwordless-after-signup: the endpoint triggers an
|
|
1128
|
+
* email (confirmation or sign-in link) and `is_email_sent` indicates whether
|
|
1129
|
+
* delivery was attempted successfully.
|
|
1130
|
+
*/
|
|
1131
|
+
interface AuthorizeResponse {
|
|
1132
|
+
is_email_sent: boolean;
|
|
1133
|
+
}
|
|
1134
|
+
/** Create a new internal DeloPay admin user. Requires the server admin API key. */
|
|
1135
|
+
interface CreateInternalUserRequest {
|
|
1136
|
+
name: string;
|
|
1137
|
+
email: string;
|
|
1138
|
+
password: string;
|
|
1139
|
+
/** Predefined internal role id (e.g. `internal_view_only`). Cannot be `internal_admin`. */
|
|
1140
|
+
role_id: string;
|
|
1141
|
+
}
|
|
1142
|
+
/** Create a new tenant-level admin user. Requires the server admin API key. */
|
|
1143
|
+
interface CreateTenantUserRequest {
|
|
1144
|
+
name: string;
|
|
1145
|
+
email: string;
|
|
1146
|
+
password: string;
|
|
1147
|
+
}
|
|
1148
|
+
/** Bootstrap a new merchant: creates user, merchant account, project, profile, and API keys in one call. */
|
|
1149
|
+
interface OnboardMerchantRequest {
|
|
1150
|
+
email: string;
|
|
1151
|
+
name: string;
|
|
1152
|
+
password: string;
|
|
1153
|
+
company_name: string;
|
|
1154
|
+
}
|
|
1155
|
+
/** All identifiers and keys produced by the onboard flow. */
|
|
1156
|
+
interface OnboardMerchantResponse {
|
|
1157
|
+
merchant_id: string;
|
|
1158
|
+
user_id: string;
|
|
1159
|
+
user_email: string;
|
|
1160
|
+
project_id: string;
|
|
1161
|
+
profile_id: string;
|
|
1162
|
+
/** Secret API key (sk_…). Show once; store securely. */
|
|
1163
|
+
api_key: string;
|
|
1164
|
+
/** Publishable key (pk_…) for client-side SDKs. */
|
|
1165
|
+
publishable_key: string;
|
|
1166
|
+
}
|
|
1167
|
+
/** Toggle public signup on or off at runtime. */
|
|
1168
|
+
interface SignupToggleRequest {
|
|
1169
|
+
enabled: boolean;
|
|
1170
|
+
}
|
|
1171
|
+
/** Current public-signup status. */
|
|
1172
|
+
interface SignupToggleResponse {
|
|
1173
|
+
signup_enabled: boolean;
|
|
1174
|
+
}
|
|
1106
1175
|
interface AdminCustomerListParams {
|
|
1107
1176
|
search?: string | null;
|
|
1108
1177
|
is_active?: boolean | null;
|
|
@@ -1643,14 +1712,24 @@ declare class Admin {
|
|
|
1643
1712
|
private readonly request;
|
|
1644
1713
|
constructor(request: RequestFn);
|
|
1645
1714
|
signIn(params: AdminSignInRequest): Promise<AuthResponse>;
|
|
1646
|
-
createInternalUser(params:
|
|
1647
|
-
createTenant(params:
|
|
1648
|
-
/**
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1715
|
+
createInternalUser(params: CreateInternalUserRequest): Promise<AuthorizeResponse>;
|
|
1716
|
+
createTenant(params: CreateTenantUserRequest): Promise<AuthorizeResponse>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Create a new merchant admin user and merchant account atomically.
|
|
1719
|
+
*
|
|
1720
|
+
* This is the correct endpoint for bootstrapping the first admin user in a
|
|
1721
|
+
* fresh deployment — `internal_signup`/`tenant_signup` both require
|
|
1722
|
+
* pre-existing merchant records that don't exist on a clean database.
|
|
1723
|
+
*
|
|
1724
|
+
* `POST /admin/signup_with_merchant_id`
|
|
1725
|
+
*/
|
|
1726
|
+
signupWithMerchantId(params: SignUpWithMerchantIdRequest): Promise<AuthorizeResponse>;
|
|
1727
|
+
/** Toggle public signup on/off. `POST /admin/settings/signup` */
|
|
1728
|
+
setSignupSettings(params: SignupToggleRequest): Promise<SignupToggleResponse>;
|
|
1729
|
+
/** Read current public-signup status. `GET /admin/settings/signup` */
|
|
1730
|
+
getSignupSettings(): Promise<SignupToggleResponse>;
|
|
1731
|
+
/** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
|
|
1732
|
+
onboardMerchant(params: OnboardMerchantRequest): Promise<OnboardMerchantResponse>;
|
|
1654
1733
|
}
|
|
1655
1734
|
|
|
1656
1735
|
declare class AdminPortal {
|
|
@@ -3450,4 +3529,4 @@ declare const Webhooks: {
|
|
|
3450
3529
|
verify(rawBody: string, signatureHeader: string, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
3451
3530
|
};
|
|
3452
3531
|
|
|
3453
|
-
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminSignInRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, Cache, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, Cards, type ChangePasswordRequest, Configs, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerSummary, type CustomerUpdateRequest, type CustomerUser, type DashboardMetadataResponse, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type GatewayConnectRequest, type GatewayResponse, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentStat, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformAnalyticsResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantRequest, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|
|
3532
|
+
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminSignInRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AuthorizeResponse, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, Cache, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, Cards, type ChangePasswordRequest, Configs, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerSummary, type CustomerUpdateRequest, type CustomerUser, type DashboardMetadataResponse, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type GatewayConnectRequest, type GatewayResponse, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentStat, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformAnalyticsResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SignupToggleRequest, type SignupToggleResponse, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|
package/dist/index.d.ts
CHANGED
|
@@ -71,14 +71,18 @@ interface CardDetail {
|
|
|
71
71
|
interface CardDetailFromLocker {
|
|
72
72
|
scheme?: string | null;
|
|
73
73
|
issuer_country?: string | null;
|
|
74
|
+
issuer_country_code?: string | null;
|
|
74
75
|
last4_digits?: string | null;
|
|
75
76
|
expiry_month?: string | null;
|
|
76
77
|
expiry_year?: string | null;
|
|
78
|
+
card_token?: string | null;
|
|
77
79
|
card_holder_name?: string | null;
|
|
78
80
|
card_fingerprint?: string | null;
|
|
79
81
|
nick_name?: string | null;
|
|
80
82
|
card_network?: string | null;
|
|
81
83
|
card_isin?: string | null;
|
|
84
|
+
card_issuer?: string | null;
|
|
85
|
+
card_type?: string | null;
|
|
82
86
|
card_extended_bin?: string | null;
|
|
83
87
|
card_exp_month?: string | null;
|
|
84
88
|
card_exp_year?: string | null;
|
|
@@ -374,6 +378,8 @@ interface RefundResponse {
|
|
|
374
378
|
currency: string;
|
|
375
379
|
/** Current status of the refund. */
|
|
376
380
|
status: RefundStatus;
|
|
381
|
+
/** Connector that processed the refund. */
|
|
382
|
+
connector: string;
|
|
377
383
|
/** Reason provided at creation. */
|
|
378
384
|
reason?: string | null;
|
|
379
385
|
/** Arbitrary key-value metadata. */
|
|
@@ -390,12 +396,18 @@ interface RefundResponse {
|
|
|
390
396
|
created_at?: string | null;
|
|
391
397
|
/** ISO 8601 timestamp of the last status update. */
|
|
392
398
|
updated_at?: string | null;
|
|
393
|
-
/** Connector that processed the refund. */
|
|
394
|
-
connector?: string | null;
|
|
395
399
|
/** Shop (business profile) ID the refund was processed under. */
|
|
396
400
|
profile_id?: string | null;
|
|
397
401
|
/** Connector account ID used. */
|
|
398
402
|
merchant_connector_id?: string | null;
|
|
403
|
+
/** Connector-assigned refund identifier. */
|
|
404
|
+
connector_refund_id?: string | null;
|
|
405
|
+
/** Error code received from the issuer for failed refunds. */
|
|
406
|
+
issuer_error_code?: string | null;
|
|
407
|
+
/** Error message received from the issuer for failed refunds. */
|
|
408
|
+
issuer_error_message?: string | null;
|
|
409
|
+
/** Raw connector response payload (debugging). */
|
|
410
|
+
raw_connector_response?: string | null;
|
|
399
411
|
}
|
|
400
412
|
interface RefundListParams {
|
|
401
413
|
payment_id?: string | null;
|
|
@@ -467,6 +479,10 @@ interface CustomerResponse {
|
|
|
467
479
|
metadata?: Record<string, unknown> | null;
|
|
468
480
|
/** ID of the customer's default saved payment method, if any. */
|
|
469
481
|
default_payment_method_id?: string | null;
|
|
482
|
+
/** VAT or tax registration number for B2B invoicing. */
|
|
483
|
+
tax_registration_id?: string | null;
|
|
484
|
+
/** Structured identity / KYC documents attached to the customer. */
|
|
485
|
+
document_details?: Record<string, unknown> | null;
|
|
470
486
|
}
|
|
471
487
|
interface CustomerListParams {
|
|
472
488
|
limit?: number | null;
|
|
@@ -1015,14 +1031,16 @@ interface SignUpRequest {
|
|
|
1015
1031
|
email: string;
|
|
1016
1032
|
password: string;
|
|
1017
1033
|
}
|
|
1018
|
-
/** Full signup with merchant details */
|
|
1019
|
-
interface
|
|
1034
|
+
/** Full signup with merchant details — creates a merchant admin user and the merchant account atomically. */
|
|
1035
|
+
interface SignUpWithMerchantIdRequest {
|
|
1020
1036
|
name: string;
|
|
1021
1037
|
email: string;
|
|
1022
1038
|
password: string;
|
|
1023
1039
|
company_name: string;
|
|
1024
1040
|
organization_type?: string | null;
|
|
1025
1041
|
}
|
|
1042
|
+
/** @deprecated Use `SignUpWithMerchantIdRequest`. */
|
|
1043
|
+
type SignUpWithMerchantRequest = SignUpWithMerchantIdRequest;
|
|
1026
1044
|
interface SignInRequest {
|
|
1027
1045
|
email: string;
|
|
1028
1046
|
password: string;
|
|
@@ -1103,6 +1121,57 @@ interface AdminSignInRequest {
|
|
|
1103
1121
|
email: string;
|
|
1104
1122
|
password: string;
|
|
1105
1123
|
}
|
|
1124
|
+
/**
|
|
1125
|
+
* Response returned by admin signup/signin endpoints.
|
|
1126
|
+
*
|
|
1127
|
+
* The admin flow is passwordless-after-signup: the endpoint triggers an
|
|
1128
|
+
* email (confirmation or sign-in link) and `is_email_sent` indicates whether
|
|
1129
|
+
* delivery was attempted successfully.
|
|
1130
|
+
*/
|
|
1131
|
+
interface AuthorizeResponse {
|
|
1132
|
+
is_email_sent: boolean;
|
|
1133
|
+
}
|
|
1134
|
+
/** Create a new internal DeloPay admin user. Requires the server admin API key. */
|
|
1135
|
+
interface CreateInternalUserRequest {
|
|
1136
|
+
name: string;
|
|
1137
|
+
email: string;
|
|
1138
|
+
password: string;
|
|
1139
|
+
/** Predefined internal role id (e.g. `internal_view_only`). Cannot be `internal_admin`. */
|
|
1140
|
+
role_id: string;
|
|
1141
|
+
}
|
|
1142
|
+
/** Create a new tenant-level admin user. Requires the server admin API key. */
|
|
1143
|
+
interface CreateTenantUserRequest {
|
|
1144
|
+
name: string;
|
|
1145
|
+
email: string;
|
|
1146
|
+
password: string;
|
|
1147
|
+
}
|
|
1148
|
+
/** Bootstrap a new merchant: creates user, merchant account, project, profile, and API keys in one call. */
|
|
1149
|
+
interface OnboardMerchantRequest {
|
|
1150
|
+
email: string;
|
|
1151
|
+
name: string;
|
|
1152
|
+
password: string;
|
|
1153
|
+
company_name: string;
|
|
1154
|
+
}
|
|
1155
|
+
/** All identifiers and keys produced by the onboard flow. */
|
|
1156
|
+
interface OnboardMerchantResponse {
|
|
1157
|
+
merchant_id: string;
|
|
1158
|
+
user_id: string;
|
|
1159
|
+
user_email: string;
|
|
1160
|
+
project_id: string;
|
|
1161
|
+
profile_id: string;
|
|
1162
|
+
/** Secret API key (sk_…). Show once; store securely. */
|
|
1163
|
+
api_key: string;
|
|
1164
|
+
/** Publishable key (pk_…) for client-side SDKs. */
|
|
1165
|
+
publishable_key: string;
|
|
1166
|
+
}
|
|
1167
|
+
/** Toggle public signup on or off at runtime. */
|
|
1168
|
+
interface SignupToggleRequest {
|
|
1169
|
+
enabled: boolean;
|
|
1170
|
+
}
|
|
1171
|
+
/** Current public-signup status. */
|
|
1172
|
+
interface SignupToggleResponse {
|
|
1173
|
+
signup_enabled: boolean;
|
|
1174
|
+
}
|
|
1106
1175
|
interface AdminCustomerListParams {
|
|
1107
1176
|
search?: string | null;
|
|
1108
1177
|
is_active?: boolean | null;
|
|
@@ -1643,14 +1712,24 @@ declare class Admin {
|
|
|
1643
1712
|
private readonly request;
|
|
1644
1713
|
constructor(request: RequestFn);
|
|
1645
1714
|
signIn(params: AdminSignInRequest): Promise<AuthResponse>;
|
|
1646
|
-
createInternalUser(params:
|
|
1647
|
-
createTenant(params:
|
|
1648
|
-
/**
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1715
|
+
createInternalUser(params: CreateInternalUserRequest): Promise<AuthorizeResponse>;
|
|
1716
|
+
createTenant(params: CreateTenantUserRequest): Promise<AuthorizeResponse>;
|
|
1717
|
+
/**
|
|
1718
|
+
* Create a new merchant admin user and merchant account atomically.
|
|
1719
|
+
*
|
|
1720
|
+
* This is the correct endpoint for bootstrapping the first admin user in a
|
|
1721
|
+
* fresh deployment — `internal_signup`/`tenant_signup` both require
|
|
1722
|
+
* pre-existing merchant records that don't exist on a clean database.
|
|
1723
|
+
*
|
|
1724
|
+
* `POST /admin/signup_with_merchant_id`
|
|
1725
|
+
*/
|
|
1726
|
+
signupWithMerchantId(params: SignUpWithMerchantIdRequest): Promise<AuthorizeResponse>;
|
|
1727
|
+
/** Toggle public signup on/off. `POST /admin/settings/signup` */
|
|
1728
|
+
setSignupSettings(params: SignupToggleRequest): Promise<SignupToggleResponse>;
|
|
1729
|
+
/** Read current public-signup status. `GET /admin/settings/signup` */
|
|
1730
|
+
getSignupSettings(): Promise<SignupToggleResponse>;
|
|
1731
|
+
/** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
|
|
1732
|
+
onboardMerchant(params: OnboardMerchantRequest): Promise<OnboardMerchantResponse>;
|
|
1654
1733
|
}
|
|
1655
1734
|
|
|
1656
1735
|
declare class AdminPortal {
|
|
@@ -3450,4 +3529,4 @@ declare const Webhooks: {
|
|
|
3450
3529
|
verify(rawBody: string, signatureHeader: string, secret: string, options?: VerifyOptions): Promise<WebhookEvent>;
|
|
3451
3530
|
};
|
|
3452
3531
|
|
|
3453
|
-
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminSignInRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, Cache, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, Cards, type ChangePasswordRequest, Configs, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerSummary, type CustomerUpdateRequest, type CustomerUser, type DashboardMetadataResponse, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type GatewayConnectRequest, type GatewayResponse, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentStat, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformAnalyticsResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantRequest, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|
|
3532
|
+
export { type Address, type AddressDetails, type AdminAdjustmentRequest, type AdminAdjustmentResponse, type AdminAnalyticsRequest, type AdminCustomerDetail, type AdminCustomerListParams, type AdminCustomerListResponse, type AdminSignInRequest, type AdminTransactionListParams, type AdminTransactionListResponse, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, Analytics, AnalyticsDashboard, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AuditLogListParams, type AuditLogListResponse, type AuditLogResponse, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AuthorizeResponse, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, Cache, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardIssuerCreateRequest, type CardIssuerListResponse, type CardIssuerResponse, type CardIssuerUpdateRequest, Cards, type ChangePasswordRequest, Configs, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorType, type ConnectorUpdateRequest, type CreateInternalUserRequest, type CreateTenantUserRequest, type Currency, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerSummary, type CustomerUpdateRequest, type CustomerUser, type DashboardMetadataResponse, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceRequest, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeType, Files, Forex, type ForgotPasswordRequest, type GatewayConnectRequest, type GatewayResponse, type GsmDecision, type GsmRuleCreateRequest, type GsmRuleResponse, type GsmRuleUpdateRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type LedgerEntry, type LedgerListParams, type LedgerResponse, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type OnboardMerchantRequest, type OnboardMerchantResponse, type OverviewStat, type OverviewStatsResponse, type PaymentAnalyticsRequest, type PaymentAnalyticsResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentStat, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformAnalyticsResponse, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileResponse, type ProfileUpdateRequest, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCreateRequest, type RegionResponse, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestFn, type RequestOptions, type ResetPasswordRequest, type RoutingConfigCreateRequest, type RoutingConfigResponse, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SignupToggleRequest, type SignupToggleResponse, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type SubscriptionCreateRequest, type SubscriptionListParams, type SubscriptionListResponse, type SubscriptionResponse, type SubscriptionUpdateRequest, Subscriptions, type SwitchMerchantRequest, type SwitchProfileRequest, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type UpdateUserDetailsRequest, type UserResponse, type VerifyOptions, type WebhookDeliveryAttempt, type WebhookEvent, Webhooks };
|
package/dist/index.js
CHANGED
|
@@ -39,16 +39,27 @@ var Admin = class {
|
|
|
39
39
|
async createTenant(params) {
|
|
40
40
|
return this.request("POST", "/admin/tenant_signup", { body: params });
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Create a new merchant admin user and merchant account atomically.
|
|
44
|
+
*
|
|
45
|
+
* This is the correct endpoint for bootstrapping the first admin user in a
|
|
46
|
+
* fresh deployment — `internal_signup`/`tenant_signup` both require
|
|
47
|
+
* pre-existing merchant records that don't exist on a clean database.
|
|
48
|
+
*
|
|
49
|
+
* `POST /admin/signup_with_merchant_id`
|
|
50
|
+
*/
|
|
51
|
+
async signupWithMerchantId(params) {
|
|
52
|
+
return this.request("POST", "/admin/signup_with_merchant_id", { body: params });
|
|
53
|
+
}
|
|
54
|
+
/** Toggle public signup on/off. `POST /admin/settings/signup` */
|
|
44
55
|
async setSignupSettings(params) {
|
|
45
56
|
return this.request("POST", "/admin/settings/signup", { body: params });
|
|
46
57
|
}
|
|
47
|
-
/**
|
|
58
|
+
/** Read current public-signup status. `GET /admin/settings/signup` */
|
|
48
59
|
async getSignupSettings() {
|
|
49
60
|
return this.request("GET", "/admin/settings/signup");
|
|
50
61
|
}
|
|
51
|
-
/**
|
|
62
|
+
/** Full merchant bootstrap — user + merchant + project + profile + keys. `POST /admin/onboard_merchant` */
|
|
52
63
|
async onboardMerchant(params) {
|
|
53
64
|
return this.request("POST", "/admin/onboard_merchant", { body: params });
|
|
54
65
|
}
|