@timbro/payments 0.1.0-next.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,6 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=openapi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.js","sourceRoot":"","sources":["../../src/generated/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,4 @@
1
+ export type { AcceptedExternalFiscalDocument, AttachExternalFiscalDocumentReferenceCommand, AttachRefundFiscalCoordinationCommand, CancelPaymentCommand, CapturedPayment, CheckoutPreferences, CorrectFiscalDocumentCommand, CreatePaymentCommand, CreateRefundCommand, CreateWebhookEndpointCommand, ExternalFiscalDocumentReference, FiscalBuyerInput, FiscalDelivery, FiscalDeliveryCommand, FiscalDeliveryStatus, FiscalDocument, FiscalDocumentCommand, FiscalDocumentIssuedWebhookEvent, FiscalDocumentOperatorRequiredWebhookEvent, FiscalDocumentRejectedWebhookEvent, FiscalGovernmentEntityKind, FiscalLine, FiscalProblemCode, Invoicing, IssuedFiscalDocument, ListMerchantAccountsOptions, ListPaymentsOptions, ListRefundsOptions, ListWebhookDeliveriesOptions, ListWebhookEndpointsOptions, MerchantAccount, MerchantAccountCapability, MerchantAccountCheckoutCapabilities, MerchantAccountList, MerchantAccountReadiness, MerchantCheckoutPolicy, MerchantReadinessBlocker, MerchantRncVerification, MerchantSplit, Money, Payment, PaymentCanceledWebhookEvent, PaymentList, PaymentOperatorRequiredWebhookEvent, PaymentProblem, PaymentProblemCode, PaymentStatus, PaymentSucceededWebhookEvent, ProblemCode, ProblemPointer, Refund, RefundFiscalCoordination, RefundFiscalCoordinationUpdatedWebhookEvent, RefundList, RefundOperatorRequiredWebhookEvent, RefundPaymentCommand, RefundProblemCode, RefundProviderOutcome, RefundStatus, ReplayWebhookEventsCommand, RotateWebhookEndpointSecretCommand, Sale, TimbroPayments, TimbroPaymentsOptions, WebhookDelivery, WebhookDeliveryList, WebhookDeliveryResultCode, WebhookDeliveryState, WebhookEndpoint, WebhookEndpointList, WebhookEndpointStatus, WebhookEvent, WebhookEventType, WebhookReplay, } from "./payments-client.ts";
2
+ export { createTimbroPayments, PaymentsError } from "./payments-client.ts";
3
+ export type { VerifyWebhookCommand, WebhookHeaders } from "./webhook-signature.ts";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,8BAA8B,EAC9B,4CAA4C,EAC5C,qCAAqC,EACrC,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,EACnB,4BAA4B,EAC5B,+BAA+B,EAC/B,gBAAgB,EAChB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,gCAAgC,EAChC,0CAA0C,EAC1C,kCAAkC,EAClC,0BAA0B,EAC1B,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,oBAAoB,EACpB,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,eAAe,EACf,yBAAyB,EACzB,mCAAmC,EACnC,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,KAAK,EACL,OAAO,EACP,2BAA2B,EAC3B,WAAW,EACX,mCAAmC,EACnC,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,4BAA4B,EAC5B,WAAW,EACX,cAAc,EACd,MAAM,EACN,wBAAwB,EACxB,2CAA2C,EAC3C,UAAU,EACV,kCAAkC,EAClC,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,YAAY,EACZ,0BAA0B,EAC1B,kCAAkC,EAClC,IAAI,EACJ,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,aAAa,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC3E,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { createTimbroPayments, PaymentsError } from "./payments-client.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA4EA,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,495 @@
1
+ import type { components, operations } from "./generated/openapi.ts";
2
+ import { type VerifyWebhookCommand } from "./webhook-signature.ts";
3
+ export type PaymentStatus = "requires_customer_action" | "processing" | "partially_authorized" | "authorized" | "capturing" | "releasing" | "partially_paid" | "verifying" | "succeeded" | "declined" | "canceled" | "expired";
4
+ export type Money = {
5
+ currency: string;
6
+ minorUnits: number;
7
+ };
8
+ export type FiscalDeliveryStatus = "waiting_for_document" | "pending" | "submitted" | "delivered" | "bounced" | "failed" | "suppressed";
9
+ export type FiscalProblemCode = "fiscal_service_unavailable" | "fiscal_processing_delayed" | "fiscal_document_rejected" | "fiscal_authority_rejected" | "fiscal_outcome_unknown" | "fiscal_intervention_required" | "fiscal_authority_incompatible" | "fiscal_processing_deadline_exceeded" | "fiscal_artifact_unavailable" | "fiscal_delivery_bounced" | "fiscal_delivery_failed" | "fiscal_delivery_suppressed";
10
+ export type FiscalDelivery = {
11
+ email: string;
12
+ status: FiscalDeliveryStatus;
13
+ problem?: {
14
+ code: FiscalProblemCode;
15
+ message: string;
16
+ };
17
+ };
18
+ export type FiscalLine = {
19
+ sourceLineId: string;
20
+ description: string;
21
+ quantity: string;
22
+ measurementUnit: "unit" | "kilogram" | "litre" | "metre" | "piece";
23
+ unitPriceMinorUnits: number;
24
+ unitPrice?: string;
25
+ itemKind: "good" | "service";
26
+ taxTreatment: "itbis_18" | "itbis_16" | "zero_rated" | "exempt" | "non_billable";
27
+ isLegalTipApplicable: boolean;
28
+ taxIncluded?: boolean;
29
+ group?: string;
30
+ };
31
+ export type Sale = components["schemas"]["Sale"];
32
+ export type Invoicing = components["schemas"]["Invoicing"];
33
+ export type FiscalBuyerInput = {
34
+ identityKind: "domestic";
35
+ taxId: string;
36
+ } | {
37
+ identityKind: "foreign";
38
+ foreignId: string;
39
+ legalName: string;
40
+ address?: string;
41
+ contactName?: string;
42
+ email?: string;
43
+ };
44
+ export type FiscalGovernmentEntityKind = "central_government" | "decentralized_or_autonomous" | "social_security" | "other_noncommercial_government";
45
+ export type FiscalDocumentCommand = {
46
+ issuanceMode: "required" | "deferred" | "externally_coordinated";
47
+ kind: "consumer" | "fiscal_credit" | "government";
48
+ merchantInvoiceNumber?: string;
49
+ merchantOrderNumber?: string;
50
+ lines: FiscalLine[];
51
+ buyer?: FiscalBuyerInput;
52
+ governmentEligibility?: {
53
+ entityKind: FiscalGovernmentEntityKind;
54
+ authorityReference: string;
55
+ };
56
+ deliveryEmail?: string;
57
+ };
58
+ type FiscalDocumentStatus = "requested" | "awaiting_merchant_issuance" | "accepted" | "processing" | "delayed" | "unavailable" | "issued" | "rejected" | "operator_required";
59
+ type FiscalDocumentBase = {
60
+ id: string;
61
+ object: "fiscal_document";
62
+ paymentId: string;
63
+ issuanceMode: "required" | "deferred" | "externally_coordinated";
64
+ kind: "consumer" | "fiscal_credit" | "government";
65
+ merchantInvoiceNumber?: string;
66
+ merchantOrderNumber?: string;
67
+ revision: number;
68
+ buyer?: components["schemas"]["FiscalBuyer"];
69
+ governmentEligibility?: components["schemas"]["FiscalGovernmentEligibility"];
70
+ lines: FiscalLine[];
71
+ createdAt: string;
72
+ updatedAt: string;
73
+ delivery: FiscalDelivery | null;
74
+ };
75
+ export type IssuedFiscalDocument = FiscalDocumentBase & {
76
+ status: "issued";
77
+ eNcf: string;
78
+ issuedAt: string;
79
+ signedDocument: {
80
+ sha256: string;
81
+ };
82
+ };
83
+ export type AcceptedExternalFiscalDocument = FiscalDocumentBase & {
84
+ status: "accepted";
85
+ externalReference: ExternalFiscalDocumentReference;
86
+ printedRepresentation: components["schemas"]["PrintedRepresentation"];
87
+ };
88
+ type NonIssuedFiscalDocument = FiscalDocumentBase & {
89
+ status: Exclude<FiscalDocumentStatus, "issued">;
90
+ eNcf?: never;
91
+ issuedAt?: never;
92
+ signedDocument?: never;
93
+ };
94
+ export type ExternalFiscalDocumentReference = components["schemas"]["ExternalFiscalDocumentReference"];
95
+ export type AttachExternalFiscalDocumentReferenceCommand = components["schemas"]["AttachExternalFiscalDocumentReferenceRequest"] & {
96
+ paymentId: string;
97
+ idempotencyKey: string;
98
+ };
99
+ export type FiscalDocument = IssuedFiscalDocument | AcceptedExternalFiscalDocument | NonIssuedFiscalDocument;
100
+ export type MerchantSplit = components["schemas"]["MerchantSplit"];
101
+ export type CapturedPayment = components["schemas"]["CapturedPayment"];
102
+ export type PaymentProblemCode = "settlement_amount_mismatch" | "settlement_record_not_found" | "settlement_amount_unverified";
103
+ export type PaymentProblem = {
104
+ code: PaymentProblemCode;
105
+ message: string;
106
+ };
107
+ export type Payment = {
108
+ id: string;
109
+ object: "payment";
110
+ status: PaymentStatus;
111
+ amount: Money;
112
+ voluntaryTip: Money;
113
+ totalAmount: Money;
114
+ saleReference: string;
115
+ returnUrl?: string;
116
+ serviceLabel?: string;
117
+ description?: string;
118
+ source: components["schemas"]["SaleSource"];
119
+ sale: Sale;
120
+ breakdown?: components["schemas"]["Breakdown"];
121
+ checkoutDisplay: {
122
+ mode: "itemized" | "grouped" | "amount_only";
123
+ wallets: Array<"apple_pay" | "google_pay">;
124
+ };
125
+ nextAction?: {
126
+ type: "redirect";
127
+ url: string;
128
+ expiresAt: string;
129
+ };
130
+ isLiveMode: boolean;
131
+ expiresAt: string;
132
+ createdAt: string;
133
+ updatedAt: string;
134
+ fiscalDocument: FiscalDocument | null;
135
+ paymentMethodSummary: components["schemas"]["PaymentMethodSummary"] | null;
136
+ capturedPayment?: CapturedPayment;
137
+ problem: PaymentProblem | null;
138
+ split: MerchantSplit | null;
139
+ };
140
+ export type RefundStatus = components["schemas"]["RefundStatus"];
141
+ export type RefundProviderOutcome = components["schemas"]["RefundProviderOutcome"];
142
+ export type RefundFiscalCoordination = components["schemas"]["RefundFiscalCoordination"];
143
+ export type RefundProblemCode = components["schemas"]["RefundProblem"]["code"];
144
+ export type Refund = components["schemas"]["Refund"];
145
+ export type AttachRefundFiscalCoordinationCommand = components["schemas"]["AttachRefundFiscalCoordinationRequest"] & {
146
+ refundId: string;
147
+ idempotencyKey: string;
148
+ };
149
+ export type CreateRefundCommand = components["schemas"]["CreateRefundRequest"] & {
150
+ idempotencyKey: string;
151
+ };
152
+ export type ListRefundsOptions = operations["listRefunds"]["parameters"]["query"];
153
+ export type RefundList = components["schemas"]["RefundListPage"];
154
+ export type ListPaymentsOptions = {
155
+ limit?: number;
156
+ cursor?: string;
157
+ status?: PaymentStatus[];
158
+ saleReference?: string;
159
+ merchantInvoiceNumber?: string;
160
+ merchantOrderNumber?: string;
161
+ createdAfter?: string;
162
+ createdBefore?: string;
163
+ };
164
+ export type PaymentList = {
165
+ object: "list";
166
+ data: Payment[];
167
+ hasMore: boolean;
168
+ nextCursor: string | null;
169
+ };
170
+ export type MerchantAccountReadiness = {
171
+ status: "ready" | "blocked";
172
+ blockers: MerchantReadinessBlocker[];
173
+ checks: Array<{
174
+ check: string;
175
+ status: "passed" | "failed" | "unknown";
176
+ detail?: string;
177
+ }>;
178
+ };
179
+ export type MerchantAccountCapability = {
180
+ purpose: "payment" | "refund";
181
+ credentialVersion?: number;
182
+ readiness: MerchantAccountReadiness;
183
+ };
184
+ export type MerchantReadinessBlocker = {
185
+ code: "merchant_account_disabled" | "active_credential_required" | "credential_material_invalid" | "test_live_mode_mismatch" | "callback_configuration_failed" | "callback_configuration_required" | "connectivity_check_failed" | "connectivity_check_required" | "provider_qualification_failed" | "provider_qualification_required" | "provider_adapter_unavailable";
186
+ owner: "merchant" | "timbro" | "provider";
187
+ detail?: string;
188
+ };
189
+ export type MerchantAccount = {
190
+ id: string;
191
+ object: "merchant_account";
192
+ provider: "azul" | "cardnet";
193
+ mode: "test" | "live";
194
+ lifecycle: "active" | "disabled";
195
+ readiness: MerchantAccountReadiness;
196
+ capabilities: MerchantAccountCapability[];
197
+ };
198
+ export type ListMerchantAccountsOptions = {
199
+ limit?: number;
200
+ cursor?: string;
201
+ };
202
+ export type MerchantAccountList = {
203
+ object: "list";
204
+ data: MerchantAccount[];
205
+ hasMore: boolean;
206
+ nextCursor: string | null;
207
+ };
208
+ export type WebhookEndpointStatus = "active" | "suspended" | "deleted";
209
+ export type WebhookEndpoint = {
210
+ id: string;
211
+ object: "webhook_endpoint";
212
+ url: string;
213
+ enabledEvents: WebhookEventType[];
214
+ status: WebhookEndpointStatus;
215
+ secretCreatedAt: string;
216
+ previousSecretExpiresAt: string | null;
217
+ createdAt: string;
218
+ secret?: string;
219
+ };
220
+ export type CreateWebhookEndpointCommand = {
221
+ url: string;
222
+ enabledEvents: WebhookEventType[];
223
+ idempotencyKey: string;
224
+ };
225
+ export type RotateWebhookEndpointSecretCommand = {
226
+ webhookEndpointId: string;
227
+ idempotencyKey: string;
228
+ };
229
+ export type ListWebhookEndpointsOptions = {
230
+ limit?: number;
231
+ cursor?: string;
232
+ };
233
+ export type WebhookEndpointList = {
234
+ object: "list";
235
+ data: WebhookEndpoint[];
236
+ hasMore: boolean;
237
+ nextCursor: string | null;
238
+ };
239
+ export type WebhookDeliveryState = "pending" | "processing" | "delivered" | "dead_lettered";
240
+ export type WebhookDeliveryResultCode = "delivered" | "attempt_budget_exhausted" | "delivery_deadline_exceeded";
241
+ export type WebhookDelivery = {
242
+ id: string;
243
+ object: "webhook_delivery";
244
+ eventId: string;
245
+ eventType: WebhookEventType;
246
+ state: WebhookDeliveryState;
247
+ attemptCount: number;
248
+ nextAttemptAt: string;
249
+ lastStatusCode: number | null;
250
+ resultCode: WebhookDeliveryResultCode | null;
251
+ lastResponseExcerpt: string | null;
252
+ replayId: string | null;
253
+ occurredAt: string;
254
+ createdAt: string;
255
+ };
256
+ export type ListWebhookDeliveriesOptions = {
257
+ limit?: number;
258
+ cursor?: string;
259
+ state?: WebhookDeliveryState[];
260
+ occurredAfter?: string;
261
+ occurredBefore?: string;
262
+ };
263
+ export type WebhookDeliveryList = {
264
+ object: "list";
265
+ data: WebhookDelivery[];
266
+ hasMore: boolean;
267
+ nextCursor: string | null;
268
+ };
269
+ export type ReplayWebhookEventsCommand = {
270
+ webhookEndpointId: string;
271
+ idempotencyKey: string;
272
+ } & ({
273
+ eventIds: string[];
274
+ } | {
275
+ occurredAfter: string;
276
+ occurredBefore: string;
277
+ });
278
+ export type WebhookReplay = {
279
+ id: string;
280
+ object: "webhook_replay";
281
+ webhookEndpointId: string;
282
+ deliveryCount: number;
283
+ createdAt: string;
284
+ };
285
+ export type FiscalDeliveryCommand = {
286
+ fiscalDocumentId: string;
287
+ recipientEmail: string;
288
+ idempotencyKey: string;
289
+ };
290
+ export type WebhookEventType = "payment.succeeded" | "payment.canceled" | "payment.operator_required" | "refund.operator_required" | "refund.fiscal_coordination_updated" | "fiscal_document.issued" | "fiscal_document.rejected" | "fiscal_document.operator_required";
291
+ type WebhookEventBase = {
292
+ id: string;
293
+ apiVersion: string;
294
+ occurredAt: string;
295
+ };
296
+ export type PaymentSucceededWebhookEvent = WebhookEventBase & {
297
+ type: "payment.succeeded";
298
+ data: {
299
+ id: string;
300
+ object: "payment";
301
+ };
302
+ };
303
+ export type PaymentCanceledWebhookEvent = WebhookEventBase & {
304
+ type: "payment.canceled";
305
+ data: {
306
+ id: string;
307
+ object: "payment";
308
+ };
309
+ };
310
+ export type PaymentOperatorRequiredWebhookEvent = WebhookEventBase & {
311
+ type: "payment.operator_required";
312
+ data: {
313
+ id: string;
314
+ object: "payment";
315
+ };
316
+ };
317
+ export type RefundOperatorRequiredWebhookEvent = WebhookEventBase & {
318
+ type: "refund.operator_required";
319
+ data: {
320
+ id: string;
321
+ object: "refund";
322
+ };
323
+ };
324
+ export type RefundFiscalCoordinationUpdatedWebhookEvent = WebhookEventBase & {
325
+ type: "refund.fiscal_coordination_updated";
326
+ data: {
327
+ id: string;
328
+ object: "refund";
329
+ };
330
+ };
331
+ export type FiscalDocumentIssuedWebhookEvent = WebhookEventBase & {
332
+ type: "fiscal_document.issued";
333
+ data: {
334
+ id: string;
335
+ object: "fiscal_document";
336
+ };
337
+ };
338
+ export type FiscalDocumentRejectedWebhookEvent = WebhookEventBase & {
339
+ type: "fiscal_document.rejected";
340
+ data: {
341
+ id: string;
342
+ object: "fiscal_document";
343
+ };
344
+ };
345
+ export type FiscalDocumentOperatorRequiredWebhookEvent = WebhookEventBase & {
346
+ type: "fiscal_document.operator_required";
347
+ data: {
348
+ id: string;
349
+ object: "fiscal_document";
350
+ };
351
+ };
352
+ export type WebhookEvent = PaymentSucceededWebhookEvent | PaymentCanceledWebhookEvent | PaymentOperatorRequiredWebhookEvent | RefundOperatorRequiredWebhookEvent | RefundFiscalCoordinationUpdatedWebhookEvent | FiscalDocumentIssuedWebhookEvent | FiscalDocumentRejectedWebhookEvent | FiscalDocumentOperatorRequiredWebhookEvent;
353
+ export type CreatePaymentCommand = {
354
+ source: components["schemas"]["SaleSource"];
355
+ sale: Sale;
356
+ invoicing: Invoicing | null;
357
+ returnUrl?: string;
358
+ serviceLabel?: string;
359
+ checkoutDisplay?: {
360
+ mode: "itemized" | "grouped" | "amount_only";
361
+ };
362
+ merchantAccountId?: string;
363
+ checkoutPreferences?: CheckoutPreferences;
364
+ testOptions?: {
365
+ threeDs?: boolean;
366
+ };
367
+ idempotencyKey: string;
368
+ };
369
+ export type RefundPaymentCommand = {
370
+ paymentId: string;
371
+ idempotencyKey: string;
372
+ };
373
+ export type CheckoutPreferences = {
374
+ splits?: boolean;
375
+ tips?: boolean;
376
+ wallets?: Array<"apple_pay" | "google_pay">;
377
+ };
378
+ export type MerchantAccountCheckoutCapabilities = {
379
+ object: "merchant_account_checkout_capabilities";
380
+ merchantAccountId: string;
381
+ splits: boolean;
382
+ wallets: Array<"apple_pay" | "google_pay">;
383
+ threeDsModes: Array<"enabled" | "disabled">;
384
+ };
385
+ export type MerchantCheckoutPolicy = components["schemas"]["MerchantCheckoutPolicy"];
386
+ export type CorrectFiscalDocumentCommand = Omit<FiscalDocumentCommand, "issuanceMode"> & {
387
+ fiscalDocumentId: string;
388
+ idempotencyKey: string;
389
+ };
390
+ export type CancelPaymentCommand = {
391
+ paymentId: string;
392
+ idempotencyKey: string;
393
+ };
394
+ export type MerchantRncVerification = components["schemas"]["MerchantRncVerification"];
395
+ /** The closed wire vocabulary, generated from the published `Problem` schema. */
396
+ type WireProblemCode = components["schemas"]["Problem"]["code"];
397
+ /** Codes this SDK raises for failures that never produced a problem body. */
398
+ type ClientProblemCode = "transport_failure" | "unexpected_http_error" | "artifact_digest_mismatch" | "collection_page_not_advancing";
399
+ export type ProblemCode = WireProblemCode | ClientProblemCode;
400
+ export type ProblemPointer = {
401
+ pointer: string;
402
+ code: ProblemCode;
403
+ };
404
+ export type TimbroPaymentsOptions = {
405
+ secretKey: string | undefined;
406
+ baseUrl?: string;
407
+ fetch?: typeof globalThis.fetch;
408
+ };
409
+ export declare class PaymentsError extends Error {
410
+ readonly status: number;
411
+ readonly code: ProblemCode;
412
+ readonly title: string;
413
+ readonly requestId: string | undefined;
414
+ readonly problems: readonly ProblemPointer[];
415
+ readonly retryAfterSeconds: number | undefined;
416
+ readonly isRetryable: boolean;
417
+ constructor(input: {
418
+ status: number;
419
+ code: ProblemCode;
420
+ title: string;
421
+ requestId?: string;
422
+ problems?: readonly ProblemPointer[];
423
+ retryAfterSeconds?: number;
424
+ cause?: unknown;
425
+ });
426
+ }
427
+ export type TimbroPayments = ReturnType<typeof createTimbroPayments>;
428
+ export declare function createTimbroPayments(options: TimbroPaymentsOptions): {
429
+ readonly payments: {
430
+ readonly create: (command: CreatePaymentCommand) => Promise<Payment>;
431
+ readonly retrieve: (paymentId: string) => Promise<Payment>;
432
+ readonly cancel: (command: CancelPaymentCommand) => Promise<Payment>;
433
+ readonly attachExternalFiscalDocumentReference: (command: AttachExternalFiscalDocumentReferenceCommand) => Promise<Payment>;
434
+ readonly refund: (command: RefundPaymentCommand) => Promise<Refund>;
435
+ readonly list: (params?: ListPaymentsOptions) => Promise<PaymentList>;
436
+ readonly listAll: (params?: Omit<ListPaymentsOptions, "cursor">) => AsyncIterable<Payment>;
437
+ };
438
+ readonly refunds: {
439
+ readonly create: (command: CreateRefundCommand) => Promise<Refund>;
440
+ readonly attachFiscalCoordination: (command: AttachRefundFiscalCoordinationCommand) => Promise<Refund>;
441
+ readonly retrieve: (refundId: string) => Promise<Refund>;
442
+ readonly list: (params?: ListRefundsOptions) => Promise<RefundList>;
443
+ readonly listAll: (params?: Omit<ListRefundsOptions, "cursor">) => AsyncIterable<Refund>;
444
+ };
445
+ readonly merchantAccounts: {
446
+ readonly list: (params?: ListMerchantAccountsOptions) => Promise<MerchantAccountList>;
447
+ readonly retrieveCheckoutCapabilities: (merchantAccountId: string) => Promise<MerchantAccountCheckoutCapabilities>;
448
+ readonly listAll: (params?: Omit<ListMerchantAccountsOptions, "cursor">) => AsyncIterable<MerchantAccount>;
449
+ readonly retrieve: (merchantAccountId: string) => Promise<MerchantAccount>;
450
+ };
451
+ readonly merchantCheckoutPolicy: {
452
+ readonly retrieve: () => Promise<MerchantCheckoutPolicy>;
453
+ };
454
+ readonly merchantOnboarding: {
455
+ readonly verifyRnc: (input: {
456
+ rnc: string;
457
+ }) => Promise<MerchantRncVerification>;
458
+ };
459
+ readonly webhookEndpoints: {
460
+ readonly create: (command: CreateWebhookEndpointCommand) => Promise<WebhookEndpoint>;
461
+ readonly rotateSecret: (command: RotateWebhookEndpointSecretCommand) => Promise<WebhookEndpoint>;
462
+ readonly suspend: (webhookEndpointId: string) => Promise<WebhookEndpoint>;
463
+ readonly reactivate: (webhookEndpointId: string) => Promise<WebhookEndpoint>;
464
+ readonly delete: (webhookEndpointId: string) => Promise<void>;
465
+ readonly list: (params?: ListWebhookEndpointsOptions) => Promise<WebhookEndpointList>;
466
+ readonly listAll: (params?: Omit<ListWebhookEndpointsOptions, "cursor">) => AsyncIterable<WebhookEndpoint>;
467
+ readonly retrieve: (webhookEndpointId: string) => Promise<WebhookEndpoint>;
468
+ readonly listDeliveries: (webhookEndpointId: string, params?: ListWebhookDeliveriesOptions) => Promise<WebhookDeliveryList>;
469
+ readonly listAllDeliveries: (webhookEndpointId: string, params?: Omit<ListWebhookDeliveriesOptions, "cursor">) => AsyncIterable<WebhookDelivery>;
470
+ readonly replay: (command: ReplayWebhookEventsCommand) => Promise<WebhookReplay>;
471
+ };
472
+ readonly fiscalDeliveries: {
473
+ readonly create: (command: FiscalDeliveryCommand) => Promise<FiscalDelivery>;
474
+ };
475
+ readonly fiscalDocuments: {
476
+ readonly retrieve: (fiscalDocumentId: string) => Promise<FiscalDocument>;
477
+ readonly correct: (command: CorrectFiscalDocumentCommand) => Promise<FiscalDocument>;
478
+ readonly retrieveSignedDocument: (fiscalDocumentId: string) => Promise<{
479
+ bytes: Uint8Array<ArrayBuffer>;
480
+ mediaType: string;
481
+ contentDigest: string;
482
+ }>;
483
+ readonly retrievePrintedRepresentation: (fiscalDocumentId: string) => Promise<{
484
+ bytes: Uint8Array<ArrayBuffer>;
485
+ mediaType: string;
486
+ contentDigest: string;
487
+ }>;
488
+ };
489
+ readonly webhooks: {
490
+ readonly verify: typeof verifyWebhook;
491
+ };
492
+ };
493
+ declare function verifyWebhook(command: VerifyWebhookCommand): WebhookEvent;
494
+ export {};
495
+ //# sourceMappingURL=payments-client.d.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