@deepintel-ltd/farmpro-contracts 1.5.16 → 1.5.18

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.
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptions.routes.d.ts","sourceRoot":"","sources":["../../src/routes/subscriptions.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2M9B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { initContract } from '@ts-rest/core';
2
2
  import { z } from 'zod';
3
- import { subscriptionResponseSchema, subscriptionListResponseSchema, upgradeSubscriptionAttributesSchema, usageTrackingListResponseSchema, tierLimitsResponseSchema, currentUsageResponseSchema, availablePlansResponseSchema, } from '../schemas/subscriptions.schemas';
3
+ import { subscriptionResponseSchema, subscriptionListResponseSchema, upgradeSubscriptionAttributesSchema, usageTrackingListResponseSchema, tierLimitsResponseSchema, currentUsageResponseSchema, availablePlansResponseSchema, createSubscriptionPaymentLinkAttributesSchema, subscriptionPaymentLinkResponseSchema, } from '../schemas/subscriptions.schemas';
4
4
  import { jsonApiErrorResponseSchema, jsonApiPaginationQuerySchema, } from '../schemas/common.schemas';
5
5
  const c = initContract();
6
6
  export const subscriptionsRouter = c.router({
@@ -65,6 +65,26 @@ export const subscriptionsRouter = c.router({
65
65
  summary: 'List subscriptions',
66
66
  description: 'Get all subscriptions for a farm with optional filtering',
67
67
  },
68
+ // Create subscription payment link (for easy upgrade flow)
69
+ createSubscriptionPaymentLink: {
70
+ method: 'POST',
71
+ path: '/farms/:farmId/subscriptions/payment-link',
72
+ pathParams: z.object({ farmId: z.string().uuid() }),
73
+ body: z.object({
74
+ data: z.object({
75
+ type: z.literal('subscriptions'),
76
+ attributes: createSubscriptionPaymentLinkAttributesSchema,
77
+ }),
78
+ }),
79
+ responses: {
80
+ 201: subscriptionPaymentLinkResponseSchema,
81
+ 400: jsonApiErrorResponseSchema,
82
+ 404: jsonApiErrorResponseSchema,
83
+ 401: jsonApiErrorResponseSchema,
84
+ },
85
+ summary: 'Create subscription payment link',
86
+ description: 'Create a payment link for upgrading to a paid subscription tier. After payment is completed, the subscription will be automatically upgraded via webhook or manual verification.',
87
+ },
68
88
  // Upgrade subscription
69
89
  upgradeSubscription: {
70
90
  method: 'POST',
@@ -83,7 +103,7 @@ export const subscriptionsRouter = c.router({
83
103
  401: jsonApiErrorResponseSchema,
84
104
  },
85
105
  summary: 'Upgrade subscription',
86
- description: 'Upgrade a farm subscription to a new tier',
106
+ description: 'Upgrade a farm subscription to a new tier (typically called after payment verification)',
87
107
  },
88
108
  // Cancel subscription
89
109
  cancelSubscription: {
@@ -152,4 +172,26 @@ export const subscriptionsRouter = c.router({
152
172
  summary: 'Get current usage',
153
173
  description: 'Get current usage for a specific resource type in the current period',
154
174
  },
175
+ // Verify and activate subscription after payment
176
+ verifyAndActivateSubscription: {
177
+ method: 'POST',
178
+ path: '/farms/:farmId/subscriptions/verify-payment',
179
+ pathParams: z.object({ farmId: z.string().uuid() }),
180
+ body: z.object({
181
+ data: z.object({
182
+ type: z.literal('subscriptions'),
183
+ attributes: z.object({
184
+ paymentReference: z.string(), // Transaction reference from payment gateway
185
+ }),
186
+ }),
187
+ }),
188
+ responses: {
189
+ 200: subscriptionResponseSchema,
190
+ 400: jsonApiErrorResponseSchema,
191
+ 404: jsonApiErrorResponseSchema,
192
+ 401: jsonApiErrorResponseSchema,
193
+ },
194
+ summary: 'Verify and activate subscription',
195
+ description: 'Verify payment and automatically upgrade subscription. Typically called after payment redirect or when webhook fails.',
196
+ },
155
197
  });
@@ -30,13 +30,16 @@ export declare const signupAttributesSchema: z.ZodObject<{
30
30
  }>;
31
31
  export declare const googleAuthInitiateAttributesSchema: z.ZodObject<{
32
32
  redirectUri: z.ZodOptional<z.ZodString>;
33
+ frontendCallbackUrl: z.ZodOptional<z.ZodString>;
33
34
  source: z.ZodOptional<z.ZodString>;
34
35
  }, "strip", z.ZodTypeAny, {
35
36
  source?: string | undefined;
36
37
  redirectUri?: string | undefined;
38
+ frontendCallbackUrl?: string | undefined;
37
39
  }, {
38
40
  source?: string | undefined;
39
41
  redirectUri?: string | undefined;
42
+ frontendCallbackUrl?: string | undefined;
40
43
  }>;
41
44
  export declare const googleAuthCallbackAttributesSchema: z.ZodObject<{
42
45
  code: z.ZodString;
@@ -208,25 +211,30 @@ export declare const googleAuthInitiateSchema: z.ZodObject<{
208
211
  type: z.ZodLiteral<"auth">;
209
212
  attributes: z.ZodObject<{
210
213
  redirectUri: z.ZodOptional<z.ZodString>;
214
+ frontendCallbackUrl: z.ZodOptional<z.ZodString>;
211
215
  source: z.ZodOptional<z.ZodString>;
212
216
  }, "strip", z.ZodTypeAny, {
213
217
  source?: string | undefined;
214
218
  redirectUri?: string | undefined;
219
+ frontendCallbackUrl?: string | undefined;
215
220
  }, {
216
221
  source?: string | undefined;
217
222
  redirectUri?: string | undefined;
223
+ frontendCallbackUrl?: string | undefined;
218
224
  }>;
219
225
  }, "strip", z.ZodTypeAny, {
220
226
  type: "auth";
221
227
  attributes: {
222
228
  source?: string | undefined;
223
229
  redirectUri?: string | undefined;
230
+ frontendCallbackUrl?: string | undefined;
224
231
  };
225
232
  }, {
226
233
  type: "auth";
227
234
  attributes: {
228
235
  source?: string | undefined;
229
236
  redirectUri?: string | undefined;
237
+ frontendCallbackUrl?: string | undefined;
230
238
  };
231
239
  }>;
232
240
  export declare const googleAuthCallbackSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"auth.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/auth.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,E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AO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC1F,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -20,6 +20,7 @@ export const signupAttributesSchema = z.object({
20
20
  // Google OAuth initiate attributes
21
21
  export const googleAuthInitiateAttributesSchema = z.object({
22
22
  redirectUri: z.string().url().optional(),
23
+ frontendCallbackUrl: z.string().url().optional(),
23
24
  source: z.string().optional(),
24
25
  });
25
26
  // Google OAuth callback attributes
@@ -548,7 +548,7 @@ export declare const paymentListResponseSchema: z.ZodObject<{
548
548
  meta?: Record<string, unknown> | undefined;
549
549
  }[] | undefined;
550
550
  }>;
551
- export declare const flutterwaveInitPaymentSchema: z.ZodObject<{
551
+ export declare const initPaymentSchema: z.ZodObject<{
552
552
  amount: z.ZodNumber;
553
553
  currency: z.ZodEnum<["NGN", "USD"]>;
554
554
  email: z.ZodString;
@@ -576,7 +576,7 @@ export declare const flutterwaveInitPaymentSchema: z.ZodObject<{
576
576
  description?: string | undefined;
577
577
  paymentMethod?: "card" | "bank_transfer" | "mobile_money" | "ussd" | "account" | undefined;
578
578
  }>;
579
- export declare const flutterwaveInitPaymentResponseSchema: z.ZodObject<{
579
+ export declare const initPaymentResponseSchema: z.ZodObject<{
580
580
  status: z.ZodLiteral<"success">;
581
581
  message: z.ZodString;
582
582
  data: z.ZodObject<{
@@ -604,18 +604,19 @@ export declare const flutterwaveInitPaymentResponseSchema: z.ZodObject<{
604
604
  tx_ref: string;
605
605
  };
606
606
  }>;
607
- export declare const flutterwaveWebhookSchema: z.ZodObject<{
607
+ export declare const webhookPayloadSchema: z.ZodObject<{
608
608
  event: z.ZodString;
609
609
  data: z.ZodObject<{
610
610
  id: z.ZodNumber;
611
- tx_ref: z.ZodString;
612
- flw_ref: z.ZodString;
611
+ tx_ref: z.ZodOptional<z.ZodString>;
612
+ reference: z.ZodOptional<z.ZodString>;
613
+ flw_ref: z.ZodOptional<z.ZodString>;
613
614
  device_fingerprint: z.ZodOptional<z.ZodString>;
614
615
  amount: z.ZodNumber;
615
616
  currency: z.ZodString;
616
- charged_amount: z.ZodNumber;
617
- app_fee: z.ZodNumber;
618
- merchant_fee: z.ZodNumber;
617
+ charged_amount: z.ZodOptional<z.ZodNumber>;
618
+ app_fee: z.ZodOptional<z.ZodNumber>;
619
+ merchant_fee: z.ZodOptional<z.ZodNumber>;
619
620
  processor_response: z.ZodOptional<z.ZodString>;
620
621
  auth_model: z.ZodOptional<z.ZodString>;
621
622
  card: z.ZodOptional<z.ZodObject<{
@@ -643,50 +644,48 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
643
644
  country?: string | undefined;
644
645
  expiry?: string | undefined;
645
646
  }>>;
646
- account_id: z.ZodNumber;
647
+ account_id: z.ZodOptional<z.ZodNumber>;
647
648
  customer: z.ZodObject<{
648
649
  id: z.ZodNumber;
649
650
  name: z.ZodString;
650
651
  phone_number: z.ZodOptional<z.ZodString>;
652
+ phone: z.ZodOptional<z.ZodString>;
651
653
  email: z.ZodString;
652
- created_at: z.ZodString;
654
+ created_at: z.ZodOptional<z.ZodString>;
653
655
  }, "strip", z.ZodTypeAny, {
654
656
  id: number;
655
657
  email: string;
656
658
  name: string;
657
- created_at: string;
659
+ phone?: string | undefined;
658
660
  phone_number?: string | undefined;
661
+ created_at?: string | undefined;
659
662
  }, {
660
663
  id: number;
661
664
  email: string;
662
665
  name: string;
663
- created_at: string;
666
+ phone?: string | undefined;
664
667
  phone_number?: string | undefined;
668
+ created_at?: string | undefined;
665
669
  }>;
666
670
  status: z.ZodString;
667
- payment_type: z.ZodString;
671
+ payment_type: z.ZodOptional<z.ZodString>;
668
672
  created_at: z.ZodString;
673
+ paid_at: z.ZodOptional<z.ZodString>;
669
674
  amount_settled: z.ZodOptional<z.ZodNumber>;
670
675
  }, "strip", z.ZodTypeAny, {
671
676
  status: string;
672
677
  id: number;
673
678
  currency: string;
674
679
  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
680
  customer: {
682
681
  id: number;
683
682
  email: string;
684
683
  name: string;
685
- created_at: string;
684
+ phone?: string | undefined;
686
685
  phone_number?: string | undefined;
686
+ created_at?: string | undefined;
687
687
  };
688
688
  created_at: string;
689
- payment_type: string;
690
689
  card?: {
691
690
  type?: string | undefined;
692
691
  token?: string | undefined;
@@ -696,30 +695,33 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
696
695
  country?: string | undefined;
697
696
  expiry?: string | undefined;
698
697
  } | undefined;
698
+ tx_ref?: string | undefined;
699
+ reference?: string | undefined;
700
+ flw_ref?: string | undefined;
699
701
  device_fingerprint?: string | undefined;
702
+ charged_amount?: number | undefined;
703
+ app_fee?: number | undefined;
704
+ merchant_fee?: number | undefined;
700
705
  processor_response?: string | undefined;
701
706
  auth_model?: string | undefined;
707
+ account_id?: number | undefined;
708
+ payment_type?: string | undefined;
709
+ paid_at?: string | undefined;
702
710
  amount_settled?: number | undefined;
703
711
  }, {
704
712
  status: string;
705
713
  id: number;
706
714
  currency: string;
707
715
  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
716
  customer: {
715
717
  id: number;
716
718
  email: string;
717
719
  name: string;
718
- created_at: string;
720
+ phone?: string | undefined;
719
721
  phone_number?: string | undefined;
722
+ created_at?: string | undefined;
720
723
  };
721
724
  created_at: string;
722
- payment_type: string;
723
725
  card?: {
724
726
  type?: string | undefined;
725
727
  token?: string | undefined;
@@ -729,9 +731,18 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
729
731
  country?: string | undefined;
730
732
  expiry?: string | undefined;
731
733
  } | undefined;
734
+ tx_ref?: string | undefined;
735
+ reference?: string | undefined;
736
+ flw_ref?: string | undefined;
732
737
  device_fingerprint?: string | undefined;
738
+ charged_amount?: number | undefined;
739
+ app_fee?: number | undefined;
740
+ merchant_fee?: number | undefined;
733
741
  processor_response?: string | undefined;
734
742
  auth_model?: string | undefined;
743
+ account_id?: number | undefined;
744
+ payment_type?: string | undefined;
745
+ paid_at?: string | undefined;
735
746
  amount_settled?: number | undefined;
736
747
  }>;
737
748
  }, "strip", z.ZodTypeAny, {
@@ -740,21 +751,15 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
740
751
  id: number;
741
752
  currency: string;
742
753
  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
754
  customer: {
750
755
  id: number;
751
756
  email: string;
752
757
  name: string;
753
- created_at: string;
758
+ phone?: string | undefined;
754
759
  phone_number?: string | undefined;
760
+ created_at?: string | undefined;
755
761
  };
756
762
  created_at: string;
757
- payment_type: string;
758
763
  card?: {
759
764
  type?: string | undefined;
760
765
  token?: string | undefined;
@@ -764,9 +769,18 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
764
769
  country?: string | undefined;
765
770
  expiry?: string | undefined;
766
771
  } | undefined;
772
+ tx_ref?: string | undefined;
773
+ reference?: string | undefined;
774
+ flw_ref?: string | undefined;
767
775
  device_fingerprint?: string | undefined;
776
+ charged_amount?: number | undefined;
777
+ app_fee?: number | undefined;
778
+ merchant_fee?: number | undefined;
768
779
  processor_response?: string | undefined;
769
780
  auth_model?: string | undefined;
781
+ account_id?: number | undefined;
782
+ payment_type?: string | undefined;
783
+ paid_at?: string | undefined;
770
784
  amount_settled?: number | undefined;
771
785
  };
772
786
  event: string;
@@ -776,21 +790,15 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
776
790
  id: number;
777
791
  currency: string;
778
792
  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
793
  customer: {
786
794
  id: number;
787
795
  email: string;
788
796
  name: string;
789
- created_at: string;
797
+ phone?: string | undefined;
790
798
  phone_number?: string | undefined;
799
+ created_at?: string | undefined;
791
800
  };
792
801
  created_at: string;
793
- payment_type: string;
794
802
  card?: {
795
803
  type?: string | undefined;
796
804
  token?: string | undefined;
@@ -800,9 +808,18 @@ export declare const flutterwaveWebhookSchema: z.ZodObject<{
800
808
  country?: string | undefined;
801
809
  expiry?: string | undefined;
802
810
  } | undefined;
811
+ tx_ref?: string | undefined;
812
+ reference?: string | undefined;
813
+ flw_ref?: string | undefined;
803
814
  device_fingerprint?: string | undefined;
815
+ charged_amount?: number | undefined;
816
+ app_fee?: number | undefined;
817
+ merchant_fee?: number | undefined;
804
818
  processor_response?: string | undefined;
805
819
  auth_model?: string | undefined;
820
+ account_id?: number | undefined;
821
+ payment_type?: string | undefined;
822
+ paid_at?: string | undefined;
806
823
  amount_settled?: number | undefined;
807
824
  };
808
825
  event: string;
@@ -816,7 +833,7 @@ export type CreatePaymentInput = z.infer<typeof createPaymentAttributesSchema>;
816
833
  export type UpdatePaymentInput = z.infer<typeof updatePaymentAttributesSchema>;
817
834
  export type PaymentResponse = z.infer<typeof paymentResponseSchema>;
818
835
  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>;
836
+ export type InitPaymentRequest = z.infer<typeof initPaymentSchema>;
837
+ export type InitPaymentResponse = z.infer<typeof initPaymentResponseSchema>;
838
+ export type WebhookPayload = z.infer<typeof webhookPayloadSchema>;
822
839
  //# sourceMappingURL=payments.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"payments.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/payments.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,mBAAmB,0EAAwE,CAAC;AAGzG,eAAO,MAAM,qBAAqB,2BAAyB,CAAC;AAG5D,eAAO,MAAM,mBAAmB,yEAAuE,CAAC;AAGxG,eAAO,MAAM,oBAAoB,qEAAmE,CAAC;AAGrG,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYV,CAAC;AAG3B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;EAOxC,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAGH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAGF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC/E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAC/E,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACnE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -30,7 +30,7 @@ export const createPaymentAttributesSchema = z.object({
30
30
  amount: z.number().positive(),
31
31
  currency: paymentCurrencySchema.default('NGN'),
32
32
  paymentMethod: paymentMethodSchema.optional(),
33
- gateway: paymentGatewaySchema.default('flutterwave'), // Default to flutterwave for backward compatibility
33
+ gateway: paymentGatewaySchema.default('paystack'), // Default to paystack
34
34
  description: z.string().max(500).optional(),
35
35
  metadata: z.record(z.unknown()).optional(),
36
36
  });
@@ -45,8 +45,8 @@ export const paymentResourceSchema = createJsonApiResourceSchema('payments', pay
45
45
  // Payment response schemas
46
46
  export const paymentResponseSchema = jsonApiSingleResponseSchema(paymentResourceSchema);
47
47
  export const paymentListResponseSchema = jsonApiCollectionResponseSchema(paymentResourceSchema);
48
- // Flutterwave payment initialization request
49
- export const flutterwaveInitPaymentSchema = z.object({
48
+ // Payment initialization request (gateway-agnostic)
49
+ export const initPaymentSchema = z.object({
50
50
  amount: z.number().positive(),
51
51
  currency: paymentCurrencySchema,
52
52
  email: z.string().email(),
@@ -56,8 +56,8 @@ export const flutterwaveInitPaymentSchema = z.object({
56
56
  description: z.string().max(500).optional(),
57
57
  metadata: z.record(z.unknown()).optional(),
58
58
  });
59
- // Flutterwave payment initialization response
60
- export const flutterwaveInitPaymentResponseSchema = z.object({
59
+ // Payment initialization response (gateway-agnostic)
60
+ export const initPaymentResponseSchema = z.object({
61
61
  status: z.literal('success'),
62
62
  message: z.string(),
63
63
  data: z.object({
@@ -65,19 +65,20 @@ export const flutterwaveInitPaymentResponseSchema = z.object({
65
65
  tx_ref: z.string(), // Transaction reference
66
66
  }),
67
67
  });
68
- // Flutterwave webhook payload schema
69
- export const flutterwaveWebhookSchema = z.object({
68
+ // Webhook payload schema (gateway-agnostic)
69
+ export const webhookPayloadSchema = z.object({
70
70
  event: z.string(),
71
71
  data: z.object({
72
72
  id: z.number(),
73
- tx_ref: z.string(),
74
- flw_ref: z.string(),
73
+ tx_ref: z.string().optional(),
74
+ reference: z.string().optional(),
75
+ flw_ref: z.string().optional(),
75
76
  device_fingerprint: z.string().optional(),
76
77
  amount: z.number(),
77
78
  currency: z.string(),
78
- charged_amount: z.number(),
79
- app_fee: z.number(),
80
- merchant_fee: z.number(),
79
+ charged_amount: z.number().optional(),
80
+ app_fee: z.number().optional(),
81
+ merchant_fee: z.number().optional(),
81
82
  processor_response: z.string().optional(),
82
83
  auth_model: z.string().optional(),
83
84
  card: z.object({
@@ -89,17 +90,19 @@ export const flutterwaveWebhookSchema = z.object({
89
90
  token: z.string().optional(),
90
91
  expiry: z.string().optional(),
91
92
  }).optional(),
92
- account_id: z.number(),
93
+ account_id: z.number().optional(),
93
94
  customer: z.object({
94
95
  id: z.number(),
95
96
  name: z.string(),
96
97
  phone_number: z.string().optional(),
98
+ phone: z.string().optional(),
97
99
  email: z.string(),
98
- created_at: z.string(),
100
+ created_at: z.string().optional(),
99
101
  }),
100
102
  status: z.string(),
101
- payment_type: z.string(),
103
+ payment_type: z.string().optional(),
102
104
  created_at: z.string(),
105
+ paid_at: z.string().optional(),
103
106
  amount_settled: z.number().optional(),
104
107
  }),
105
108
  });