@agroyaar/sdk 3.0.1-2 → 3.0.1-3

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
@@ -552,6 +552,47 @@ var createMechanizationServices = (client) => ({
552
552
  }
553
553
  });
554
554
 
555
+ // src/services/dashboard/cropping-pattern/croppingPattern.mapper.ts
556
+ var croppingPatternMapper = {
557
+ getOne: (dto) => ({
558
+ id: dto.id,
559
+ cropKind: dto.cropKind,
560
+ farm: dto.farm,
561
+ farmer: dto.farmer,
562
+ irrigationSource: dto.irrigationSource,
563
+ experiment: dto.experiment,
564
+ invoice: dto.invoice,
565
+ weatherStation: dto.weatherStation,
566
+ growingSeasonIrrigationTimes: dto.growingSeasonIrrigationTimes,
567
+ irrigationHoursPerShift: dto.irrigationHoursPerShift,
568
+ reports: dto.reports,
569
+ selectedCrops: dto.selectedCrops,
570
+ status: dto.status
571
+ })
572
+ };
573
+
574
+ // src/services/dashboard/cropping-pattern/croppingPattern.service.ts
575
+ var import_ts_belt9 = require("@mobily/ts-belt");
576
+ var createCroppingPatternServices = (client) => ({
577
+ getOne: async ({
578
+ pathParams
579
+ }) => {
580
+ try {
581
+ const response = await client.typed(
582
+ "get",
583
+ "/farmers/{farmerId}/cropping-patterns/{croppingPatternId}",
584
+ {
585
+ pathParams
586
+ }
587
+ );
588
+ const croppingPattern = response.result.data.croppingPattern;
589
+ return import_ts_belt9.R.Ok(croppingPatternMapper.getOne(croppingPattern));
590
+ } catch (error) {
591
+ return wrapError(error);
592
+ }
593
+ }
594
+ });
595
+
555
596
  // src/index.ts
556
597
  var createSDK = (config, middlewares = []) => {
557
598
  const client = createClient(config, middlewares);
@@ -563,7 +604,8 @@ var createSDK = (config, middlewares = []) => {
563
604
  mechanizationQuestion: createQuestionServices(client),
564
605
  seasonsProcess: createSeasonsProcess(client),
565
606
  sensors: createSensorsServices(client),
566
- varieties: createVarietiesService(client)
607
+ varieties: createVarietiesService(client),
608
+ croppingPattern: createCroppingPatternServices(client)
567
609
  }
568
610
  };
569
611
  };
package/dist/index.d.ts CHANGED
@@ -3613,108 +3613,6 @@ interface operations {
3613
3613
  };
3614
3614
  }
3615
3615
 
