@deepintel-ltd/farmpro-contracts 1.30.1 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/routes/auth.routes.d.ts +753 -0
- package/dist/routes/auth.routes.d.ts.map +1 -1
- package/dist/routes/auth.routes.js +25 -1
- package/dist/routes/field-monitoring.routes.d.ts +3 -0
- package/dist/routes/field-monitoring.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.d.ts +4 -0
- package/dist/routes/finance.routes.d.ts.map +1 -1
- package/dist/routes/finance.routes.js +5 -0
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -0
- package/dist/routes/integrations.routes.d.ts +4500 -0
- package/dist/routes/integrations.routes.d.ts.map +1 -0
- package/dist/routes/integrations.routes.js +189 -0
- package/dist/routes/invoices.routes.d.ts +210 -0
- package/dist/routes/invoices.routes.d.ts.map +1 -1
- package/dist/routes/market-intelligence.routes.d.ts +670 -0
- package/dist/routes/market-intelligence.routes.d.ts.map +1 -1
- package/dist/routes/market-intelligence.routes.js +52 -0
- package/dist/routes/poultry.routes.d.ts +14 -14
- package/dist/routes/subscriptions.routes.d.ts +369 -0
- package/dist/routes/subscriptions.routes.d.ts.map +1 -1
- package/dist/routes/subscriptions.routes.js +22 -1
- package/dist/routes/trade-cash-events.routes.d.ts +121 -31
- package/dist/routes/trade-cash-events.routes.d.ts.map +1 -1
- package/dist/routes/users.routes.d.ts +280 -0
- package/dist/routes/users.routes.d.ts.map +1 -1
- package/dist/routes/users.routes.js +14 -0
- package/dist/schemas/auth.schemas.d.ts +75 -0
- package/dist/schemas/auth.schemas.d.ts.map +1 -1
- package/dist/schemas/auth.schemas.js +21 -0
- package/dist/schemas/farm-enterprises.schemas.d.ts +1 -1
- package/dist/schemas/farm-enterprises.schemas.d.ts.map +1 -1
- package/dist/schemas/farm-enterprises.schemas.js +1 -1
- package/dist/schemas/field-monitoring.schemas.d.ts +4 -0
- package/dist/schemas/field-monitoring.schemas.d.ts.map +1 -1
- package/dist/schemas/field-monitoring.schemas.js +2 -0
- package/dist/schemas/integrations.schemas.d.ts +717 -0
- package/dist/schemas/integrations.schemas.d.ts.map +1 -0
- package/dist/schemas/integrations.schemas.js +149 -0
- package/dist/schemas/invoices.schemas.d.ts +132 -0
- package/dist/schemas/invoices.schemas.d.ts.map +1 -1
- package/dist/schemas/invoices.schemas.js +6 -0
- package/dist/schemas/locale.schemas.d.ts +2 -2
- package/dist/schemas/subscriptions.schemas.d.ts +56 -0
- package/dist/schemas/subscriptions.schemas.d.ts.map +1 -1
- package/dist/schemas/subscriptions.schemas.js +12 -0
- package/dist/schemas/trade-cash-events.schemas.d.ts +101 -31
- package/dist/schemas/trade-cash-events.schemas.d.ts.map +1 -1
- package/dist/schemas/trade-cash-events.schemas.js +13 -0
- package/package.json +1 -1
|
@@ -3337,6 +3337,9 @@ export declare const subscriptionsRouter: {
|
|
|
3337
3337
|
resourceType: z.ZodString;
|
|
3338
3338
|
count: z.ZodNumber;
|
|
3339
3339
|
limit: z.ZodNullable<z.ZodNumber>;
|
|
3340
|
+
remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3341
|
+
nearLimit: z.ZodOptional<z.ZodBoolean>;
|
|
3342
|
+
packBonus: z.ZodOptional<z.ZodNumber>;
|
|
3340
3343
|
periodStart: z.ZodString;
|
|
3341
3344
|
periodEnd: z.ZodString;
|
|
3342
3345
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3345,12 +3348,18 @@ export declare const subscriptionsRouter: {
|
|
|
3345
3348
|
periodStart: string;
|
|
3346
3349
|
periodEnd: string;
|
|
3347
3350
|
resourceType: string;
|
|
3351
|
+
remaining?: number | null | undefined;
|
|
3352
|
+
nearLimit?: boolean | undefined;
|
|
3353
|
+
packBonus?: number | undefined;
|
|
3348
3354
|
}, {
|
|
3349
3355
|
limit: number | null;
|
|
3350
3356
|
count: number;
|
|
3351
3357
|
periodStart: string;
|
|
3352
3358
|
periodEnd: string;
|
|
3353
3359
|
resourceType: string;
|
|
3360
|
+
remaining?: number | null | undefined;
|
|
3361
|
+
nearLimit?: boolean | undefined;
|
|
3362
|
+
packBonus?: number | undefined;
|
|
3354
3363
|
}>;
|
|
3355
3364
|
}, "strip", z.ZodTypeAny, {
|
|
3356
3365
|
data: {
|
|
@@ -3359,6 +3368,9 @@ export declare const subscriptionsRouter: {
|
|
|
3359
3368
|
periodStart: string;
|
|
3360
3369
|
periodEnd: string;
|
|
3361
3370
|
resourceType: string;
|
|
3371
|
+
remaining?: number | null | undefined;
|
|
3372
|
+
nearLimit?: boolean | undefined;
|
|
3373
|
+
packBonus?: number | undefined;
|
|
3362
3374
|
};
|
|
3363
3375
|
}, {
|
|
3364
3376
|
data: {
|
|
@@ -3367,6 +3379,9 @@ export declare const subscriptionsRouter: {
|
|
|
3367
3379
|
periodStart: string;
|
|
3368
3380
|
periodEnd: string;
|
|
3369
3381
|
resourceType: string;
|
|
3382
|
+
remaining?: number | null | undefined;
|
|
3383
|
+
nearLimit?: boolean | undefined;
|
|
3384
|
+
packBonus?: number | undefined;
|
|
3370
3385
|
};
|
|
3371
3386
|
}>;
|
|
3372
3387
|
404: z.ZodObject<{
|
|
@@ -4056,6 +4071,360 @@ export declare const subscriptionsRouter: {
|
|
|
4056
4071
|
}>;
|
|
4057
4072
|
};
|
|
4058
4073
|
};
|
|
4074
|
+
createAgronomistChatPackPaymentLink: {
|
|
4075
|
+
pathParams: z.ZodObject<{
|
|
4076
|
+
farmId: z.ZodString;
|
|
4077
|
+
}, "strip", z.ZodTypeAny, {
|
|
4078
|
+
farmId: string;
|
|
4079
|
+
}, {
|
|
4080
|
+
farmId: string;
|
|
4081
|
+
}>;
|
|
4082
|
+
summary: "Create agronomist chat pack payment link";
|
|
4083
|
+
description: string;
|
|
4084
|
+
method: "POST";
|
|
4085
|
+
body: z.ZodObject<{
|
|
4086
|
+
data: z.ZodObject<{
|
|
4087
|
+
type: z.ZodLiteral<"agronomist-chat-packs">;
|
|
4088
|
+
attributes: z.ZodObject<{
|
|
4089
|
+
currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
|
|
4090
|
+
}, "strip", z.ZodTypeAny, {
|
|
4091
|
+
currency: "NGN" | "USD";
|
|
4092
|
+
}, {
|
|
4093
|
+
currency?: "NGN" | "USD" | undefined;
|
|
4094
|
+
}>;
|
|
4095
|
+
}, "strip", z.ZodTypeAny, {
|
|
4096
|
+
type: "agronomist-chat-packs";
|
|
4097
|
+
attributes: {
|
|
4098
|
+
currency: "NGN" | "USD";
|
|
4099
|
+
};
|
|
4100
|
+
}, {
|
|
4101
|
+
type: "agronomist-chat-packs";
|
|
4102
|
+
attributes: {
|
|
4103
|
+
currency?: "NGN" | "USD" | undefined;
|
|
4104
|
+
};
|
|
4105
|
+
}>;
|
|
4106
|
+
}, "strip", z.ZodTypeAny, {
|
|
4107
|
+
data: {
|
|
4108
|
+
type: "agronomist-chat-packs";
|
|
4109
|
+
attributes: {
|
|
4110
|
+
currency: "NGN" | "USD";
|
|
4111
|
+
};
|
|
4112
|
+
};
|
|
4113
|
+
}, {
|
|
4114
|
+
data: {
|
|
4115
|
+
type: "agronomist-chat-packs";
|
|
4116
|
+
attributes: {
|
|
4117
|
+
currency?: "NGN" | "USD" | undefined;
|
|
4118
|
+
};
|
|
4119
|
+
};
|
|
4120
|
+
}>;
|
|
4121
|
+
path: "/farms/:farmId/subscriptions/agronomist-chat-pack/payment-link";
|
|
4122
|
+
responses: {
|
|
4123
|
+
201: z.ZodObject<{
|
|
4124
|
+
status: z.ZodLiteral<"success">;
|
|
4125
|
+
message: z.ZodString;
|
|
4126
|
+
data: z.ZodObject<{
|
|
4127
|
+
paymentId: z.ZodString;
|
|
4128
|
+
link: z.ZodString;
|
|
4129
|
+
tx_ref: z.ZodString;
|
|
4130
|
+
}, "strip", z.ZodTypeAny, {
|
|
4131
|
+
link: string;
|
|
4132
|
+
tx_ref: string;
|
|
4133
|
+
paymentId: string;
|
|
4134
|
+
}, {
|
|
4135
|
+
link: string;
|
|
4136
|
+
tx_ref: string;
|
|
4137
|
+
paymentId: string;
|
|
4138
|
+
}>;
|
|
4139
|
+
}, "strip", z.ZodTypeAny, {
|
|
4140
|
+
status: "success";
|
|
4141
|
+
message: string;
|
|
4142
|
+
data: {
|
|
4143
|
+
link: string;
|
|
4144
|
+
tx_ref: string;
|
|
4145
|
+
paymentId: string;
|
|
4146
|
+
};
|
|
4147
|
+
}, {
|
|
4148
|
+
status: "success";
|
|
4149
|
+
message: string;
|
|
4150
|
+
data: {
|
|
4151
|
+
link: string;
|
|
4152
|
+
tx_ref: string;
|
|
4153
|
+
paymentId: string;
|
|
4154
|
+
};
|
|
4155
|
+
}>;
|
|
4156
|
+
400: z.ZodObject<{
|
|
4157
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4158
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4159
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4160
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4161
|
+
}, "strip", z.ZodTypeAny, {
|
|
4162
|
+
about?: string | undefined;
|
|
4163
|
+
}, {
|
|
4164
|
+
about?: string | undefined;
|
|
4165
|
+
}>>;
|
|
4166
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4167
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4168
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4169
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4170
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4171
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4172
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4173
|
+
}, "strip", z.ZodTypeAny, {
|
|
4174
|
+
pointer?: string | undefined;
|
|
4175
|
+
parameter?: string | undefined;
|
|
4176
|
+
}, {
|
|
4177
|
+
pointer?: string | undefined;
|
|
4178
|
+
parameter?: string | undefined;
|
|
4179
|
+
}>>;
|
|
4180
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4181
|
+
}, "strip", z.ZodTypeAny, {
|
|
4182
|
+
status?: string | undefined;
|
|
4183
|
+
code?: string | undefined;
|
|
4184
|
+
id?: string | undefined;
|
|
4185
|
+
links?: {
|
|
4186
|
+
about?: string | undefined;
|
|
4187
|
+
} | undefined;
|
|
4188
|
+
meta?: Record<string, unknown> | undefined;
|
|
4189
|
+
title?: string | undefined;
|
|
4190
|
+
detail?: string | undefined;
|
|
4191
|
+
source?: {
|
|
4192
|
+
pointer?: string | undefined;
|
|
4193
|
+
parameter?: string | undefined;
|
|
4194
|
+
} | undefined;
|
|
4195
|
+
}, {
|
|
4196
|
+
status?: string | undefined;
|
|
4197
|
+
code?: string | undefined;
|
|
4198
|
+
id?: string | undefined;
|
|
4199
|
+
links?: {
|
|
4200
|
+
about?: string | undefined;
|
|
4201
|
+
} | undefined;
|
|
4202
|
+
meta?: Record<string, unknown> | undefined;
|
|
4203
|
+
title?: string | undefined;
|
|
4204
|
+
detail?: string | undefined;
|
|
4205
|
+
source?: {
|
|
4206
|
+
pointer?: string | undefined;
|
|
4207
|
+
parameter?: string | undefined;
|
|
4208
|
+
} | undefined;
|
|
4209
|
+
}>, "many">;
|
|
4210
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4211
|
+
}, "strip", z.ZodTypeAny, {
|
|
4212
|
+
errors: {
|
|
4213
|
+
status?: string | undefined;
|
|
4214
|
+
code?: string | undefined;
|
|
4215
|
+
id?: string | undefined;
|
|
4216
|
+
links?: {
|
|
4217
|
+
about?: string | undefined;
|
|
4218
|
+
} | undefined;
|
|
4219
|
+
meta?: Record<string, unknown> | undefined;
|
|
4220
|
+
title?: string | undefined;
|
|
4221
|
+
detail?: string | undefined;
|
|
4222
|
+
source?: {
|
|
4223
|
+
pointer?: string | undefined;
|
|
4224
|
+
parameter?: string | undefined;
|
|
4225
|
+
} | undefined;
|
|
4226
|
+
}[];
|
|
4227
|
+
meta?: Record<string, unknown> | undefined;
|
|
4228
|
+
}, {
|
|
4229
|
+
errors: {
|
|
4230
|
+
status?: string | undefined;
|
|
4231
|
+
code?: string | undefined;
|
|
4232
|
+
id?: string | undefined;
|
|
4233
|
+
links?: {
|
|
4234
|
+
about?: string | undefined;
|
|
4235
|
+
} | undefined;
|
|
4236
|
+
meta?: Record<string, unknown> | undefined;
|
|
4237
|
+
title?: string | undefined;
|
|
4238
|
+
detail?: string | undefined;
|
|
4239
|
+
source?: {
|
|
4240
|
+
pointer?: string | undefined;
|
|
4241
|
+
parameter?: string | undefined;
|
|
4242
|
+
} | undefined;
|
|
4243
|
+
}[];
|
|
4244
|
+
meta?: Record<string, unknown> | undefined;
|
|
4245
|
+
}>;
|
|
4246
|
+
404: z.ZodObject<{
|
|
4247
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4248
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4249
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4250
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4251
|
+
}, "strip", z.ZodTypeAny, {
|
|
4252
|
+
about?: string | undefined;
|
|
4253
|
+
}, {
|
|
4254
|
+
about?: string | undefined;
|
|
4255
|
+
}>>;
|
|
4256
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4257
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4258
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4259
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4260
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4261
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4262
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4263
|
+
}, "strip", z.ZodTypeAny, {
|
|
4264
|
+
pointer?: string | undefined;
|
|
4265
|
+
parameter?: string | undefined;
|
|
4266
|
+
}, {
|
|
4267
|
+
pointer?: string | undefined;
|
|
4268
|
+
parameter?: string | undefined;
|
|
4269
|
+
}>>;
|
|
4270
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4271
|
+
}, "strip", z.ZodTypeAny, {
|
|
4272
|
+
status?: string | undefined;
|
|
4273
|
+
code?: string | undefined;
|
|
4274
|
+
id?: string | undefined;
|
|
4275
|
+
links?: {
|
|
4276
|
+
about?: string | undefined;
|
|
4277
|
+
} | undefined;
|
|
4278
|
+
meta?: Record<string, unknown> | undefined;
|
|
4279
|
+
title?: string | undefined;
|
|
4280
|
+
detail?: string | undefined;
|
|
4281
|
+
source?: {
|
|
4282
|
+
pointer?: string | undefined;
|
|
4283
|
+
parameter?: string | undefined;
|
|
4284
|
+
} | undefined;
|
|
4285
|
+
}, {
|
|
4286
|
+
status?: string | undefined;
|
|
4287
|
+
code?: string | undefined;
|
|
4288
|
+
id?: string | undefined;
|
|
4289
|
+
links?: {
|
|
4290
|
+
about?: string | undefined;
|
|
4291
|
+
} | undefined;
|
|
4292
|
+
meta?: Record<string, unknown> | undefined;
|
|
4293
|
+
title?: string | undefined;
|
|
4294
|
+
detail?: string | undefined;
|
|
4295
|
+
source?: {
|
|
4296
|
+
pointer?: string | undefined;
|
|
4297
|
+
parameter?: string | undefined;
|
|
4298
|
+
} | undefined;
|
|
4299
|
+
}>, "many">;
|
|
4300
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4301
|
+
}, "strip", z.ZodTypeAny, {
|
|
4302
|
+
errors: {
|
|
4303
|
+
status?: string | undefined;
|
|
4304
|
+
code?: string | undefined;
|
|
4305
|
+
id?: string | undefined;
|
|
4306
|
+
links?: {
|
|
4307
|
+
about?: string | undefined;
|
|
4308
|
+
} | undefined;
|
|
4309
|
+
meta?: Record<string, unknown> | undefined;
|
|
4310
|
+
title?: string | undefined;
|
|
4311
|
+
detail?: string | undefined;
|
|
4312
|
+
source?: {
|
|
4313
|
+
pointer?: string | undefined;
|
|
4314
|
+
parameter?: string | undefined;
|
|
4315
|
+
} | undefined;
|
|
4316
|
+
}[];
|
|
4317
|
+
meta?: Record<string, unknown> | undefined;
|
|
4318
|
+
}, {
|
|
4319
|
+
errors: {
|
|
4320
|
+
status?: string | undefined;
|
|
4321
|
+
code?: string | undefined;
|
|
4322
|
+
id?: string | undefined;
|
|
4323
|
+
links?: {
|
|
4324
|
+
about?: string | undefined;
|
|
4325
|
+
} | undefined;
|
|
4326
|
+
meta?: Record<string, unknown> | undefined;
|
|
4327
|
+
title?: string | undefined;
|
|
4328
|
+
detail?: string | undefined;
|
|
4329
|
+
source?: {
|
|
4330
|
+
pointer?: string | undefined;
|
|
4331
|
+
parameter?: string | undefined;
|
|
4332
|
+
} | undefined;
|
|
4333
|
+
}[];
|
|
4334
|
+
meta?: Record<string, unknown> | undefined;
|
|
4335
|
+
}>;
|
|
4336
|
+
401: z.ZodObject<{
|
|
4337
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
4338
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4339
|
+
links: z.ZodOptional<z.ZodObject<{
|
|
4340
|
+
about: z.ZodOptional<z.ZodString>;
|
|
4341
|
+
}, "strip", z.ZodTypeAny, {
|
|
4342
|
+
about?: string | undefined;
|
|
4343
|
+
}, {
|
|
4344
|
+
about?: string | undefined;
|
|
4345
|
+
}>>;
|
|
4346
|
+
status: z.ZodOptional<z.ZodString>;
|
|
4347
|
+
code: z.ZodOptional<z.ZodString>;
|
|
4348
|
+
title: z.ZodOptional<z.ZodString>;
|
|
4349
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
4350
|
+
source: z.ZodOptional<z.ZodObject<{
|
|
4351
|
+
pointer: z.ZodOptional<z.ZodString>;
|
|
4352
|
+
parameter: z.ZodOptional<z.ZodString>;
|
|
4353
|
+
}, "strip", z.ZodTypeAny, {
|
|
4354
|
+
pointer?: string | undefined;
|
|
4355
|
+
parameter?: string | undefined;
|
|
4356
|
+
}, {
|
|
4357
|
+
pointer?: string | undefined;
|
|
4358
|
+
parameter?: string | undefined;
|
|
4359
|
+
}>>;
|
|
4360
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4361
|
+
}, "strip", z.ZodTypeAny, {
|
|
4362
|
+
status?: string | undefined;
|
|
4363
|
+
code?: string | undefined;
|
|
4364
|
+
id?: string | undefined;
|
|
4365
|
+
links?: {
|
|
4366
|
+
about?: string | undefined;
|
|
4367
|
+
} | undefined;
|
|
4368
|
+
meta?: Record<string, unknown> | undefined;
|
|
4369
|
+
title?: string | undefined;
|
|
4370
|
+
detail?: string | undefined;
|
|
4371
|
+
source?: {
|
|
4372
|
+
pointer?: string | undefined;
|
|
4373
|
+
parameter?: string | undefined;
|
|
4374
|
+
} | undefined;
|
|
4375
|
+
}, {
|
|
4376
|
+
status?: string | undefined;
|
|
4377
|
+
code?: string | undefined;
|
|
4378
|
+
id?: string | undefined;
|
|
4379
|
+
links?: {
|
|
4380
|
+
about?: string | undefined;
|
|
4381
|
+
} | undefined;
|
|
4382
|
+
meta?: Record<string, unknown> | undefined;
|
|
4383
|
+
title?: string | undefined;
|
|
4384
|
+
detail?: string | undefined;
|
|
4385
|
+
source?: {
|
|
4386
|
+
pointer?: string | undefined;
|
|
4387
|
+
parameter?: string | undefined;
|
|
4388
|
+
} | undefined;
|
|
4389
|
+
}>, "many">;
|
|
4390
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
4391
|
+
}, "strip", z.ZodTypeAny, {
|
|
4392
|
+
errors: {
|
|
4393
|
+
status?: string | undefined;
|
|
4394
|
+
code?: string | undefined;
|
|
4395
|
+
id?: string | undefined;
|
|
4396
|
+
links?: {
|
|
4397
|
+
about?: string | undefined;
|
|
4398
|
+
} | undefined;
|
|
4399
|
+
meta?: Record<string, unknown> | undefined;
|
|
4400
|
+
title?: string | undefined;
|
|
4401
|
+
detail?: string | undefined;
|
|
4402
|
+
source?: {
|
|
4403
|
+
pointer?: string | undefined;
|
|
4404
|
+
parameter?: string | undefined;
|
|
4405
|
+
} | undefined;
|
|
4406
|
+
}[];
|
|
4407
|
+
meta?: Record<string, unknown> | undefined;
|
|
4408
|
+
}, {
|
|
4409
|
+
errors: {
|
|
4410
|
+
status?: string | undefined;
|
|
4411
|
+
code?: string | undefined;
|
|
4412
|
+
id?: string | undefined;
|
|
4413
|
+
links?: {
|
|
4414
|
+
about?: string | undefined;
|
|
4415
|
+
} | undefined;
|
|
4416
|
+
meta?: Record<string, unknown> | undefined;
|
|
4417
|
+
title?: string | undefined;
|
|
4418
|
+
detail?: string | undefined;
|
|
4419
|
+
source?: {
|
|
4420
|
+
pointer?: string | undefined;
|
|
4421
|
+
parameter?: string | undefined;
|
|
4422
|
+
} | undefined;
|
|
4423
|
+
}[];
|
|
4424
|
+
meta?: Record<string, unknown> | undefined;
|
|
4425
|
+
}>;
|
|
4426
|
+
};
|
|
4427
|
+
};
|
|
4059
4428
|
confirmSubscriptionPayment: {
|
|
4060
4429
|
query: z.ZodObject<{
|
|
4061
4430
|
trxref: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.routes.d.ts","sourceRoot":"","sources":["../../src/routes/subscriptions.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"subscriptions.routes.d.ts","sourceRoot":"","sources":["../../src/routes/subscriptions.routes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAsBxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2P9B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { initContract } from '@ts-rest/core';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { subscriptionResponseSchema, subscriptionListResponseSchema, upgradeSubscriptionAttributesSchema, usageTrackingListResponseSchema, tierLimitsResponseSchema, currentUsageResponseSchema, availablePlansResponseSchema, createSubscriptionPaymentLinkAttributesSchema, subscriptionPaymentLinkResponseSchema, } from '../schemas/subscriptions.schemas';
|
|
3
|
+
import { subscriptionResponseSchema, subscriptionListResponseSchema, upgradeSubscriptionAttributesSchema, usageTrackingListResponseSchema, tierLimitsResponseSchema, currentUsageResponseSchema, availablePlansResponseSchema, createSubscriptionPaymentLinkAttributesSchema, createAgronomistChatPackPaymentLinkAttributesSchema, agronomistChatPackPaymentLinkResponseSchema, subscriptionPaymentLinkResponseSchema, } from '../schemas/subscriptions.schemas';
|
|
4
4
|
import { jsonApiErrorResponseSchema, jsonApiPaginationQuerySchema, } from '../schemas/common.schemas';
|
|
5
5
|
import { iso4217CurrencySchema } from '../schemas/locale.schemas';
|
|
6
6
|
const c = initContract();
|
|
@@ -194,6 +194,27 @@ export const subscriptionsRouter = c.router({
|
|
|
194
194
|
summary: 'Verify and activate subscription',
|
|
195
195
|
description: 'Verify payment and automatically upgrade subscription. Typically called after payment redirect or when webhook fails.',
|
|
196
196
|
},
|
|
197
|
+
// One-time +25 agronomist chat pack (calendar-month top-up)
|
|
198
|
+
createAgronomistChatPackPaymentLink: {
|
|
199
|
+
method: 'POST',
|
|
200
|
+
path: '/farms/:farmId/subscriptions/agronomist-chat-pack/payment-link',
|
|
201
|
+
pathParams: z.object({ farmId: z.string().uuid() }),
|
|
202
|
+
body: z.object({
|
|
203
|
+
data: z.object({
|
|
204
|
+
type: z.literal('agronomist-chat-packs'),
|
|
205
|
+
attributes: createAgronomistChatPackPaymentLinkAttributesSchema,
|
|
206
|
+
}),
|
|
207
|
+
}),
|
|
208
|
+
responses: {
|
|
209
|
+
201: agronomistChatPackPaymentLinkResponseSchema,
|
|
210
|
+
400: jsonApiErrorResponseSchema,
|
|
211
|
+
404: jsonApiErrorResponseSchema,
|
|
212
|
+
401: jsonApiErrorResponseSchema,
|
|
213
|
+
},
|
|
214
|
+
summary: 'Create agronomist chat pack payment link',
|
|
215
|
+
description: 'Create a Paystack payment link for a one-time +25 agronomist chat pack (NGN 2500 / USD 1.88). ' +
|
|
216
|
+
'After verify/webhook, the farm gets +25 chats for the current calendar month.',
|
|
217
|
+
},
|
|
197
218
|
confirmSubscriptionPayment: {
|
|
198
219
|
method: 'GET',
|
|
199
220
|
path: '/subscriptions/confirm',
|