@deepintel-ltd/farmpro-contracts 1.30.0 → 1.32.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 +12 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrations.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/integrations.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAC/E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWlC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEtC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;EAQtC,CAAC;AAEH,eAAO,MAAM,+BAA+B;IAC1C,kNAAkN;;;;;;EAElN,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;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,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAEhC,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Provenance attached to every third-party datum (integrations plan §3.1). */
|
|
3
|
+
export const provenanceTagSchema = z.object({
|
|
4
|
+
provider: z.string(),
|
|
5
|
+
retrievedAt: z.string(),
|
|
6
|
+
licence: z.string(),
|
|
7
|
+
confidence: z.number().min(0).max(1),
|
|
8
|
+
});
|
|
9
|
+
export const integrationStatusSchema = z.object({
|
|
10
|
+
key: z.string(),
|
|
11
|
+
name: z.string(),
|
|
12
|
+
category: z.string(),
|
|
13
|
+
configured: z.boolean(),
|
|
14
|
+
enabled: z.boolean(),
|
|
15
|
+
worksWithoutKeys: z.boolean().optional(),
|
|
16
|
+
missingEnv: z.array(z.string()),
|
|
17
|
+
callsToday: z.number(),
|
|
18
|
+
licence: z.string(),
|
|
19
|
+
workspaces: z.array(z.string()),
|
|
20
|
+
});
|
|
21
|
+
export const integrationStatusListSchema = z.object({
|
|
22
|
+
data: z.array(integrationStatusSchema),
|
|
23
|
+
});
|
|
24
|
+
export const priceFeedIngestResultSchema = z.object({
|
|
25
|
+
data: z.array(z.object({
|
|
26
|
+
source: z.string(),
|
|
27
|
+
rows: z.number().int(),
|
|
28
|
+
error: z.string().optional(),
|
|
29
|
+
})),
|
|
30
|
+
});
|
|
31
|
+
export const importProductRegistryBodySchema = z.object({
|
|
32
|
+
/** CSV with header: kind,country,product_name,active_ingredients,registration_number,registrant,formulation,status,crops,species,label_rate,pre_harvest_days,withdrawal_days,ppe,source,source_url,verified_at */
|
|
33
|
+
csv: z.string().min(1).max(5_000_000),
|
|
34
|
+
});
|
|
35
|
+
export const importProductRegistryResultSchema = z.object({
|
|
36
|
+
data: z.object({
|
|
37
|
+
upserted: z.number().int(),
|
|
38
|
+
skipped: z.array(z.object({ row: z.number().int(), reason: z.string() })),
|
|
39
|
+
}),
|
|
40
|
+
});
|
|
41
|
+
export const outbreakSpeciesSchema = z.enum(['poultry', 'cattle', 'goat', 'sheep', 'pig', 'fish', 'crops']);
|
|
42
|
+
export const createOutbreakBodySchema = z.object({
|
|
43
|
+
externalId: z.string().min(1).max(120),
|
|
44
|
+
source: z.string().max(20).optional(),
|
|
45
|
+
disease: z.string().min(2).max(200),
|
|
46
|
+
species: z.array(outbreakSpeciesSchema).min(1),
|
|
47
|
+
country: z.string().length(2).optional(),
|
|
48
|
+
admin1: z.string().max(80).nullable().optional(),
|
|
49
|
+
admin2: z.string().max(120).nullable().optional(),
|
|
50
|
+
latitude: z.number().min(-90).max(90).nullable().optional(),
|
|
51
|
+
longitude: z.number().min(-180).max(180).nullable().optional(),
|
|
52
|
+
status: z.enum(['suspected', 'confirmed', 'resolved']).optional(),
|
|
53
|
+
reportedAt: z.string(),
|
|
54
|
+
startedAt: z.string().nullable().optional(),
|
|
55
|
+
cases: z.number().int().nullable().optional(),
|
|
56
|
+
deaths: z.number().int().nullable().optional(),
|
|
57
|
+
summary: z.string().max(2000).nullable().optional(),
|
|
58
|
+
sourceUrl: z.string().url().nullable().optional(),
|
|
59
|
+
});
|
|
60
|
+
export const outbreakEventSchema = z.object({
|
|
61
|
+
id: z.string(),
|
|
62
|
+
source: z.string(),
|
|
63
|
+
disease: z.string(),
|
|
64
|
+
diseaseKey: z.string(),
|
|
65
|
+
species: z.array(z.string()),
|
|
66
|
+
admin1: z.string().nullable(),
|
|
67
|
+
admin2: z.string().nullable(),
|
|
68
|
+
status: z.string(),
|
|
69
|
+
notifiable: z.boolean(),
|
|
70
|
+
reportedAt: z.string(),
|
|
71
|
+
cases: z.number().nullable(),
|
|
72
|
+
deaths: z.number().nullable(),
|
|
73
|
+
summary: z.string().nullable(),
|
|
74
|
+
sourceUrl: z.string().nullable(),
|
|
75
|
+
guidance: z.array(z.string()),
|
|
76
|
+
});
|
|
77
|
+
export const outbreakListSchema = z.object({ data: z.array(outbreakEventSchema) });
|
|
78
|
+
export const voiceLanguageSchema = z.enum(['en', 'yo', 'ha', 'ig', 'pcm']);
|
|
79
|
+
export const transcribeVoiceBodySchema = z.object({
|
|
80
|
+
/** Audio file (multipart field `audio`): ogg, m4a, mp3, wav — max 25 MB. */
|
|
81
|
+
audio: z.unknown().optional(),
|
|
82
|
+
language: voiceLanguageSchema.optional(),
|
|
83
|
+
});
|
|
84
|
+
export const transcriptResponseSchema = z.object({
|
|
85
|
+
data: z.object({
|
|
86
|
+
text: z.string(),
|
|
87
|
+
language: voiceLanguageSchema.nullable(),
|
|
88
|
+
}),
|
|
89
|
+
provenance: provenanceTagSchema,
|
|
90
|
+
});
|
|
91
|
+
export const speakBodySchema = z.object({
|
|
92
|
+
text: z.string().min(1).max(1500),
|
|
93
|
+
language: voiceLanguageSchema,
|
|
94
|
+
});
|
|
95
|
+
export const speakResponseSchema = z.object({
|
|
96
|
+
data: z.object({
|
|
97
|
+
audioBase64: z.string(),
|
|
98
|
+
contentType: z.string(),
|
|
99
|
+
}),
|
|
100
|
+
});
|
|
101
|
+
export const startBankLinkBodySchema = z.object({
|
|
102
|
+
/** NDPA: the owner explicitly agreed to share bank transactions with FarmPro. */
|
|
103
|
+
consent: z.literal(true),
|
|
104
|
+
/** Where Mono sends the user after linking (app deep link or web page). */
|
|
105
|
+
redirectUrl: z.string().url().optional(),
|
|
106
|
+
});
|
|
107
|
+
export const linkBankBodySchema = z.object({
|
|
108
|
+
code: z.string().min(4).max(200),
|
|
109
|
+
});
|
|
110
|
+
export const bankLineSchema = z.object({
|
|
111
|
+
id: z.string(),
|
|
112
|
+
transactionDate: z.string(),
|
|
113
|
+
description: z.string(),
|
|
114
|
+
amount: z.number(),
|
|
115
|
+
suggestedWorkspace: z.string().nullable(),
|
|
116
|
+
suggestedCategory: z.string().nullable(),
|
|
117
|
+
suggestionConfidence: z.number().nullable(),
|
|
118
|
+
suggestionReason: z.string().nullable(),
|
|
119
|
+
reviewStatus: z.string(),
|
|
120
|
+
});
|
|
121
|
+
export const bankLineListSchema = z.object({ data: z.array(bankLineSchema) });
|
|
122
|
+
export const cropConditionSchema = z.object({
|
|
123
|
+
data: z.object({
|
|
124
|
+
fieldId: z.string(),
|
|
125
|
+
mode: z.enum(['ndvi', 'sar']),
|
|
126
|
+
capturedAt: z.string(),
|
|
127
|
+
ndvi: z.number().optional(),
|
|
128
|
+
vv: z.number().optional(),
|
|
129
|
+
vh: z.number().optional(),
|
|
130
|
+
ratio: z.number().optional(),
|
|
131
|
+
previousRatio: z.number().optional(),
|
|
132
|
+
ratioChangePercent: z.number().optional(),
|
|
133
|
+
note: z.string(),
|
|
134
|
+
}),
|
|
135
|
+
provenance: provenanceTagSchema,
|
|
136
|
+
});
|
|
137
|
+
export const eInvoiceSubmitBodySchema = z.object({
|
|
138
|
+
invoiceId: z.string().uuid(),
|
|
139
|
+
});
|
|
140
|
+
export const eInvoiceResultSchema = z.object({
|
|
141
|
+
data: z.object({
|
|
142
|
+
irn: z.string(),
|
|
143
|
+
qr: z.string(),
|
|
144
|
+
status: z.string(),
|
|
145
|
+
}),
|
|
146
|
+
});
|
|
147
|
+
export const importNimetBodySchema = z.object({
|
|
148
|
+
csv: z.string().min(1).max(1_000_000),
|
|
149
|
+
});
|
|
@@ -90,6 +90,12 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
|
|
|
90
90
|
farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
91
91
|
commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
|
|
92
92
|
invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
|
|
93
|
+
virtualAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
94
|
+
virtualAccountBank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
95
|
+
eInvoiceIrn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
eInvoiceQr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
eInvoiceStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
98
|
+
eInvoiceSubmittedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
93
99
|
organizationId: z.ZodString;
|
|
94
100
|
} & {
|
|
95
101
|
createdAt: z.ZodString;
|
|
@@ -139,6 +145,12 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
|
|
|
139
145
|
bankAccountId?: string | null | undefined;
|
|
140
146
|
waybillId?: string | null | undefined;
|
|
141
147
|
totalInWords?: string | null | undefined;
|
|
148
|
+
virtualAccountNumber?: string | null | undefined;
|
|
149
|
+
virtualAccountBank?: string | null | undefined;
|
|
150
|
+
eInvoiceIrn?: string | null | undefined;
|
|
151
|
+
eInvoiceQr?: string | null | undefined;
|
|
152
|
+
eInvoiceStatus?: string | null | undefined;
|
|
153
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
142
154
|
}, {
|
|
143
155
|
createdAt: string;
|
|
144
156
|
updatedAt: string;
|
|
@@ -184,6 +196,12 @@ export declare const invoiceAttributesSchema: z.ZodObject<{
|
|
|
184
196
|
waybillId?: string | null | undefined;
|
|
185
197
|
totalInWords?: string | null | undefined;
|
|
186
198
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
199
|
+
virtualAccountNumber?: string | null | undefined;
|
|
200
|
+
virtualAccountBank?: string | null | undefined;
|
|
201
|
+
eInvoiceIrn?: string | null | undefined;
|
|
202
|
+
eInvoiceQr?: string | null | undefined;
|
|
203
|
+
eInvoiceStatus?: string | null | undefined;
|
|
204
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
187
205
|
}>;
|
|
188
206
|
export declare const createInvoiceAttributesSchema: z.ZodObject<{
|
|
189
207
|
issueDate: z.ZodOptional<z.ZodString>;
|
|
@@ -851,6 +869,12 @@ export declare const invoiceResourceSchema: z.ZodObject<{
|
|
|
851
869
|
farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
852
870
|
commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
|
|
853
871
|
invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
|
|
872
|
+
virtualAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
873
|
+
virtualAccountBank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
874
|
+
eInvoiceIrn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
875
|
+
eInvoiceQr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
876
|
+
eInvoiceStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
877
|
+
eInvoiceSubmittedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
854
878
|
organizationId: z.ZodString;
|
|
855
879
|
} & {
|
|
856
880
|
createdAt: z.ZodString;
|
|
@@ -900,6 +924,12 @@ export declare const invoiceResourceSchema: z.ZodObject<{
|
|
|
900
924
|
bankAccountId?: string | null | undefined;
|
|
901
925
|
waybillId?: string | null | undefined;
|
|
902
926
|
totalInWords?: string | null | undefined;
|
|
927
|
+
virtualAccountNumber?: string | null | undefined;
|
|
928
|
+
virtualAccountBank?: string | null | undefined;
|
|
929
|
+
eInvoiceIrn?: string | null | undefined;
|
|
930
|
+
eInvoiceQr?: string | null | undefined;
|
|
931
|
+
eInvoiceStatus?: string | null | undefined;
|
|
932
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
903
933
|
}, {
|
|
904
934
|
createdAt: string;
|
|
905
935
|
updatedAt: string;
|
|
@@ -945,6 +975,12 @@ export declare const invoiceResourceSchema: z.ZodObject<{
|
|
|
945
975
|
waybillId?: string | null | undefined;
|
|
946
976
|
totalInWords?: string | null | undefined;
|
|
947
977
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
978
|
+
virtualAccountNumber?: string | null | undefined;
|
|
979
|
+
virtualAccountBank?: string | null | undefined;
|
|
980
|
+
eInvoiceIrn?: string | null | undefined;
|
|
981
|
+
eInvoiceQr?: string | null | undefined;
|
|
982
|
+
eInvoiceStatus?: string | null | undefined;
|
|
983
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
948
984
|
}>;
|
|
949
985
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
950
986
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -997,6 +1033,12 @@ export declare const invoiceResourceSchema: z.ZodObject<{
|
|
|
997
1033
|
bankAccountId?: string | null | undefined;
|
|
998
1034
|
waybillId?: string | null | undefined;
|
|
999
1035
|
totalInWords?: string | null | undefined;
|
|
1036
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1037
|
+
virtualAccountBank?: string | null | undefined;
|
|
1038
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1039
|
+
eInvoiceQr?: string | null | undefined;
|
|
1040
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1041
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1000
1042
|
};
|
|
1001
1043
|
relationships?: Record<string, unknown> | undefined;
|
|
1002
1044
|
links?: Record<string, string> | undefined;
|
|
@@ -1049,6 +1091,12 @@ export declare const invoiceResourceSchema: z.ZodObject<{
|
|
|
1049
1091
|
waybillId?: string | null | undefined;
|
|
1050
1092
|
totalInWords?: string | null | undefined;
|
|
1051
1093
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1094
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1095
|
+
virtualAccountBank?: string | null | undefined;
|
|
1096
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1097
|
+
eInvoiceQr?: string | null | undefined;
|
|
1098
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1099
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1052
1100
|
};
|
|
1053
1101
|
relationships?: Record<string, unknown> | undefined;
|
|
1054
1102
|
links?: Record<string, string> | undefined;
|
|
@@ -1118,6 +1166,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1118
1166
|
farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1119
1167
|
commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
|
|
1120
1168
|
invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
|
|
1169
|
+
virtualAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1170
|
+
virtualAccountBank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1171
|
+
eInvoiceIrn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1172
|
+
eInvoiceQr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1173
|
+
eInvoiceStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1174
|
+
eInvoiceSubmittedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1121
1175
|
organizationId: z.ZodString;
|
|
1122
1176
|
} & {
|
|
1123
1177
|
createdAt: z.ZodString;
|
|
@@ -1167,6 +1221,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1167
1221
|
bankAccountId?: string | null | undefined;
|
|
1168
1222
|
waybillId?: string | null | undefined;
|
|
1169
1223
|
totalInWords?: string | null | undefined;
|
|
1224
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1225
|
+
virtualAccountBank?: string | null | undefined;
|
|
1226
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1227
|
+
eInvoiceQr?: string | null | undefined;
|
|
1228
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1229
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1170
1230
|
}, {
|
|
1171
1231
|
createdAt: string;
|
|
1172
1232
|
updatedAt: string;
|
|
@@ -1212,6 +1272,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1212
1272
|
waybillId?: string | null | undefined;
|
|
1213
1273
|
totalInWords?: string | null | undefined;
|
|
1214
1274
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1275
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1276
|
+
virtualAccountBank?: string | null | undefined;
|
|
1277
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1278
|
+
eInvoiceQr?: string | null | undefined;
|
|
1279
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1280
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1215
1281
|
}>;
|
|
1216
1282
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1217
1283
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1264,6 +1330,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1264
1330
|
bankAccountId?: string | null | undefined;
|
|
1265
1331
|
waybillId?: string | null | undefined;
|
|
1266
1332
|
totalInWords?: string | null | undefined;
|
|
1333
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1334
|
+
virtualAccountBank?: string | null | undefined;
|
|
1335
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1336
|
+
eInvoiceQr?: string | null | undefined;
|
|
1337
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1338
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1267
1339
|
};
|
|
1268
1340
|
relationships?: Record<string, unknown> | undefined;
|
|
1269
1341
|
links?: Record<string, string> | undefined;
|
|
@@ -1316,6 +1388,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1316
1388
|
waybillId?: string | null | undefined;
|
|
1317
1389
|
totalInWords?: string | null | undefined;
|
|
1318
1390
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1391
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1392
|
+
virtualAccountBank?: string | null | undefined;
|
|
1393
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1394
|
+
eInvoiceQr?: string | null | undefined;
|
|
1395
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1396
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1319
1397
|
};
|
|
1320
1398
|
relationships?: Record<string, unknown> | undefined;
|
|
1321
1399
|
links?: Record<string, string> | undefined;
|
|
@@ -1394,6 +1472,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1394
1472
|
bankAccountId?: string | null | undefined;
|
|
1395
1473
|
waybillId?: string | null | undefined;
|
|
1396
1474
|
totalInWords?: string | null | undefined;
|
|
1475
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1476
|
+
virtualAccountBank?: string | null | undefined;
|
|
1477
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1478
|
+
eInvoiceQr?: string | null | undefined;
|
|
1479
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1480
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1397
1481
|
};
|
|
1398
1482
|
relationships?: Record<string, unknown> | undefined;
|
|
1399
1483
|
links?: Record<string, string> | undefined;
|
|
@@ -1458,6 +1542,12 @@ export declare const invoiceResponseSchema: z.ZodObject<{
|
|
|
1458
1542
|
waybillId?: string | null | undefined;
|
|
1459
1543
|
totalInWords?: string | null | undefined;
|
|
1460
1544
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1545
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1546
|
+
virtualAccountBank?: string | null | undefined;
|
|
1547
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1548
|
+
eInvoiceQr?: string | null | undefined;
|
|
1549
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1550
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1461
1551
|
};
|
|
1462
1552
|
relationships?: Record<string, unknown> | undefined;
|
|
1463
1553
|
links?: Record<string, string> | undefined;
|
|
@@ -1538,6 +1628,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1538
1628
|
farmId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1539
1629
|
commercialIntent: z.ZodNullable<z.ZodOptional<z.ZodEnum<["farm_sale", "trade"]>>>;
|
|
1540
1630
|
invoiceKind: z.ZodDefault<z.ZodOptional<z.ZodEnum<["provisional", "final"]>>>;
|
|
1631
|
+
virtualAccountNumber: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1632
|
+
virtualAccountBank: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1633
|
+
eInvoiceIrn: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1634
|
+
eInvoiceQr: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1635
|
+
eInvoiceStatus: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1636
|
+
eInvoiceSubmittedAt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
1541
1637
|
organizationId: z.ZodString;
|
|
1542
1638
|
} & {
|
|
1543
1639
|
createdAt: z.ZodString;
|
|
@@ -1587,6 +1683,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1587
1683
|
bankAccountId?: string | null | undefined;
|
|
1588
1684
|
waybillId?: string | null | undefined;
|
|
1589
1685
|
totalInWords?: string | null | undefined;
|
|
1686
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1687
|
+
virtualAccountBank?: string | null | undefined;
|
|
1688
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1689
|
+
eInvoiceQr?: string | null | undefined;
|
|
1690
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1691
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1590
1692
|
}, {
|
|
1591
1693
|
createdAt: string;
|
|
1592
1694
|
updatedAt: string;
|
|
@@ -1632,6 +1734,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1632
1734
|
waybillId?: string | null | undefined;
|
|
1633
1735
|
totalInWords?: string | null | undefined;
|
|
1634
1736
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1737
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1738
|
+
virtualAccountBank?: string | null | undefined;
|
|
1739
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1740
|
+
eInvoiceQr?: string | null | undefined;
|
|
1741
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1742
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1635
1743
|
}>;
|
|
1636
1744
|
relationships: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1637
1745
|
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -1684,6 +1792,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1684
1792
|
bankAccountId?: string | null | undefined;
|
|
1685
1793
|
waybillId?: string | null | undefined;
|
|
1686
1794
|
totalInWords?: string | null | undefined;
|
|
1795
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1796
|
+
virtualAccountBank?: string | null | undefined;
|
|
1797
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1798
|
+
eInvoiceQr?: string | null | undefined;
|
|
1799
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1800
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1687
1801
|
};
|
|
1688
1802
|
relationships?: Record<string, unknown> | undefined;
|
|
1689
1803
|
links?: Record<string, string> | undefined;
|
|
@@ -1736,6 +1850,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1736
1850
|
waybillId?: string | null | undefined;
|
|
1737
1851
|
totalInWords?: string | null | undefined;
|
|
1738
1852
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
1853
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1854
|
+
virtualAccountBank?: string | null | undefined;
|
|
1855
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1856
|
+
eInvoiceQr?: string | null | undefined;
|
|
1857
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1858
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1739
1859
|
};
|
|
1740
1860
|
relationships?: Record<string, unknown> | undefined;
|
|
1741
1861
|
links?: Record<string, string> | undefined;
|
|
@@ -1814,6 +1934,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1814
1934
|
bankAccountId?: string | null | undefined;
|
|
1815
1935
|
waybillId?: string | null | undefined;
|
|
1816
1936
|
totalInWords?: string | null | undefined;
|
|
1937
|
+
virtualAccountNumber?: string | null | undefined;
|
|
1938
|
+
virtualAccountBank?: string | null | undefined;
|
|
1939
|
+
eInvoiceIrn?: string | null | undefined;
|
|
1940
|
+
eInvoiceQr?: string | null | undefined;
|
|
1941
|
+
eInvoiceStatus?: string | null | undefined;
|
|
1942
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1817
1943
|
};
|
|
1818
1944
|
relationships?: Record<string, unknown> | undefined;
|
|
1819
1945
|
links?: Record<string, string> | undefined;
|
|
@@ -1878,6 +2004,12 @@ export declare const invoiceListResponseSchema: z.ZodObject<{
|
|
|
1878
2004
|
waybillId?: string | null | undefined;
|
|
1879
2005
|
totalInWords?: string | null | undefined;
|
|
1880
2006
|
invoiceKind?: "provisional" | "final" | undefined;
|
|
2007
|
+
virtualAccountNumber?: string | null | undefined;
|
|
2008
|
+
virtualAccountBank?: string | null | undefined;
|
|
2009
|
+
eInvoiceIrn?: string | null | undefined;
|
|
2010
|
+
eInvoiceQr?: string | null | undefined;
|
|
2011
|
+
eInvoiceStatus?: string | null | undefined;
|
|
2012
|
+
eInvoiceSubmittedAt?: string | null | undefined;
|
|
1881
2013
|
};
|
|
1882
2014
|
relationships?: Record<string, unknown> | undefined;
|
|
1883
2015
|
links?: Record<string, string> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/invoices.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAGH,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"invoices.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/invoices.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;GAEG;AAGH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS5B,CAAC;AAGH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CV,CAAC;AAG3B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBxC,CAAC;AAGH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAExC,CAAC;AAGH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;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C;AACrE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -49,6 +49,12 @@ export const invoiceAttributesSchema = z.object({
|
|
|
49
49
|
farmId: z.string().uuid().optional().nullable(),
|
|
50
50
|
commercialIntent: z.enum(['farm_sale', 'trade']).optional().nullable(),
|
|
51
51
|
invoiceKind: z.enum(['provisional', 'final']).optional().default('final'),
|
|
52
|
+
virtualAccountNumber: z.string().nullable().optional(),
|
|
53
|
+
virtualAccountBank: z.string().nullable().optional(),
|
|
54
|
+
eInvoiceIrn: z.string().nullable().optional(),
|
|
55
|
+
eInvoiceQr: z.string().nullable().optional(),
|
|
56
|
+
eInvoiceStatus: z.string().nullable().optional(),
|
|
57
|
+
eInvoiceSubmittedAt: z.string().datetime().optional().nullable(),
|
|
52
58
|
organizationId: z.string().uuid(),
|
|
53
59
|
createdAt: z.string().datetime(),
|
|
54
60
|
updatedAt: z.string().datetime(),
|
|
@@ -36,7 +36,7 @@ export declare const regionPackSchema: z.ZodObject<{
|
|
|
36
36
|
cropCatalogId: string;
|
|
37
37
|
marketDataSources: string[];
|
|
38
38
|
geoProvider: string;
|
|
39
|
-
channels: ("
|
|
39
|
+
channels: ("whatsapp" | "web" | "pwa" | "ussd")[];
|
|
40
40
|
compliancePacks: string[];
|
|
41
41
|
accountingPackId: string;
|
|
42
42
|
}, {
|
|
@@ -52,7 +52,7 @@ export declare const regionPackSchema: z.ZodObject<{
|
|
|
52
52
|
cropCatalogId: string;
|
|
53
53
|
marketDataSources: string[];
|
|
54
54
|
geoProvider: string;
|
|
55
|
-
channels: ("
|
|
55
|
+
channels: ("whatsapp" | "web" | "pwa" | "ussd")[];
|
|
56
56
|
compliancePacks: string[];
|
|
57
57
|
accountingPackId?: string | undefined;
|
|
58
58
|
}>;
|
|
@@ -939,6 +939,12 @@ export declare const currentUsageResponseSchema: z.ZodObject<{
|
|
|
939
939
|
resourceType: z.ZodString;
|
|
940
940
|
count: z.ZodNumber;
|
|
941
941
|
limit: z.ZodNullable<z.ZodNumber>;
|
|
942
|
+
/** Chats (or units) still available this period; null when unlimited. */
|
|
943
|
+
remaining: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
944
|
+
/** True when usage is at/above 80% of a finite limit (soft warn). */
|
|
945
|
+
nearLimit: z.ZodOptional<z.ZodBoolean>;
|
|
946
|
+
/** Bonus agronomist chats from packs this calendar month (only for agronomist_chat). */
|
|
947
|
+
packBonus: z.ZodOptional<z.ZodNumber>;
|
|
942
948
|
periodStart: z.ZodString;
|
|
943
949
|
periodEnd: z.ZodString;
|
|
944
950
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -947,12 +953,60 @@ export declare const currentUsageResponseSchema: z.ZodObject<{
|
|
|
947
953
|
periodStart: string;
|
|
948
954
|
periodEnd: string;
|
|
949
955
|
resourceType: string;
|
|
956
|
+
remaining?: number | null | undefined;
|
|
957
|
+
nearLimit?: boolean | undefined;
|
|
958
|
+
packBonus?: number | undefined;
|
|
950
959
|
}, {
|
|
951
960
|
limit: number | null;
|
|
952
961
|
count: number;
|
|
953
962
|
periodStart: string;
|
|
954
963
|
periodEnd: string;
|
|
955
964
|
resourceType: string;
|
|
965
|
+
remaining?: number | null | undefined;
|
|
966
|
+
nearLimit?: boolean | undefined;
|
|
967
|
+
packBonus?: number | undefined;
|
|
968
|
+
}>;
|
|
969
|
+
/** Request body for +25 agronomist chat pack checkout (server sets amount). */
|
|
970
|
+
export declare const createAgronomistChatPackPaymentLinkAttributesSchema: z.ZodObject<{
|
|
971
|
+
currency: z.ZodDefault<z.ZodEnum<["NGN", "USD"]>>;
|
|
972
|
+
}, "strip", z.ZodTypeAny, {
|
|
973
|
+
currency: "NGN" | "USD";
|
|
974
|
+
}, {
|
|
975
|
+
currency?: "NGN" | "USD" | undefined;
|
|
976
|
+
}>;
|
|
977
|
+
/** Response for agronomist chat pack payment link (same shape as subscription payment link). */
|
|
978
|
+
export declare const agronomistChatPackPaymentLinkResponseSchema: z.ZodObject<{
|
|
979
|
+
status: z.ZodLiteral<"success">;
|
|
980
|
+
message: z.ZodString;
|
|
981
|
+
data: z.ZodObject<{
|
|
982
|
+
paymentId: z.ZodString;
|
|
983
|
+
link: z.ZodString;
|
|
984
|
+
tx_ref: z.ZodString;
|
|
985
|
+
}, "strip", z.ZodTypeAny, {
|
|
986
|
+
link: string;
|
|
987
|
+
tx_ref: string;
|
|
988
|
+
paymentId: string;
|
|
989
|
+
}, {
|
|
990
|
+
link: string;
|
|
991
|
+
tx_ref: string;
|
|
992
|
+
paymentId: string;
|
|
993
|
+
}>;
|
|
994
|
+
}, "strip", z.ZodTypeAny, {
|
|
995
|
+
status: "success";
|
|
996
|
+
message: string;
|
|
997
|
+
data: {
|
|
998
|
+
link: string;
|
|
999
|
+
tx_ref: string;
|
|
1000
|
+
paymentId: string;
|
|
1001
|
+
};
|
|
1002
|
+
}, {
|
|
1003
|
+
status: "success";
|
|
1004
|
+
message: string;
|
|
1005
|
+
data: {
|
|
1006
|
+
link: string;
|
|
1007
|
+
tx_ref: string;
|
|
1008
|
+
paymentId: string;
|
|
1009
|
+
};
|
|
956
1010
|
}>;
|
|
957
1011
|
export declare const availablePlanSchema: z.ZodObject<{
|
|
958
1012
|
tier: z.ZodEnum<["FREE", "STARTER_PACK", "COOPERATIVE", "ENTERPRISE", "GOVERNMENT"]>;
|
|
@@ -1452,5 +1506,7 @@ export type CurrentUsage = z.infer<typeof currentUsageResponseSchema>;
|
|
|
1452
1506
|
export type AvailablePlan = z.infer<typeof availablePlanSchema>;
|
|
1453
1507
|
export type AvailablePlansResponse = z.infer<typeof availablePlansResponseSchema>;
|
|
1454
1508
|
export type CreateSubscriptionPaymentLinkAttributes = z.infer<typeof createSubscriptionPaymentLinkAttributesSchema>;
|
|
1509
|
+
export type CreateAgronomistChatPackPaymentLinkAttributes = z.infer<typeof createAgronomistChatPackPaymentLinkAttributesSchema>;
|
|
1510
|
+
export type AgronomistChatPackPaymentLinkResponse = z.infer<typeof agronomistChatPackPaymentLinkResponseSchema>;
|
|
1455
1511
|
export type SubscriptionPaymentLinkResponse = z.infer<typeof subscriptionPaymentLinkResponseSchema>;
|
|
1456
1512
|
//# sourceMappingURL=subscriptions.schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscriptions.schemas.d.ts","sourceRoot":"","sources":["../../src/schemas/subscriptions.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AASxB;;GAEG;AAGH,eAAO,MAAM,sBAAsB,gFAMjC,CAAC;AAGH,eAAO,MAAM,wBAAwB,wDAKnC,CAAC;AAGH,eAAO,MAAM,kBAAkB,4CAI7B,CAAC;AAGH,eAAO,MAAM,wBAAwB,2CAAyC,CAAC;AAK/E,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcf,CAAC;AAG3B,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;EAO7C,CAAC;AAGH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;EAO9C,CAAC;AAGH,eAAO,MAAM,6CAA6C;;;;;;;;;;;;EAQxD,CAAC;AAGH,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhD,CAAC;AAGH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AChF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAClE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAChE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,uCAAuC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6CAA6C,CAAC,CAAC;AACpH,MAAM,MAAM,6CAA6C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mDAAmD,CAAC,CAAC;AAChI,MAAM,MAAM,qCAAqC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2CAA2C,CAAC,CAAC;AAChH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
|
@@ -121,9 +121,21 @@ export const currentUsageResponseSchema = z.object({
|
|
|
121
121
|
resourceType: z.string(),
|
|
122
122
|
count: z.number().int().nonnegative(),
|
|
123
123
|
limit: z.number().int().nullable(),
|
|
124
|
+
/** Chats (or units) still available this period; null when unlimited. */
|
|
125
|
+
remaining: z.number().int().nonnegative().nullable().optional(),
|
|
126
|
+
/** True when usage is at/above 80% of a finite limit (soft warn). */
|
|
127
|
+
nearLimit: z.boolean().optional(),
|
|
128
|
+
/** Bonus agronomist chats from packs this calendar month (only for agronomist_chat). */
|
|
129
|
+
packBonus: z.number().int().nonnegative().optional(),
|
|
124
130
|
periodStart: z.string().datetime(),
|
|
125
131
|
periodEnd: z.string().datetime(),
|
|
126
132
|
});
|
|
133
|
+
/** Request body for +25 agronomist chat pack checkout (server sets amount). */
|
|
134
|
+
export const createAgronomistChatPackPaymentLinkAttributesSchema = z.object({
|
|
135
|
+
currency: paymentCurrencySchema.default('NGN'),
|
|
136
|
+
});
|
|
137
|
+
/** Response for agronomist chat pack payment link (same shape as subscription payment link). */
|
|
138
|
+
export const agronomistChatPackPaymentLinkResponseSchema = subscriptionPaymentLinkResponseSchema;
|
|
127
139
|
// Available subscription plan schema (for landing page)
|
|
128
140
|
const planPriceAmountsSchema = z.object({
|
|
129
141
|
ngn: z.number().nullable(),
|