@nokinc-flur/sdk 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -9,20 +9,790 @@ declare function formatAmount(amountMinor: bigint, currency: string): string;
9
9
  declare function normalizeE164(input: string, defaultCountry?: string): string;
10
10
  declare function moneyMinorToNumber(amountMinor: bigint): number;
11
11
 
12
+ declare const MERCHANT_PROFILE_STATUSES: readonly ["pending", "active", "suspended", "closed"];
13
+ declare const SETTLEMENT_SCHEDULES: readonly ["manual", "daily", "t1"];
14
+ declare const COLLECTION_INTENT_STATUSES: readonly ["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"];
15
+ declare const COLLECTION_PAYMENT_STATUSES: readonly ["pending", "paid", "failed", "reversed"];
16
+ declare const MERCHANT_PAYOUT_STATUSES: readonly ["requested", "processing", "paid", "failed", "cancelled"];
17
+ declare const MerchantProfileSchema: z.ZodObject<{
18
+ accountId: z.ZodString;
19
+ legalName: z.ZodString;
20
+ tradingName: z.ZodString;
21
+ merchantCategoryCode: z.ZodString;
22
+ nqrMerchantId: z.ZodString;
23
+ settlementBankCode: z.ZodString;
24
+ settlementAccountNumber: z.ZodString;
25
+ settlementAccountName: z.ZodString;
26
+ settlementSchedule: z.ZodEnum<["manual", "daily", "t1"]>;
27
+ status: z.ZodEnum<["pending", "active", "suspended", "closed"]>;
28
+ offlineEnabled: z.ZodBoolean;
29
+ perTxLimitKobo: z.ZodNumber;
30
+ dailyLimitKobo: z.ZodNumber;
31
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
32
+ createdAtMs: z.ZodNumber;
33
+ updatedAtMs: z.ZodNumber;
34
+ }, "strip", z.ZodTypeAny, {
35
+ status: "pending" | "active" | "suspended" | "closed";
36
+ accountId: string;
37
+ legalName: string;
38
+ tradingName: string;
39
+ merchantCategoryCode: string;
40
+ nqrMerchantId: string;
41
+ settlementBankCode: string;
42
+ settlementAccountNumber: string;
43
+ settlementAccountName: string;
44
+ settlementSchedule: "manual" | "daily" | "t1";
45
+ offlineEnabled: boolean;
46
+ perTxLimitKobo: number;
47
+ dailyLimitKobo: number;
48
+ metadata: Record<string, string | number | boolean | null>;
49
+ createdAtMs: number;
50
+ updatedAtMs: number;
51
+ }, {
52
+ status: "pending" | "active" | "suspended" | "closed";
53
+ accountId: string;
54
+ legalName: string;
55
+ tradingName: string;
56
+ merchantCategoryCode: string;
57
+ nqrMerchantId: string;
58
+ settlementBankCode: string;
59
+ settlementAccountNumber: string;
60
+ settlementAccountName: string;
61
+ settlementSchedule: "manual" | "daily" | "t1";
62
+ offlineEnabled: boolean;
63
+ perTxLimitKobo: number;
64
+ dailyLimitKobo: number;
65
+ metadata: Record<string, string | number | boolean | null>;
66
+ createdAtMs: number;
67
+ updatedAtMs: number;
68
+ }>;
69
+ type MerchantProfile = z.infer<typeof MerchantProfileSchema>;
70
+ declare const UpsertMerchantProfileInputSchema: z.ZodObject<{
71
+ legalName: z.ZodString;
72
+ tradingName: z.ZodString;
73
+ merchantCategoryCode: z.ZodString;
74
+ nqrMerchantId: z.ZodString;
75
+ settlementBankCode: z.ZodString;
76
+ settlementAccountNumber: z.ZodString;
77
+ settlementAccountName: z.ZodString;
78
+ settlementSchedule: z.ZodOptional<z.ZodEnum<["manual", "daily", "t1"]>>;
79
+ status: z.ZodOptional<z.ZodEnum<["pending", "active", "suspended", "closed"]>>;
80
+ offlineEnabled: z.ZodOptional<z.ZodBoolean>;
81
+ perTxLimitKobo: z.ZodOptional<z.ZodNumber>;
82
+ dailyLimitKobo: z.ZodOptional<z.ZodNumber>;
83
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ legalName: string;
86
+ tradingName: string;
87
+ merchantCategoryCode: string;
88
+ nqrMerchantId: string;
89
+ settlementBankCode: string;
90
+ settlementAccountNumber: string;
91
+ settlementAccountName: string;
92
+ status?: "pending" | "active" | "suspended" | "closed" | undefined;
93
+ settlementSchedule?: "manual" | "daily" | "t1" | undefined;
94
+ offlineEnabled?: boolean | undefined;
95
+ perTxLimitKobo?: number | undefined;
96
+ dailyLimitKobo?: number | undefined;
97
+ metadata?: Record<string, string | number | boolean | null> | undefined;
98
+ }, {
99
+ legalName: string;
100
+ tradingName: string;
101
+ merchantCategoryCode: string;
102
+ nqrMerchantId: string;
103
+ settlementBankCode: string;
104
+ settlementAccountNumber: string;
105
+ settlementAccountName: string;
106
+ status?: "pending" | "active" | "suspended" | "closed" | undefined;
107
+ settlementSchedule?: "manual" | "daily" | "t1" | undefined;
108
+ offlineEnabled?: boolean | undefined;
109
+ perTxLimitKobo?: number | undefined;
110
+ dailyLimitKobo?: number | undefined;
111
+ metadata?: Record<string, string | number | boolean | null> | undefined;
112
+ }>;
113
+ type UpsertMerchantProfileInput = z.infer<typeof UpsertMerchantProfileInputSchema>;
114
+ declare const CollectionIntentSchema: z.ZodObject<{
115
+ intentId: z.ZodString;
116
+ accountId: z.ZodString;
117
+ terminalId: z.ZodNullable<z.ZodString>;
118
+ reference: z.ZodString;
119
+ amountKobo: z.ZodNullable<z.ZodNumber>;
120
+ currency: z.ZodString;
121
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
122
+ description: z.ZodNullable<z.ZodString>;
123
+ nqrPayload: z.ZodString;
124
+ provider: z.ZodString;
125
+ providerReference: z.ZodNullable<z.ZodString>;
126
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
127
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
128
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
129
+ createdAtMs: z.ZodNumber;
130
+ updatedAtMs: z.ZodNumber;
131
+ }, "strip", z.ZodTypeAny, {
132
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
133
+ provider: string;
134
+ currency: string;
135
+ accountId: string;
136
+ metadata: Record<string, string | number | boolean | null>;
137
+ createdAtMs: number;
138
+ updatedAtMs: number;
139
+ intentId: string;
140
+ terminalId: string | null;
141
+ reference: string;
142
+ amountKobo: number | null;
143
+ description: string | null;
144
+ nqrPayload: string;
145
+ providerReference: string | null;
146
+ expiresAtMs: number | null;
147
+ paidAtMs: number | null;
148
+ }, {
149
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
150
+ provider: string;
151
+ currency: string;
152
+ accountId: string;
153
+ metadata: Record<string, string | number | boolean | null>;
154
+ createdAtMs: number;
155
+ updatedAtMs: number;
156
+ intentId: string;
157
+ terminalId: string | null;
158
+ reference: string;
159
+ amountKobo: number | null;
160
+ description: string | null;
161
+ nqrPayload: string;
162
+ providerReference: string | null;
163
+ expiresAtMs: number | null;
164
+ paidAtMs: number | null;
165
+ }>;
166
+ type CollectionIntent = z.infer<typeof CollectionIntentSchema>;
167
+ declare const CreateCollectionIntentInputSchema: z.ZodObject<{
168
+ reference: z.ZodOptional<z.ZodString>;
169
+ amountKobo: z.ZodOptional<z.ZodNumber>;
170
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
171
+ terminalId: z.ZodOptional<z.ZodString>;
172
+ terminalLabel: z.ZodOptional<z.ZodString>;
173
+ merchantCity: z.ZodOptional<z.ZodString>;
174
+ description: z.ZodOptional<z.ZodString>;
175
+ expiresAtMs: z.ZodOptional<z.ZodNumber>;
176
+ provider: z.ZodOptional<z.ZodString>;
177
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ provider?: string | undefined;
180
+ currency?: string | undefined;
181
+ metadata?: Record<string, string | number | boolean | null> | undefined;
182
+ terminalId?: string | undefined;
183
+ reference?: string | undefined;
184
+ amountKobo?: number | undefined;
185
+ description?: string | undefined;
186
+ expiresAtMs?: number | undefined;
187
+ terminalLabel?: string | undefined;
188
+ merchantCity?: string | undefined;
189
+ }, {
190
+ provider?: string | undefined;
191
+ currency?: string | undefined;
192
+ metadata?: Record<string, string | number | boolean | null> | undefined;
193
+ terminalId?: string | undefined;
194
+ reference?: string | undefined;
195
+ amountKobo?: number | undefined;
196
+ description?: string | undefined;
197
+ expiresAtMs?: number | undefined;
198
+ terminalLabel?: string | undefined;
199
+ merchantCity?: string | undefined;
200
+ }>;
201
+ type CreateCollectionIntentInput = z.infer<typeof CreateCollectionIntentInputSchema>;
202
+ declare const PublicCollectionIntentSchema: z.ZodObject<{
203
+ intentId: z.ZodString;
204
+ reference: z.ZodString;
205
+ amountKobo: z.ZodNullable<z.ZodNumber>;
206
+ currency: z.ZodString;
207
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
208
+ merchantAccountId: z.ZodString;
209
+ merchantName: z.ZodString;
210
+ merchantCategoryCode: z.ZodString;
211
+ description: z.ZodNullable<z.ZodString>;
212
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
215
+ currency: string;
216
+ merchantCategoryCode: string;
217
+ intentId: string;
218
+ reference: string;
219
+ amountKobo: number | null;
220
+ description: string | null;
221
+ expiresAtMs: number | null;
222
+ merchantAccountId: string;
223
+ merchantName: string;
224
+ }, {
225
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
226
+ currency: string;
227
+ merchantCategoryCode: string;
228
+ intentId: string;
229
+ reference: string;
230
+ amountKobo: number | null;
231
+ description: string | null;
232
+ expiresAtMs: number | null;
233
+ merchantAccountId: string;
234
+ merchantName: string;
235
+ }>;
236
+ type PublicCollectionIntent = z.infer<typeof PublicCollectionIntentSchema>;
237
+ declare const PayCollectionInputSchema: z.ZodObject<{
238
+ reference: z.ZodString;
239
+ amountKobo: z.ZodOptional<z.ZodNumber>;
240
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
241
+ idempotencyKey: z.ZodOptional<z.ZodString>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ reference: string;
244
+ currency?: string | undefined;
245
+ amountKobo?: number | undefined;
246
+ idempotencyKey?: string | undefined;
247
+ }, {
248
+ reference: string;
249
+ currency?: string | undefined;
250
+ amountKobo?: number | undefined;
251
+ idempotencyKey?: string | undefined;
252
+ }>;
253
+ type PayCollectionInput = z.infer<typeof PayCollectionInputSchema>;
254
+ declare const CollectionPaymentSchema: z.ZodObject<{
255
+ paymentId: z.ZodString;
256
+ intentId: z.ZodString;
257
+ accountId: z.ZodString;
258
+ payerUserId: z.ZodNullable<z.ZodString>;
259
+ merchantOwnerUserId: z.ZodString;
260
+ amountKobo: z.ZodNumber;
261
+ currency: z.ZodString;
262
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
263
+ provider: z.ZodString;
264
+ providerReference: z.ZodNullable<z.ZodString>;
265
+ idempotencyKey: z.ZodNullable<z.ZodString>;
266
+ ledgerRef: z.ZodString;
267
+ failureCode: z.ZodNullable<z.ZodString>;
268
+ failureMessage: z.ZodNullable<z.ZodString>;
269
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
270
+ createdAtMs: z.ZodNumber;
271
+ updatedAtMs: z.ZodNumber;
272
+ }, "strip", z.ZodTypeAny, {
273
+ status: "pending" | "paid" | "failed" | "reversed";
274
+ provider: string;
275
+ currency: string;
276
+ accountId: string;
277
+ createdAtMs: number;
278
+ updatedAtMs: number;
279
+ intentId: string;
280
+ amountKobo: number;
281
+ providerReference: string | null;
282
+ paidAtMs: number | null;
283
+ idempotencyKey: string | null;
284
+ paymentId: string;
285
+ payerUserId: string | null;
286
+ merchantOwnerUserId: string;
287
+ ledgerRef: string;
288
+ failureCode: string | null;
289
+ failureMessage: string | null;
290
+ }, {
291
+ status: "pending" | "paid" | "failed" | "reversed";
292
+ provider: string;
293
+ currency: string;
294
+ accountId: string;
295
+ createdAtMs: number;
296
+ updatedAtMs: number;
297
+ intentId: string;
298
+ amountKobo: number;
299
+ providerReference: string | null;
300
+ paidAtMs: number | null;
301
+ idempotencyKey: string | null;
302
+ paymentId: string;
303
+ payerUserId: string | null;
304
+ merchantOwnerUserId: string;
305
+ ledgerRef: string;
306
+ failureCode: string | null;
307
+ failureMessage: string | null;
308
+ }>;
309
+ type CollectionPayment = z.infer<typeof CollectionPaymentSchema>;
310
+ declare const CollectionPaymentResultSchema: z.ZodObject<{
311
+ payment: z.ZodObject<{
312
+ paymentId: z.ZodString;
313
+ intentId: z.ZodString;
314
+ accountId: z.ZodString;
315
+ payerUserId: z.ZodNullable<z.ZodString>;
316
+ merchantOwnerUserId: z.ZodString;
317
+ amountKobo: z.ZodNumber;
318
+ currency: z.ZodString;
319
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
320
+ provider: z.ZodString;
321
+ providerReference: z.ZodNullable<z.ZodString>;
322
+ idempotencyKey: z.ZodNullable<z.ZodString>;
323
+ ledgerRef: z.ZodString;
324
+ failureCode: z.ZodNullable<z.ZodString>;
325
+ failureMessage: z.ZodNullable<z.ZodString>;
326
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
327
+ createdAtMs: z.ZodNumber;
328
+ updatedAtMs: z.ZodNumber;
329
+ }, "strip", z.ZodTypeAny, {
330
+ status: "pending" | "paid" | "failed" | "reversed";
331
+ provider: string;
332
+ currency: string;
333
+ accountId: string;
334
+ createdAtMs: number;
335
+ updatedAtMs: number;
336
+ intentId: string;
337
+ amountKobo: number;
338
+ providerReference: string | null;
339
+ paidAtMs: number | null;
340
+ idempotencyKey: string | null;
341
+ paymentId: string;
342
+ payerUserId: string | null;
343
+ merchantOwnerUserId: string;
344
+ ledgerRef: string;
345
+ failureCode: string | null;
346
+ failureMessage: string | null;
347
+ }, {
348
+ status: "pending" | "paid" | "failed" | "reversed";
349
+ provider: string;
350
+ currency: string;
351
+ accountId: string;
352
+ createdAtMs: number;
353
+ updatedAtMs: number;
354
+ intentId: string;
355
+ amountKobo: number;
356
+ providerReference: string | null;
357
+ paidAtMs: number | null;
358
+ idempotencyKey: string | null;
359
+ paymentId: string;
360
+ payerUserId: string | null;
361
+ merchantOwnerUserId: string;
362
+ ledgerRef: string;
363
+ failureCode: string | null;
364
+ failureMessage: string | null;
365
+ }>;
366
+ intent: z.ZodObject<{
367
+ intentId: z.ZodString;
368
+ accountId: z.ZodString;
369
+ terminalId: z.ZodNullable<z.ZodString>;
370
+ reference: z.ZodString;
371
+ amountKobo: z.ZodNullable<z.ZodNumber>;
372
+ currency: z.ZodString;
373
+ status: z.ZodEnum<["created", "pending", "paid", "expired", "cancelled", "failed", "reversed"]>;
374
+ description: z.ZodNullable<z.ZodString>;
375
+ nqrPayload: z.ZodString;
376
+ provider: z.ZodString;
377
+ providerReference: z.ZodNullable<z.ZodString>;
378
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
379
+ expiresAtMs: z.ZodNullable<z.ZodNumber>;
380
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
381
+ createdAtMs: z.ZodNumber;
382
+ updatedAtMs: z.ZodNumber;
383
+ }, "strip", z.ZodTypeAny, {
384
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
385
+ provider: string;
386
+ currency: string;
387
+ accountId: string;
388
+ metadata: Record<string, string | number | boolean | null>;
389
+ createdAtMs: number;
390
+ updatedAtMs: number;
391
+ intentId: string;
392
+ terminalId: string | null;
393
+ reference: string;
394
+ amountKobo: number | null;
395
+ description: string | null;
396
+ nqrPayload: string;
397
+ providerReference: string | null;
398
+ expiresAtMs: number | null;
399
+ paidAtMs: number | null;
400
+ }, {
401
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
402
+ provider: string;
403
+ currency: string;
404
+ accountId: string;
405
+ metadata: Record<string, string | number | boolean | null>;
406
+ createdAtMs: number;
407
+ updatedAtMs: number;
408
+ intentId: string;
409
+ terminalId: string | null;
410
+ reference: string;
411
+ amountKobo: number | null;
412
+ description: string | null;
413
+ nqrPayload: string;
414
+ providerReference: string | null;
415
+ expiresAtMs: number | null;
416
+ paidAtMs: number | null;
417
+ }>;
418
+ receipt: z.ZodOptional<z.ZodUnknown>;
419
+ replayed: z.ZodBoolean;
420
+ }, "strip", z.ZodTypeAny, {
421
+ payment: {
422
+ status: "pending" | "paid" | "failed" | "reversed";
423
+ provider: string;
424
+ currency: string;
425
+ accountId: string;
426
+ createdAtMs: number;
427
+ updatedAtMs: number;
428
+ intentId: string;
429
+ amountKobo: number;
430
+ providerReference: string | null;
431
+ paidAtMs: number | null;
432
+ idempotencyKey: string | null;
433
+ paymentId: string;
434
+ payerUserId: string | null;
435
+ merchantOwnerUserId: string;
436
+ ledgerRef: string;
437
+ failureCode: string | null;
438
+ failureMessage: string | null;
439
+ };
440
+ intent: {
441
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
442
+ provider: string;
443
+ currency: string;
444
+ accountId: string;
445
+ metadata: Record<string, string | number | boolean | null>;
446
+ createdAtMs: number;
447
+ updatedAtMs: number;
448
+ intentId: string;
449
+ terminalId: string | null;
450
+ reference: string;
451
+ amountKobo: number | null;
452
+ description: string | null;
453
+ nqrPayload: string;
454
+ providerReference: string | null;
455
+ expiresAtMs: number | null;
456
+ paidAtMs: number | null;
457
+ };
458
+ replayed: boolean;
459
+ receipt?: unknown;
460
+ }, {
461
+ payment: {
462
+ status: "pending" | "paid" | "failed" | "reversed";
463
+ provider: string;
464
+ currency: string;
465
+ accountId: string;
466
+ createdAtMs: number;
467
+ updatedAtMs: number;
468
+ intentId: string;
469
+ amountKobo: number;
470
+ providerReference: string | null;
471
+ paidAtMs: number | null;
472
+ idempotencyKey: string | null;
473
+ paymentId: string;
474
+ payerUserId: string | null;
475
+ merchantOwnerUserId: string;
476
+ ledgerRef: string;
477
+ failureCode: string | null;
478
+ failureMessage: string | null;
479
+ };
480
+ intent: {
481
+ status: "pending" | "created" | "paid" | "expired" | "cancelled" | "failed" | "reversed";
482
+ provider: string;
483
+ currency: string;
484
+ accountId: string;
485
+ metadata: Record<string, string | number | boolean | null>;
486
+ createdAtMs: number;
487
+ updatedAtMs: number;
488
+ intentId: string;
489
+ terminalId: string | null;
490
+ reference: string;
491
+ amountKobo: number | null;
492
+ description: string | null;
493
+ nqrPayload: string;
494
+ providerReference: string | null;
495
+ expiresAtMs: number | null;
496
+ paidAtMs: number | null;
497
+ };
498
+ replayed: boolean;
499
+ receipt?: unknown;
500
+ }>;
501
+ type CollectionPaymentResult = z.infer<typeof CollectionPaymentResultSchema>;
502
+ declare const CollectionReportSummarySchema: z.ZodObject<{
503
+ accountId: z.ZodString;
504
+ fromMs: z.ZodNumber;
505
+ toMs: z.ZodNumber;
506
+ currency: z.ZodString;
507
+ paidCount: z.ZodNumber;
508
+ paidAmountKobo: z.ZodNumber;
509
+ pendingCount: z.ZodNumber;
510
+ failedCount: z.ZodNumber;
511
+ reversedCount: z.ZodNumber;
512
+ availableBalanceKobo: z.ZodNumber;
513
+ }, "strip", z.ZodTypeAny, {
514
+ currency: string;
515
+ accountId: string;
516
+ fromMs: number;
517
+ toMs: number;
518
+ paidCount: number;
519
+ paidAmountKobo: number;
520
+ pendingCount: number;
521
+ failedCount: number;
522
+ reversedCount: number;
523
+ availableBalanceKobo: number;
524
+ }, {
525
+ currency: string;
526
+ accountId: string;
527
+ fromMs: number;
528
+ toMs: number;
529
+ paidCount: number;
530
+ paidAmountKobo: number;
531
+ pendingCount: number;
532
+ failedCount: number;
533
+ reversedCount: number;
534
+ availableBalanceKobo: number;
535
+ }>;
536
+ type CollectionReportSummary = z.infer<typeof CollectionReportSummarySchema>;
537
+ declare const CollectionStatementSchema: z.ZodObject<{
538
+ accountId: z.ZodString;
539
+ year: z.ZodNumber;
540
+ month: z.ZodNumber;
541
+ currency: z.ZodString;
542
+ totalPaidKobo: z.ZodNumber;
543
+ items: z.ZodArray<z.ZodObject<{
544
+ paymentId: z.ZodString;
545
+ intentId: z.ZodString;
546
+ accountId: z.ZodString;
547
+ payerUserId: z.ZodNullable<z.ZodString>;
548
+ merchantOwnerUserId: z.ZodString;
549
+ amountKobo: z.ZodNumber;
550
+ currency: z.ZodString;
551
+ status: z.ZodEnum<["pending", "paid", "failed", "reversed"]>;
552
+ provider: z.ZodString;
553
+ providerReference: z.ZodNullable<z.ZodString>;
554
+ idempotencyKey: z.ZodNullable<z.ZodString>;
555
+ ledgerRef: z.ZodString;
556
+ failureCode: z.ZodNullable<z.ZodString>;
557
+ failureMessage: z.ZodNullable<z.ZodString>;
558
+ paidAtMs: z.ZodNullable<z.ZodNumber>;
559
+ createdAtMs: z.ZodNumber;
560
+ updatedAtMs: z.ZodNumber;
561
+ }, "strip", z.ZodTypeAny, {
562
+ status: "pending" | "paid" | "failed" | "reversed";
563
+ provider: string;
564
+ currency: string;
565
+ accountId: string;
566
+ createdAtMs: number;
567
+ updatedAtMs: number;
568
+ intentId: string;
569
+ amountKobo: number;
570
+ providerReference: string | null;
571
+ paidAtMs: number | null;
572
+ idempotencyKey: string | null;
573
+ paymentId: string;
574
+ payerUserId: string | null;
575
+ merchantOwnerUserId: string;
576
+ ledgerRef: string;
577
+ failureCode: string | null;
578
+ failureMessage: string | null;
579
+ }, {
580
+ status: "pending" | "paid" | "failed" | "reversed";
581
+ provider: string;
582
+ currency: string;
583
+ accountId: string;
584
+ createdAtMs: number;
585
+ updatedAtMs: number;
586
+ intentId: string;
587
+ amountKobo: number;
588
+ providerReference: string | null;
589
+ paidAtMs: number | null;
590
+ idempotencyKey: string | null;
591
+ paymentId: string;
592
+ payerUserId: string | null;
593
+ merchantOwnerUserId: string;
594
+ ledgerRef: string;
595
+ failureCode: string | null;
596
+ failureMessage: string | null;
597
+ }>, "many">;
598
+ }, "strip", z.ZodTypeAny, {
599
+ currency: string;
600
+ items: {
601
+ status: "pending" | "paid" | "failed" | "reversed";
602
+ provider: string;
603
+ currency: string;
604
+ accountId: string;
605
+ createdAtMs: number;
606
+ updatedAtMs: number;
607
+ intentId: string;
608
+ amountKobo: number;
609
+ providerReference: string | null;
610
+ paidAtMs: number | null;
611
+ idempotencyKey: string | null;
612
+ paymentId: string;
613
+ payerUserId: string | null;
614
+ merchantOwnerUserId: string;
615
+ ledgerRef: string;
616
+ failureCode: string | null;
617
+ failureMessage: string | null;
618
+ }[];
619
+ accountId: string;
620
+ year: number;
621
+ month: number;
622
+ totalPaidKobo: number;
623
+ }, {
624
+ currency: string;
625
+ items: {
626
+ status: "pending" | "paid" | "failed" | "reversed";
627
+ provider: string;
628
+ currency: string;
629
+ accountId: string;
630
+ createdAtMs: number;
631
+ updatedAtMs: number;
632
+ intentId: string;
633
+ amountKobo: number;
634
+ providerReference: string | null;
635
+ paidAtMs: number | null;
636
+ idempotencyKey: string | null;
637
+ paymentId: string;
638
+ payerUserId: string | null;
639
+ merchantOwnerUserId: string;
640
+ ledgerRef: string;
641
+ failureCode: string | null;
642
+ failureMessage: string | null;
643
+ }[];
644
+ accountId: string;
645
+ year: number;
646
+ month: number;
647
+ totalPaidKobo: number;
648
+ }>;
649
+ type CollectionStatement = z.infer<typeof CollectionStatementSchema>;
650
+ declare const CreatePayoutInputSchema: z.ZodObject<{
651
+ amountKobo: z.ZodNumber;
652
+ currency: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
653
+ idempotencyKey: z.ZodString;
654
+ }, "strip", z.ZodTypeAny, {
655
+ amountKobo: number;
656
+ idempotencyKey: string;
657
+ currency?: string | undefined;
658
+ }, {
659
+ amountKobo: number;
660
+ idempotencyKey: string;
661
+ currency?: string | undefined;
662
+ }>;
663
+ type CreatePayoutInput = z.infer<typeof CreatePayoutInputSchema>;
664
+ declare const MerchantPayoutSchema: z.ZodObject<{
665
+ payoutId: z.ZodString;
666
+ accountId: z.ZodString;
667
+ amountKobo: z.ZodNumber;
668
+ currency: z.ZodString;
669
+ status: z.ZodEnum<["requested", "processing", "paid", "failed", "cancelled"]>;
670
+ idempotencyKey: z.ZodNullable<z.ZodString>;
671
+ ledgerRef: z.ZodString;
672
+ providerReference: z.ZodNullable<z.ZodString>;
673
+ requestedByUserId: z.ZodNullable<z.ZodString>;
674
+ failureCode: z.ZodNullable<z.ZodString>;
675
+ failureMessage: z.ZodNullable<z.ZodString>;
676
+ createdAtMs: z.ZodNumber;
677
+ updatedAtMs: z.ZodNumber;
678
+ }, "strip", z.ZodTypeAny, {
679
+ status: "paid" | "cancelled" | "failed" | "requested" | "processing";
680
+ currency: string;
681
+ accountId: string;
682
+ createdAtMs: number;
683
+ updatedAtMs: number;
684
+ amountKobo: number;
685
+ providerReference: string | null;
686
+ idempotencyKey: string | null;
687
+ ledgerRef: string;
688
+ failureCode: string | null;
689
+ failureMessage: string | null;
690
+ payoutId: string;
691
+ requestedByUserId: string | null;
692
+ }, {
693
+ status: "paid" | "cancelled" | "failed" | "requested" | "processing";
694
+ currency: string;
695
+ accountId: string;
696
+ createdAtMs: number;
697
+ updatedAtMs: number;
698
+ amountKobo: number;
699
+ providerReference: string | null;
700
+ idempotencyKey: string | null;
701
+ ledgerRef: string;
702
+ failureCode: string | null;
703
+ failureMessage: string | null;
704
+ payoutId: string;
705
+ requestedByUserId: string | null;
706
+ }>;
707
+ type MerchantPayout = z.infer<typeof MerchantPayoutSchema>;
708
+ declare const ProviderEventInputSchema: z.ZodObject<{
709
+ provider: z.ZodString;
710
+ eventId: z.ZodString;
711
+ eventType: z.ZodString;
712
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
713
+ }, "strip", z.ZodTypeAny, {
714
+ provider: string;
715
+ eventId: string;
716
+ eventType: string;
717
+ payload?: Record<string, unknown> | undefined;
718
+ }, {
719
+ provider: string;
720
+ eventId: string;
721
+ eventType: string;
722
+ payload?: Record<string, unknown> | undefined;
723
+ }>;
724
+ type ProviderEventInput = z.infer<typeof ProviderEventInputSchema>;
725
+ declare const ProviderEventRecordSchema: z.ZodObject<{
726
+ id: z.ZodString;
727
+ provider: z.ZodString;
728
+ eventId: z.ZodString;
729
+ eventType: z.ZodString;
730
+ signatureVerified: z.ZodBoolean;
731
+ receivedAtMs: z.ZodNumber;
732
+ processedAtMs: z.ZodNullable<z.ZodNumber>;
733
+ }, "strip", z.ZodTypeAny, {
734
+ provider: string;
735
+ id: string;
736
+ eventId: string;
737
+ eventType: string;
738
+ signatureVerified: boolean;
739
+ receivedAtMs: number;
740
+ processedAtMs: number | null;
741
+ }, {
742
+ provider: string;
743
+ id: string;
744
+ eventId: string;
745
+ eventType: string;
746
+ signatureVerified: boolean;
747
+ receivedAtMs: number;
748
+ processedAtMs: number | null;
749
+ }>;
750
+ type ProviderEventRecord = z.infer<typeof ProviderEventRecordSchema>;
751
+ type CollectionsClientOptions = {
752
+ baseUrl: string;
753
+ fetchImpl?: typeof fetch;
754
+ };
755
+ type CollectionsClient = {
756
+ upsertMerchantProfile: (accountId: string, input: UpsertMerchantProfileInput) => Promise<MerchantProfile>;
757
+ getMerchantProfile: (accountId: string) => Promise<MerchantProfile>;
758
+ createIntent: (input: CreateCollectionIntentInput) => Promise<CollectionIntent>;
759
+ getIntent: (intentId: string) => Promise<CollectionIntent>;
760
+ resolveIntent: (reference: string) => Promise<PublicCollectionIntent>;
761
+ pay: (input: PayCollectionInput) => Promise<CollectionPaymentResult>;
762
+ reportSummary: (input: {
763
+ fromMs: number;
764
+ toMs: number;
765
+ currency?: string;
766
+ }) => Promise<CollectionReportSummary>;
767
+ monthlyStatement: (input: {
768
+ year: number;
769
+ month: number;
770
+ currency?: string;
771
+ }) => Promise<CollectionStatement>;
772
+ createPayout: (input: CreatePayoutInput) => Promise<MerchantPayout>;
773
+ getPayout: (payoutId: string) => Promise<MerchantPayout>;
774
+ recordProviderEvent: (input: ProviderEventInput) => Promise<ProviderEventRecord>;
775
+ };
776
+ type PartnerCollectionsClient = Pick<CollectionsClient, 'createIntent' | 'getIntent' | 'reportSummary' | 'monthlyStatement' | 'createPayout' | 'getPayout' | 'recordProviderEvent'>;
777
+ type ConsumerCollectionsClient = Pick<CollectionsClient, 'resolveIntent' | 'pay'>;
778
+ declare function createCollectionsClient(opts: CollectionsClientOptions): CollectionsClient;
779
+ declare function createPartnerCollectionsClient(opts: CollectionsClientOptions): PartnerCollectionsClient;
780
+ declare function createConsumerCollectionsClient(opts: CollectionsClientOptions): ConsumerCollectionsClient;
781
+
12
782
  type FlurClientOptions = {
13
783
  baseUrl: string;
14
784
  fetchImpl?: typeof fetch;
15
785
  timeoutMs?: number;
16
786
  getExtraHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
17
787
  };
