@deepintel-ltd/farmpro-contracts 1.16.14 → 1.17.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 +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/routes/farms.routes.d.ts +523 -70
- package/dist/routes/farms.routes.d.ts.map +1 -1
- package/dist/routes/field-activities.routes.d.ts +32 -32
- package/dist/routes/monitoring-visualization.routes.d.ts +151 -8
- package/dist/routes/monitoring-visualization.routes.d.ts.map +1 -1
- package/dist/routes/monitoring-visualization.routes.js +15 -1
- package/dist/routes/payments.routes.d.ts +22 -22
- package/dist/routes/subscriptions.routes.d.ts +52 -16
- package/dist/routes/subscriptions.routes.d.ts.map +1 -1
- package/dist/routes/subscriptions.routes.js +2 -1
- package/dist/schemas/farms.schemas.d.ts +610 -84
- package/dist/schemas/farms.schemas.d.ts.map +1 -1
- package/dist/schemas/farms.schemas.js +25 -4
- package/dist/schemas/field-activities.schemas.d.ts +28 -28
- package/dist/schemas/locale.schemas.d.ts +95 -0
- package/dist/schemas/locale.schemas.d.ts.map +1 -0
- package/dist/schemas/locale.schemas.js +54 -0
- package/dist/schemas/monitoring-visualization.schemas.d.ts +138 -11
- package/dist/schemas/monitoring-visualization.schemas.d.ts.map +1 -1
- package/dist/schemas/monitoring-visualization.schemas.js +33 -2
- package/dist/schemas/payments.schemas.d.ts +22 -22
- package/dist/schemas/subscriptions.schemas.d.ts +77 -13
- package/dist/schemas/subscriptions.schemas.d.ts.map +1 -1
- package/dist/schemas/subscriptions.schemas.js +11 -10
- package/package.json +1 -1
|
@@ -962,22 +962,34 @@ export declare const availablePlanSchema: z.ZodObject<{
|
|
|
962
962
|
monthly: z.ZodNullable<z.ZodObject<{
|
|
963
963
|
ngn: z.ZodNullable<z.ZodNumber>;
|
|
964
964
|
usd: z.ZodNullable<z.ZodNumber>;
|
|
965
|
+
ghs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
966
|
+
kes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
965
967
|
}, "strip", z.ZodTypeAny, {
|
|
966
968
|
ngn: number | null;
|
|
967
969
|
usd: number | null;
|
|
970
|
+
ghs?: number | null | undefined;
|
|
971
|
+
kes?: number | null | undefined;
|
|
968
972
|
}, {
|
|
969
973
|
ngn: number | null;
|
|
970
974
|
usd: number | null;
|
|
975
|
+
ghs?: number | null | undefined;
|
|
976
|
+
kes?: number | null | undefined;
|
|
971
977
|
}>>;
|
|
972
978
|
annual: z.ZodNullable<z.ZodObject<{
|
|
973
979
|
ngn: z.ZodNullable<z.ZodNumber>;
|
|
974
980
|
usd: z.ZodNullable<z.ZodNumber>;
|
|
981
|
+
ghs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
982
|
+
kes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
975
983
|
}, "strip", z.ZodTypeAny, {
|
|
976
984
|
ngn: number | null;
|
|
977
985
|
usd: number | null;
|
|
986
|
+
ghs?: number | null | undefined;
|
|
987
|
+
kes?: number | null | undefined;
|
|
978
988
|
}, {
|
|
979
989
|
ngn: number | null;
|
|
980
990
|
usd: number | null;
|
|
991
|
+
ghs?: number | null | undefined;
|
|
992
|
+
kes?: number | null | undefined;
|
|
981
993
|
}>>;
|
|
982
994
|
custom: z.ZodBoolean;
|
|
983
995
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -985,20 +997,28 @@ export declare const availablePlanSchema: z.ZodObject<{
|
|
|
985
997
|
monthly: {
|
|
986
998
|
ngn: number | null;
|
|
987
999
|
usd: number | null;
|
|
1000
|
+
ghs?: number | null | undefined;
|
|
1001
|
+
kes?: number | null | undefined;
|
|
988
1002
|
} | null;
|
|
989
1003
|
annual: {
|
|
990
1004
|
ngn: number | null;
|
|
991
1005
|
usd: number | null;
|
|
1006
|
+
ghs?: number | null | undefined;
|
|
1007
|
+
kes?: number | null | undefined;
|
|
992
1008
|
} | null;
|
|
993
1009
|
}, {
|
|
994
1010
|
custom: boolean;
|
|
995
1011
|
monthly: {
|
|
996
1012
|
ngn: number | null;
|
|
997
1013
|
usd: number | null;
|
|
1014
|
+
ghs?: number | null | undefined;
|
|
1015
|
+
kes?: number | null | undefined;
|
|
998
1016
|
} | null;
|
|
999
1017
|
annual: {
|
|
1000
1018
|
ngn: number | null;
|
|
1001
1019
|
usd: number | null;
|
|
1020
|
+
ghs?: number | null | undefined;
|
|
1021
|
+
kes?: number | null | undefined;
|
|
1002
1022
|
} | null;
|
|
1003
1023
|
}>;
|
|
1004
1024
|
features: z.ZodObject<{
|
|
@@ -1069,10 +1089,14 @@ export declare const availablePlanSchema: z.ZodObject<{
|
|
|
1069
1089
|
monthly: {
|
|
1070
1090
|
ngn: number | null;
|
|
1071
1091
|
usd: number | null;
|
|
1092
|
+
ghs?: number | null | undefined;
|
|
1093
|
+
kes?: number | null | undefined;
|
|
1072
1094
|
} | null;
|
|
1073
1095
|
annual: {
|
|
1074
1096
|
ngn: number | null;
|
|
1075
1097
|
usd: number | null;
|
|
1098
|
+
ghs?: number | null | undefined;
|
|
1099
|
+
kes?: number | null | undefined;
|
|
1076
1100
|
} | null;
|
|
1077
1101
|
};
|
|
1078
1102
|
popular?: boolean | undefined;
|
|
@@ -1100,10 +1124,14 @@ export declare const availablePlanSchema: z.ZodObject<{
|
|
|
1100
1124
|
monthly: {
|
|
1101
1125
|
ngn: number | null;
|
|
1102
1126
|
usd: number | null;
|
|
1127
|
+
ghs?: number | null | undefined;
|
|
1128
|
+
kes?: number | null | undefined;
|
|
1103
1129
|
} | null;
|
|
1104
1130
|
annual: {
|
|
1105
1131
|
ngn: number | null;
|
|
1106
1132
|
usd: number | null;
|
|
1133
|
+
ghs?: number | null | undefined;
|
|
1134
|
+
kes?: number | null | undefined;
|
|
1107
1135
|
} | null;
|
|
1108
1136
|
};
|
|
1109
1137
|
popular?: boolean | undefined;
|
|
@@ -1117,22 +1145,34 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1117
1145
|
monthly: z.ZodNullable<z.ZodObject<{
|
|
1118
1146
|
ngn: z.ZodNullable<z.ZodNumber>;
|
|
1119
1147
|
usd: z.ZodNullable<z.ZodNumber>;
|
|
1148
|
+
ghs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1149
|
+
kes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1120
1150
|
}, "strip", z.ZodTypeAny, {
|
|
1121
1151
|
ngn: number | null;
|
|
1122
1152
|
usd: number | null;
|
|
1153
|
+
ghs?: number | null | undefined;
|
|
1154
|
+
kes?: number | null | undefined;
|
|
1123
1155
|
}, {
|
|
1124
1156
|
ngn: number | null;
|
|
1125
1157
|
usd: number | null;
|
|
1158
|
+
ghs?: number | null | undefined;
|
|
1159
|
+
kes?: number | null | undefined;
|
|
1126
1160
|
}>>;
|
|
1127
1161
|
annual: z.ZodNullable<z.ZodObject<{
|
|
1128
1162
|
ngn: z.ZodNullable<z.ZodNumber>;
|
|
1129
1163
|
usd: z.ZodNullable<z.ZodNumber>;
|
|
1164
|
+
ghs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1165
|
+
kes: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1130
1166
|
}, "strip", z.ZodTypeAny, {
|
|
1131
1167
|
ngn: number | null;
|
|
1132
1168
|
usd: number | null;
|
|
1169
|
+
ghs?: number | null | undefined;
|
|
1170
|
+
kes?: number | null | undefined;
|
|
1133
1171
|
}, {
|
|
1134
1172
|
ngn: number | null;
|
|
1135
1173
|
usd: number | null;
|
|
1174
|
+
ghs?: number | null | undefined;
|
|
1175
|
+
kes?: number | null | undefined;
|
|
1136
1176
|
}>>;
|
|
1137
1177
|
custom: z.ZodBoolean;
|
|
1138
1178
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1140,20 +1180,28 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1140
1180
|
monthly: {
|
|
1141
1181
|
ngn: number | null;
|
|
1142
1182
|
usd: number | null;
|
|
1183
|
+
ghs?: number | null | undefined;
|
|
1184
|
+
kes?: number | null | undefined;
|
|
1143
1185
|
} | null;
|
|
1144
1186
|
annual: {
|
|
1145
1187
|
ngn: number | null;
|
|
1146
1188
|
usd: number | null;
|
|
1189
|
+
ghs?: number | null | undefined;
|
|
1190
|
+
kes?: number | null | undefined;
|
|
1147
1191
|
} | null;
|
|
1148
1192
|
}, {
|
|
1149
1193
|
custom: boolean;
|
|
1150
1194
|
monthly: {
|
|
1151
1195
|
ngn: number | null;
|
|
1152
1196
|
usd: number | null;
|
|
1197
|
+
ghs?: number | null | undefined;
|
|
1198
|
+
kes?: number | null | undefined;
|
|
1153
1199
|
} | null;
|
|
1154
1200
|
annual: {
|
|
1155
1201
|
ngn: number | null;
|
|
1156
1202
|
usd: number | null;
|
|
1203
|
+
ghs?: number | null | undefined;
|
|
1204
|
+
kes?: number | null | undefined;
|
|
1157
1205
|
} | null;
|
|
1158
1206
|
}>;
|
|
1159
1207
|
features: z.ZodObject<{
|
|
@@ -1224,10 +1272,14 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1224
1272
|
monthly: {
|
|
1225
1273
|
ngn: number | null;
|
|
1226
1274
|
usd: number | null;
|
|
1275
|
+
ghs?: number | null | undefined;
|
|
1276
|
+
kes?: number | null | undefined;
|
|
1227
1277
|
} | null;
|
|
1228
1278
|
annual: {
|
|
1229
1279
|
ngn: number | null;
|
|
1230
1280
|
usd: number | null;
|
|
1281
|
+
ghs?: number | null | undefined;
|
|
1282
|
+
kes?: number | null | undefined;
|
|
1231
1283
|
} | null;
|
|
1232
1284
|
};
|
|
1233
1285
|
popular?: boolean | undefined;
|
|
@@ -1255,10 +1307,14 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1255
1307
|
monthly: {
|
|
1256
1308
|
ngn: number | null;
|
|
1257
1309
|
usd: number | null;
|
|
1310
|
+
ghs?: number | null | undefined;
|
|
1311
|
+
kes?: number | null | undefined;
|
|
1258
1312
|
} | null;
|
|
1259
1313
|
annual: {
|
|
1260
1314
|
ngn: number | null;
|
|
1261
1315
|
usd: number | null;
|
|
1316
|
+
ghs?: number | null | undefined;
|
|
1317
|
+
kes?: number | null | undefined;
|
|
1262
1318
|
} | null;
|
|
1263
1319
|
};
|
|
1264
1320
|
popular?: boolean | undefined;
|
|
@@ -1267,27 +1323,27 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1267
1323
|
detectedLocation: z.ZodObject<{
|
|
1268
1324
|
country: z.ZodString;
|
|
1269
1325
|
countryName: z.ZodString;
|
|
1270
|
-
currency: z.ZodEnum<["NGN", "USD"]>;
|
|
1326
|
+
currency: z.ZodEnum<["NGN", "USD", "GHS", "KES", "CAD", "AED", "GBP", "EUR"]>;
|
|
1271
1327
|
}, "strip", z.ZodTypeAny, {
|
|
1272
|
-
currency: "NGN" | "USD";
|
|
1273
|
-
country: string;
|
|
1274
1328
|
countryName: string;
|
|
1275
|
-
|
|
1276
|
-
currency: "NGN" | "USD";
|
|
1329
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1277
1330
|
country: string;
|
|
1331
|
+
}, {
|
|
1278
1332
|
countryName: string;
|
|
1333
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1334
|
+
country: string;
|
|
1279
1335
|
}>;
|
|
1280
1336
|
}, "strip", z.ZodTypeAny, {
|
|
1281
1337
|
detectedLocation: {
|
|
1282
|
-
currency: "NGN" | "USD";
|
|
1283
|
-
country: string;
|
|
1284
1338
|
countryName: string;
|
|
1339
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1340
|
+
country: string;
|
|
1285
1341
|
};
|
|
1286
1342
|
}, {
|
|
1287
1343
|
detectedLocation: {
|
|
1288
|
-
currency: "NGN" | "USD";
|
|
1289
|
-
country: string;
|
|
1290
1344
|
countryName: string;
|
|
1345
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1346
|
+
country: string;
|
|
1291
1347
|
};
|
|
1292
1348
|
}>>;
|
|
1293
1349
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1315,19 +1371,23 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1315
1371
|
monthly: {
|
|
1316
1372
|
ngn: number | null;
|
|
1317
1373
|
usd: number | null;
|
|
1374
|
+
ghs?: number | null | undefined;
|
|
1375
|
+
kes?: number | null | undefined;
|
|
1318
1376
|
} | null;
|
|
1319
1377
|
annual: {
|
|
1320
1378
|
ngn: number | null;
|
|
1321
1379
|
usd: number | null;
|
|
1380
|
+
ghs?: number | null | undefined;
|
|
1381
|
+
kes?: number | null | undefined;
|
|
1322
1382
|
} | null;
|
|
1323
1383
|
};
|
|
1324
1384
|
popular?: boolean | undefined;
|
|
1325
1385
|
}[];
|
|
1326
1386
|
meta?: {
|
|
1327
1387
|
detectedLocation: {
|
|
1328
|
-
currency: "NGN" | "USD";
|
|
1329
|
-
country: string;
|
|
1330
1388
|
countryName: string;
|
|
1389
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1390
|
+
country: string;
|
|
1331
1391
|
};
|
|
1332
1392
|
} | undefined;
|
|
1333
1393
|
}, {
|
|
@@ -1355,19 +1415,23 @@ export declare const availablePlansResponseSchema: z.ZodObject<{
|
|
|
1355
1415
|
monthly: {
|
|
1356
1416
|
ngn: number | null;
|
|
1357
1417
|
usd: number | null;
|
|
1418
|
+
ghs?: number | null | undefined;
|
|
1419
|
+
kes?: number | null | undefined;
|
|
1358
1420
|
} | null;
|
|
1359
1421
|
annual: {
|
|
1360
1422
|
ngn: number | null;
|
|
1361
1423
|
usd: number | null;
|
|
1424
|
+
ghs?: number | null | undefined;
|
|
1425
|
+
kes?: number | null | undefined;
|
|
1362
1426
|
} | null;
|
|
1363
1427
|
};
|
|
1364
1428
|
popular?: boolean | undefined;
|
|
1365
1429
|
}[];
|
|
1366
1430
|
meta?: {
|
|
1367
1431
|
detectedLocation: {
|
|
1368
|
-
currency: "NGN" | "USD";
|
|
1369
|
-
country: string;
|
|
1370
1432
|
countryName: string;
|
|
1433
|
+
currency: "NGN" | "USD" | "GHS" | "KES" | "CAD" | "AED" | "GBP" | "EUR";
|
|
1434
|
+
country: string;
|
|
1371
1435
|
};
|
|
1372
1436
|
} | undefined;
|
|
1373
1437
|
}>;
|
|
@@ -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;
|
|
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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B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,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,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { timestampsSchema, jsonApiSingleResponseSchema, jsonApiCollectionResponseSchema, } from './common.schemas';
|
|
3
3
|
import { paymentGatewaySchema, paymentCurrencySchema } from './payments.schemas';
|
|
4
|
+
import { iso4217CurrencySchema } from './locale.schemas';
|
|
4
5
|
/**
|
|
5
6
|
* Subscription schemas - JSON:API compliant
|
|
6
7
|
*/
|
|
@@ -124,20 +125,20 @@ export const currentUsageResponseSchema = z.object({
|
|
|
124
125
|
periodEnd: z.string().datetime(),
|
|
125
126
|
});
|
|
126
127
|
// Available subscription plan schema (for landing page)
|
|
128
|
+
const planPriceAmountsSchema = z.object({
|
|
129
|
+
ngn: z.number().nullable(),
|
|
130
|
+
usd: z.number().nullable(),
|
|
131
|
+
ghs: z.number().nullable().optional(),
|
|
132
|
+
kes: z.number().nullable().optional(),
|
|
133
|
+
});
|
|
127
134
|
export const availablePlanSchema = z.object({
|
|
128
135
|
tier: subscriptionTierSchema,
|
|
129
136
|
name: z.string(), // Display name (e.g., "Starter Pack")
|
|
130
137
|
description: z.string(), // Short description
|
|
131
138
|
pricing: z.object({
|
|
132
|
-
monthly:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
}).nullable(), // null if monthly not available
|
|
136
|
-
annual: z.object({
|
|
137
|
-
ngn: z.number().nullable(), // NGN amount, null for FREE or custom pricing
|
|
138
|
-
usd: z.number().nullable(), // USD amount, null for FREE or custom pricing
|
|
139
|
-
}).nullable(), // null if annual not available
|
|
140
|
-
custom: z.boolean(), // true if pricing is custom (COOPERATIVE, ENTERPRISE, GOVERNMENT)
|
|
139
|
+
monthly: planPriceAmountsSchema.nullable(),
|
|
140
|
+
annual: planPriceAmountsSchema.nullable(),
|
|
141
|
+
custom: z.boolean(),
|
|
141
142
|
}),
|
|
142
143
|
features: z.object({
|
|
143
144
|
maxFields: z.number().int().nullable(), // null = unlimited
|
|
@@ -163,7 +164,7 @@ export const availablePlansResponseSchema = z.object({
|
|
|
163
164
|
detectedLocation: z.object({
|
|
164
165
|
country: z.string(), // ISO 3166-1 alpha-2 country code
|
|
165
166
|
countryName: z.string(),
|
|
166
|
-
currency:
|
|
167
|
+
currency: iso4217CurrencySchema,
|
|
167
168
|
}),
|
|
168
169
|
}).optional(), // Optional: location detection metadata
|
|
169
170
|
});
|