3616
- type CreateVerifyPhoneNumberBody = paths["/auth/verify-phone-number"]["post"]["requestBody"]["content"]["application/json"];
3617
- type AuthType = ApiRequestType<{
3618
- verifyPhoneNumber: components["schemas"]["VerifyPhoneNumber"];
3619
- }, {
3620
- createVerifyPhoneNumber: {
3621
- body: CreateVerifyPhoneNumberBody;
3622
- };
3623
- }>;
3624
-
3625
- type CreateDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/submit-device-code"]["put"]["parameters"]["path"];
3626
- type CreateDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/submit-device-code"]["put"]["requestBody"]["content"]["application/json"];
3627
- type UpdateDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/update-device-code"]["put"]["requestBody"]["content"]["application/json"];
3628
- type UpdateDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/update-device-code"]["put"]["parameters"]["path"];
3629
- type DeleteDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/delete-device-code"]["delete"]["requestBody"]["content"]["application/json"];
3630
- type DeleteDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/delete-device-code"]["delete"]["parameters"]["path"];
3631
- type DeviceCodeType = ApiRequestType<{
3632
- submitModel: components["schemas"]["SubmitMechanizationDeviceCodeInput"];
3633
- deleteModel: components["schemas"]["DeleteMechanizationDeviceCodeInput"];
3634
- updateModel: components["schemas"]["UpdateMechanizationDeviceCodeInput"];
3635
- }, {
3636
- create: {
3637
- pathParams: CreateDeviceCodeParams;
3638
- body: CreateDeviceCodeBody;
3639
- };
3640
- update: {
3641
- pathParams: NonNullable<UpdateDeviceCodeParams>;
3642
- body: UpdateDeviceCodeBody;
3643
- };
3644
- delete: {
3645
- pathParams: DeleteDeviceCodeParams;
3646
- body: DeleteDeviceCodeBody;
3647
- };
3648
- }>;
3649
-
3650
- type GetMechanizationQuestionParams = paths["/statics/mechanizations-questions"]["get"]["parameters"];
3651
- type MechanizationQuestionType = ApiRequestType<{
3652
- mechanizationQuestion: components["schemas"]["MechanizationQuestion"];
3653
- }, {
3654
- getAll: {
3655
- params: NonNullable<GetMechanizationQuestionParams["query"]>;
3656
- };
3657
- }>;
3658
-
3659
- type GetAllMechanizationsParams = paths["/farmers/{farmerId}/mechanizations"]["get"]["parameters"];
3660
- type GetOneMechanizationsParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}"]["get"]["parameters"]["path"];
3661
- type CreateMechanizationBody = paths["/farmers/{farmerId}/mechanizations"]["post"]["requestBody"]["content"]["application/json"];
3662
- type CreateMechanizationParams = paths["/farmers/{farmerId}/mechanizations"]["post"]["parameters"];
3663
- type MechanizationTypes = ApiRequestType<{
3664
- mechanization: components["schemas"]["Mechanization"];
3665
- }, {
3666
- getAll: {
3667
- pathParams: NonNullable<GetAllMechanizationsParams["path"]>;
3668
- path: NonNullable<GetAllMechanizationsParams["query"]>;
3669
- };
3670
- getOne: {
3671
- pathParams: NonNullable<GetOneMechanizationsParams>;
3672
- };
3673
- create: {
3674
- body: CreateMechanizationBody;
3675
- pathParams: NonNullable<CreateMechanizationParams["path"]>;
3676
- };
3677
- }>;
3678
-
3679
- type SeasonsProcessType = ApiRequestType<{
3680
- seasonProcess: components["schemas"]["MechanizationSeasonProcessKind"];
3681
- }, {}>;
3682
-
3683
- type GetMechanizationSensors = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors"]["get"]["parameters"];
3684
- type GetTemperatureChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/temperature-changes"]["get"]["parameters"];
3685
- type GetFuelConsumptionChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/fuel-consumption-changes"]["get"]["parameters"];
3686
- type GetSpeedChangeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/speed-changes"]["get"]["parameters"];
3687
- type GetMovementChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/movement-changes"]["get"]["parameters"];
3688
- type MovementChangeWithMeta = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/movement-changes"]["get"]["responses"]["200"]["content"]["application/json"]["result"]["data"];
3689
- type SensorType = ApiRequestType<{
3690
- sensor: components["schemas"]["MotorizedMechanizationSensor"];
3691
- temperature: components["schemas"]["TemperatureChange"];
3692
- fuelConsumption: components["schemas"]["FuelConsumptionChange"];
3693
- speedChange: components["schemas"]["SpeedChange"];
3694
- movementChange: components["schemas"]["MovementChange"];
3695
- movementChangeWithMeta: MovementChangeWithMeta;
3696
- }, {
3697
- getSensors: {
3698
- pathParams: GetMechanizationSensors["path"];
3699
- };
3700
- getTemperatureChanges: {
3701
- pathParams: GetTemperatureChangesParams["path"];
3702
- params: GetTemperatureChangesParams["query"];
3703
- };
3704
- getFuelConsumptionChanges: {
3705
- pathParams: GetFuelConsumptionChangesParams["path"];
3706
- params: GetFuelConsumptionChangesParams["query"];
3707
- };
3708
- getSpeedChange: {
3709
- pathParams: GetSpeedChangeParams["path"];
3710
- params: GetSpeedChangeParams["query"];
3711
- };
3712
- getMovementChange: {
3713
- params: GetMovementChangesParams["query"];
3714
- pathParams: GetMovementChangesParams["path"];
3715
- };
3716
- }>;
3717
-
3718
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";
3719
3617
  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";
