@superdurable/connector-braintree 0.1.0 → 0.2.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.
@@ -0,0 +1,562 @@
1
+ import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
2
+ import { z } from 'zod';
3
+
4
+ /** Connector configuration; omitted fields use manifest defaults. */
5
+ interface Config {
6
+ /** Braintree GraphQL API root. Blank uses the displayed sandbox root; use the documented production root for live payments. Do not append /graphql or credentials. */
7
+ baseUrl?: string;
8
+ /** Braintree GraphQL schema date in YYYY-MM-DD format. Blank uses the displayed date; override only to match an existing integration's schema version. */
9
+ apiVersion?: string;
10
+ /** Maximum duration of one Braintree HTTP request as a positive Go duration. Blank uses the displayed default; increase only for slow responses. Runtime value in milliseconds. */
11
+ timeoutMs?: number;
12
+ /** Maximum complete GraphQL JSON response in bytes as a positive integer. Blank uses the displayed default; increase only for large responses. */
13
+ maxResponseBytes?: number;
14
+ /** Absolute worker-mounted directory containing immutable PNG, JPEG, or PDF dispute evidence files. Blank disables file uploads; mount the same directory on every worker and pass each file basename plus SHA-256 digest to createDisputeFileEvidence. Never put file bytes or credentials in Flow input. */
15
+ evidenceDirectory?: string;
16
+ }
17
+ /** Runtime schema for manifest configuration. */
18
+ declare const ConfigSchema: z.ZodObject<{
19
+ baseUrl: z.ZodOptional<z.ZodString>;
20
+ apiVersion: z.ZodOptional<z.ZodString>;
21
+ timeoutMs: z.ZodOptional<z.ZodNumber>;
22
+ maxResponseBytes: z.ZodOptional<z.ZodNumber>;
23
+ evidenceDirectory: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
25
+ /** Private connector credentials resolved by the host. */
26
+ interface Credentials {
27
+ /** Secret API key from the same Braintree Control Panel > gear icon > API > API Keys > View in the Private Key column. Copy the complete value; blank prevents calls. Dex combines it with publicKey into a Basic header and never exposes it in Flow data. */
28
+ privateKey: SecretString;
29
+ /** Public API key from the matching Braintree sandbox or production Control Panel > gear icon > API > API Keys. Copy the complete value with no colon; blank prevents calls. This identifier is not secret but must match privateKey. */
30
+ publicKey: string;
31
+ }
32
+ /** Stored credential material that fails the connector credential checks, so no retry can succeed. */
33
+ declare class CredentialMaterialError extends TypeError {
34
+ constructor(message: string);
35
+ }
36
+ /** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
37
+ declare function isCredentialMaterialError(error: unknown): boolean;
38
+ /** Decode private credential fields for the connector. */
39
+ declare function decodeCredentials(value: unknown): Credentials;
40
+ /** Host-owned source of private connector credentials. */
41
+ type CredentialSource = CredentialProvider<Credentials>;
42
+ /** GetDisputeInput identifies one GraphQL dispute. */
43
+ interface GetDisputeInput {
44
+ /** DisputeID is the GraphQL ID, not the Control Panel case number. */
45
+ "disputeId": string;
46
+ }
47
+ /** DisputeEvidenceProfile identifies one evidence record without file contents. */
48
+ interface DisputeEvidenceProfile {
49
+ /** ID is the GraphQL evidence ID. */
50
+ "id": string;
51
+ /** Category is the provider evidence category. */
52
+ "category"?: string | undefined;
53
+ /** Content is text evidence; file evidence does not expose content. */
54
+ "content"?: string | undefined;
55
+ }
56
+ /** DisputeProfile shows a dispute's status and evidence identifiers. */
57
+ interface DisputeProfile {
58
+ /** ID is the GraphQL dispute ID. */
59
+ "id": string;
60
+ /** Status is the current dispute status. */
61
+ "status": string;
62
+ /** ReplyByDate is the provider deadline, when supplied. */
63
+ "replyByDate"?: string | undefined;
64
+ /** Evidence lists attached evidence; text content may contain personal data. */
65
+ "evidence"?: Array<DisputeEvidenceProfile> | undefined;
66
+ }
67
+ /** SearchDisputesInput filters by exact dispute ID or status. */
68
+ interface SearchDisputesInput {
69
+ /** DisputeID is an optional exact GraphQL ID. */
70
+ "disputeId"?: string | undefined;
71
+ /** Status is an optional DisputeStatus enum such as OPEN. */
72
+ "status"?: string | undefined;
73
+ /** First is 1 through 100; zero uses 50. */
74
+ "first"?: number | undefined;
75
+ /** After is the previous page's end cursor. */
76
+ "after"?: string | undefined;
77
+ }
78
+ /** DisputesPage contains one provider search page. */
79
+ interface DisputesPage {
80
+ /** Disputes are the matching dispute profiles. */
81
+ "disputes": Array<DisputeProfile> | null;
82
+ /** HasNextPage indicates another page. */
83
+ "hasNextPage": boolean;
84
+ /** EndCursor is used as After on the next request. */
85
+ "endCursor"?: string | undefined;
86
+ }
87
+ /** CreateDisputeTextEvidenceInput attaches one text statement to an open dispute. */
88
+ interface CreateDisputeTextEvidenceInput {
89
+ /** DisputeID is the GraphQL dispute ID. */
90
+ "disputeId": string;
91
+ /** Category is a Braintree DisputeTextEvidenceCategory enum. */
92
+ "category": string;
93
+ /** Content is the statement; never put credentials in evidence. */
94
+ "content": string;
95
+ }
96
+ /** DisputeTextEvidenceProfile is the newly attached text evidence. */
97
+ interface DisputeTextEvidenceProfile {
98
+ /** ID is the GraphQL evidence ID. */
99
+ "id": string;
100
+ /** Category is the provider evidence category. */
101
+ "category"?: string | undefined;
102
+ /** Content is text evidence; file evidence does not expose content. */
103
+ "content"?: string | undefined;
104
+ }
105
+ /** CreateDisputeFileEvidenceInput references an immutable file on every Worker. */
106
+ interface CreateDisputeFileEvidenceInput {
107
+ /** DisputeID is the GraphQL dispute ID. */
108
+ "disputeId": string;
109
+ /** Category is a DisputeFileEvidenceCategory enum. */
110
+ "category": string;
111
+ /** FileName is a basename in the configured evidence directory. */
112
+ "fileName": string;
113
+ /** ExpectedSHA256 is the lowercase hex digest of the complete file. */
114
+ "expectedSha256": string;
115
+ }
116
+ /** DeleteDisputeEvidenceInput identifies one attached evidence item. */
117
+ interface DeleteDisputeEvidenceInput {
118
+ /** DisputeID is the owning GraphQL dispute ID. */
119
+ "disputeId": string;
120
+ /** EvidenceID is the attached evidence GraphQL ID. */
121
+ "evidenceId": string;
122
+ }
123
+ /** DisputeEvidenceDeleteResult confirms evidence removal. */
124
+ interface DisputeEvidenceDeleteResult {
125
+ /** DisputeID is the owning dispute. */
126
+ "disputeId": string;
127
+ /** EvidenceID is the removed evidence item. */
128
+ "evidenceId": string;
129
+ /** Deleted is true only on a successful response. */
130
+ "deleted": boolean;
131
+ }
132
+ /** SearchTransactionsInput filters by exact GraphQL transaction or order ID. */
133
+ interface SearchTransactionsInput {
134
+ /** TransactionID is an optional exact GraphQL ID. */
135
+ "transactionId"?: string | undefined;
136
+ /** OrderID is an optional exact merchant order ID. */
137
+ "orderId"?: string | undefined;
138
+ /** First is the page size from 1 through 100; zero uses 50. */
139
+ "first"?: number | undefined;
140
+ /** After is the previous page's end cursor; blank starts at the first page. */
141
+ "after"?: string | undefined;
142
+ }
143
+ /** TransactionProfile contains a transaction's ID and current payment status. */
144
+ interface TransactionProfile {
145
+ /** ID is the Braintree GraphQL transaction ID. */
146
+ "id": string;
147
+ /** Status is the Braintree PaymentStatus enum value. */
148
+ "status": string;
149
+ }
150
+ /** TransactionsPage contains one Braintree search result page. */
151
+ interface TransactionsPage {
152
+ /** Transactions contains the matching transaction profiles. */
153
+ "transactions": Array<TransactionProfile> | null;
154
+ /** HasNextPage indicates another provider page. */
155
+ "hasNextPage": boolean;
156
+ /** EndCursor is passed as After for the next page. */
157
+ "endCursor"?: string | undefined;
158
+ }
159
+ /** ChargePaymentMethodInput supplies a tokenized payment method and charge amount. */
160
+ interface ChargePaymentMethodInput {
161
+ /** PaymentMethodID is a single-use or vaulted GraphQL payment method ID. */
162
+ "paymentMethodId": string;
163
+ /** Amount is a positive decimal amount in the merchant account's currency. */
164
+ "amount": string;
165
+ /** MerchantAccountID selects a merchant account; blank uses the provider default. */
166
+ "merchantAccountId"?: string | undefined;
167
+ /** OrderID is an optional merchant reconciliation ID. */
168
+ "orderId"?: string | undefined;
169
+ }
170
+ /** CaptureTransactionInput identifies an authorization and optional partial amount. */
171
+ interface CaptureTransactionInput {
172
+ /** TransactionID is the authorized GraphQL transaction ID. */
173
+ "transactionId": string;
174
+ /** Amount is a positive partial amount; blank captures the entire authorization. */
175
+ "amount"?: string | undefined;
176
+ }
177
+ /** GetTransactionInput selects one Braintree GraphQL node by ID. */
178
+ interface GetTransactionInput {
179
+ /** TransactionID is the GraphQL transaction ID, not a legacy SDK ID. */
180
+ "transactionId": string;
181
+ }
182
+ /** RefundTransactionInput identifies a settled transaction and optional partial amount. */
183
+ interface RefundTransactionInput {
184
+ /** TransactionID is the settled GraphQL transaction ID. */
185
+ "transactionId": string;
186
+ /** Amount is a positive partial refund; blank refunds the entire transaction. */
187
+ "amount"?: string | undefined;
188
+ /** OrderID is an optional refund reconciliation ID; blank inherits the transaction's. */
189
+ "orderId"?: string | undefined;
190
+ }
191
+ /** RefundProfile contains a refund's ID and status. */
192
+ interface RefundProfile {
193
+ /** ID is the GraphQL refund ID. */
194
+ "id": string;
195
+ /** Status is the current PaymentStatus when supplied. */
196
+ "status": string;
197
+ }
198
+ /** VaultPaymentMethodInput identifies one client-tokenized single-use method. */
199
+ interface VaultPaymentMethodInput {
200
+ /** PaymentMethodID is the single-use GraphQL ID, not raw card data. */
201
+ "paymentMethodId": string;
202
+ /** CustomerID optionally associates the resulting multi-use method with a customer. */
203
+ "customerId"?: string | undefined;
204
+ }
205
+ /** PaymentMethodProfile contains a payment method's ID and usage. */
206
+ interface PaymentMethodProfile {
207
+ /** ID is the GraphQL payment method ID. */
208
+ "id": string;
209
+ /** Usage is SINGLE_USE or MULTI_USE when supplied. */
210
+ "usage": string;
211
+ }
212
+ /** UpdateCreditCardCardholderNameInput selects a vaulted card and its replacement name. */
213
+ interface UpdateCreditCardCardholderNameInput {
214
+ /** PaymentMethodID is the vaulted multi-use GraphQL ID. */
215
+ "paymentMethodId": string;
216
+ /** CardholderName is the new non-blank name. */
217
+ "cardholderName": string;
218
+ }
219
+ /** UpdateCreditCardExpirationDateInput selects a vaulted card and its replacement date. */
220
+ interface UpdateCreditCardExpirationDateInput {
221
+ /** PaymentMethodID is the vaulted multi-use GraphQL ID. */
222
+ "paymentMethodId": string;
223
+ /** ExpirationMonth is a two-digit month. */
224
+ "expirationMonth": string;
225
+ /** ExpirationYear is a four-digit year. */
226
+ "expirationYear": string;
227
+ }
228
+ /** UpdateCreditCardBillingAddressInput selects a vaulted card and replacement billing address. */
229
+ interface UpdateCreditCardBillingAddressInput {
230
+ /** PaymentMethodID is the vaulted multi-use GraphQL ID. */
231
+ "paymentMethodId": string;
232
+ /** AddressLine1 is the street address. */
233
+ "addressLine1": string;
234
+ /** City is the locality. */
235
+ "city": string;
236
+ /** State is the state or province. */
237
+ "state": string;
238
+ /** PostalCode is the postal or ZIP code. */
239
+ "postalCode": string;
240
+ /** CountryCode is a Braintree CountryCode value. */
241
+ "countryCode": string;
242
+ }
243
+ /** GetPaymentMethodInput identifies a payment method by its GraphQL ID. */
244
+ interface GetPaymentMethodInput {
245
+ /** PaymentMethodID is a GraphQL ID, not a legacy SDK ID. */
246
+ "paymentMethodId": string;
247
+ }
248
+ /** PaymentMethodDeleteResult confirms a vaulted method deletion. */
249
+ interface PaymentMethodDeleteResult {
250
+ /** PaymentMethodID identifies the removed method. */
251
+ "paymentMethodId": string;
252
+ /** Deleted is true only after a successful mutation response. */
253
+ "deleted": boolean;
254
+ }
255
+ /** CreateCustomerInput supplies non-secret customer contact fields. */
256
+ interface CreateCustomerInput {
257
+ /** FirstName is the optional given name. */
258
+ "firstName"?: string | undefined;
259
+ /** LastName is the optional family name. */
260
+ "lastName"?: string | undefined;
261
+ /** Email is the optional contact address. */
262
+ "email"?: string | undefined;
263
+ }
264
+ /** CustomerProfile contains a Braintree customer's contact identity. */
265
+ interface CustomerProfile {
266
+ /** ID is the GraphQL customer ID. */
267
+ "id": string;
268
+ /** FirstName is the customer's given name, when supplied. */
269
+ "firstName": string;
270
+ /** LastName is the customer's family name, when supplied. */
271
+ "lastName": string;
272
+ /** Email is the customer's email, when supplied. */
273
+ "email": string;
274
+ }
275
+ /** UpdateCustomerInput replaces the selected contact fields. */
276
+ interface UpdateCustomerInput {
277
+ /** CustomerID is the Braintree GraphQL customer ID. */
278
+ "customerId": string;
279
+ /** FirstName is the replacement given name; blank clears it. */
280
+ "firstName": string;
281
+ /** LastName is the replacement family name; blank clears it. */
282
+ "lastName": string;
283
+ /** Email is the replacement contact address; blank clears it. */
284
+ "email": string;
285
+ }
286
+ /** GetCustomerInput identifies a customer by its GraphQL ID. */
287
+ interface GetCustomerInput {
288
+ /** CustomerID is a GraphQL ID, not a legacy SDK ID. */
289
+ "customerId": string;
290
+ }
291
+ /** CustomerDeleteResult confirms the selected customer deletion. */
292
+ interface CustomerDeleteResult {
293
+ /** CustomerID identifies the deleted customer. */
294
+ "customerId": string;
295
+ /** Deleted is true only on a successful mutation response. */
296
+ "deleted": boolean;
297
+ }
298
+ /** GetRefundInput identifies a refund by its GraphQL ID. */
299
+ interface GetRefundInput {
300
+ /** RefundID is a GraphQL ID, not a legacy SDK ID. */
301
+ "refundId": string;
302
+ }
303
+ /** Runtime validator for GetDisputeInput. */
304
+ declare const GetDisputeInputSchema: z.ZodObject<{
305
+ disputeId: z.ZodString;
306
+ }, z.core.$strict>;
307
+ /** Runtime validator for DisputeEvidenceProfile. */
308
+ declare const DisputeEvidenceProfileSchema: z.ZodObject<{
309
+ id: z.ZodString;
310
+ category: z.ZodOptional<z.ZodString>;
311
+ content: z.ZodOptional<z.ZodString>;
312
+ }, z.core.$strict>;
313
+ /** Runtime validator for DisputeProfile. */
314
+ declare const DisputeProfileSchema: z.ZodObject<{
315
+ id: z.ZodString;
316
+ status: z.ZodString;
317
+ replyByDate: z.ZodOptional<z.ZodString>;
318
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
319
+ id: z.ZodString;
320
+ category: z.ZodOptional<z.ZodString>;
321
+ content: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strict>>>;
323
+ }, z.core.$strict>;
324
+ /** Runtime validator for SearchDisputesInput. */
325
+ declare const SearchDisputesInputSchema: z.ZodObject<{
326
+ disputeId: z.ZodOptional<z.ZodString>;
327
+ status: z.ZodOptional<z.ZodString>;
328
+ first: z.ZodOptional<z.ZodNumber>;
329
+ after: z.ZodOptional<z.ZodString>;
330
+ }, z.core.$strict>;
331
+ /** Runtime validator for DisputesPage. */
332
+ declare const DisputesPageSchema: z.ZodObject<{
333
+ disputes: z.ZodNullable<z.ZodArray<z.ZodObject<{
334
+ id: z.ZodString;
335
+ status: z.ZodString;
336
+ replyByDate: z.ZodOptional<z.ZodString>;
337
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
338
+ id: z.ZodString;
339
+ category: z.ZodOptional<z.ZodString>;
340
+ content: z.ZodOptional<z.ZodString>;
341
+ }, z.core.$strict>>>;
342
+ }, z.core.$strict>>>;
343
+ hasNextPage: z.ZodBoolean;
344
+ endCursor: z.ZodOptional<z.ZodString>;
345
+ }, z.core.$strict>;
346
+ /** Runtime validator for CreateDisputeTextEvidenceInput. */
347
+ declare const CreateDisputeTextEvidenceInputSchema: z.ZodObject<{
348
+ disputeId: z.ZodString;
349
+ category: z.ZodString;
350
+ content: z.ZodString;
351
+ }, z.core.$strict>;
352
+ /** Runtime validator for DisputeTextEvidenceProfile. */
353
+ declare const DisputeTextEvidenceProfileSchema: z.ZodObject<{
354
+ id: z.ZodString;
355
+ category: z.ZodOptional<z.ZodString>;
356
+ content: z.ZodOptional<z.ZodString>;
357
+ }, z.core.$strict>;
358
+ /** Runtime validator for CreateDisputeFileEvidenceInput. */
359
+ declare const CreateDisputeFileEvidenceInputSchema: z.ZodObject<{
360
+ disputeId: z.ZodString;
361
+ category: z.ZodString;
362
+ fileName: z.ZodString;
363
+ expectedSha256: z.ZodString;
364
+ }, z.core.$strict>;
365
+ /** Runtime validator for DeleteDisputeEvidenceInput. */
366
+ declare const DeleteDisputeEvidenceInputSchema: z.ZodObject<{
367
+ disputeId: z.ZodString;
368
+ evidenceId: z.ZodString;
369
+ }, z.core.$strict>;
370
+ /** Runtime validator for DisputeEvidenceDeleteResult. */
371
+ declare const DisputeEvidenceDeleteResultSchema: z.ZodObject<{
372
+ disputeId: z.ZodString;
373
+ evidenceId: z.ZodString;
374
+ deleted: z.ZodBoolean;
375
+ }, z.core.$strict>;
376
+ /** Runtime validator for SearchTransactionsInput. */
377
+ declare const SearchTransactionsInputSchema: z.ZodObject<{
378
+ transactionId: z.ZodOptional<z.ZodString>;
379
+ orderId: z.ZodOptional<z.ZodString>;
380
+ first: z.ZodOptional<z.ZodNumber>;
381
+ after: z.ZodOptional<z.ZodString>;
382
+ }, z.core.$strict>;
383
+ /** Runtime validator for TransactionProfile. */
384
+ declare const TransactionProfileSchema: z.ZodObject<{
385
+ id: z.ZodString;
386
+ status: z.ZodString;
387
+ }, z.core.$strict>;
388
+ /** Runtime validator for TransactionsPage. */
389
+ declare const TransactionsPageSchema: z.ZodObject<{
390
+ transactions: z.ZodNullable<z.ZodArray<z.ZodObject<{
391
+ id: z.ZodString;
392
+ status: z.ZodString;
393
+ }, z.core.$strict>>>;
394
+ hasNextPage: z.ZodBoolean;
395
+ endCursor: z.ZodOptional<z.ZodString>;
396
+ }, z.core.$strict>;
397
+ /** Runtime validator for ChargePaymentMethodInput. */
398
+ declare const ChargePaymentMethodInputSchema: z.ZodObject<{
399
+ paymentMethodId: z.ZodString;
400
+ amount: z.ZodString;
401
+ merchantAccountId: z.ZodOptional<z.ZodString>;
402
+ orderId: z.ZodOptional<z.ZodString>;
403
+ }, z.core.$strict>;
404
+ /** Runtime validator for CaptureTransactionInput. */
405
+ declare const CaptureTransactionInputSchema: z.ZodObject<{
406
+ transactionId: z.ZodString;
407
+ amount: z.ZodOptional<z.ZodString>;
408
+ }, z.core.$strict>;
409
+ /** Runtime validator for GetTransactionInput. */
410
+ declare const GetTransactionInputSchema: z.ZodObject<{
411
+ transactionId: z.ZodString;
412
+ }, z.core.$strict>;
413
+ /** Runtime validator for RefundTransactionInput. */
414
+ declare const RefundTransactionInputSchema: z.ZodObject<{
415
+ transactionId: z.ZodString;
416
+ amount: z.ZodOptional<z.ZodString>;
417
+ orderId: z.ZodOptional<z.ZodString>;
418
+ }, z.core.$strict>;
419
+ /** Runtime validator for RefundProfile. */
420
+ declare const RefundProfileSchema: z.ZodObject<{
421
+ id: z.ZodString;
422
+ status: z.ZodString;
423
+ }, z.core.$strict>;
424
+ /** Runtime validator for VaultPaymentMethodInput. */
425
+ declare const VaultPaymentMethodInputSchema: z.ZodObject<{
426
+ paymentMethodId: z.ZodString;
427
+ customerId: z.ZodOptional<z.ZodString>;
428
+ }, z.core.$strict>;
429
+ /** Runtime validator for PaymentMethodProfile. */
430
+ declare const PaymentMethodProfileSchema: z.ZodObject<{
431
+ id: z.ZodString;
432
+ usage: z.ZodString;
433
+ }, z.core.$strict>;
434
+ /** Runtime validator for UpdateCreditCardCardholderNameInput. */
435
+ declare const UpdateCreditCardCardholderNameInputSchema: z.ZodObject<{
436
+ paymentMethodId: z.ZodString;
437
+ cardholderName: z.ZodString;
438
+ }, z.core.$strict>;
439
+ /** Runtime validator for UpdateCreditCardExpirationDateInput. */
440
+ declare const UpdateCreditCardExpirationDateInputSchema: z.ZodObject<{
441
+ paymentMethodId: z.ZodString;
442
+ expirationMonth: z.ZodString;
443
+ expirationYear: z.ZodString;
444
+ }, z.core.$strict>;
445
+ /** Runtime validator for UpdateCreditCardBillingAddressInput. */
446
+ declare const UpdateCreditCardBillingAddressInputSchema: z.ZodObject<{
447
+ paymentMethodId: z.ZodString;
448
+ addressLine1: z.ZodString;
449
+ city: z.ZodString;
450
+ state: z.ZodString;
451
+ postalCode: z.ZodString;
452
+ countryCode: z.ZodString;
453
+ }, z.core.$strict>;
454
+ /** Runtime validator for GetPaymentMethodInput. */
455
+ declare const GetPaymentMethodInputSchema: z.ZodObject<{
456
+ paymentMethodId: z.ZodString;
457
+ }, z.core.$strict>;
458
+ /** Runtime validator for PaymentMethodDeleteResult. */
459
+ declare const PaymentMethodDeleteResultSchema: z.ZodObject<{
460
+ paymentMethodId: z.ZodString;
461
+ deleted: z.ZodBoolean;
462
+ }, z.core.$strict>;
463
+ /** Runtime validator for CreateCustomerInput. */
464
+ declare const CreateCustomerInputSchema: z.ZodObject<{
465
+ firstName: z.ZodOptional<z.ZodString>;
466
+ lastName: z.ZodOptional<z.ZodString>;
467
+ email: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strict>;
469
+ /** Runtime validator for CustomerProfile. */
470
+ declare const CustomerProfileSchema: z.ZodObject<{
471
+ id: z.ZodString;
472
+ firstName: z.ZodString;
473
+ lastName: z.ZodString;
474
+ email: z.ZodString;
475
+ }, z.core.$strict>;
476
+ /** Runtime validator for UpdateCustomerInput. */
477
+ declare const UpdateCustomerInputSchema: z.ZodObject<{
478
+ customerId: z.ZodString;
479
+ firstName: z.ZodString;
480
+ lastName: z.ZodString;
481
+ email: z.ZodString;
482
+ }, z.core.$strict>;
483
+ /** Runtime validator for GetCustomerInput. */
484
+ declare const GetCustomerInputSchema: z.ZodObject<{
485
+ customerId: z.ZodString;
486
+ }, z.core.$strict>;
487
+ /** Runtime validator for CustomerDeleteResult. */
488
+ declare const CustomerDeleteResultSchema: z.ZodObject<{
489
+ customerId: z.ZodString;
490
+ deleted: z.ZodBoolean;
491
+ }, z.core.$strict>;
492
+ /** Runtime validator for GetRefundInput. */
493
+ declare const GetRefundInputSchema: z.ZodObject<{
494
+ refundId: z.ZodString;
495
+ }, z.core.$strict>;
496
+
497
+ /** Typed operations supplied by a client or mock. */
498
+ interface Operations {
499
+ /** Invoke getDispute through this connection. */
500
+ getDispute(): Query<GetDisputeInput, DisputeProfile>;
501
+ /** Invoke searchDisputes through this connection. */
502
+ searchDisputes(): Query<SearchDisputesInput, DisputesPage>;
503
+ /** Invoke acceptDispute through this connection. */
504
+ acceptDispute(): Mutation<GetDisputeInput, DisputeProfile>;
505
+ /** Invoke createDisputeTextEvidence through this connection. */
506
+ createDisputeTextEvidence(): Mutation<CreateDisputeTextEvidenceInput, DisputeTextEvidenceProfile>;
507
+ /** Invoke createDisputeFileEvidence through this connection. */
508
+ createDisputeFileEvidence(): Mutation<CreateDisputeFileEvidenceInput, DisputeEvidenceProfile>;
509
+ /** Invoke deleteDisputeEvidence through this connection. */
510
+ deleteDisputeEvidence(): Mutation<DeleteDisputeEvidenceInput, DisputeEvidenceDeleteResult>;
511
+ /** Invoke finalizeDispute through this connection. */
512
+ finalizeDispute(): Mutation<GetDisputeInput, DisputeProfile>;
513
+ /** Invoke searchTransactions through this connection. */
514
+ searchTransactions(): Query<SearchTransactionsInput, TransactionsPage>;
515
+ /** Invoke chargePaymentMethod through this connection. */
516
+ chargePaymentMethod(): Mutation<ChargePaymentMethodInput, TransactionProfile>;
517
+ /** Invoke captureTransaction through this connection. */
518
+ captureTransaction(): Mutation<CaptureTransactionInput, TransactionProfile>;
519
+ /** Invoke voidTransaction through this connection. */
520
+ voidTransaction(): Mutation<GetTransactionInput, TransactionProfile>;
521
+ /** Invoke refundTransaction through this connection. */
522
+ refundTransaction(): Mutation<RefundTransactionInput, RefundProfile>;
523
+ /** Invoke vaultPaymentMethod through this connection. */
524
+ vaultPaymentMethod(): Mutation<VaultPaymentMethodInput, PaymentMethodProfile>;
525
+ /** Invoke updateCreditCardCardholderName through this connection. */
526
+ updateCreditCardCardholderName(): Mutation<UpdateCreditCardCardholderNameInput, PaymentMethodProfile>;
527
+ /** Invoke updateCreditCardExpirationDate through this connection. */
528
+ updateCreditCardExpirationDate(): Mutation<UpdateCreditCardExpirationDateInput, PaymentMethodProfile>;
529
+ /** Invoke updateCreditCardBillingAddress through this connection. */
530
+ updateCreditCardBillingAddress(): Mutation<UpdateCreditCardBillingAddressInput, PaymentMethodProfile>;
531
+ /** Invoke deletePaymentMethodFromVault through this connection. */
532
+ deletePaymentMethodFromVault(): Mutation<GetPaymentMethodInput, PaymentMethodDeleteResult>;
533
+ /** Invoke createCustomer through this connection. */
534
+ createCustomer(): Mutation<CreateCustomerInput, CustomerProfile>;
535
+ /** Invoke updateCustomer through this connection. */
536
+ updateCustomer(): Mutation<UpdateCustomerInput, CustomerProfile>;
537
+ /** Invoke deleteCustomer through this connection. */
538
+ deleteCustomer(): Mutation<GetCustomerInput, CustomerDeleteResult>;
539
+ /** Invoke getCustomer through this connection. */
540
+ getCustomer(): Query<GetCustomerInput, CustomerProfile>;
541
+ /** Invoke getPaymentMethod through this connection. */
542
+ getPaymentMethod(): Query<GetPaymentMethodInput, PaymentMethodProfile>;
543
+ /** Invoke getRefund through this connection. */
544
+ getRefund(): Query<GetRefundInput, RefundProfile>;
545
+ /** Invoke getTransaction through this connection. */
546
+ getTransaction(): Query<GetTransactionInput, TransactionProfile>;
547
+ }
548
+ /** Named connector connection kept outside Flow state. */
549
+ declare class Connection<BoundOperations = Operations> {
550
+ /** Stable provider and connection name. */
551
+ readonly reference: ConnectionRef;
552
+ /** Bound provider operations. */
553
+ readonly operations: BoundOperations;
554
+ /** Validate a reference and bind operations. */
555
+ constructor(reference: ConnectionRef, operations: BoundOperations);
556
+ }
557
+ /** Bind a client to a named connection. */
558
+ declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
559
+ /** Bind scripted operations to a named connection. */
560
+ declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
561
+
562
+ export { GetPaymentMethodInputSchema as $, ChargePaymentMethodInputSchema as A, ConfigSchema as B, Connection as C, type DisputeProfile as D, CreateCustomerInputSchema as E, CreateDisputeFileEvidenceInputSchema as F, type GetDisputeInput as G, CreateDisputeTextEvidenceInputSchema as H, CredentialMaterialError as I, type CredentialSource as J, CustomerDeleteResultSchema as K, CustomerProfileSchema as L, DeleteDisputeEvidenceInputSchema as M, DisputeEvidenceDeleteResultSchema as N, type Operations as O, type PaymentMethodDeleteResult as P, DisputeEvidenceProfileSchema as Q, type RefundProfile as R, type SearchDisputesInput as S, type TransactionProfile as T, type UpdateCreditCardBillingAddressInput as U, type VaultPaymentMethodInput as V, DisputeProfileSchema as W, DisputeTextEvidenceProfileSchema as X, DisputesPageSchema as Y, GetCustomerInputSchema as Z, GetDisputeInputSchema as _, type CaptureTransactionInput as a, GetRefundInputSchema as a0, GetTransactionInputSchema as a1, PaymentMethodDeleteResultSchema as a2, PaymentMethodProfileSchema as a3, RefundProfileSchema as a4, RefundTransactionInputSchema as a5, SearchDisputesInputSchema as a6, SearchTransactionsInputSchema as a7, TransactionProfileSchema as a8, TransactionsPageSchema as a9, UpdateCreditCardBillingAddressInputSchema as aa, UpdateCreditCardCardholderNameInputSchema as ab, UpdateCreditCardExpirationDateInputSchema as ac, UpdateCustomerInputSchema as ad, VaultPaymentMethodInputSchema as ae, decodeCredentials as af, isCredentialMaterialError as ag, newConnection as ah, newConnectionWithOperations as ai, type ChargePaymentMethodInput as b, type CreateCustomerInput as c, type CustomerProfile as d, type CreateDisputeFileEvidenceInput as e, type DisputeEvidenceProfile as f, type CreateDisputeTextEvidenceInput as g, type DisputeTextEvidenceProfile as h, type GetCustomerInput as i, type CustomerDeleteResult as j, type DeleteDisputeEvidenceInput as k, type DisputeEvidenceDeleteResult as l, type GetPaymentMethodInput as m, type PaymentMethodProfile as n, type GetRefundInput as o, type GetTransactionInput as p, type RefundTransactionInput as q, type DisputesPage as r, type SearchTransactionsInput as s, type TransactionsPage as t, type UpdateCreditCardCardholderNameInput as u, type UpdateCreditCardExpirationDateInput as v, type UpdateCustomerInput as w, type Config as x, type Credentials as y, CaptureTransactionInputSchema as z };