@deepintel-ltd/farmpro-contracts 1.5.14 → 1.5.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,822 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Payment schemas - JSON:API compliant
4
+ */
5
+ export declare const paymentStatusSchema: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>;
6
+ export declare const paymentCurrencySchema: z.ZodEnum<["NGN", "USD"]>;
7
+ export declare const paymentMethodSchema: z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>;
8
+ export declare const paymentGatewaySchema: z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>;
9
+ export declare const paymentAttributesSchema: z.ZodObject<{
10
+ amount: z.ZodNumber;
11
+ currency: z.ZodEnum<["NGN", "USD"]>;
12
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>;
13
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>>;
14
+ gateway: z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>;
15
+ gatewayTxRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
16
+ gatewayTxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
19
+ failureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
20
+ paidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
+ } & {
22
+ createdAt: z.ZodString;
23
+ updatedAt: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
26
+ createdAt: string;
27
+ updatedAt: string;
28
+ currency: "NGN" | "USD";
29
+ amount: number;
30
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
31
+ metadata?: Record<string, unknown> | null | undefined;
32
+ description?: string | null | undefined;
33
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
34
+ gatewayTxRef?: string | null | undefined;
35
+ gatewayTxId?: string | null | undefined;
36
+ failureReason?: string | null | undefined;
37
+ paidAt?: string | null | undefined;
38
+ }, {
39
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
40
+ createdAt: string;
41
+ updatedAt: string;
42
+ currency: "NGN" | "USD";
43
+ amount: number;
44
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
45
+ metadata?: Record<string, unknown> | null | undefined;
46
+ description?: string | null | undefined;
47
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
48
+ gatewayTxRef?: string | null | undefined;
49
+ gatewayTxId?: string | null | undefined;
50
+ failureReason?: string | null | undefined;
51
+ paidAt?: string | null | undefined;
52
+ }>;
53
+ export declare const createPaymentAttributesSchema: z.ZodObject<{
54
+ amount: z.ZodNumber;
55
+ currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
56
+ paymentMethod: z.ZodOptional<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>;
57
+ gateway: z.ZodDefault<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>;
58
+ description: z.ZodOptional<z.ZodString>;
59
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ currency: "NGN" | "USD";
62
+ amount: number;
63
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
64
+ metadata?: Record<string, unknown> | undefined;
65
+ description?: string | undefined;
66
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | undefined;
67
+ }, {
68
+ amount: number;
69
+ metadata?: Record<string, unknown> | undefined;
70
+ description?: string | undefined;
71
+ currency?: "NGN" | "USD" | undefined;
72
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | undefined;
73
+ gateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
74
+ }>;
75
+ export declare const updatePaymentAttributesSchema: z.ZodObject<{
76
+ status: z.ZodOptional<z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>>;
77
+ failureReason: z.ZodOptional<z.ZodString>;
78
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ status?: "pending" | "completed" | "cancelled" | "failed" | "processing" | undefined;
81
+ metadata?: Record<string, unknown> | undefined;
82
+ failureReason?: string | undefined;
83
+ }, {
84
+ status?: "pending" | "completed" | "cancelled" | "failed" | "processing" | undefined;
85
+ metadata?: Record<string, unknown> | undefined;
86
+ failureReason?: string | undefined;
87
+ }>;
88
+ export declare const paymentResourceSchema: z.ZodObject<{
89
+ type: z.ZodLiteral<string>;
90
+ id: z.ZodString;
91
+ attributes: z.ZodObject<{
92
+ amount: z.ZodNumber;
93
+ currency: z.ZodEnum<["NGN", "USD"]>;
94
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>;
95
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>>;
96
+ gateway: z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>;
97
+ gatewayTxRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
98
+ gatewayTxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
99
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
101
+ failureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
102
+ paidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
+ } & {
104
+ createdAt: z.ZodString;
105
+ updatedAt: z.ZodString;
106
+ }, "strip", z.ZodTypeAny, {
107
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
108
+ createdAt: string;
109
+ updatedAt: string;
110
+ currency: "NGN" | "USD";
111
+ amount: number;
112
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
113
+ metadata?: Record<string, unknown> | null | undefined;
114
+ description?: string | null | undefined;
115
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
116
+ gatewayTxRef?: string | null | undefined;
117
+ gatewayTxId?: string | null | undefined;
118
+ failureReason?: string | null | undefined;
119
+ paidAt?: string | null | undefined;
120
+ }, {
121
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
122
+ createdAt: string;
123
+ updatedAt: string;
124
+ currency: "NGN" | "USD";
125
+ amount: number;
126
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
127
+ metadata?: Record<string, unknown> | null | undefined;
128
+ description?: string | null | undefined;
129
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
130
+ gatewayTxRef?: string | null | undefined;
131
+ gatewayTxId?: string | null | undefined;
132
+ failureReason?: string | null | undefined;
133
+ paidAt?: string | null | undefined;
134
+ }>;
135
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
137
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
138
+ }, "strip", z.ZodTypeAny, {
139
+ type: string;
140
+ id: string;
141
+ attributes: {
142
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
143
+ createdAt: string;
144
+ updatedAt: string;
145
+ currency: "NGN" | "USD";
146
+ amount: number;
147
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
148
+ metadata?: Record<string, unknown> | null | undefined;
149
+ description?: string | null | undefined;
150
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
151
+ gatewayTxRef?: string | null | undefined;
152
+ gatewayTxId?: string | null | undefined;
153
+ failureReason?: string | null | undefined;
154
+ paidAt?: string | null | undefined;
155
+ };
156
+ relationships?: Record<string, unknown> | undefined;
157
+ links?: Record<string, string> | undefined;
158
+ meta?: Record<string, unknown> | undefined;
159
+ }, {
160
+ type: string;
161
+ id: string;
162
+ attributes: {
163
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
164
+ createdAt: string;
165
+ updatedAt: string;
166
+ currency: "NGN" | "USD";
167
+ amount: number;
168
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
169
+ metadata?: Record<string, unknown> | null | undefined;
170
+ description?: string | null | undefined;
171
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
172
+ gatewayTxRef?: string | null | undefined;
173
+ gatewayTxId?: string | null | undefined;
174
+ failureReason?: string | null | undefined;
175
+ paidAt?: string | null | undefined;
176
+ };
177
+ relationships?: Record<string, unknown> | undefined;
178
+ links?: Record<string, string> | undefined;
179
+ meta?: Record<string, unknown> | undefined;
180
+ }>;
181
+ export declare const paymentResponseSchema: z.ZodObject<{
182
+ data: z.ZodObject<{
183
+ type: z.ZodLiteral<string>;
184
+ id: z.ZodString;
185
+ attributes: z.ZodObject<{
186
+ amount: z.ZodNumber;
187
+ currency: z.ZodEnum<["NGN", "USD"]>;
188
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>;
189
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>>;
190
+ gateway: z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>;
191
+ gatewayTxRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
192
+ gatewayTxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
193
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
194
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
195
+ failureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ paidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ } & {
198
+ createdAt: z.ZodString;
199
+ updatedAt: z.ZodString;
200
+ }, "strip", z.ZodTypeAny, {
201
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
202
+ createdAt: string;
203
+ updatedAt: string;
204
+ currency: "NGN" | "USD";
205
+ amount: number;
206
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
207
+ metadata?: Record<string, unknown> | null | undefined;
208
+ description?: string | null | undefined;
209
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
210
+ gatewayTxRef?: string | null | undefined;
211
+ gatewayTxId?: string | null | undefined;
212
+ failureReason?: string | null | undefined;
213
+ paidAt?: string | null | undefined;
214
+ }, {
215
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
216
+ createdAt: string;
217
+ updatedAt: string;
218
+ currency: "NGN" | "USD";
219
+ amount: number;
220
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
221
+ metadata?: Record<string, unknown> | null | undefined;
222
+ description?: string | null | undefined;
223
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
224
+ gatewayTxRef?: string | null | undefined;
225
+ gatewayTxId?: string | null | undefined;
226
+ failureReason?: string | null | undefined;
227
+ paidAt?: string | null | undefined;
228
+ }>;
229
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
230
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
231
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
232
+ }, "strip", z.ZodTypeAny, {
233
+ type: string;
234
+ id: string;
235
+ attributes: {
236
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
237
+ createdAt: string;
238
+ updatedAt: string;
239
+ currency: "NGN" | "USD";
240
+ amount: number;
241
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
242
+ metadata?: Record<string, unknown> | null | undefined;
243
+ description?: string | null | undefined;
244
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
245
+ gatewayTxRef?: string | null | undefined;
246
+ gatewayTxId?: string | null | undefined;
247
+ failureReason?: string | null | undefined;
248
+ paidAt?: string | null | undefined;
249
+ };
250
+ relationships?: Record<string, unknown> | undefined;
251
+ links?: Record<string, string> | undefined;
252
+ meta?: Record<string, unknown> | undefined;
253
+ }, {
254
+ type: string;
255
+ id: string;
256
+ attributes: {
257
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
258
+ createdAt: string;
259
+ updatedAt: string;
260
+ currency: "NGN" | "USD";
261
+ amount: number;
262
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
263
+ metadata?: Record<string, unknown> | null | undefined;
264
+ description?: string | null | undefined;
265
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
266
+ gatewayTxRef?: string | null | undefined;
267
+ gatewayTxId?: string | null | undefined;
268
+ failureReason?: string | null | undefined;
269
+ paidAt?: string | null | undefined;
270
+ };
271
+ relationships?: Record<string, unknown> | undefined;
272
+ links?: Record<string, string> | undefined;
273
+ meta?: Record<string, unknown> | undefined;
274
+ }>;
275
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
276
+ type: z.ZodString;
277
+ id: z.ZodString;
278
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
279
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
280
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
281
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
282
+ }, "strip", z.ZodTypeAny, {
283
+ type: string;
284
+ id: string;
285
+ attributes?: Record<string, unknown> | undefined;
286
+ relationships?: Record<string, unknown> | undefined;
287
+ links?: Record<string, string> | undefined;
288
+ meta?: Record<string, unknown> | undefined;
289
+ }, {
290
+ type: string;
291
+ id: string;
292
+ attributes?: Record<string, unknown> | undefined;
293
+ relationships?: Record<string, unknown> | undefined;
294
+ links?: Record<string, string> | undefined;
295
+ meta?: Record<string, unknown> | undefined;
296
+ }>, "many">>;
297
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
298
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
299
+ }, "strip", z.ZodTypeAny, {
300
+ data: {
301
+ type: string;
302
+ id: string;
303
+ attributes: {
304
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
305
+ createdAt: string;
306
+ updatedAt: string;
307
+ currency: "NGN" | "USD";
308
+ amount: number;
309
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
310
+ metadata?: Record<string, unknown> | null | undefined;
311
+ description?: string | null | undefined;
312
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
313
+ gatewayTxRef?: string | null | undefined;
314
+ gatewayTxId?: string | null | undefined;
315
+ failureReason?: string | null | undefined;
316
+ paidAt?: string | null | undefined;
317
+ };
318
+ relationships?: Record<string, unknown> | undefined;
319
+ links?: Record<string, string> | undefined;
320
+ meta?: Record<string, unknown> | undefined;
321
+ };
322
+ links?: Record<string, string> | undefined;
323
+ meta?: Record<string, unknown> | undefined;
324
+ included?: {
325
+ type: string;
326
+ id: string;
327
+ attributes?: Record<string, unknown> | undefined;
328
+ relationships?: Record<string, unknown> | undefined;
329
+ links?: Record<string, string> | undefined;
330
+ meta?: Record<string, unknown> | undefined;
331
+ }[] | undefined;
332
+ }, {
333
+ data: {
334
+ type: string;
335
+ id: string;
336
+ attributes: {
337
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
338
+ createdAt: string;
339
+ updatedAt: string;
340
+ currency: "NGN" | "USD";
341
+ amount: number;
342
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
343
+ metadata?: Record<string, unknown> | null | undefined;
344
+ description?: string | null | undefined;
345
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
346
+ gatewayTxRef?: string | null | undefined;
347
+ gatewayTxId?: string | null | undefined;
348
+ failureReason?: string | null | undefined;
349
+ paidAt?: string | null | undefined;
350
+ };
351
+ relationships?: Record<string, unknown> | undefined;
352
+ links?: Record<string, string> | undefined;
353
+ meta?: Record<string, unknown> | undefined;
354
+ };
355
+ links?: Record<string, string> | undefined;
356
+ meta?: Record<string, unknown> | undefined;
357
+ included?: {
358
+ type: string;
359
+ id: string;
360
+ attributes?: Record<string, unknown> | undefined;
361
+ relationships?: Record<string, unknown> | undefined;
362
+ links?: Record<string, string> | undefined;
363
+ meta?: Record<string, unknown> | undefined;
364
+ }[] | undefined;
365
+ }>;
366
+ export declare const paymentListResponseSchema: z.ZodObject<{
367
+ data: z.ZodArray<z.ZodObject<{
368
+ type: z.ZodLiteral<string>;
369
+ id: z.ZodString;
370
+ attributes: z.ZodObject<{
371
+ amount: z.ZodNumber;
372
+ currency: z.ZodEnum<["NGN", "USD"]>;
373
+ status: z.ZodEnum<["pending", "processing", "completed", "failed", "cancelled"]>;
374
+ paymentMethod: z.ZodOptional<z.ZodNullable<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>>;
375
+ gateway: z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>;
376
+ gatewayTxRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
377
+ gatewayTxId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
378
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
380
+ failureReason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ paidAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ } & {
383
+ createdAt: z.ZodString;
384
+ updatedAt: z.ZodString;
385
+ }, "strip", z.ZodTypeAny, {
386
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
387
+ createdAt: string;
388
+ updatedAt: string;
389
+ currency: "NGN" | "USD";
390
+ amount: number;
391
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
392
+ metadata?: Record<string, unknown> | null | undefined;
393
+ description?: string | null | undefined;
394
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
395
+ gatewayTxRef?: string | null | undefined;
396
+ gatewayTxId?: string | null | undefined;
397
+ failureReason?: string | null | undefined;
398
+ paidAt?: string | null | undefined;
399
+ }, {
400
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
401
+ createdAt: string;
402
+ updatedAt: string;
403
+ currency: "NGN" | "USD";
404
+ amount: number;
405
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
406
+ metadata?: Record<string, unknown> | null | undefined;
407
+ description?: string | null | undefined;
408
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
409
+ gatewayTxRef?: string | null | undefined;
410
+ gatewayTxId?: string | null | undefined;
411
+ failureReason?: string | null | undefined;
412
+ paidAt?: string | null | undefined;
413
+ }>;
414
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
415
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
416
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ type: string;
419
+ id: string;
420
+ attributes: {
421
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
422
+ createdAt: string;
423
+ updatedAt: string;
424
+ currency: "NGN" | "USD";
425
+ amount: number;
426
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
427
+ metadata?: Record<string, unknown> | null | undefined;
428
+ description?: string | null | undefined;
429
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
430
+ gatewayTxRef?: string | null | undefined;
431
+ gatewayTxId?: string | null | undefined;
432
+ failureReason?: string | null | undefined;
433
+ paidAt?: string | null | undefined;
434
+ };
435
+ relationships?: Record<string, unknown> | undefined;
436
+ links?: Record<string, string> | undefined;
437
+ meta?: Record<string, unknown> | undefined;
438
+ }, {
439
+ type: string;
440
+ id: string;
441
+ attributes: {
442
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
443
+ createdAt: string;
444
+ updatedAt: string;
445
+ currency: "NGN" | "USD";
446
+ amount: number;
447
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
448
+ metadata?: Record<string, unknown> | null | undefined;
449
+ description?: string | null | undefined;
450
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
451
+ gatewayTxRef?: string | null | undefined;
452
+ gatewayTxId?: string | null | undefined;
453
+ failureReason?: string | null | undefined;
454
+ paidAt?: string | null | undefined;
455
+ };
456
+ relationships?: Record<string, unknown> | undefined;
457
+ links?: Record<string, string> | undefined;
458
+ meta?: Record<string, unknown> | undefined;
459
+ }>, "many">;
460
+ included: z.ZodOptional<z.ZodArray<z.ZodObject<{
461
+ type: z.ZodString;
462
+ id: z.ZodString;
463
+ attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
464
+ relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
465
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
466
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
467
+ }, "strip", z.ZodTypeAny, {
468
+ type: string;
469
+ id: string;
470
+ attributes?: Record<string, unknown> | undefined;
471
+ relationships?: Record<string, unknown> | undefined;
472
+ links?: Record<string, string> | undefined;
473
+ meta?: Record<string, unknown> | undefined;
474
+ }, {
475
+ type: string;
476
+ id: string;
477
+ attributes?: Record<string, unknown> | undefined;
478
+ relationships?: Record<string, unknown> | undefined;
479
+ links?: Record<string, string> | undefined;
480
+ meta?: Record<string, unknown> | undefined;
481
+ }>, "many">>;
482
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
483
+ links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
484
+ }, "strip", z.ZodTypeAny, {
485
+ data: {
486
+ type: string;
487
+ id: string;
488
+ attributes: {
489
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
490
+ createdAt: string;
491
+ updatedAt: string;
492
+ currency: "NGN" | "USD";
493
+ amount: number;
494
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
495
+ metadata?: Record<string, unknown> | null | undefined;
496
+ description?: string | null | undefined;
497
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
498
+ gatewayTxRef?: string | null | undefined;
499
+ gatewayTxId?: string | null | undefined;
500
+ failureReason?: string | null | undefined;
501
+ paidAt?: string | null | undefined;
502
+ };
503
+ relationships?: Record<string, unknown> | undefined;
504
+ links?: Record<string, string> | undefined;
505
+ meta?: Record<string, unknown> | undefined;
506
+ }[];
507
+ links?: Record<string, string> | undefined;
508
+ meta?: Record<string, unknown> | undefined;
509
+ included?: {
510
+ type: string;
511
+ id: string;
512
+ attributes?: Record<string, unknown> | undefined;
513
+ relationships?: Record<string, unknown> | undefined;
514
+ links?: Record<string, string> | undefined;
515
+ meta?: Record<string, unknown> | undefined;
516
+ }[] | undefined;
517
+ }, {
518
+ data: {
519
+ type: string;
520
+ id: string;
521
+ attributes: {
522
+ status: "pending" | "completed" | "cancelled" | "failed" | "processing";
523
+ createdAt: string;
524
+ updatedAt: string;
525
+ currency: "NGN" | "USD";
526
+ amount: number;
527
+ gateway: "other" | "flutterwave" | "paystack" | "stripe" | "paypal";
528
+ metadata?: Record<string, unknown> | null | undefined;
529
+ description?: string | null | undefined;
530
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | null | undefined;
531
+ gatewayTxRef?: string | null | undefined;
532
+ gatewayTxId?: string | null | undefined;
533
+ failureReason?: string | null | undefined;
534
+ paidAt?: string | null | undefined;
535
+ };
536
+ relationships?: Record<string, unknown> | undefined;
537
+ links?: Record<string, string> | undefined;
538
+ meta?: Record<string, unknown> | undefined;
539
+ }[];
540
+ links?: Record<string, string> | undefined;
541
+ meta?: Record<string, unknown> | undefined;
542
+ included?: {
543
+ type: string;
544
+ id: string;
545
+ attributes?: Record<string, unknown> | undefined;
546
+ relationships?: Record<string, unknown> | undefined;
547
+ links?: Record<string, string> | undefined;
548
+ meta?: Record<string, unknown> | undefined;
549
+ }[] | undefined;
550
+ }>;
551
+ export declare const flutterwaveInitPaymentSchema: z.ZodObject<{
552
+ amount: z.ZodNumber;
553
+ currency: z.ZodEnum<["NGN", "USD"]>;
554
+ email: z.ZodString;
555
+ phone: z.ZodOptional<z.ZodString>;
556
+ name: z.ZodOptional<z.ZodString>;
557
+ paymentMethod: z.ZodOptional<z.ZodEnum<["card", "bank_transfer", "mobile_money", "ussd", "account"]>>;
558
+ description: z.ZodOptional<z.ZodString>;
559
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
560
+ }, "strip", z.ZodTypeAny, {
561
+ email: string;
562
+ currency: "NGN" | "USD";
563
+ amount: number;
564
+ name?: string | undefined;
565
+ phone?: string | undefined;
566
+ metadata?: Record<string, unknown> | undefined;
567
+ description?: string | undefined;
568
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | undefined;
569
+ }, {
570
+ email: string;
571
+ currency: "NGN" | "USD";
572
+ amount: number;
573
+ name?: string | undefined;
574
+ phone?: string | undefined;
575
+ metadata?: Record<string, unknown> | undefined;
576
+ description?: string | undefined;
577
+ paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | undefined;
578
+ }>;
579
+ export declare const flutterwaveInitPaymentResponseSchema: z.ZodObject<{
580
+ status: z.ZodLiteral<"success">;
581
+ message: z.ZodString;
582
+ data: z.ZodObject<{
583
+ link: z.ZodString;
584
+ tx_ref: z.ZodString;
585
+ }, "strip", z.ZodTypeAny, {
586
+ link: string;
587
+ tx_ref: string;
588
+ }, {
589
+ link: string;
590
+ tx_ref: string;
591
+ }>;
592
+ }, "strip", z.ZodTypeAny, {
593
+ status: "success";
594
+ message: string;
595
+ data: {
596
+ link: string;
597
+ tx_ref: string;
598
+ };
599
+ }, {
600
+ status: "success";
601
+ message: string;
602
+ data: {
603
+ link: string;
604
+ tx_ref: string;
605
+ };
606
+ }>;
607
+ export declare const flutterwaveWebhookSchema: z.ZodObject<{
608
+ event: z.ZodString;
609
+ data: z.ZodObject<{
610
+ id: z.ZodNumber;
611
+ tx_ref: z.ZodString;
612
+ flw_ref: z.ZodString;
613
+ device_fingerprint: z.ZodOptional<z.ZodString>;
614
+ amount: z.ZodNumber;
615
+ currency: z.ZodString;
616
+ charged_amount: z.ZodNumber;
617
+ app_fee: z.ZodNumber;
618
+ merchant_fee: z.ZodNumber;
619
+ processor_response: z.ZodOptional<z.ZodString>;
620
+ auth_model: z.ZodOptional<z.ZodString>;
621
+ card: z.ZodOptional<z.ZodObject<{
622
+ first_6digits: z.ZodOptional<z.ZodString>;
623
+ last_4digits: z.ZodOptional<z.ZodString>;
624
+ issuer: z.ZodOptional<z.ZodString>;
625
+ country: z.ZodOptional<z.ZodString>;
626
+ type: z.ZodOptional<z.ZodString>;
627
+ token: z.ZodOptional<z.ZodString>;
628
+ expiry: z.ZodOptional<z.ZodString>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ type?: string | undefined;
631
+ token?: string | undefined;
632
+ first_6digits?: string | undefined;
633
+ last_4digits?: string | undefined;
634
+ issuer?: string | undefined;
635
+ country?: string | undefined;
636
+ expiry?: string | undefined;
637
+ }, {
638
+ type?: string | undefined;
639
+ token?: string | undefined;
640
+ first_6digits?: string | undefined;
641
+ last_4digits?: string | undefined;
642
+ issuer?: string | undefined;
643
+ country?: string | undefined;
644
+ expiry?: string | undefined;
645
+ }>>;
646
+ account_id: z.ZodNumber;
647
+ customer: z.ZodObject<{
648
+ id: z.ZodNumber;
649
+ name: z.ZodString;
650
+ phone_number: z.ZodOptional<z.ZodString>;
651
+ email: z.ZodString;
652
+ created_at: z.ZodString;
653
+ }, "strip", z.ZodTypeAny, {
654
+ id: number;
655
+ email: string;
656
+ name: string;
657
+ created_at: string;
658
+ phone_number?: string | undefined;
659
+ }, {
660
+ id: number;
661
+ email: string;
662
+ name: string;
663
+ created_at: string;
664
+ phone_number?: string | undefined;
665
+ }>;
666
+ status: z.ZodString;
667
+ payment_type: z.ZodString;
668
+ created_at: z.ZodString;
669
+ amount_settled: z.ZodOptional<z.ZodNumber>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ status: string;
672
+ id: number;
673
+ currency: string;
674
+ amount: number;
675
+ tx_ref: string;
676
+ flw_ref: string;
677
+ charged_amount: number;
678
+ app_fee: number;
679
+ merchant_fee: number;
680
+ account_id: number;
681
+ customer: {
682
+ id: number;
683
+ email: string;
684
+ name: string;
685
+ created_at: string;
686
+ phone_number?: string | undefined;
687
+ };
688
+ created_at: string;
689
+ payment_type: string;
690
+ card?: {
691
+ type?: string | undefined;
692
+ token?: string | undefined;
693
+ first_6digits?: string | undefined;
694
+ last_4digits?: string | undefined;
695
+ issuer?: string | undefined;
696
+ country?: string | undefined;
697
+ expiry?: string | undefined;
698
+ } | undefined;
699
+ device_fingerprint?: string | undefined;
700
+ processor_response?: string | undefined;
701
+ auth_model?: string | undefined;
702
+ amount_settled?: number | undefined;
703
+ }, {
704
+ status: string;
705
+ id: number;
706
+ currency: string;
707
+ amount: number;
708
+ tx_ref: string;
709
+ flw_ref: string;
710
+ charged_amount: number;
711
+ app_fee: number;
712
+ merchant_fee: number;
713
+ account_id: number;
714
+ customer: {
715
+ id: number;
716
+ email: string;
717
+ name: string;
718
+ created_at: string;
719
+ phone_number?: string | undefined;
720
+ };
721
+ created_at: string;
722
+ payment_type: string;
723
+ card?: {
724
+ type?: string | undefined;
725
+ token?: string | undefined;
726
+ first_6digits?: string | undefined;
727
+ last_4digits?: string | undefined;
728
+ issuer?: string | undefined;
729
+ country?: string | undefined;
730
+ expiry?: string | undefined;
731
+ } | undefined;
732
+ device_fingerprint?: string | undefined;
733
+ processor_response?: string | undefined;
734
+ auth_model?: string | undefined;
735
+ amount_settled?: number | undefined;
736
+ }>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ data: {
739
+ status: string;
740
+ id: number;
741
+ currency: string;
742
+ amount: number;
743
+ tx_ref: string;
744
+ flw_ref: string;
745
+ charged_amount: number;
746
+ app_fee: number;
747
+ merchant_fee: number;
748
+ account_id: number;
749
+ customer: {
750
+ id: number;
751
+ email: string;
752
+ name: string;
753
+ created_at: string;
754
+ phone_number?: string | undefined;
755
+ };
756
+ created_at: string;
757
+ payment_type: string;
758
+ card?: {
759
+ type?: string | undefined;
760
+ token?: string | undefined;
761
+ first_6digits?: string | undefined;
762
+ last_4digits?: string | undefined;
763
+ issuer?: string | undefined;
764
+ country?: string | undefined;
765
+ expiry?: string | undefined;
766
+ } | undefined;
767
+ device_fingerprint?: string | undefined;
768
+ processor_response?: string | undefined;
769
+ auth_model?: string | undefined;
770
+ amount_settled?: number | undefined;
771
+ };
772
+ event: string;
773
+ }, {
774
+ data: {
775
+ status: string;
776
+ id: number;
777
+ currency: string;
778
+ amount: number;
779
+ tx_ref: string;
780
+ flw_ref: string;
781
+ charged_amount: number;
782
+ app_fee: number;
783
+ merchant_fee: number;
784
+ account_id: number;
785
+ customer: {
786
+ id: number;
787
+ email: string;
788
+ name: string;
789
+ created_at: string;
790
+ phone_number?: string | undefined;
791
+ };
792
+ created_at: string;
793
+ payment_type: string;
794
+ card?: {
795
+ type?: string | undefined;
796
+ token?: string | undefined;
797
+ first_6digits?: string | undefined;
798
+ last_4digits?: string | undefined;
799
+ issuer?: string | undefined;
800
+ country?: string | undefined;
801
+ expiry?: string | undefined;
802
+ } | undefined;
803
+ device_fingerprint?: string | undefined;
804
+ processor_response?: string | undefined;
805
+ auth_model?: string | undefined;
806
+ amount_settled?: number | undefined;
807
+ };
808
+ event: string;
809
+ }>;
810
+ export type PaymentStatus = z.infer<typeof paymentStatusSchema>;
811
+ export type PaymentCurrency = z.infer<typeof paymentCurrencySchema>;
812
+ export type PaymentMethod = z.infer<typeof paymentMethodSchema>;
813
+ export type PaymentGateway = z.infer<typeof paymentGatewaySchema>;
814
+ export type PaymentAttributes = z.infer<typeof paymentAttributesSchema>;
815
+ export type CreatePaymentInput = z.infer<typeof createPaymentAttributesSchema>;
816
+ export type UpdatePaymentInput = z.infer<typeof updatePaymentAttributesSchema>;
817
+ export type PaymentResponse = z.infer<typeof paymentResponseSchema>;
818
+ export type PaymentListResponse = z.infer<typeof paymentListResponseSchema>;
819
+ export type FlutterwaveInitPaymentRequest = z.infer<typeof flutterwaveInitPaymentSchema>;
820
+ export type FlutterwaveInitPaymentResponse = z.infer<typeof flutterwaveInitPaymentResponseSchema>;
821
+ export type FlutterwaveWebhookPayload = z.infer<typeof flutterwaveWebhookSchema>;
822
+ //# sourceMappingURL=payments.schemas.d.ts.map