3720
3618
  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";
@@ -4027,12 +3925,114 @@ type CroppingPatternModel = {
4027
3925
  status: Status;
4028
3926
  };
4029
3927
 
4030
- type GetOneCroppingPatternParams = paths["/farmers/{farmerId}/cropping-patterns/{croppingPatternId}"]["get"]["parameters"]["path"];
4031
- type CroppingPatternTypes = ApiRequestType<{
4032
- croppingPattern: components["schemas"]["CroppingPattern"];
3928
+ type CreateVerifyPhoneNumberBody = paths["/auth/verify-phone-number"]["post"]["requestBody"]["content"]["application/json"];
3929
+ type AuthType = ApiRequestType<{
3930
+ verifyPhoneNumber: components["schemas"]["VerifyPhoneNumber"];
4033
3931
  }, {
3932
+ createVerifyPhoneNumber: {
3933
+ body: CreateVerifyPhoneNumberBody;
3934
+ };
3935
+ }>;
3936
+
3937
+ type CreateDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/submit-device-code"]["put"]["parameters"]["path"];
3938
+ type CreateDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/submit-device-code"]["put"]["requestBody"]["content"]["application/json"];
3939
+ type UpdateDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/update-device-code"]["put"]["requestBody"]["content"]["application/json"];
3940
+ type UpdateDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/update-device-code"]["put"]["parameters"]["path"];
3941
+ type DeleteDeviceCodeBody = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/delete-device-code"]["delete"]["requestBody"]["content"]["application/json"];
3942
+ type DeleteDeviceCodeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/delete-device-code"]["delete"]["parameters"]["path"];
3943
+ type DeviceCodeType = ApiRequestType<{
3944
+ submitModel: components["schemas"]["SubmitMechanizationDeviceCodeInput"];
3945
+ deleteModel: components["schemas"]["DeleteMechanizationDeviceCodeInput"];
3946
+ updateModel: components["schemas"]["UpdateMechanizationDeviceCodeInput"];
3947
+ }, {
3948
+ create: {
3949
+ pathParams: CreateDeviceCodeParams;
3950
+ body: CreateDeviceCodeBody;
3951
+ };
3952
+ update: {
3953
+ pathParams: NonNullable<UpdateDeviceCodeParams>;
3954
+ body: UpdateDeviceCodeBody;
3955
+ };
3956
+ delete: {
3957
+ pathParams: DeleteDeviceCodeParams;
3958
+ body: DeleteDeviceCodeBody;
3959
+ };
3960
+ }>;
3961
+
3962
+ type GetMechanizationQuestionParams = paths["/statics/mechanizations-questions"]["get"]["parameters"];
3963
+ type MechanizationQuestionType = ApiRequestType<{
3964
+ mechanizationQuestion: components["schemas"]["MechanizationQuestion"];
3965
+ }, {
3966
+ getAll: {
3967
+ params: NonNullable<GetMechanizationQuestionParams["query"]>;
3968
+ };
3969
+ }>;
3970
+
3971
+ type GetVarietiesParams = paths["/statics/mechanizations-varieties"]["get"]["parameters"];
3972
+ type VarietiesType = ApiRequestType<{
3973
+ variety: components["schemas"]["MechanizationVariety"];
3974
+ }, {
3975
+ getAll: {
3976
+ params: NonNullable<GetVarietiesParams["query"]>;
3977
+ };
3978
+ }>;
3979
+
3980
+ type GetAllMechanizationsParams = paths["/farmers/{farmerId}/mechanizations"]["get"]["parameters"];
3981
+ type GetOneMechanizationsParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}"]["get"]["parameters"]["path"];
3982
+ type CreateMechanizationBody = paths["/farmers/{farmerId}/mechanizations"]["post"]["requestBody"]["content"]["application/json"];
3983
+ type CreateMechanizationParams = paths["/farmers/{farmerId}/mechanizations"]["post"]["parameters"];
3984
+ type MechanizationTypes = ApiRequestType<{
3985
+ mechanization: components["schemas"]["Mechanization"];
3986
+ }, {
3987
+ getAll: {
3988
+ pathParams: NonNullable<GetAllMechanizationsParams["path"]>;
3989
+ path: NonNullable<GetAllMechanizationsParams["query"]>;
3990
+ };
4034
3991
  getOne: {
4035
- pathParams: NonNullable<GetOneCroppingPatternParams>;
3992
+ pathParams: NonNullable<GetOneMechanizationsParams>;
3993
+ };
3994
+ create: {
3995
+ body: CreateMechanizationBody;
3996
+ pathParams: NonNullable<CreateMechanizationParams["path"]>;
3997
+ };
3998
+ }>;
3999
+
4000
+ type SeasonsProcessType = ApiRequestType<{
4001
+ seasonProcess: components["schemas"]["MechanizationSeasonProcessKind"];
4002
+ }, {}>;
4003
+
4004
+ type GetMechanizationSensors = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors"]["get"]["parameters"];
4005
+ type GetTemperatureChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/temperature-changes"]["get"]["parameters"];
4006
+ type GetFuelConsumptionChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/fuel-consumption-changes"]["get"]["parameters"];
4007
+ type GetSpeedChangeParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/speed-changes"]["get"]["parameters"];
4008
+ type GetMovementChangesParams = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/movement-changes"]["get"]["parameters"];
4009
+ type MovementChangeWithMeta = paths["/farmers/{farmerId}/mechanizations/{mechanizationId}/sensors/movement-changes"]["get"]["responses"]["200"]["content"]["application/json"]["result"]["data"];
4010
+ type SensorType = ApiRequestType<{
4011
+ sensor: components["schemas"]["MotorizedMechanizationSensor"];
4012
+ temperature: components["schemas"]["TemperatureChange"];
4013
+ fuelConsumption: components["schemas"]["FuelConsumptionChange"];
4014
+ speedChange: components["schemas"]["SpeedChange"];
4015
+ movementChange: components["schemas"]["MovementChange"];
4016
+ movementChangeWithMeta: MovementChangeWithMeta;
4017
+ }, {
4018
+ getSensors: {
4019
+ pathParams: GetMechanizationSensors["path"];
4020
+ };
4021
+ getTemperatureChanges: {
4022
+ pathParams: GetTemperatureChangesParams["path"];
4023
+ params: GetTemperatureChangesParams["query"];
4024
+ };
4025
+ getFuelConsumptionChanges: {
4026
+ pathParams: GetFuelConsumptionChangesParams["path"];
4027
+ params: GetFuelConsumptionChangesParams["query"];
4028
+ };
4029
+ getSpeedChange: {
4030
+ pathParams: GetSpeedChangeParams["path"];
4031
+ params: GetSpeedChangeParams["query"];
4032
+ };
4033
+ getMovementChange: {
4034
+ params: GetMovementChangesParams["query"];
4035
+ pathParams: GetMovementChangesParams["path"];
4036
4036
  };
4037
4037
  }>;
