@klappay/types 1.0.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,1796 @@
1
+ import { z } from 'zod';
2
+
3
+ declare const ErrorPayloadSchema: z.ZodObject<{
4
+ error: z.ZodObject<{
5
+ code: z.ZodString;
6
+ message: z.ZodString;
7
+ param: z.ZodOptional<z.ZodString>;
8
+ }, "strip", z.ZodTypeAny, {
9
+ code: string;
10
+ message: string;
11
+ param?: string | undefined;
12
+ }, {
13
+ code: string;
14
+ message: string;
15
+ param?: string | undefined;
16
+ }>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ error: {
19
+ code: string;
20
+ message: string;
21
+ param?: string | undefined;
22
+ };
23
+ }, {
24
+ error: {
25
+ code: string;
26
+ message: string;
27
+ param?: string | undefined;
28
+ };
29
+ }>;
30
+ type ErrorPayload = z.infer<typeof ErrorPayloadSchema>;
31
+
32
+ declare const EnvironmentSchema: z.ZodEnum<["live", "test"]>;
33
+ type Environment = z.infer<typeof EnvironmentSchema>;
34
+
35
+ declare const NetworkSchema: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
36
+ type Network = z.infer<typeof NetworkSchema>;
37
+ declare const NETWORK_LABELS: Record<Network, string>;
38
+ declare const NETWORK_EXPLORERS: Record<Network, string>;
39
+ declare const EVM_NETWORKS: readonly ["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"];
40
+ type EvmNetwork = (typeof EVM_NETWORKS)[number];
41
+ declare const OPERATIONAL_NETWORKS: readonly ["base", "arbitrum", "optimism", "polygon", "ethereum", "avalanche", "bnb"];
42
+ type OperationalNetwork = (typeof OPERATIONAL_NETWORKS)[number];
43
+
44
+ declare const PAGINATION_LIMIT_MIN = 1;
45
+ declare const PAGINATION_LIMIT_MAX = 100;
46
+ declare const PAGINATION_LIMIT_DEFAULT = 20;
47
+ declare const PaginationQuerySchema: z.ZodObject<{
48
+ limit: z.ZodDefault<z.ZodNumber>;
49
+ cursor: z.ZodOptional<z.ZodString>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ limit: number;
52
+ cursor?: string | undefined;
53
+ }, {
54
+ limit?: number | undefined;
55
+ cursor?: string | undefined;
56
+ }>;
57
+ type PaginationQuery = z.infer<typeof PaginationQuerySchema>;
58
+ declare function paginatedSchema<T extends z.ZodTypeAny>(itemSchema: T): z.ZodObject<{
59
+ data: z.ZodArray<T, "many">;
60
+ nextCursor: z.ZodNullable<z.ZodString>;
61
+ hasMore: z.ZodBoolean;
62
+ }, "strip", z.ZodTypeAny, {
63
+ data: T["_output"][];
64
+ nextCursor: string | null;
65
+ hasMore: boolean;
66
+ }, {
67
+ data: T["_input"][];
68
+ nextCursor: string | null;
69
+ hasMore: boolean;
70
+ }>;
71
+
72
+ declare const TokenSchema: z.ZodEnum<["USDC", "USDT"]>;
73
+ type Token = z.infer<typeof TokenSchema>;
74
+ declare const TOKEN_DECIMALS = 6;
75
+ declare const TOKEN_ADDRESSES: Record<Token, Partial<Record<Network, Partial<Record<Environment, `0x${string}`>>>>>;
76
+
77
+ declare const ChargeStatusSchema: z.ZodEnum<["pending", "partially_paid", "confirmed", "expired", "underpaid"]>;
78
+ type ChargeStatus = z.infer<typeof ChargeStatusSchema>;
79
+ declare const SettlementStatusSchema: z.ZodEnum<["pending", "completed", "failed"]>;
80
+ type SettlementStatus = z.infer<typeof SettlementStatusSchema>;
81
+ declare const ChargeModeSchema: z.ZodEnum<["standard", "continuous"]>;
82
+ type ChargeMode = z.infer<typeof ChargeModeSchema>;
83
+ declare const CHARGE_EXPIRES_IN_MIN_SECONDS = 60;
84
+ declare const CHARGE_EXPIRES_IN_MAX_SECONDS: number;
85
+ declare const CHARGE_ACCEPTED_PAYMENTS_MAX = 14;
86
+ declare const AcceptedPaymentSchema: z.ZodObject<{
87
+ token: z.ZodEnum<["USDC", "USDT"]>;
88
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
89
+ }, "strip", z.ZodTypeAny, {
90
+ token: "USDC" | "USDT";
91
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
92
+ }, {
93
+ token: "USDC" | "USDT";
94
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
95
+ }>;
96
+ type AcceptedPayment = z.infer<typeof AcceptedPaymentSchema>;
97
+ declare const CHARGE_AMOUNT_MAX = 999999999999;
98
+ declare const CreateChargeSchema: z.ZodEffects<z.ZodObject<{
99
+ mode: z.ZodDefault<z.ZodEnum<["standard", "continuous"]>>;
100
+ amount: z.ZodOptional<z.ZodNumber>;
101
+ currency: z.ZodDefault<z.ZodLiteral<"USD">>;
102
+ acceptedPayments: z.ZodEffects<z.ZodArray<z.ZodObject<{
103
+ token: z.ZodEnum<["USDC", "USDT"]>;
104
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ token: "USDC" | "USDT";
107
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
108
+ }, {
109
+ token: "USDC" | "USDT";
110
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
111
+ }>, "many">, {
112
+ token: "USDC" | "USDT";
113
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
114
+ }[], {
115
+ token: "USDC" | "USDT";
116
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
117
+ }[]>;
118
+ expiresIn: z.ZodOptional<z.ZodNumber>;
119
+ idempotencyKey: z.ZodOptional<z.ZodString>;
120
+ externalRef: z.ZodOptional<z.ZodString>;
121
+ source: z.ZodOptional<z.ZodString>;
122
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ mode: "standard" | "continuous";
125
+ currency: "USD";
126
+ acceptedPayments: {
127
+ token: "USDC" | "USDT";
128
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
129
+ }[];
130
+ amount?: number | undefined;
131
+ expiresIn?: number | undefined;
132
+ idempotencyKey?: string | undefined;
133
+ externalRef?: string | undefined;
134
+ source?: string | undefined;
135
+ metadata?: Record<string, unknown> | undefined;
136
+ }, {
137
+ acceptedPayments: {
138
+ token: "USDC" | "USDT";
139
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
140
+ }[];
141
+ mode?: "standard" | "continuous" | undefined;
142
+ amount?: number | undefined;
143
+ currency?: "USD" | undefined;
144
+ expiresIn?: number | undefined;
145
+ idempotencyKey?: string | undefined;
146
+ externalRef?: string | undefined;
147
+ source?: string | undefined;
148
+ metadata?: Record<string, unknown> | undefined;
149
+ }>, {
150
+ mode: "standard" | "continuous";
151
+ currency: "USD";
152
+ acceptedPayments: {
153
+ token: "USDC" | "USDT";
154
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
155
+ }[];
156
+ amount?: number | undefined;
157
+ expiresIn?: number | undefined;
158
+ idempotencyKey?: string | undefined;
159
+ externalRef?: string | undefined;
160
+ source?: string | undefined;
161
+ metadata?: Record<string, unknown> | undefined;
162
+ }, {
163
+ acceptedPayments: {
164
+ token: "USDC" | "USDT";
165
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
166
+ }[];
167
+ mode?: "standard" | "continuous" | undefined;
168
+ amount?: number | undefined;
169
+ currency?: "USD" | undefined;
170
+ expiresIn?: number | undefined;
171
+ idempotencyKey?: string | undefined;
172
+ externalRef?: string | undefined;
173
+ source?: string | undefined;
174
+ metadata?: Record<string, unknown> | undefined;
175
+ }>;
176
+ type CreateChargeInput = z.infer<typeof CreateChargeSchema>;
177
+ declare const ChargeSchema: z.ZodObject<{
178
+ id: z.ZodString;
179
+ mode: z.ZodEnum<["standard", "continuous"]>;
180
+ amount: z.ZodNullable<z.ZodNumber>;
181
+ amountReceived: z.ZodNullable<z.ZodNumber>;
182
+ isOverpaid: z.ZodBoolean;
183
+ currency: z.ZodString;
184
+ acceptedPayments: z.ZodArray<z.ZodObject<{
185
+ token: z.ZodEnum<["USDC", "USDT"]>;
186
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ token: "USDC" | "USDT";
189
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
190
+ }, {
191
+ token: "USDC" | "USDT";
192
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
193
+ }>, "many">;
194
+ paidWith: z.ZodArray<z.ZodObject<{
195
+ token: z.ZodEnum<["USDC", "USDT"]>;
196
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
197
+ }, "strip", z.ZodTypeAny, {
198
+ token: "USDC" | "USDT";
199
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
200
+ }, {
201
+ token: "USDC" | "USDT";
202
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
203
+ }>, "many">;
204
+ address: z.ZodString;
205
+ status: z.ZodEnum<["pending", "partially_paid", "confirmed", "expired", "underpaid"]>;
206
+ settlementStatus: z.ZodNullable<z.ZodEnum<["pending", "completed", "failed"]>>;
207
+ environment: z.ZodEnum<["live", "test"]>;
208
+ apiKeyId: z.ZodNullable<z.ZodString>;
209
+ txHash: z.ZodNullable<z.ZodString>;
210
+ externalRef: z.ZodNullable<z.ZodString>;
211
+ source: z.ZodNullable<z.ZodString>;
212
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
213
+ createdAt: z.ZodString;
214
+ expiresAt: z.ZodNullable<z.ZodString>;
215
+ confirmedAt: z.ZodNullable<z.ZodString>;
216
+ settledAt: z.ZodNullable<z.ZodString>;
217
+ lastActivityAt: z.ZodString;
218
+ pausedAt: z.ZodNullable<z.ZodString>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
221
+ mode: "standard" | "continuous";
222
+ amount: number | null;
223
+ currency: string;
224
+ acceptedPayments: {
225
+ token: "USDC" | "USDT";
226
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
227
+ }[];
228
+ externalRef: string | null;
229
+ source: string | null;
230
+ metadata: Record<string, unknown> | null;
231
+ id: string;
232
+ amountReceived: number | null;
233
+ isOverpaid: boolean;
234
+ paidWith: {
235
+ token: "USDC" | "USDT";
236
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
237
+ }[];
238
+ address: string;
239
+ settlementStatus: "pending" | "completed" | "failed" | null;
240
+ environment: "live" | "test";
241
+ apiKeyId: string | null;
242
+ txHash: string | null;
243
+ createdAt: string;
244
+ expiresAt: string | null;
245
+ confirmedAt: string | null;
246
+ settledAt: string | null;
247
+ lastActivityAt: string;
248
+ pausedAt: string | null;
249
+ }, {
250
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
251
+ mode: "standard" | "continuous";
252
+ amount: number | null;
253
+ currency: string;
254
+ acceptedPayments: {
255
+ token: "USDC" | "USDT";
256
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
257
+ }[];
258
+ externalRef: string | null;
259
+ source: string | null;
260
+ metadata: Record<string, unknown> | null;
261
+ id: string;
262
+ amountReceived: number | null;
263
+ isOverpaid: boolean;
264
+ paidWith: {
265
+ token: "USDC" | "USDT";
266
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
267
+ }[];
268
+ address: string;
269
+ settlementStatus: "pending" | "completed" | "failed" | null;
270
+ environment: "live" | "test";
271
+ apiKeyId: string | null;
272
+ txHash: string | null;
273
+ createdAt: string;
274
+ expiresAt: string | null;
275
+ confirmedAt: string | null;
276
+ settledAt: string | null;
277
+ lastActivityAt: string;
278
+ pausedAt: string | null;
279
+ }>;
280
+ type Charge = z.infer<typeof ChargeSchema>;
281
+ declare const ListChargesSchema: z.ZodObject<{
282
+ status: z.ZodOptional<z.ZodEnum<["pending", "partially_paid", "confirmed", "expired", "underpaid"]>>;
283
+ token: z.ZodOptional<z.ZodEnum<["USDC", "USDT"]>>;
284
+ network: z.ZodOptional<z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>>;
285
+ environment: z.ZodOptional<z.ZodEnum<["live", "test"]>>;
286
+ since: z.ZodOptional<z.ZodString>;
287
+ isOverpaid: z.ZodOptional<z.ZodEffects<z.ZodEnum<["true", "false"]>, boolean, "true" | "false">>;
288
+ } & {
289
+ limit: z.ZodDefault<z.ZodNumber>;
290
+ cursor: z.ZodOptional<z.ZodString>;
291
+ }, "strip", z.ZodTypeAny, {
292
+ limit: number;
293
+ status?: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid" | undefined;
294
+ cursor?: string | undefined;
295
+ token?: "USDC" | "USDT" | undefined;
296
+ network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
297
+ isOverpaid?: boolean | undefined;
298
+ environment?: "live" | "test" | undefined;
299
+ since?: string | undefined;
300
+ }, {
301
+ status?: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid" | undefined;
302
+ limit?: number | undefined;
303
+ cursor?: string | undefined;
304
+ token?: "USDC" | "USDT" | undefined;
305
+ network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
306
+ isOverpaid?: "true" | "false" | undefined;
307
+ environment?: "live" | "test" | undefined;
308
+ since?: string | undefined;
309
+ }>;
310
+ type ListChargesInput = z.infer<typeof ListChargesSchema>;
311
+ declare const PaginatedChargesSchema: z.ZodObject<{
312
+ data: z.ZodArray<z.ZodObject<{
313
+ id: z.ZodString;
314
+ mode: z.ZodEnum<["standard", "continuous"]>;
315
+ amount: z.ZodNullable<z.ZodNumber>;
316
+ amountReceived: z.ZodNullable<z.ZodNumber>;
317
+ isOverpaid: z.ZodBoolean;
318
+ currency: z.ZodString;
319
+ acceptedPayments: z.ZodArray<z.ZodObject<{
320
+ token: z.ZodEnum<["USDC", "USDT"]>;
321
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
322
+ }, "strip", z.ZodTypeAny, {
323
+ token: "USDC" | "USDT";
324
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
325
+ }, {
326
+ token: "USDC" | "USDT";
327
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
328
+ }>, "many">;
329
+ paidWith: z.ZodArray<z.ZodObject<{
330
+ token: z.ZodEnum<["USDC", "USDT"]>;
331
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ token: "USDC" | "USDT";
334
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
335
+ }, {
336
+ token: "USDC" | "USDT";
337
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
338
+ }>, "many">;
339
+ address: z.ZodString;
340
+ status: z.ZodEnum<["pending", "partially_paid", "confirmed", "expired", "underpaid"]>;
341
+ settlementStatus: z.ZodNullable<z.ZodEnum<["pending", "completed", "failed"]>>;
342
+ environment: z.ZodEnum<["live", "test"]>;
343
+ apiKeyId: z.ZodNullable<z.ZodString>;
344
+ txHash: z.ZodNullable<z.ZodString>;
345
+ externalRef: z.ZodNullable<z.ZodString>;
346
+ source: z.ZodNullable<z.ZodString>;
347
+ metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
348
+ createdAt: z.ZodString;
349
+ expiresAt: z.ZodNullable<z.ZodString>;
350
+ confirmedAt: z.ZodNullable<z.ZodString>;
351
+ settledAt: z.ZodNullable<z.ZodString>;
352
+ lastActivityAt: z.ZodString;
353
+ pausedAt: z.ZodNullable<z.ZodString>;
354
+ }, "strip", z.ZodTypeAny, {
355
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
356
+ mode: "standard" | "continuous";
357
+ amount: number | null;
358
+ currency: string;
359
+ acceptedPayments: {
360
+ token: "USDC" | "USDT";
361
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
362
+ }[];
363
+ externalRef: string | null;
364
+ source: string | null;
365
+ metadata: Record<string, unknown> | null;
366
+ id: string;
367
+ amountReceived: number | null;
368
+ isOverpaid: boolean;
369
+ paidWith: {
370
+ token: "USDC" | "USDT";
371
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
372
+ }[];
373
+ address: string;
374
+ settlementStatus: "pending" | "completed" | "failed" | null;
375
+ environment: "live" | "test";
376
+ apiKeyId: string | null;
377
+ txHash: string | null;
378
+ createdAt: string;
379
+ expiresAt: string | null;
380
+ confirmedAt: string | null;
381
+ settledAt: string | null;
382
+ lastActivityAt: string;
383
+ pausedAt: string | null;
384
+ }, {
385
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
386
+ mode: "standard" | "continuous";
387
+ amount: number | null;
388
+ currency: string;
389
+ acceptedPayments: {
390
+ token: "USDC" | "USDT";
391
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
392
+ }[];
393
+ externalRef: string | null;
394
+ source: string | null;
395
+ metadata: Record<string, unknown> | null;
396
+ id: string;
397
+ amountReceived: number | null;
398
+ isOverpaid: boolean;
399
+ paidWith: {
400
+ token: "USDC" | "USDT";
401
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
402
+ }[];
403
+ address: string;
404
+ settlementStatus: "pending" | "completed" | "failed" | null;
405
+ environment: "live" | "test";
406
+ apiKeyId: string | null;
407
+ txHash: string | null;
408
+ createdAt: string;
409
+ expiresAt: string | null;
410
+ confirmedAt: string | null;
411
+ settledAt: string | null;
412
+ lastActivityAt: string;
413
+ pausedAt: string | null;
414
+ }>, "many">;
415
+ nextCursor: z.ZodNullable<z.ZodString>;
416
+ hasMore: z.ZodBoolean;
417
+ }, "strip", z.ZodTypeAny, {
418
+ data: {
419
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
420
+ mode: "standard" | "continuous";
421
+ amount: number | null;
422
+ currency: string;
423
+ acceptedPayments: {
424
+ token: "USDC" | "USDT";
425
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
426
+ }[];
427
+ externalRef: string | null;
428
+ source: string | null;
429
+ metadata: Record<string, unknown> | null;
430
+ id: string;
431
+ amountReceived: number | null;
432
+ isOverpaid: boolean;
433
+ paidWith: {
434
+ token: "USDC" | "USDT";
435
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
436
+ }[];
437
+ address: string;
438
+ settlementStatus: "pending" | "completed" | "failed" | null;
439
+ environment: "live" | "test";
440
+ apiKeyId: string | null;
441
+ txHash: string | null;
442
+ createdAt: string;
443
+ expiresAt: string | null;
444
+ confirmedAt: string | null;
445
+ settledAt: string | null;
446
+ lastActivityAt: string;
447
+ pausedAt: string | null;
448
+ }[];
449
+ nextCursor: string | null;
450
+ hasMore: boolean;
451
+ }, {
452
+ data: {
453
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
454
+ mode: "standard" | "continuous";
455
+ amount: number | null;
456
+ currency: string;
457
+ acceptedPayments: {
458
+ token: "USDC" | "USDT";
459
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
460
+ }[];
461
+ externalRef: string | null;
462
+ source: string | null;
463
+ metadata: Record<string, unknown> | null;
464
+ id: string;
465
+ amountReceived: number | null;
466
+ isOverpaid: boolean;
467
+ paidWith: {
468
+ token: "USDC" | "USDT";
469
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
470
+ }[];
471
+ address: string;
472
+ settlementStatus: "pending" | "completed" | "failed" | null;
473
+ environment: "live" | "test";
474
+ apiKeyId: string | null;
475
+ txHash: string | null;
476
+ createdAt: string;
477
+ expiresAt: string | null;
478
+ confirmedAt: string | null;
479
+ settledAt: string | null;
480
+ lastActivityAt: string;
481
+ pausedAt: string | null;
482
+ }[];
483
+ nextCursor: string | null;
484
+ hasMore: boolean;
485
+ }>;
486
+ type PaginatedCharges = z.infer<typeof PaginatedChargesSchema>;
487
+ declare const ChargeStatusEventSchema: z.ZodObject<{
488
+ id: z.ZodString;
489
+ status: z.ZodEnum<["pending", "partially_paid", "confirmed", "expired", "underpaid"]>;
490
+ settlementStatus: z.ZodNullable<z.ZodEnum<["pending", "completed", "failed"]>>;
491
+ amount: z.ZodNullable<z.ZodNumber>;
492
+ amountReceived: z.ZodNullable<z.ZodNumber>;
493
+ paidWith: z.ZodArray<z.ZodObject<{
494
+ token: z.ZodEnum<["USDC", "USDT"]>;
495
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ token: "USDC" | "USDT";
498
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
499
+ }, {
500
+ token: "USDC" | "USDT";
501
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
502
+ }>, "many">;
503
+ }, "strip", z.ZodTypeAny, {
504
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
505
+ amount: number | null;
506
+ id: string;
507
+ amountReceived: number | null;
508
+ paidWith: {
509
+ token: "USDC" | "USDT";
510
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
511
+ }[];
512
+ settlementStatus: "pending" | "completed" | "failed" | null;
513
+ }, {
514
+ status: "pending" | "partially_paid" | "confirmed" | "expired" | "underpaid";
515
+ amount: number | null;
516
+ id: string;
517
+ amountReceived: number | null;
518
+ paidWith: {
519
+ token: "USDC" | "USDT";
520
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
521
+ }[];
522
+ settlementStatus: "pending" | "completed" | "failed" | null;
523
+ }>;
524
+ type ChargeStatusEvent = z.infer<typeof ChargeStatusEventSchema>;
525
+
526
+ declare const PendingDistributionRecipientSchema: z.ZodObject<{
527
+ address: z.ZodString;
528
+ percentAllocation: z.ZodNumber;
529
+ }, "strip", z.ZodTypeAny, {
530
+ address: string;
531
+ percentAllocation: number;
532
+ }, {
533
+ address: string;
534
+ percentAllocation: number;
535
+ }>;
536
+ declare const PendingDistributionSchema: z.ZodObject<{
537
+ splitAddress: z.ZodString;
538
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
539
+ token: z.ZodEnum<["USDC", "USDT"]>;
540
+ recipients: z.ZodArray<z.ZodObject<{
541
+ address: z.ZodString;
542
+ percentAllocation: z.ZodNumber;
543
+ }, "strip", z.ZodTypeAny, {
544
+ address: string;
545
+ percentAllocation: number;
546
+ }, {
547
+ address: string;
548
+ percentAllocation: number;
549
+ }>, "many">;
550
+ distributorFeePercent: z.ZodNumber;
551
+ estimatedRewardAmount: z.ZodNumber;
552
+ availableSince: z.ZodString;
553
+ graceEndsAt: z.ZodString;
554
+ }, "strip", z.ZodTypeAny, {
555
+ token: "USDC" | "USDT";
556
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
557
+ splitAddress: string;
558
+ recipients: {
559
+ address: string;
560
+ percentAllocation: number;
561
+ }[];
562
+ distributorFeePercent: number;
563
+ estimatedRewardAmount: number;
564
+ availableSince: string;
565
+ graceEndsAt: string;
566
+ }, {
567
+ token: "USDC" | "USDT";
568
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
569
+ splitAddress: string;
570
+ recipients: {
571
+ address: string;
572
+ percentAllocation: number;
573
+ }[];
574
+ distributorFeePercent: number;
575
+ estimatedRewardAmount: number;
576
+ availableSince: string;
577
+ graceEndsAt: string;
578
+ }>;
579
+ type PendingDistribution = z.infer<typeof PendingDistributionSchema>;
580
+ declare const PendingDistributionEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
581
+ type: z.ZodLiteral<"distribution.available">;
582
+ distribution: z.ZodObject<{
583
+ splitAddress: z.ZodString;
584
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
585
+ token: z.ZodEnum<["USDC", "USDT"]>;
586
+ recipients: z.ZodArray<z.ZodObject<{
587
+ address: z.ZodString;
588
+ percentAllocation: z.ZodNumber;
589
+ }, "strip", z.ZodTypeAny, {
590
+ address: string;
591
+ percentAllocation: number;
592
+ }, {
593
+ address: string;
594
+ percentAllocation: number;
595
+ }>, "many">;
596
+ distributorFeePercent: z.ZodNumber;
597
+ estimatedRewardAmount: z.ZodNumber;
598
+ availableSince: z.ZodString;
599
+ graceEndsAt: z.ZodString;
600
+ }, "strip", z.ZodTypeAny, {
601
+ token: "USDC" | "USDT";
602
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
603
+ splitAddress: string;
604
+ recipients: {
605
+ address: string;
606
+ percentAllocation: number;
607
+ }[];
608
+ distributorFeePercent: number;
609
+ estimatedRewardAmount: number;
610
+ availableSince: string;
611
+ graceEndsAt: string;
612
+ }, {
613
+ token: "USDC" | "USDT";
614
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
615
+ splitAddress: string;
616
+ recipients: {
617
+ address: string;
618
+ percentAllocation: number;
619
+ }[];
620
+ distributorFeePercent: number;
621
+ estimatedRewardAmount: number;
622
+ availableSince: string;
623
+ graceEndsAt: string;
624
+ }>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ type: "distribution.available";
627
+ distribution: {
628
+ token: "USDC" | "USDT";
629
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
630
+ splitAddress: string;
631
+ recipients: {
632
+ address: string;
633
+ percentAllocation: number;
634
+ }[];
635
+ distributorFeePercent: number;
636
+ estimatedRewardAmount: number;
637
+ availableSince: string;
638
+ graceEndsAt: string;
639
+ };
640
+ }, {
641
+ type: "distribution.available";
642
+ distribution: {
643
+ token: "USDC" | "USDT";
644
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
645
+ splitAddress: string;
646
+ recipients: {
647
+ address: string;
648
+ percentAllocation: number;
649
+ }[];
650
+ distributorFeePercent: number;
651
+ estimatedRewardAmount: number;
652
+ availableSince: string;
653
+ graceEndsAt: string;
654
+ };
655
+ }>, z.ZodObject<{
656
+ type: z.ZodLiteral<"distribution.claimed">;
657
+ splitAddress: z.ZodString;
658
+ }, "strip", z.ZodTypeAny, {
659
+ type: "distribution.claimed";
660
+ splitAddress: string;
661
+ }, {
662
+ type: "distribution.claimed";
663
+ splitAddress: string;
664
+ }>]>;
665
+ type PendingDistributionEvent = z.infer<typeof PendingDistributionEventSchema>;
666
+
667
+ declare const ChargeWebhookEventTypeSchema: z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>;
668
+ declare const AccountWebhookEventTypeSchema: z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>;
669
+ declare const WebhookDeliveryEventTypeSchema: z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>;
670
+ declare const SecurityWebhookEventTypeSchema: z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>;
671
+ declare const WebhookEventTypeSchema: z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
672
+ type WebhookEventType = z.infer<typeof WebhookEventTypeSchema>;
673
+ declare const WebhookCategorySchema: z.ZodEnum<["payments", "account", "webhooks", "security"]>;
674
+ type WebhookCategory = z.infer<typeof WebhookCategorySchema>;
675
+ /** Single source of truth for which category each event belongs to — see `webhook-events.test.ts` for the completeness check. */
676
+ declare const EVENT_CATEGORY_MAP: Record<"charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed", "payments" | "account" | "webhooks" | "security">;
677
+ declare const WEBHOOK_EVENT_CATEGORIES: Record<WebhookCategory, readonly WebhookEventType[]>;
678
+ declare const TriggerableChargeEventSchema: z.ZodEnum<["charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid"]>;
679
+ type TriggerableChargeEvent = z.infer<typeof TriggerableChargeEventSchema>;
680
+ declare const NonChargeTriggerableEventSchema: z.ZodUnion<[z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
681
+ type NonChargeTriggerableEvent = z.infer<typeof NonChargeTriggerableEventSchema>;
682
+
683
+ declare const UserRoleSchema: z.ZodEnum<["owner", "admin", "member"]>;
684
+ type UserRole = z.infer<typeof UserRoleSchema>;
685
+ declare const UpdateUserRoleSchema: z.ZodObject<{
686
+ role: z.ZodEnum<["owner", "admin", "member"]>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ role: "owner" | "admin" | "member";
689
+ }, {
690
+ role: "owner" | "admin" | "member";
691
+ }>;
692
+ type UpdateUserRoleInput = z.infer<typeof UpdateUserRoleSchema>;
693
+ declare const UserSchema: z.ZodObject<{
694
+ id: z.ZodString;
695
+ email: z.ZodString;
696
+ name: z.ZodNullable<z.ZodString>;
697
+ role: z.ZodEnum<["owner", "admin", "member"]>;
698
+ emailVerifiedAt: z.ZodNullable<z.ZodString>;
699
+ createdAt: z.ZodString;
700
+ }, "strip", z.ZodTypeAny, {
701
+ id: string;
702
+ createdAt: string;
703
+ role: "owner" | "admin" | "member";
704
+ email: string;
705
+ name: string | null;
706
+ emailVerifiedAt: string | null;
707
+ }, {
708
+ id: string;
709
+ createdAt: string;
710
+ role: "owner" | "admin" | "member";
711
+ email: string;
712
+ name: string | null;
713
+ emailVerifiedAt: string | null;
714
+ }>;
715
+ type User = z.infer<typeof UserSchema>;
716
+ declare const ListUsersSchema: z.ZodObject<{
717
+ limit: z.ZodDefault<z.ZodNumber>;
718
+ cursor: z.ZodOptional<z.ZodString>;
719
+ }, "strip", z.ZodTypeAny, {
720
+ limit: number;
721
+ cursor?: string | undefined;
722
+ }, {
723
+ limit?: number | undefined;
724
+ cursor?: string | undefined;
725
+ }>;
726
+ type ListUsersInput = z.infer<typeof ListUsersSchema>;
727
+ declare const PaginatedUsersSchema: z.ZodObject<{
728
+ data: z.ZodArray<z.ZodObject<{
729
+ id: z.ZodString;
730
+ email: z.ZodString;
731
+ name: z.ZodNullable<z.ZodString>;
732
+ role: z.ZodEnum<["owner", "admin", "member"]>;
733
+ emailVerifiedAt: z.ZodNullable<z.ZodString>;
734
+ createdAt: z.ZodString;
735
+ }, "strip", z.ZodTypeAny, {
736
+ id: string;
737
+ createdAt: string;
738
+ role: "owner" | "admin" | "member";
739
+ email: string;
740
+ name: string | null;
741
+ emailVerifiedAt: string | null;
742
+ }, {
743
+ id: string;
744
+ createdAt: string;
745
+ role: "owner" | "admin" | "member";
746
+ email: string;
747
+ name: string | null;
748
+ emailVerifiedAt: string | null;
749
+ }>, "many">;
750
+ nextCursor: z.ZodNullable<z.ZodString>;
751
+ hasMore: z.ZodBoolean;
752
+ }, "strip", z.ZodTypeAny, {
753
+ data: {
754
+ id: string;
755
+ createdAt: string;
756
+ role: "owner" | "admin" | "member";
757
+ email: string;
758
+ name: string | null;
759
+ emailVerifiedAt: string | null;
760
+ }[];
761
+ nextCursor: string | null;
762
+ hasMore: boolean;
763
+ }, {
764
+ data: {
765
+ id: string;
766
+ createdAt: string;
767
+ role: "owner" | "admin" | "member";
768
+ email: string;
769
+ name: string | null;
770
+ emailVerifiedAt: string | null;
771
+ }[];
772
+ nextCursor: string | null;
773
+ hasMore: boolean;
774
+ }>;
775
+ type PaginatedUsers = z.infer<typeof PaginatedUsersSchema>;
776
+
777
+ type PayoutAddressChangedData = {
778
+ organizationId: string;
779
+ from: string | null;
780
+ to: string;
781
+ };
782
+ type ApiKeyEventData = {
783
+ apiKeyId: string;
784
+ name: string;
785
+ environment: z.infer<typeof EnvironmentSchema>;
786
+ hint: string;
787
+ };
788
+ type WebhookConfigEventData = {
789
+ webhookId: string;
790
+ url: string;
791
+ };
792
+ type WebhookHealthEventData = {
793
+ webhookId: string;
794
+ url: string;
795
+ failureRatio?: number;
796
+ };
797
+ type FeeTierUpdatedData = {
798
+ organizationId: string;
799
+ previousFeePercent: number;
800
+ newFeePercent: number;
801
+ };
802
+ type MemberEventData = {
803
+ userId: string;
804
+ email: string;
805
+ role: z.infer<typeof UserRoleSchema>;
806
+ };
807
+ type MemberRoleChangedData = MemberEventData & {
808
+ previousRole: z.infer<typeof UserRoleSchema>;
809
+ };
810
+ type MemberInvitedData = {
811
+ organizationId: string;
812
+ email: string;
813
+ role: z.infer<typeof UserRoleSchema>;
814
+ invitedByUserId: string;
815
+ };
816
+ type AuthLoginData = {
817
+ userId: string;
818
+ ipAddress: string | null;
819
+ };
820
+ type AuthLoginFailedData = {
821
+ email: string;
822
+ ipAddress: string | null;
823
+ };
824
+ type AuthSuspiciousActivityData = AuthLoginData & {
825
+ previousIpAddress: string | null;
826
+ };
827
+ type AuthEmailVerifiedData = {
828
+ userId: string;
829
+ email: string;
830
+ };
831
+ type AuthPasswordResetRequestedData = {
832
+ userId: string;
833
+ email: string;
834
+ };
835
+ type AuthPasswordResetCompletedData = {
836
+ userId: string;
837
+ email: string;
838
+ };
839
+ type ChargePausedData = {
840
+ chargeId: string;
841
+ lastActivityAt: string;
842
+ pausedAt: string;
843
+ };
844
+ type ChargeReactivatedData = {
845
+ chargeId: string;
846
+ reactivatedAt: string;
847
+ };
848
+ type ChargeContributionReceivedData = {
849
+ chargeId: string;
850
+ token: Token;
851
+ network: Network;
852
+ amount: number;
853
+ txHash: string;
854
+ payerAddress: string;
855
+ };
856
+ type ChargeContributionSettledData = {
857
+ chargeId: string;
858
+ token: Token;
859
+ network: Network;
860
+ amount: number;
861
+ txHash: string;
862
+ distributorAddress: string | null;
863
+ };
864
+ type WebhookEventDataMap = {
865
+ 'charge.created': Charge;
866
+ 'charge.partially_paid': Charge;
867
+ 'charge.confirmed': Charge;
868
+ 'charge.expired': Charge;
869
+ 'charge.underpaid': Charge;
870
+ 'charge.settled': Charge;
871
+ 'charge.settlement_failed': Charge;
872
+ 'charge.overpaid': Charge;
873
+ 'charge.paused': ChargePausedData;
874
+ 'charge.reactivated': ChargeReactivatedData;
875
+ 'charge.contribution_received': ChargeContributionReceivedData;
876
+ 'charge.contribution_settled': ChargeContributionSettledData;
877
+ 'payout_address.changed': PayoutAddressChangedData;
878
+ 'api_key.created': ApiKeyEventData;
879
+ 'api_key.revoked': ApiKeyEventData;
880
+ 'webhook.created': WebhookConfigEventData;
881
+ 'webhook.deleted': WebhookConfigEventData;
882
+ 'webhook.secret_rotated': WebhookConfigEventData;
883
+ 'webhook.delivery_failed': WebhookHealthEventData;
884
+ 'webhook.delivery_recovered': WebhookHealthEventData;
885
+ 'webhook.endpoint_unhealthy': WebhookHealthEventData;
886
+ 'fee_tier.updated': FeeTierUpdatedData;
887
+ 'auth.login': AuthLoginData;
888
+ 'auth.login_failed': AuthLoginFailedData;
889
+ 'auth.suspicious_activity': AuthSuspiciousActivityData;
890
+ 'auth.email_verified': AuthEmailVerifiedData;
891
+ 'auth.password_reset_requested': AuthPasswordResetRequestedData;
892
+ 'auth.password_reset_completed': AuthPasswordResetCompletedData;
893
+ 'member.removed': MemberEventData;
894
+ 'member.role_changed': MemberRoleChangedData;
895
+ 'member.invited': MemberInvitedData;
896
+ };
897
+ type TypedWebhookPayload = {
898
+ [E in WebhookEventType]: {
899
+ id: string;
900
+ event: E;
901
+ createdAt: string;
902
+ data: WebhookEventDataMap[E];
903
+ };
904
+ }[WebhookEventType];
905
+
906
+ declare const WEBHOOK_EVENTS_WILDCARD = "*";
907
+ declare const CreateWebhookSchema: z.ZodEffects<z.ZodObject<{
908
+ url: z.ZodString;
909
+ events: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, z.ZodLiteral<"*">]>, "many">>;
910
+ eventCategories: z.ZodDefault<z.ZodArray<z.ZodEnum<["payments", "account", "webhooks", "security"]>, "many">>;
911
+ excludeEvents: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, "many">>;
912
+ }, "strip", z.ZodTypeAny, {
913
+ url: string;
914
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | "*")[];
915
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
916
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
917
+ }, {
918
+ url: string;
919
+ events?: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | "*")[] | undefined;
920
+ eventCategories?: ("payments" | "account" | "webhooks" | "security")[] | undefined;
921
+ excludeEvents?: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[] | undefined;
922
+ }>, {
923
+ url: string;
924
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | "*")[];
925
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
926
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
927
+ }, {
928
+ url: string;
929
+ events?: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | "*")[] | undefined;
930
+ eventCategories?: ("payments" | "account" | "webhooks" | "security")[] | undefined;
931
+ excludeEvents?: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[] | undefined;
932
+ }>;
933
+ type CreateWebhookInput = z.infer<typeof CreateWebhookSchema>;
934
+ declare const WebhookSchema: z.ZodObject<{
935
+ id: z.ZodString;
936
+ url: z.ZodString;
937
+ events: z.ZodArray<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, "many">;
938
+ eventCategories: z.ZodArray<z.ZodEnum<["payments", "account", "webhooks", "security"]>, "many">;
939
+ excludeEvents: z.ZodArray<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, "many">;
940
+ isWildcard: z.ZodBoolean;
941
+ secret: z.ZodString;
942
+ createdAt: z.ZodString;
943
+ }, "strip", z.ZodTypeAny, {
944
+ id: string;
945
+ createdAt: string;
946
+ url: string;
947
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
948
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
949
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
950
+ isWildcard: boolean;
951
+ secret: string;
952
+ }, {
953
+ id: string;
954
+ createdAt: string;
955
+ url: string;
956
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
957
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
958
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
959
+ isWildcard: boolean;
960
+ secret: string;
961
+ }>;
962
+ type Webhook = z.infer<typeof WebhookSchema>;
963
+ declare const WebhookListItemSchema: z.ZodObject<Omit<{
964
+ id: z.ZodString;
965
+ url: z.ZodString;
966
+ events: z.ZodArray<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, "many">;
967
+ eventCategories: z.ZodArray<z.ZodEnum<["payments", "account", "webhooks", "security"]>, "many">;
968
+ excludeEvents: z.ZodArray<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>, "many">;
969
+ isWildcard: z.ZodBoolean;
970
+ secret: z.ZodString;
971
+ createdAt: z.ZodString;
972
+ }, "secret"> & {
973
+ hint: z.ZodString;
974
+ }, "strip", z.ZodTypeAny, {
975
+ id: string;
976
+ createdAt: string;
977
+ url: string;
978
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
979
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
980
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
981
+ isWildcard: boolean;
982
+ hint: string;
983
+ }, {
984
+ id: string;
985
+ createdAt: string;
986
+ url: string;
987
+ events: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
988
+ eventCategories: ("payments" | "account" | "webhooks" | "security")[];
989
+ excludeEvents: ("charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed")[];
990
+ isWildcard: boolean;
991
+ hint: string;
992
+ }>;
993
+ type WebhookListItem = z.infer<typeof WebhookListItemSchema>;
994
+ declare const WebhookPayloadSchema: z.ZodObject<{
995
+ id: z.ZodString;
996
+ event: z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
997
+ createdAt: z.ZodString;
998
+ data: z.ZodUnknown;
999
+ }, "strip", z.ZodTypeAny, {
1000
+ id: string;
1001
+ createdAt: string;
1002
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1003
+ data?: unknown;
1004
+ }, {
1005
+ id: string;
1006
+ createdAt: string;
1007
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1008
+ data?: unknown;
1009
+ }>;
1010
+ type WebhookPayload = z.infer<typeof WebhookPayloadSchema>;
1011
+ declare const WebhookDeliveryStatusSchema: z.ZodEnum<["pending", "delivered", "failed"]>;
1012
+ type WebhookDeliveryStatus = z.infer<typeof WebhookDeliveryStatusSchema>;
1013
+ declare const WebhookDeliverySchema: z.ZodObject<{
1014
+ id: z.ZodString;
1015
+ webhookId: z.ZodString;
1016
+ event: z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
1017
+ status: z.ZodEnum<["pending", "delivered", "failed"]>;
1018
+ attempts: z.ZodNumber;
1019
+ responseCode: z.ZodNullable<z.ZodNumber>;
1020
+ nextRetryAt: z.ZodNullable<z.ZodString>;
1021
+ deliveredAt: z.ZodNullable<z.ZodString>;
1022
+ createdAt: z.ZodString;
1023
+ }, "strip", z.ZodTypeAny, {
1024
+ status: "pending" | "failed" | "delivered";
1025
+ id: string;
1026
+ createdAt: string;
1027
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1028
+ webhookId: string;
1029
+ attempts: number;
1030
+ responseCode: number | null;
1031
+ nextRetryAt: string | null;
1032
+ deliveredAt: string | null;
1033
+ }, {
1034
+ status: "pending" | "failed" | "delivered";
1035
+ id: string;
1036
+ createdAt: string;
1037
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1038
+ webhookId: string;
1039
+ attempts: number;
1040
+ responseCode: number | null;
1041
+ nextRetryAt: string | null;
1042
+ deliveredAt: string | null;
1043
+ }>;
1044
+ type WebhookDelivery = z.infer<typeof WebhookDeliverySchema>;
1045
+ declare const ListWebhookDeliveriesSchema: z.ZodObject<{
1046
+ limit: z.ZodDefault<z.ZodNumber>;
1047
+ cursor: z.ZodOptional<z.ZodString>;
1048
+ }, "strip", z.ZodTypeAny, {
1049
+ limit: number;
1050
+ cursor?: string | undefined;
1051
+ }, {
1052
+ limit?: number | undefined;
1053
+ cursor?: string | undefined;
1054
+ }>;
1055
+ type ListWebhookDeliveriesInput = z.infer<typeof ListWebhookDeliveriesSchema>;
1056
+ declare const PaginatedWebhookDeliveriesSchema: z.ZodObject<{
1057
+ data: z.ZodArray<z.ZodObject<{
1058
+ id: z.ZodString;
1059
+ webhookId: z.ZodString;
1060
+ event: z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
1061
+ status: z.ZodEnum<["pending", "delivered", "failed"]>;
1062
+ attempts: z.ZodNumber;
1063
+ responseCode: z.ZodNullable<z.ZodNumber>;
1064
+ nextRetryAt: z.ZodNullable<z.ZodString>;
1065
+ deliveredAt: z.ZodNullable<z.ZodString>;
1066
+ createdAt: z.ZodString;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ status: "pending" | "failed" | "delivered";
1069
+ id: string;
1070
+ createdAt: string;
1071
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1072
+ webhookId: string;
1073
+ attempts: number;
1074
+ responseCode: number | null;
1075
+ nextRetryAt: string | null;
1076
+ deliveredAt: string | null;
1077
+ }, {
1078
+ status: "pending" | "failed" | "delivered";
1079
+ id: string;
1080
+ createdAt: string;
1081
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1082
+ webhookId: string;
1083
+ attempts: number;
1084
+ responseCode: number | null;
1085
+ nextRetryAt: string | null;
1086
+ deliveredAt: string | null;
1087
+ }>, "many">;
1088
+ nextCursor: z.ZodNullable<z.ZodString>;
1089
+ hasMore: z.ZodBoolean;
1090
+ }, "strip", z.ZodTypeAny, {
1091
+ data: {
1092
+ status: "pending" | "failed" | "delivered";
1093
+ id: string;
1094
+ createdAt: string;
1095
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1096
+ webhookId: string;
1097
+ attempts: number;
1098
+ responseCode: number | null;
1099
+ nextRetryAt: string | null;
1100
+ deliveredAt: string | null;
1101
+ }[];
1102
+ nextCursor: string | null;
1103
+ hasMore: boolean;
1104
+ }, {
1105
+ data: {
1106
+ status: "pending" | "failed" | "delivered";
1107
+ id: string;
1108
+ createdAt: string;
1109
+ event: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1110
+ webhookId: string;
1111
+ attempts: number;
1112
+ responseCode: number | null;
1113
+ nextRetryAt: string | null;
1114
+ deliveredAt: string | null;
1115
+ }[];
1116
+ nextCursor: string | null;
1117
+ hasMore: boolean;
1118
+ }>;
1119
+ type PaginatedWebhookDeliveries = z.infer<typeof PaginatedWebhookDeliveriesSchema>;
1120
+
1121
+ declare const CreateApiKeySchema: z.ZodObject<{
1122
+ name: z.ZodString;
1123
+ environment: z.ZodEnum<["live", "test"]>;
1124
+ }, "strip", z.ZodTypeAny, {
1125
+ environment: "live" | "test";
1126
+ name: string;
1127
+ }, {
1128
+ environment: "live" | "test";
1129
+ name: string;
1130
+ }>;
1131
+ type CreateApiKeyInput = z.infer<typeof CreateApiKeySchema>;
1132
+ declare const ApiKeySchema: z.ZodObject<{
1133
+ id: z.ZodString;
1134
+ name: z.ZodString;
1135
+ environment: z.ZodEnum<["live", "test"]>;
1136
+ key: z.ZodOptional<z.ZodString>;
1137
+ hint: z.ZodString;
1138
+ createdAt: z.ZodString;
1139
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1140
+ createdByUserId: z.ZodNullable<z.ZodString>;
1141
+ }, "strip", z.ZodTypeAny, {
1142
+ id: string;
1143
+ environment: "live" | "test";
1144
+ createdAt: string;
1145
+ name: string;
1146
+ hint: string;
1147
+ lastUsedAt: string | null;
1148
+ createdByUserId: string | null;
1149
+ key?: string | undefined;
1150
+ }, {
1151
+ id: string;
1152
+ environment: "live" | "test";
1153
+ createdAt: string;
1154
+ name: string;
1155
+ hint: string;
1156
+ lastUsedAt: string | null;
1157
+ createdByUserId: string | null;
1158
+ key?: string | undefined;
1159
+ }>;
1160
+ type ApiKey = z.infer<typeof ApiKeySchema>;
1161
+ declare const ListApiKeysSchema: z.ZodObject<{
1162
+ limit: z.ZodDefault<z.ZodNumber>;
1163
+ cursor: z.ZodOptional<z.ZodString>;
1164
+ }, "strip", z.ZodTypeAny, {
1165
+ limit: number;
1166
+ cursor?: string | undefined;
1167
+ }, {
1168
+ limit?: number | undefined;
1169
+ cursor?: string | undefined;
1170
+ }>;
1171
+ type ListApiKeysInput = z.infer<typeof ListApiKeysSchema>;
1172
+ declare const PaginatedApiKeysSchema: z.ZodObject<{
1173
+ data: z.ZodArray<z.ZodObject<{
1174
+ id: z.ZodString;
1175
+ name: z.ZodString;
1176
+ environment: z.ZodEnum<["live", "test"]>;
1177
+ key: z.ZodOptional<z.ZodString>;
1178
+ hint: z.ZodString;
1179
+ createdAt: z.ZodString;
1180
+ lastUsedAt: z.ZodNullable<z.ZodString>;
1181
+ createdByUserId: z.ZodNullable<z.ZodString>;
1182
+ }, "strip", z.ZodTypeAny, {
1183
+ id: string;
1184
+ environment: "live" | "test";
1185
+ createdAt: string;
1186
+ name: string;
1187
+ hint: string;
1188
+ lastUsedAt: string | null;
1189
+ createdByUserId: string | null;
1190
+ key?: string | undefined;
1191
+ }, {
1192
+ id: string;
1193
+ environment: "live" | "test";
1194
+ createdAt: string;
1195
+ name: string;
1196
+ hint: string;
1197
+ lastUsedAt: string | null;
1198
+ createdByUserId: string | null;
1199
+ key?: string | undefined;
1200
+ }>, "many">;
1201
+ nextCursor: z.ZodNullable<z.ZodString>;
1202
+ hasMore: z.ZodBoolean;
1203
+ }, "strip", z.ZodTypeAny, {
1204
+ data: {
1205
+ id: string;
1206
+ environment: "live" | "test";
1207
+ createdAt: string;
1208
+ name: string;
1209
+ hint: string;
1210
+ lastUsedAt: string | null;
1211
+ createdByUserId: string | null;
1212
+ key?: string | undefined;
1213
+ }[];
1214
+ nextCursor: string | null;
1215
+ hasMore: boolean;
1216
+ }, {
1217
+ data: {
1218
+ id: string;
1219
+ environment: "live" | "test";
1220
+ createdAt: string;
1221
+ name: string;
1222
+ hint: string;
1223
+ lastUsedAt: string | null;
1224
+ createdByUserId: string | null;
1225
+ key?: string | undefined;
1226
+ }[];
1227
+ nextCursor: string | null;
1228
+ hasMore: boolean;
1229
+ }>;
1230
+ type PaginatedApiKeys = z.infer<typeof PaginatedApiKeysSchema>;
1231
+
1232
+ declare const NormalizedEmailSchema: z.ZodEffects<z.ZodString, string, string>;
1233
+ declare const SignupSchema: z.ZodObject<{
1234
+ email: z.ZodEffects<z.ZodString, string, string>;
1235
+ password: z.ZodString;
1236
+ }, "strip", z.ZodTypeAny, {
1237
+ email: string;
1238
+ password: string;
1239
+ }, {
1240
+ email: string;
1241
+ password: string;
1242
+ }>;
1243
+ type SignupInput = z.infer<typeof SignupSchema>;
1244
+ declare const LoginSchema: z.ZodObject<{
1245
+ email: z.ZodEffects<z.ZodString, string, string>;
1246
+ password: z.ZodString;
1247
+ }, "strip", z.ZodTypeAny, {
1248
+ email: string;
1249
+ password: string;
1250
+ }, {
1251
+ email: string;
1252
+ password: string;
1253
+ }>;
1254
+ type LoginInput = z.infer<typeof LoginSchema>;
1255
+ declare const VerifyEmailSchema: z.ZodObject<{
1256
+ token: z.ZodString;
1257
+ }, "strip", z.ZodTypeAny, {
1258
+ token: string;
1259
+ }, {
1260
+ token: string;
1261
+ }>;
1262
+ type VerifyEmailInput = z.infer<typeof VerifyEmailSchema>;
1263
+ declare const ForgotPasswordSchema: z.ZodObject<{
1264
+ email: z.ZodEffects<z.ZodString, string, string>;
1265
+ }, "strip", z.ZodTypeAny, {
1266
+ email: string;
1267
+ }, {
1268
+ email: string;
1269
+ }>;
1270
+ type ForgotPasswordInput = z.infer<typeof ForgotPasswordSchema>;
1271
+ declare const ResetPasswordSchema: z.ZodObject<{
1272
+ token: z.ZodString;
1273
+ newPassword: z.ZodString;
1274
+ }, "strip", z.ZodTypeAny, {
1275
+ token: string;
1276
+ newPassword: string;
1277
+ }, {
1278
+ token: string;
1279
+ newPassword: string;
1280
+ }>;
1281
+ type ResetPasswordInput = z.infer<typeof ResetPasswordSchema>;
1282
+ declare const MessageResponseSchema: z.ZodObject<{
1283
+ message: z.ZodString;
1284
+ }, "strip", z.ZodTypeAny, {
1285
+ message: string;
1286
+ }, {
1287
+ message: string;
1288
+ }>;
1289
+ type MessageResponse = z.infer<typeof MessageResponseSchema>;
1290
+ declare const AuthResponseSchema: z.ZodObject<{
1291
+ token: z.ZodString;
1292
+ user: z.ZodObject<Omit<{
1293
+ id: z.ZodString;
1294
+ email: z.ZodString;
1295
+ name: z.ZodNullable<z.ZodString>;
1296
+ role: z.ZodEnum<["owner", "admin", "member"]>;
1297
+ emailVerifiedAt: z.ZodNullable<z.ZodString>;
1298
+ createdAt: z.ZodString;
1299
+ }, "createdAt" | "role">, "strip", z.ZodTypeAny, {
1300
+ id: string;
1301
+ email: string;
1302
+ name: string | null;
1303
+ emailVerifiedAt: string | null;
1304
+ }, {
1305
+ id: string;
1306
+ email: string;
1307
+ name: string | null;
1308
+ emailVerifiedAt: string | null;
1309
+ }>;
1310
+ }, "strip", z.ZodTypeAny, {
1311
+ token: string;
1312
+ user: {
1313
+ id: string;
1314
+ email: string;
1315
+ name: string | null;
1316
+ emailVerifiedAt: string | null;
1317
+ };
1318
+ }, {
1319
+ token: string;
1320
+ user: {
1321
+ id: string;
1322
+ email: string;
1323
+ name: string | null;
1324
+ emailVerifiedAt: string | null;
1325
+ };
1326
+ }>;
1327
+ type AuthResponse = z.infer<typeof AuthResponseSchema>;
1328
+
1329
+ declare const UpdateOrganizationSchema: z.ZodObject<{
1330
+ name: z.ZodOptional<z.ZodString>;
1331
+ payoutAddress: z.ZodOptional<z.ZodString>;
1332
+ }, "strip", z.ZodTypeAny, {
1333
+ name?: string | undefined;
1334
+ payoutAddress?: string | undefined;
1335
+ }, {
1336
+ name?: string | undefined;
1337
+ payoutAddress?: string | undefined;
1338
+ }>;
1339
+ type UpdateOrganizationInput = z.infer<typeof UpdateOrganizationSchema>;
1340
+ declare const OrganizationSchema: z.ZodObject<{
1341
+ id: z.ZodString;
1342
+ name: z.ZodString;
1343
+ payoutAddress: z.ZodNullable<z.ZodString>;
1344
+ currentFeePercent: z.ZodNumber;
1345
+ feeUpdatedAt: z.ZodNullable<z.ZodString>;
1346
+ createdAt: z.ZodString;
1347
+ }, "strip", z.ZodTypeAny, {
1348
+ id: string;
1349
+ createdAt: string;
1350
+ name: string;
1351
+ payoutAddress: string | null;
1352
+ currentFeePercent: number;
1353
+ feeUpdatedAt: string | null;
1354
+ }, {
1355
+ id: string;
1356
+ createdAt: string;
1357
+ name: string;
1358
+ payoutAddress: string | null;
1359
+ currentFeePercent: number;
1360
+ feeUpdatedAt: string | null;
1361
+ }>;
1362
+ type Organization = z.infer<typeof OrganizationSchema>;
1363
+ declare const OrganizationWithRoleSchema: z.ZodObject<{
1364
+ id: z.ZodString;
1365
+ name: z.ZodString;
1366
+ payoutAddress: z.ZodNullable<z.ZodString>;
1367
+ currentFeePercent: z.ZodNumber;
1368
+ feeUpdatedAt: z.ZodNullable<z.ZodString>;
1369
+ createdAt: z.ZodString;
1370
+ } & {
1371
+ role: z.ZodEnum<["owner", "admin", "member"]>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ id: string;
1374
+ createdAt: string;
1375
+ role: "owner" | "admin" | "member";
1376
+ name: string;
1377
+ payoutAddress: string | null;
1378
+ currentFeePercent: number;
1379
+ feeUpdatedAt: string | null;
1380
+ }, {
1381
+ id: string;
1382
+ createdAt: string;
1383
+ role: "owner" | "admin" | "member";
1384
+ name: string;
1385
+ payoutAddress: string | null;
1386
+ currentFeePercent: number;
1387
+ feeUpdatedAt: string | null;
1388
+ }>;
1389
+ type OrganizationWithRole = z.infer<typeof OrganizationWithRoleSchema>;
1390
+ declare const PaginatedOrganizationsSchema: z.ZodObject<{
1391
+ data: z.ZodArray<z.ZodObject<{
1392
+ id: z.ZodString;
1393
+ name: z.ZodString;
1394
+ payoutAddress: z.ZodNullable<z.ZodString>;
1395
+ currentFeePercent: z.ZodNumber;
1396
+ feeUpdatedAt: z.ZodNullable<z.ZodString>;
1397
+ createdAt: z.ZodString;
1398
+ } & {
1399
+ role: z.ZodEnum<["owner", "admin", "member"]>;
1400
+ }, "strip", z.ZodTypeAny, {
1401
+ id: string;
1402
+ createdAt: string;
1403
+ role: "owner" | "admin" | "member";
1404
+ name: string;
1405
+ payoutAddress: string | null;
1406
+ currentFeePercent: number;
1407
+ feeUpdatedAt: string | null;
1408
+ }, {
1409
+ id: string;
1410
+ createdAt: string;
1411
+ role: "owner" | "admin" | "member";
1412
+ name: string;
1413
+ payoutAddress: string | null;
1414
+ currentFeePercent: number;
1415
+ feeUpdatedAt: string | null;
1416
+ }>, "many">;
1417
+ nextCursor: z.ZodNullable<z.ZodString>;
1418
+ hasMore: z.ZodBoolean;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ data: {
1421
+ id: string;
1422
+ createdAt: string;
1423
+ role: "owner" | "admin" | "member";
1424
+ name: string;
1425
+ payoutAddress: string | null;
1426
+ currentFeePercent: number;
1427
+ feeUpdatedAt: string | null;
1428
+ }[];
1429
+ nextCursor: string | null;
1430
+ hasMore: boolean;
1431
+ }, {
1432
+ data: {
1433
+ id: string;
1434
+ createdAt: string;
1435
+ role: "owner" | "admin" | "member";
1436
+ name: string;
1437
+ payoutAddress: string | null;
1438
+ currentFeePercent: number;
1439
+ feeUpdatedAt: string | null;
1440
+ }[];
1441
+ nextCursor: string | null;
1442
+ hasMore: boolean;
1443
+ }>;
1444
+ type PaginatedOrganizations = z.infer<typeof PaginatedOrganizationsSchema>;
1445
+ declare const ListOrganizationsSchema: z.ZodObject<{
1446
+ limit: z.ZodDefault<z.ZodNumber>;
1447
+ cursor: z.ZodOptional<z.ZodString>;
1448
+ }, "strip", z.ZodTypeAny, {
1449
+ limit: number;
1450
+ cursor?: string | undefined;
1451
+ }, {
1452
+ limit?: number | undefined;
1453
+ cursor?: string | undefined;
1454
+ }>;
1455
+ type ListOrganizationsInput = z.infer<typeof ListOrganizationsSchema>;
1456
+
1457
+ declare const InviteUserSchema: z.ZodObject<{
1458
+ email: z.ZodEffects<z.ZodString, string, string>;
1459
+ role: z.ZodDefault<z.ZodEnum<["owner", "admin", "member"]>>;
1460
+ }, "strip", z.ZodTypeAny, {
1461
+ role: "owner" | "admin" | "member";
1462
+ email: string;
1463
+ }, {
1464
+ email: string;
1465
+ role?: "owner" | "admin" | "member" | undefined;
1466
+ }>;
1467
+ type InviteUserInput = z.infer<typeof InviteUserSchema>;
1468
+ declare const AcceptInvitationSchema: z.ZodObject<{
1469
+ token: z.ZodString;
1470
+ password: z.ZodOptional<z.ZodString>;
1471
+ }, "strip", z.ZodTypeAny, {
1472
+ token: string;
1473
+ password?: string | undefined;
1474
+ }, {
1475
+ token: string;
1476
+ password?: string | undefined;
1477
+ }>;
1478
+ type AcceptInvitationInput = z.infer<typeof AcceptInvitationSchema>;
1479
+ declare const InvitationSchema: z.ZodObject<{
1480
+ id: z.ZodString;
1481
+ organizationId: z.ZodString;
1482
+ email: z.ZodString;
1483
+ role: z.ZodEnum<["owner", "admin", "member"]>;
1484
+ invitedByUserId: z.ZodString;
1485
+ expiresAt: z.ZodString;
1486
+ createdAt: z.ZodString;
1487
+ }, "strip", z.ZodTypeAny, {
1488
+ id: string;
1489
+ createdAt: string;
1490
+ expiresAt: string;
1491
+ role: "owner" | "admin" | "member";
1492
+ email: string;
1493
+ organizationId: string;
1494
+ invitedByUserId: string;
1495
+ }, {
1496
+ id: string;
1497
+ createdAt: string;
1498
+ expiresAt: string;
1499
+ role: "owner" | "admin" | "member";
1500
+ email: string;
1501
+ organizationId: string;
1502
+ invitedByUserId: string;
1503
+ }>;
1504
+ type Invitation = z.infer<typeof InvitationSchema>;
1505
+
1506
+ declare const TransactionSourceSchema: z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>;
1507
+ type TransactionSource = z.infer<typeof TransactionSourceSchema>;
1508
+ declare const TimelineEventTypeSchema: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed"]>;
1509
+ type TimelineEventType = z.infer<typeof TimelineEventTypeSchema>;
1510
+ declare const TimelineEventSchema: z.ZodObject<{
1511
+ type: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed"]>;
1512
+ at: z.ZodString;
1513
+ txHash: z.ZodOptional<z.ZodString>;
1514
+ amount: z.ZodOptional<z.ZodNumber>;
1515
+ source: z.ZodOptional<z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>>;
1516
+ token: z.ZodOptional<z.ZodEnum<["USDC", "USDT"]>>;
1517
+ network: z.ZodOptional<z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>>;
1518
+ causedTransition: z.ZodOptional<z.ZodBoolean>;
1519
+ event: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["charge.created", "charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid", "charge.paused", "charge.reactivated", "charge.contribution_received", "charge.contribution_settled"]>, z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>>;
1520
+ responseCode: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1521
+ attempts: z.ZodOptional<z.ZodNumber>;
1522
+ }, "strip", z.ZodTypeAny, {
1523
+ type: "charge.created" | "charge.expired" | "transaction.detected" | "split.distributed" | "webhook.dispatched" | "webhook.delivered" | "webhook.failed";
1524
+ at: string;
1525
+ token?: "USDC" | "USDT" | undefined;
1526
+ network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
1527
+ amount?: number | undefined;
1528
+ source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
1529
+ txHash?: string | undefined;
1530
+ event?: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | undefined;
1531
+ attempts?: number | undefined;
1532
+ responseCode?: number | null | undefined;
1533
+ causedTransition?: boolean | undefined;
1534
+ }, {
1535
+ type: "charge.created" | "charge.expired" | "transaction.detected" | "split.distributed" | "webhook.dispatched" | "webhook.delivered" | "webhook.failed";
1536
+ at: string;
1537
+ token?: "USDC" | "USDT" | undefined;
1538
+ network?: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb" | undefined;
1539
+ amount?: number | undefined;
1540
+ source?: "moralis_webhook" | "reconciliation_job" | "sandbox" | undefined;
1541
+ txHash?: string | undefined;
1542
+ event?: "charge.created" | "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid" | "charge.paused" | "charge.reactivated" | "charge.contribution_received" | "charge.contribution_settled" | "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed" | undefined;
1543
+ attempts?: number | undefined;
1544
+ responseCode?: number | null | undefined;
1545
+ causedTransition?: boolean | undefined;
1546
+ }>;
1547
+ type TimelineEvent = z.infer<typeof TimelineEventSchema>;
1548
+
1549
+ declare const SplitRecipientRoleSchema: z.ZodEnum<["merchant", "klap_fee", "distributor_incentive"]>;
1550
+ type SplitRecipientRole = z.infer<typeof SplitRecipientRoleSchema>;
1551
+ declare const VerifySplitEntrySchema: z.ZodObject<{
1552
+ role: z.ZodEnum<["merchant", "klap_fee", "distributor_incentive"]>;
1553
+ address: z.ZodNullable<z.ZodString>;
1554
+ percentAllocation: z.ZodNumber;
1555
+ amountUSD: z.ZodNumber;
1556
+ }, "strip", z.ZodTypeAny, {
1557
+ address: string | null;
1558
+ percentAllocation: number;
1559
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1560
+ amountUSD: number;
1561
+ }, {
1562
+ address: string | null;
1563
+ percentAllocation: number;
1564
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1565
+ amountUSD: number;
1566
+ }>;
1567
+ declare const VerifyPaymentSchema: z.ZodObject<{
1568
+ token: z.ZodEnum<["USDC", "USDT"]>;
1569
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
1570
+ amountReceived: z.ZodNumber;
1571
+ txHash: z.ZodString;
1572
+ explorerTxUrl: z.ZodString;
1573
+ split: z.ZodArray<z.ZodObject<{
1574
+ role: z.ZodEnum<["merchant", "klap_fee", "distributor_incentive"]>;
1575
+ address: z.ZodNullable<z.ZodString>;
1576
+ percentAllocation: z.ZodNumber;
1577
+ amountUSD: z.ZodNumber;
1578
+ }, "strip", z.ZodTypeAny, {
1579
+ address: string | null;
1580
+ percentAllocation: number;
1581
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1582
+ amountUSD: number;
1583
+ }, {
1584
+ address: string | null;
1585
+ percentAllocation: number;
1586
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1587
+ amountUSD: number;
1588
+ }>, "many">;
1589
+ splitTxHash: z.ZodNullable<z.ZodString>;
1590
+ settledAt: z.ZodNullable<z.ZodString>;
1591
+ }, "strip", z.ZodTypeAny, {
1592
+ token: "USDC" | "USDT";
1593
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1594
+ amountReceived: number;
1595
+ txHash: string;
1596
+ settledAt: string | null;
1597
+ explorerTxUrl: string;
1598
+ split: {
1599
+ address: string | null;
1600
+ percentAllocation: number;
1601
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1602
+ amountUSD: number;
1603
+ }[];
1604
+ splitTxHash: string | null;
1605
+ }, {
1606
+ token: "USDC" | "USDT";
1607
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1608
+ amountReceived: number;
1609
+ txHash: string;
1610
+ settledAt: string | null;
1611
+ explorerTxUrl: string;
1612
+ split: {
1613
+ address: string | null;
1614
+ percentAllocation: number;
1615
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1616
+ amountUSD: number;
1617
+ }[];
1618
+ splitTxHash: string | null;
1619
+ }>;
1620
+ type VerifyPayment = z.infer<typeof VerifyPaymentSchema>;
1621
+ declare const VerifyChargeSchema: z.ZodObject<{
1622
+ id: z.ZodString;
1623
+ amount: z.ZodNullable<z.ZodNumber>;
1624
+ amountReceived: z.ZodNumber;
1625
+ confirmedAt: z.ZodNullable<z.ZodString>;
1626
+ splitAddress: z.ZodString;
1627
+ payments: z.ZodArray<z.ZodObject<{
1628
+ token: z.ZodEnum<["USDC", "USDT"]>;
1629
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
1630
+ amountReceived: z.ZodNumber;
1631
+ txHash: z.ZodString;
1632
+ explorerTxUrl: z.ZodString;
1633
+ split: z.ZodArray<z.ZodObject<{
1634
+ role: z.ZodEnum<["merchant", "klap_fee", "distributor_incentive"]>;
1635
+ address: z.ZodNullable<z.ZodString>;
1636
+ percentAllocation: z.ZodNumber;
1637
+ amountUSD: z.ZodNumber;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ address: string | null;
1640
+ percentAllocation: number;
1641
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1642
+ amountUSD: number;
1643
+ }, {
1644
+ address: string | null;
1645
+ percentAllocation: number;
1646
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1647
+ amountUSD: number;
1648
+ }>, "many">;
1649
+ splitTxHash: z.ZodNullable<z.ZodString>;
1650
+ settledAt: z.ZodNullable<z.ZodString>;
1651
+ }, "strip", z.ZodTypeAny, {
1652
+ token: "USDC" | "USDT";
1653
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1654
+ amountReceived: number;
1655
+ txHash: string;
1656
+ settledAt: string | null;
1657
+ explorerTxUrl: string;
1658
+ split: {
1659
+ address: string | null;
1660
+ percentAllocation: number;
1661
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1662
+ amountUSD: number;
1663
+ }[];
1664
+ splitTxHash: string | null;
1665
+ }, {
1666
+ token: "USDC" | "USDT";
1667
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1668
+ amountReceived: number;
1669
+ txHash: string;
1670
+ settledAt: string | null;
1671
+ explorerTxUrl: string;
1672
+ split: {
1673
+ address: string | null;
1674
+ percentAllocation: number;
1675
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1676
+ amountUSD: number;
1677
+ }[];
1678
+ splitTxHash: string | null;
1679
+ }>, "many">;
1680
+ }, "strip", z.ZodTypeAny, {
1681
+ amount: number | null;
1682
+ id: string;
1683
+ amountReceived: number;
1684
+ confirmedAt: string | null;
1685
+ splitAddress: string;
1686
+ payments: {
1687
+ token: "USDC" | "USDT";
1688
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1689
+ amountReceived: number;
1690
+ txHash: string;
1691
+ settledAt: string | null;
1692
+ explorerTxUrl: string;
1693
+ split: {
1694
+ address: string | null;
1695
+ percentAllocation: number;
1696
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1697
+ amountUSD: number;
1698
+ }[];
1699
+ splitTxHash: string | null;
1700
+ }[];
1701
+ }, {
1702
+ amount: number | null;
1703
+ id: string;
1704
+ amountReceived: number;
1705
+ confirmedAt: string | null;
1706
+ splitAddress: string;
1707
+ payments: {
1708
+ token: "USDC" | "USDT";
1709
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1710
+ amountReceived: number;
1711
+ txHash: string;
1712
+ settledAt: string | null;
1713
+ explorerTxUrl: string;
1714
+ split: {
1715
+ address: string | null;
1716
+ percentAllocation: number;
1717
+ role: "merchant" | "klap_fee" | "distributor_incentive";
1718
+ amountUSD: number;
1719
+ }[];
1720
+ splitTxHash: string | null;
1721
+ }[];
1722
+ }>;
1723
+ type VerifyCharge = z.infer<typeof VerifyChargeSchema>;
1724
+
1725
+ declare const HealthSchema: z.ZodObject<{
1726
+ status: z.ZodEnum<["ok", "error"]>;
1727
+ version: z.ZodString;
1728
+ timestamp: z.ZodString;
1729
+ db: z.ZodEnum<["ok", "error"]>;
1730
+ pendingWebhooks: z.ZodNumber;
1731
+ oldestPendingChargeAgeSeconds: z.ZodNullable<z.ZodNumber>;
1732
+ lastMoralisEventAgeSeconds: z.ZodNullable<z.ZodNumber>;
1733
+ }, "strip", z.ZodTypeAny, {
1734
+ status: "error" | "ok";
1735
+ version: string;
1736
+ timestamp: string;
1737
+ db: "error" | "ok";
1738
+ pendingWebhooks: number;
1739
+ oldestPendingChargeAgeSeconds: number | null;
1740
+ lastMoralisEventAgeSeconds: number | null;
1741
+ }, {
1742
+ status: "error" | "ok";
1743
+ version: string;
1744
+ timestamp: string;
1745
+ db: "error" | "ok";
1746
+ pendingWebhooks: number;
1747
+ oldestPendingChargeAgeSeconds: number | null;
1748
+ lastMoralisEventAgeSeconds: number | null;
1749
+ }>;
1750
+ type Health = z.infer<typeof HealthSchema>;
1751
+
1752
+ declare const SandboxTriggerSchema: z.ZodObject<{
1753
+ event: z.ZodEnum<["charge.partially_paid", "charge.confirmed", "charge.expired", "charge.underpaid", "charge.settled", "charge.settlement_failed", "charge.overpaid"]>;
1754
+ amount: z.ZodOptional<z.ZodNumber>;
1755
+ }, "strip", z.ZodTypeAny, {
1756
+ event: "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid";
1757
+ amount?: number | undefined;
1758
+ }, {
1759
+ event: "charge.partially_paid" | "charge.confirmed" | "charge.expired" | "charge.underpaid" | "charge.settled" | "charge.settlement_failed" | "charge.overpaid";
1760
+ amount?: number | undefined;
1761
+ }>;
1762
+ type SandboxTriggerInput = z.infer<typeof SandboxTriggerSchema>;
1763
+ declare const SandboxEventTriggerSchema: z.ZodObject<{
1764
+ event: z.ZodUnion<[z.ZodEnum<["payout_address.changed", "api_key.created", "api_key.revoked", "webhook.created", "webhook.deleted", "webhook.secret_rotated", "fee_tier.updated", "member.removed", "member.role_changed", "member.invited"]>, z.ZodEnum<["webhook.delivery_failed", "webhook.delivery_recovered", "webhook.endpoint_unhealthy"]>, z.ZodEnum<["auth.login", "auth.login_failed", "auth.suspicious_activity", "auth.email_verified", "auth.password_reset_requested", "auth.password_reset_completed"]>]>;
1765
+ }, "strip", z.ZodTypeAny, {
1766
+ event: "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1767
+ }, {
1768
+ event: "payout_address.changed" | "api_key.created" | "api_key.revoked" | "webhook.created" | "webhook.deleted" | "webhook.secret_rotated" | "fee_tier.updated" | "member.removed" | "member.role_changed" | "member.invited" | "webhook.delivery_failed" | "webhook.delivery_recovered" | "webhook.endpoint_unhealthy" | "auth.login" | "auth.login_failed" | "auth.suspicious_activity" | "auth.email_verified" | "auth.password_reset_requested" | "auth.password_reset_completed";
1769
+ }>;
1770
+ type SandboxEventTriggerInput = z.infer<typeof SandboxEventTriggerSchema>;
1771
+
1772
+ declare const CapabilitiesSchema: z.ZodObject<{
1773
+ acceptedPayments: z.ZodArray<z.ZodObject<{
1774
+ token: z.ZodEnum<["USDC", "USDT"]>;
1775
+ network: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
1776
+ }, "strip", z.ZodTypeAny, {
1777
+ token: "USDC" | "USDT";
1778
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1779
+ }, {
1780
+ token: "USDC" | "USDT";
1781
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1782
+ }>, "many">;
1783
+ }, "strip", z.ZodTypeAny, {
1784
+ acceptedPayments: {
1785
+ token: "USDC" | "USDT";
1786
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1787
+ }[];
1788
+ }, {
1789
+ acceptedPayments: {
1790
+ token: "USDC" | "USDT";
1791
+ network: "base" | "optimism" | "polygon" | "ethereum" | "arbitrum" | "avalanche" | "bnb";
1792
+ }[];
1793
+ }>;
1794
+ type Capabilities = z.infer<typeof CapabilitiesSchema>;
1795
+
1796
+ export { type AcceptInvitationInput, AcceptInvitationSchema, type AcceptedPayment, AcceptedPaymentSchema, AccountWebhookEventTypeSchema, type ApiKey, type ApiKeyEventData, ApiKeySchema, type AuthEmailVerifiedData, type AuthLoginData, type AuthLoginFailedData, type AuthPasswordResetCompletedData, type AuthPasswordResetRequestedData, type AuthResponse, AuthResponseSchema, type AuthSuspiciousActivityData, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, type Capabilities, CapabilitiesSchema, type Charge, type ChargeContributionReceivedData, type ChargeContributionSettledData, type ChargeMode, ChargeModeSchema, type ChargePausedData, type ChargeReactivatedData, ChargeSchema, type ChargeStatus, type ChargeStatusEvent, ChargeStatusEventSchema, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type CreateApiKeyInput, CreateApiKeySchema, type CreateChargeInput, CreateChargeSchema, type CreateWebhookInput, CreateWebhookSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type FeeTierUpdatedData, type ForgotPasswordInput, ForgotPasswordSchema, type Health, HealthSchema, type Invitation, InvitationSchema, type InviteUserInput, InviteUserSchema, type ListApiKeysInput, ListApiKeysSchema, type ListChargesInput, ListChargesSchema, type ListOrganizationsInput, ListOrganizationsSchema, type ListUsersInput, ListUsersSchema, type ListWebhookDeliveriesInput, ListWebhookDeliveriesSchema, type LoginInput, LoginSchema, type MemberEventData, type MemberInvitedData, type MemberRoleChangedData, type MessageResponse, MessageResponseSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, type NonChargeTriggerableEvent, NonChargeTriggerableEventSchema, NormalizedEmailSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, type Organization, OrganizationSchema, type OrganizationWithRole, OrganizationWithRoleSchema, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedApiKeys, PaginatedApiKeysSchema, type PaginatedCharges, PaginatedChargesSchema, type PaginatedOrganizations, PaginatedOrganizationsSchema, type PaginatedUsers, PaginatedUsersSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, PaginationQuerySchema, type PayoutAddressChangedData, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type ResetPasswordInput, ResetPasswordSchema, type SandboxEventTriggerInput, SandboxEventTriggerSchema, type SandboxTriggerInput, SandboxTriggerSchema, SecurityWebhookEventTypeSchema, type SettlementStatus, SettlementStatusSchema, type SignupInput, SignupSchema, type SplitRecipientRole, SplitRecipientRoleSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, type UpdateOrganizationInput, UpdateOrganizationSchema, type UpdateUserRoleInput, UpdateUserRoleSchema, type User, type UserRole, UserRoleSchema, UserSchema, type VerifyCharge, VerifyChargeSchema, type VerifyEmailInput, VerifyEmailSchema, type VerifyPayment, VerifyPaymentSchema, VerifySplitEntrySchema, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookConfigEventData, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };