@agroyaar/sdk 3.2.0 → 3.4.1

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.cjs CHANGED
@@ -94,6 +94,7 @@ var createClient = (config, middlewares = []) => {
94
94
  var croppingPatternMapper = {
95
95
  getOne: (dto) => ({
96
96
  id: dto.id,
97
+ createdAt: dto.createdAt,
97
98
  cropKind: dto.cropKind,
98
99
  farm: dto.farm,
99
100
  farmer: dto.farmer,
@@ -104,11 +105,12 @@ var croppingPatternMapper = {
104
105
  growingSeasonIrrigationTimes: dto.growingSeasonIrrigationTimes,
105
106
  irrigationHoursPerShift: dto.irrigationHoursPerShift,
106
107
  reports: dto.reports,
108
+ dailyMaximumTemperatureChange: dto.dailyMaximumTemperatureChange,
109
+ dailyMeanTemperatureChange: dto.dailyMeanTemperatureChange,
110
+ dailyMinimumTemperatureChange: dto.dailyMinimumTemperatureChange,
107
111
  selectedCrops: dto.selectedCrops,
108
112
  status: dto.status
109
- }),
110
- getAll: (dto) => dto.map(croppingPatternMapper.getOne),
111
- create: (_dto) => ({})
113
+ })
112
114
  };
113
115
 
114
116
  // src/services/dashboard/cropping-pattern/croppingPattern.service.ts
@@ -139,44 +141,6 @@ var createCroppingPatternServices = (client) => ({
139
141
  } catch (error) {
140
142
  return wrapError(error);
141
143
  }
142
- },
143
- getAll: async ({
144
- pathParams
145
- }) => {
146
- try {
147
- const response = await client.typed(
148
- "get",
149
- "/farmers/{farmerId}/cropping-patterns",
150
- {
151
- pathParams
152
- }
153
- );
154
- return import_ts_belt2.R.Ok(
155
- croppingPatternMapper.getAll(response.result.data.croppingPatterns)
156
- );
157
- } catch (error) {
158
- return wrapError(error);
159
- }
160
- },
161
- create: async ({
162
- body,
163
- pathParams
164
- }) => {
165
- try {
166
- const response = await client.typed(
167
- "post",
168
- "/farmers/{farmerId}/cropping-patterns",
169
- {
170
- pathParams,
171
- body
172
- }
173
- );
174
- return import_ts_belt2.R.Ok(
175
- croppingPatternMapper.create(response.result.data.croppingPattern)
176
- );
177
- } catch (error) {
178
- return wrapError(error);
179
- }
180
144
  }
181
145
  });
182
146
 
@@ -562,7 +526,7 @@ var mechanizationMapper = {
562
526
  variety: varietiesMapper.getOne(dto.variety)
563
527
  }),
564
528
  getAll: (dto) => dto.map(mechanizationMapper.getOne),
565
- create: (_dto) => ({})
529
+ create: (_res) => ({})
566
530
  };
567
531
 
568
532
  // src/services/dashboard/mechanization/mechanization.service.ts
@@ -635,6 +599,46 @@ var createMechanizationServices = (client) => ({
635
599
  }
636
600
  });
637
601
 
602
+ // src/services/dashboard/experiments/experiments.service.ts
603
+ var import_ts_belt10 = require("@mobily/ts-belt");
604
+
605
+ // src/services/dashboard/experiments/experiments.mapper.ts
606
+ var experimentMapper = {
607
+ getExperiment: (dto) => ({
608
+ id: dto.id,
609
+ createdAt: dto.createdAt,
610
+ laboratory: dto.laboratory.laboratoryName,
611
+ samplesCount: dto.samplesCount,
612
+ status: dto.status.name
613
+ }),
614
+ getExperiments: (dto) => ({
615
+ experiments: dto.experiments.map(experimentMapper.getExperiment),
616
+ meta: dto.meta
617
+ })
618
+ };
619
+
620
+ // src/services/dashboard/experiments/experiments.service.ts
621
+ var createExperimentServices = (client) => ({
622
+ getListExperiments: async ({
623
+ params,
624
+ pathParams
625
+ }) => {
626
+ try {
627
+ const response = await client.typed(
628
+ "get",
629
+ "/farmers/{farmerId}/experiments/results",
630
+ {
631
+ params,
632
+ pathParams
633
+ }
634
+ );
635
+ return import_ts_belt10.R.Ok(experimentMapper.getExperiments(response.result.data));
636
+ } catch (error) {
637
+ return wrapError(error);
638
+ }
639
+ }
640
+ });
641
+
638
642
  // src/index.ts
639
643
  var createSDK = (config, middlewares = []) => {
640
644
  const client = createClient(config, middlewares);
@@ -647,6 +651,7 @@ var createSDK = (config, middlewares = []) => {
647
651
  seasonsProcess: createSeasonsProcess(client),
648
652
  sensors: createSensorsServices(client),
649
653
  varieties: createVarietiesService(client),
654
+ experiment: createExperimentServices(client),
650
655
  croppingPattern: createCroppingPatternServices(client)
651
656
  }
652
657
  };
package/dist/index.d.ts CHANGED
@@ -278,6 +278,40 @@ interface paths {
278
278
  patch?: never;
279
279
  trace?: never;
280
280
  };