18
- type OnboardingFallback = "SILENT_AUTH" | "OTP";
788
+ type OnboardingFallback = 'SILENT_AUTH' | 'OTP';
19
789
  type OnboardingStartInput = {
20
790
  phoneE164: string;
21
791
  appInstanceId: string;
22
- platform: "android" | "ios" | "web";
792
+ platform: 'android' | 'ios' | 'web';
23
793
  turnstileToken?: string;
24
794
  appAttestation?: {
25
- provider: "android" | "ios" | "web";
795
+ provider: 'android' | 'ios' | 'web';
26
796
  token: string;
27
797
  };
28
798
  firstName?: string;
@@ -34,7 +804,7 @@ type OnboardingStartResponse = {
34
804
  expiresInSec: number;
35
805
  fallback: OnboardingFallback;
36
806
  };
37
- type OnboardingRiskReason = "SIM_SWAP_RECENT" | "ROAMING" | "CARRIER_CHANGED";
807
+ type OnboardingRiskReason = 'SIM_SWAP_RECENT' | 'ROAMING' | 'CARRIER_CHANGED';
38
808
  type OnboardingCompleteInput = {
39
809
  requestId: string;
40
810
  code: string;
@@ -47,7 +817,7 @@ type OnboardingCompleteResponse = {
47
817
  restricted: boolean;
48
818
  risk_reasons: OnboardingRiskReason[];
49
819
  stepUpRequired?: boolean;
50
- riskStatus?: "ok" | "unavailable";
820
+ riskStatus?: 'ok' | 'unavailable';
51
821
  };
52
822
  type RegisterDeviceInput = {
53
823
  userId: string;
@@ -61,7 +831,7 @@ type RegisterDeviceInput = {
61
831
  carrier?: string;
62
832
  };
63
833
  };
64
- type DeviceTrustState = "TRUSTED_PRIMARY" | "TRUSTED_SECONDARY" | "UNVERIFIED";
834
+ type DeviceTrustState = 'TRUSTED_PRIMARY' | 'TRUSTED_SECONDARY' | 'UNVERIFIED';
65
835
  type RegisterDeviceResponse = {
66
836
  deviceId: string;
67
837
  fingerprintHash: string;
@@ -99,6 +869,8 @@ type RegisterSendDeviceKeyInput = {
99
869
  type SendChallengeInput = {
100
870
  userId: string;
101
871
  deviceId: string;
872
+ /** Optional step-up purpose. Backend defaults to 'send_money'. */
873
+ purpose?: 'send_money' | 'offline_revoke';
102
874
  };
103
875
  type SendChallengeResponse = {
104
876
  challengeId: string;
@@ -129,7 +901,7 @@ type TransferInput = {
129
901
  currency: string;
130
902
  sendAuthToken: string;
131
903
  };
132
- type TransferStatus = "SETTLED" | "PENDING_REVIEW" | "DECLINED";
904
+ type TransferStatus = 'SETTLED' | 'PENDING_REVIEW' | 'DECLINED';
133
905
  type TransferResponse = {
134
906
  transactionId: string;
135
907
  status: TransferStatus;
@@ -137,7 +909,7 @@ type TransferResponse = {
137
909
  recipientName: string;
138
910
  timestamp: string;
139
911
  };
140
- type TransactionDirection = "OUTGOING" | "INCOMING";
912
+ type TransactionDirection = 'OUTGOING' | 'INCOMING';
141
913
  type AccountActivityItem = {
142
914
  id: string;
143
915
  type: string;
@@ -173,7 +945,7 @@ type TransactionDetailResponse = {
173
945
  status: string;
174
946
  timestamp: string;
175
947
  };
176
- type PushPlatform = "ios" | "android" | "web";
948
+ type PushPlatform = 'ios' | 'android' | 'web';
177
949
  type PushRegisterInput = {
178
950
  deviceId: string;
179
951
  platform: PushPlatform;
@@ -213,6 +985,12 @@ type SendMoneyInput = {
213
985
  type SendMoneyOptions = AuthorizedOptions & {
214
986
  deviceId: string;
215
987
  };
988
+ type ResolveCollectionOptions = AuthorizedOptions;
989
+ type PayCollectionOptions = AuthorizedOptions & {
990
+ idempotencyKey?: string;
991
+ };
992
+ type ResolveCollectionResponse = PublicCollectionIntent;
993
+ type PayCollectionResponse = CollectionPaymentResult;
216
994
  type AuthorizeSendWithBiometricInput = {
217
995
  userId: string;
218
996
  deviceId: string;
@@ -261,6 +1039,8 @@ declare class FlurClient {
261
1039
  resolveRecipient(input: RecipientResolveInput, options: AuthorizedOptions): Promise<RecipientResolveResponse>;
262
1040
  createTransfer(input: TransferInput, options: CreateTransferOptions): Promise<TransferResponse>;
263
1041
  sendMoney(input: SendMoneyInput, options: SendMoneyOptions): Promise<TransferResponse>;
1042
+ resolveCollection(reference: string, options: ResolveCollectionOptions): Promise<ResolveCollectionResponse>;
1043
+ payCollection(input: PayCollectionInput, options: PayCollectionOptions): Promise<PayCollectionResponse>;
264
1044
  accountSummary(options: AuthorizedOptions): Promise<AccountSummaryResponse>;
265
1045
  listTransactions(options: ListTransactionsOptions): Promise<TransactionsListResponse>;
266
1046
  transactionDetail(transactionId: string, options: AuthorizedOptions): Promise<TransactionDetailResponse>;
@@ -664,6 +1444,7 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
664
1444
  }, "strip", z.ZodTypeAny, {
665
1445
  reference: string;
666
1446
  amountKobo: number;
1447
+ expiresAtMs: number;
667
1448
  merchantOAC: {
668
1449
  userId: string;
669
1450
  deviceId: string;
@@ -676,11 +1457,11 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
676
1457
  counterSeed: number;
677
1458
  issuerSig: string;
678
1459
  };
679
- expiresAtMs: number;
680
1460
  merchantSig: string;
681
1461
  }, {
682
1462
  reference: string;
683
1463
  amountKobo: number;
1464
+ expiresAtMs: number;
684
1465
  merchantOAC: {
685
1466
  userId: string;
686
1467
  deviceId: string;
@@ -693,7 +1474,6 @@ declare const OfflinePaymentRequestSchema: z.ZodObject<{
693
1474
  counterSeed: number;
694
1475
  issuerSig: string;
695
1476
  };
696
- expiresAtMs: number;
697
1477
  merchantSig: string;
698
1478
  }>;
699
1479
  type OfflinePaymentRequest = z.infer<typeof OfflinePaymentRequestSchema>;
@@ -785,6 +1565,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
785
1565
  }, "strip", z.ZodTypeAny, {
786
1566
  reference: string;
787
1567
  amountKobo: number;
1568
+ expiresAtMs: number;
788
1569
  merchantOAC: {
789
1570
  userId: string;
790
1571
  deviceId: string;
@@ -797,11 +1578,11 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
797
1578
  counterSeed: number;
798
1579
  issuerSig: string;
799
1580
  };
800
- expiresAtMs: number;
801
1581
  merchantSig: string;
802
1582
  }, {
803
1583
  reference: string;
804
1584
  amountKobo: number;
1585
+ expiresAtMs: number;
805
1586
  merchantOAC: {
806
1587
  userId: string;
807
1588
  deviceId: string;
@@ -814,7 +1595,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
814
1595
  counterSeed: number;
815
1596
  issuerSig: string;
816
1597
  };
817
- expiresAtMs: number;
818
1598
  merchantSig: string;
819
1599
  }>;
820
1600
  payerOAC: z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -901,6 +1681,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
901
1681
  request: {
902
1682
  reference: string;
903
1683
  amountKobo: number;
1684
+ expiresAtMs: number;
904
1685
  merchantOAC: {
905
1686
  userId: string;
906
1687
  deviceId: string;
@@ -913,7 +1694,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
913
1694
  counterSeed: number;
914
1695
  issuerSig: string;
915
1696
  };
916
- expiresAtMs: number;
917
1697
  merchantSig: string;
918
1698
  };
919
1699
  payerOAC: {
@@ -934,6 +1714,7 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
934
1714
  request: {
935
1715
  reference: string;
936
1716
  amountKobo: number;
1717
+ expiresAtMs: number;
937
1718
  merchantOAC: {
938
1719
  userId: string;
939
1720
  deviceId: string;
@@ -946,7 +1727,6 @@ declare const OfflinePaymentAuthorizationSchema: z.ZodObject<{
946
1727
  counterSeed: number;
947
1728
  issuerSig: string;
948
1729
  };
949
- expiresAtMs: number;
950
1730
  merchantSig: string;
951
1731
  };
952
1732
  payerOAC: {
@@ -986,13 +1766,13 @@ declare function decodePaymentRequestQR(s: string): OfflinePaymentRequest;
986
1766
  declare function encodeAuthorizationQR(auth: OfflinePaymentAuthorization): string;
987
1767
  declare function decodeAuthorizationQR(s: string): OfflinePaymentAuthorization;
988
1768
 
989
- declare const PARTNER_SCOPES: readonly ["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"];
1769
+ declare const PARTNER_SCOPES: readonly ["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"];
990
1770
  type PartnerScope = (typeof PARTNER_SCOPES)[number];
991
1771
  declare const ApiCredentialPublicSchema: z.ZodObject<{
992
1772
  id: z.ZodString;
993
1773
  accountId: z.ZodString;
994
1774
  keyId: z.ZodString;
995
- scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"]>, "many">;
1775
+ scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"]>, "many">;
996
1776
  label: z.ZodNullable<z.ZodString>;
997
1777
  createdAtMs: z.ZodNumber;
998
1778
  lastUsedAtMs: z.ZodNullable<z.ZodNumber>;
@@ -1000,19 +1780,19 @@ declare const ApiCredentialPublicSchema: z.ZodObject<{
1000
1780
  }, "strip", z.ZodTypeAny, {
1001
1781
  id: string;
1002
1782
  accountId: string;
1783
+ createdAtMs: number;
1003
1784
  keyId: string;
1004
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1785
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1005
1786
  label: string | null;
1006
- createdAtMs: number;
1007
1787
  lastUsedAtMs: number | null;
1008
1788
  revokedAtMs: number | null;
1009
1789
  }, {
1010
1790
  id: string;
1011
1791
  accountId: string;
1792
+ createdAtMs: number;
1012
1793
  keyId: string;
1013
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1794
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1014
1795
  label: string | null;
1015
- createdAtMs: number;
1016
1796
  lastUsedAtMs: number | null;
1017
1797
  revokedAtMs: number | null;
1018
1798
  }>;
@@ -1021,7 +1801,7 @@ declare const MintedApiCredentialSchema: z.ZodObject<{
1021
1801
  id: z.ZodString;
1022
1802
  accountId: z.ZodString;
1023
1803
  keyId: z.ZodString;
1024
- scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read"]>, "many">;
1804
+ scopes: z.ZodArray<z.ZodEnum<["passes:write", "passes:read", "passes:redeem", "receipts:write", "receipts:read", "offline:issue", "offline:settle", "offline:read", "collections:write", "collections:read", "collections:pay", "collections:webhook", "reports:read", "payouts:write", "payouts:read", "partner:funding:write", "partner:payout:write", "partner:reconciliation:read"]>, "many">;
1025
1805
  label: z.ZodNullable<z.ZodString>;
1026
1806
  createdAtMs: z.ZodNumber;
1027
1807
  lastUsedAtMs: z.ZodNullable<z.ZodNumber>;
@@ -1031,20 +1811,20 @@ declare const MintedApiCredentialSchema: z.ZodObject<{
1031
1811
  }, "strip", z.ZodTypeAny, {
1032
1812
  id: string;
1033
1813
  accountId: string;
1814
+ createdAtMs: number;
1034
1815
  keyId: string;
1035
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1816
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1036
1817
  label: string | null;
1037
- createdAtMs: number;
1038
1818
  lastUsedAtMs: number | null;
1039
1819
  revokedAtMs: number | null;
1040
1820
  secret: string;
1041
1821
  }, {
1042
1822
  id: string;
1043
1823
  accountId: string;
1824
+ createdAtMs: number;
1044
1825
  keyId: string;
1045
- scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read")[];
1826
+ scopes: ("passes:write" | "passes:read" | "passes:redeem" | "receipts:write" | "receipts:read" | "offline:issue" | "offline:settle" | "offline:read" | "collections:write" | "collections:read" | "collections:pay" | "collections:webhook" | "reports:read" | "payouts:write" | "payouts:read" | "partner:funding:write" | "partner:payout:write" | "partner:reconciliation:read")[];
1046
1827
  label: string | null;
1047
- createdAtMs: number;
1048
1828
  lastUsedAtMs: number | null;
1049
1829
  revokedAtMs: number | null;
1050
1830
  secret: string;
@@ -1063,6 +1843,8 @@ type PartnerClientOptions = {
1063
1843
  nowMs?: () => number;
1064
1844
  /** Override nonce generator for tests. */
1065
1845
  nonce?: () => string;
1846
+ /** Optional scope claim forwarded as X-Flur-Scope; backend credentials remain authoritative. */
1847
+ scope?: readonly PartnerScope[];
1066
1848
  };
1067
1849
  type PartnerSignResult = {
1068
1850
  authorization: string;
@@ -1129,22 +1911,22 @@ declare const OfflineTokenSchema: z.ZodObject<{
1129
1911
  issuerSig: z.ZodString;
1130
1912
  }, "strip", z.ZodTypeAny, {
1131
1913
  currency: string;
1132
- issuerSig: string;
1133
1914
  expiresAtMs: number;
1915
+ payerUserId: string;
1916
+ issuerSig: string;
1134
1917
  tokenId: string;
1135
1918
  tokenSerial: string;
1136
1919
  issuerAccountId: string;
1137
- payerUserId: string;
1138
1920
  maxAmountKobo: number;
1139
1921
  issuedAtMs: number;
1140
1922
  }, {
1141
1923
  currency: string;
1142
- issuerSig: string;
1143
1924
  expiresAtMs: number;
1925
+ payerUserId: string;
1926
+ issuerSig: string;
1144
1927
  tokenId: string;
1145
1928
  tokenSerial: string;
1146
1929
  issuerAccountId: string;
1147
- payerUserId: string;
1148
1930
  maxAmountKobo: number;
1149
1931
  issuedAtMs: number;
1150
1932
  }>;
@@ -1168,8 +1950,8 @@ declare const PaymentClaimSchema: z.ZodObject<{
1168
1950
  }, "strip", z.ZodTypeAny, {
1169
1951
  currency: string;
1170
1952
  amountKobo: number;
1171
- tokenSerial: string;
1172
1953
  payerUserId: string;
1954
+ tokenSerial: string;
1173
1955
  payeeUserId: string;
1174
1956
  payerNonce: string;
1175
1957
  payeeNonce: string;
@@ -1183,8 +1965,8 @@ declare const PaymentClaimSchema: z.ZodObject<{
1183
1965
  payeeSignature?: string | undefined;
1184
1966
  }, {
1185
1967
  amountKobo: number;
1186
- tokenSerial: string;
1187
1968
  payerUserId: string;
1969
+ tokenSerial: string;
1188
1970
  payeeUserId: string;
1189
1971
  payerNonce: string;
1190
1972
  payeeNonce: string;
@@ -1216,12 +1998,12 @@ declare const SettlementSchema: z.ZodObject<{
1216
1998
  }, "strip", z.ZodTypeAny, {
1217
1999
  status: "SETTLED" | "REVIEW" | "REJECTED";
1218
2000
  currency: string;
1219
- issuerSig: string;
1220
- amountKobo: number;
1221
2001
  createdAtMs: number;
2002
+ amountKobo: number;
2003
+ payerUserId: string;
2004
+ issuerSig: string;
1222
2005
  tokenSerial: string;
1223
2006
  issuerAccountId: string;
1224
- payerUserId: string;
1225
2007
  encounterId: string;
1226
2008
  payeeUserId: string;
1227
2009
  settlementId: string;
@@ -1230,12 +2012,12 @@ declare const SettlementSchema: z.ZodObject<{
1230
2012
  }, {
1231
2013
  status: "SETTLED" | "REVIEW" | "REJECTED";
1232
2014
  currency: string;
1233
- issuerSig: string;
1234
- amountKobo: number;
1235
2015
  createdAtMs: number;
2016
+ amountKobo: number;
2017
+ payerUserId: string;
2018
+ issuerSig: string;
1236
2019
  tokenSerial: string;
1237
2020
  issuerAccountId: string;
1238
- payerUserId: string;
1239
2021
  encounterId: string;
1240
2022
  payeeUserId: string;
1241
2023
  settlementId: string;
@@ -1261,12 +2043,12 @@ declare const SettleResponseSchema: z.ZodObject<{
1261
2043
  }, "strip", z.ZodTypeAny, {
1262
2044
  status: "SETTLED" | "REVIEW" | "REJECTED";
1263
2045
  currency: string;
1264
- issuerSig: string;
1265
- amountKobo: number;
1266
2046
  createdAtMs: number;
2047
+ amountKobo: number;
2048
+ payerUserId: string;
2049
+ issuerSig: string;
1267
2050
  tokenSerial: string;
1268
2051
  issuerAccountId: string;
1269
- payerUserId: string;
1270
2052
  encounterId: string;
1271
2053
  payeeUserId: string;
1272
2054
  settlementId: string;
@@ -1275,12 +2057,12 @@ declare const SettleResponseSchema: z.ZodObject<{
1275
2057
  }, {
1276
2058
  status: "SETTLED" | "REVIEW" | "REJECTED";
1277
2059
  currency: string;
1278
- issuerSig: string;
1279
- amountKobo: number;
1280
2060
  createdAtMs: number;
2061
+ amountKobo: number;
2062
+ payerUserId: string;
2063
+ issuerSig: string;
1281
2064
  tokenSerial: string;
1282
2065
  issuerAccountId: string;
1283
- payerUserId: string;
1284
2066
  encounterId: string;
1285
2067
  payeeUserId: string;
1286
2068
  settlementId: string;
@@ -1290,41 +2072,41 @@ declare const SettleResponseSchema: z.ZodObject<{
1290
2072
  encounterId: z.ZodString;
1291
2073
  replayed: z.ZodBoolean;
1292
2074
  }, "strip", z.ZodTypeAny, {
2075
+ replayed: boolean;
1293
2076
  encounterId: string;
1294
2077
  settlement: {
1295
2078
  status: "SETTLED" | "REVIEW" | "REJECTED";
1296
2079
  currency: string;
1297
- issuerSig: string;
1298
- amountKobo: number;
1299
2080
  createdAtMs: number;
2081
+ amountKobo: number;
2082
+ payerUserId: string;
2083
+ issuerSig: string;
1300
2084
  tokenSerial: string;
1301
2085
  issuerAccountId: string;
1302
- payerUserId: string;
1303
2086
  encounterId: string;
1304
2087
  payeeUserId: string;
1305
2088
  settlementId: string;
1306
2089
  settlementKey: string;
1307
2090
  receiptId: string | null;
1308
2091
  };
1309
- replayed: boolean;
1310
2092
  }, {
2093
+ replayed: boolean;
1311
2094
  encounterId: string;
1312
2095
  settlement: {
1313
2096
  status: "SETTLED" | "REVIEW" | "REJECTED";
1314
2097
  currency: string;
1315
- issuerSig: string;
1316
- amountKobo: number;
1317
2098
  createdAtMs: number;
2099
+ amountKobo: number;
2100
+ payerUserId: string;
2101
+ issuerSig: string;
1318
2102
  tokenSerial: string;
1319
2103
  issuerAccountId: string;
1320
- payerUserId: string;
1321
2104
  encounterId: string;
1322
2105
  payeeUserId: string;
1323
2106
  settlementId: string;
1324
2107
  settlementKey: string;
1325
2108
  receiptId: string | null;
1326
2109
  };
1327
- replayed: boolean;
1328
2110
  }>;
1329
2111
  type SettleResponse = z.infer<typeof SettleResponseSchema>;
1330
2112
  /**
@@ -1439,6 +2221,7 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1439
2221
  }, "strip", z.ZodTypeAny, {
1440
2222
  nonce: string;
1441
2223
  currency: string;
2224
+ metadata: Record<string, string | number | boolean | null>;
1442
2225
  validFromMs: number;
1443
2226
  validUntilMs: number;
1444
2227
  counterSeed: number;
@@ -1447,17 +2230,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1447
2230
  passId: string;
1448
2231
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1449
2232
  issuerId: string;
1450
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1451
- metadata: Record<string, string | number | boolean | null>;
2233
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1452
2234
  holderDeviceId: string;
1453
2235
  holderDevicePubkey: string;
1454
- cumulativeCapKobo?: number | undefined;
1455
2236
  amountKobo?: number | undefined;
2237
+ cumulativeCapKobo?: number | undefined;
1456
2238
  templateId?: string | undefined;
1457
2239
  holderUserId?: string | undefined;
1458
2240
  }, {
1459
2241
  nonce: string;
1460
2242
  currency: string;
2243
+ metadata: Record<string, string | number | boolean | null>;
1461
2244
  validFromMs: number;
1462
2245
  validUntilMs: number;
1463
2246
  counterSeed: number;
@@ -1466,17 +2249,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1466
2249
  passId: string;
1467
2250
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1468
2251
  issuerId: string;
1469
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1470
- metadata: Record<string, string | number | boolean | null>;
2252
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1471
2253
  holderDeviceId: string;
1472
2254
  holderDevicePubkey: string;
1473
- cumulativeCapKobo?: number | undefined;
1474
2255
  amountKobo?: number | undefined;
2256
+ cumulativeCapKobo?: number | undefined;
1475
2257
  templateId?: string | undefined;
1476
2258
  holderUserId?: string | undefined;
1477
2259
  }>, {
1478
2260
  nonce: string;
1479
2261
  currency: string;
2262
+ metadata: Record<string, string | number | boolean | null>;
1480
2263
  validFromMs: number;
1481
2264
  validUntilMs: number;
1482
2265
  counterSeed: number;
@@ -1485,17 +2268,17 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1485
2268
  passId: string;
1486
2269
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1487
2270
  issuerId: string;
1488
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1489
- metadata: Record<string, string | number | boolean | null>;
2271
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1490
2272
  holderDeviceId: string;
1491
2273
  holderDevicePubkey: string;
1492
- cumulativeCapKobo?: number | undefined;
1493
2274
  amountKobo?: number | undefined;
2275
+ cumulativeCapKobo?: number | undefined;
1494
2276
  templateId?: string | undefined;
1495
2277
  holderUserId?: string | undefined;
1496
2278
  }, {
1497
2279
  nonce: string;
1498
2280
  currency: string;
2281
+ metadata: Record<string, string | number | boolean | null>;
1499
2282
  validFromMs: number;
1500
2283
  validUntilMs: number;
1501
2284
  counterSeed: number;
@@ -1504,12 +2287,11 @@ declare const PassSchema: z.ZodEffects<z.ZodObject<{
1504
2287
  passId: string;
1505
2288
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1506
2289
  issuerId: string;
1507
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1508
- metadata: Record<string, string | number | boolean | null>;
2290
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1509
2291
  holderDeviceId: string;
1510
2292
  holderDevicePubkey: string;
1511
- cumulativeCapKobo?: number | undefined;
1512
2293
  amountKobo?: number | undefined;
2294
+ cumulativeCapKobo?: number | undefined;
1513
2295
  templateId?: string | undefined;
1514
2296
  holderUserId?: string | undefined;
1515
2297
  }>;
@@ -1566,6 +2348,7 @@ declare const RedemptionSchema: z.ZodObject<{
1566
2348
  }, "strip", z.ZodTypeAny, {
1567
2349
  nonce: string;
1568
2350
  currency: string;
2351
+ metadata: Record<string, string | number | boolean | null>;
1569
2352
  validFromMs: number;
1570
2353
  validUntilMs: number;
1571
2354
  counterSeed: number;
@@ -1574,17 +2357,17 @@ declare const RedemptionSchema: z.ZodObject<{
1574
2357
  passId: string;
1575
2358
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1576
2359
  issuerId: string;
1577
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1578
- metadata: Record<string, string | number | boolean | null>;
2360
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1579
2361
  holderDeviceId: string;
1580
2362
  holderDevicePubkey: string;
1581
- cumulativeCapKobo?: number | undefined;
1582
2363
  amountKobo?: number | undefined;
2364
+ cumulativeCapKobo?: number | undefined;
1583
2365
  templateId?: string | undefined;
1584
2366
  holderUserId?: string | undefined;
1585
2367
  }, {
1586
2368
  nonce: string;
1587
2369
  currency: string;
2370
+ metadata: Record<string, string | number | boolean | null>;
1588
2371
  validFromMs: number;
1589
2372
  validUntilMs: number;
1590
2373
  counterSeed: number;
@@ -1593,17 +2376,17 @@ declare const RedemptionSchema: z.ZodObject<{
1593
2376
  passId: string;
1594
2377
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1595
2378
  issuerId: string;
1596
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1597
- metadata: Record<string, string | number | boolean | null>;
2379
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1598
2380
  holderDeviceId: string;
1599
2381
  holderDevicePubkey: string;
1600
- cumulativeCapKobo?: number | undefined;
1601
2382
  amountKobo?: number | undefined;
2383
+ cumulativeCapKobo?: number | undefined;
1602
2384
  templateId?: string | undefined;
1603
2385
  holderUserId?: string | undefined;
1604
2386
  }>, {
1605
2387
  nonce: string;
1606
2388
  currency: string;
2389
+ metadata: Record<string, string | number | boolean | null>;
1607
2390
  validFromMs: number;
1608
2391
  validUntilMs: number;
1609
2392
  counterSeed: number;
@@ -1612,17 +2395,17 @@ declare const RedemptionSchema: z.ZodObject<{
1612
2395
  passId: string;
1613
2396
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1614
2397
  issuerId: string;
1615
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1616
- metadata: Record<string, string | number | boolean | null>;
2398
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1617
2399
  holderDeviceId: string;
1618
2400
  holderDevicePubkey: string;
1619
- cumulativeCapKobo?: number | undefined;
1620
2401
  amountKobo?: number | undefined;
2402
+ cumulativeCapKobo?: number | undefined;
1621
2403
  templateId?: string | undefined;
1622
2404
  holderUserId?: string | undefined;
1623
2405
  }, {
1624
2406
  nonce: string;
1625
2407
  currency: string;
2408
+ metadata: Record<string, string | number | boolean | null>;
1626
2409
  validFromMs: number;
1627
2410
  validUntilMs: number;
1628
2411
  counterSeed: number;
@@ -1631,12 +2414,11 @@ declare const RedemptionSchema: z.ZodObject<{
1631
2414
  passId: string;
1632
2415
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1633
2416
  issuerId: string;
1634
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1635
- metadata: Record<string, string | number | boolean | null>;
2417
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1636
2418
  holderDeviceId: string;
1637
2419
  holderDevicePubkey: string;
1638
- cumulativeCapKobo?: number | undefined;
1639
2420
  amountKobo?: number | undefined;
2421
+ cumulativeCapKobo?: number | undefined;
1640
2422
  templateId?: string | undefined;
1641
2423
  holderUserId?: string | undefined;
1642
2424
  }>;
@@ -1655,6 +2437,7 @@ declare const RedemptionSchema: z.ZodObject<{
1655
2437
  pass: {
1656
2438
  nonce: string;
1657
2439
  currency: string;
2440
+ metadata: Record<string, string | number | boolean | null>;
1658
2441
  validFromMs: number;
1659
2442
  validUntilMs: number;
1660
2443
  counterSeed: number;
@@ -1663,12 +2446,11 @@ declare const RedemptionSchema: z.ZodObject<{
1663
2446
  passId: string;
1664
2447
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1665
2448
  issuerId: string;
1666
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1667
- metadata: Record<string, string | number | boolean | null>;
2449
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1668
2450
  holderDeviceId: string;
1669
2451
  holderDevicePubkey: string;
1670
- cumulativeCapKobo?: number | undefined;
1671
2452
  amountKobo?: number | undefined;
2453
+ cumulativeCapKobo?: number | undefined;
1672
2454
  templateId?: string | undefined;
1673
2455
  holderUserId?: string | undefined;
1674
2456
  };
@@ -1682,6 +2464,7 @@ declare const RedemptionSchema: z.ZodObject<{
1682
2464
  pass: {
1683
2465
  nonce: string;
1684
2466
  currency: string;
2467
+ metadata: Record<string, string | number | boolean | null>;
1685
2468
  validFromMs: number;
1686
2469
  validUntilMs: number;
1687
2470
  counterSeed: number;
@@ -1690,12 +2473,11 @@ declare const RedemptionSchema: z.ZodObject<{
1690
2473
  passId: string;
1691
2474
  kind: "ride-ticket" | "transit-pass" | "event-ticket" | "voucher" | "loyalty" | "receipt-link";
1692
2475
  issuerId: string;
1693
- state: "issued" | "active" | "redeemed" | "expired" | "revoked";
1694
- metadata: Record<string, string | number | boolean | null>;
2476
+ state: "active" | "expired" | "issued" | "redeemed" | "revoked";
1695
2477
  holderDeviceId: string;
1696
2478
  holderDevicePubkey: string;
1697
- cumulativeCapKobo?: number | undefined;
1698
2479
  amountKobo?: number | undefined;
2480
+ cumulativeCapKobo?: number | undefined;
1699
2481
  templateId?: string | undefined;
1700
2482
  holderUserId?: string | undefined;
1701
2483
  };
@@ -1759,54 +2541,54 @@ declare const ReceiptSchema: z.ZodEffects<z.ZodObject<{
1759
2541
  issuerSig: z.ZodString;
1760
2542
  }, "strip", z.ZodTypeAny, {
1761
2543
  currency: string;
1762
- issuerSig: string;
1763
2544
  amountKobo: number;
1764
2545
  payerUserId: string;
2546
+ payload: Record<string, string | number | boolean | null>;
2547
+ issuerSig: string;
1765
2548
  issuedAtMs: number;
1766
2549
  payeeUserId: string;
1767
2550
  receiptId: string;
1768
2551
  issuerId: string;
1769
2552
  channel: "pass" | "cash";
1770
- payload: Record<string, string | number | boolean | null>;
1771
2553
  intentId?: string | undefined;
1772
2554
  passRedemptionId?: string | undefined;
1773
2555
  }, {
1774
2556
  currency: string;
1775
- issuerSig: string;
1776
2557
  amountKobo: number;
1777
2558
  payerUserId: string;
2559
+ payload: Record<string, string | number | boolean | null>;
2560
+ issuerSig: string;
1778
2561
  issuedAtMs: number;
1779
2562
  payeeUserId: string;
1780
2563
  receiptId: string;
1781
2564
  issuerId: string;
1782
2565
  channel: "pass" | "cash";
1783
- payload: Record<string, string | number | boolean | null>;
1784
2566
  intentId?: string | undefined;
1785
2567
  passRedemptionId?: string | undefined;
1786
2568
  }>, {
1787
2569
  currency: string;
1788
- issuerSig: string;
1789
2570
  amountKobo: number;
1790
2571
  payerUserId: string;
2572
+ payload: Record<string, string | number | boolean | null>;
2573
+ issuerSig: string;
1791
2574
  issuedAtMs: number;
1792
2575
  payeeUserId: string;
1793
2576
  receiptId: string;
1794
2577
  issuerId: string;
1795
2578
  channel: "pass" | "cash";
1796
- payload: Record<string, string | number | boolean | null>;
1797
2579
  intentId?: string | undefined;
1798
2580
  passRedemptionId?: string | undefined;
1799
2581
  }, {
1800
2582
  currency: string;
1801
- issuerSig: string;
1802
2583
  amountKobo: number;
1803
2584
  payerUserId: string;
2585
+ payload: Record<string, string | number | boolean | null>;
2586
+ issuerSig: string;
1804
2587
  issuedAtMs: number;
1805
2588
  payeeUserId: string;
1806
2589
  receiptId: string;
1807
2590
  issuerId: string;
1808
2591
  channel: "pass" | "cash";
1809
- payload: Record<string, string | number | boolean | null>;
1810
2592
  intentId?: string | undefined;
1811
2593
  passRedemptionId?: string | undefined;
1812
2594
  }>;
@@ -1950,8 +2732,8 @@ type FlurInitOptions = {
1950
2732
  fetchImpl?: typeof fetch;
1951
2733
  /** When true, all QR generation is performed locally without any network call. */
1952
2734
  offlineMode?: boolean;
1953
- /** Optional scope claim forwarded as `X-Flur-Scope`. Backend remains authoritative. */
1954
- scope?: readonly string[];
2735
+ /** Optional scope claim forwarded as `X-Flur-Scope`. Backend credentials remain authoritative. */
2736
+ scope?: readonly PartnerScope[];
1955
2737
  };
1956
2738
  type FlurPaymentEvent = {
1957
2739
  type: string;
@@ -1975,6 +2757,8 @@ type CashNamespace = {
1975
2757
  type FlurHandle = CashNamespace & {
1976
2758
  /** Cash / money: NQR generation, payment subscriptions, transfers (future). */
1977
2759
  cash: CashNamespace;
2760
+ /** Collections: merchant NQR intents, reports, statements, payouts. */
2761
+ collections: PartnerCollectionsClient;
1978
2762
  /** Passes: tickets, vouchers, loyalty, transit. */
1979
2763
  passes: PassesClient;
1980
2764
  /** Receipts: signed, immutable views over cash + pass events. */
@@ -2054,4 +2838,2089 @@ type AccountsClient = {
2054
2838
  };
2055
2839
  declare function createAccountsClient(opts: AccountsClientOptions): AccountsClient;
2056
2840
 
2057
- export { ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, type CashNamespace, type CreateBusinessAccountInput, type CreatePayLinkResponse, type CreateTransferOptions, type DeviceTrustState, type Ed25519KeyPair, FIELD, FlurApiError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, type HmacFetchOptions, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type ListPassesInput, type ListPassesResponse, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, type MembershipRole, type MerchantAccountInfo, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, type OfflinePaymentAuthorization, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerScope, type PartnerSignResult, type Pass, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PaymentClaim, PaymentClaimSchema, type PinSetInput, type PinVerifyInput, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, type Receipt, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolvePayLinkResponse, type RevokePassInput, type RoutingHint, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, bodySha256Hex, buildAuthorization, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeEncounterId, constantTimeEqual, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createFlurPartnerClient, createHmacFetch, createOfflineSettlementsClient, createPassesClient, createReceiptsClient, decodeAuthorizationQR, decodeBase45, decodePaymentRequestQR, encodeAuthorizationQR, encodeBase45, encodeNQR, encodePaymentRequestQR, formatAmount, generateDynamicQR, generateKeyPair, generateStaticQR, init, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, publicKeyFromPrivate, readTLV, routingHint, sign, signAuthorization, signCanonical, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verify, verifyAuthorization, verifyCanonical, verifyOAC, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };
2841
+ /**
2842
+ * Consumer-side offline payments SDK client.
2843
+ *
2844
+ * Wraps the backend `/v1/me/offline/*` routes (session-bearer auth ONLY —
2845
+ * NOT partner HMAC). These power the Flur mobile app's offline-pay flow:
2846
+ * - register/list/revoke device signing keys
2847
+ * - enable / refresh / disable offline mode (real hold + OAC issuance)
2848
+ * - read offline status (current hold + active OAC)
2849
+ * - submit a signed offline payment claim for settlement
2850
+ *
2851
+ * Schemas mirror `flur-backend/src/offline-consumer/types.ts`.
2852
+ */
2853
+
2854
+ declare const RegisterDeviceKeyInputSchema: z.ZodObject<{
2855
+ deviceId: z.ZodString;
2856
+ publicKeyHex: z.ZodString;
2857
+ }, "strip", z.ZodTypeAny, {
2858
+ deviceId: string;
2859
+ publicKeyHex: string;
2860
+ }, {
2861
+ deviceId: string;
2862
+ publicKeyHex: string;
2863
+ }>;
2864
+ type RegisterDeviceKeyInput = z.infer<typeof RegisterDeviceKeyInputSchema>;
2865
+ declare const DeviceKeyRecordSchema: z.ZodObject<{
2866
+ id: z.ZodString;
2867
+ userId: z.ZodString;
2868
+ deviceId: z.ZodString;
2869
+ publicKeyHex: z.ZodString;
2870
+ createdAtMs: z.ZodNumber;
2871
+ revokedAtMs: z.ZodNullable<z.ZodNumber>;
2872
+ }, "strip", z.ZodTypeAny, {
2873
+ userId: string;
2874
+ deviceId: string;
2875
+ id: string;
2876
+ createdAtMs: number;
2877
+ revokedAtMs: number | null;
2878
+ publicKeyHex: string;
2879
+ }, {
2880
+ userId: string;
2881
+ deviceId: string;
2882
+ id: string;
2883
+ createdAtMs: number;
2884
+ revokedAtMs: number | null;
2885
+ publicKeyHex: string;
2886
+ }>;
2887
+ type DeviceKeyRecord = z.infer<typeof DeviceKeyRecordSchema>;
2888
+ declare const ConsumerOACSchema: z.ZodObject<{
2889
+ oacId: z.ZodString;
2890
+ issuerId: z.ZodString;
2891
+ userId: z.ZodString;
2892
+ deviceId: z.ZodString;
2893
+ devicePubkeyHex: z.ZodString;
2894
+ perTxCapKobo: z.ZodNumber;
2895
+ cumulativeCapKobo: z.ZodNumber;
2896
+ currency: z.ZodString;
2897
+ validFromMs: z.ZodNumber;
2898
+ validUntilMs: z.ZodNumber;
2899
+ counterSeed: z.ZodNumber;
2900
+ issuedAtMs: z.ZodNumber;
2901
+ }, "strip", z.ZodTypeAny, {
2902
+ userId: string;
2903
+ deviceId: string;
2904
+ currency: string;
2905
+ perTxCapKobo: number;
2906
+ cumulativeCapKobo: number;
2907
+ validFromMs: number;
2908
+ validUntilMs: number;
2909
+ counterSeed: number;
2910
+ issuedAtMs: number;
2911
+ issuerId: string;
2912
+ oacId: string;
2913
+ devicePubkeyHex: string;
2914
+ }, {
2915
+ userId: string;
2916
+ deviceId: string;
2917
+ currency: string;
2918
+ perTxCapKobo: number;
2919
+ cumulativeCapKobo: number;
2920
+ validFromMs: number;
2921
+ validUntilMs: number;
2922
+ counterSeed: number;
2923
+ issuedAtMs: number;
2924
+ issuerId: string;
2925
+ oacId: string;
2926
+ devicePubkeyHex: string;
2927
+ }>;
2928
+ type ConsumerOAC = z.infer<typeof ConsumerOACSchema>;
2929
+ declare const SignedConsumerOACSchema: z.ZodObject<{
2930
+ oac: z.ZodObject<{
2931
+ oacId: z.ZodString;
2932
+ issuerId: z.ZodString;
2933
+ userId: z.ZodString;
2934
+ deviceId: z.ZodString;
2935
+ devicePubkeyHex: z.ZodString;
2936
+ perTxCapKobo: z.ZodNumber;
2937
+ cumulativeCapKobo: z.ZodNumber;
2938
+ currency: z.ZodString;
2939
+ validFromMs: z.ZodNumber;
2940
+ validUntilMs: z.ZodNumber;
2941
+ counterSeed: z.ZodNumber;
2942
+ issuedAtMs: z.ZodNumber;
2943
+ }, "strip", z.ZodTypeAny, {
2944
+ userId: string;
2945
+ deviceId: string;
2946
+ currency: string;
2947
+ perTxCapKobo: number;
2948
+ cumulativeCapKobo: number;
2949
+ validFromMs: number;
2950
+ validUntilMs: number;
2951
+ counterSeed: number;
2952
+ issuedAtMs: number;
2953
+ issuerId: string;
2954
+ oacId: string;
2955
+ devicePubkeyHex: string;
2956
+ }, {
2957
+ userId: string;
2958
+ deviceId: string;
2959
+ currency: string;
2960
+ perTxCapKobo: number;
2961
+ cumulativeCapKobo: number;
2962
+ validFromMs: number;
2963
+ validUntilMs: number;
2964
+ counterSeed: number;
2965
+ issuedAtMs: number;
2966
+ issuerId: string;
2967
+ oacId: string;
2968
+ devicePubkeyHex: string;
2969
+ }>;
2970
+ issuerSig: z.ZodString;
2971
+ issuerPublicKeyHex: z.ZodString;
2972
+ }, "strip", z.ZodTypeAny, {
2973
+ issuerSig: string;
2974
+ oac: {
2975
+ userId: string;
2976
+ deviceId: string;
2977
+ currency: string;
2978
+ perTxCapKobo: number;
2979
+ cumulativeCapKobo: number;
2980
+ validFromMs: number;
2981
+ validUntilMs: number;
2982
+ counterSeed: number;
2983
+ issuedAtMs: number;
2984
+ issuerId: string;
2985
+ oacId: string;
2986
+ devicePubkeyHex: string;
2987
+ };
2988
+ issuerPublicKeyHex: string;
2989
+ }, {
2990
+ issuerSig: string;
2991
+ oac: {
2992
+ userId: string;
2993
+ deviceId: string;
2994
+ currency: string;
2995
+ perTxCapKobo: number;
2996
+ cumulativeCapKobo: number;
2997
+ validFromMs: number;
2998
+ validUntilMs: number;
2999
+ counterSeed: number;
3000
+ issuedAtMs: number;
3001
+ issuerId: string;
3002
+ oacId: string;
3003
+ devicePubkeyHex: string;
3004
+ };
3005
+ issuerPublicKeyHex: string;
3006
+ }>;
3007
+ type SignedConsumerOAC = z.infer<typeof SignedConsumerOACSchema>;
3008
+ declare const OACRecordSchema: z.ZodObject<{
3009
+ oac: z.ZodObject<{
3010
+ oacId: z.ZodString;
3011
+ issuerId: z.ZodString;
3012
+ userId: z.ZodString;
3013
+ deviceId: z.ZodString;
3014
+ devicePubkeyHex: z.ZodString;
3015
+ perTxCapKobo: z.ZodNumber;
3016
+ cumulativeCapKobo: z.ZodNumber;
3017
+ currency: z.ZodString;
3018
+ validFromMs: z.ZodNumber;
3019
+ validUntilMs: z.ZodNumber;
3020
+ counterSeed: z.ZodNumber;
3021
+ issuedAtMs: z.ZodNumber;
3022
+ }, "strip", z.ZodTypeAny, {
3023
+ userId: string;
3024
+ deviceId: string;
3025
+ currency: string;
3026
+ perTxCapKobo: number;
3027
+ cumulativeCapKobo: number;
3028
+ validFromMs: number;
3029
+ validUntilMs: number;
3030
+ counterSeed: number;
3031
+ issuedAtMs: number;
3032
+ issuerId: string;
3033
+ oacId: string;
3034
+ devicePubkeyHex: string;
3035
+ }, {
3036
+ userId: string;
3037
+ deviceId: string;
3038
+ currency: string;
3039
+ perTxCapKobo: number;
3040
+ cumulativeCapKobo: number;
3041
+ validFromMs: number;
3042
+ validUntilMs: number;
3043
+ counterSeed: number;
3044
+ issuedAtMs: number;
3045
+ issuerId: string;
3046
+ oacId: string;
3047
+ devicePubkeyHex: string;
3048
+ }>;
3049
+ issuerSig: z.ZodString;
3050
+ issuerPublicKeyHex: z.ZodString;
3051
+ } & {
3052
+ currentOfflineSpentKobo: z.ZodNumber;
3053
+ status: z.ZodEnum<["active", "superseded", "expired", "revoked", "disabling", "draining", "closed"]>;
3054
+ supersededAtMs: z.ZodNullable<z.ZodNumber>;
3055
+ revokedAtMs: z.ZodNullable<z.ZodNumber>;
3056
+ holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3057
+ }, "strip", z.ZodTypeAny, {
3058
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3059
+ issuerSig: string;
3060
+ revokedAtMs: number | null;
3061
+ oac: {
3062
+ userId: string;
3063
+ deviceId: string;
3064
+ currency: string;
3065
+ perTxCapKobo: number;
3066
+ cumulativeCapKobo: number;
3067
+ validFromMs: number;
3068
+ validUntilMs: number;
3069
+ counterSeed: number;
3070
+ issuedAtMs: number;
3071
+ issuerId: string;
3072
+ oacId: string;
3073
+ devicePubkeyHex: string;
3074
+ };
3075
+ issuerPublicKeyHex: string;
3076
+ currentOfflineSpentKobo: number;
3077
+ supersededAtMs: number | null;
3078
+ holdId?: string | null | undefined;
3079
+ }, {
3080
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3081
+ issuerSig: string;
3082
+ revokedAtMs: number | null;
3083
+ oac: {
3084
+ userId: string;
3085
+ deviceId: string;
3086
+ currency: string;
3087
+ perTxCapKobo: number;
3088
+ cumulativeCapKobo: number;
3089
+ validFromMs: number;
3090
+ validUntilMs: number;
3091
+ counterSeed: number;
3092
+ issuedAtMs: number;
3093
+ issuerId: string;
3094
+ oacId: string;
3095
+ devicePubkeyHex: string;
3096
+ };
3097
+ issuerPublicKeyHex: string;
3098
+ currentOfflineSpentKobo: number;
3099
+ supersededAtMs: number | null;
3100
+ holdId?: string | null | undefined;
3101
+ }>;
3102
+ type OACRecord = z.infer<typeof OACRecordSchema>;
3103
+ declare const IssueOACInputSchema: z.ZodObject<{
3104
+ deviceId: z.ZodString;
3105
+ perTxCapKobo: z.ZodOptional<z.ZodNumber>;
3106
+ cumulativeCapKobo: z.ZodOptional<z.ZodNumber>;
3107
+ ttlMs: z.ZodOptional<z.ZodNumber>;
3108
+ spendableOnlineKobo: z.ZodOptional<z.ZodNumber>;
3109
+ }, "strip", z.ZodTypeAny, {
3110
+ deviceId: string;
3111
+ perTxCapKobo?: number | undefined;
3112
+ cumulativeCapKobo?: number | undefined;
3113
+ ttlMs?: number | undefined;
3114
+ spendableOnlineKobo?: number | undefined;
3115
+ }, {
3116
+ deviceId: string;
3117
+ perTxCapKobo?: number | undefined;
3118
+ cumulativeCapKobo?: number | undefined;
3119
+ ttlMs?: number | undefined;
3120
+ spendableOnlineKobo?: number | undefined;
3121
+ }>;
3122
+ type IssueOACInput = z.infer<typeof IssueOACInputSchema>;
3123
+ declare const EnableOfflineInputSchema: z.ZodObject<{
3124
+ deviceId: z.ZodString;
3125
+ amountKobo: z.ZodNumber;
3126
+ perTxCapKobo: z.ZodOptional<z.ZodNumber>;
3127
+ ttlMs: z.ZodOptional<z.ZodNumber>;
3128
+ installId: z.ZodString;
3129
+ partnerId: z.ZodOptional<z.ZodString>;
3130
+ }, "strip", z.ZodTypeAny, {
3131
+ deviceId: string;
3132
+ amountKobo: number;
3133
+ installId: string;
3134
+ perTxCapKobo?: number | undefined;
3135
+ ttlMs?: number | undefined;
3136
+ partnerId?: string | undefined;
3137
+ }, {
3138
+ deviceId: string;
3139
+ amountKobo: number;
3140
+ installId: string;
3141
+ perTxCapKobo?: number | undefined;
3142
+ ttlMs?: number | undefined;
3143
+ partnerId?: string | undefined;
3144
+ }>;
3145
+ type EnableOfflineInput = z.infer<typeof EnableOfflineInputSchema>;
3146
+ declare const DisableOfflineInputSchema: z.ZodObject<{
3147
+ deviceId: z.ZodString;
3148
+ installId: z.ZodOptional<z.ZodString>;
3149
+ claims: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
3150
+ }, "strip", z.ZodTypeAny, {
3151
+ deviceId: string;
3152
+ installId?: string | undefined;
3153
+ claims?: unknown[] | undefined;
3154
+ }, {
3155
+ deviceId: string;
3156
+ installId?: string | undefined;
3157
+ claims?: unknown[] | undefined;
3158
+ }>;
3159
+ type DisableOfflineInput = z.infer<typeof DisableOfflineInputSchema>;
3160
+ declare const OfflineHoldRecordSchema: z.ZodObject<{
3161
+ holdId: z.ZodString;
3162
+ userId: z.ZodString;
3163
+ deviceId: z.ZodString;
3164
+ partnerId: z.ZodString;
3165
+ adapterKind: z.ZodString;
3166
+ externalHoldRef: z.ZodNullable<z.ZodString>;
3167
+ amountKobo: z.ZodNumber;
3168
+ capturedKobo: z.ZodNumber;
3169
+ releasedKobo: z.ZodNumber;
3170
+ remainingKobo: z.ZodNumber;
3171
+ currency: z.ZodString;
3172
+ status: z.ZodEnum<["placing", "active", "disabling", "draining", "closed", "revoked", "failed"]>;
3173
+ installId: z.ZodNullable<z.ZodString>;
3174
+ drainDeadlineMs: z.ZodNumber;
3175
+ disableRequestedAtMs: z.ZodNullable<z.ZodNumber>;
3176
+ createdAtMs: z.ZodNumber;
3177
+ closedAtMs: z.ZodNullable<z.ZodNumber>;
3178
+ isTrusted: z.ZodOptional<z.ZodBoolean>;
3179
+ }, "strip", z.ZodTypeAny, {
3180
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3181
+ userId: string;
3182
+ deviceId: string;
3183
+ currency: string;
3184
+ createdAtMs: number;
3185
+ amountKobo: number;
3186
+ holdId: string;
3187
+ installId: string | null;
3188
+ partnerId: string;
3189
+ adapterKind: string;
3190
+ externalHoldRef: string | null;
3191
+ capturedKobo: number;
3192
+ releasedKobo: number;
3193
+ remainingKobo: number;
3194
+ drainDeadlineMs: number;
3195
+ disableRequestedAtMs: number | null;
3196
+ closedAtMs: number | null;
3197
+ isTrusted?: boolean | undefined;
3198
+ }, {
3199
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3200
+ userId: string;
3201
+ deviceId: string;
3202
+ currency: string;
3203
+ createdAtMs: number;
3204
+ amountKobo: number;
3205
+ holdId: string;
3206
+ installId: string | null;
3207
+ partnerId: string;
3208
+ adapterKind: string;
3209
+ externalHoldRef: string | null;
3210
+ capturedKobo: number;
3211
+ releasedKobo: number;
3212
+ remainingKobo: number;
3213
+ drainDeadlineMs: number;
3214
+ disableRequestedAtMs: number | null;
3215
+ closedAtMs: number | null;
3216
+ isTrusted?: boolean | undefined;
3217
+ }>;
3218
+ type OfflineHoldRecord = z.infer<typeof OfflineHoldRecordSchema>;
3219
+ declare const EnableOfflineResultSchema: z.ZodObject<{
3220
+ hold: z.ZodObject<{
3221
+ holdId: z.ZodString;
3222
+ userId: z.ZodString;
3223
+ deviceId: z.ZodString;
3224
+ partnerId: z.ZodString;
3225
+ adapterKind: z.ZodString;
3226
+ externalHoldRef: z.ZodNullable<z.ZodString>;
3227
+ amountKobo: z.ZodNumber;
3228
+ capturedKobo: z.ZodNumber;
3229
+ releasedKobo: z.ZodNumber;
3230
+ remainingKobo: z.ZodNumber;
3231
+ currency: z.ZodString;
3232
+ status: z.ZodEnum<["placing", "active", "disabling", "draining", "closed", "revoked", "failed"]>;
3233
+ installId: z.ZodNullable<z.ZodString>;
3234
+ drainDeadlineMs: z.ZodNumber;
3235
+ disableRequestedAtMs: z.ZodNullable<z.ZodNumber>;
3236
+ createdAtMs: z.ZodNumber;
3237
+ closedAtMs: z.ZodNullable<z.ZodNumber>;
3238
+ isTrusted: z.ZodOptional<z.ZodBoolean>;
3239
+ }, "strip", z.ZodTypeAny, {
3240
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3241
+ userId: string;
3242
+ deviceId: string;
3243
+ currency: string;
3244
+ createdAtMs: number;
3245
+ amountKobo: number;
3246
+ holdId: string;
3247
+ installId: string | null;
3248
+ partnerId: string;
3249
+ adapterKind: string;
3250
+ externalHoldRef: string | null;
3251
+ capturedKobo: number;
3252
+ releasedKobo: number;
3253
+ remainingKobo: number;
3254
+ drainDeadlineMs: number;
3255
+ disableRequestedAtMs: number | null;
3256
+ closedAtMs: number | null;
3257
+ isTrusted?: boolean | undefined;
3258
+ }, {
3259
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3260
+ userId: string;
3261
+ deviceId: string;
3262
+ currency: string;
3263
+ createdAtMs: number;
3264
+ amountKobo: number;
3265
+ holdId: string;
3266
+ installId: string | null;
3267
+ partnerId: string;
3268
+ adapterKind: string;
3269
+ externalHoldRef: string | null;
3270
+ capturedKobo: number;
3271
+ releasedKobo: number;
3272
+ remainingKobo: number;
3273
+ drainDeadlineMs: number;
3274
+ disableRequestedAtMs: number | null;
3275
+ closedAtMs: number | null;
3276
+ isTrusted?: boolean | undefined;
3277
+ }>;
3278
+ oac: z.ZodObject<{
3279
+ oac: z.ZodObject<{
3280
+ oacId: z.ZodString;
3281
+ issuerId: z.ZodString;
3282
+ userId: z.ZodString;
3283
+ deviceId: z.ZodString;
3284
+ devicePubkeyHex: z.ZodString;
3285
+ perTxCapKobo: z.ZodNumber;
3286
+ cumulativeCapKobo: z.ZodNumber;
3287
+ currency: z.ZodString;
3288
+ validFromMs: z.ZodNumber;
3289
+ validUntilMs: z.ZodNumber;
3290
+ counterSeed: z.ZodNumber;
3291
+ issuedAtMs: z.ZodNumber;
3292
+ }, "strip", z.ZodTypeAny, {
3293
+ userId: string;
3294
+ deviceId: string;
3295
+ currency: string;
3296
+ perTxCapKobo: number;
3297
+ cumulativeCapKobo: number;
3298
+ validFromMs: number;
3299
+ validUntilMs: number;
3300
+ counterSeed: number;
3301
+ issuedAtMs: number;
3302
+ issuerId: string;
3303
+ oacId: string;
3304
+ devicePubkeyHex: string;
3305
+ }, {
3306
+ userId: string;
3307
+ deviceId: string;
3308
+ currency: string;
3309
+ perTxCapKobo: number;
3310
+ cumulativeCapKobo: number;
3311
+ validFromMs: number;
3312
+ validUntilMs: number;
3313
+ counterSeed: number;
3314
+ issuedAtMs: number;
3315
+ issuerId: string;
3316
+ oacId: string;
3317
+ devicePubkeyHex: string;
3318
+ }>;
3319
+ issuerSig: z.ZodString;
3320
+ issuerPublicKeyHex: z.ZodString;
3321
+ } & {
3322
+ currentOfflineSpentKobo: z.ZodNumber;
3323
+ status: z.ZodEnum<["active", "superseded", "expired", "revoked", "disabling", "draining", "closed"]>;
3324
+ supersededAtMs: z.ZodNullable<z.ZodNumber>;
3325
+ revokedAtMs: z.ZodNullable<z.ZodNumber>;
3326
+ holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3327
+ }, "strip", z.ZodTypeAny, {
3328
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3329
+ issuerSig: string;
3330
+ revokedAtMs: number | null;
3331
+ oac: {
3332
+ userId: string;
3333
+ deviceId: string;
3334
+ currency: string;
3335
+ perTxCapKobo: number;
3336
+ cumulativeCapKobo: number;
3337
+ validFromMs: number;
3338
+ validUntilMs: number;
3339
+ counterSeed: number;
3340
+ issuedAtMs: number;
3341
+ issuerId: string;
3342
+ oacId: string;
3343
+ devicePubkeyHex: string;
3344
+ };
3345
+ issuerPublicKeyHex: string;
3346
+ currentOfflineSpentKobo: number;
3347
+ supersededAtMs: number | null;
3348
+ holdId?: string | null | undefined;
3349
+ }, {
3350
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3351
+ issuerSig: string;
3352
+ revokedAtMs: number | null;
3353
+ oac: {
3354
+ userId: string;
3355
+ deviceId: string;
3356
+ currency: string;
3357
+ perTxCapKobo: number;
3358
+ cumulativeCapKobo: number;
3359
+ validFromMs: number;
3360
+ validUntilMs: number;
3361
+ counterSeed: number;
3362
+ issuedAtMs: number;
3363
+ issuerId: string;
3364
+ oacId: string;
3365
+ devicePubkeyHex: string;
3366
+ };
3367
+ issuerPublicKeyHex: string;
3368
+ currentOfflineSpentKobo: number;
3369
+ supersededAtMs: number | null;
3370
+ holdId?: string | null | undefined;
3371
+ }>;
3372
+ }, "strip", z.ZodTypeAny, {
3373
+ oac: {
3374
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3375
+ issuerSig: string;
3376
+ revokedAtMs: number | null;
3377
+ oac: {
3378
+ userId: string;
3379
+ deviceId: string;
3380
+ currency: string;
3381
+ perTxCapKobo: number;
3382
+ cumulativeCapKobo: number;
3383
+ validFromMs: number;
3384
+ validUntilMs: number;
3385
+ counterSeed: number;
3386
+ issuedAtMs: number;
3387
+ issuerId: string;
3388
+ oacId: string;
3389
+ devicePubkeyHex: string;
3390
+ };
3391
+ issuerPublicKeyHex: string;
3392
+ currentOfflineSpentKobo: number;
3393
+ supersededAtMs: number | null;
3394
+ holdId?: string | null | undefined;
3395
+ };
3396
+ hold: {
3397
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3398
+ userId: string;
3399
+ deviceId: string;
3400
+ currency: string;
3401
+ createdAtMs: number;
3402
+ amountKobo: number;
3403
+ holdId: string;
3404
+ installId: string | null;
3405
+ partnerId: string;
3406
+ adapterKind: string;
3407
+ externalHoldRef: string | null;
3408
+ capturedKobo: number;
3409
+ releasedKobo: number;
3410
+ remainingKobo: number;
3411
+ drainDeadlineMs: number;
3412
+ disableRequestedAtMs: number | null;
3413
+ closedAtMs: number | null;
3414
+ isTrusted?: boolean | undefined;
3415
+ };
3416
+ }, {
3417
+ oac: {
3418
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3419
+ issuerSig: string;
3420
+ revokedAtMs: number | null;
3421
+ oac: {
3422
+ userId: string;
3423
+ deviceId: string;
3424
+ currency: string;
3425
+ perTxCapKobo: number;
3426
+ cumulativeCapKobo: number;
3427
+ validFromMs: number;
3428
+ validUntilMs: number;
3429
+ counterSeed: number;
3430
+ issuedAtMs: number;
3431
+ issuerId: string;
3432
+ oacId: string;
3433
+ devicePubkeyHex: string;
3434
+ };
3435
+ issuerPublicKeyHex: string;
3436
+ currentOfflineSpentKobo: number;
3437
+ supersededAtMs: number | null;
3438
+ holdId?: string | null | undefined;
3439
+ };
3440
+ hold: {
3441
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3442
+ userId: string;
3443
+ deviceId: string;
3444
+ currency: string;
3445
+ createdAtMs: number;
3446
+ amountKobo: number;
3447
+ holdId: string;
3448
+ installId: string | null;
3449
+ partnerId: string;
3450
+ adapterKind: string;
3451
+ externalHoldRef: string | null;
3452
+ capturedKobo: number;
3453
+ releasedKobo: number;
3454
+ remainingKobo: number;
3455
+ drainDeadlineMs: number;
3456
+ disableRequestedAtMs: number | null;
3457
+ closedAtMs: number | null;
3458
+ isTrusted?: boolean | undefined;
3459
+ };
3460
+ }>;
3461
+ type EnableOfflineResult = z.infer<typeof EnableOfflineResultSchema>;
3462
+ declare const DisableOfflineResultSchema: z.ZodObject<{
3463
+ hold: z.ZodObject<{
3464
+ holdId: z.ZodString;
3465
+ userId: z.ZodString;
3466
+ deviceId: z.ZodString;
3467
+ partnerId: z.ZodString;
3468
+ adapterKind: z.ZodString;
3469
+ externalHoldRef: z.ZodNullable<z.ZodString>;
3470
+ amountKobo: z.ZodNumber;
3471
+ capturedKobo: z.ZodNumber;
3472
+ releasedKobo: z.ZodNumber;
3473
+ remainingKobo: z.ZodNumber;
3474
+ currency: z.ZodString;
3475
+ status: z.ZodEnum<["placing", "active", "disabling", "draining", "closed", "revoked", "failed"]>;
3476
+ installId: z.ZodNullable<z.ZodString>;
3477
+ drainDeadlineMs: z.ZodNumber;
3478
+ disableRequestedAtMs: z.ZodNullable<z.ZodNumber>;
3479
+ createdAtMs: z.ZodNumber;
3480
+ closedAtMs: z.ZodNullable<z.ZodNumber>;
3481
+ isTrusted: z.ZodOptional<z.ZodBoolean>;
3482
+ }, "strip", z.ZodTypeAny, {
3483
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3484
+ userId: string;
3485
+ deviceId: string;
3486
+ currency: string;
3487
+ createdAtMs: number;
3488
+ amountKobo: number;
3489
+ holdId: string;
3490
+ installId: string | null;
3491
+ partnerId: string;
3492
+ adapterKind: string;
3493
+ externalHoldRef: string | null;
3494
+ capturedKobo: number;
3495
+ releasedKobo: number;
3496
+ remainingKobo: number;
3497
+ drainDeadlineMs: number;
3498
+ disableRequestedAtMs: number | null;
3499
+ closedAtMs: number | null;
3500
+ isTrusted?: boolean | undefined;
3501
+ }, {
3502
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3503
+ userId: string;
3504
+ deviceId: string;
3505
+ currency: string;
3506
+ createdAtMs: number;
3507
+ amountKobo: number;
3508
+ holdId: string;
3509
+ installId: string | null;
3510
+ partnerId: string;
3511
+ adapterKind: string;
3512
+ externalHoldRef: string | null;
3513
+ capturedKobo: number;
3514
+ releasedKobo: number;
3515
+ remainingKobo: number;
3516
+ drainDeadlineMs: number;
3517
+ disableRequestedAtMs: number | null;
3518
+ closedAtMs: number | null;
3519
+ isTrusted?: boolean | undefined;
3520
+ }>;
3521
+ trusted: z.ZodBoolean;
3522
+ settledClaims: z.ZodNumber;
3523
+ }, "strip", z.ZodTypeAny, {
3524
+ hold: {
3525
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3526
+ userId: string;
3527
+ deviceId: string;
3528
+ currency: string;
3529
+ createdAtMs: number;
3530
+ amountKobo: number;
3531
+ holdId: string;
3532
+ installId: string | null;
3533
+ partnerId: string;
3534
+ adapterKind: string;
3535
+ externalHoldRef: string | null;
3536
+ capturedKobo: number;
3537
+ releasedKobo: number;
3538
+ remainingKobo: number;
3539
+ drainDeadlineMs: number;
3540
+ disableRequestedAtMs: number | null;
3541
+ closedAtMs: number | null;
3542
+ isTrusted?: boolean | undefined;
3543
+ };
3544
+ trusted: boolean;
3545
+ settledClaims: number;
3546
+ }, {
3547
+ hold: {
3548
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3549
+ userId: string;
3550
+ deviceId: string;
3551
+ currency: string;
3552
+ createdAtMs: number;
3553
+ amountKobo: number;
3554
+ holdId: string;
3555
+ installId: string | null;
3556
+ partnerId: string;
3557
+ adapterKind: string;
3558
+ externalHoldRef: string | null;
3559
+ capturedKobo: number;
3560
+ releasedKobo: number;
3561
+ remainingKobo: number;
3562
+ drainDeadlineMs: number;
3563
+ disableRequestedAtMs: number | null;
3564
+ closedAtMs: number | null;
3565
+ isTrusted?: boolean | undefined;
3566
+ };
3567
+ trusted: boolean;
3568
+ settledClaims: number;
3569
+ }>;
3570
+ type DisableOfflineResult = z.infer<typeof DisableOfflineResultSchema>;
3571
+ declare const OfflineStatusResultSchema: z.ZodObject<{
3572
+ hold: z.ZodNullable<z.ZodObject<{
3573
+ holdId: z.ZodString;
3574
+ userId: z.ZodString;
3575
+ deviceId: z.ZodString;
3576
+ partnerId: z.ZodString;
3577
+ adapterKind: z.ZodString;
3578
+ externalHoldRef: z.ZodNullable<z.ZodString>;
3579
+ amountKobo: z.ZodNumber;
3580
+ capturedKobo: z.ZodNumber;
3581
+ releasedKobo: z.ZodNumber;
3582
+ remainingKobo: z.ZodNumber;
3583
+ currency: z.ZodString;
3584
+ status: z.ZodEnum<["placing", "active", "disabling", "draining", "closed", "revoked", "failed"]>;
3585
+ installId: z.ZodNullable<z.ZodString>;
3586
+ drainDeadlineMs: z.ZodNumber;
3587
+ disableRequestedAtMs: z.ZodNullable<z.ZodNumber>;
3588
+ createdAtMs: z.ZodNumber;
3589
+ closedAtMs: z.ZodNullable<z.ZodNumber>;
3590
+ isTrusted: z.ZodOptional<z.ZodBoolean>;
3591
+ }, "strip", z.ZodTypeAny, {
3592
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3593
+ userId: string;
3594
+ deviceId: string;
3595
+ currency: string;
3596
+ createdAtMs: number;
3597
+ amountKobo: number;
3598
+ holdId: string;
3599
+ installId: string | null;
3600
+ partnerId: string;
3601
+ adapterKind: string;
3602
+ externalHoldRef: string | null;
3603
+ capturedKobo: number;
3604
+ releasedKobo: number;
3605
+ remainingKobo: number;
3606
+ drainDeadlineMs: number;
3607
+ disableRequestedAtMs: number | null;
3608
+ closedAtMs: number | null;
3609
+ isTrusted?: boolean | undefined;
3610
+ }, {
3611
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3612
+ userId: string;
3613
+ deviceId: string;
3614
+ currency: string;
3615
+ createdAtMs: number;
3616
+ amountKobo: number;
3617
+ holdId: string;
3618
+ installId: string | null;
3619
+ partnerId: string;
3620
+ adapterKind: string;
3621
+ externalHoldRef: string | null;
3622
+ capturedKobo: number;
3623
+ releasedKobo: number;
3624
+ remainingKobo: number;
3625
+ drainDeadlineMs: number;
3626
+ disableRequestedAtMs: number | null;
3627
+ closedAtMs: number | null;
3628
+ isTrusted?: boolean | undefined;
3629
+ }>>;
3630
+ active: z.ZodNullable<z.ZodObject<{
3631
+ oac: z.ZodObject<{
3632
+ oacId: z.ZodString;
3633
+ issuerId: z.ZodString;
3634
+ userId: z.ZodString;
3635
+ deviceId: z.ZodString;
3636
+ devicePubkeyHex: z.ZodString;
3637
+ perTxCapKobo: z.ZodNumber;
3638
+ cumulativeCapKobo: z.ZodNumber;
3639
+ currency: z.ZodString;
3640
+ validFromMs: z.ZodNumber;
3641
+ validUntilMs: z.ZodNumber;
3642
+ counterSeed: z.ZodNumber;
3643
+ issuedAtMs: z.ZodNumber;
3644
+ }, "strip", z.ZodTypeAny, {
3645
+ userId: string;
3646
+ deviceId: string;
3647
+ currency: string;
3648
+ perTxCapKobo: number;
3649
+ cumulativeCapKobo: number;
3650
+ validFromMs: number;
3651
+ validUntilMs: number;
3652
+ counterSeed: number;
3653
+ issuedAtMs: number;
3654
+ issuerId: string;
3655
+ oacId: string;
3656
+ devicePubkeyHex: string;
3657
+ }, {
3658
+ userId: string;
3659
+ deviceId: string;
3660
+ currency: string;
3661
+ perTxCapKobo: number;
3662
+ cumulativeCapKobo: number;
3663
+ validFromMs: number;
3664
+ validUntilMs: number;
3665
+ counterSeed: number;
3666
+ issuedAtMs: number;
3667
+ issuerId: string;
3668
+ oacId: string;
3669
+ devicePubkeyHex: string;
3670
+ }>;
3671
+ issuerSig: z.ZodString;
3672
+ issuerPublicKeyHex: z.ZodString;
3673
+ } & {
3674
+ currentOfflineSpentKobo: z.ZodNumber;
3675
+ status: z.ZodEnum<["active", "superseded", "expired", "revoked", "disabling", "draining", "closed"]>;
3676
+ supersededAtMs: z.ZodNullable<z.ZodNumber>;
3677
+ revokedAtMs: z.ZodNullable<z.ZodNumber>;
3678
+ holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3679
+ }, "strip", z.ZodTypeAny, {
3680
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3681
+ issuerSig: string;
3682
+ revokedAtMs: number | null;
3683
+ oac: {
3684
+ userId: string;
3685
+ deviceId: string;
3686
+ currency: string;
3687
+ perTxCapKobo: number;
3688
+ cumulativeCapKobo: number;
3689
+ validFromMs: number;
3690
+ validUntilMs: number;
3691
+ counterSeed: number;
3692
+ issuedAtMs: number;
3693
+ issuerId: string;
3694
+ oacId: string;
3695
+ devicePubkeyHex: string;
3696
+ };
3697
+ issuerPublicKeyHex: string;
3698
+ currentOfflineSpentKobo: number;
3699
+ supersededAtMs: number | null;
3700
+ holdId?: string | null | undefined;
3701
+ }, {
3702
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3703
+ issuerSig: string;
3704
+ revokedAtMs: number | null;
3705
+ oac: {
3706
+ userId: string;
3707
+ deviceId: string;
3708
+ currency: string;
3709
+ perTxCapKobo: number;
3710
+ cumulativeCapKobo: number;
3711
+ validFromMs: number;
3712
+ validUntilMs: number;
3713
+ counterSeed: number;
3714
+ issuedAtMs: number;
3715
+ issuerId: string;
3716
+ oacId: string;
3717
+ devicePubkeyHex: string;
3718
+ };
3719
+ issuerPublicKeyHex: string;
3720
+ currentOfflineSpentKobo: number;
3721
+ supersededAtMs: number | null;
3722
+ holdId?: string | null | undefined;
3723
+ }>>;
3724
+ }, "strip", z.ZodTypeAny, {
3725
+ active: {
3726
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3727
+ issuerSig: string;
3728
+ revokedAtMs: number | null;
3729
+ oac: {
3730
+ userId: string;
3731
+ deviceId: string;
3732
+ currency: string;
3733
+ perTxCapKobo: number;
3734
+ cumulativeCapKobo: number;
3735
+ validFromMs: number;
3736
+ validUntilMs: number;
3737
+ counterSeed: number;
3738
+ issuedAtMs: number;
3739
+ issuerId: string;
3740
+ oacId: string;
3741
+ devicePubkeyHex: string;
3742
+ };
3743
+ issuerPublicKeyHex: string;
3744
+ currentOfflineSpentKobo: number;
3745
+ supersededAtMs: number | null;
3746
+ holdId?: string | null | undefined;
3747
+ } | null;
3748
+ hold: {
3749
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3750
+ userId: string;
3751
+ deviceId: string;
3752
+ currency: string;
3753
+ createdAtMs: number;
3754
+ amountKobo: number;
3755
+ holdId: string;
3756
+ installId: string | null;
3757
+ partnerId: string;
3758
+ adapterKind: string;
3759
+ externalHoldRef: string | null;
3760
+ capturedKobo: number;
3761
+ releasedKobo: number;
3762
+ remainingKobo: number;
3763
+ drainDeadlineMs: number;
3764
+ disableRequestedAtMs: number | null;
3765
+ closedAtMs: number | null;
3766
+ isTrusted?: boolean | undefined;
3767
+ } | null;
3768
+ }, {
3769
+ active: {
3770
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3771
+ issuerSig: string;
3772
+ revokedAtMs: number | null;
3773
+ oac: {
3774
+ userId: string;
3775
+ deviceId: string;
3776
+ currency: string;
3777
+ perTxCapKobo: number;
3778
+ cumulativeCapKobo: number;
3779
+ validFromMs: number;
3780
+ validUntilMs: number;
3781
+ counterSeed: number;
3782
+ issuedAtMs: number;
3783
+ issuerId: string;
3784
+ oacId: string;
3785
+ devicePubkeyHex: string;
3786
+ };
3787
+ issuerPublicKeyHex: string;
3788
+ currentOfflineSpentKobo: number;
3789
+ supersededAtMs: number | null;
3790
+ holdId?: string | null | undefined;
3791
+ } | null;
3792
+ hold: {
3793
+ status: "active" | "closed" | "failed" | "revoked" | "disabling" | "draining" | "placing";
3794
+ userId: string;
3795
+ deviceId: string;
3796
+ currency: string;
3797
+ createdAtMs: number;
3798
+ amountKobo: number;
3799
+ holdId: string;
3800
+ installId: string | null;
3801
+ partnerId: string;
3802
+ adapterKind: string;
3803
+ externalHoldRef: string | null;
3804
+ capturedKobo: number;
3805
+ releasedKobo: number;
3806
+ remainingKobo: number;
3807
+ drainDeadlineMs: number;
3808
+ disableRequestedAtMs: number | null;
3809
+ closedAtMs: number | null;
3810
+ isTrusted?: boolean | undefined;
3811
+ } | null;
3812
+ }>;
3813
+ type OfflineStatusResult = z.infer<typeof OfflineStatusResultSchema>;
3814
+ declare const OfflineStateResultSchema: z.ZodObject<{
3815
+ active: z.ZodNullable<z.ZodObject<{
3816
+ oac: z.ZodObject<{
3817
+ oacId: z.ZodString;
3818
+ issuerId: z.ZodString;
3819
+ userId: z.ZodString;
3820
+ deviceId: z.ZodString;
3821
+ devicePubkeyHex: z.ZodString;
3822
+ perTxCapKobo: z.ZodNumber;
3823
+ cumulativeCapKobo: z.ZodNumber;
3824
+ currency: z.ZodString;
3825
+ validFromMs: z.ZodNumber;
3826
+ validUntilMs: z.ZodNumber;
3827
+ counterSeed: z.ZodNumber;
3828
+ issuedAtMs: z.ZodNumber;
3829
+ }, "strip", z.ZodTypeAny, {
3830
+ userId: string;
3831
+ deviceId: string;
3832
+ currency: string;
3833
+ perTxCapKobo: number;
3834
+ cumulativeCapKobo: number;
3835
+ validFromMs: number;
3836
+ validUntilMs: number;
3837
+ counterSeed: number;
3838
+ issuedAtMs: number;
3839
+ issuerId: string;
3840
+ oacId: string;
3841
+ devicePubkeyHex: string;
3842
+ }, {
3843
+ userId: string;
3844
+ deviceId: string;
3845
+ currency: string;
3846
+ perTxCapKobo: number;
3847
+ cumulativeCapKobo: number;
3848
+ validFromMs: number;
3849
+ validUntilMs: number;
3850
+ counterSeed: number;
3851
+ issuedAtMs: number;
3852
+ issuerId: string;
3853
+ oacId: string;
3854
+ devicePubkeyHex: string;
3855
+ }>;
3856
+ issuerSig: z.ZodString;
3857
+ issuerPublicKeyHex: z.ZodString;
3858
+ } & {
3859
+ currentOfflineSpentKobo: z.ZodNumber;
3860
+ status: z.ZodEnum<["active", "superseded", "expired", "revoked", "disabling", "draining", "closed"]>;
3861
+ supersededAtMs: z.ZodNullable<z.ZodNumber>;
3862
+ revokedAtMs: z.ZodNullable<z.ZodNumber>;
3863
+ holdId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
3864
+ }, "strip", z.ZodTypeAny, {
3865
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3866
+ issuerSig: string;
3867
+ revokedAtMs: number | null;
3868
+ oac: {
3869
+ userId: string;
3870
+ deviceId: string;
3871
+ currency: string;
3872
+ perTxCapKobo: number;
3873
+ cumulativeCapKobo: number;
3874
+ validFromMs: number;
3875
+ validUntilMs: number;
3876
+ counterSeed: number;
3877
+ issuedAtMs: number;
3878
+ issuerId: string;
3879
+ oacId: string;
3880
+ devicePubkeyHex: string;
3881
+ };
3882
+ issuerPublicKeyHex: string;
3883
+ currentOfflineSpentKobo: number;
3884
+ supersededAtMs: number | null;
3885
+ holdId?: string | null | undefined;
3886
+ }, {
3887
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3888
+ issuerSig: string;
3889
+ revokedAtMs: number | null;
3890
+ oac: {
3891
+ userId: string;
3892
+ deviceId: string;
3893
+ currency: string;
3894
+ perTxCapKobo: number;
3895
+ cumulativeCapKobo: number;
3896
+ validFromMs: number;
3897
+ validUntilMs: number;
3898
+ counterSeed: number;
3899
+ issuedAtMs: number;
3900
+ issuerId: string;
3901
+ oacId: string;
3902
+ devicePubkeyHex: string;
3903
+ };
3904
+ issuerPublicKeyHex: string;
3905
+ currentOfflineSpentKobo: number;
3906
+ supersededAtMs: number | null;
3907
+ holdId?: string | null | undefined;
3908
+ }>>;
3909
+ }, "strip", z.ZodTypeAny, {
3910
+ active: {
3911
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3912
+ issuerSig: string;
3913
+ revokedAtMs: number | null;
3914
+ oac: {
3915
+ userId: string;
3916
+ deviceId: string;
3917
+ currency: string;
3918
+ perTxCapKobo: number;
3919
+ cumulativeCapKobo: number;
3920
+ validFromMs: number;
3921
+ validUntilMs: number;
3922
+ counterSeed: number;
3923
+ issuedAtMs: number;
3924
+ issuerId: string;
3925
+ oacId: string;
3926
+ devicePubkeyHex: string;
3927
+ };
3928
+ issuerPublicKeyHex: string;
3929
+ currentOfflineSpentKobo: number;
3930
+ supersededAtMs: number | null;
3931
+ holdId?: string | null | undefined;
3932
+ } | null;
3933
+ }, {
3934
+ active: {
3935
+ status: "active" | "closed" | "expired" | "revoked" | "superseded" | "disabling" | "draining";
3936
+ issuerSig: string;
3937
+ revokedAtMs: number | null;
3938
+ oac: {
3939
+ userId: string;
3940
+ deviceId: string;
3941
+ currency: string;
3942
+ perTxCapKobo: number;
3943
+ cumulativeCapKobo: number;
3944
+ validFromMs: number;
3945
+ validUntilMs: number;
3946
+ counterSeed: number;
3947
+ issuedAtMs: number;
3948
+ issuerId: string;
3949
+ oacId: string;
3950
+ devicePubkeyHex: string;
3951
+ };
3952
+ issuerPublicKeyHex: string;
3953
+ currentOfflineSpentKobo: number;
3954
+ supersededAtMs: number | null;
3955
+ holdId?: string | null | undefined;
3956
+ } | null;
3957
+ }>;
3958
+ type OfflineStateResult = z.infer<typeof OfflineStateResultSchema>;
3959
+ declare const ConsumerPaymentClaimSchema: z.ZodObject<{
3960
+ oacId: z.ZodString;
3961
+ encounterId: z.ZodOptional<z.ZodString>;
3962
+ payerUserId: z.ZodString;
3963
+ payeeUserId: z.ZodString;
3964
+ payerDeviceId: z.ZodString;
3965
+ payerNonce: z.ZodString;
3966
+ payeeNonce: z.ZodString;
3967
+ amountKobo: z.ZodNumber;
3968
+ currency: z.ZodDefault<z.ZodString>;
3969
+ occurredAtMs: z.ZodNumber;
3970
+ completedAtMs: z.ZodOptional<z.ZodNumber>;
3971
+ contextId: z.ZodOptional<z.ZodString>;
3972
+ payerPubkeyHex: z.ZodString;
3973
+ payerSignature: z.ZodString;
3974
+ payeePubkeyHex: z.ZodOptional<z.ZodString>;
3975
+ payeeSignature: z.ZodOptional<z.ZodString>;
3976
+ }, "strip", z.ZodTypeAny, {
3977
+ currency: string;
3978
+ amountKobo: number;
3979
+ payerUserId: string;
3980
+ payeeUserId: string;
3981
+ payerNonce: string;
3982
+ payeeNonce: string;
3983
+ occurredAtMs: number;
3984
+ payerSignature: string;
3985
+ oacId: string;
3986
+ payerDeviceId: string;
3987
+ payerPubkeyHex: string;
3988
+ encounterId?: string | undefined;
3989
+ completedAtMs?: number | undefined;
3990
+ contextId?: string | undefined;
3991
+ payeeSignature?: string | undefined;
3992
+ payeePubkeyHex?: string | undefined;
3993
+ }, {
3994
+ amountKobo: number;
3995
+ payerUserId: string;
3996
+ payeeUserId: string;
3997
+ payerNonce: string;
3998
+ payeeNonce: string;
3999
+ occurredAtMs: number;
4000
+ payerSignature: string;
4001
+ oacId: string;
4002
+ payerDeviceId: string;
4003
+ payerPubkeyHex: string;
4004
+ currency?: string | undefined;
4005
+ encounterId?: string | undefined;
4006
+ completedAtMs?: number | undefined;
4007
+ contextId?: string | undefined;
4008
+ payeeSignature?: string | undefined;
4009
+ payeePubkeyHex?: string | undefined;
4010
+ }>;
4011
+ type ConsumerPaymentClaim = z.infer<typeof ConsumerPaymentClaimSchema>;
4012
+ declare const ConsumerSettlementSchema: z.ZodObject<{
4013
+ settlementId: z.ZodString;
4014
+ settlementKey: z.ZodString;
4015
+ encounterId: z.ZodString;
4016
+ oacId: z.ZodString;
4017
+ payerUserId: z.ZodString;
4018
+ payeeUserId: z.ZodString;
4019
+ amountKobo: z.ZodNumber;
4020
+ currency: z.ZodString;
4021
+ status: z.ZodEnum<["SETTLED", "REVIEW"]>;
4022
+ reviewReason: z.ZodNullable<z.ZodString>;
4023
+ ledgerRef: z.ZodNullable<z.ZodString>;
4024
+ issuerSig: z.ZodString;
4025
+ createdAtMs: z.ZodNumber;
4026
+ }, "strip", z.ZodTypeAny, {
4027
+ status: "SETTLED" | "REVIEW";
4028
+ currency: string;
4029
+ createdAtMs: number;
4030
+ amountKobo: number;
4031
+ payerUserId: string;
4032
+ ledgerRef: string | null;
4033
+ issuerSig: string;
4034
+ encounterId: string;
4035
+ payeeUserId: string;
4036
+ settlementId: string;
4037
+ settlementKey: string;
4038
+ oacId: string;
4039
+ reviewReason: string | null;
4040
+ }, {
4041
+ status: "SETTLED" | "REVIEW";
4042
+ currency: string;
4043
+ createdAtMs: number;
4044
+ amountKobo: number;
4045
+ payerUserId: string;
4046
+ ledgerRef: string | null;
4047
+ issuerSig: string;
4048
+ encounterId: string;
4049
+ payeeUserId: string;
4050
+ settlementId: string;
4051
+ settlementKey: string;
4052
+ oacId: string;
4053
+ reviewReason: string | null;
4054
+ }>;
4055
+ type ConsumerSettlement = z.infer<typeof ConsumerSettlementSchema>;
4056
+ declare const ConsumerSettleResultSchema: z.ZodObject<{
4057
+ settlement: z.ZodObject<{
4058
+ settlementId: z.ZodString;
4059
+ settlementKey: z.ZodString;
4060
+ encounterId: z.ZodString;
4061
+ oacId: z.ZodString;
4062
+ payerUserId: z.ZodString;
4063
+ payeeUserId: z.ZodString;
4064
+ amountKobo: z.ZodNumber;
4065
+ currency: z.ZodString;
4066
+ status: z.ZodEnum<["SETTLED", "REVIEW"]>;
4067
+ reviewReason: z.ZodNullable<z.ZodString>;
4068
+ ledgerRef: z.ZodNullable<z.ZodString>;
4069
+ issuerSig: z.ZodString;
4070
+ createdAtMs: z.ZodNumber;
4071
+ }, "strip", z.ZodTypeAny, {
4072
+ status: "SETTLED" | "REVIEW";
4073
+ currency: string;
4074
+ createdAtMs: number;
4075
+ amountKobo: number;
4076
+ payerUserId: string;
4077
+ ledgerRef: string | null;
4078
+ issuerSig: string;
4079
+ encounterId: string;
4080
+ payeeUserId: string;
4081
+ settlementId: string;
4082
+ settlementKey: string;
4083
+ oacId: string;
4084
+ reviewReason: string | null;
4085
+ }, {
4086
+ status: "SETTLED" | "REVIEW";
4087
+ currency: string;
4088
+ createdAtMs: number;
4089
+ amountKobo: number;
4090
+ payerUserId: string;
4091
+ ledgerRef: string | null;
4092
+ issuerSig: string;
4093
+ encounterId: string;
4094
+ payeeUserId: string;
4095
+ settlementId: string;
4096
+ settlementKey: string;
4097
+ oacId: string;
4098
+ reviewReason: string | null;
4099
+ }>;
4100
+ encounterId: z.ZodString;
4101
+ replayed: z.ZodBoolean;
4102
+ }, "strip", z.ZodTypeAny, {
4103
+ replayed: boolean;
4104
+ encounterId: string;
4105
+ settlement: {
4106
+ status: "SETTLED" | "REVIEW";
4107
+ currency: string;
4108
+ createdAtMs: number;
4109
+ amountKobo: number;
4110
+ payerUserId: string;
4111
+ ledgerRef: string | null;
4112
+ issuerSig: string;
4113
+ encounterId: string;
4114
+ payeeUserId: string;
4115
+ settlementId: string;
4116
+ settlementKey: string;
4117
+ oacId: string;
4118
+ reviewReason: string | null;
4119
+ };
4120
+ }, {
4121
+ replayed: boolean;
4122
+ encounterId: string;
4123
+ settlement: {
4124
+ status: "SETTLED" | "REVIEW";
4125
+ currency: string;
4126
+ createdAtMs: number;
4127
+ amountKobo: number;
4128
+ payerUserId: string;
4129
+ ledgerRef: string | null;
4130
+ issuerSig: string;
4131
+ encounterId: string;
4132
+ payeeUserId: string;
4133
+ settlementId: string;
4134
+ settlementKey: string;
4135
+ oacId: string;
4136
+ reviewReason: string | null;
4137
+ };
4138
+ }>;
4139
+ type ConsumerSettleResult = z.infer<typeof ConsumerSettleResultSchema>;
4140
+ declare const RevokeDeviceKeyInputSchema: z.ZodObject<{
4141
+ deviceId: z.ZodString;
4142
+ /** Step-up token from /api/v1/auth/send/verify with purpose='offline_revoke'. */
4143
+ sendAuthToken: z.ZodString;
4144
+ }, "strip", z.ZodTypeAny, {
4145
+ deviceId: string;
4146
+ sendAuthToken: string;
4147
+ }, {
4148
+ deviceId: string;
4149
+ sendAuthToken: string;
4150
+ }>;
4151
+ type RevokeDeviceKeyInput = z.infer<typeof RevokeDeviceKeyInputSchema>;
4152
+ type MeOfflineClientOptions = {
4153
+ baseUrl: string;
4154
+ /** Pre-configured fetch (session bearer attached upstream). */
4155
+ fetchImpl?: typeof fetch;
4156
+ };
4157
+ type MeOfflineClient = {
4158
+ registerDeviceKey: (input: RegisterDeviceKeyInput) => Promise<DeviceKeyRecord>;
4159
+ listDeviceKeys: () => Promise<{
4160
+ items: DeviceKeyRecord[];
4161
+ }>;
4162
+ revokeDeviceKey: (input: RevokeDeviceKeyInput) => Promise<void>;
4163
+ enable: (input: EnableOfflineInput) => Promise<EnableOfflineResult>;
4164
+ refresh: (input: IssueOACInput) => Promise<OACRecord>;
4165
+ disable: (input: DisableOfflineInput) => Promise<DisableOfflineResult>;
4166
+ getStatus: (deviceId?: string) => Promise<OfflineStatusResult>;
4167
+ getState: (deviceId?: string) => Promise<OfflineStateResult>;
4168
+ submitClaim: (claim: ConsumerPaymentClaim) => Promise<ConsumerSettleResult>;
4169
+ };
4170
+ declare function createMeOfflineClient(opts: MeOfflineClientOptions): MeOfflineClient;
4171
+
4172
+ /**
4173
+ * Partner-funded wallet rails SDK.
4174
+ *
4175
+ * Provides two clients:
4176
+ * - `createPartnerFundingClient(partnerClient)` — uses partner HMAC for
4177
+ * the bank/merchant partner endpoints (funding webhook, payout events,
4178
+ * daily reconciliation). The caller MUST have minted credentials with
4179
+ * the appropriate scopes (`partner:funding:write`, `partner:payout:write`,
4180
+ * `partner:reconciliation:read`).
4181
+ * - `createConsumerWithdrawalsClient(opts)` — session-bearer auth for the
4182
+ * consumer endpoints (linked payout destinations, withdrawals).
4183
+ *
4184
+ * Schemas mirror `flur-backend/src/partner-funding/types.ts`. Money is
4185
+ * always represented in MINOR units (e.g. kobo for NGN). BIGINT-bearing
4186
+ * response fields are serialized as integer strings to avoid JS number
4187
+ * precision issues; reserve balances and imbalances may be signed.
4188
+ */
4189
+
4190
+ declare const PARTNER_KINDS: readonly ["bank", "merchant"];
4191
+ type PartnerKind = (typeof PARTNER_KINDS)[number];
4192
+ declare const CUSTODIAL_MODES: readonly ["agent_of_bank", "flur_virtual_pool"];
4193
+ type CustodialMode = (typeof CUSTODIAL_MODES)[number];
4194
+ declare const PARTNER_PROFILE_STATUSES: readonly ["active", "suspended", "closed"];
4195
+ type PartnerProfileStatus = (typeof PARTNER_PROFILE_STATUSES)[number];
4196
+ declare const PARTNER_FUNDING_DIRECTIONS: readonly ["credit", "debit"];
4197
+ type PartnerFundingDirection = (typeof PARTNER_FUNDING_DIRECTIONS)[number];
4198
+ declare const PARTNER_FUNDING_STATUSES: readonly ["pending", "posted", "failed"];
4199
+ type PartnerFundingStatus = (typeof PARTNER_FUNDING_STATUSES)[number];
4200
+ declare const PAYOUT_DESTINATION_STATUSES: readonly ["pending", "verified", "disabled"];
4201
+ type PayoutDestinationStatus = (typeof PAYOUT_DESTINATION_STATUSES)[number];
4202
+ declare const WITHDRAWAL_STATES: readonly ["requested", "submitted", "processing", "paid", "failed", "reversed"];
4203
+ type WithdrawalState = (typeof WITHDRAWAL_STATES)[number];
4204
+ declare const PartnerProfileSchema: z.ZodObject<{
4205
+ partnerAccountId: z.ZodString;
4206
+ kind: z.ZodEnum<["bank", "merchant"]>;
4207
+ custodialMode: z.ZodEnum<["agent_of_bank", "flur_virtual_pool"]>;
4208
+ displayName: z.ZodString;
4209
+ bankCode: z.ZodNullable<z.ZodString>;
4210
+ poolAccountNumber: z.ZodNullable<z.ZodString>;
4211
+ status: z.ZodEnum<["active", "suspended", "closed"]>;
4212
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4213
+ createdAtMs: z.ZodNumber;
4214
+ updatedAtMs: z.ZodNumber;
4215
+ }, "strip", z.ZodTypeAny, {
4216
+ status: "active" | "suspended" | "closed";
4217
+ displayName: string;
4218
+ metadata: Record<string, unknown>;
4219
+ createdAtMs: number;
4220
+ updatedAtMs: number;
4221
+ kind: "bank" | "merchant";
4222
+ partnerAccountId: string;
4223
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4224
+ bankCode: string | null;
4225
+ poolAccountNumber: string | null;
4226
+ }, {
4227
+ status: "active" | "suspended" | "closed";
4228
+ displayName: string;
4229
+ metadata: Record<string, unknown>;
4230
+ createdAtMs: number;
4231
+ updatedAtMs: number;
4232
+ kind: "bank" | "merchant";
4233
+ partnerAccountId: string;
4234
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4235
+ bankCode: string | null;
4236
+ poolAccountNumber: string | null;
4237
+ }>;
4238
+ type PartnerProfile = z.infer<typeof PartnerProfileSchema>;
4239
+ declare const UpsertPartnerProfileInputSchema: z.ZodObject<{
4240
+ kind: z.ZodEnum<["bank", "merchant"]>;
4241
+ custodialMode: z.ZodEnum<["agent_of_bank", "flur_virtual_pool"]>;
4242
+ displayName: z.ZodString;
4243
+ bankCode: z.ZodOptional<z.ZodString>;
4244
+ poolAccountNumber: z.ZodOptional<z.ZodString>;
4245
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4246
+ }, "strip", z.ZodTypeAny, {
4247
+ displayName: string;
4248
+ kind: "bank" | "merchant";
4249
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4250
+ metadata?: Record<string, unknown> | undefined;
4251
+ bankCode?: string | undefined;
4252
+ poolAccountNumber?: string | undefined;
4253
+ }, {
4254
+ displayName: string;
4255
+ kind: "bank" | "merchant";
4256
+ custodialMode: "agent_of_bank" | "flur_virtual_pool";
4257
+ metadata?: Record<string, unknown> | undefined;
4258
+ bankCode?: string | undefined;
4259
+ poolAccountNumber?: string | undefined;
4260
+ }>;
4261
+ type UpsertPartnerProfileInput = z.infer<typeof UpsertPartnerProfileInputSchema>;
4262
+ declare const PartnerFundingEventInputSchema: z.ZodObject<{
4263
+ externalRef: z.ZodString;
4264
+ direction: z.ZodOptional<z.ZodEnum<["credit", "debit"]>>;
4265
+ userId: z.ZodOptional<z.ZodString>;
4266
+ accountId: z.ZodOptional<z.ZodString>;
4267
+ amountMinor: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
4268
+ currency: z.ZodEffects<z.ZodString, string, string>;
4269
+ fundingSource: z.ZodOptional<z.ZodString>;
4270
+ providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4271
+ }, "strip", z.ZodTypeAny, {
4272
+ amountMinor: string | number;
4273
+ currency: string;
4274
+ externalRef: string;
4275
+ userId?: string | undefined;
4276
+ direction?: "credit" | "debit" | undefined;
4277
+ accountId?: string | undefined;
4278
+ fundingSource?: string | undefined;
4279
+ providerMetadata?: Record<string, unknown> | undefined;
4280
+ }, {
4281
+ amountMinor: string | number;
4282
+ currency: string;
4283
+ externalRef: string;
4284
+ userId?: string | undefined;
4285
+ direction?: "credit" | "debit" | undefined;
4286
+ accountId?: string | undefined;
4287
+ fundingSource?: string | undefined;
4288
+ providerMetadata?: Record<string, unknown> | undefined;
4289
+ }>;
4290
+ type PartnerFundingEventInput = z.infer<typeof PartnerFundingEventInputSchema>;
4291
+ declare const PartnerFundingSchema: z.ZodObject<{
4292
+ fundingId: z.ZodString;
4293
+ partnerId: z.ZodString;
4294
+ accountId: z.ZodString;
4295
+ userId: z.ZodNullable<z.ZodString>;
4296
+ direction: z.ZodEnum<["credit", "debit"]>;
4297
+ currency: z.ZodString;
4298
+ amountMinor: z.ZodString;
4299
+ externalRef: z.ZodString;
4300
+ status: z.ZodEnum<["pending", "posted", "failed"]>;
4301
+ fundingSource: z.ZodString;
4302
+ ledgerRef: z.ZodString;
4303
+ providerMetadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4304
+ createdAtMs: z.ZodNumber;
4305
+ updatedAtMs: z.ZodNumber;
4306
+ }, "strip", z.ZodTypeAny, {
4307
+ status: "pending" | "failed" | "posted";
4308
+ userId: string | null;
4309
+ amountMinor: string;
4310
+ currency: string;
4311
+ direction: "credit" | "debit";
4312
+ accountId: string;
4313
+ createdAtMs: number;
4314
+ updatedAtMs: number;
4315
+ ledgerRef: string;
4316
+ partnerId: string;
4317
+ externalRef: string;
4318
+ fundingSource: string;
4319
+ providerMetadata: Record<string, unknown>;
4320
+ fundingId: string;
4321
+ }, {
4322
+ status: "pending" | "failed" | "posted";
4323
+ userId: string | null;
4324
+ amountMinor: string;
4325
+ currency: string;
4326
+ direction: "credit" | "debit";
4327
+ accountId: string;
4328
+ createdAtMs: number;
4329
+ updatedAtMs: number;
4330
+ ledgerRef: string;
4331
+ partnerId: string;
4332
+ externalRef: string;
4333
+ fundingSource: string;
4334
+ providerMetadata: Record<string, unknown>;
4335
+ fundingId: string;
4336
+ }>;
4337
+ type PartnerFunding = z.infer<typeof PartnerFundingSchema>;
4338
+ declare const IngestFundingResultSchema: z.ZodObject<{
4339
+ funding: z.ZodObject<{
4340
+ fundingId: z.ZodString;
4341
+ partnerId: z.ZodString;
4342
+ accountId: z.ZodString;
4343
+ userId: z.ZodNullable<z.ZodString>;
4344
+ direction: z.ZodEnum<["credit", "debit"]>;
4345
+ currency: z.ZodString;
4346
+ amountMinor: z.ZodString;
4347
+ externalRef: z.ZodString;
4348
+ status: z.ZodEnum<["pending", "posted", "failed"]>;
4349
+ fundingSource: z.ZodString;
4350
+ ledgerRef: z.ZodString;
4351
+ providerMetadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4352
+ createdAtMs: z.ZodNumber;
4353
+ updatedAtMs: z.ZodNumber;
4354
+ }, "strip", z.ZodTypeAny, {
4355
+ status: "pending" | "failed" | "posted";
4356
+ userId: string | null;
4357
+ amountMinor: string;
4358
+ currency: string;
4359
+ direction: "credit" | "debit";
4360
+ accountId: string;
4361
+ createdAtMs: number;
4362
+ updatedAtMs: number;
4363
+ ledgerRef: string;
4364
+ partnerId: string;
4365
+ externalRef: string;
4366
+ fundingSource: string;
4367
+ providerMetadata: Record<string, unknown>;
4368
+ fundingId: string;
4369
+ }, {
4370
+ status: "pending" | "failed" | "posted";
4371
+ userId: string | null;
4372
+ amountMinor: string;
4373
+ currency: string;
4374
+ direction: "credit" | "debit";
4375
+ accountId: string;
4376
+ createdAtMs: number;
4377
+ updatedAtMs: number;
4378
+ ledgerRef: string;
4379
+ partnerId: string;
4380
+ externalRef: string;
4381
+ fundingSource: string;
4382
+ providerMetadata: Record<string, unknown>;
4383
+ fundingId: string;
4384
+ }>;
4385
+ replayed: z.ZodBoolean;
4386
+ }, "strip", z.ZodTypeAny, {
4387
+ replayed: boolean;
4388
+ funding: {
4389
+ status: "pending" | "failed" | "posted";
4390
+ userId: string | null;
4391
+ amountMinor: string;
4392
+ currency: string;
4393
+ direction: "credit" | "debit";
4394
+ accountId: string;
4395
+ createdAtMs: number;
4396
+ updatedAtMs: number;
4397
+ ledgerRef: string;
4398
+ partnerId: string;
4399
+ externalRef: string;
4400
+ fundingSource: string;
4401
+ providerMetadata: Record<string, unknown>;
4402
+ fundingId: string;
4403
+ };
4404
+ }, {
4405
+ replayed: boolean;
4406
+ funding: {
4407
+ status: "pending" | "failed" | "posted";
4408
+ userId: string | null;
4409
+ amountMinor: string;
4410
+ currency: string;
4411
+ direction: "credit" | "debit";
4412
+ accountId: string;
4413
+ createdAtMs: number;
4414
+ updatedAtMs: number;
4415
+ ledgerRef: string;
4416
+ partnerId: string;
4417
+ externalRef: string;
4418
+ fundingSource: string;
4419
+ providerMetadata: Record<string, unknown>;
4420
+ fundingId: string;
4421
+ };
4422
+ }>;
4423
+ type IngestFundingResult = z.infer<typeof IngestFundingResultSchema>;
4424
+ declare const PayoutDestinationSchema: z.ZodObject<{
4425
+ destinationId: z.ZodString;
4426
+ accountId: z.ZodString;
4427
+ partnerId: z.ZodString;
4428
+ bankCode: z.ZodString;
4429
+ accountNumber: z.ZodString;
4430
+ accountName: z.ZodString;
4431
+ status: z.ZodEnum<["pending", "verified", "disabled"]>;
4432
+ verifiedAtMs: z.ZodNullable<z.ZodNumber>;
4433
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4434
+ createdAtMs: z.ZodNumber;
4435
+ updatedAtMs: z.ZodNumber;
4436
+ }, "strip", z.ZodTypeAny, {
4437
+ status: "pending" | "verified" | "disabled";
4438
+ accountId: string;
4439
+ metadata: Record<string, unknown>;
4440
+ createdAtMs: number;
4441
+ updatedAtMs: number;
4442
+ partnerId: string;
4443
+ bankCode: string;
4444
+ destinationId: string;
4445
+ accountNumber: string;
4446
+ accountName: string;
4447
+ verifiedAtMs: number | null;
4448
+ }, {
4449
+ status: "pending" | "verified" | "disabled";
4450
+ accountId: string;
4451
+ metadata: Record<string, unknown>;
4452
+ createdAtMs: number;
4453
+ updatedAtMs: number;
4454
+ partnerId: string;
4455
+ bankCode: string;
4456
+ destinationId: string;
4457
+ accountNumber: string;
4458
+ accountName: string;
4459
+ verifiedAtMs: number | null;
4460
+ }>;
4461
+ type PayoutDestination = z.infer<typeof PayoutDestinationSchema>;
4462
+ declare const CreatePayoutDestinationInputSchema: z.ZodObject<{
4463
+ partnerId: z.ZodString;
4464
+ bankCode: z.ZodString;
4465
+ accountNumber: z.ZodString;
4466
+ accountName: z.ZodString;
4467
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4468
+ }, "strip", z.ZodTypeAny, {
4469
+ partnerId: string;
4470
+ bankCode: string;
4471
+ accountNumber: string;
4472
+ accountName: string;
4473
+ metadata?: Record<string, unknown> | undefined;
4474
+ }, {
4475
+ partnerId: string;
4476
+ bankCode: string;
4477
+ accountNumber: string;
4478
+ accountName: string;
4479
+ metadata?: Record<string, unknown> | undefined;
4480
+ }>;
4481
+ type CreatePayoutDestinationInput = z.infer<typeof CreatePayoutDestinationInputSchema>;
4482
+ declare const ListPayoutDestinationsResultSchema: z.ZodObject<{
4483
+ items: z.ZodArray<z.ZodObject<{
4484
+ destinationId: z.ZodString;
4485
+ accountId: z.ZodString;
4486
+ partnerId: z.ZodString;
4487
+ bankCode: z.ZodString;
4488
+ accountNumber: z.ZodString;
4489
+ accountName: z.ZodString;
4490
+ status: z.ZodEnum<["pending", "verified", "disabled"]>;
4491
+ verifiedAtMs: z.ZodNullable<z.ZodNumber>;
4492
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4493
+ createdAtMs: z.ZodNumber;
4494
+ updatedAtMs: z.ZodNumber;
4495
+ }, "strip", z.ZodTypeAny, {
4496
+ status: "pending" | "verified" | "disabled";
4497
+ accountId: string;
4498
+ metadata: Record<string, unknown>;
4499
+ createdAtMs: number;
4500
+ updatedAtMs: number;
4501
+ partnerId: string;
4502
+ bankCode: string;
4503
+ destinationId: string;
4504
+ accountNumber: string;
4505
+ accountName: string;
4506
+ verifiedAtMs: number | null;
4507
+ }, {
4508
+ status: "pending" | "verified" | "disabled";
4509
+ accountId: string;
4510
+ metadata: Record<string, unknown>;
4511
+ createdAtMs: number;
4512
+ updatedAtMs: number;
4513
+ partnerId: string;
4514
+ bankCode: string;
4515
+ destinationId: string;
4516
+ accountNumber: string;
4517
+ accountName: string;
4518
+ verifiedAtMs: number | null;
4519
+ }>, "many">;
4520
+ }, "strip", z.ZodTypeAny, {
4521
+ items: {
4522
+ status: "pending" | "verified" | "disabled";
4523
+ accountId: string;
4524
+ metadata: Record<string, unknown>;
4525
+ createdAtMs: number;
4526
+ updatedAtMs: number;
4527
+ partnerId: string;
4528
+ bankCode: string;
4529
+ destinationId: string;
4530
+ accountNumber: string;
4531
+ accountName: string;
4532
+ verifiedAtMs: number | null;
4533
+ }[];
4534
+ }, {
4535
+ items: {
4536
+ status: "pending" | "verified" | "disabled";
4537
+ accountId: string;
4538
+ metadata: Record<string, unknown>;
4539
+ createdAtMs: number;
4540
+ updatedAtMs: number;
4541
+ partnerId: string;
4542
+ bankCode: string;
4543
+ destinationId: string;
4544
+ accountNumber: string;
4545
+ accountName: string;
4546
+ verifiedAtMs: number | null;
4547
+ }[];
4548
+ }>;
4549
+ type ListPayoutDestinationsResult = z.infer<typeof ListPayoutDestinationsResultSchema>;
4550
+ declare const WithdrawalSchema: z.ZodObject<{
4551
+ withdrawalId: z.ZodString;
4552
+ accountId: z.ZodString;
4553
+ userId: z.ZodString;
4554
+ partnerId: z.ZodString;
4555
+ destinationId: z.ZodString;
4556
+ currency: z.ZodString;
4557
+ amountMinor: z.ZodString;
4558
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4559
+ idempotencyKey: z.ZodString;
4560
+ providerRef: z.ZodNullable<z.ZodString>;
4561
+ lastError: z.ZodNullable<z.ZodString>;
4562
+ ledgerRef: z.ZodString;
4563
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4564
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4565
+ createdAtMs: z.ZodNumber;
4566
+ updatedAtMs: z.ZodNumber;
4567
+ }, "strip", z.ZodTypeAny, {
4568
+ userId: string;
4569
+ amountMinor: string;
4570
+ currency: string;
4571
+ accountId: string;
4572
+ metadata: Record<string, unknown>;
4573
+ createdAtMs: number;
4574
+ updatedAtMs: number;
4575
+ idempotencyKey: string;
4576
+ ledgerRef: string;
4577
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4578
+ partnerId: string;
4579
+ destinationId: string;
4580
+ withdrawalId: string;
4581
+ providerRef: string | null;
4582
+ lastError: string | null;
4583
+ reverseLedgerRef: string | null;
4584
+ }, {
4585
+ userId: string;
4586
+ amountMinor: string;
4587
+ currency: string;
4588
+ accountId: string;
4589
+ metadata: Record<string, unknown>;
4590
+ createdAtMs: number;
4591
+ updatedAtMs: number;
4592
+ idempotencyKey: string;
4593
+ ledgerRef: string;
4594
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4595
+ partnerId: string;
4596
+ destinationId: string;
4597
+ withdrawalId: string;
4598
+ providerRef: string | null;
4599
+ lastError: string | null;
4600
+ reverseLedgerRef: string | null;
4601
+ }>;
4602
+ type Withdrawal = z.infer<typeof WithdrawalSchema>;
4603
+ declare const CreateWithdrawalInputSchema: z.ZodObject<{
4604
+ destinationId: z.ZodString;
4605
+ amountMinor: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
4606
+ currency: z.ZodEffects<z.ZodString, string, string>;
4607
+ idempotencyKey: z.ZodString;
4608
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4609
+ }, "strip", z.ZodTypeAny, {
4610
+ amountMinor: string | number;
4611
+ currency: string;
4612
+ idempotencyKey: string;
4613
+ destinationId: string;
4614
+ metadata?: Record<string, unknown> | undefined;
4615
+ }, {
4616
+ amountMinor: string | number;
4617
+ currency: string;
4618
+ idempotencyKey: string;
4619
+ destinationId: string;
4620
+ metadata?: Record<string, unknown> | undefined;
4621
+ }>;
4622
+ type CreateWithdrawalInput = z.infer<typeof CreateWithdrawalInputSchema>;
4623
+ declare const CreateWithdrawalResultSchema: z.ZodObject<{
4624
+ withdrawal: z.ZodObject<{
4625
+ withdrawalId: z.ZodString;
4626
+ accountId: z.ZodString;
4627
+ userId: z.ZodString;
4628
+ partnerId: z.ZodString;
4629
+ destinationId: z.ZodString;
4630
+ currency: z.ZodString;
4631
+ amountMinor: z.ZodString;
4632
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4633
+ idempotencyKey: z.ZodString;
4634
+ providerRef: z.ZodNullable<z.ZodString>;
4635
+ lastError: z.ZodNullable<z.ZodString>;
4636
+ ledgerRef: z.ZodString;
4637
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4638
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4639
+ createdAtMs: z.ZodNumber;
4640
+ updatedAtMs: z.ZodNumber;
4641
+ }, "strip", z.ZodTypeAny, {
4642
+ userId: string;
4643
+ amountMinor: string;
4644
+ currency: string;
4645
+ accountId: string;
4646
+ metadata: Record<string, unknown>;
4647
+ createdAtMs: number;
4648
+ updatedAtMs: number;
4649
+ idempotencyKey: string;
4650
+ ledgerRef: string;
4651
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4652
+ partnerId: string;
4653
+ destinationId: string;
4654
+ withdrawalId: string;
4655
+ providerRef: string | null;
4656
+ lastError: string | null;
4657
+ reverseLedgerRef: string | null;
4658
+ }, {
4659
+ userId: string;
4660
+ amountMinor: string;
4661
+ currency: string;
4662
+ accountId: string;
4663
+ metadata: Record<string, unknown>;
4664
+ createdAtMs: number;
4665
+ updatedAtMs: number;
4666
+ idempotencyKey: string;
4667
+ ledgerRef: string;
4668
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4669
+ partnerId: string;
4670
+ destinationId: string;
4671
+ withdrawalId: string;
4672
+ providerRef: string | null;
4673
+ lastError: string | null;
4674
+ reverseLedgerRef: string | null;
4675
+ }>;
4676
+ replayed: z.ZodBoolean;
4677
+ }, "strip", z.ZodTypeAny, {
4678
+ replayed: boolean;
4679
+ withdrawal: {
4680
+ userId: string;
4681
+ amountMinor: string;
4682
+ currency: string;
4683
+ accountId: string;
4684
+ metadata: Record<string, unknown>;
4685
+ createdAtMs: number;
4686
+ updatedAtMs: number;
4687
+ idempotencyKey: string;
4688
+ ledgerRef: string;
4689
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4690
+ partnerId: string;
4691
+ destinationId: string;
4692
+ withdrawalId: string;
4693
+ providerRef: string | null;
4694
+ lastError: string | null;
4695
+ reverseLedgerRef: string | null;
4696
+ };
4697
+ }, {
4698
+ replayed: boolean;
4699
+ withdrawal: {
4700
+ userId: string;
4701
+ amountMinor: string;
4702
+ currency: string;
4703
+ accountId: string;
4704
+ metadata: Record<string, unknown>;
4705
+ createdAtMs: number;
4706
+ updatedAtMs: number;
4707
+ idempotencyKey: string;
4708
+ ledgerRef: string;
4709
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4710
+ partnerId: string;
4711
+ destinationId: string;
4712
+ withdrawalId: string;
4713
+ providerRef: string | null;
4714
+ lastError: string | null;
4715
+ reverseLedgerRef: string | null;
4716
+ };
4717
+ }>;
4718
+ type CreateWithdrawalResult = z.infer<typeof CreateWithdrawalResultSchema>;
4719
+ declare const PayoutEventInputSchema: z.ZodObject<{
4720
+ externalRef: z.ZodString;
4721
+ withdrawalId: z.ZodOptional<z.ZodString>;
4722
+ state: z.ZodEnum<["submitted", "processing", "paid", "failed"]>;
4723
+ providerRef: z.ZodOptional<z.ZodString>;
4724
+ failureCode: z.ZodOptional<z.ZodString>;
4725
+ failureMessage: z.ZodOptional<z.ZodString>;
4726
+ providerMetadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4727
+ }, "strip", z.ZodTypeAny, {
4728
+ state: "paid" | "failed" | "processing" | "submitted";
4729
+ externalRef: string;
4730
+ failureCode?: string | undefined;
4731
+ failureMessage?: string | undefined;
4732
+ providerMetadata?: Record<string, unknown> | undefined;
4733
+ withdrawalId?: string | undefined;
4734
+ providerRef?: string | undefined;
4735
+ }, {
4736
+ state: "paid" | "failed" | "processing" | "submitted";
4737
+ externalRef: string;
4738
+ failureCode?: string | undefined;
4739
+ failureMessage?: string | undefined;
4740
+ providerMetadata?: Record<string, unknown> | undefined;
4741
+ withdrawalId?: string | undefined;
4742
+ providerRef?: string | undefined;
4743
+ }>;
4744
+ type PayoutEventInput = z.infer<typeof PayoutEventInputSchema>;
4745
+ declare const RecordPayoutEventResultSchema: z.ZodObject<{
4746
+ withdrawal: z.ZodObject<{
4747
+ withdrawalId: z.ZodString;
4748
+ accountId: z.ZodString;
4749
+ userId: z.ZodString;
4750
+ partnerId: z.ZodString;
4751
+ destinationId: z.ZodString;
4752
+ currency: z.ZodString;
4753
+ amountMinor: z.ZodString;
4754
+ state: z.ZodEnum<["requested", "submitted", "processing", "paid", "failed", "reversed"]>;
4755
+ idempotencyKey: z.ZodString;
4756
+ providerRef: z.ZodNullable<z.ZodString>;
4757
+ lastError: z.ZodNullable<z.ZodString>;
4758
+ ledgerRef: z.ZodString;
4759
+ reverseLedgerRef: z.ZodNullable<z.ZodString>;
4760
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4761
+ createdAtMs: z.ZodNumber;
4762
+ updatedAtMs: z.ZodNumber;
4763
+ }, "strip", z.ZodTypeAny, {
4764
+ userId: string;
4765
+ amountMinor: string;
4766
+ currency: string;
4767
+ accountId: string;
4768
+ metadata: Record<string, unknown>;
4769
+ createdAtMs: number;
4770
+ updatedAtMs: number;
4771
+ idempotencyKey: string;
4772
+ ledgerRef: string;
4773
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4774
+ partnerId: string;
4775
+ destinationId: string;
4776
+ withdrawalId: string;
4777
+ providerRef: string | null;
4778
+ lastError: string | null;
4779
+ reverseLedgerRef: string | null;
4780
+ }, {
4781
+ userId: string;
4782
+ amountMinor: string;
4783
+ currency: string;
4784
+ accountId: string;
4785
+ metadata: Record<string, unknown>;
4786
+ createdAtMs: number;
4787
+ updatedAtMs: number;
4788
+ idempotencyKey: string;
4789
+ ledgerRef: string;
4790
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4791
+ partnerId: string;
4792
+ destinationId: string;
4793
+ withdrawalId: string;
4794
+ providerRef: string | null;
4795
+ lastError: string | null;
4796
+ reverseLedgerRef: string | null;
4797
+ }>;
4798
+ replayed: z.ZodBoolean;
4799
+ }, "strip", z.ZodTypeAny, {
4800
+ replayed: boolean;
4801
+ withdrawal: {
4802
+ userId: string;
4803
+ amountMinor: string;
4804
+ currency: string;
4805
+ accountId: string;
4806
+ metadata: Record<string, unknown>;
4807
+ createdAtMs: number;
4808
+ updatedAtMs: number;
4809
+ idempotencyKey: string;
4810
+ ledgerRef: string;
4811
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4812
+ partnerId: string;
4813
+ destinationId: string;
4814
+ withdrawalId: string;
4815
+ providerRef: string | null;
4816
+ lastError: string | null;
4817
+ reverseLedgerRef: string | null;
4818
+ };
4819
+ }, {
4820
+ replayed: boolean;
4821
+ withdrawal: {
4822
+ userId: string;
4823
+ amountMinor: string;
4824
+ currency: string;
4825
+ accountId: string;
4826
+ metadata: Record<string, unknown>;
4827
+ createdAtMs: number;
4828
+ updatedAtMs: number;
4829
+ idempotencyKey: string;
4830
+ ledgerRef: string;
4831
+ state: "paid" | "failed" | "reversed" | "requested" | "processing" | "submitted";
4832
+ partnerId: string;
4833
+ destinationId: string;
4834
+ withdrawalId: string;
4835
+ providerRef: string | null;
4836
+ lastError: string | null;
4837
+ reverseLedgerRef: string | null;
4838
+ };
4839
+ }>;
4840
+ type RecordPayoutEventResult = z.infer<typeof RecordPayoutEventResultSchema>;
4841
+ declare const ReconciliationReportSchema: z.ZodObject<{
4842
+ partnerId: z.ZodString;
4843
+ currency: z.ZodString;
4844
+ fromMs: z.ZodNumber;
4845
+ toMs: z.ZodNumber;
4846
+ fundingsCreditMinor: z.ZodString;
4847
+ fundingsDebitMinor: z.ZodString;
4848
+ withdrawalsPaidMinor: z.ZodString;
4849
+ withdrawalsReversedMinor: z.ZodString;
4850
+ withdrawalsInFlightMinor: z.ZodString;
4851
+ expectedReserveBalanceMinor: z.ZodString;
4852
+ actualReserveBalanceMinor: z.ZodString;
4853
+ imbalanceMinor: z.ZodString;
4854
+ generatedAtMs: z.ZodNumber;
4855
+ }, "strip", z.ZodTypeAny, {
4856
+ currency: string;
4857
+ fromMs: number;
4858
+ toMs: number;
4859
+ partnerId: string;
4860
+ fundingsCreditMinor: string;
4861
+ fundingsDebitMinor: string;
4862
+ withdrawalsPaidMinor: string;
4863
+ withdrawalsReversedMinor: string;
4864
+ withdrawalsInFlightMinor: string;
4865
+ expectedReserveBalanceMinor: string;
4866
+ actualReserveBalanceMinor: string;
4867
+ imbalanceMinor: string;
4868
+ generatedAtMs: number;
4869
+ }, {
4870
+ currency: string;
4871
+ fromMs: number;
4872
+ toMs: number;
4873
+ partnerId: string;
4874
+ fundingsCreditMinor: string;
4875
+ fundingsDebitMinor: string;
4876
+ withdrawalsPaidMinor: string;
4877
+ withdrawalsReversedMinor: string;
4878
+ withdrawalsInFlightMinor: string;
4879
+ expectedReserveBalanceMinor: string;
4880
+ actualReserveBalanceMinor: string;
4881
+ imbalanceMinor: string;
4882
+ generatedAtMs: number;
4883
+ }>;
4884
+ type ReconciliationReport = z.infer<typeof ReconciliationReportSchema>;
4885
+ type PartnerFundingClient = {
4886
+ /** Submit a funding event (idempotent on externalRef per partner). */
4887
+ ingestFunding: (input: PartnerFundingEventInput) => Promise<IngestFundingResult>;
4888
+ /** Send a payout state update (idempotent on terminal states). */
4889
+ recordPayoutEvent: (input: PayoutEventInput) => Promise<RecordPayoutEventResult>;
4890
+ /** Fetch the daily reconciliation report. */
4891
+ reconciliation: (input: {
4892
+ currency: string;
4893
+ fromMs?: number;
4894
+ toMs?: number;
4895
+ }) => Promise<ReconciliationReport>;
4896
+ };
4897
+ declare function createPartnerFundingClient(partner: FlurPartnerClient): PartnerFundingClient;
4898
+ type ConsumerWithdrawalsClientOptions = {
4899
+ baseUrl: string;
4900
+ /** Session-authenticated fetch (Authorization: Bearer <session-token>). */
4901
+ fetchImpl?: typeof fetch;
4902
+ };
4903
+ type ConsumerWithdrawalsClient = {
4904
+ listDestinations: () => Promise<ListPayoutDestinationsResult>;
4905
+ createDestination: (input: CreatePayoutDestinationInput) => Promise<PayoutDestination>;
4906
+ verifyDestination: (destinationId: string) => Promise<PayoutDestination>;
4907
+ disableDestination: (destinationId: string) => Promise<PayoutDestination>;
4908
+ createWithdrawal: (input: CreateWithdrawalInput) => Promise<CreateWithdrawalResult>;
4909
+ getWithdrawal: (withdrawalId: string) => Promise<Withdrawal>;
4910
+ };
4911
+ declare function createConsumerWithdrawalsClient(opts: ConsumerWithdrawalsClientOptions): ConsumerWithdrawalsClient;
4912
+ /**
4913
+ * Partner profile upsert is session-authenticated on the backend (a member
4914
+ * of the partner account must perform the action), so it uses a regular
4915
+ * session-bearer fetch rather than the partner HMAC client.
4916
+ */
4917
+ type PartnerProfileAdminClientOptions = {
4918
+ baseUrl: string;
4919
+ fetchImpl?: typeof fetch;
4920
+ };
4921
+ type PartnerProfileAdminClient = {
4922
+ upsertProfile: (partnerAccountId: string, input: UpsertPartnerProfileInput) => Promise<PartnerProfile>;
4923
+ };
4924
+ declare function createPartnerProfileAdminClient(opts: PartnerProfileAdminClientOptions): PartnerProfileAdminClient;
4925
+
4926
+ export { ACCOUNT_STATUSES, ACCOUNT_TYPES, ADDITIONAL_DATA_SUBFIELD, type Account, type AccountActivityItem, type AccountMembership, AccountMembershipSchema, AccountSchema, type AccountStatus, type AccountSummaryResponse, type AccountType, type AccountsClient, type AccountsClientOptions, type AddMemberInput, type AdditionalData, type ApiCredentialPublic, ApiCredentialPublicSchema, type ApiCredentialsAdminClient, type AtomicRedeemReceiptInput, type AtomicRedeemResponse, type AuthLogoutInput, type AuthRefreshInput, type AuthRefreshResponse, type AuthorizeSendWithBiometricInput, type AuthorizedOptions, type BiometricSigner, type BuildPassInput, type BuildReceiptInput, type BuildRedemptionInput, COLLECTION_INTENT_STATUSES, COLLECTION_PAYMENT_STATUSES, CUSTODIAL_MODES, type CashNamespace, type CollectionIntent, CollectionIntentSchema, type CollectionPayment, type CollectionPaymentResult, CollectionPaymentResultSchema, CollectionPaymentSchema, type CollectionReportSummary, CollectionReportSummarySchema, type CollectionStatement, CollectionStatementSchema, type CollectionsClient, type CollectionsClientOptions, type ConsumerCollectionsClient, type ConsumerOAC, type OACRecord as ConsumerOACRecord, OACRecordSchema as ConsumerOACRecordSchema, ConsumerOACSchema, type ConsumerPaymentClaim, ConsumerPaymentClaimSchema, type ConsumerSettleResult, ConsumerSettleResultSchema, type ConsumerSettlement, ConsumerSettlementSchema, type ConsumerWithdrawalsClient, type ConsumerWithdrawalsClientOptions, type CreateBusinessAccountInput, type CreateCollectionIntentInput, CreateCollectionIntentInputSchema, type CreatePayLinkResponse, type CreatePayoutDestinationInput, CreatePayoutDestinationInputSchema, type CreatePayoutInput, CreatePayoutInputSchema, type CreateTransferOptions, type CreateWithdrawalInput, CreateWithdrawalInputSchema, type CreateWithdrawalResult, CreateWithdrawalResultSchema, type CustodialMode, type DeviceKeyRecord, DeviceKeyRecordSchema, type DeviceTrustState, type DisableOfflineInput, DisableOfflineInputSchema, type DisableOfflineResult, DisableOfflineResultSchema, type Ed25519KeyPair, type EnableOfflineInput, EnableOfflineInputSchema, type EnableOfflineResult, EnableOfflineResultSchema, FIELD, FlurApiError, FlurCapExceededError, FlurClient, type FlurClientOptions, FlurError, type FlurErrorCode, FlurExpiredError, type FlurHandle, type FlurInitOptions, type FlurOfflineSettlementsClient, type FlurPartnerClient, type FlurPaymentEvent, FlurReplayError, type HmacFetchOptions, type IngestFundingResult, IngestFundingResultSchema, type IssueOACInput, IssueOACInputSchema, type IssueOfflineTokenInput, type IssuePassInput, type IssueReceiptInput, type ListPassesInput, type ListPassesResponse, type ListPayoutDestinationsResult, ListPayoutDestinationsResultSchema, type ListReceiptsInput, type ListReceiptsResponse, type ListTransactionsOptions, MEMBERSHIP_ROLES, MERCHANT_PAYOUT_STATUSES, MERCHANT_PROFILE_STATUSES, type MeOfflineClient, type MeOfflineClientOptions, type MembershipRole, type MerchantAccountInfo, type MerchantPayout, MerchantPayoutSchema, type MerchantProfile, MerchantProfileSchema, type MintedApiCredential, MintedApiCredentialSchema, type Money, NGN_CURRENCY_CODE, NG_COUNTRY_CODE, NQRParseError, type NQRPayloadInput, type OAC, OACSchema, OAC_DEFAULT_CUMULATIVE_KOBO, OAC_DEFAULT_PER_TX_KOBO, OAC_DEFAULT_VALIDITY_MS, type OfflineHoldRecord, OfflineHoldRecordSchema, type OfflinePaymentAuthorization, OfflinePaymentAuthorizationSchema, type OfflinePaymentRequest, OfflinePaymentRequestSchema, type OfflineStateResult, OfflineStateResultSchema, type OfflineStatusResult, OfflineStatusResultSchema, type OfflineToken, OfflineTokenSchema, type OnboardingCompleteInput, type OnboardingCompleteResponse, type OnboardingFallback, type OnboardingRiskReason, type OnboardingStartInput, type OnboardingStartResponse, PARTNER_FUNDING_DIRECTIONS, PARTNER_FUNDING_STATUSES, PARTNER_KINDS, PARTNER_PROFILE_STATUSES, PARTNER_SCOPES, PASS_KINDS, PASS_STATES, PAYLOAD_FORMAT_INDICATOR_VALUE, PAYOUT_DESTINATION_STATUSES, POINT_OF_INITIATION, type ParsedNQR, type PartnerClientOptions, type PartnerCollectionsClient, type PartnerFunding, type PartnerFundingClient, type PartnerFundingDirection, type PartnerFundingEventInput, PartnerFundingEventInputSchema, PartnerFundingSchema, type PartnerFundingStatus, type PartnerKind, type PartnerProfile, type PartnerProfileAdminClient, type PartnerProfileAdminClientOptions, PartnerProfileSchema, type PartnerProfileStatus, type PartnerScope, type PartnerSignResult, type Pass, type PassKind, type PassMetadata, PassMetadataSchema, PassSchema, type PassState, type PassesClient, type PassesClientOptions, type PayCollectionInput, PayCollectionInputSchema, type PayCollectionOptions, type PayCollectionResponse, type PaymentClaim, PaymentClaimSchema, type PayoutDestination, PayoutDestinationSchema, type PayoutDestinationStatus, type PayoutEventInput, PayoutEventInputSchema, type PinSetInput, type PinVerifyInput, type ProviderEventInput, ProviderEventInputSchema, type ProviderEventRecord, ProviderEventRecordSchema, type PublicCollectionIntent, PublicCollectionIntentSchema, type PushPlatform, type PushRegisterInput, RECEIPT_CHANNELS, RECEIPT_KINDS, REPLAY_WINDOW_MS, type Receipt, type ReceiptChannel, type ReceiptKind, type ReceiptPayload, ReceiptPayloadSchema, ReceiptSchema, type ReceiptsClient, type ReceiptsClientOptions, type RecipientResolveInput, type RecipientResolveResponse, type ReconciliationReport, ReconciliationReportSchema, type RecordPayoutEventResult, RecordPayoutEventResultSchema, type RedeemPassResponse, type Redemption, RedemptionSchema, type RegisterDeviceInput, type RegisterDeviceKeyInput, RegisterDeviceKeyInputSchema, type RegisterDeviceResponse, type RegisterSendDeviceKeyInput, type ResolveCollectionOptions, type ResolveCollectionResponse, type ResolvePayLinkResponse, RevokeDeviceKeyInputSchema, type RevokePassInput, type RoutingHint, SETTLEMENT_SCHEDULES, type SendChallengeInput, type SendChallengeResponse, type SendMoneyInput, type SendMoneyOptions, type SendVerifyInput, type SendVerifyResponse, type SettleResponse, SettleResponseSchema, type Settlement, SettlementSchema, type SignedConsumerOAC, SignedConsumerOACSchema, type SubscribeOptions, type TLVField, type TransactionDetailResponse, type TransactionDirection, type TransactionsListResponse, type TransferInput, type TransferResponse, type TransferStatus, type UnsignedOAC, type UnsignedOfflinePaymentAuthorization, type UnsignedOfflinePaymentRequest, type UnsignedPass, type UnsignedReceipt, type UnsignedRedemption, type UpsertMerchantProfileInput, UpsertMerchantProfileInputSchema, type UpsertPartnerProfileInput, UpsertPartnerProfileInputSchema, WITHDRAWAL_STATES, type Withdrawal, WithdrawalSchema, type WithdrawalState, bodySha256Hex, buildAuthorization, buildOAC, buildPass, buildPaymentRequest, buildReceipt, buildRedemption, canonicalJSONBytes, canonicalJSONStringify, canonicalRequestString, computeEncounterId, constantTimeEqual, crc16ccitt, crc16ccittHex, createAccountsClient, createApiCredentialsAdminClient, createCollectionsClient, createConsumerCollectionsClient, createConsumerWithdrawalsClient, createFlurPartnerClient, createHmacFetch, createMeOfflineClient, createOfflineSettlementsClient, createPartnerCollectionsClient, createPartnerFundingClient, createPartnerProfileAdminClient, createPassesClient, createReceiptsClient, decodeAuthorizationQR, decodeBase45, decodePaymentRequestQR, encodeAuthorizationQR, encodeBase45, encodeNQR, encodePaymentRequestQR, formatAmount, generateDynamicQR, generateKeyPair, generateStaticQR, init, isPassWithinValidity, moneyMinorToNumber, normalizeE164, parseAmountInput, parseNQR, parseQR, publicKeyFromPrivate, readTLV, routingHint, sign, signAuthorization, signCanonical, signOAC, signPartnerRequest, signPass, signPaymentRequest, signReceipt, signRedemption, signRequestHMAC, verify, verifyAuthorization, verifyCanonical, verifyOAC, verifyPass, verifyPaymentRequest, verifyReceipt, verifyRedemption, verifyRequestHMAC, writeTLV };