4038
4038
 
@@ -4056,12 +4056,12 @@ declare namespace ApiTypes {
4056
4056
  type CroppingPattern = CroppingPatternTypes;
4057
4057
  }
4058
4058
 
4059
- type GetVarietiesParams = paths["/statics/mechanizations-varieties"]["get"]["parameters"];
4060
- type VarietiesType = ApiRequestType<{
4061
- variety: components["schemas"]["MechanizationVariety"];
4059
+ type GetOneCroppingPatternParams = paths["/farmers/{farmerId}/cropping-patterns/{croppingPatternId}"]["get"]["parameters"]["path"];
4060
+ type CroppingPatternTypes = ApiRequestType<{
4061
+ croppingPattern: components["schemas"]["CroppingPattern"];
4062
4062
  }, {
4063
- getAll: {
4064
- params: NonNullable<GetVarietiesParams["query"]>;
4063
+ getOne: {
4064
+ pathParams: NonNullable<GetOneCroppingPatternParams>;
4065
4065
  };
4066
4066
  }>;
4067
4067
 
@@ -4148,6 +4148,9 @@ declare const createSDK: (config: ClientConfig, middlewares?: Parameters<typeof
4148
4148
  varieties: {
4149
4149
  getAll: ({ params }: VarietiesType["RequestParams"]["getAll"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<MechanizationVarietyModel[]>>;
4150
4150
  };
4151
+ croppingPattern: {
4152
+ getOne: ({ pathParams, }: CroppingPatternTypes["RequestParams"]["getOne"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<CroppingPatternModel>>;
4153
+ };
4151
4154
  };
4152
4155
  };
4153
4156
 
package/dist/index.mjs CHANGED
@@ -516,6 +516,47 @@ var createMechanizationServices = (client) => ({
516
516
  }
517
517
  });
518
518
 
519
+ // src/services/dashboard/cropping-pattern/croppingPattern.mapper.ts
520
+ var croppingPatternMapper = {
521
+ getOne: (dto) => ({
522
+ id: dto.id,
523
+ cropKind: dto.cropKind,
524
+ farm: dto.farm,
525
+ farmer: dto.farmer,
526
+ irrigationSource: dto.irrigationSource,
527
+ experiment: dto.experiment,
528
+ invoice: dto.invoice,
529
+ weatherStation: dto.weatherStation,
530
+ growingSeasonIrrigationTimes: dto.growingSeasonIrrigationTimes,
531
+ irrigationHoursPerShift: dto.irrigationHoursPerShift,
532
+ reports: dto.reports,
533
+ selectedCrops: dto.selectedCrops,
534
+ status: dto.status
535
+ })
536
+ };
537
+
538
+ // src/services/dashboard/cropping-pattern/croppingPattern.service.ts
539
+ import { R as R9 } from "@mobily/ts-belt";
540
+ var createCroppingPatternServices = (client) => ({
541
+ getOne: async ({
542
+ pathParams
543
+ }) => {
544
+ try {
545
+ const response = await client.typed(
546
+ "get",
547
+ "/farmers/{farmerId}/cropping-patterns/{croppingPatternId}",
548
+ {
549
+ pathParams
550
+ }
551
+ );
552
+ const croppingPattern = response.result.data.croppingPattern;
553
+ return R9.Ok(croppingPatternMapper.getOne(croppingPattern));
554
+ } catch (error) {
555
+ return wrapError(error);
556
+ }
557
+ }
558
+ });
559
+
519
560
  // src/index.ts
520
561
  var createSDK = (config, middlewares = []) => {
521
562
  const client = createClient(config, middlewares);
@@ -527,7 +568,8 @@ var createSDK = (config, middlewares = []) => {
527
568
  mechanizationQuestion: createQuestionServices(client),
528
569
  seasonsProcess: createSeasonsProcess(client),
529
570
  sensors: createSensorsServices(client),
530
- varieties: createVarietiesService(client)
571
+ varieties: createVarietiesService(client),
572
+ croppingPattern: createCroppingPatternServices(client)
531
573
  }
532
574
  };
533
575
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agroyaar/sdk",
3
- "version": "3.0.1-2",
3
+ "version": "3.0.1-3",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",