281
+ "/farmers/{farmerId}/products": {
282
+ parameters: {
283
+ query?: never;
284
+ header?: never;
285
+ path?: never;
286
+ cookie?: never;
287
+ };
288
+ /** Get resource list */
289
+ get: operations["ProductsController_findAll"];
290
+ put?: never;
291
+ post?: never;
292
+ delete?: never;
293
+ options?: never;
294
+ head?: never;
295
+ patch?: never;
296
+ trace?: never;
297
+ };
298
+ "/farmers/{farmerId}/products/{productId}": {
299
+ parameters: {
300
+ query?: never;
301
+ header?: never;
302
+ path?: never;
303
+ cookie?: never;
304
+ };
305
+ /** Get resource by ID */
306
+ get: operations["ProductsController_findOne"];
307
+ put?: never;
308
+ post?: never;
309
+ delete?: never;
310
+ options?: never;
311
+ head?: never;
312
+ patch?: never;
313
+ trace?: never;
314
+ };
281
315
  "/farmers/{farmerId}/irrigation-sources": {
282
316
  parameters: {
283
317
  query?: never;
@@ -784,7 +818,7 @@ interface components {
784
818
  };
785
819
  ProductKindResponseData: {
786
820
  readonly meta: Record<string, never>;
787
- readonly mechanizationVarieties: components["schemas"]["ProductKind"][];
821
+ readonly productKinds: components["schemas"]["ProductKind"][];
788
822
  };
789
823
  ProductKindResponseResult: {
790
824
  readonly message: string;
@@ -909,6 +943,8 @@ interface components {
909
943
  FarmersResponseDto: {
910
944
  readonly result: components["schemas"]["FarmersResponseResult"];
911
945
  };
946
+ ExperimentParameterKind: Record<string, never>;
947
+ ExperimentKind: Record<string, never>;
912
948
  ExperimentParameter: {
913
949
  readonly id: string;
914
950
  /** Format: date-time */
@@ -917,6 +953,22 @@ interface components {
917
953
  readonly updatedAt: string;
918
954
  /** Format: date-time */
919
955
  readonly deletedAt: string;
956
+ name: string;
957
+ persianName: string;
958
+ unit: string;
959
+ cost: number;
960
+ typeId: number;
961
+ kindId: number;
962
+ displayOrder: number;
963
+ status: string;
964
+ kind: components["schemas"]["ExperimentParameterKind"];
965
+ optimumRange: string;
966
+ idwClusterConfigIds: string[];
967
+ type: components["schemas"]["ExperimentKind"];
968
+ idwClusterConfigs: string[];
969
+ uuid: string;
970
+ startColor: string[];
971
+ endColor: string[];
920
972
  };
921
973
  UnavailableExperimentParameter: {
922
974
  /** @description شناسه آزمایش */
@@ -928,7 +980,10 @@ interface components {
928
980
  /** @description پارامتر‌های ناموجود */
929
981
  unavailableExperimentParameters: components["schemas"]["UnavailableExperimentParameter"][];
930
982
  };
931
- Experiment: {
983
+ ExperimentSamplingDepthKind: Record<string, never>;
984
+ ExperimentSamplingPlantElementKind: Record<string, never>;
985
+ ExperimentStation: Record<string, never>;
986
+ Expert: {
932
987
  readonly id: string;
933
988
  /** Format: date-time */
934
989
  readonly createdAt: string;
@@ -937,18 +992,7 @@ interface components {
937
992
  /** Format: date-time */
938
993
  readonly deletedAt: string;
939
994
  };
940
- ExperimentsResponseData: {
941
- readonly meta: components["schemas"]["ExperimentMeta"];
942
- readonly experiments: components["schemas"]["Experiment"][];
943
- };
944
- ExperimentsResponseResult: {
945
- readonly message: string;
946
- readonly code: string;
947
- readonly data: components["schemas"]["ExperimentsResponseData"];
948
- };
949
- ExperimentsResponseDto: {
950
- readonly result: components["schemas"]["ExperimentsResponseResult"];
951
- };
995
+ ExperimentCategoryKind: Record<string, never>;
952
996
  OwnershipType: {
953
997
  id: number;
954
998
  name: string;
@@ -989,6 +1033,243 @@ interface components {
989
1033
  ownershipType: components["schemas"]["OwnershipType"];
990
1034
  farmer: components["schemas"]["Farmer"];
991
1035
  };
1036
+ Pool: {
1037
+ readonly id: string;
1038
+ /** Format: date-time */
1039
+ readonly createdAt: string;
1040
+ /** Format: date-time */
1041
+ readonly updatedAt: string;
1042
+ /** Format: date-time */
1043
+ readonly deletedAt: string;
1044
+ };
1045
+ Season: {
1046
+ readonly id: string;
1047
+ /** Format: date-time */
1048
+ readonly createdAt: string;
1049
+ /** Format: date-time */
1050
+ readonly updatedAt: string;
1051
+ /** Format: date-time */
1052
+ readonly deletedAt: string;
1053
+ };
1054
+ IrrigationSource: {
1055
+ readonly id: string;
1056
+ /** Format: date-time */
1057
+ readonly createdAt: string;
1058
+ /** Format: date-time */
1059
+ readonly updatedAt: string;
1060
+ /** Format: date-time */
1061
+ readonly deletedAt: string;
1062
+ city: components["schemas"]["City"];
1063
+ cityId: string;
1064
+ /** @description بتمن */
1065
+ name: string;
1066
+ province: components["schemas"]["Province"];
1067
+ provinceId: string;
1068
+ zone: string;
1069
+ discharge: number;
1070
+ location: components["schemas"]["Coordinate"];
1071
+ /** @description زمین */
1072
+ farmerId: string;
1073
+ farmer: components["schemas"]["Farmer"];
1074
+ };
1075
+ Request: {
1076
+ readonly id: string;
1077
+ /** Format: date-time */
1078
+ readonly createdAt: string;
1079
+ /** Format: date-time */
1080
+ readonly updatedAt: string;
1081
+ /** Format: date-time */
1082
+ readonly deletedAt: string;
1083
+ };
1084
+ Invoice: {
1085
+ readonly id: string;
1086
+ /** Format: date-time */
1087
+ readonly createdAt: string;
1088
+ /** Format: date-time */
1089
+ readonly updatedAt: string;
1090
+ /** Format: date-time */
1091
+ readonly deletedAt: string;
1092
+ };
1093
+ ParameterMap: Record<string, never>;
1094
+ ExperimentSampleParametersResults: {
1095
+ readonly id: string;
1096
+ /** Format: date-time */
1097
+ readonly createdAt: string;
1098
+ /** Format: date-time */
1099
+ readonly updatedAt: string;
1100
+ /** Format: date-time */
1101
+ readonly deletedAt: string;
1102
+ };
1103
+ CompanyKind: Record<string, never>;
1104
+ Status: {
1105
+ id: string;
1106
+ label: string;
1107
+ /** @enum {string} */
1108
+ name: "SUBMIT" | "ACTIVE" | "INACTIVE" | "CONFIRMED" | "PAID" | "DRAFT" | "PENDING" | "PROCESSING" | "ARCHIVED" | "COMPLETED" | "PASS_PAYMENT" | "VALID" | "INVALID" | "WRITING" | "REJECTED" | "FAILED" | "SUCCESS" | "DONE" | "VERIFIED" | "UNLOCK" | "LOCK" | "MODIFIED" | "REFUNDED_INVOICE" | "ACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "INACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "VALID_DEVICE_PUSH_TOKEN" | "INVALID_DEVICE_PUSH_TOKEN" | "DRAFT_MISSION" | "APPROVED_MISSION" | "REJECTED_MISSION" | "CANCELED_MISSION" | "COMPLETED_MISSION" | "IN_PROGRESS_MISSION" | "AWAITING_START_MISSION" | "AWAITING_APPROVAL_MISSION" | "AWAITING_REVIEW_DATA_MISSION" | "AWAITING_SAMPLE_DELIVERY_LABORATORY_MISSION" | "COMPLETED_REQUEST" | "AWAITING_SEND_REQUEST" | "AWAITING_REVIEW_REQUEST" | "AWAITING_PAYMENT_REQUEST" | "AWAITING_REVIEW_OFFER" | "AWAITING_COLLEAGUE_APPROVAL_REQUEST" | "AWAITING_MISSION_COMPLETION_REQUEST" | "AWAITING_PURCHASE_REQUEST" | "AWAITING_REVIEW_MISSION_DATA_REQUEST" | "REJECTED_REGISTRATION" | "REJECTED_MODIFICATION" | "REJECTED_ACTIVATION" | "CONFIRMED_ACTIVATION" | "CONFIRMED_REGISTRATION" | "AWAITING_REVIEW_ACTIVATION" | "AWAITING_SUBMIT_ACTIVATION" | "AWAITING_REVIEW_REGISTRATION" | "AWAITING_REVIEW_MODIFICATION" | "APPROVED_EXPERIMENT_ANALYSIS_REQUEST" | "REJECTED_EXPERIMENT_ANALYSIS_REQUEST" | "CANCELED_EXPERIMENT_ANALYSIS_REQUEST" | "COMPLETED_EXPERIMENT_ANALYSIS_REQUEST" | "IN_PROGRESS_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_START_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_APPROVAL_EXPERIMENT_ANALYSIS_REQUEST" | "DRAFT_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_REVIEW_INQUIRY" | "COMPLETED_REGISTRATION" | "CANCELED_REQUEST" | "AWAITING_APPROVAL_RESIDENT_LEADING_EXPERT" | "APPROVED_RESIDENT_LEADING_EXPERT" | "REJECTED_RESIDENT_LEADING_EXPERT" | "AWAITING_SIGNING_CONTRACT" | "ACTIVE_LEADING_EXPERT" | "FAILED_CHARGE_WALLET_TRANSACTION" | "VERIFIED_CHARGE_WALLET_TRANSACTION" | "SUCCESS_PAYMENT_WALLET_TRANSACTION" | "SUCCESS_REFUND_WALLET_TRANSACTION" | "AWAITING_VERIFICATION_CHARGE_WALLET_TRANSACTION" | "AWAITNG_APPROVAL_ORGANIZATION_MEMBERSHIP_REQUEST" | "APPROVED_ORGANIZATION_MEMBERSHIP_REQUEST" | "REJECTED_ORGANIZATION_MEMBERSHIP_REQUEST";
1109
+ };
1110
+ Comment: {
1111
+ readonly id: string;
1112
+ /** Format: date-time */
1113
+ readonly createdAt: string;
1114
+ /** Format: date-time */
1115
+ readonly updatedAt: string;
1116
+ /** Format: date-time */
1117
+ readonly deletedAt: string;
1118
+ };
1119
+ User: {
1120
+ readonly id: string;
1121
+ /** Format: date-time */
1122
+ readonly createdAt: string;
1123
+ /** Format: date-time */
1124
+ readonly updatedAt: string;
1125
+ /** Format: date-time */
1126
+ readonly deletedAt: string;
1127
+ };
1128
+ LaboratoryParameter: {
1129
+ readonly id: string;
1130
+ /** Format: date-time */
1131
+ readonly createdAt: string;
1132
+ /** Format: date-time */
1133
+ readonly updatedAt: string;
1134
+ /** Format: date-time */
1135
+ readonly deletedAt: string;
1136
+ };
1137
+ Laboratory: {
1138
+ readonly id: string;
1139
+ /** Format: date-time */
1140
+ readonly createdAt: string;
1141
+ /** Format: date-time */
1142
+ readonly updatedAt: string;
1143
+ /** Format: date-time */
1144
+ readonly deletedAt: string;
1145
+ adminFirstName: string;
1146
+ adminLastName: string;
1147
+ adminNationalCode: string;
1148
+ adminPhoneNumber: string;
1149
+ adminNationalCardFrontImageURL: string;
1150
+ adminNationalCardBackImageURL: string;
1151
+ adminBirthCertificateImageURL: string;
1152
+ legalPerson: boolean;
1153
+ chiefExecutiveOfficerFirstName: string;
1154
+ chiefExecutiveOfficerLastName: string;
1155
+ chiefExecutiveOfficerPhoneNumber: string;
1156
+ chiefExecutiveOfficerNationalCode: string;
1157
+ isAgriculturalEngineeringOrganizationMember: boolean;
1158
+ agriculturalEngineeringOrganizationNumber: string;
1159
+ emergencyPhoneNumber: string;
1160
+ faxNumber: string;
1161
+ companyName: string;
1162
+ companyKindId: number;
1163
+ companyKind: components["schemas"]["CompanyKind"];
1164
+ nationalCompanyId: string;
1165
+ companyRegistrationNumber: string;
1166
+ companyRegistrationLocation: string;
1167
+ companyRegistrationNewspaperURL: string;
1168
+ companyLatestChangeNewspaperURL: string;
1169
+ laboratoryName: string;
1170
+ establishmentLicenseURL: string;
1171
+ operatingLicenseURL: string;
1172
+ landlinePhone: string;
1173
+ websiteURL: string;
1174
+ email: string;
1175
+ province: components["schemas"]["Province"];
1176
+ provinceId: string;
1177
+ city: components["schemas"]["City"];
1178
+ cityId: string;
1179
+ address: string;
1180
+ addressDetails: string;
1181
+ addressDescription: string;
1182
+ postalCode: string;
1183
+ location: components["schemas"]["Coordinate"];
1184
+ contractURL: string;
1185
+ contractCode: string;
1186
+ /** Format: date-time */
1187
+ contractSignedAt: string;
1188
+ sealImageURL: string;
1189
+ statusName: string;
1190
+ status: components["schemas"]["Status"];
1191
+ rejectComment: components["schemas"]["Comment"];
1192
+ users: components["schemas"]["User"][];
1193
+ fields: components["schemas"]["LaboratoryParameter"][];
1194
+ parameters: components["schemas"]["LaboratoryParameter"][];
1195
+ representativeFirstName: string;
1196
+ representativeLastName: string;
1197
+ representativeNationalCode: string;
1198
+ representativePhoneNumber: string;
1199
+ representativePosition: string;
1200
+ legalCompanyAddress: string;
1201
+ legalCompanyPostalCode: string;
1202
+ legalLaboratoryAddress: string;
1203
+ shabaNumber: string;
1204
+ bankName: string;
1205
+ accountHolderName: string;
1206
+ };
1207
+ Experiment: {
1208
+ readonly id: string;
1209
+ /** Format: date-time */
1210
+ readonly createdAt: string;
1211
+ /** Format: date-time */
1212
+ readonly updatedAt: string;
1213
+ /** Format: date-time */
1214
+ readonly deletedAt: string;
1215
+ objectId: string;
1216
+ seen: boolean;
1217
+ samplingDepths: components["schemas"]["ExperimentSamplingDepthKind"];
1218
+ samplingDepthIds: string[];
1219
+ samplingPlantElements: components["schemas"]["ExperimentSamplingPlantElementKind"];
1220
+ samplingPlantElementIds: string[];
1221
+ resultFile: string;
1222
+ stationsCount: number;
1223
+ stations: components["schemas"]["ExperimentStation"];
1224
+ previousCrop: string;
1225
+ nextCrop: string;
1226
+ expert: components["schemas"]["Expert"];
1227
+ expertId: string;
1228
+ expertTransportResponsibility: boolean;
1229
+ isResidentLeadingExpert: boolean;
1230
+ type: components["schemas"]["ExperimentKind"];
1231
+ typeId: number;
1232
+ category: components["schemas"]["ExperimentCategoryKind"];
1233
+ categoryId: number;
1234
+ parametersIds: string[];
1235
+ parameters: components["schemas"]["ExperimentParameter"];
1236
+ experimentCode: string;
1237
+ drawingParametersMap: boolean;
1238
+ recommendedSamplingCoordinates: components["schemas"]["Coordinate"];
1239
+ samplesCount: number;
1240
+ samplesAmount: string;
1241
+ farmer: components["schemas"]["Farmer"];
1242
+ farmerId: string;
1243
+ farm: components["schemas"]["Farm"];
1244
+ pool: components["schemas"]["Pool"];
1245
+ season: components["schemas"]["Season"];
1246
+ irrigationSource: components["schemas"]["IrrigationSource"];
1247
+ relevantEntityId: string;
1248
+ request: components["schemas"]["Request"];
1249
+ invoice: components["schemas"]["Invoice"];
1250
+ invoiceId: string;
1251
+ parametersMaps: components["schemas"]["ParameterMap"];
1252
+ samplesParametersResults: components["schemas"]["ExperimentSampleParametersResults"];
1253
+ laboratory: components["schemas"]["Laboratory"];
1254
+ laboratoryId: string;
1255
+ /** Format: date-time */
1256
+ analysisAt: string;
1257
+ receiptAt: string;
1258
+ geoShortLinkId: string;
1259
+ status: components["schemas"]["Status"];
1260
+ };
1261
+ ExperimentsResponseData: {
1262
+ readonly meta: components["schemas"]["ExperimentMeta"];
1263
+ readonly experiments: components["schemas"]["Experiment"][];
1264
+ };
1265
+ ExperimentsResponseResult: {
1266
+ readonly message: string;
1267
+ readonly code: string;
1268
+ readonly data: components["schemas"]["ExperimentsResponseData"];
1269
+ };
1270
+ ExperimentsResponseDto: {
1271
+ readonly result: components["schemas"]["ExperimentsResponseResult"];
1272
+ };
992
1273
  FarmsResponseData: {
993
1274
  readonly meta: Record<string, never>;
994
1275
  readonly totalItems: number;
@@ -1014,26 +1295,30 @@ interface components {
1014
1295
  FarmResponseDto: {
1015
1296
  readonly result: components["schemas"]["FarmResponseResult"];
1016
1297
  };
1017
- IrrigationSource: {
1018
- readonly id: string;
1019
- /** Format: date-time */
1020
- readonly createdAt: string;
1021
- /** Format: date-time */
1022
- readonly updatedAt: string;
1023
- /** Format: date-time */
1024
- readonly deletedAt: string;
1025
- city: components["schemas"]["City"];
1026
- cityId: string;
1027
- /** @description بتمن */
1028
- name: string;
1029
- province: components["schemas"]["Province"];
1030
- provinceId: string;
1031
- zone: string;
1032
- discharge: number;
1033
- location: components["schemas"]["Coordinate"];
1034
- /** @description زمین */
1035
- farmerId: string;
1036
- farmer: components["schemas"]["Farmer"];
1298
+ ProductsResponseData: {
1299
+ readonly meta: Record<string, never>;
1300
+ readonly totalItems: number;
1301
+ readonly products: components["schemas"]["Product"][];
1302
+ };
1303
+ ProductsResponseResult: {
1304
+ readonly message: string;
1305
+ readonly code: string;
1306
+ readonly data: components["schemas"]["ProductsResponseData"];
1307
+ };
1308
+ ProductsResponseDto: {
1309
+ readonly result: components["schemas"]["ProductsResponseResult"];
1310
+ };
1311
+ ProductResponseData: {
1312
+ readonly meta: Record<string, never>;
1313
+ readonly product: components["schemas"]["Product"];
1314
+ };
1315
+ ProductResponseResult: {
1316
+ readonly message: string;
1317
+ readonly code: string;
1318
+ readonly data: components["schemas"]["ProductResponseData"];
1319
+ };
1320
+ ProductResponseDto: {
1321
+ readonly result: components["schemas"]["ProductResponseResult"];
1037
1322
  };
1038
1323
  IrrigationSourcesResponseData: {
1039
1324
  readonly meta: Record<string, never>;
@@ -1060,12 +1345,6 @@ interface components {
1060
1345
  IrrigationSourceResponseDto: {
1061
1346
  readonly result: components["schemas"]["IrrigationSourceResponseResult"];
1062
1347
  };
1063
- Status: {
1064
- id: string;
1065
- label: string;
1066
- /** @enum {string} */
1067
- name: "SUBMIT" | "ACTIVE" | "INACTIVE" | "CONFIRMED" | "PAID" | "DRAFT" | "PENDING" | "PROCESSING" | "ARCHIVED" | "COMPLETED" | "PASS_PAYMENT" | "VALID" | "INVALID" | "WRITING" | "REJECTED" | "FAILED" | "SUCCESS" | "DONE" | "VERIFIED" | "UNLOCK" | "LOCK" | "MODIFIED" | "REFUNDED_INVOICE" | "ACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "INACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "VALID_DEVICE_PUSH_TOKEN" | "INVALID_DEVICE_PUSH_TOKEN" | "DRAFT_MISSION" | "APPROVED_MISSION" | "REJECTED_MISSION" | "CANCELED_MISSION" | "COMPLETED_MISSION" | "IN_PROGRESS_MISSION" | "AWAITING_START_MISSION" | "AWAITING_APPROVAL_MISSION" | "AWAITING_REVIEW_DATA_MISSION" | "AWAITING_SAMPLE_DELIVERY_LABORATORY_MISSION" | "COMPLETED_REQUEST" | "AWAITING_SEND_REQUEST" | "AWAITING_REVIEW_REQUEST" | "AWAITING_PAYMENT_REQUEST" | "AWAITING_REVIEW_OFFER" | "AWAITING_COLLEAGUE_APPROVAL_REQUEST" | "AWAITING_MISSION_COMPLETION_REQUEST" | "AWAITING_PURCHASE_REQUEST" | "AWAITING_REVIEW_MISSION_DATA_REQUEST" | "REJECTED_REGISTRATION" | "REJECTED_MODIFICATION" | "REJECTED_ACTIVATION" | "CONFIRMED_ACTIVATION" | "CONFIRMED_REGISTRATION" | "AWAITING_REVIEW_ACTIVATION" | "AWAITING_SUBMIT_ACTIVATION" | "AWAITING_REVIEW_REGISTRATION" | "AWAITING_REVIEW_MODIFICATION" | "APPROVED_EXPERIMENT_ANALYSIS_REQUEST" | "REJECTED_EXPERIMENT_ANALYSIS_REQUEST" | "CANCELED_EXPERIMENT_ANALYSIS_REQUEST" | "COMPLETED_EXPERIMENT_ANALYSIS_REQUEST" | "IN_PROGRESS_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_START_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_APPROVAL_EXPERIMENT_ANALYSIS_REQUEST" | "DRAFT_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_REVIEW_INQUIRY" | "COMPLETED_REGISTRATION" | "CANCELED_REQUEST" | "AWAITING_APPROVAL_RESIDENT_LEADING_EXPERT" | "APPROVED_RESIDENT_LEADING_EXPERT" | "REJECTED_RESIDENT_LEADING_EXPERT" | "AWAITING_SIGNING_CONTRACT" | "ACTIVE_LEADING_EXPERT" | "FAILED_CHARGE_WALLET_TRANSACTION" | "VERIFIED_CHARGE_WALLET_TRANSACTION" | "SUCCESS_PAYMENT_WALLET_TRANSACTION" | "SUCCESS_REFUND_WALLET_TRANSACTION" | "AWAITING_VERIFICATION_CHARGE_WALLET_TRANSACTION";
1068
- };
1069
1348
  WeatherStationAlertPhoneNumber: {
1070
1349
  fullName: string;
1071
1350
  position: string;
@@ -1405,15 +1684,6 @@ interface components {
1405
1684
  */
1406
1685
  selectedCropIds: string[];
1407
1686
  };
1408
- Invoice: {
1409
- readonly id: string;
1410
- /** Format: date-time */
1411
- readonly createdAt: string;
1412
- /** Format: date-time */
1413
- readonly updatedAt: string;
1414
- /** Format: date-time */
1415
- readonly deletedAt: string;
1416
- };
1417
1687
  AnnuallyChartReportType: {
1418
1688
  /**
1419
1689
  * @description سال
@@ -1426,18 +1696,6 @@ interface components {
1426
1696
  */
1427
1697
  value: number;
1428
1698
  };
1429
- DayOfYearChartReportType: {
1430
- /**
1431
- * @description روز سال
1432
- * @example 1
1433
- */
1434
- dayOfYear: number;
1435
- /**
1436
- * @description مقدار
1437
- * @example 20
1438
- */
1439
- value: number;
1440
- };
1441
1699
  MonthlyChartReportType: {
1442
1700
  /**
1443
1701
  * @description شماره ماه
@@ -1482,23 +1740,35 @@ interface components {
1482
1740
  climaticAdaptabilityIndex: number;
1483
1741
  /** @description شاخص نیاز آبی */
1484
1742
  irrigationRequirementIndex: number;
1743
+ /** @description خالص نیاز آبی */
1744
+ netIrrigationRequirement: number;
1745
+ /** @description میانگین درجه روز رشد تامین شده */
1746
+ suppliedGrowingDegreeDayMean: number;
1747
+ /** @description نیاز درجه روز رشد */
1748
+ growingDegreeDayRequirement: number;
1485
1749
  /** @description پتانسیل عملکرد ۳۰ سال گذشته */
1486
1750
  annuallyPerformancePotential: components["schemas"]["AnnuallyChartReportType"][];
1487
1751
  /** @description نیاز خالص آبی ۳۰ سال گذشته */
1488
1752
  annuallyNetIrrigationRequirement: components["schemas"]["AnnuallyChartReportType"][];
1489
1753
  /** @description درجه روز رشد تامین شده ۳۰ سال گذشته */
1490
1754
  annuallySuppliedGrowingDegreeDay: components["schemas"]["AnnuallyChartReportType"][];
1491
- /** @description تغییرات دمای حداکثر روزانه ۳۰ سال گذشته */
1492
- dailyMaximumTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1493
- /** @description تغییرات دمای حداقل روزانه ۳۰ سال گذشته */
1494
- dailyMinimumTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1495
- /** @description تغییرات دمای میانگین روزانه ۳۰ سال گذشته */
1496
- dailyMeanTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1497
1755
  /** @description ریسک‌های دمایی */
1498
1756
  temperatureRisks: components["schemas"]["CroppingPatternRiskChartType"][];
1499
1757
  /** @description ریسک‌های رطوبتی */
1500
1758
  humidityRisks: components["schemas"]["CroppingPatternRiskChartType"][];
1501
1759
  };
1760
+ DayOfYearChartReportType: {
1761
+ /**
1762
+ * @description روز سال
1763
+ * @example 1
1764
+ */
1765
+ dayOfYear: number;
1766
+ /**
1767
+ * @description مقدار
1768
+ * @example 20
1769
+ */
1770
+ value: number;
1771
+ };
1502
1772
  CroppingPattern: {
1503
1773
  readonly id: string;
1504
1774
  /** Format: date-time */
@@ -1537,6 +1807,12 @@ interface components {
1537
1807
  selectedCrops: components["schemas"]["Product"][];
1538
1808
  /** @description وضعیت */
1539
1809
  status: components["schemas"]["Status"];
1810
+ /** @description تغییرات دمای حداکثر روزانه ۳۰ سال گذشته */
1811
+ dailyMaximumTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1812
+ /** @description تغییرات دمای حداقل روزانه ۳۰ سال گذشته */
1813
+ dailyMinimumTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1814
+ /** @description تغییرات دمای میانگین روزانه ۳۰ سال گذشته */
1815
+ dailyMeanTemperatureChange: components["schemas"]["DayOfYearChartReportType"][];
1540
1816
  };
1541
1817
  CroppingPatternResponseData: {
1542
1818
  readonly meta: Record<string, never>;
@@ -2149,7 +2425,7 @@ interface operations {
2149
2425
  * - "enum,enum" → in
2150
2426
  * - "!enum,enum" → notIn
2151
2427
  * */
2152
- status?: "SUBMIT" | "ACTIVE" | "INACTIVE" | "CONFIRMED" | "PAID" | "DRAFT" | "PENDING" | "PROCESSING" | "ARCHIVED" | "COMPLETED" | "PASS_PAYMENT" | "VALID" | "INVALID" | "WRITING" | "REJECTED" | "FAILED" | "SUCCESS" | "DONE" | "VERIFIED" | "UNLOCK" | "LOCK" | "MODIFIED" | "REFUNDED_INVOICE" | "ACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "INACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "VALID_DEVICE_PUSH_TOKEN" | "INVALID_DEVICE_PUSH_TOKEN" | "DRAFT_MISSION" | "APPROVED_MISSION" | "REJECTED_MISSION" | "CANCELED_MISSION" | "COMPLETED_MISSION" | "IN_PROGRESS_MISSION" | "AWAITING_START_MISSION" | "AWAITING_APPROVAL_MISSION" | "AWAITING_REVIEW_DATA_MISSION" | "AWAITING_SAMPLE_DELIVERY_LABORATORY_MISSION" | "COMPLETED_REQUEST" | "AWAITING_SEND_REQUEST" | "AWAITING_REVIEW_REQUEST" | "AWAITING_PAYMENT_REQUEST" | "AWAITING_REVIEW_OFFER" | "AWAITING_COLLEAGUE_APPROVAL_REQUEST" | "AWAITING_MISSION_COMPLETION_REQUEST" | "AWAITING_PURCHASE_REQUEST" | "AWAITING_REVIEW_MISSION_DATA_REQUEST" | "REJECTED_REGISTRATION" | "REJECTED_MODIFICATION" | "REJECTED_ACTIVATION" | "CONFIRMED_ACTIVATION" | "CONFIRMED_REGISTRATION" | "AWAITING_REVIEW_ACTIVATION" | "AWAITING_SUBMIT_ACTIVATION" | "AWAITING_REVIEW_REGISTRATION" | "AWAITING_REVIEW_MODIFICATION" | "APPROVED_EXPERIMENT_ANALYSIS_REQUEST" | "REJECTED_EXPERIMENT_ANALYSIS_REQUEST" | "CANCELED_EXPERIMENT_ANALYSIS_REQUEST" | "COMPLETED_EXPERIMENT_ANALYSIS_REQUEST" | "IN_PROGRESS_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_START_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_APPROVAL_EXPERIMENT_ANALYSIS_REQUEST" | "DRAFT_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_REVIEW_INQUIRY" | "COMPLETED_REGISTRATION" | "CANCELED_REQUEST" | "AWAITING_APPROVAL_RESIDENT_LEADING_EXPERT" | "APPROVED_RESIDENT_LEADING_EXPERT" | "REJECTED_RESIDENT_LEADING_EXPERT" | "AWAITING_SIGNING_CONTRACT" | "ACTIVE_LEADING_EXPERT" | "FAILED_CHARGE_WALLET_TRANSACTION" | "VERIFIED_CHARGE_WALLET_TRANSACTION" | "SUCCESS_PAYMENT_WALLET_TRANSACTION" | "SUCCESS_REFUND_WALLET_TRANSACTION" | "AWAITING_VERIFICATION_CHARGE_WALLET_TRANSACTION" | null;
2428
+ status?: "SUBMIT" | "ACTIVE" | "INACTIVE" | "CONFIRMED" | "PAID" | "DRAFT" | "PENDING" | "PROCESSING" | "ARCHIVED" | "COMPLETED" | "PASS_PAYMENT" | "VALID" | "INVALID" | "WRITING" | "REJECTED" | "FAILED" | "SUCCESS" | "DONE" | "VERIFIED" | "UNLOCK" | "LOCK" | "MODIFIED" | "REFUNDED_INVOICE" | "ACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "INACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "VALID_DEVICE_PUSH_TOKEN" | "INVALID_DEVICE_PUSH_TOKEN" | "DRAFT_MISSION" | "APPROVED_MISSION" | "REJECTED_MISSION" | "CANCELED_MISSION" | "COMPLETED_MISSION" | "IN_PROGRESS_MISSION" | "AWAITING_START_MISSION" | "AWAITING_APPROVAL_MISSION" | "AWAITING_REVIEW_DATA_MISSION" | "AWAITING_SAMPLE_DELIVERY_LABORATORY_MISSION" | "COMPLETED_REQUEST" | "AWAITING_SEND_REQUEST" | "AWAITING_REVIEW_REQUEST" | "AWAITING_PAYMENT_REQUEST" | "AWAITING_REVIEW_OFFER" | "AWAITING_COLLEAGUE_APPROVAL_REQUEST" | "AWAITING_MISSION_COMPLETION_REQUEST" | "AWAITING_PURCHASE_REQUEST" | "AWAITING_REVIEW_MISSION_DATA_REQUEST" | "REJECTED_REGISTRATION" | "REJECTED_MODIFICATION" | "REJECTED_ACTIVATION" | "CONFIRMED_ACTIVATION" | "CONFIRMED_REGISTRATION" | "AWAITING_REVIEW_ACTIVATION" | "AWAITING_SUBMIT_ACTIVATION" | "AWAITING_REVIEW_REGISTRATION" | "AWAITING_REVIEW_MODIFICATION" | "APPROVED_EXPERIMENT_ANALYSIS_REQUEST" | "REJECTED_EXPERIMENT_ANALYSIS_REQUEST" | "CANCELED_EXPERIMENT_ANALYSIS_REQUEST" | "COMPLETED_EXPERIMENT_ANALYSIS_REQUEST" | "IN_PROGRESS_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_START_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_APPROVAL_EXPERIMENT_ANALYSIS_REQUEST" | "DRAFT_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_REVIEW_INQUIRY" | "COMPLETED_REGISTRATION" | "CANCELED_REQUEST" | "AWAITING_APPROVAL_RESIDENT_LEADING_EXPERT" | "APPROVED_RESIDENT_LEADING_EXPERT" | "REJECTED_RESIDENT_LEADING_EXPERT" | "AWAITING_SIGNING_CONTRACT" | "ACTIVE_LEADING_EXPERT" | "FAILED_CHARGE_WALLET_TRANSACTION" | "VERIFIED_CHARGE_WALLET_TRANSACTION" | "SUCCESS_PAYMENT_WALLET_TRANSACTION" | "SUCCESS_REFUND_WALLET_TRANSACTION" | "AWAITING_VERIFICATION_CHARGE_WALLET_TRANSACTION" | "AWAITNG_APPROVAL_ORGANIZATION_MEMBERSHIP_REQUEST" | "APPROVED_ORGANIZATION_MEMBERSHIP_REQUEST" | "REJECTED_ORGANIZATION_MEMBERSHIP_REQUEST" | null;
2153
2429
  /** @description
2154
2430
  * Filter by string examples:
2155
2431
  * - "string" → equals
@@ -2469,6 +2745,149 @@ interface operations {
2469
2745
  };
2470
2746
  };
2471
2747
  };
2748
+ ProductsController_findAll: {
2749
+ parameters: {
2750
+ query?: {
2751
+ /** @description
2752
+ * Filter by string examples:
2753
+ * - "string" → equals
2754
+ * - "!string" → not equals
2755
+ * - "string,string" → in
2756
+ * - "!string,string" → notIn
2757
+ * - "~string" → contains
2758
+ * - "^string" → startsWith
2759
+ * - "string$" → endsWith
2760
+ * */
2761
+ objectId?: string;
2762
+ /** @description
2763
+ * Filter by string examples:
2764
+ * - "string" → equals
2765
+ * - "!string" → not equals
2766
+ * - "string,string" → in
2767
+ * - "!string,string" → notIn
2768
+ * - "~string" → contains
2769
+ * - "^string" → startsWith
2770
+ * - "string$" → endsWith
2771
+ * */
2772
+ product?: string;
2773
+ /** @description
2774
+ * Filter by string examples:
2775
+ * - "string" → equals
2776
+ * - "!string" → not equals
2777
+ * - "string,string" → in
2778
+ * - "!string,string" → notIn
2779
+ * - "~string" → contains
2780
+ * - "^string" → startsWith
2781
+ * - "string$" → endsWith
2782
+ * */
2783
+ imageUrl?: string;
2784
+ /** @description
2785
+ * Filter by string examples:
2786
+ * - "string" → equals
2787
+ * - "!string" → not equals
2788
+ * - "string,string" → in
2789
+ * - "!string,string" → notIn
2790
+ * - "~string" → contains
2791
+ * - "^string" → startsWith
2792
+ * - "string$" → endsWith
2793
+ * */
2794
+ persianName?: string;
2795
+ /** @description
2796
+ * Filter by string examples:
2797
+ * - "string" → equals
2798
+ * - "!string" → not equals
2799
+ * - "string,string" → in
2800
+ * - "!string,string" → notIn
2801
+ * - "~string" → contains
2802
+ * - "^string" → startsWith
2803
+ * - "string$" → endsWith
2804
+ * */
2805
+ pcode?: string;
2806
+ };
2807
+ header?: never;
2808
+ path: {
2809
+ farmerId: unknown;
2810
+ };
2811
+ cookie?: never;
2812
+ };
2813
+ requestBody?: never;
2814
+ responses: {
2815
+ /** @description لیست اطلاعات با موفقیت دریافت شد */
2816
+ 200: {
2817
+ headers: {
2818
+ [name: string]: unknown;
2819
+ };
2820
+ content: {
2821
+ "application/json": components["schemas"]["ProductsResponseDto"];
2822
+ };
2823
+ };
2824
+ /** @description درخواست نامعتبر است */
2825
+ 400: {
2826
+ headers: {
2827
+ [name: string]: unknown;
2828
+ };
2829
+ content?: never;
2830
+ };
2831
+ /** @description دسترسی غیرمجاز است */
2832
+ 401: {
2833
+ headers: {
2834
+ [name: string]: unknown;
2835
+ };
2836
+ content?: never;
2837
+ };
2838
+ /** @description خطای غیرمنتظره در سرور رخ داده است */
2839
+ 500: {
2840
+ headers: {
2841
+ [name: string]: unknown;
2842
+ };
2843
+ content?: never;
2844
+ };
2845
+ };
2846
+ };
2847
+ ProductsController_findOne: {
2848
+ parameters: {
2849
+ query?: never;
2850
+ header?: never;
2851
+ path: {
2852
+ productId: string;
2853
+ farmerId: unknown;
2854
+ };
2855
+ cookie?: never;
2856
+ };
2857
+ requestBody?: never;
2858
+ responses: {
2859
+ /** @description دریافت اطلاعات با موفقیت انجام شد */
2860
+ 200: {
2861
+ headers: {
2862
+ [name: string]: unknown;
2863
+ };
2864
+ content: {
2865
+ "application/json": components["schemas"]["ProductResponseDto"];
2866
+ };
2867
+ };
2868
+ /** @description درخواست نامعتبر است */
2869
+ 400: {
2870
+ headers: {
2871
+ [name: string]: unknown;
2872
+ };
2873
+ content?: never;
2874
+ };
2875
+ /** @description دسترسی غیرمجاز است */
2876
+ 401: {
2877
+ headers: {
2878
+ [name: string]: unknown;
2879
+ };
2880
+ content?: never;
2881
+ };
2882
+ /** @description خطای غیرمنتظره در سرور رخ داده است */
2883
+ 500: {
2884
+ headers: {
2885
+ [name: string]: unknown;
2886
+ };
2887
+ content?: never;
2888
+ };
2889
+ };
2890
+ };
2472
2891
  IrrigationSourcesController_findAll: {
2473
2892
  parameters: {
2474
2893
  query?: {
@@ -3613,7 +4032,7 @@ interface operations {
3613
4032
  };
3614
4033
  }
3615
4034
 
3616
- type ServiceType = "EXPERIMENT" | "VISIT" | "CHILLING_REQUIREMENT" | "CULTIVAR_RECOMMENDATION" | "FIRST_SAFFRON_IRRIGATION_DATE_RECOMMENDATION" | "HARVEST_DATE_RECOMMENDATION" | "QUESTIONNAIRE" | "SOWING_DATE_RECOMMENDATIONS" | "WEATHER_STATION" | "YIELD_GAP";
4035
+ type ServiceType = "EXPERIMENT" | "VISIT" | "CHILLING_REQUIREMENT" | "CULTIVAR_RECOMMENDATION" | "FIRST_SAFFRON_IRRIGATION_DATE_RECOMMENDATION" | "HARVEST_DATE_RECOMMENDATION" | "QUESTIONNAIRE" | "SOWING_DATE_RECOMMENDATIONS" | "WEATHER_STATION" | "YIELD_GAP" | "CROPPING_PATTERN";
3617
4036
  type StatusType = "SUBMIT" | "ACTIVE" | "INACTIVE" | "CONFIRMED" | "PAID" | "DRAFT" | "PENDING" | "PROCESSING" | "ARCHIVED" | "COMPLETED" | "PASS_PAYMENT" | "VALID" | "INVALID" | "WRITING" | "REJECTED" | "FAILED" | "SUCCESS" | "DONE" | "VERIFIED" | "UNLOCK" | "LOCK" | "MODIFIED" | "REFUNDED_INVOICE" | "ACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "INACTIVE_LABORTORY_FIELD_EXPERIMENT_KIND" | "VALID_DEVICE_PUSH_TOKEN" | "INVALID_DEVICE_PUSH_TOKEN" | "DRAFT_MISSION" | "APPROVED_MISSION" | "REJECTED_MISSION" | "CANCELED_MISSION" | "COMPLETED_MISSION" | "IN_PROGRESS_MISSION" | "AWAITING_START_MISSION" | "AWAITING_APPROVAL_MISSION" | "AWAITING_REVIEW_DATA_MISSION" | "AWAITING_SAMPLE_DELIVERY_LABORATORY_MISSION" | "COMPLETED_REQUEST" | "AWAITING_SEND_REQUEST" | "AWAITING_REVIEW_REQUEST" | "AWAITING_PAYMENT_REQUEST" | "AWAITING_REVIEW_OFFER" | "AWAITING_COLLEAGUE_APPROVAL_REQUEST" | "AWAITING_MISSION_COMPLETION_REQUEST" | "AWAITING_PURCHASE_REQUEST" | "AWAITING_REVIEW_MISSION_DATA_REQUEST" | "REJECTED_REGISTRATION" | "REJECTED_MODIFICATION" | "REJECTED_ACTIVATION" | "CONFIRMED_ACTIVATION" | "CONFIRMED_REGISTRATION" | "AWAITING_REVIEW_ACTIVATION" | "AWAITING_SUBMIT_ACTIVATION" | "AWAITING_REVIEW_REGISTRATION" | "AWAITING_REVIEW_MODIFICATION" | "APPROVED_EXPERIMENT_ANALYSIS_REQUEST" | "REJECTED_EXPERIMENT_ANALYSIS_REQUEST" | "CANCELED_EXPERIMENT_ANALYSIS_REQUEST" | "COMPLETED_EXPERIMENT_ANALYSIS_REQUEST" | "IN_PROGRESS_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_START_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_APPROVAL_EXPERIMENT_ANALYSIS_REQUEST" | "DRAFT_EXPERIMENT_ANALYSIS_REQUEST" | "AWAITING_REVIEW_INQUIRY" | "COMPLETED_REGISTRATION" | "CANCELED_REQUEST" | "AWAITING_APPROVAL_RESIDENT_LEADING_EXPERT" | "APPROVED_RESIDENT_LEADING_EXPERT" | "REJECTED_RESIDENT_LEADING_EXPERT" | "AWAITING_SIGNING_CONTRACT" | "ACTIVE_LEADING_EXPERT" | "FAILED_CHARGE_WALLET_TRANSACTION" | "VERIFIED_CHARGE_WALLET_TRANSACTION" | "SUCCESS_PAYMENT_WALLET_TRANSACTION" | "SUCCESS_REFUND_WALLET_TRANSACTION" | "AWAITING_VERIFICATION_CHARGE_WALLET_TRANSACTION";
3618
4037
  type TaskType = "SAMPLING_REQUEST" | "SAMPLING_MISSION" | "ANALYSIS_REQUEST" | "MAP_DRAWING" | "WATER_SAMPLE_CONTROL" | "WATER_ANALYSIS_MEASUREMENT" | "WATER_EXPERIMENT_TECHNICAL_REVIEW" | "PLANT_SAMPLE_CONTROL" | "PLANT_ANALYSIS_MEASUREMENT" | "PLANT_EXPERIMENT_TECHNICAL_REVIEW" | "SOIL_SAMPLE_CONTROL" | "SOIL_ANALYSIS_MEASUREMENT" | "SOIL_EXPERIMENT_TECHNICAL_REVIEW" | "SENDING_REPORTS" | "TECHNICAL_REVIEW" | "EXPERIMENT_ANALYSIS_RESULTS_CONTROL" | "EXPERIMENT_RECOMMENDATION_ANALYSIS_RESULTS" | "SUPPORT_EXPERIMENTS" | "VISIT_REQUEST" | "FOLLOW_UP_VISIT" | "VISIT_MAP_DRAWING" | "VISIT_SENDING_REPORTS" | "SUPPORT_VISITS";
3619
4038
  type MechanizationType = "MOTORIZED" | "NON_MOTORIZED";
@@ -3875,6 +4294,29 @@ type MovementChangeModel = {
3875
4294
  type DeviceCodeModel = {
3876
4295
  deviceCode: string;
3877
4296
  };
4297
+ type ExperimentModelWithMeta = {
4298
+ unavailableExperimentParameters: UnavailableExperimentParameters[];
4299
+ };
4300
+ type UnavailableExperimentParameters = {
4301
+ experimentId: string;
4302
+ experimentParameters: ExperimentParameters[];
4303
+ };
4304
+ type ExperimentParameters = {
4305
+ id: string;
4306
+ name: string;
4307
+ persianName: string;
4308
+ };
4309
+ type ExperimentModel = {
4310
+ id: string;
4311
+ createdAt: string;
4312
+ samplesCount: number;
4313
+ laboratory: {};
4314
+ status: string;
4315
+ };
4316
+ type ExperimentsModel = {
4317
+ experiments: ExperimentModel[];
4318
+ meta: ExperimentModelWithMeta;
4319
+ };
3878
4320
  type AnnuallyChartReportModel = {
3879
4321
  year: number;
3880
4322
  value: number;
@@ -3900,17 +4342,18 @@ type CroppingPatternReportModel = {
3900
4342
  profitabilityIndex: number;
3901
4343
  climaticAdaptabilityIndex: number;
3902
4344
  irrigationRequirementIndex: number;
4345
+ netIrrigationRequirement: number;
4346
+ suppliedGrowingDegreeDayMean: number;
4347
+ growingDegreeDayRequirement: number;
3903
4348
  annuallyPerformancePotential: AnnuallyChartReportModel[];
3904
4349
  annuallyNetIrrigationRequirement: AnnuallyChartReportModel[];
3905
4350
  annuallySuppliedGrowingDegreeDay: AnnuallyChartReportModel[];
3906
- dailyMaximumTemperatureChange: DayOfYearChartReportModel[];
3907
- dailyMinimumTemperatureChange: DayOfYearChartReportModel[];
3908
- dailyMeanTemperatureChange: DayOfYearChartReportModel[];
3909
4351
  temperatureRisks: CroppingPatternRiskChartModel[];
3910
4352
  humidityRisks: CroppingPatternRiskChartModel[];
3911
4353
  };
3912
4354
  type CroppingPatternModel = {
3913
4355
  id: string;
4356
+ createdAt: string;
3914
4357
  farm: Farm;
3915
4358
  farmer: Farmer;
3916
4359
  irrigationSource: IrrigationSource;
@@ -3921,6 +4364,9 @@ type CroppingPatternModel = {
3921
4364
  irrigationHoursPerShift: number;
3922
4365
  cropKind: ProductKind;
3923
4366
  reports: CroppingPatternReportModel[];
4367
+ dailyMaximumTemperatureChange: DayOfYearChartReportModel[];
4368
+ dailyMinimumTemperatureChange: DayOfYearChartReportModel[];
4369
+ dailyMeanTemperatureChange: DayOfYearChartReportModel[];
3924
4370
  selectedCrops: Product[];
3925
4371
  status: Status;
3926
4372
  };
@@ -4057,21 +4503,23 @@ declare namespace ApiTypes {
4057
4503
  }
4058
4504
 
4059
4505
  type GetOneCroppingPatternParams = paths["/farmers/{farmerId}/cropping-patterns/{croppingPatternId}"]["get"]["parameters"]["path"];
4060
- type GetAllListCroppingPatternParams = paths["/farmers/{farmerId}/cropping-patterns"]["get"]["parameters"]["path"];
4061
- type CreateCroppingPatternBody = paths["/farmers/{farmerId}/cropping-patterns"]["post"]["requestBody"]["content"]["application/json"];
4062
- type CreateCroppingPatternParams = paths["/farmers/{farmerId}/cropping-patterns"]["post"]["parameters"];
4063
4506
  type CroppingPatternTypes = ApiRequestType<{
4064
4507
  croppingPattern: components["schemas"]["CroppingPattern"];
4065
4508
  }, {
4066
4509
  getOne: {
4067
4510
  pathParams: NonNullable<GetOneCroppingPatternParams>;
4068
4511
  };
4069
- getAll: {
4070
- pathParams: NonNullable<GetAllListCroppingPatternParams>;
4071
- };
4072
- create: {
4073
- body: CreateCroppingPatternBody;
4074
- pathParams: NonNullable<CreateCroppingPatternParams["path"]>;
4512
+ }>;
4513
+
4514
+ type GetExperimentParams = paths["/farmers/{farmerId}/experiments/results"]["get"]["parameters"];
4515
+ type GetExperimentWithMeta = paths["/farmers/{farmerId}/experiments/results"]["get"]["responses"]["200"]["content"]["application/json"]["result"]["data"];
4516
+ type ExperimentsType = ApiRequestType<{
4517
+ experiment: components["schemas"]["Experiment"];
4518
+ experimentWithMeta: GetExperimentWithMeta;
4519
+ }, {
4520
+ getExperiments: {
4521
+ params: GetExperimentParams["query"];
4522
+ pathParams: GetExperimentParams["path"];
4075
4523
  };
4076
4524
  }>;
4077
4525
 
@@ -4158,12 +4606,13 @@ declare const createSDK: (config: ClientConfig, middlewares?: Parameters<typeof
4158
4606
  varieties: {
4159
4607
  getAll: ({ params }: VarietiesType["RequestParams"]["getAll"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<MechanizationVarietyModel[]>>;
4160
4608
  };
4609
+ experiment: {
4610
+ getListExperiments: ({ params, pathParams, }: ExperimentsType["RequestParams"]["getExperiments"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<ExperimentsModel>>;
4611
+ };
4161
4612
  croppingPattern: {
4162
4613
  getOne: ({ pathParams, }: CroppingPatternTypes["RequestParams"]["getOne"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<CroppingPatternModel>>;
4163
- getAll: ({ pathParams, }: CroppingPatternTypes["RequestParams"]["getAll"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<CroppingPatternModel[]>>;
4164
- create: ({ body, pathParams, }: CroppingPatternTypes["RequestParams"]["create"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<unknown>>;
4165
4614
  };
4166
4615
  };
4167
4616
  };
4168
4617
 
4169
- export { type AnnuallyChartReportModel, type ApiRequestType, ApiTypes, type City, type CroppingPatternModel, type CroppingPatternReportModel, type CroppingPatternRiskChartModel, type DayOfYearChartReportModel, type DeviceCodeModel, type Experiment, type Farm, type Farmer, Identifiers, type Invoice, type IrrigationSource, type Location, type MechanizationFuelConsumptionChangesModel, type MechanizationMachineUsageKind, type MechanizationMachineUsageType, type MechanizationModel, type MechanizationMovementChangesModel, type MechanizationMovementChangesModelWithMeta, type MechanizationQuestionModel, type MechanizationSeasonProcessKind, type MechanizationSeasonProcessType, type MechanizationTemperatureChangesModel, type MechanizationType, type MechanizationVarietyModel, type MotorizedMechanizationSensorsModel, type MovementChangeModel, type OwnershipType, type Product, type ProductKind, type ProductKindType, type Province, type SeasonsProcessModel, type ServiceType, type SpeedChangesChartModel, type Status, type StatusType, type TaskType, type TrackingDeviceCodeModel, type VarietyKind, type VerifyPhoneNumberModel, type WeatherStation, type WeatherStationAlertPhoneNumber, createSDK };
4618
+ export { type AnnuallyChartReportModel, type ApiRequestType, ApiTypes, type City, type CroppingPatternModel, type CroppingPatternReportModel, type CroppingPatternRiskChartModel, type DayOfYearChartReportModel, type DeviceCodeModel, type Experiment, type ExperimentModel, type ExperimentModelWithMeta, type ExperimentParameters, type ExperimentsModel, type Farm, type Farmer, Identifiers, type Invoice, type IrrigationSource, type Location, type MechanizationFuelConsumptionChangesModel, type MechanizationMachineUsageKind, type MechanizationMachineUsageType, type MechanizationModel, type MechanizationMovementChangesModel, type MechanizationMovementChangesModelWithMeta, type MechanizationQuestionModel, type MechanizationSeasonProcessKind, type MechanizationSeasonProcessType, type MechanizationTemperatureChangesModel, type MechanizationType, type MechanizationVarietyModel, type MotorizedMechanizationSensorsModel, type MovementChangeModel, type OwnershipType, type Product, type ProductKind, type ProductKindType, type Province, type SeasonsProcessModel, type ServiceType, type SpeedChangesChartModel, type Status, type StatusType, type TaskType, type TrackingDeviceCodeModel, type UnavailableExperimentParameters, type VarietyKind, type VerifyPhoneNumberModel, type WeatherStation, type WeatherStationAlertPhoneNumber, createSDK };
package/dist/index.mjs CHANGED
@@ -58,6 +58,7 @@ var createClient = (config, middlewares = []) => {
58
58
  var croppingPatternMapper = {
59
59
  getOne: (dto) => ({
60
60
  id: dto.id,
61
+ createdAt: dto.createdAt,
61
62
  cropKind: dto.cropKind,
62
63
  farm: dto.farm,
63
64
  farmer: dto.farmer,
@@ -68,11 +69,12 @@ var croppingPatternMapper = {
68
69
  growingSeasonIrrigationTimes: dto.growingSeasonIrrigationTimes,
69
70
  irrigationHoursPerShift: dto.irrigationHoursPerShift,
70
71
  reports: dto.reports,
72
+ dailyMaximumTemperatureChange: dto.dailyMaximumTemperatureChange,
73
+ dailyMeanTemperatureChange: dto.dailyMeanTemperatureChange,
74
+ dailyMinimumTemperatureChange: dto.dailyMinimumTemperatureChange,
71
75
  selectedCrops: dto.selectedCrops,
72
76
  status: dto.status
73
- }),
74
- getAll: (dto) => dto.map(croppingPatternMapper.getOne),
75
- create: (_dto) => ({})
77
+ })
76
78
  };
77
79
 
78
80
  // src/services/dashboard/cropping-pattern/croppingPattern.service.ts
@@ -103,44 +105,6 @@ var createCroppingPatternServices = (client) => ({
103
105
  } catch (error) {
104
106
  return wrapError(error);
105
107
  }
106
- },
107
- getAll: async ({
108
- pathParams
109
- }) => {
110
- try {
111
- const response = await client.typed(
112
- "get",
113
- "/farmers/{farmerId}/cropping-patterns",
114
- {
115
- pathParams
116
- }
117
- );
118
- return R2.Ok(
119
- croppingPatternMapper.getAll(response.result.data.croppingPatterns)
120
- );
121
- } catch (error) {
122
- return wrapError(error);
123
- }
124
- },
125
- create: async ({
126
- body,
127
- pathParams
128
- }) => {
129
- try {
130
- const response = await client.typed(
131
- "post",
132
- "/farmers/{farmerId}/cropping-patterns",
133
- {
134
- pathParams,
135
- body
136
- }
137
- );
138
- return R2.Ok(
139
- croppingPatternMapper.create(response.result.data.croppingPattern)
140
- );
141
- } catch (error) {
142
- return wrapError(error);
143
- }
144
108
  }
145
109
  });
146
110
 
@@ -526,7 +490,7 @@ var mechanizationMapper = {
526
490
  variety: varietiesMapper.getOne(dto.variety)
527
491
  }),
528
492
  getAll: (dto) => dto.map(mechanizationMapper.getOne),
529
- create: (_dto) => ({})
493
+ create: (_res) => ({})
530
494
  };
531
495
 
532
496
  // src/services/dashboard/mechanization/mechanization.service.ts
@@ -599,6 +563,46 @@ var createMechanizationServices = (client) => ({
599
563
  }
600
564
  });
601
565
 
566
+ // src/services/dashboard/experiments/experiments.service.ts
567
+ import { R as R10 } from "@mobily/ts-belt";
568
+
569
+ // src/services/dashboard/experiments/experiments.mapper.ts
570
+ var experimentMapper = {
571
+ getExperiment: (dto) => ({
572
+ id: dto.id,
573
+ createdAt: dto.createdAt,
574
+ laboratory: dto.laboratory.laboratoryName,
575
+ samplesCount: dto.samplesCount,
576
+ status: dto.status.name
577
+ }),
578
+ getExperiments: (dto) => ({
579
+ experiments: dto.experiments.map(experimentMapper.getExperiment),
580
+ meta: dto.meta
581
+ })
582
+ };
583
+
584
+ // src/services/dashboard/experiments/experiments.service.ts
585
+ var createExperimentServices = (client) => ({
586
+ getListExperiments: async ({
587
+ params,
588
+ pathParams
589
+ }) => {
590
+ try {
591
+ const response = await client.typed(
592
+ "get",
593
+ "/farmers/{farmerId}/experiments/results",
594
+ {
595
+ params,
596
+ pathParams
597
+ }
598
+ );
599
+ return R10.Ok(experimentMapper.getExperiments(response.result.data));
600
+ } catch (error) {
601
+ return wrapError(error);
602
+ }
603
+ }
604
+ });
605
+
602
606
  // src/index.ts
603
607
  var createSDK = (config, middlewares = []) => {
604
608
  const client = createClient(config, middlewares);
@@ -611,6 +615,7 @@ var createSDK = (config, middlewares = []) => {
611
615
  seasonsProcess: createSeasonsProcess(client),
612
616
  sensors: createSensorsServices(client),
613
617
  varieties: createVarietiesService(client),
618
+ experiment: createExperimentServices(client),
614
619
  croppingPattern: createCroppingPatternServices(client)
615
620
  }
616
621
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agroyaar/sdk",
3
- "version": "3.2.0",
3
+ "version": "3.4.1",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",