hs-playlib 0.1.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/src/http_client.d.ts +5 -13
- package/dist/src/http_client.js +9 -13
- package/dist/src/index.d.ts +2 -180
- package/dist/src/index.js +6 -93
- package/dist/src/payments/_generated_connector_client_flows.d.ts +43 -9
- package/dist/src/payments/_generated_connector_client_flows.js +78 -16
- package/dist/src/payments/_generated_flows.js +44 -7
- package/dist/src/payments/_generated_uniffi_client_flows.d.ts +54 -12
- package/dist/src/payments/_generated_uniffi_client_flows.js +108 -24
- package/dist/src/payments/connector_client.d.ts +19 -15
- package/dist/src/payments/connector_client.js +64 -39
- package/dist/src/payments/generated/libconnector_service_ffi.dylib +0 -0
- package/dist/src/payments/generated/proto.d.ts +22069 -21901
- package/dist/src/payments/generated/proto.js +76914 -76263
- package/dist/src/payments/uniffi_client.d.ts +8 -2
- package/dist/src/payments/uniffi_client.js +32 -37
- package/package.json +2 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Dispatcher } from "undici";
|
|
2
|
-
import {
|
|
2
|
+
import { types } from "./payments/generated/proto";
|
|
3
3
|
/**
|
|
4
4
|
* Normalized HTTP Request structure for the Connector Service.
|
|
5
5
|
*/
|
|
@@ -7,7 +7,7 @@ export interface HttpRequest {
|
|
|
7
7
|
url: string;
|
|
8
8
|
method: string;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
|
-
body?:
|
|
10
|
+
body?: Uint8Array;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Normalized HTTP Response structure.
|
|
@@ -18,14 +18,6 @@ export interface HttpResponse {
|
|
|
18
18
|
body: Uint8Array;
|
|
19
19
|
latencyMs: number;
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
22
|
-
* HTTP client configuration options.
|
|
23
|
-
* Uses proto-generated IHttpOptions as the base, with extended caCert type
|
|
24
|
-
* for better developer experience (accepts string, Buffer, or Uint8Array).
|
|
25
|
-
*/
|
|
26
|
-
export type HttpOptions = Omit<ucs.v2.IHttpOptions, 'caCert'> & {
|
|
27
|
-
caCert?: string | Buffer | Uint8Array;
|
|
28
|
-
};
|
|
29
21
|
/**
|
|
30
22
|
* Specialized error class for HTTP failures in the Connector Service.
|
|
31
23
|
*/
|
|
@@ -40,13 +32,13 @@ export declare class ConnectorError extends Error {
|
|
|
40
32
|
/**
|
|
41
33
|
* Resolve proxy URL, honoring bypass rules.
|
|
42
34
|
*/
|
|
43
|
-
export declare function resolveProxyUrl(url: string, proxy?:
|
|
35
|
+
export declare function resolveProxyUrl(url: string, proxy?: types.IProxyOptions | null): string | null;
|
|
44
36
|
/**
|
|
45
37
|
* Creates a high-performance dispatcher with specialized fintech timeouts.
|
|
46
38
|
* (The instance-level connection pool)
|
|
47
39
|
*/
|
|
48
|
-
export declare function createDispatcher(config:
|
|
40
|
+
export declare function createDispatcher(config: types.IHttpConfig): Dispatcher;
|
|
49
41
|
/**
|
|
50
42
|
* Standardized network execution engine for Unified Connector Service.
|
|
51
43
|
*/
|
|
52
|
-
export declare function execute(request: HttpRequest, options?:
|
|
44
|
+
export declare function execute(request: HttpRequest, options?: types.IHttpConfig, dispatcher?: Dispatcher): Promise<HttpResponse>;
|
package/dist/src/http_client.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.execute = execute;
|
|
|
7
7
|
const undici_1 = require("undici");
|
|
8
8
|
// @ts-ignore
|
|
9
9
|
const proto_1 = require("./payments/generated/proto");
|
|
10
|
-
const Defaults = proto_1.
|
|
10
|
+
const Defaults = proto_1.types.HttpDefault;
|
|
11
11
|
/**
|
|
12
12
|
* Specialized error class for HTTP failures in the Connector Service.
|
|
13
13
|
*/
|
|
@@ -44,23 +44,19 @@ function resolveProxyUrl(url, proxy) {
|
|
|
44
44
|
* (The instance-level connection pool)
|
|
45
45
|
*/
|
|
46
46
|
function createDispatcher(config) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
caCert = new TextEncoder().encode(config.caCert);
|
|
47
|
+
let ca;
|
|
48
|
+
if (config.caCert) {
|
|
49
|
+
if (config.caCert.pem) {
|
|
50
|
+
ca = config.caCert.pem;
|
|
52
51
|
}
|
|
53
|
-
else if (
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
caCert = config.caCert;
|
|
52
|
+
else if (config.caCert.der) {
|
|
53
|
+
ca = config.caCert.der;
|
|
58
54
|
}
|
|
59
55
|
}
|
|
60
56
|
const dispatcherOptions = {
|
|
61
57
|
connect: {
|
|
62
58
|
timeout: config.connectTimeoutMs ?? Defaults.CONNECT_TIMEOUT_MS,
|
|
63
|
-
ca
|
|
59
|
+
ca,
|
|
64
60
|
},
|
|
65
61
|
headersTimeout: config.responseTimeoutMs ?? Defaults.RESPONSE_TIMEOUT_MS,
|
|
66
62
|
bodyTimeout: config.responseTimeoutMs ?? Defaults.RESPONSE_TIMEOUT_MS,
|
|
@@ -91,7 +87,7 @@ async function execute(request, options = {}, dispatcher // Pass the instance-ow
|
|
|
91
87
|
const response = await fetch(url, {
|
|
92
88
|
method: method.toUpperCase(),
|
|
93
89
|
headers: headers || {},
|
|
94
|
-
body: body
|
|
90
|
+
body: body ? Buffer.from(body) : undefined,
|
|
95
91
|
redirect: "manual",
|
|
96
92
|
signal: controller.signal,
|
|
97
93
|
// @ts-ignore
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,183 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export { ConnectorClient } from "./payments/_generated_connector_client_flows";
|
|
1
|
+
export * from "./payments/_generated_connector_client_flows";
|
|
3
2
|
export { UniffiClient } from "./payments/_generated_uniffi_client_flows";
|
|
4
3
|
export type { RustBuffer, RustCallStatus } from "./payments/uniffi_client";
|
|
5
4
|
export * from "./http_client";
|
|
6
|
-
export
|
|
7
|
-
PaymentServiceAuthorizeRequest: typeof ucs.v2.PaymentServiceAuthorizeRequest;
|
|
8
|
-
PaymentServiceAuthorizeResponse: typeof ucs.v2.PaymentServiceAuthorizeResponse;
|
|
9
|
-
PaymentServiceCaptureRequest: typeof ucs.v2.PaymentServiceCaptureRequest;
|
|
10
|
-
PaymentServiceCaptureResponse: typeof ucs.v2.PaymentServiceCaptureResponse;
|
|
11
|
-
PaymentServiceVoidRequest: typeof ucs.v2.PaymentServiceVoidRequest;
|
|
12
|
-
PaymentServiceVoidResponse: typeof ucs.v2.PaymentServiceVoidResponse;
|
|
13
|
-
PaymentServiceRefundRequest: typeof ucs.v2.PaymentServiceRefundRequest;
|
|
14
|
-
PaymentServiceReverseRequest: typeof ucs.v2.PaymentServiceReverseRequest;
|
|
15
|
-
PaymentServiceGetRequest: typeof ucs.v2.PaymentServiceGetRequest;
|
|
16
|
-
PaymentServiceGetResponse: typeof ucs.v2.PaymentServiceGetResponse;
|
|
17
|
-
PaymentServiceCreateOrderRequest: typeof ucs.v2.PaymentServiceCreateOrderRequest;
|
|
18
|
-
PaymentServiceCreateOrderResponse: typeof ucs.v2.PaymentServiceCreateOrderResponse;
|
|
19
|
-
PaymentServiceSetupRecurringRequest: typeof ucs.v2.PaymentServiceSetupRecurringRequest;
|
|
20
|
-
PaymentServiceSetupRecurringResponse: typeof ucs.v2.PaymentServiceSetupRecurringResponse;
|
|
21
|
-
PaymentServiceIncrementalAuthorizationRequest: typeof ucs.v2.PaymentServiceIncrementalAuthorizationRequest;
|
|
22
|
-
PaymentServiceIncrementalAuthorizationResponse: typeof ucs.v2.PaymentServiceIncrementalAuthorizationResponse;
|
|
23
|
-
PaymentServiceVerifyRedirectResponseRequest: typeof ucs.v2.PaymentServiceVerifyRedirectResponseRequest;
|
|
24
|
-
PaymentServiceVerifyRedirectResponseResponse: typeof ucs.v2.PaymentServiceVerifyRedirectResponseResponse;
|
|
25
|
-
PaymentServiceDisputeRequest: typeof ucs.v2.PaymentServiceDisputeRequest;
|
|
26
|
-
PaymentMethodAuthenticationServicePreAuthenticateRequest: typeof ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateRequest;
|
|
27
|
-
PaymentMethodAuthenticationServicePreAuthenticateResponse: typeof ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateResponse;
|
|
28
|
-
PaymentMethodAuthenticationServiceAuthenticateRequest: typeof ucs.v2.PaymentMethodAuthenticationServiceAuthenticateRequest;
|
|
29
|
-
PaymentMethodAuthenticationServiceAuthenticateResponse: typeof ucs.v2.PaymentMethodAuthenticationServiceAuthenticateResponse;
|
|
30
|
-
PaymentMethodServiceTokenizeRequest: typeof ucs.v2.PaymentMethodServiceTokenizeRequest;
|
|
31
|
-
PaymentMethodServiceTokenizeResponse: typeof ucs.v2.PaymentMethodServiceTokenizeResponse;
|
|
32
|
-
MerchantAuthenticationServiceCreateAccessTokenRequest: typeof ucs.v2.MerchantAuthenticationServiceCreateAccessTokenRequest;
|
|
33
|
-
MerchantAuthenticationServiceCreateAccessTokenResponse: typeof ucs.v2.MerchantAuthenticationServiceCreateAccessTokenResponse;
|
|
34
|
-
SecretString: typeof ucs.v2.SecretString;
|
|
35
|
-
AccessToken: typeof ucs.v2.AccessToken;
|
|
36
|
-
ConnectorState: typeof ucs.v2.ConnectorState;
|
|
37
|
-
Customer: typeof ucs.v2.Customer;
|
|
38
|
-
PaymentAddress: typeof ucs.v2.PaymentAddress;
|
|
39
|
-
Money: typeof ucs.v2.Money;
|
|
40
|
-
BrowserInformation: typeof ucs.v2.BrowserInformation;
|
|
41
|
-
CustomerAcceptance: typeof ucs.v2.CustomerAcceptance;
|
|
42
|
-
SessionToken: typeof ucs.v2.SessionToken;
|
|
43
|
-
ConnectorResponseData: typeof ucs.v2.ConnectorResponseData;
|
|
44
|
-
CardConnectorResponse: typeof ucs.v2.CardConnectorResponse;
|
|
45
|
-
ErrorInfo: typeof ucs.v2.ErrorInfo;
|
|
46
|
-
Currency: typeof ucs.v2.Currency;
|
|
47
|
-
CaptureMethod: typeof ucs.v2.CaptureMethod;
|
|
48
|
-
AuthenticationType: typeof ucs.v2.AuthenticationType;
|
|
49
|
-
PaymentMethodType: typeof ucs.v2.PaymentMethodType;
|
|
50
|
-
PaymentStatus: typeof ucs.v2.PaymentStatus;
|
|
51
|
-
RefundStatus: typeof ucs.v2.RefundStatus;
|
|
52
|
-
DisputeStatus: typeof ucs.v2.DisputeStatus;
|
|
53
|
-
MandateStatus: typeof ucs.v2.MandateStatus;
|
|
54
|
-
AuthorizationStatus: typeof ucs.v2.AuthorizationStatus;
|
|
55
|
-
OperationStatus: typeof ucs.v2.OperationStatus;
|
|
56
|
-
HttpMethod: typeof ucs.v2.HttpMethod;
|
|
57
|
-
FutureUsage: typeof ucs.v2.FutureUsage;
|
|
58
|
-
PaymentExperience: typeof ucs.v2.PaymentExperience;
|
|
59
|
-
PaymentChannel: typeof ucs.v2.PaymentChannel;
|
|
60
|
-
Connector: typeof ucs.v2.Connector;
|
|
61
|
-
ProductType: typeof ucs.v2.ProductType;
|
|
62
|
-
DisputeStage: typeof ucs.v2.DisputeStage;
|
|
63
|
-
Tokenization: typeof ucs.v2.Tokenization;
|
|
64
|
-
WebhookEventType: typeof ucs.v2.WebhookEventType;
|
|
65
|
-
ThreeDsCompletionIndicator: typeof ucs.v2.ThreeDsCompletionIndicator;
|
|
66
|
-
TransactionStatus: typeof ucs.v2.TransactionStatus;
|
|
67
|
-
ExemptionIndicator: typeof ucs.v2.ExemptionIndicator;
|
|
68
|
-
MitCategory: typeof ucs.v2.MitCategory;
|
|
69
|
-
SyncRequestType: typeof ucs.v2.SyncRequestType;
|
|
70
|
-
AcceptanceType: typeof ucs.v2.AcceptanceType;
|
|
71
|
-
CavvAlgorithm: typeof ucs.v2.CavvAlgorithm;
|
|
72
|
-
};
|
|
73
|
-
export declare const payment_methods: {
|
|
74
|
-
PaymentMethod: typeof ucs.v2.PaymentMethod;
|
|
75
|
-
CardNumberType: typeof ucs.v2.CardNumberType;
|
|
76
|
-
CardDetails: typeof ucs.v2.CardDetails;
|
|
77
|
-
CardRedirect: typeof ucs.v2.CardRedirect;
|
|
78
|
-
};
|
|
79
|
-
export declare const configs: {
|
|
80
|
-
EnvOptions: typeof ucs.v2.EnvOptions;
|
|
81
|
-
FfiOptions: typeof ucs.v2.FfiOptions;
|
|
82
|
-
FfiConnectorHttpRequest: typeof ucs.v2.FfiConnectorHttpRequest;
|
|
83
|
-
FfiConnectorHttpResponse: typeof ucs.v2.FfiConnectorHttpResponse;
|
|
84
|
-
};
|
|
85
|
-
export declare namespace payments {
|
|
86
|
-
type IPaymentServiceAuthorizeRequest = ucs.v2.IPaymentServiceAuthorizeRequest;
|
|
87
|
-
type IPaymentServiceAuthorizeResponse = ucs.v2.IPaymentServiceAuthorizeResponse;
|
|
88
|
-
type IPaymentServiceCaptureRequest = ucs.v2.IPaymentServiceCaptureRequest;
|
|
89
|
-
type IPaymentServiceCaptureResponse = ucs.v2.IPaymentServiceCaptureResponse;
|
|
90
|
-
type IPaymentServiceVoidRequest = ucs.v2.IPaymentServiceVoidRequest;
|
|
91
|
-
type IPaymentServiceVoidResponse = ucs.v2.IPaymentServiceVoidResponse;
|
|
92
|
-
type IPaymentServiceRefundRequest = ucs.v2.IPaymentServiceRefundRequest;
|
|
93
|
-
type IPaymentServiceReverseRequest = ucs.v2.IPaymentServiceReverseRequest;
|
|
94
|
-
type IPaymentServiceGetRequest = ucs.v2.IPaymentServiceGetRequest;
|
|
95
|
-
type IPaymentServiceGetResponse = ucs.v2.IPaymentServiceGetResponse;
|
|
96
|
-
type IPaymentServiceCreateOrderRequest = ucs.v2.IPaymentServiceCreateOrderRequest;
|
|
97
|
-
type IPaymentServiceCreateOrderResponse = ucs.v2.IPaymentServiceCreateOrderResponse;
|
|
98
|
-
type IPaymentServiceSetupRecurringRequest = ucs.v2.IPaymentServiceSetupRecurringRequest;
|
|
99
|
-
type IPaymentServiceSetupRecurringResponse = ucs.v2.IPaymentServiceSetupRecurringResponse;
|
|
100
|
-
type IPaymentServiceIncrementalAuthorizationRequest = ucs.v2.IPaymentServiceIncrementalAuthorizationRequest;
|
|
101
|
-
type IPaymentServiceIncrementalAuthorizationResponse = ucs.v2.IPaymentServiceIncrementalAuthorizationResponse;
|
|
102
|
-
type IPaymentServiceVerifyRedirectResponseRequest = ucs.v2.IPaymentServiceVerifyRedirectResponseRequest;
|
|
103
|
-
type IPaymentServiceVerifyRedirectResponseResponse = ucs.v2.IPaymentServiceVerifyRedirectResponseResponse;
|
|
104
|
-
type IPaymentServiceDisputeRequest = ucs.v2.IPaymentServiceDisputeRequest;
|
|
105
|
-
type IPaymentMethodAuthenticationServicePreAuthenticateRequest = ucs.v2.IPaymentMethodAuthenticationServicePreAuthenticateRequest;
|
|
106
|
-
type IPaymentMethodAuthenticationServicePreAuthenticateResponse = ucs.v2.IPaymentMethodAuthenticationServicePreAuthenticateResponse;
|
|
107
|
-
type IPaymentMethodAuthenticationServiceAuthenticateRequest = ucs.v2.IPaymentMethodAuthenticationServiceAuthenticateRequest;
|
|
108
|
-
type IPaymentMethodAuthenticationServiceAuthenticateResponse = ucs.v2.IPaymentMethodAuthenticationServiceAuthenticateResponse;
|
|
109
|
-
type IPaymentMethodServiceTokenizeRequest = ucs.v2.IPaymentMethodServiceTokenizeRequest;
|
|
110
|
-
type IPaymentMethodServiceTokenizeResponse = ucs.v2.IPaymentMethodServiceTokenizeResponse;
|
|
111
|
-
type IMerchantAuthenticationServiceCreateAccessTokenRequest = ucs.v2.IMerchantAuthenticationServiceCreateAccessTokenRequest;
|
|
112
|
-
type IMerchantAuthenticationServiceCreateAccessTokenResponse = ucs.v2.IMerchantAuthenticationServiceCreateAccessTokenResponse;
|
|
113
|
-
type ISecretString = ucs.v2.ISecretString;
|
|
114
|
-
type IAccessToken = ucs.v2.IAccessToken;
|
|
115
|
-
type IConnectorState = ucs.v2.IConnectorState;
|
|
116
|
-
type ICustomer = ucs.v2.ICustomer;
|
|
117
|
-
type IPaymentAddress = ucs.v2.IPaymentAddress;
|
|
118
|
-
type IMoney = ucs.v2.IMoney;
|
|
119
|
-
type IBrowserInformation = ucs.v2.IBrowserInformation;
|
|
120
|
-
type ICustomerAcceptance = ucs.v2.ICustomerAcceptance;
|
|
121
|
-
type ISessionToken = ucs.v2.ISessionToken;
|
|
122
|
-
type IConnectorResponseData = ucs.v2.IConnectorResponseData;
|
|
123
|
-
type ICardConnectorResponse = ucs.v2.ICardConnectorResponse;
|
|
124
|
-
type IErrorInfo = ucs.v2.IErrorInfo;
|
|
125
|
-
type PaymentServiceAuthorizeRequest = ucs.v2.PaymentServiceAuthorizeRequest;
|
|
126
|
-
type PaymentServiceAuthorizeResponse = ucs.v2.PaymentServiceAuthorizeResponse;
|
|
127
|
-
type PaymentServiceCaptureRequest = ucs.v2.PaymentServiceCaptureRequest;
|
|
128
|
-
type PaymentServiceCaptureResponse = ucs.v2.PaymentServiceCaptureResponse;
|
|
129
|
-
type PaymentServiceVoidRequest = ucs.v2.PaymentServiceVoidRequest;
|
|
130
|
-
type PaymentServiceVoidResponse = ucs.v2.PaymentServiceVoidResponse;
|
|
131
|
-
type PaymentServiceRefundRequest = ucs.v2.PaymentServiceRefundRequest;
|
|
132
|
-
type PaymentServiceReverseRequest = ucs.v2.PaymentServiceReverseRequest;
|
|
133
|
-
type PaymentServiceGetRequest = ucs.v2.PaymentServiceGetRequest;
|
|
134
|
-
type PaymentServiceGetResponse = ucs.v2.PaymentServiceGetResponse;
|
|
135
|
-
type PaymentServiceCreateOrderRequest = ucs.v2.PaymentServiceCreateOrderRequest;
|
|
136
|
-
type PaymentServiceCreateOrderResponse = ucs.v2.PaymentServiceCreateOrderResponse;
|
|
137
|
-
type PaymentServiceSetupRecurringRequest = ucs.v2.PaymentServiceSetupRecurringRequest;
|
|
138
|
-
type PaymentServiceSetupRecurringResponse = ucs.v2.PaymentServiceSetupRecurringResponse;
|
|
139
|
-
type PaymentServiceIncrementalAuthorizationRequest = ucs.v2.PaymentServiceIncrementalAuthorizationRequest;
|
|
140
|
-
type PaymentServiceIncrementalAuthorizationResponse = ucs.v2.PaymentServiceIncrementalAuthorizationResponse;
|
|
141
|
-
type PaymentServiceVerifyRedirectResponseRequest = ucs.v2.PaymentServiceVerifyRedirectResponseRequest;
|
|
142
|
-
type PaymentServiceVerifyRedirectResponseResponse = ucs.v2.PaymentServiceVerifyRedirectResponseResponse;
|
|
143
|
-
type PaymentServiceDisputeRequest = ucs.v2.PaymentServiceDisputeRequest;
|
|
144
|
-
type PaymentMethodAuthenticationServicePreAuthenticateRequest = ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateRequest;
|
|
145
|
-
type PaymentMethodAuthenticationServicePreAuthenticateResponse = ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateResponse;
|
|
146
|
-
type PaymentMethodAuthenticationServiceAuthenticateRequest = ucs.v2.PaymentMethodAuthenticationServiceAuthenticateRequest;
|
|
147
|
-
type PaymentMethodAuthenticationServiceAuthenticateResponse = ucs.v2.PaymentMethodAuthenticationServiceAuthenticateResponse;
|
|
148
|
-
type PaymentMethodServiceTokenizeRequest = ucs.v2.PaymentMethodServiceTokenizeRequest;
|
|
149
|
-
type PaymentMethodServiceTokenizeResponse = ucs.v2.PaymentMethodServiceTokenizeResponse;
|
|
150
|
-
type MerchantAuthenticationServiceCreateAccessTokenRequest = ucs.v2.MerchantAuthenticationServiceCreateAccessTokenRequest;
|
|
151
|
-
type MerchantAuthenticationServiceCreateAccessTokenResponse = ucs.v2.MerchantAuthenticationServiceCreateAccessTokenResponse;
|
|
152
|
-
type SecretString = ucs.v2.SecretString;
|
|
153
|
-
type AccessToken = ucs.v2.AccessToken;
|
|
154
|
-
type ConnectorState = ucs.v2.ConnectorState;
|
|
155
|
-
type Customer = ucs.v2.Customer;
|
|
156
|
-
type PaymentAddress = ucs.v2.PaymentAddress;
|
|
157
|
-
type Money = ucs.v2.Money;
|
|
158
|
-
type BrowserInformation = ucs.v2.BrowserInformation;
|
|
159
|
-
type CustomerAcceptance = ucs.v2.CustomerAcceptance;
|
|
160
|
-
type SessionToken = ucs.v2.SessionToken;
|
|
161
|
-
type ConnectorResponseData = ucs.v2.ConnectorResponseData;
|
|
162
|
-
type CardConnectorResponse = ucs.v2.CardConnectorResponse;
|
|
163
|
-
type ErrorInfo = ucs.v2.ErrorInfo;
|
|
164
|
-
}
|
|
165
|
-
export declare namespace payment_methods {
|
|
166
|
-
type IPaymentMethod = ucs.v2.IPaymentMethod;
|
|
167
|
-
type ICardDetails = ucs.v2.ICardDetails;
|
|
168
|
-
type ICardRedirect = ucs.v2.ICardRedirect;
|
|
169
|
-
type PaymentMethod = ucs.v2.PaymentMethod;
|
|
170
|
-
type CardNumberType = ucs.v2.CardNumberType;
|
|
171
|
-
type CardDetails = ucs.v2.CardDetails;
|
|
172
|
-
type CardRedirect = ucs.v2.CardRedirect;
|
|
173
|
-
}
|
|
174
|
-
export declare namespace configs {
|
|
175
|
-
type IEnvOptions = ucs.v2.IEnvOptions;
|
|
176
|
-
type IFfiOptions = ucs.v2.IFfiOptions;
|
|
177
|
-
type IFfiConnectorHttpRequest = ucs.v2.IFfiConnectorHttpRequest;
|
|
178
|
-
type IFfiConnectorHttpResponse = ucs.v2.IFfiConnectorHttpResponse;
|
|
179
|
-
type EnvOptions = ucs.v2.EnvOptions;
|
|
180
|
-
type FfiOptions = ucs.v2.FfiOptions;
|
|
181
|
-
type FfiConnectorHttpRequest = ucs.v2.FfiConnectorHttpRequest;
|
|
182
|
-
type FfiConnectorHttpResponse = ucs.v2.FfiConnectorHttpResponse;
|
|
183
|
-
}
|
|
5
|
+
export * from './payments/generated/proto';
|
package/dist/src/index.js
CHANGED
|
@@ -14,104 +14,17 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
const proto_1 = require("./payments/generated/proto");
|
|
17
|
+
exports.UniffiClient = void 0;
|
|
19
18
|
// Re-export client classes flat (high-level API)
|
|
20
|
-
|
|
21
|
-
Object.defineProperty(exports, "ConnectorClient", { enumerable: true, get: function () { return _generated_connector_client_flows_1.ConnectorClient; } });
|
|
19
|
+
__exportStar(require("./payments/_generated_connector_client_flows"), exports);
|
|
22
20
|
var _generated_uniffi_client_flows_1 = require("./payments/_generated_uniffi_client_flows");
|
|
23
21
|
Object.defineProperty(exports, "UniffiClient", { enumerable: true, get: function () { return _generated_uniffi_client_flows_1.UniffiClient; } });
|
|
24
22
|
__exportStar(require("./http_client"), exports);
|
|
23
|
+
__exportStar(require("./payments/generated/proto"), exports);
|
|
25
24
|
// ---------------------------------------------------------------------------
|
|
26
25
|
// Domain namespaces — runtime values
|
|
27
|
-
// Usage: import { payments, payment_methods, configs } from '
|
|
28
|
-
// const
|
|
29
|
-
// const
|
|
26
|
+
// Usage: import { payments, payment_methods, configs } from '@juspay/connector-service-sdk';
|
|
27
|
+
// const config: configs.IConnectorConfig = { ... };
|
|
28
|
+
// const client = new ConnectorClient(identity);
|
|
30
29
|
// ---------------------------------------------------------------------------
|
|
31
|
-
exports.payments = {
|
|
32
|
-
// Request / Response types
|
|
33
|
-
PaymentServiceAuthorizeRequest: proto_1.ucs.v2.PaymentServiceAuthorizeRequest,
|
|
34
|
-
PaymentServiceAuthorizeResponse: proto_1.ucs.v2.PaymentServiceAuthorizeResponse,
|
|
35
|
-
PaymentServiceCaptureRequest: proto_1.ucs.v2.PaymentServiceCaptureRequest,
|
|
36
|
-
PaymentServiceCaptureResponse: proto_1.ucs.v2.PaymentServiceCaptureResponse,
|
|
37
|
-
PaymentServiceVoidRequest: proto_1.ucs.v2.PaymentServiceVoidRequest,
|
|
38
|
-
PaymentServiceVoidResponse: proto_1.ucs.v2.PaymentServiceVoidResponse,
|
|
39
|
-
PaymentServiceRefundRequest: proto_1.ucs.v2.PaymentServiceRefundRequest,
|
|
40
|
-
PaymentServiceReverseRequest: proto_1.ucs.v2.PaymentServiceReverseRequest,
|
|
41
|
-
PaymentServiceGetRequest: proto_1.ucs.v2.PaymentServiceGetRequest,
|
|
42
|
-
PaymentServiceGetResponse: proto_1.ucs.v2.PaymentServiceGetResponse,
|
|
43
|
-
PaymentServiceCreateOrderRequest: proto_1.ucs.v2.PaymentServiceCreateOrderRequest,
|
|
44
|
-
PaymentServiceCreateOrderResponse: proto_1.ucs.v2.PaymentServiceCreateOrderResponse,
|
|
45
|
-
PaymentServiceSetupRecurringRequest: proto_1.ucs.v2.PaymentServiceSetupRecurringRequest,
|
|
46
|
-
PaymentServiceSetupRecurringResponse: proto_1.ucs.v2.PaymentServiceSetupRecurringResponse,
|
|
47
|
-
PaymentServiceIncrementalAuthorizationRequest: proto_1.ucs.v2.PaymentServiceIncrementalAuthorizationRequest,
|
|
48
|
-
PaymentServiceIncrementalAuthorizationResponse: proto_1.ucs.v2.PaymentServiceIncrementalAuthorizationResponse,
|
|
49
|
-
PaymentServiceVerifyRedirectResponseRequest: proto_1.ucs.v2.PaymentServiceVerifyRedirectResponseRequest,
|
|
50
|
-
PaymentServiceVerifyRedirectResponseResponse: proto_1.ucs.v2.PaymentServiceVerifyRedirectResponseResponse,
|
|
51
|
-
PaymentServiceDisputeRequest: proto_1.ucs.v2.PaymentServiceDisputeRequest,
|
|
52
|
-
// Authentication types
|
|
53
|
-
PaymentMethodAuthenticationServicePreAuthenticateRequest: proto_1.ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateRequest,
|
|
54
|
-
PaymentMethodAuthenticationServicePreAuthenticateResponse: proto_1.ucs.v2.PaymentMethodAuthenticationServicePreAuthenticateResponse,
|
|
55
|
-
PaymentMethodAuthenticationServiceAuthenticateRequest: proto_1.ucs.v2.PaymentMethodAuthenticationServiceAuthenticateRequest,
|
|
56
|
-
PaymentMethodAuthenticationServiceAuthenticateResponse: proto_1.ucs.v2.PaymentMethodAuthenticationServiceAuthenticateResponse,
|
|
57
|
-
// Tokenization
|
|
58
|
-
PaymentMethodServiceTokenizeRequest: proto_1.ucs.v2.PaymentMethodServiceTokenizeRequest,
|
|
59
|
-
PaymentMethodServiceTokenizeResponse: proto_1.ucs.v2.PaymentMethodServiceTokenizeResponse,
|
|
60
|
-
// Access token types
|
|
61
|
-
MerchantAuthenticationServiceCreateAccessTokenRequest: proto_1.ucs.v2.MerchantAuthenticationServiceCreateAccessTokenRequest,
|
|
62
|
-
MerchantAuthenticationServiceCreateAccessTokenResponse: proto_1.ucs.v2.MerchantAuthenticationServiceCreateAccessTokenResponse,
|
|
63
|
-
// Data types
|
|
64
|
-
SecretString: proto_1.ucs.v2.SecretString,
|
|
65
|
-
AccessToken: proto_1.ucs.v2.AccessToken,
|
|
66
|
-
ConnectorState: proto_1.ucs.v2.ConnectorState,
|
|
67
|
-
Customer: proto_1.ucs.v2.Customer,
|
|
68
|
-
PaymentAddress: proto_1.ucs.v2.PaymentAddress,
|
|
69
|
-
Money: proto_1.ucs.v2.Money,
|
|
70
|
-
BrowserInformation: proto_1.ucs.v2.BrowserInformation,
|
|
71
|
-
CustomerAcceptance: proto_1.ucs.v2.CustomerAcceptance,
|
|
72
|
-
SessionToken: proto_1.ucs.v2.SessionToken,
|
|
73
|
-
// Response data types
|
|
74
|
-
ConnectorResponseData: proto_1.ucs.v2.ConnectorResponseData,
|
|
75
|
-
CardConnectorResponse: proto_1.ucs.v2.CardConnectorResponse,
|
|
76
|
-
ErrorInfo: proto_1.ucs.v2.ErrorInfo,
|
|
77
|
-
// Enums
|
|
78
|
-
Currency: proto_1.ucs.v2.Currency,
|
|
79
|
-
CaptureMethod: proto_1.ucs.v2.CaptureMethod,
|
|
80
|
-
AuthenticationType: proto_1.ucs.v2.AuthenticationType,
|
|
81
|
-
PaymentMethodType: proto_1.ucs.v2.PaymentMethodType,
|
|
82
|
-
PaymentStatus: proto_1.ucs.v2.PaymentStatus,
|
|
83
|
-
RefundStatus: proto_1.ucs.v2.RefundStatus,
|
|
84
|
-
DisputeStatus: proto_1.ucs.v2.DisputeStatus,
|
|
85
|
-
MandateStatus: proto_1.ucs.v2.MandateStatus,
|
|
86
|
-
AuthorizationStatus: proto_1.ucs.v2.AuthorizationStatus,
|
|
87
|
-
OperationStatus: proto_1.ucs.v2.OperationStatus,
|
|
88
|
-
HttpMethod: proto_1.ucs.v2.HttpMethod,
|
|
89
|
-
FutureUsage: proto_1.ucs.v2.FutureUsage,
|
|
90
|
-
PaymentExperience: proto_1.ucs.v2.PaymentExperience,
|
|
91
|
-
PaymentChannel: proto_1.ucs.v2.PaymentChannel,
|
|
92
|
-
Connector: proto_1.ucs.v2.Connector,
|
|
93
|
-
ProductType: proto_1.ucs.v2.ProductType,
|
|
94
|
-
DisputeStage: proto_1.ucs.v2.DisputeStage,
|
|
95
|
-
Tokenization: proto_1.ucs.v2.Tokenization,
|
|
96
|
-
WebhookEventType: proto_1.ucs.v2.WebhookEventType,
|
|
97
|
-
ThreeDsCompletionIndicator: proto_1.ucs.v2.ThreeDsCompletionIndicator,
|
|
98
|
-
TransactionStatus: proto_1.ucs.v2.TransactionStatus,
|
|
99
|
-
ExemptionIndicator: proto_1.ucs.v2.ExemptionIndicator,
|
|
100
|
-
MitCategory: proto_1.ucs.v2.MitCategory,
|
|
101
|
-
SyncRequestType: proto_1.ucs.v2.SyncRequestType,
|
|
102
|
-
AcceptanceType: proto_1.ucs.v2.AcceptanceType,
|
|
103
|
-
CavvAlgorithm: proto_1.ucs.v2.CavvAlgorithm,
|
|
104
|
-
};
|
|
105
|
-
exports.payment_methods = {
|
|
106
|
-
PaymentMethod: proto_1.ucs.v2.PaymentMethod,
|
|
107
|
-
CardNumberType: proto_1.ucs.v2.CardNumberType,
|
|
108
|
-
CardDetails: proto_1.ucs.v2.CardDetails,
|
|
109
|
-
CardRedirect: proto_1.ucs.v2.CardRedirect,
|
|
110
|
-
};
|
|
111
|
-
exports.configs = {
|
|
112
|
-
EnvOptions: proto_1.ucs.v2.EnvOptions,
|
|
113
|
-
FfiOptions: proto_1.ucs.v2.FfiOptions,
|
|
114
|
-
FfiConnectorHttpRequest: proto_1.ucs.v2.FfiConnectorHttpRequest,
|
|
115
|
-
FfiConnectorHttpResponse: proto_1.ucs.v2.FfiConnectorHttpResponse,
|
|
116
|
-
};
|
|
117
30
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,50 @@
|
|
|
1
1
|
import { ConnectorClient as _ConnectorClientBase } from "./connector_client";
|
|
2
|
-
import {
|
|
3
|
-
export declare class
|
|
2
|
+
import { types } from "./generated/proto";
|
|
3
|
+
export declare class CustomerClient extends _ConnectorClientBase {
|
|
4
|
+
/** CustomerService.Create — Create customer record in the payment processor system. Stores customer details for future payment operations without re-sending personal information. */
|
|
5
|
+
create(requestMsg: types.ICustomerServiceCreateRequest, options?: types.IRequestConfig | null): Promise<types.CustomerServiceCreateResponse>;
|
|
6
|
+
}
|
|
7
|
+
export declare class EventClient extends _ConnectorClientBase {
|
|
8
|
+
/** EventService.HandleEvent — Process webhook notifications from connectors. Translates connector events into standardized responses for asynchronous payment state updates. */
|
|
9
|
+
handleEvent(requestMsg: types.IEventServiceHandleRequest, options?: types.IRequestConfig | null): Promise<types.EventServiceHandleResponse>;
|
|
10
|
+
}
|
|
11
|
+
export declare class MerchantAuthenticationClient extends _ConnectorClientBase {
|
|
12
|
+
/** MerchantAuthenticationService.CreateAccessToken — Generate short-lived connector authentication token. Provides secure credentials for connector API access without storing secrets client-side. */
|
|
13
|
+
createAccessToken(requestMsg: types.IMerchantAuthenticationServiceCreateAccessTokenRequest, options?: types.IRequestConfig | null): Promise<types.MerchantAuthenticationServiceCreateAccessTokenResponse>;
|
|
14
|
+
/** MerchantAuthenticationService.CreateSessionToken — Create session token for payment processing. Maintains session state across multiple payment operations for improved security and tracking. */
|
|
15
|
+
createSessionToken(requestMsg: types.IMerchantAuthenticationServiceCreateSessionTokenRequest, options?: types.IRequestConfig | null): Promise<types.MerchantAuthenticationServiceCreateSessionTokenResponse>;
|
|
16
|
+
}
|
|
17
|
+
export declare class PaymentMethodAuthenticationClient extends _ConnectorClientBase {
|
|
18
|
+
/** PaymentMethodAuthenticationService.Authenticate — Execute 3DS challenge or frictionless verification. Authenticates customer via bank challenge or behind-the-scenes verification for fraud prevention. */
|
|
19
|
+
authenticate(requestMsg: types.IPaymentMethodAuthenticationServiceAuthenticateRequest, options?: types.IRequestConfig | null): Promise<types.PaymentMethodAuthenticationServiceAuthenticateResponse>;
|
|
20
|
+
/** PaymentMethodAuthenticationService.PostAuthenticate — Validate authentication results with the issuing bank. Processes bank's authentication decision to determine if payment can proceed. */
|
|
21
|
+
postAuthenticate(requestMsg: types.IPaymentMethodAuthenticationServicePostAuthenticateRequest, options?: types.IRequestConfig | null): Promise<types.PaymentMethodAuthenticationServicePostAuthenticateResponse>;
|
|
22
|
+
/** PaymentMethodAuthenticationService.PreAuthenticate — Initiate 3DS flow before payment authorization. Collects device data and prepares authentication context for frictionless or challenge-based verification. */
|
|
23
|
+
preAuthenticate(requestMsg: types.IPaymentMethodAuthenticationServicePreAuthenticateRequest, options?: types.IRequestConfig | null): Promise<types.PaymentMethodAuthenticationServicePreAuthenticateResponse>;
|
|
24
|
+
}
|
|
25
|
+
export declare class PaymentMethodClient extends _ConnectorClientBase {
|
|
26
|
+
/** PaymentMethodService.Tokenize — Tokenize payment method for secure storage. Replaces raw card details with secure token for one-click payments and recurring billing. */
|
|
27
|
+
tokenize(requestMsg: types.IPaymentMethodServiceTokenizeRequest, options?: types.IRequestConfig | null): Promise<types.PaymentMethodServiceTokenizeResponse>;
|
|
28
|
+
}
|
|
29
|
+
export declare class PaymentClient extends _ConnectorClientBase {
|
|
4
30
|
/** PaymentService.Authorize — Authorize a payment amount on a payment method. This reserves funds without capturing them, essential for verifying availability before finalizing. */
|
|
5
|
-
authorize(requestMsg:
|
|
31
|
+
authorize(requestMsg: types.IPaymentServiceAuthorizeRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceAuthorizeResponse>;
|
|
6
32
|
/** PaymentService.Capture — Finalize an authorized payment transaction. Transfers reserved funds from customer to merchant account, completing the payment lifecycle. */
|
|
7
|
-
capture(requestMsg:
|
|
8
|
-
/**
|
|
9
|
-
|
|
33
|
+
capture(requestMsg: types.IPaymentServiceCaptureRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceCaptureResponse>;
|
|
34
|
+
/** PaymentService.CreateOrder — Initialize an order in the payment processor system. Sets up payment context before customer enters card details for improved authorization rates. */
|
|
35
|
+
createOrder(requestMsg: types.IPaymentServiceCreateOrderRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceCreateOrderResponse>;
|
|
10
36
|
/** PaymentService.Get — Retrieve current payment status from the payment processor. Enables synchronization between your system and payment processors for accurate state tracking. */
|
|
11
|
-
get(requestMsg:
|
|
37
|
+
get(requestMsg: types.IPaymentServiceGetRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceGetResponse>;
|
|
12
38
|
/** PaymentService.Refund — Initiate a refund to customer's payment method. Returns funds for returns, cancellations, or service adjustments after original payment. */
|
|
13
|
-
refund(requestMsg:
|
|
39
|
+
refund(requestMsg: types.IPaymentServiceRefundRequest, options?: types.IRequestConfig | null): Promise<types.RefundResponse>;
|
|
40
|
+
/** PaymentService.Reverse — Reverse a captured payment before settlement. Recovers funds after capture but before bank settlement, used for corrections or cancellations. */
|
|
41
|
+
reverse(requestMsg: types.IPaymentServiceReverseRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceReverseResponse>;
|
|
42
|
+
/** PaymentService.SetupRecurring — Setup a recurring payment instruction for future payments/ debits. This could be for SaaS subscriptions, monthly bill payments, insurance payments and similar use cases. */
|
|
43
|
+
setupRecurring(requestMsg: types.IPaymentServiceSetupRecurringRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceSetupRecurringResponse>;
|
|
14
44
|
/** PaymentService.Void — Cancel an authorized payment before capture. Releases held funds back to customer, typically used when orders are cancelled or abandoned. */
|
|
15
|
-
void(requestMsg:
|
|
45
|
+
void(requestMsg: types.IPaymentServiceVoidRequest, options?: types.IRequestConfig | null): Promise<types.PaymentServiceVoidResponse>;
|
|
46
|
+
}
|
|
47
|
+
export declare class RecurringPaymentClient extends _ConnectorClientBase {
|
|
48
|
+
/** RecurringPaymentService.Charge — Charge using an existing stored recurring payment instruction. Processes repeat payments for subscriptions or recurring billing without collecting payment details. */
|
|
49
|
+
charge(requestMsg: types.IRecurringPaymentServiceChargeRequest, options?: types.IRequestConfig | null): Promise<types.RecurringPaymentServiceChargeResponse>;
|
|
16
50
|
}
|
|
@@ -2,33 +2,95 @@
|
|
|
2
2
|
// AUTO-GENERATED — do not edit by hand.
|
|
3
3
|
// Source: services.proto ∩ bindings/uniffi.rs | Regenerate: make generate
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.
|
|
5
|
+
exports.RecurringPaymentClient = exports.PaymentClient = exports.PaymentMethodClient = exports.PaymentMethodAuthenticationClient = exports.MerchantAuthenticationClient = exports.EventClient = exports.CustomerClient = void 0;
|
|
6
6
|
const connector_client_1 = require("./connector_client");
|
|
7
|
-
class
|
|
7
|
+
class CustomerClient extends connector_client_1.ConnectorClient {
|
|
8
|
+
/** CustomerService.Create — Create customer record in the payment processor system. Stores customer details for future payment operations without re-sending personal information. */
|
|
9
|
+
async create(requestMsg, options) {
|
|
10
|
+
return this._executeFlow('create', requestMsg, options, 'CustomerServiceCreateRequest', 'CustomerServiceCreateResponse');
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.CustomerClient = CustomerClient;
|
|
14
|
+
class EventClient extends connector_client_1.ConnectorClient {
|
|
15
|
+
/** EventService.HandleEvent — Process webhook notifications from connectors. Translates connector events into standardized responses for asynchronous payment state updates. */
|
|
16
|
+
async handleEvent(requestMsg, options) {
|
|
17
|
+
return this._executeDirect('handle_event', requestMsg, options, 'EventServiceHandleRequest', 'EventServiceHandleResponse');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
exports.EventClient = EventClient;
|
|
21
|
+
class MerchantAuthenticationClient extends connector_client_1.ConnectorClient {
|
|
22
|
+
/** MerchantAuthenticationService.CreateAccessToken — Generate short-lived connector authentication token. Provides secure credentials for connector API access without storing secrets client-side. */
|
|
23
|
+
async createAccessToken(requestMsg, options) {
|
|
24
|
+
return this._executeFlow('create_access_token', requestMsg, options, 'MerchantAuthenticationServiceCreateAccessTokenRequest', 'MerchantAuthenticationServiceCreateAccessTokenResponse');
|
|
25
|
+
}
|
|
26
|
+
/** MerchantAuthenticationService.CreateSessionToken — Create session token for payment processing. Maintains session state across multiple payment operations for improved security and tracking. */
|
|
27
|
+
async createSessionToken(requestMsg, options) {
|
|
28
|
+
return this._executeFlow('create_session_token', requestMsg, options, 'MerchantAuthenticationServiceCreateSessionTokenRequest', 'MerchantAuthenticationServiceCreateSessionTokenResponse');
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.MerchantAuthenticationClient = MerchantAuthenticationClient;
|
|
32
|
+
class PaymentMethodAuthenticationClient extends connector_client_1.ConnectorClient {
|
|
33
|
+
/** PaymentMethodAuthenticationService.Authenticate — Execute 3DS challenge or frictionless verification. Authenticates customer via bank challenge or behind-the-scenes verification for fraud prevention. */
|
|
34
|
+
async authenticate(requestMsg, options) {
|
|
35
|
+
return this._executeFlow('authenticate', requestMsg, options, 'PaymentMethodAuthenticationServiceAuthenticateRequest', 'PaymentMethodAuthenticationServiceAuthenticateResponse');
|
|
36
|
+
}
|
|
37
|
+
/** PaymentMethodAuthenticationService.PostAuthenticate — Validate authentication results with the issuing bank. Processes bank's authentication decision to determine if payment can proceed. */
|
|
38
|
+
async postAuthenticate(requestMsg, options) {
|
|
39
|
+
return this._executeFlow('post_authenticate', requestMsg, options, 'PaymentMethodAuthenticationServicePostAuthenticateRequest', 'PaymentMethodAuthenticationServicePostAuthenticateResponse');
|
|
40
|
+
}
|
|
41
|
+
/** PaymentMethodAuthenticationService.PreAuthenticate — Initiate 3DS flow before payment authorization. Collects device data and prepares authentication context for frictionless or challenge-based verification. */
|
|
42
|
+
async preAuthenticate(requestMsg, options) {
|
|
43
|
+
return this._executeFlow('pre_authenticate', requestMsg, options, 'PaymentMethodAuthenticationServicePreAuthenticateRequest', 'PaymentMethodAuthenticationServicePreAuthenticateResponse');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.PaymentMethodAuthenticationClient = PaymentMethodAuthenticationClient;
|
|
47
|
+
class PaymentMethodClient extends connector_client_1.ConnectorClient {
|
|
48
|
+
/** PaymentMethodService.Tokenize — Tokenize payment method for secure storage. Replaces raw card details with secure token for one-click payments and recurring billing. */
|
|
49
|
+
async tokenize(requestMsg, options) {
|
|
50
|
+
return this._executeFlow('tokenize', requestMsg, options, 'PaymentMethodServiceTokenizeRequest', 'PaymentMethodServiceTokenizeResponse');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
exports.PaymentMethodClient = PaymentMethodClient;
|
|
54
|
+
class PaymentClient extends connector_client_1.ConnectorClient {
|
|
8
55
|
/** PaymentService.Authorize — Authorize a payment amount on a payment method. This reserves funds without capturing them, essential for verifying availability before finalizing. */
|
|
9
|
-
async authorize(requestMsg,
|
|
10
|
-
return this._executeFlow('authorize', requestMsg,
|
|
56
|
+
async authorize(requestMsg, options) {
|
|
57
|
+
return this._executeFlow('authorize', requestMsg, options, 'PaymentServiceAuthorizeRequest', 'PaymentServiceAuthorizeResponse');
|
|
11
58
|
}
|
|
12
59
|
/** PaymentService.Capture — Finalize an authorized payment transaction. Transfers reserved funds from customer to merchant account, completing the payment lifecycle. */
|
|
13
|
-
async capture(requestMsg,
|
|
14
|
-
return this._executeFlow('capture', requestMsg,
|
|
60
|
+
async capture(requestMsg, options) {
|
|
61
|
+
return this._executeFlow('capture', requestMsg, options, 'PaymentServiceCaptureRequest', 'PaymentServiceCaptureResponse');
|
|
15
62
|
}
|
|
16
|
-
/**
|
|
17
|
-
async
|
|
18
|
-
return this._executeFlow('
|
|
63
|
+
/** PaymentService.CreateOrder — Initialize an order in the payment processor system. Sets up payment context before customer enters card details for improved authorization rates. */
|
|
64
|
+
async createOrder(requestMsg, options) {
|
|
65
|
+
return this._executeFlow('create_order', requestMsg, options, 'PaymentServiceCreateOrderRequest', 'PaymentServiceCreateOrderResponse');
|
|
19
66
|
}
|
|
20
67
|
/** PaymentService.Get — Retrieve current payment status from the payment processor. Enables synchronization between your system and payment processors for accurate state tracking. */
|
|
21
|
-
async get(requestMsg,
|
|
22
|
-
return this._executeFlow('get', requestMsg,
|
|
68
|
+
async get(requestMsg, options) {
|
|
69
|
+
return this._executeFlow('get', requestMsg, options, 'PaymentServiceGetRequest', 'PaymentServiceGetResponse');
|
|
23
70
|
}
|
|
24
71
|
/** PaymentService.Refund — Initiate a refund to customer's payment method. Returns funds for returns, cancellations, or service adjustments after original payment. */
|
|
25
|
-
async refund(requestMsg,
|
|
26
|
-
return this._executeFlow('refund', requestMsg,
|
|
72
|
+
async refund(requestMsg, options) {
|
|
73
|
+
return this._executeFlow('refund', requestMsg, options, 'PaymentServiceRefundRequest', 'RefundResponse');
|
|
74
|
+
}
|
|
75
|
+
/** PaymentService.Reverse — Reverse a captured payment before settlement. Recovers funds after capture but before bank settlement, used for corrections or cancellations. */
|
|
76
|
+
async reverse(requestMsg, options) {
|
|
77
|
+
return this._executeFlow('reverse', requestMsg, options, 'PaymentServiceReverseRequest', 'PaymentServiceReverseResponse');
|
|
78
|
+
}
|
|
79
|
+
/** PaymentService.SetupRecurring — Setup a recurring payment instruction for future payments/ debits. This could be for SaaS subscriptions, monthly bill payments, insurance payments and similar use cases. */
|
|
80
|
+
async setupRecurring(requestMsg, options) {
|
|
81
|
+
return this._executeFlow('setup_recurring', requestMsg, options, 'PaymentServiceSetupRecurringRequest', 'PaymentServiceSetupRecurringResponse');
|
|
27
82
|
}
|
|
28
83
|
/** PaymentService.Void — Cancel an authorized payment before capture. Releases held funds back to customer, typically used when orders are cancelled or abandoned. */
|
|
29
|
-
async void(requestMsg,
|
|
30
|
-
return this._executeFlow('void', requestMsg,
|
|
84
|
+
async void(requestMsg, options) {
|
|
85
|
+
return this._executeFlow('void', requestMsg, options, 'PaymentServiceVoidRequest', 'PaymentServiceVoidResponse');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
exports.PaymentClient = PaymentClient;
|
|
89
|
+
class RecurringPaymentClient extends connector_client_1.ConnectorClient {
|
|
90
|
+
/** RecurringPaymentService.Charge — Charge using an existing stored recurring payment instruction. Processes repeat payments for subscriptions or recurring billing without collecting payment details. */
|
|
91
|
+
async charge(requestMsg, options) {
|
|
92
|
+
return this._executeFlow('charge', requestMsg, options, 'RecurringPaymentServiceChargeRequest', 'RecurringPaymentServiceChargeResponse');
|
|
31
93
|
}
|
|
32
94
|
}
|
|
33
|
-
exports.
|
|
95
|
+
exports.RecurringPaymentClient = RecurringPaymentClient;
|
|
34
96
|
//# sourceMappingURL=_generated_connector_client_flows.js.map
|