@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.
- package/dist/routes/auth.routes.d.ts +7 -0
- package/dist/routes/auth.routes.d.ts.map +1 -1
- package/dist/routes/payments.routes.d.ts +4 -4
- package/dist/routes/payments.routes.js +8 -8
- package/dist/routes/subscriptions.routes.d.ts +1387 -514
- package/dist/routes/subscriptions.routes.d.ts.map +1 -1
- package/dist/routes/subscriptions.routes.js +44 -2
- package/dist/schemas/auth.schemas.d.ts +8 -0
- package/dist/schemas/auth.schemas.d.ts.map +1 -1
- package/dist/schemas/auth.schemas.js +1 -0
- package/dist/schemas/payments.schemas.d.ts +65 -48
- package/dist/schemas/payments.schemas.d.ts.map +1 -1
- package/dist/schemas/payments.schemas.js +18 -15
- package/dist/schemas/subscriptions.schemas.d.ts +77 -29
- package/dist/schemas/subscriptions.schemas.d.ts.map +1 -1
- package/dist/schemas/subscriptions.schemas.js +20 -1
- package/package.json +1 -1
|
@@ -306,7 +306,7 @@ export declare const subscriptionsRouter: {
|
|
|
306
306
|
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
307
307
|
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
308
308
|
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
309
|
-
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "
|
|
309
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
310
310
|
currentPeriodStart: z.ZodString;
|
|
311
311
|
currentPeriodEnd: z.ZodString;
|
|
312
312
|
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -327,7 +327,7 @@ export declare const subscriptionsRouter: {
|
|
|
327
327
|
currentPeriodStart: string;
|
|
328
328
|
currentPeriodEnd: string;
|
|
329
329
|
amount?: number | null | undefined;
|
|
330
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
330
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
331
331
|
cancelledAt?: string | null | undefined;
|
|
332
332
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
333
333
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -343,7 +343,7 @@ export declare const subscriptionsRouter: {
|
|
|
343
343
|
currentPeriodStart: string;
|
|
344
344
|
currentPeriodEnd: string;
|
|
345
345
|
amount?: number | null | undefined;
|
|
346
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
346
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
347
347
|
cancelledAt?: string | null | undefined;
|
|
348
348
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
349
349
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -363,7 +363,7 @@ export declare const subscriptionsRouter: {
|
|
|
363
363
|
currentPeriodStart: string;
|
|
364
364
|
currentPeriodEnd: string;
|
|
365
365
|
amount?: number | null | undefined;
|
|
366
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
366
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
367
367
|
cancelledAt?: string | null | undefined;
|
|
368
368
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
369
369
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -383,7 +383,7 @@ export declare const subscriptionsRouter: {
|
|
|
383
383
|
currentPeriodStart: string;
|
|
384
384
|
currentPeriodEnd: string;
|
|
385
385
|
amount?: number | null | undefined;
|
|
386
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
386
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
387
387
|
cancelledAt?: string | null | undefined;
|
|
388
388
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
389
389
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -429,7 +429,7 @@ export declare const subscriptionsRouter: {
|
|
|
429
429
|
currentPeriodStart: string;
|
|
430
430
|
currentPeriodEnd: string;
|
|
431
431
|
amount?: number | null | undefined;
|
|
432
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
432
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
433
433
|
cancelledAt?: string | null | undefined;
|
|
434
434
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
435
435
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -461,7 +461,7 @@ export declare const subscriptionsRouter: {
|
|
|
461
461
|
currentPeriodStart: string;
|
|
462
462
|
currentPeriodEnd: string;
|
|
463
463
|
amount?: number | null | undefined;
|
|
464
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
464
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
465
465
|
cancelledAt?: string | null | undefined;
|
|
466
466
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
467
467
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -688,7 +688,7 @@ export declare const subscriptionsRouter: {
|
|
|
688
688
|
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
689
689
|
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
690
690
|
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
691
|
-
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "
|
|
691
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
692
692
|
currentPeriodStart: z.ZodString;
|
|
693
693
|
currentPeriodEnd: z.ZodString;
|
|
694
694
|
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -709,7 +709,7 @@ export declare const subscriptionsRouter: {
|
|
|
709
709
|
currentPeriodStart: string;
|
|
710
710
|
currentPeriodEnd: string;
|
|
711
711
|
amount?: number | null | undefined;
|
|
712
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
712
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
713
713
|
cancelledAt?: string | null | undefined;
|
|
714
714
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
715
715
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -725,7 +725,7 @@ export declare const subscriptionsRouter: {
|
|
|
725
725
|
currentPeriodStart: string;
|
|
726
726
|
currentPeriodEnd: string;
|
|
727
727
|
amount?: number | null | undefined;
|
|
728
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
728
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
729
729
|
cancelledAt?: string | null | undefined;
|
|
730
730
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
731
731
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -745,7 +745,7 @@ export declare const subscriptionsRouter: {
|
|
|
745
745
|
currentPeriodStart: string;
|
|
746
746
|
currentPeriodEnd: string;
|
|
747
747
|
amount?: number | null | undefined;
|
|
748
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
748
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
749
749
|
cancelledAt?: string | null | undefined;
|
|
750
750
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
751
751
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -765,7 +765,7 @@ export declare const subscriptionsRouter: {
|
|
|
765
765
|
currentPeriodStart: string;
|
|
766
766
|
currentPeriodEnd: string;
|
|
767
767
|
amount?: number | null | undefined;
|
|
768
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
768
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
769
769
|
cancelledAt?: string | null | undefined;
|
|
770
770
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
771
771
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -811,7 +811,7 @@ export declare const subscriptionsRouter: {
|
|
|
811
811
|
currentPeriodStart: string;
|
|
812
812
|
currentPeriodEnd: string;
|
|
813
813
|
amount?: number | null | undefined;
|
|
814
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
814
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
815
815
|
cancelledAt?: string | null | undefined;
|
|
816
816
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
817
817
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -843,7 +843,7 @@ export declare const subscriptionsRouter: {
|
|
|
843
843
|
currentPeriodStart: string;
|
|
844
844
|
currentPeriodEnd: string;
|
|
845
845
|
amount?: number | null | undefined;
|
|
846
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
846
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
847
847
|
cancelledAt?: string | null | undefined;
|
|
848
848
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
849
849
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1084,7 +1084,7 @@ export declare const subscriptionsRouter: {
|
|
|
1084
1084
|
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
1085
1085
|
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1086
1086
|
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
1087
|
-
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "
|
|
1087
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
1088
1088
|
currentPeriodStart: z.ZodString;
|
|
1089
1089
|
currentPeriodEnd: z.ZodString;
|
|
1090
1090
|
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -1105,7 +1105,7 @@ export declare const subscriptionsRouter: {
|
|
|
1105
1105
|
currentPeriodStart: string;
|
|
1106
1106
|
currentPeriodEnd: string;
|
|
1107
1107
|
amount?: number | null | undefined;
|
|
1108
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1108
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1109
1109
|
cancelledAt?: string | null | undefined;
|
|
1110
1110
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1111
1111
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1121,7 +1121,7 @@ export declare const subscriptionsRouter: {
|
|
|
1121
1121
|
currentPeriodStart: string;
|
|
1122
1122
|
currentPeriodEnd: string;
|
|
1123
1123
|
amount?: number | null | undefined;
|
|
1124
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1124
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1125
1125
|
cancelledAt?: string | null | undefined;
|
|
1126
1126
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1127
1127
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1141,7 +1141,7 @@ export declare const subscriptionsRouter: {
|
|
|
1141
1141
|
currentPeriodStart: string;
|
|
1142
1142
|
currentPeriodEnd: string;
|
|
1143
1143
|
amount?: number | null | undefined;
|
|
1144
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1144
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1145
1145
|
cancelledAt?: string | null | undefined;
|
|
1146
1146
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1147
1147
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1161,7 +1161,7 @@ export declare const subscriptionsRouter: {
|
|
|
1161
1161
|
currentPeriodStart: string;
|
|
1162
1162
|
currentPeriodEnd: string;
|
|
1163
1163
|
amount?: number | null | undefined;
|
|
1164
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1164
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1165
1165
|
cancelledAt?: string | null | undefined;
|
|
1166
1166
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1167
1167
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1207,7 +1207,7 @@ export declare const subscriptionsRouter: {
|
|
|
1207
1207
|
currentPeriodStart: string;
|
|
1208
1208
|
currentPeriodEnd: string;
|
|
1209
1209
|
amount?: number | null | undefined;
|
|
1210
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1210
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1211
1211
|
cancelledAt?: string | null | undefined;
|
|
1212
1212
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1213
1213
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1239,7 +1239,7 @@ export declare const subscriptionsRouter: {
|
|
|
1239
1239
|
currentPeriodStart: string;
|
|
1240
1240
|
currentPeriodEnd: string;
|
|
1241
1241
|
amount?: number | null | undefined;
|
|
1242
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1242
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1243
1243
|
cancelledAt?: string | null | undefined;
|
|
1244
1244
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1245
1245
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -1441,7 +1441,7 @@ export declare const subscriptionsRouter: {
|
|
|
1441
1441
|
}>;
|
|
1442
1442
|
};
|
|
1443
1443
|
};
|
|
1444
|
-
|
|
1444
|
+
createSubscriptionPaymentLink: {
|
|
1445
1445
|
pathParams: z.ZodObject<{
|
|
1446
1446
|
farmId: z.ZodString;
|
|
1447
1447
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1449,53 +1449,38 @@ export declare const subscriptionsRouter: {
|
|
|
1449
1449
|
}, {
|
|
1450
1450
|
farmId: string;
|
|
1451
1451
|
}>;
|
|
1452
|
-
summary: "
|
|
1453
|
-
description: "
|
|
1452
|
+
summary: "Create subscription payment link";
|
|
1453
|
+
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.";
|
|
1454
1454
|
method: "POST";
|
|
1455
1455
|
body: z.ZodObject<{
|
|
1456
1456
|
data: z.ZodObject<{
|
|
1457
1457
|
type: z.ZodLiteral<"subscriptions">;
|
|
1458
1458
|
attributes: z.ZodObject<{
|
|
1459
|
-
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
1460
|
-
|
|
1459
|
+
tier: z.ZodEffects<z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>, "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT", "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT">;
|
|
1460
|
+
billingCycle: z.ZodEffects<z.ZodEnum<["monthly", "annual", "custom"]>, "monthly" | "annual", "custom" | "monthly" | "annual">;
|
|
1461
1461
|
currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
|
|
1462
|
-
billingCycle: z.ZodEnum<["monthly", "annual", "bi_annual", "custom"]>;
|
|
1463
|
-
paymentGateway: z.ZodOptional<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>;
|
|
1464
|
-
gatewaySubscriptionId: z.ZodOptional<z.ZodString>;
|
|
1465
1462
|
}, "strip", z.ZodTypeAny, {
|
|
1466
1463
|
currency: "NGN" | "USD";
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
billingCycle: "custom" | "monthly" | "annual" | "bi_annual";
|
|
1470
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1471
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1464
|
+
tier: "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1465
|
+
billingCycle: "monthly" | "annual";
|
|
1472
1466
|
}, {
|
|
1473
|
-
amount: number;
|
|
1474
1467
|
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1475
|
-
billingCycle: "custom" | "monthly" | "annual"
|
|
1468
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1476
1469
|
currency?: "NGN" | "USD" | undefined;
|
|
1477
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1478
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1479
1470
|
}>;
|
|
1480
1471
|
}, "strip", z.ZodTypeAny, {
|
|
1481
1472
|
type: "subscriptions";
|
|
1482
1473
|
attributes: {
|
|
1483
1474
|
currency: "NGN" | "USD";
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
billingCycle: "custom" | "monthly" | "annual" | "bi_annual";
|
|
1487
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1488
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1475
|
+
tier: "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1476
|
+
billingCycle: "monthly" | "annual";
|
|
1489
1477
|
};
|
|
1490
1478
|
}, {
|
|
1491
1479
|
type: "subscriptions";
|
|
1492
1480
|
attributes: {
|
|
1493
|
-
amount: number;
|
|
1494
1481
|
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1495
|
-
billingCycle: "custom" | "monthly" | "annual"
|
|
1482
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1496
1483
|
currency?: "NGN" | "USD" | undefined;
|
|
1497
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1498
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1499
1484
|
};
|
|
1500
1485
|
}>;
|
|
1501
1486
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1503,211 +1488,54 @@ export declare const subscriptionsRouter: {
|
|
|
1503
1488
|
type: "subscriptions";
|
|
1504
1489
|
attributes: {
|
|
1505
1490
|
currency: "NGN" | "USD";
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
billingCycle: "custom" | "monthly" | "annual" | "bi_annual";
|
|
1509
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1510
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1491
|
+
tier: "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1492
|
+
billingCycle: "monthly" | "annual";
|
|
1511
1493
|
};
|
|
1512
1494
|
};
|
|
1513
1495
|
}, {
|
|
1514
1496
|
data: {
|
|
1515
1497
|
type: "subscriptions";
|
|
1516
1498
|
attributes: {
|
|
1517
|
-
amount: number;
|
|
1518
1499
|
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1519
|
-
billingCycle: "custom" | "monthly" | "annual"
|
|
1500
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1520
1501
|
currency?: "NGN" | "USD" | undefined;
|
|
1521
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1522
|
-
gatewaySubscriptionId?: string | undefined;
|
|
1523
1502
|
};
|
|
1524
1503
|
};
|
|
1525
1504
|
}>;
|
|
1526
|
-
path: "/farms/:farmId/subscriptions/
|
|
1505
|
+
path: "/farms/:farmId/subscriptions/payment-link";
|
|
1527
1506
|
responses: {
|
|
1528
|
-
|
|
1507
|
+
201: z.ZodObject<{
|
|
1508
|
+
status: z.ZodLiteral<"success">;
|
|
1509
|
+
message: z.ZodString;
|
|
1529
1510
|
data: z.ZodObject<{
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
1534
|
-
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
1535
|
-
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1536
|
-
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
1537
|
-
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "bi_annual", "custom"]>>>;
|
|
1538
|
-
currentPeriodStart: z.ZodString;
|
|
1539
|
-
currentPeriodEnd: z.ZodString;
|
|
1540
|
-
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1541
|
-
paymentGateway: z.ZodOptional<z.ZodNullable<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>>;
|
|
1542
|
-
gatewaySubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1543
|
-
maxFields: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1544
|
-
maxAiImagesPerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1545
|
-
satelliteFrequency: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "weekly", "daily"]>>>;
|
|
1546
|
-
} & {
|
|
1547
|
-
createdAt: z.ZodString;
|
|
1548
|
-
updatedAt: z.ZodString;
|
|
1549
|
-
}, "strip", z.ZodTypeAny, {
|
|
1550
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1551
|
-
createdAt: string;
|
|
1552
|
-
updatedAt: string;
|
|
1553
|
-
currency: "NGN" | "USD";
|
|
1554
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1555
|
-
currentPeriodStart: string;
|
|
1556
|
-
currentPeriodEnd: string;
|
|
1557
|
-
amount?: number | null | undefined;
|
|
1558
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1559
|
-
cancelledAt?: string | null | undefined;
|
|
1560
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1561
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1562
|
-
maxFields?: number | null | undefined;
|
|
1563
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1564
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1565
|
-
}, {
|
|
1566
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1567
|
-
createdAt: string;
|
|
1568
|
-
updatedAt: string;
|
|
1569
|
-
currency: "NGN" | "USD";
|
|
1570
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1571
|
-
currentPeriodStart: string;
|
|
1572
|
-
currentPeriodEnd: string;
|
|
1573
|
-
amount?: number | null | undefined;
|
|
1574
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1575
|
-
cancelledAt?: string | null | undefined;
|
|
1576
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1577
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1578
|
-
maxFields?: number | null | undefined;
|
|
1579
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1580
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1581
|
-
}>;
|
|
1511
|
+
paymentId: z.ZodString;
|
|
1512
|
+
link: z.ZodString;
|
|
1513
|
+
tx_ref: z.ZodString;
|
|
1582
1514
|
}, "strip", z.ZodTypeAny, {
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1587
|
-
createdAt: string;
|
|
1588
|
-
updatedAt: string;
|
|
1589
|
-
currency: "NGN" | "USD";
|
|
1590
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1591
|
-
currentPeriodStart: string;
|
|
1592
|
-
currentPeriodEnd: string;
|
|
1593
|
-
amount?: number | null | undefined;
|
|
1594
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1595
|
-
cancelledAt?: string | null | undefined;
|
|
1596
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1597
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1598
|
-
maxFields?: number | null | undefined;
|
|
1599
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1600
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1601
|
-
};
|
|
1515
|
+
link: string;
|
|
1516
|
+
tx_ref: string;
|
|
1517
|
+
paymentId: string;
|
|
1602
1518
|
}, {
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1607
|
-
createdAt: string;
|
|
1608
|
-
updatedAt: string;
|
|
1609
|
-
currency: "NGN" | "USD";
|
|
1610
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1611
|
-
currentPeriodStart: string;
|
|
1612
|
-
currentPeriodEnd: string;
|
|
1613
|
-
amount?: number | null | undefined;
|
|
1614
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1615
|
-
cancelledAt?: string | null | undefined;
|
|
1616
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1617
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1618
|
-
maxFields?: number | null | undefined;
|
|
1619
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1620
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1621
|
-
};
|
|
1519
|
+
link: string;
|
|
1520
|
+
tx_ref: string;
|
|
1521
|
+
paymentId: string;
|
|
1622
1522
|
}>;
|
|
1623
|
-
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1624
|
-
type: z.ZodString;
|
|
1625
|
-
id: z.ZodString;
|
|
1626
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1627
|
-
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1628
|
-
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1629
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1630
|
-
}, "strip", z.ZodTypeAny, {
|
|
1631
|
-
type: string;
|
|
1632
|
-
id: string;
|
|
1633
|
-
attributes?: Record<string, unknown> | undefined;
|
|
1634
|
-
relationships?: Record<string, unknown> | undefined;
|
|
1635
|
-
links?: Record<string, string> | undefined;
|
|
1636
|
-
meta?: Record<string, unknown> | undefined;
|
|
1637
|
-
}, {
|
|
1638
|
-
type: string;
|
|
1639
|
-
id: string;
|
|
1640
|
-
attributes?: Record<string, unknown> | undefined;
|
|
1641
|
-
relationships?: Record<string, unknown> | undefined;
|
|
1642
|
-
links?: Record<string, string> | undefined;
|
|
1643
|
-
meta?: Record<string, unknown> | undefined;
|
|
1644
|
-
}>, "many">>;
|
|
1645
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1646
|
-
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1647
1523
|
}, "strip", z.ZodTypeAny, {
|
|
1524
|
+
status: "success";
|
|
1525
|
+
message: string;
|
|
1648
1526
|
data: {
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1653
|
-
createdAt: string;
|
|
1654
|
-
updatedAt: string;
|
|
1655
|
-
currency: "NGN" | "USD";
|
|
1656
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1657
|
-
currentPeriodStart: string;
|
|
1658
|
-
currentPeriodEnd: string;
|
|
1659
|
-
amount?: number | null | undefined;
|
|
1660
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1661
|
-
cancelledAt?: string | null | undefined;
|
|
1662
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1663
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1664
|
-
maxFields?: number | null | undefined;
|
|
1665
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1666
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1667
|
-
};
|
|
1527
|
+
link: string;
|
|
1528
|
+
tx_ref: string;
|
|
1529
|
+
paymentId: string;
|
|
1668
1530
|
};
|
|
1669
|
-
links?: Record<string, string> | undefined;
|
|
1670
|
-
meta?: Record<string, unknown> | undefined;
|
|
1671
|
-
included?: {
|
|
1672
|
-
type: string;
|
|
1673
|
-
id: string;
|
|
1674
|
-
attributes?: Record<string, unknown> | undefined;
|
|
1675
|
-
relationships?: Record<string, unknown> | undefined;
|
|
1676
|
-
links?: Record<string, string> | undefined;
|
|
1677
|
-
meta?: Record<string, unknown> | undefined;
|
|
1678
|
-
}[] | undefined;
|
|
1679
1531
|
}, {
|
|
1532
|
+
status: "success";
|
|
1533
|
+
message: string;
|
|
1680
1534
|
data: {
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
status: "cancelled" | "active" | "expired" | "trial";
|
|
1685
|
-
createdAt: string;
|
|
1686
|
-
updatedAt: string;
|
|
1687
|
-
currency: "NGN" | "USD";
|
|
1688
|
-
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1689
|
-
currentPeriodStart: string;
|
|
1690
|
-
currentPeriodEnd: string;
|
|
1691
|
-
amount?: number | null | undefined;
|
|
1692
|
-
billingCycle?: "custom" | "monthly" | "annual" | "bi_annual" | null | undefined;
|
|
1693
|
-
cancelledAt?: string | null | undefined;
|
|
1694
|
-
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1695
|
-
gatewaySubscriptionId?: string | null | undefined;
|
|
1696
|
-
maxFields?: number | null | undefined;
|
|
1697
|
-
maxAiImagesPerMonth?: number | null | undefined;
|
|
1698
|
-
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1699
|
-
};
|
|
1535
|
+
link: string;
|
|
1536
|
+
tx_ref: string;
|
|
1537
|
+
paymentId: string;
|
|
1700
1538
|
};
|
|
1701
|
-
links?: Record<string, string> | undefined;
|
|
1702
|
-
meta?: Record<string, unknown> | undefined;
|
|
1703
|
-
included?: {
|
|
1704
|
-
type: string;
|
|
1705
|
-
id: string;
|
|
1706
|
-
attributes?: Record<string, unknown> | undefined;
|
|
1707
|
-
relationships?: Record<string, unknown> | undefined;
|
|
1708
|
-
links?: Record<string, string> | undefined;
|
|
1709
|
-
meta?: Record<string, unknown> | undefined;
|
|
1710
|
-
}[] | undefined;
|
|
1711
1539
|
}>;
|
|
1712
1540
|
400: z.ZodObject<{
|
|
1713
1541
|
errors: z.ZodArray<z.ZodObject<{
|
|
@@ -1981,77 +1809,144 @@ export declare const subscriptionsRouter: {
|
|
|
1981
1809
|
}>;
|
|
1982
1810
|
};
|
|
1983
1811
|
};
|
|
1984
|
-
|
|
1812
|
+
upgradeSubscription: {
|
|
1985
1813
|
pathParams: z.ZodObject<{
|
|
1986
1814
|
farmId: z.ZodString;
|
|
1987
|
-
id: z.ZodString;
|
|
1988
1815
|
}, "strip", z.ZodTypeAny, {
|
|
1989
|
-
id: string;
|
|
1990
1816
|
farmId: string;
|
|
1991
1817
|
}, {
|
|
1992
|
-
id: string;
|
|
1993
1818
|
farmId: string;
|
|
1994
1819
|
}>;
|
|
1995
|
-
summary: "
|
|
1996
|
-
description: "
|
|
1820
|
+
summary: "Upgrade subscription";
|
|
1821
|
+
description: "Upgrade a farm subscription to a new tier (typically called after payment verification)";
|
|
1997
1822
|
method: "POST";
|
|
1998
|
-
body: z.
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
1823
|
+
body: z.ZodObject<{
|
|
1824
|
+
data: z.ZodObject<{
|
|
1825
|
+
type: z.ZodLiteral<"subscriptions">;
|
|
1826
|
+
attributes: z.ZodObject<{
|
|
1827
|
+
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
1828
|
+
amount: z.ZodNumber;
|
|
1829
|
+
currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
|
|
1830
|
+
billingCycle: z.ZodEnum<["monthly", "annual", "custom"]>;
|
|
1831
|
+
paymentGateway: z.ZodOptional<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>;
|
|
1832
|
+
gatewaySubscriptionId: z.ZodOptional<z.ZodString>;
|
|
1833
|
+
}, "strip", z.ZodTypeAny, {
|
|
1834
|
+
currency: "NGN" | "USD";
|
|
1835
|
+
amount: number;
|
|
1836
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1837
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1838
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1839
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1840
|
+
}, {
|
|
1841
|
+
amount: number;
|
|
1842
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1843
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1844
|
+
currency?: "NGN" | "USD" | undefined;
|
|
1845
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1846
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1847
|
+
}>;
|
|
1848
|
+
}, "strip", z.ZodTypeAny, {
|
|
1849
|
+
type: "subscriptions";
|
|
1850
|
+
attributes: {
|
|
1851
|
+
currency: "NGN" | "USD";
|
|
1852
|
+
amount: number;
|
|
1853
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1854
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1855
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1856
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1857
|
+
};
|
|
1858
|
+
}, {
|
|
1859
|
+
type: "subscriptions";
|
|
1860
|
+
attributes: {
|
|
1861
|
+
amount: number;
|
|
1862
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1863
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1864
|
+
currency?: "NGN" | "USD" | undefined;
|
|
1865
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1866
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1867
|
+
};
|
|
1868
|
+
}>;
|
|
1869
|
+
}, "strip", z.ZodTypeAny, {
|
|
1870
|
+
data: {
|
|
1871
|
+
type: "subscriptions";
|
|
1872
|
+
attributes: {
|
|
1873
|
+
currency: "NGN" | "USD";
|
|
1874
|
+
amount: number;
|
|
1875
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1876
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1877
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1878
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
}, {
|
|
1882
|
+
data: {
|
|
1883
|
+
type: "subscriptions";
|
|
1884
|
+
attributes: {
|
|
1885
|
+
amount: number;
|
|
1886
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1887
|
+
billingCycle: "custom" | "monthly" | "annual";
|
|
1888
|
+
currency?: "NGN" | "USD" | undefined;
|
|
1889
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | undefined;
|
|
1890
|
+
gatewaySubscriptionId?: string | undefined;
|
|
1891
|
+
};
|
|
1892
|
+
};
|
|
1893
|
+
}>;
|
|
1894
|
+
path: "/farms/:farmId/subscriptions/upgrade";
|
|
1895
|
+
responses: {
|
|
1896
|
+
200: z.ZodObject<{
|
|
1897
|
+
data: z.ZodObject<{
|
|
1898
|
+
type: z.ZodLiteral<"subscriptions">;
|
|
1899
|
+
id: z.ZodString;
|
|
1900
|
+
attributes: z.ZodObject<{
|
|
1901
|
+
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
1902
|
+
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
1903
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1904
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
1905
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
1906
|
+
currentPeriodStart: z.ZodString;
|
|
1907
|
+
currentPeriodEnd: z.ZodString;
|
|
1908
|
+
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1909
|
+
paymentGateway: z.ZodOptional<z.ZodNullable<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>>;
|
|
1910
|
+
gatewaySubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1911
|
+
maxFields: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1912
|
+
maxAiImagesPerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1913
|
+
satelliteFrequency: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "weekly", "daily"]>>>;
|
|
1914
|
+
} & {
|
|
1915
|
+
createdAt: z.ZodString;
|
|
1916
|
+
updatedAt: z.ZodString;
|
|
1917
|
+
}, "strip", z.ZodTypeAny, {
|
|
1918
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
1919
|
+
createdAt: string;
|
|
1920
|
+
updatedAt: string;
|
|
1921
|
+
currency: "NGN" | "USD";
|
|
1922
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1923
|
+
currentPeriodStart: string;
|
|
1924
|
+
currentPeriodEnd: string;
|
|
1925
|
+
amount?: number | null | undefined;
|
|
1926
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1927
|
+
cancelledAt?: string | null | undefined;
|
|
1928
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1929
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
1930
|
+
maxFields?: number | null | undefined;
|
|
1931
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
1932
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1933
|
+
}, {
|
|
1934
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
1935
|
+
createdAt: string;
|
|
1936
|
+
updatedAt: string;
|
|
1937
|
+
currency: "NGN" | "USD";
|
|
1938
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
1939
|
+
currentPeriodStart: string;
|
|
1940
|
+
currentPeriodEnd: string;
|
|
1941
|
+
amount?: number | null | undefined;
|
|
1942
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
1943
|
+
cancelledAt?: string | null | undefined;
|
|
1944
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
1945
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
1946
|
+
maxFields?: number | null | undefined;
|
|
1947
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
1948
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
1949
|
+
}>;
|
|
2055
1950
|
}, "strip", z.ZodTypeAny, {
|
|
2056
1951
|
type: "subscriptions";
|
|
2057
1952
|
id: string;
|
|
@@ -2064,7 +1959,7 @@ export declare const subscriptionsRouter: {
|
|
|
2064
1959
|
currentPeriodStart: string;
|
|
2065
1960
|
currentPeriodEnd: string;
|
|
2066
1961
|
amount?: number | null | undefined;
|
|
2067
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1962
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2068
1963
|
cancelledAt?: string | null | undefined;
|
|
2069
1964
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2070
1965
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -2084,7 +1979,7 @@ export declare const subscriptionsRouter: {
|
|
|
2084
1979
|
currentPeriodStart: string;
|
|
2085
1980
|
currentPeriodEnd: string;
|
|
2086
1981
|
amount?: number | null | undefined;
|
|
2087
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
1982
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2088
1983
|
cancelledAt?: string | null | undefined;
|
|
2089
1984
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2090
1985
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -2130,7 +2025,7 @@ export declare const subscriptionsRouter: {
|
|
|
2130
2025
|
currentPeriodStart: string;
|
|
2131
2026
|
currentPeriodEnd: string;
|
|
2132
2027
|
amount?: number | null | undefined;
|
|
2133
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
2028
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2134
2029
|
cancelledAt?: string | null | undefined;
|
|
2135
2030
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2136
2031
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -2162,7 +2057,7 @@ export declare const subscriptionsRouter: {
|
|
|
2162
2057
|
currentPeriodStart: string;
|
|
2163
2058
|
currentPeriodEnd: string;
|
|
2164
2059
|
amount?: number | null | undefined;
|
|
2165
|
-
billingCycle?: "custom" | "monthly" | "annual" |
|
|
2060
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2166
2061
|
cancelledAt?: string | null | undefined;
|
|
2167
2062
|
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2168
2063
|
gatewaySubscriptionId?: string | null | undefined;
|
|
@@ -2182,97 +2077,7 @@ export declare const subscriptionsRouter: {
|
|
|
2182
2077
|
meta?: Record<string, unknown> | undefined;
|
|
2183
2078
|
}[] | undefined;
|
|
2184
2079
|
}>;
|
|
2185
|
-
|
|
2186
|
-
errors: z.ZodArray<z.ZodObject<{
|
|
2187
|
-
id: z.ZodOptional<z.ZodString>;
|
|
2188
|
-
links: z.ZodOptional<z.ZodObject<{
|
|
2189
|
-
about: z.ZodOptional<z.ZodString>;
|
|
2190
|
-
}, "strip", z.ZodTypeAny, {
|
|
2191
|
-
about?: string | undefined;
|
|
2192
|
-
}, {
|
|
2193
|
-
about?: string | undefined;
|
|
2194
|
-
}>>;
|
|
2195
|
-
status: z.ZodOptional<z.ZodString>;
|
|
2196
|
-
code: z.ZodOptional<z.ZodString>;
|
|
2197
|
-
title: z.ZodOptional<z.ZodString>;
|
|
2198
|
-
detail: z.ZodOptional<z.ZodString>;
|
|
2199
|
-
source: z.ZodOptional<z.ZodObject<{
|
|
2200
|
-
pointer: z.ZodOptional<z.ZodString>;
|
|
2201
|
-
parameter: z.ZodOptional<z.ZodString>;
|
|
2202
|
-
}, "strip", z.ZodTypeAny, {
|
|
2203
|
-
pointer?: string | undefined;
|
|
2204
|
-
parameter?: string | undefined;
|
|
2205
|
-
}, {
|
|
2206
|
-
pointer?: string | undefined;
|
|
2207
|
-
parameter?: string | undefined;
|
|
2208
|
-
}>>;
|
|
2209
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2210
|
-
}, "strip", z.ZodTypeAny, {
|
|
2211
|
-
status?: string | undefined;
|
|
2212
|
-
code?: string | undefined;
|
|
2213
|
-
id?: string | undefined;
|
|
2214
|
-
links?: {
|
|
2215
|
-
about?: string | undefined;
|
|
2216
|
-
} | undefined;
|
|
2217
|
-
meta?: Record<string, unknown> | undefined;
|
|
2218
|
-
title?: string | undefined;
|
|
2219
|
-
detail?: string | undefined;
|
|
2220
|
-
source?: {
|
|
2221
|
-
pointer?: string | undefined;
|
|
2222
|
-
parameter?: string | undefined;
|
|
2223
|
-
} | undefined;
|
|
2224
|
-
}, {
|
|
2225
|
-
status?: string | undefined;
|
|
2226
|
-
code?: string | undefined;
|
|
2227
|
-
id?: string | undefined;
|
|
2228
|
-
links?: {
|
|
2229
|
-
about?: string | undefined;
|
|
2230
|
-
} | undefined;
|
|
2231
|
-
meta?: Record<string, unknown> | undefined;
|
|
2232
|
-
title?: string | undefined;
|
|
2233
|
-
detail?: string | undefined;
|
|
2234
|
-
source?: {
|
|
2235
|
-
pointer?: string | undefined;
|
|
2236
|
-
parameter?: string | undefined;
|
|
2237
|
-
} | undefined;
|
|
2238
|
-
}>, "many">;
|
|
2239
|
-
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
2240
|
-
}, "strip", z.ZodTypeAny, {
|
|
2241
|
-
errors: {
|
|
2242
|
-
status?: string | undefined;
|
|
2243
|
-
code?: string | undefined;
|
|
2244
|
-
id?: string | undefined;
|
|
2245
|
-
links?: {
|
|
2246
|
-
about?: string | undefined;
|
|
2247
|
-
} | undefined;
|
|
2248
|
-
meta?: Record<string, unknown> | undefined;
|
|
2249
|
-
title?: string | undefined;
|
|
2250
|
-
detail?: string | undefined;
|
|
2251
|
-
source?: {
|
|
2252
|
-
pointer?: string | undefined;
|
|
2253
|
-
parameter?: string | undefined;
|
|
2254
|
-
} | undefined;
|
|
2255
|
-
}[];
|
|
2256
|
-
meta?: Record<string, unknown> | undefined;
|
|
2257
|
-
}, {
|
|
2258
|
-
errors: {
|
|
2259
|
-
status?: string | undefined;
|
|
2260
|
-
code?: string | undefined;
|
|
2261
|
-
id?: string | undefined;
|
|
2262
|
-
links?: {
|
|
2263
|
-
about?: string | undefined;
|
|
2264
|
-
} | undefined;
|
|
2265
|
-
meta?: Record<string, unknown> | undefined;
|
|
2266
|
-
title?: string | undefined;
|
|
2267
|
-
detail?: string | undefined;
|
|
2268
|
-
source?: {
|
|
2269
|
-
pointer?: string | undefined;
|
|
2270
|
-
parameter?: string | undefined;
|
|
2271
|
-
} | undefined;
|
|
2272
|
-
}[];
|
|
2273
|
-
meta?: Record<string, unknown> | undefined;
|
|
2274
|
-
}>;
|
|
2275
|
-
401: z.ZodObject<{
|
|
2080
|
+
400: z.ZodObject<{
|
|
2276
2081
|
errors: z.ZodArray<z.ZodObject<{
|
|
2277
2082
|
id: z.ZodOptional<z.ZodString>;
|
|
2278
2083
|
links: z.ZodOptional<z.ZodObject<{
|
|
@@ -2362,48 +2167,6 @@ export declare const subscriptionsRouter: {
|
|
|
2362
2167
|
}[];
|
|
2363
2168
|
meta?: Record<string, unknown> | undefined;
|
|
2364
2169
|
}>;
|
|
2365
|
-
};
|
|
2366
|
-
};
|
|
2367
|
-
getTierLimits: {
|
|
2368
|
-
pathParams: z.ZodObject<{
|
|
2369
|
-
farmId: z.ZodString;
|
|
2370
|
-
}, "strip", z.ZodTypeAny, {
|
|
2371
|
-
farmId: string;
|
|
2372
|
-
}, {
|
|
2373
|
-
farmId: string;
|
|
2374
|
-
}>;
|
|
2375
|
-
summary: "Get tier limits";
|
|
2376
|
-
description: "Get the limits for the current subscription tier";
|
|
2377
|
-
method: "GET";
|
|
2378
|
-
path: "/farms/:farmId/subscription/limits";
|
|
2379
|
-
responses: {
|
|
2380
|
-
200: z.ZodObject<{
|
|
2381
|
-
data: z.ZodObject<{
|
|
2382
|
-
maxFields: z.ZodNullable<z.ZodNumber>;
|
|
2383
|
-
maxAiImagesPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
2384
|
-
satelliteFrequency: z.ZodEnum<["monthly", "weekly", "daily"]>;
|
|
2385
|
-
}, "strip", z.ZodTypeAny, {
|
|
2386
|
-
maxFields: number | null;
|
|
2387
|
-
maxAiImagesPerMonth: number | null;
|
|
2388
|
-
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2389
|
-
}, {
|
|
2390
|
-
maxFields: number | null;
|
|
2391
|
-
maxAiImagesPerMonth: number | null;
|
|
2392
|
-
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2393
|
-
}>;
|
|
2394
|
-
}, "strip", z.ZodTypeAny, {
|
|
2395
|
-
data: {
|
|
2396
|
-
maxFields: number | null;
|
|
2397
|
-
maxAiImagesPerMonth: number | null;
|
|
2398
|
-
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2399
|
-
};
|
|
2400
|
-
}, {
|
|
2401
|
-
data: {
|
|
2402
|
-
maxFields: number | null;
|
|
2403
|
-
maxAiImagesPerMonth: number | null;
|
|
2404
|
-
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2405
|
-
};
|
|
2406
|
-
}>;
|
|
2407
2170
|
404: z.ZodObject<{
|
|
2408
2171
|
errors: z.ZodArray<z.ZodObject<{
|
|
2409
2172
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -2586,79 +2349,118 @@ export declare const subscriptionsRouter: {
|
|
|
2586
2349
|
}>;
|
|
2587
2350
|
};
|
|
2588
2351
|
};
|
|
2589
|
-
|
|
2352
|
+
cancelSubscription: {
|
|
2590
2353
|
pathParams: z.ZodObject<{
|
|
2591
2354
|
farmId: z.ZodString;
|
|
2355
|
+
id: z.ZodString;
|
|
2592
2356
|
}, "strip", z.ZodTypeAny, {
|
|
2357
|
+
id: string;
|
|
2593
2358
|
farmId: string;
|
|
2594
2359
|
}, {
|
|
2360
|
+
id: string;
|
|
2595
2361
|
farmId: string;
|
|
2596
2362
|
}>;
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
}, "strip", z.ZodTypeAny, {
|
|
2601
|
-
|
|
2602
|
-
'filter[periodStart]'?: string | undefined;
|
|
2603
|
-
}, {
|
|
2604
|
-
'filter[resourceType]'?: string | undefined;
|
|
2605
|
-
'filter[periodStart]'?: string | undefined;
|
|
2606
|
-
}>;
|
|
2607
|
-
summary: "Get usage tracking";
|
|
2608
|
-
description: "Get usage tracking data for the current subscription period";
|
|
2609
|
-
method: "GET";
|
|
2610
|
-
path: "/farms/:farmId/subscription/usage";
|
|
2363
|
+
summary: "Cancel subscription";
|
|
2364
|
+
description: "Cancel an active subscription";
|
|
2365
|
+
method: "POST";
|
|
2366
|
+
body: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>;
|
|
2367
|
+
path: "/farms/:farmId/subscriptions/:id/cancel";
|
|
2611
2368
|
responses: {
|
|
2612
2369
|
200: z.ZodObject<{
|
|
2613
|
-
data: z.
|
|
2614
|
-
type: z.ZodLiteral<"
|
|
2370
|
+
data: z.ZodObject<{
|
|
2371
|
+
type: z.ZodLiteral<"subscriptions">;
|
|
2615
2372
|
id: z.ZodString;
|
|
2616
2373
|
attributes: z.ZodObject<{
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2374
|
+
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
2375
|
+
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
2376
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2377
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
2378
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
2379
|
+
currentPeriodStart: z.ZodString;
|
|
2380
|
+
currentPeriodEnd: z.ZodString;
|
|
2381
|
+
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2382
|
+
paymentGateway: z.ZodOptional<z.ZodNullable<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>>;
|
|
2383
|
+
gatewaySubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
2384
|
+
maxFields: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2385
|
+
maxAiImagesPerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2386
|
+
satelliteFrequency: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "weekly", "daily"]>>>;
|
|
2621
2387
|
} & {
|
|
2622
2388
|
createdAt: z.ZodString;
|
|
2623
2389
|
updatedAt: z.ZodString;
|
|
2624
2390
|
}, "strip", z.ZodTypeAny, {
|
|
2391
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2625
2392
|
createdAt: string;
|
|
2626
2393
|
updatedAt: string;
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2394
|
+
currency: "NGN" | "USD";
|
|
2395
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2396
|
+
currentPeriodStart: string;
|
|
2397
|
+
currentPeriodEnd: string;
|
|
2398
|
+
amount?: number | null | undefined;
|
|
2399
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2400
|
+
cancelledAt?: string | null | undefined;
|
|
2401
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2402
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2403
|
+
maxFields?: number | null | undefined;
|
|
2404
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2405
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2631
2406
|
}, {
|
|
2407
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2632
2408
|
createdAt: string;
|
|
2633
2409
|
updatedAt: string;
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2410
|
+
currency: "NGN" | "USD";
|
|
2411
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2412
|
+
currentPeriodStart: string;
|
|
2413
|
+
currentPeriodEnd: string;
|
|
2414
|
+
amount?: number | null | undefined;
|
|
2415
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2416
|
+
cancelledAt?: string | null | undefined;
|
|
2417
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2418
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2419
|
+
maxFields?: number | null | undefined;
|
|
2420
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2421
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2638
2422
|
}>;
|
|
2639
2423
|
}, "strip", z.ZodTypeAny, {
|
|
2640
|
-
type: "
|
|
2424
|
+
type: "subscriptions";
|
|
2641
2425
|
id: string;
|
|
2642
2426
|
attributes: {
|
|
2427
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2643
2428
|
createdAt: string;
|
|
2644
2429
|
updatedAt: string;
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2430
|
+
currency: "NGN" | "USD";
|
|
2431
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2432
|
+
currentPeriodStart: string;
|
|
2433
|
+
currentPeriodEnd: string;
|
|
2434
|
+
amount?: number | null | undefined;
|
|
2435
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2436
|
+
cancelledAt?: string | null | undefined;
|
|
2437
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2438
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2439
|
+
maxFields?: number | null | undefined;
|
|
2440
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2441
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2649
2442
|
};
|
|
2650
2443
|
}, {
|
|
2651
|
-
type: "
|
|
2444
|
+
type: "subscriptions";
|
|
2652
2445
|
id: string;
|
|
2653
2446
|
attributes: {
|
|
2447
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2654
2448
|
createdAt: string;
|
|
2655
2449
|
updatedAt: string;
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2450
|
+
currency: "NGN" | "USD";
|
|
2451
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2452
|
+
currentPeriodStart: string;
|
|
2453
|
+
currentPeriodEnd: string;
|
|
2454
|
+
amount?: number | null | undefined;
|
|
2455
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2456
|
+
cancelledAt?: string | null | undefined;
|
|
2457
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2458
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2459
|
+
maxFields?: number | null | undefined;
|
|
2460
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2461
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2660
2462
|
};
|
|
2661
|
-
}
|
|
2463
|
+
}>;
|
|
2662
2464
|
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2663
2465
|
type: z.ZodString;
|
|
2664
2466
|
id: z.ZodString;
|
|
@@ -2685,17 +2487,26 @@ export declare const subscriptionsRouter: {
|
|
|
2685
2487
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2686
2488
|
}, "strip", z.ZodTypeAny, {
|
|
2687
2489
|
data: {
|
|
2688
|
-
type: "
|
|
2490
|
+
type: "subscriptions";
|
|
2689
2491
|
id: string;
|
|
2690
2492
|
attributes: {
|
|
2493
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2691
2494
|
createdAt: string;
|
|
2692
2495
|
updatedAt: string;
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2496
|
+
currency: "NGN" | "USD";
|
|
2497
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2498
|
+
currentPeriodStart: string;
|
|
2499
|
+
currentPeriodEnd: string;
|
|
2500
|
+
amount?: number | null | undefined;
|
|
2501
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2502
|
+
cancelledAt?: string | null | undefined;
|
|
2503
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2504
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2505
|
+
maxFields?: number | null | undefined;
|
|
2506
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2507
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2697
2508
|
};
|
|
2698
|
-
}
|
|
2509
|
+
};
|
|
2699
2510
|
links?: Record<string, string> | undefined;
|
|
2700
2511
|
meta?: Record<string, unknown> | undefined;
|
|
2701
2512
|
included?: {
|
|
@@ -2708,17 +2519,26 @@ export declare const subscriptionsRouter: {
|
|
|
2708
2519
|
}[] | undefined;
|
|
2709
2520
|
}, {
|
|
2710
2521
|
data: {
|
|
2711
|
-
type: "
|
|
2522
|
+
type: "subscriptions";
|
|
2712
2523
|
id: string;
|
|
2713
2524
|
attributes: {
|
|
2525
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
2714
2526
|
createdAt: string;
|
|
2715
2527
|
updatedAt: string;
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2528
|
+
currency: "NGN" | "USD";
|
|
2529
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
2530
|
+
currentPeriodStart: string;
|
|
2531
|
+
currentPeriodEnd: string;
|
|
2532
|
+
amount?: number | null | undefined;
|
|
2533
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
2534
|
+
cancelledAt?: string | null | undefined;
|
|
2535
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
2536
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
2537
|
+
maxFields?: number | null | undefined;
|
|
2538
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
2539
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
2720
2540
|
};
|
|
2721
|
-
}
|
|
2541
|
+
};
|
|
2722
2542
|
links?: Record<string, string> | undefined;
|
|
2723
2543
|
meta?: Record<string, unknown> | undefined;
|
|
2724
2544
|
included?: {
|
|
@@ -2912,57 +2732,44 @@ export declare const subscriptionsRouter: {
|
|
|
2912
2732
|
}>;
|
|
2913
2733
|
};
|
|
2914
2734
|
};
|
|
2915
|
-
|
|
2735
|
+
getTierLimits: {
|
|
2916
2736
|
pathParams: z.ZodObject<{
|
|
2917
2737
|
farmId: z.ZodString;
|
|
2918
|
-
resourceType: z.ZodString;
|
|
2919
2738
|
}, "strip", z.ZodTypeAny, {
|
|
2920
2739
|
farmId: string;
|
|
2921
|
-
resourceType: string;
|
|
2922
2740
|
}, {
|
|
2923
2741
|
farmId: string;
|
|
2924
|
-
resourceType: string;
|
|
2925
2742
|
}>;
|
|
2926
|
-
summary: "Get
|
|
2927
|
-
description: "Get
|
|
2743
|
+
summary: "Get tier limits";
|
|
2744
|
+
description: "Get the limits for the current subscription tier";
|
|
2928
2745
|
method: "GET";
|
|
2929
|
-
path: "/farms/:farmId/subscription/
|
|
2746
|
+
path: "/farms/:farmId/subscription/limits";
|
|
2930
2747
|
responses: {
|
|
2931
2748
|
200: z.ZodObject<{
|
|
2932
2749
|
data: z.ZodObject<{
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
periodStart: z.ZodString;
|
|
2937
|
-
periodEnd: z.ZodString;
|
|
2750
|
+
maxFields: z.ZodNullable<z.ZodNumber>;
|
|
2751
|
+
maxAiImagesPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
2752
|
+
satelliteFrequency: z.ZodEnum<["monthly", "weekly", "daily"]>;
|
|
2938
2753
|
}, "strip", z.ZodTypeAny, {
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
periodStart: string;
|
|
2943
|
-
periodEnd: string;
|
|
2754
|
+
maxFields: number | null;
|
|
2755
|
+
maxAiImagesPerMonth: number | null;
|
|
2756
|
+
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2944
2757
|
}, {
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
periodStart: string;
|
|
2949
|
-
periodEnd: string;
|
|
2758
|
+
maxFields: number | null;
|
|
2759
|
+
maxAiImagesPerMonth: number | null;
|
|
2760
|
+
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2950
2761
|
}>;
|
|
2951
2762
|
}, "strip", z.ZodTypeAny, {
|
|
2952
2763
|
data: {
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
periodStart: string;
|
|
2957
|
-
periodEnd: string;
|
|
2764
|
+
maxFields: number | null;
|
|
2765
|
+
maxAiImagesPerMonth: number | null;
|
|
2766
|
+
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2958
2767
|
};
|
|
2959
2768
|
}, {
|
|
2960
2769
|
data: {
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
periodStart: string;
|
|
2965
|
-
periodEnd: string;
|
|
2770
|
+
maxFields: number | null;
|
|
2771
|
+
maxAiImagesPerMonth: number | null;
|
|
2772
|
+
satelliteFrequency: "monthly" | "daily" | "weekly";
|
|
2966
2773
|
};
|
|
2967
2774
|
}>;
|
|
2968
2775
|
404: z.ZodObject<{
|
|
@@ -3147,5 +2954,1071 @@ export declare const subscriptionsRouter: {
|
|
|
3147
2954
|
}>;
|
|
3148
2955
|
};
|
|
3149
2956
|
};
|
|
2957
|
+
getUsageTracking: {
|
|
2958
|
+
pathParams: z.ZodObject<{
|
|
2959
|
+
farmId: z.ZodString;
|
|
2960
|
+
}, "strip", z.ZodTypeAny, {
|
|
2961
|
+
farmId: string;
|
|
2962
|
+
}, {
|
|
2963
|
+
farmId: string;
|
|
2964
|
+
}>;
|
|
2965
|
+
query: z.ZodObject<{
|
|
2966
|
+
'filter[resourceType]': z.ZodOptional<z.ZodString>;
|
|
2967
|
+
'filter[periodStart]': z.ZodOptional<z.ZodString>;
|
|
2968
|
+
}, "strip", z.ZodTypeAny, {
|
|
2969
|
+
'filter[resourceType]'?: string | undefined;
|
|
2970
|
+
'filter[periodStart]'?: string | undefined;
|
|
2971
|
+
}, {
|
|
2972
|
+
'filter[resourceType]'?: string | undefined;
|
|
2973
|
+
'filter[periodStart]'?: string | undefined;
|
|
2974
|
+
}>;
|
|
2975
|
+
summary: "Get usage tracking";
|
|
2976
|
+
description: "Get usage tracking data for the current subscription period";
|
|
2977
|
+
method: "GET";
|
|
2978
|
+
path: "/farms/:farmId/subscription/usage";
|
|
2979
|
+
responses: {
|
|
2980
|
+
200: z.ZodObject<{
|
|
2981
|
+
data: z.ZodArray<z.ZodObject<{
|
|
2982
|
+
type: z.ZodLiteral<"usage-tracking">;
|
|
2983
|
+
id: z.ZodString;
|
|
2984
|
+
attributes: z.ZodObject<{
|
|
2985
|
+
resourceType: z.ZodString;
|
|
2986
|
+
count: z.ZodNumber;
|
|
2987
|
+
periodStart: z.ZodString;
|
|
2988
|
+
periodEnd: z.ZodString;
|
|
2989
|
+
} & {
|
|
2990
|
+
createdAt: z.ZodString;
|
|
2991
|
+
updatedAt: z.ZodString;
|
|
2992
|
+
}, "strip", z.ZodTypeAny, {
|
|
2993
|
+
createdAt: string;
|
|
2994
|
+
updatedAt: string;
|
|
2995
|
+
count: number;
|
|
2996
|
+
resourceType: string;
|
|
2997
|
+
periodStart: string;
|
|
2998
|
+
periodEnd: string;
|
|
2999
|
+
}, {
|
|
3000
|
+
createdAt: string;
|
|
3001
|
+
updatedAt: string;
|
|
3002
|
+
count: number;
|
|
3003
|
+
resourceType: string;
|
|
3004
|
+
periodStart: string;
|
|
3005
|
+
periodEnd: string;
|
|
3006
|
+
}>;
|
|
3007
|
+
}, "strip", z.ZodTypeAny, {
|
|
3008
|
+
type: "usage-tracking";
|
|
3009
|
+
id: string;
|
|
3010
|
+
attributes: {
|
|
3011
|
+
createdAt: string;
|
|
3012
|
+
updatedAt: string;
|
|
3013
|
+
count: number;
|
|
3014
|
+
resourceType: string;
|
|
3015
|
+
periodStart: string;
|
|
3016
|
+
periodEnd: string;
|
|
3017
|
+
};
|
|
3018
|
+
}, {
|
|
3019
|
+
type: "usage-tracking";
|
|
3020
|
+
id: string;
|
|
3021
|
+
attributes: {
|
|
3022
|
+
createdAt: string;
|
|
3023
|
+
updatedAt: string;
|
|
3024
|
+
count: number;
|
|
3025
|
+
resourceType: string;
|
|
3026
|
+
periodStart: string;
|
|
3027
|
+
periodEnd: string;
|
|
3028
|
+
};
|
|
3029
|
+
}>, "many">;
|
|
3030
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3031
|
+
type: z.ZodString;
|
|
3032
|
+
id: z.ZodString;
|
|
3033
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3034
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3035
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3036
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3037
|
+
}, "strip", z.ZodTypeAny, {
|
|
3038
|
+
type: string;
|
|
3039
|
+
id: string;
|
|
3040
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3041
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3042
|
+
links?: Record<string, string> | undefined;
|
|
3043
|
+
meta?: Record<string, unknown> | undefined;
|
|
3044
|
+
}, {
|
|
3045
|
+
type: string;
|
|
3046
|
+
id: string;
|
|
3047
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3048
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3049
|
+
links?: Record<string, string> | undefined;
|
|
3050
|
+
meta?: Record<string, unknown> | undefined;
|
|
3051
|
+
}>, "many">>;
|
|
3052
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3053
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3054
|
+
}, "strip", z.ZodTypeAny, {
|
|
3055
|
+
data: {
|
|
3056
|
+
type: "usage-tracking";
|
|
3057
|
+
id: string;
|
|
3058
|
+
attributes: {
|
|
3059
|
+
createdAt: string;
|
|
3060
|
+
updatedAt: string;
|
|
3061
|
+
count: number;
|
|
3062
|
+
resourceType: string;
|
|
3063
|
+
periodStart: string;
|
|
3064
|
+
periodEnd: string;
|
|
3065
|
+
};
|
|
3066
|
+
}[];
|
|
3067
|
+
links?: Record<string, string> | undefined;
|
|
3068
|
+
meta?: Record<string, unknown> | undefined;
|
|
3069
|
+
included?: {
|
|
3070
|
+
type: string;
|
|
3071
|
+
id: string;
|
|
3072
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3073
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3074
|
+
links?: Record<string, string> | undefined;
|
|
3075
|
+
meta?: Record<string, unknown> | undefined;
|
|
3076
|
+
}[] | undefined;
|
|
3077
|
+
}, {
|
|
3078
|
+
data: {
|
|
3079
|
+
type: "usage-tracking";
|
|
3080
|
+
id: string;
|
|
3081
|
+
attributes: {
|
|
3082
|
+
createdAt: string;
|
|
3083
|
+
updatedAt: string;
|
|
3084
|
+
count: number;
|
|
3085
|
+
resourceType: string;
|
|
3086
|
+
periodStart: string;
|
|
3087
|
+
periodEnd: string;
|
|
3088
|
+
};
|
|
3089
|
+
}[];
|
|
3090
|
+
links?: Record<string, string> | undefined;
|
|
3091
|
+
meta?: Record<string, unknown> | undefined;
|
|
3092
|
+
included?: {
|
|
3093
|
+
type: string;
|
|
3094
|
+
id: string;
|
|
3095
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3096
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3097
|
+
links?: Record<string, string> | undefined;
|
|
3098
|
+
meta?: Record<string, unknown> | undefined;
|
|
3099
|
+
}[] | undefined;
|
|
3100
|
+
}>;
|
|
3101
|
+
404: z.ZodObject<{
|
|
3102
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3103
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3104
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3105
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3106
|
+
}, "strip", z.ZodTypeAny, {
|
|
3107
|
+
about?: string | undefined;
|
|
3108
|
+
}, {
|
|
3109
|
+
about?: string | undefined;
|
|
3110
|
+
}>>;
|
|
3111
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3112
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3113
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3114
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3115
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3116
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3117
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3118
|
+
}, "strip", z.ZodTypeAny, {
|
|
3119
|
+
pointer?: string | undefined;
|
|
3120
|
+
parameter?: string | undefined;
|
|
3121
|
+
}, {
|
|
3122
|
+
pointer?: string | undefined;
|
|
3123
|
+
parameter?: string | undefined;
|
|
3124
|
+
}>>;
|
|
3125
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3126
|
+
}, "strip", z.ZodTypeAny, {
|
|
3127
|
+
status?: string | undefined;
|
|
3128
|
+
code?: string | undefined;
|
|
3129
|
+
id?: string | undefined;
|
|
3130
|
+
links?: {
|
|
3131
|
+
about?: string | undefined;
|
|
3132
|
+
} | undefined;
|
|
3133
|
+
meta?: Record<string, unknown> | undefined;
|
|
3134
|
+
title?: string | undefined;
|
|
3135
|
+
detail?: string | undefined;
|
|
3136
|
+
source?: {
|
|
3137
|
+
pointer?: string | undefined;
|
|
3138
|
+
parameter?: string | undefined;
|
|
3139
|
+
} | undefined;
|
|
3140
|
+
}, {
|
|
3141
|
+
status?: string | undefined;
|
|
3142
|
+
code?: string | undefined;
|
|
3143
|
+
id?: string | undefined;
|
|
3144
|
+
links?: {
|
|
3145
|
+
about?: string | undefined;
|
|
3146
|
+
} | undefined;
|
|
3147
|
+
meta?: Record<string, unknown> | undefined;
|
|
3148
|
+
title?: string | undefined;
|
|
3149
|
+
detail?: string | undefined;
|
|
3150
|
+
source?: {
|
|
3151
|
+
pointer?: string | undefined;
|
|
3152
|
+
parameter?: string | undefined;
|
|
3153
|
+
} | undefined;
|
|
3154
|
+
}>, "many">;
|
|
3155
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3156
|
+
}, "strip", z.ZodTypeAny, {
|
|
3157
|
+
errors: {
|
|
3158
|
+
status?: string | undefined;
|
|
3159
|
+
code?: string | undefined;
|
|
3160
|
+
id?: string | undefined;
|
|
3161
|
+
links?: {
|
|
3162
|
+
about?: string | undefined;
|
|
3163
|
+
} | undefined;
|
|
3164
|
+
meta?: Record<string, unknown> | undefined;
|
|
3165
|
+
title?: string | undefined;
|
|
3166
|
+
detail?: string | undefined;
|
|
3167
|
+
source?: {
|
|
3168
|
+
pointer?: string | undefined;
|
|
3169
|
+
parameter?: string | undefined;
|
|
3170
|
+
} | undefined;
|
|
3171
|
+
}[];
|
|
3172
|
+
meta?: Record<string, unknown> | undefined;
|
|
3173
|
+
}, {
|
|
3174
|
+
errors: {
|
|
3175
|
+
status?: string | undefined;
|
|
3176
|
+
code?: string | undefined;
|
|
3177
|
+
id?: string | undefined;
|
|
3178
|
+
links?: {
|
|
3179
|
+
about?: string | undefined;
|
|
3180
|
+
} | undefined;
|
|
3181
|
+
meta?: Record<string, unknown> | undefined;
|
|
3182
|
+
title?: string | undefined;
|
|
3183
|
+
detail?: string | undefined;
|
|
3184
|
+
source?: {
|
|
3185
|
+
pointer?: string | undefined;
|
|
3186
|
+
parameter?: string | undefined;
|
|
3187
|
+
} | undefined;
|
|
3188
|
+
}[];
|
|
3189
|
+
meta?: Record<string, unknown> | undefined;
|
|
3190
|
+
}>;
|
|
3191
|
+
401: z.ZodObject<{
|
|
3192
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3193
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3194
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3195
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3196
|
+
}, "strip", z.ZodTypeAny, {
|
|
3197
|
+
about?: string | undefined;
|
|
3198
|
+
}, {
|
|
3199
|
+
about?: string | undefined;
|
|
3200
|
+
}>>;
|
|
3201
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3202
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3203
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3204
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3205
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3206
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3207
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3208
|
+
}, "strip", z.ZodTypeAny, {
|
|
3209
|
+
pointer?: string | undefined;
|
|
3210
|
+
parameter?: string | undefined;
|
|
3211
|
+
}, {
|
|
3212
|
+
pointer?: string | undefined;
|
|
3213
|
+
parameter?: string | undefined;
|
|
3214
|
+
}>>;
|
|
3215
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3216
|
+
}, "strip", z.ZodTypeAny, {
|
|
3217
|
+
status?: string | undefined;
|
|
3218
|
+
code?: string | undefined;
|
|
3219
|
+
id?: string | undefined;
|
|
3220
|
+
links?: {
|
|
3221
|
+
about?: string | undefined;
|
|
3222
|
+
} | undefined;
|
|
3223
|
+
meta?: Record<string, unknown> | undefined;
|
|
3224
|
+
title?: string | undefined;
|
|
3225
|
+
detail?: string | undefined;
|
|
3226
|
+
source?: {
|
|
3227
|
+
pointer?: string | undefined;
|
|
3228
|
+
parameter?: string | undefined;
|
|
3229
|
+
} | undefined;
|
|
3230
|
+
}, {
|
|
3231
|
+
status?: string | undefined;
|
|
3232
|
+
code?: string | undefined;
|
|
3233
|
+
id?: string | undefined;
|
|
3234
|
+
links?: {
|
|
3235
|
+
about?: string | undefined;
|
|
3236
|
+
} | undefined;
|
|
3237
|
+
meta?: Record<string, unknown> | undefined;
|
|
3238
|
+
title?: string | undefined;
|
|
3239
|
+
detail?: string | undefined;
|
|
3240
|
+
source?: {
|
|
3241
|
+
pointer?: string | undefined;
|
|
3242
|
+
parameter?: string | undefined;
|
|
3243
|
+
} | undefined;
|
|
3244
|
+
}>, "many">;
|
|
3245
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3246
|
+
}, "strip", z.ZodTypeAny, {
|
|
3247
|
+
errors: {
|
|
3248
|
+
status?: string | undefined;
|
|
3249
|
+
code?: string | undefined;
|
|
3250
|
+
id?: string | undefined;
|
|
3251
|
+
links?: {
|
|
3252
|
+
about?: string | undefined;
|
|
3253
|
+
} | undefined;
|
|
3254
|
+
meta?: Record<string, unknown> | undefined;
|
|
3255
|
+
title?: string | undefined;
|
|
3256
|
+
detail?: string | undefined;
|
|
3257
|
+
source?: {
|
|
3258
|
+
pointer?: string | undefined;
|
|
3259
|
+
parameter?: string | undefined;
|
|
3260
|
+
} | undefined;
|
|
3261
|
+
}[];
|
|
3262
|
+
meta?: Record<string, unknown> | undefined;
|
|
3263
|
+
}, {
|
|
3264
|
+
errors: {
|
|
3265
|
+
status?: string | undefined;
|
|
3266
|
+
code?: string | undefined;
|
|
3267
|
+
id?: string | undefined;
|
|
3268
|
+
links?: {
|
|
3269
|
+
about?: string | undefined;
|
|
3270
|
+
} | undefined;
|
|
3271
|
+
meta?: Record<string, unknown> | undefined;
|
|
3272
|
+
title?: string | undefined;
|
|
3273
|
+
detail?: string | undefined;
|
|
3274
|
+
source?: {
|
|
3275
|
+
pointer?: string | undefined;
|
|
3276
|
+
parameter?: string | undefined;
|
|
3277
|
+
} | undefined;
|
|
3278
|
+
}[];
|
|
3279
|
+
meta?: Record<string, unknown> | undefined;
|
|
3280
|
+
}>;
|
|
3281
|
+
};
|
|
3282
|
+
};
|
|
3283
|
+
getCurrentUsage: {
|
|
3284
|
+
pathParams: z.ZodObject<{
|
|
3285
|
+
farmId: z.ZodString;
|
|
3286
|
+
resourceType: z.ZodString;
|
|
3287
|
+
}, "strip", z.ZodTypeAny, {
|
|
3288
|
+
farmId: string;
|
|
3289
|
+
resourceType: string;
|
|
3290
|
+
}, {
|
|
3291
|
+
farmId: string;
|
|
3292
|
+
resourceType: string;
|
|
3293
|
+
}>;
|
|
3294
|
+
summary: "Get current usage";
|
|
3295
|
+
description: "Get current usage for a specific resource type in the current period";
|
|
3296
|
+
method: "GET";
|
|
3297
|
+
path: "/farms/:farmId/subscription/usage/:resourceType";
|
|
3298
|
+
responses: {
|
|
3299
|
+
200: z.ZodObject<{
|
|
3300
|
+
data: z.ZodObject<{
|
|
3301
|
+
resourceType: z.ZodString;
|
|
3302
|
+
count: z.ZodNumber;
|
|
3303
|
+
limit: z.ZodNullable<z.ZodNumber>;
|
|
3304
|
+
periodStart: z.ZodString;
|
|
3305
|
+
periodEnd: z.ZodString;
|
|
3306
|
+
}, "strip", z.ZodTypeAny, {
|
|
3307
|
+
count: number;
|
|
3308
|
+
limit: number | null;
|
|
3309
|
+
resourceType: string;
|
|
3310
|
+
periodStart: string;
|
|
3311
|
+
periodEnd: string;
|
|
3312
|
+
}, {
|
|
3313
|
+
count: number;
|
|
3314
|
+
limit: number | null;
|
|
3315
|
+
resourceType: string;
|
|
3316
|
+
periodStart: string;
|
|
3317
|
+
periodEnd: string;
|
|
3318
|
+
}>;
|
|
3319
|
+
}, "strip", z.ZodTypeAny, {
|
|
3320
|
+
data: {
|
|
3321
|
+
count: number;
|
|
3322
|
+
limit: number | null;
|
|
3323
|
+
resourceType: string;
|
|
3324
|
+
periodStart: string;
|
|
3325
|
+
periodEnd: string;
|
|
3326
|
+
};
|
|
3327
|
+
}, {
|
|
3328
|
+
data: {
|
|
3329
|
+
count: number;
|
|
3330
|
+
limit: number | null;
|
|
3331
|
+
resourceType: string;
|
|
3332
|
+
periodStart: string;
|
|
3333
|
+
periodEnd: string;
|
|
3334
|
+
};
|
|
3335
|
+
}>;
|
|
3336
|
+
404: z.ZodObject<{
|
|
3337
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3338
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3339
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3340
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3341
|
+
}, "strip", z.ZodTypeAny, {
|
|
3342
|
+
about?: string | undefined;
|
|
3343
|
+
}, {
|
|
3344
|
+
about?: string | undefined;
|
|
3345
|
+
}>>;
|
|
3346
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3347
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3348
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3349
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3350
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3351
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3352
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3353
|
+
}, "strip", z.ZodTypeAny, {
|
|
3354
|
+
pointer?: string | undefined;
|
|
3355
|
+
parameter?: string | undefined;
|
|
3356
|
+
}, {
|
|
3357
|
+
pointer?: string | undefined;
|
|
3358
|
+
parameter?: string | undefined;
|
|
3359
|
+
}>>;
|
|
3360
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3361
|
+
}, "strip", z.ZodTypeAny, {
|
|
3362
|
+
status?: string | undefined;
|
|
3363
|
+
code?: string | undefined;
|
|
3364
|
+
id?: string | undefined;
|
|
3365
|
+
links?: {
|
|
3366
|
+
about?: string | undefined;
|
|
3367
|
+
} | undefined;
|
|
3368
|
+
meta?: Record<string, unknown> | undefined;
|
|
3369
|
+
title?: string | undefined;
|
|
3370
|
+
detail?: string | undefined;
|
|
3371
|
+
source?: {
|
|
3372
|
+
pointer?: string | undefined;
|
|
3373
|
+
parameter?: string | undefined;
|
|
3374
|
+
} | undefined;
|
|
3375
|
+
}, {
|
|
3376
|
+
status?: string | undefined;
|
|
3377
|
+
code?: string | undefined;
|
|
3378
|
+
id?: string | undefined;
|
|
3379
|
+
links?: {
|
|
3380
|
+
about?: string | undefined;
|
|
3381
|
+
} | undefined;
|
|
3382
|
+
meta?: Record<string, unknown> | undefined;
|
|
3383
|
+
title?: string | undefined;
|
|
3384
|
+
detail?: string | undefined;
|
|
3385
|
+
source?: {
|
|
3386
|
+
pointer?: string | undefined;
|
|
3387
|
+
parameter?: string | undefined;
|
|
3388
|
+
} | undefined;
|
|
3389
|
+
}>, "many">;
|
|
3390
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3391
|
+
}, "strip", z.ZodTypeAny, {
|
|
3392
|
+
errors: {
|
|
3393
|
+
status?: string | undefined;
|
|
3394
|
+
code?: string | undefined;
|
|
3395
|
+
id?: string | undefined;
|
|
3396
|
+
links?: {
|
|
3397
|
+
about?: string | undefined;
|
|
3398
|
+
} | undefined;
|
|
3399
|
+
meta?: Record<string, unknown> | undefined;
|
|
3400
|
+
title?: string | undefined;
|
|
3401
|
+
detail?: string | undefined;
|
|
3402
|
+
source?: {
|
|
3403
|
+
pointer?: string | undefined;
|
|
3404
|
+
parameter?: string | undefined;
|
|
3405
|
+
} | undefined;
|
|
3406
|
+
}[];
|
|
3407
|
+
meta?: Record<string, unknown> | undefined;
|
|
3408
|
+
}, {
|
|
3409
|
+
errors: {
|
|
3410
|
+
status?: string | undefined;
|
|
3411
|
+
code?: string | undefined;
|
|
3412
|
+
id?: string | undefined;
|
|
3413
|
+
links?: {
|
|
3414
|
+
about?: string | undefined;
|
|
3415
|
+
} | undefined;
|
|
3416
|
+
meta?: Record<string, unknown> | undefined;
|
|
3417
|
+
title?: string | undefined;
|
|
3418
|
+
detail?: string | undefined;
|
|
3419
|
+
source?: {
|
|
3420
|
+
pointer?: string | undefined;
|
|
3421
|
+
parameter?: string | undefined;
|
|
3422
|
+
} | undefined;
|
|
3423
|
+
}[];
|
|
3424
|
+
meta?: Record<string, unknown> | undefined;
|
|
3425
|
+
}>;
|
|
3426
|
+
401: z.ZodObject<{
|
|
3427
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3428
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3429
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3430
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3431
|
+
}, "strip", z.ZodTypeAny, {
|
|
3432
|
+
about?: string | undefined;
|
|
3433
|
+
}, {
|
|
3434
|
+
about?: string | undefined;
|
|
3435
|
+
}>>;
|
|
3436
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3437
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3438
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3439
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3440
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3441
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3442
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3443
|
+
}, "strip", z.ZodTypeAny, {
|
|
3444
|
+
pointer?: string | undefined;
|
|
3445
|
+
parameter?: string | undefined;
|
|
3446
|
+
}, {
|
|
3447
|
+
pointer?: string | undefined;
|
|
3448
|
+
parameter?: string | undefined;
|
|
3449
|
+
}>>;
|
|
3450
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3451
|
+
}, "strip", z.ZodTypeAny, {
|
|
3452
|
+
status?: string | undefined;
|
|
3453
|
+
code?: string | undefined;
|
|
3454
|
+
id?: string | undefined;
|
|
3455
|
+
links?: {
|
|
3456
|
+
about?: string | undefined;
|
|
3457
|
+
} | undefined;
|
|
3458
|
+
meta?: Record<string, unknown> | undefined;
|
|
3459
|
+
title?: string | undefined;
|
|
3460
|
+
detail?: string | undefined;
|
|
3461
|
+
source?: {
|
|
3462
|
+
pointer?: string | undefined;
|
|
3463
|
+
parameter?: string | undefined;
|
|
3464
|
+
} | undefined;
|
|
3465
|
+
}, {
|
|
3466
|
+
status?: string | undefined;
|
|
3467
|
+
code?: string | undefined;
|
|
3468
|
+
id?: string | undefined;
|
|
3469
|
+
links?: {
|
|
3470
|
+
about?: string | undefined;
|
|
3471
|
+
} | undefined;
|
|
3472
|
+
meta?: Record<string, unknown> | undefined;
|
|
3473
|
+
title?: string | undefined;
|
|
3474
|
+
detail?: string | undefined;
|
|
3475
|
+
source?: {
|
|
3476
|
+
pointer?: string | undefined;
|
|
3477
|
+
parameter?: string | undefined;
|
|
3478
|
+
} | undefined;
|
|
3479
|
+
}>, "many">;
|
|
3480
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3481
|
+
}, "strip", z.ZodTypeAny, {
|
|
3482
|
+
errors: {
|
|
3483
|
+
status?: string | undefined;
|
|
3484
|
+
code?: string | undefined;
|
|
3485
|
+
id?: string | undefined;
|
|
3486
|
+
links?: {
|
|
3487
|
+
about?: string | undefined;
|
|
3488
|
+
} | undefined;
|
|
3489
|
+
meta?: Record<string, unknown> | undefined;
|
|
3490
|
+
title?: string | undefined;
|
|
3491
|
+
detail?: string | undefined;
|
|
3492
|
+
source?: {
|
|
3493
|
+
pointer?: string | undefined;
|
|
3494
|
+
parameter?: string | undefined;
|
|
3495
|
+
} | undefined;
|
|
3496
|
+
}[];
|
|
3497
|
+
meta?: Record<string, unknown> | undefined;
|
|
3498
|
+
}, {
|
|
3499
|
+
errors: {
|
|
3500
|
+
status?: string | undefined;
|
|
3501
|
+
code?: string | undefined;
|
|
3502
|
+
id?: string | undefined;
|
|
3503
|
+
links?: {
|
|
3504
|
+
about?: string | undefined;
|
|
3505
|
+
} | undefined;
|
|
3506
|
+
meta?: Record<string, unknown> | undefined;
|
|
3507
|
+
title?: string | undefined;
|
|
3508
|
+
detail?: string | undefined;
|
|
3509
|
+
source?: {
|
|
3510
|
+
pointer?: string | undefined;
|
|
3511
|
+
parameter?: string | undefined;
|
|
3512
|
+
} | undefined;
|
|
3513
|
+
}[];
|
|
3514
|
+
meta?: Record<string, unknown> | undefined;
|
|
3515
|
+
}>;
|
|
3516
|
+
};
|
|
3517
|
+
};
|
|
3518
|
+
verifyAndActivateSubscription: {
|
|
3519
|
+
pathParams: z.ZodObject<{
|
|
3520
|
+
farmId: z.ZodString;
|
|
3521
|
+
}, "strip", z.ZodTypeAny, {
|
|
3522
|
+
farmId: string;
|
|
3523
|
+
}, {
|
|
3524
|
+
farmId: string;
|
|
3525
|
+
}>;
|
|
3526
|
+
summary: "Verify and activate subscription";
|
|
3527
|
+
description: "Verify payment and automatically upgrade subscription. Typically called after payment redirect or when webhook fails.";
|
|
3528
|
+
method: "POST";
|
|
3529
|
+
body: z.ZodObject<{
|
|
3530
|
+
data: z.ZodObject<{
|
|
3531
|
+
type: z.ZodLiteral<"subscriptions">;
|
|
3532
|
+
attributes: z.ZodObject<{
|
|
3533
|
+
paymentReference: z.ZodString;
|
|
3534
|
+
}, "strip", z.ZodTypeAny, {
|
|
3535
|
+
paymentReference: string;
|
|
3536
|
+
}, {
|
|
3537
|
+
paymentReference: string;
|
|
3538
|
+
}>;
|
|
3539
|
+
}, "strip", z.ZodTypeAny, {
|
|
3540
|
+
type: "subscriptions";
|
|
3541
|
+
attributes: {
|
|
3542
|
+
paymentReference: string;
|
|
3543
|
+
};
|
|
3544
|
+
}, {
|
|
3545
|
+
type: "subscriptions";
|
|
3546
|
+
attributes: {
|
|
3547
|
+
paymentReference: string;
|
|
3548
|
+
};
|
|
3549
|
+
}>;
|
|
3550
|
+
}, "strip", z.ZodTypeAny, {
|
|
3551
|
+
data: {
|
|
3552
|
+
type: "subscriptions";
|
|
3553
|
+
attributes: {
|
|
3554
|
+
paymentReference: string;
|
|
3555
|
+
};
|
|
3556
|
+
};
|
|
3557
|
+
}, {
|
|
3558
|
+
data: {
|
|
3559
|
+
type: "subscriptions";
|
|
3560
|
+
attributes: {
|
|
3561
|
+
paymentReference: string;
|
|
3562
|
+
};
|
|
3563
|
+
};
|
|
3564
|
+
}>;
|
|
3565
|
+
path: "/farms/:farmId/subscriptions/verify-payment";
|
|
3566
|
+
responses: {
|
|
3567
|
+
200: z.ZodObject<{
|
|
3568
|
+
data: z.ZodObject<{
|
|
3569
|
+
type: z.ZodLiteral<"subscriptions">;
|
|
3570
|
+
id: z.ZodString;
|
|
3571
|
+
attributes: z.ZodObject<{
|
|
3572
|
+
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
3573
|
+
status: z.ZodEnum<["active", "cancelled", "expired", "trial"]>;
|
|
3574
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3575
|
+
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
3576
|
+
billingCycle: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "annual", "custom"]>>>;
|
|
3577
|
+
currentPeriodStart: z.ZodString;
|
|
3578
|
+
currentPeriodEnd: z.ZodString;
|
|
3579
|
+
cancelledAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3580
|
+
paymentGateway: z.ZodOptional<z.ZodNullable<z.ZodEnum<["flutterwave", "paystack", "stripe", "paypal", "other"]>>>;
|
|
3581
|
+
gatewaySubscriptionId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
3582
|
+
maxFields: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3583
|
+
maxAiImagesPerMonth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3584
|
+
satelliteFrequency: z.ZodOptional<z.ZodNullable<z.ZodEnum<["monthly", "weekly", "daily"]>>>;
|
|
3585
|
+
} & {
|
|
3586
|
+
createdAt: z.ZodString;
|
|
3587
|
+
updatedAt: z.ZodString;
|
|
3588
|
+
}, "strip", z.ZodTypeAny, {
|
|
3589
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3590
|
+
createdAt: string;
|
|
3591
|
+
updatedAt: string;
|
|
3592
|
+
currency: "NGN" | "USD";
|
|
3593
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3594
|
+
currentPeriodStart: string;
|
|
3595
|
+
currentPeriodEnd: string;
|
|
3596
|
+
amount?: number | null | undefined;
|
|
3597
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3598
|
+
cancelledAt?: string | null | undefined;
|
|
3599
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3600
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3601
|
+
maxFields?: number | null | undefined;
|
|
3602
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3603
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3604
|
+
}, {
|
|
3605
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3606
|
+
createdAt: string;
|
|
3607
|
+
updatedAt: string;
|
|
3608
|
+
currency: "NGN" | "USD";
|
|
3609
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3610
|
+
currentPeriodStart: string;
|
|
3611
|
+
currentPeriodEnd: string;
|
|
3612
|
+
amount?: number | null | undefined;
|
|
3613
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3614
|
+
cancelledAt?: string | null | undefined;
|
|
3615
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3616
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3617
|
+
maxFields?: number | null | undefined;
|
|
3618
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3619
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3620
|
+
}>;
|
|
3621
|
+
}, "strip", z.ZodTypeAny, {
|
|
3622
|
+
type: "subscriptions";
|
|
3623
|
+
id: string;
|
|
3624
|
+
attributes: {
|
|
3625
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3626
|
+
createdAt: string;
|
|
3627
|
+
updatedAt: string;
|
|
3628
|
+
currency: "NGN" | "USD";
|
|
3629
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3630
|
+
currentPeriodStart: string;
|
|
3631
|
+
currentPeriodEnd: string;
|
|
3632
|
+
amount?: number | null | undefined;
|
|
3633
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3634
|
+
cancelledAt?: string | null | undefined;
|
|
3635
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3636
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3637
|
+
maxFields?: number | null | undefined;
|
|
3638
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3639
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3640
|
+
};
|
|
3641
|
+
}, {
|
|
3642
|
+
type: "subscriptions";
|
|
3643
|
+
id: string;
|
|
3644
|
+
attributes: {
|
|
3645
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3646
|
+
createdAt: string;
|
|
3647
|
+
updatedAt: string;
|
|
3648
|
+
currency: "NGN" | "USD";
|
|
3649
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3650
|
+
currentPeriodStart: string;
|
|
3651
|
+
currentPeriodEnd: string;
|
|
3652
|
+
amount?: number | null | undefined;
|
|
3653
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3654
|
+
cancelledAt?: string | null | undefined;
|
|
3655
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3656
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3657
|
+
maxFields?: number | null | undefined;
|
|
3658
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3659
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3660
|
+
};
|
|
3661
|
+
}>;
|
|
3662
|
+
included: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3663
|
+
type: z.ZodString;
|
|
3664
|
+
id: z.ZodString;
|
|
3665
|
+
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3666
|
+
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3667
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3668
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3669
|
+
}, "strip", z.ZodTypeAny, {
|
|
3670
|
+
type: string;
|
|
3671
|
+
id: string;
|
|
3672
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3673
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3674
|
+
links?: Record<string, string> | undefined;
|
|
3675
|
+
meta?: Record<string, unknown> | undefined;
|
|
3676
|
+
}, {
|
|
3677
|
+
type: string;
|
|
3678
|
+
id: string;
|
|
3679
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3680
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3681
|
+
links?: Record<string, string> | undefined;
|
|
3682
|
+
meta?: Record<string, unknown> | undefined;
|
|
3683
|
+
}>, "many">>;
|
|
3684
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3685
|
+
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
3686
|
+
}, "strip", z.ZodTypeAny, {
|
|
3687
|
+
data: {
|
|
3688
|
+
type: "subscriptions";
|
|
3689
|
+
id: string;
|
|
3690
|
+
attributes: {
|
|
3691
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3692
|
+
createdAt: string;
|
|
3693
|
+
updatedAt: string;
|
|
3694
|
+
currency: "NGN" | "USD";
|
|
3695
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3696
|
+
currentPeriodStart: string;
|
|
3697
|
+
currentPeriodEnd: string;
|
|
3698
|
+
amount?: number | null | undefined;
|
|
3699
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3700
|
+
cancelledAt?: string | null | undefined;
|
|
3701
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3702
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3703
|
+
maxFields?: number | null | undefined;
|
|
3704
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3705
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3706
|
+
};
|
|
3707
|
+
};
|
|
3708
|
+
links?: Record<string, string> | undefined;
|
|
3709
|
+
meta?: Record<string, unknown> | undefined;
|
|
3710
|
+
included?: {
|
|
3711
|
+
type: string;
|
|
3712
|
+
id: string;
|
|
3713
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3714
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3715
|
+
links?: Record<string, string> | undefined;
|
|
3716
|
+
meta?: Record<string, unknown> | undefined;
|
|
3717
|
+
}[] | undefined;
|
|
3718
|
+
}, {
|
|
3719
|
+
data: {
|
|
3720
|
+
type: "subscriptions";
|
|
3721
|
+
id: string;
|
|
3722
|
+
attributes: {
|
|
3723
|
+
status: "cancelled" | "active" | "expired" | "trial";
|
|
3724
|
+
createdAt: string;
|
|
3725
|
+
updatedAt: string;
|
|
3726
|
+
currency: "NGN" | "USD";
|
|
3727
|
+
tier: "FREE" | "STARTER_PACK" | "COOPERATIVE" | "ENTERPRISE" | "GOVERNMENT";
|
|
3728
|
+
currentPeriodStart: string;
|
|
3729
|
+
currentPeriodEnd: string;
|
|
3730
|
+
amount?: number | null | undefined;
|
|
3731
|
+
billingCycle?: "custom" | "monthly" | "annual" | null | undefined;
|
|
3732
|
+
cancelledAt?: string | null | undefined;
|
|
3733
|
+
paymentGateway?: "other" | "flutterwave" | "paystack" | "stripe" | "paypal" | null | undefined;
|
|
3734
|
+
gatewaySubscriptionId?: string | null | undefined;
|
|
3735
|
+
maxFields?: number | null | undefined;
|
|
3736
|
+
maxAiImagesPerMonth?: number | null | undefined;
|
|
3737
|
+
satelliteFrequency?: "monthly" | "daily" | "weekly" | null | undefined;
|
|
3738
|
+
};
|
|
3739
|
+
};
|
|
3740
|
+
links?: Record<string, string> | undefined;
|
|
3741
|
+
meta?: Record<string, unknown> | undefined;
|
|
3742
|
+
included?: {
|
|
3743
|
+
type: string;
|
|
3744
|
+
id: string;
|
|
3745
|
+
attributes?: Record<string, unknown> | undefined;
|
|
3746
|
+
relationships?: Record<string, unknown> | undefined;
|
|
3747
|
+
links?: Record<string, string> | undefined;
|
|
3748
|
+
meta?: Record<string, unknown> | undefined;
|
|
3749
|
+
}[] | undefined;
|
|
3750
|
+
}>;
|
|
3751
|
+
400: z.ZodObject<{
|
|
3752
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3753
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3754
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3755
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3756
|
+
}, "strip", z.ZodTypeAny, {
|
|
3757
|
+
about?: string | undefined;
|
|
3758
|
+
}, {
|
|
3759
|
+
about?: string | undefined;
|
|
3760
|
+
}>>;
|
|
3761
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3762
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3763
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3764
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3765
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3766
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3767
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3768
|
+
}, "strip", z.ZodTypeAny, {
|
|
3769
|
+
pointer?: string | undefined;
|
|
3770
|
+
parameter?: string | undefined;
|
|
3771
|
+
}, {
|
|
3772
|
+
pointer?: string | undefined;
|
|
3773
|
+
parameter?: string | undefined;
|
|
3774
|
+
}>>;
|
|
3775
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3776
|
+
}, "strip", z.ZodTypeAny, {
|
|
3777
|
+
status?: string | undefined;
|
|
3778
|
+
code?: string | undefined;
|
|
3779
|
+
id?: string | undefined;
|
|
3780
|
+
links?: {
|
|
3781
|
+
about?: string | undefined;
|
|
3782
|
+
} | undefined;
|
|
3783
|
+
meta?: Record<string, unknown> | undefined;
|
|
3784
|
+
title?: string | undefined;
|
|
3785
|
+
detail?: string | undefined;
|
|
3786
|
+
source?: {
|
|
3787
|
+
pointer?: string | undefined;
|
|
3788
|
+
parameter?: string | undefined;
|
|
3789
|
+
} | undefined;
|
|
3790
|
+
}, {
|
|
3791
|
+
status?: string | undefined;
|
|
3792
|
+
code?: string | undefined;
|
|
3793
|
+
id?: string | undefined;
|
|
3794
|
+
links?: {
|
|
3795
|
+
about?: string | undefined;
|
|
3796
|
+
} | undefined;
|
|
3797
|
+
meta?: Record<string, unknown> | undefined;
|
|
3798
|
+
title?: string | undefined;
|
|
3799
|
+
detail?: string | undefined;
|
|
3800
|
+
source?: {
|
|
3801
|
+
pointer?: string | undefined;
|
|
3802
|
+
parameter?: string | undefined;
|
|
3803
|
+
} | undefined;
|
|
3804
|
+
}>, "many">;
|
|
3805
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3806
|
+
}, "strip", z.ZodTypeAny, {
|
|
3807
|
+
errors: {
|
|
3808
|
+
status?: string | undefined;
|
|
3809
|
+
code?: string | undefined;
|
|
3810
|
+
id?: string | undefined;
|
|
3811
|
+
links?: {
|
|
3812
|
+
about?: string | undefined;
|
|
3813
|
+
} | undefined;
|
|
3814
|
+
meta?: Record<string, unknown> | undefined;
|
|
3815
|
+
title?: string | undefined;
|
|
3816
|
+
detail?: string | undefined;
|
|
3817
|
+
source?: {
|
|
3818
|
+
pointer?: string | undefined;
|
|
3819
|
+
parameter?: string | undefined;
|
|
3820
|
+
} | undefined;
|
|
3821
|
+
}[];
|
|
3822
|
+
meta?: Record<string, unknown> | undefined;
|
|
3823
|
+
}, {
|
|
3824
|
+
errors: {
|
|
3825
|
+
status?: string | undefined;
|
|
3826
|
+
code?: string | undefined;
|
|
3827
|
+
id?: string | undefined;
|
|
3828
|
+
links?: {
|
|
3829
|
+
about?: string | undefined;
|
|
3830
|
+
} | undefined;
|
|
3831
|
+
meta?: Record<string, unknown> | undefined;
|
|
3832
|
+
title?: string | undefined;
|
|
3833
|
+
detail?: string | undefined;
|
|
3834
|
+
source?: {
|
|
3835
|
+
pointer?: string | undefined;
|
|
3836
|
+
parameter?: string | undefined;
|
|
3837
|
+
} | undefined;
|
|
3838
|
+
}[];
|
|
3839
|
+
meta?: Record<string, unknown> | undefined;
|
|
3840
|
+
}>;
|
|
3841
|
+
404: z.ZodObject<{
|
|
3842
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3843
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3844
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3845
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3846
|
+
}, "strip", z.ZodTypeAny, {
|
|
3847
|
+
about?: string | undefined;
|
|
3848
|
+
}, {
|
|
3849
|
+
about?: string | undefined;
|
|
3850
|
+
}>>;
|
|
3851
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3852
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3853
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3854
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3855
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3856
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3857
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3858
|
+
}, "strip", z.ZodTypeAny, {
|
|
3859
|
+
pointer?: string | undefined;
|
|
3860
|
+
parameter?: string | undefined;
|
|
3861
|
+
}, {
|
|
3862
|
+
pointer?: string | undefined;
|
|
3863
|
+
parameter?: string | undefined;
|
|
3864
|
+
}>>;
|
|
3865
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3866
|
+
}, "strip", z.ZodTypeAny, {
|
|
3867
|
+
status?: string | undefined;
|
|
3868
|
+
code?: string | undefined;
|
|
3869
|
+
id?: string | undefined;
|
|
3870
|
+
links?: {
|
|
3871
|
+
about?: string | undefined;
|
|
3872
|
+
} | undefined;
|
|
3873
|
+
meta?: Record<string, unknown> | undefined;
|
|
3874
|
+
title?: string | undefined;
|
|
3875
|
+
detail?: string | undefined;
|
|
3876
|
+
source?: {
|
|
3877
|
+
pointer?: string | undefined;
|
|
3878
|
+
parameter?: string | undefined;
|
|
3879
|
+
} | undefined;
|
|
3880
|
+
}, {
|
|
3881
|
+
status?: string | undefined;
|
|
3882
|
+
code?: string | undefined;
|
|
3883
|
+
id?: string | undefined;
|
|
3884
|
+
links?: {
|
|
3885
|
+
about?: string | undefined;
|
|
3886
|
+
} | undefined;
|
|
3887
|
+
meta?: Record<string, unknown> | undefined;
|
|
3888
|
+
title?: string | undefined;
|
|
3889
|
+
detail?: string | undefined;
|
|
3890
|
+
source?: {
|
|
3891
|
+
pointer?: string | undefined;
|
|
3892
|
+
parameter?: string | undefined;
|
|
3893
|
+
} | undefined;
|
|
3894
|
+
}>, "many">;
|
|
3895
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3896
|
+
}, "strip", z.ZodTypeAny, {
|
|
3897
|
+
errors: {
|
|
3898
|
+
status?: string | undefined;
|
|
3899
|
+
code?: string | undefined;
|
|
3900
|
+
id?: string | undefined;
|
|
3901
|
+
links?: {
|
|
3902
|
+
about?: string | undefined;
|
|
3903
|
+
} | undefined;
|
|
3904
|
+
meta?: Record<string, unknown> | undefined;
|
|
3905
|
+
title?: string | undefined;
|
|
3906
|
+
detail?: string | undefined;
|
|
3907
|
+
source?: {
|
|
3908
|
+
pointer?: string | undefined;
|
|
3909
|
+
parameter?: string | undefined;
|
|
3910
|
+
} | undefined;
|
|
3911
|
+
}[];
|
|
3912
|
+
meta?: Record<string, unknown> | undefined;
|
|
3913
|
+
}, {
|
|
3914
|
+
errors: {
|
|
3915
|
+
status?: string | undefined;
|
|
3916
|
+
code?: string | undefined;
|
|
3917
|
+
id?: string | undefined;
|
|
3918
|
+
links?: {
|
|
3919
|
+
about?: string | undefined;
|
|
3920
|
+
} | undefined;
|
|
3921
|
+
meta?: Record<string, unknown> | undefined;
|
|
3922
|
+
title?: string | undefined;
|
|
3923
|
+
detail?: string | undefined;
|
|
3924
|
+
source?: {
|
|
3925
|
+
pointer?: string | undefined;
|
|
3926
|
+
parameter?: string | undefined;
|
|
3927
|
+
} | undefined;
|
|
3928
|
+
}[];
|
|
3929
|
+
meta?: Record<string, unknown> | undefined;
|
|
3930
|
+
}>;
|
|
3931
|
+
401: z.ZodObject<{
|
|
3932
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
3933
|
+
id: z.ZodOptional<z.ZodString>;
|
|
3934
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
3935
|
+
about: z.ZodOptional<z.ZodString>;
|
|
3936
|
+
}, "strip", z.ZodTypeAny, {
|
|
3937
|
+
about?: string | undefined;
|
|
3938
|
+
}, {
|
|
3939
|
+
about?: string | undefined;
|
|
3940
|
+
}>>;
|
|
3941
|
+
status: z.ZodOptional<z.ZodString>;
|
|
3942
|
+
code: z.ZodOptional<z.ZodString>;
|
|
3943
|
+
title: z.ZodOptional<z.ZodString>;
|
|
3944
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
3945
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
3946
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
3947
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
3948
|
+
}, "strip", z.ZodTypeAny, {
|
|
3949
|
+
pointer?: string | undefined;
|
|
3950
|
+
parameter?: string | undefined;
|
|
3951
|
+
}, {
|
|
3952
|
+
pointer?: string | undefined;
|
|
3953
|
+
parameter?: string | undefined;
|
|
3954
|
+
}>>;
|
|
3955
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3956
|
+
}, "strip", z.ZodTypeAny, {
|
|
3957
|
+
status?: string | undefined;
|
|
3958
|
+
code?: string | undefined;
|
|
3959
|
+
id?: string | undefined;
|
|
3960
|
+
links?: {
|
|
3961
|
+
about?: string | undefined;
|
|
3962
|
+
} | undefined;
|
|
3963
|
+
meta?: Record<string, unknown> | undefined;
|
|
3964
|
+
title?: string | undefined;
|
|
3965
|
+
detail?: string | undefined;
|
|
3966
|
+
source?: {
|
|
3967
|
+
pointer?: string | undefined;
|
|
3968
|
+
parameter?: string | undefined;
|
|
3969
|
+
} | undefined;
|
|
3970
|
+
}, {
|
|
3971
|
+
status?: string | undefined;
|
|
3972
|
+
code?: string | undefined;
|
|
3973
|
+
id?: string | undefined;
|
|
3974
|
+
links?: {
|
|
3975
|
+
about?: string | undefined;
|
|
3976
|
+
} | undefined;
|
|
3977
|
+
meta?: Record<string, unknown> | undefined;
|
|
3978
|
+
title?: string | undefined;
|
|
3979
|
+
detail?: string | undefined;
|
|
3980
|
+
source?: {
|
|
3981
|
+
pointer?: string | undefined;
|
|
3982
|
+
parameter?: string | undefined;
|
|
3983
|
+
} | undefined;
|
|
3984
|
+
}>, "many">;
|
|
3985
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
3986
|
+
}, "strip", z.ZodTypeAny, {
|
|
3987
|
+
errors: {
|
|
3988
|
+
status?: string | undefined;
|
|
3989
|
+
code?: string | undefined;
|
|
3990
|
+
id?: string | undefined;
|
|
3991
|
+
links?: {
|
|
3992
|
+
about?: string | undefined;
|
|
3993
|
+
} | undefined;
|
|
3994
|
+
meta?: Record<string, unknown> | undefined;
|
|
3995
|
+
title?: string | undefined;
|
|
3996
|
+
detail?: string | undefined;
|
|
3997
|
+
source?: {
|
|
3998
|
+
pointer?: string | undefined;
|
|
3999
|
+
parameter?: string | undefined;
|
|
4000
|
+
} | undefined;
|
|
4001
|
+
}[];
|
|
4002
|
+
meta?: Record<string, unknown> | undefined;
|
|
4003
|
+
}, {
|
|
4004
|
+
errors: {
|
|
4005
|
+
status?: string | undefined;
|
|
4006
|
+
code?: string | undefined;
|
|
4007
|
+
id?: string | undefined;
|
|
4008
|
+
links?: {
|
|
4009
|
+
about?: string | undefined;
|
|
4010
|
+
} | undefined;
|
|
4011
|
+
meta?: Record<string, unknown> | undefined;
|
|
4012
|
+
title?: string | undefined;
|
|
4013
|
+
detail?: string | undefined;
|
|
4014
|
+
source?: {
|
|
4015
|
+
pointer?: string | undefined;
|
|
4016
|
+
parameter?: string | undefined;
|
|
4017
|
+
} | undefined;
|
|
4018
|
+
}[];
|
|
4019
|
+
meta?: Record<string, unknown> | undefined;
|
|
4020
|
+
}>;
|
|
4021
|
+
};
|
|
4022
|
+
};
|
|
3150
4023
|
};
|
|
3151
4024
|
//# sourceMappingURL=subscriptions.routes.d.ts.map
|