@agroyaar/sdk 3.6.7 → 3.6.9

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
@@ -659,7 +659,7 @@ var mechanizationMapper = {
659
659
  }),
660
660
  getAll: (dto) => dto.map(mechanizationMapper.getOne),
661
661
  create: (_dto) => ({}),
662
- delete: (_dto) => ({})
662
+ delete: (dto) => mechanizationMapper.getOne(dto)
663
663
  };
664
664
 
665
665
  // src/services/dashboard/mechanization/mechanization.service.ts
@@ -730,12 +730,14 @@ var createMechanizationServices = (client) => ({
730
730
  return wrapError(error);
731
731
  }
732
732
  },
733
- delete: async ({ params }) => {
733
+ delete: async ({
734
+ pathParams
735
+ }) => {
734
736
  try {
735
737
  const response = await client.typed(
736
738
  "delete",
737
739
  "/farmers/{farmerId}/mechanizations/{mechanizationId}",
738
- { pathParams: params }
740
+ { pathParams }
739
741
  );
740
742
  return import_ts_belt10.R.Ok(
741
743
  mechanizationMapper.delete(response.result.data.mechanization)
package/dist/index.d.ts CHANGED
@@ -5285,7 +5285,7 @@ type MechanizationTypes = ApiRequestType<{
5285
5285
  pathParams: NonNullable<CreateMechanizationParams["path"]>;
5286
5286
  };
5287
5287
  delete: {
5288
- params: DeleteMechanizationPrams["path"];
5288
+ pathParams: NonNullable<DeleteMechanizationPrams["path"]>;
5289
5289
  };
5290
5290
  }>;
5291
5291
 
@@ -5471,7 +5471,7 @@ declare const createSDK: (config: ClientConfig, middlewares?: Parameters<typeof
5471
5471
  getOne: ({ pathParams, }: MechanizationTypes["RequestParams"]["getOne"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<MechanizationModel>>;
5472
5472
  getAll: ({ pathParams: { farmerId }, path: { kindName }, }: MechanizationTypes["RequestParams"]["getAll"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<MechanizationModel[]>>;
5473
5473
  create: ({ body, pathParams, }: MechanizationTypes["RequestParams"]["create"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<unknown>>;
5474
- delete: ({ params }: MechanizationTypes["RequestParams"]["delete"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<unknown>>;
5474
+ delete: ({ pathParams, }: MechanizationTypes["RequestParams"]["delete"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<MechanizationModel>>;
5475
5475
  };
5476
5476
  auth: {
5477
5477
  verifyPhoneNumber: ({ body, }: AuthType["RequestParams"]["createVerifyPhoneNumber"]) => Promise<_mobily_ts_belt.Error<Error> | _mobily_ts_belt.Ok<VerifyPhoneNumberModel>>;
package/dist/index.mjs CHANGED
@@ -623,7 +623,7 @@ var mechanizationMapper = {
623
623
  }),
624
624
  getAll: (dto) => dto.map(mechanizationMapper.getOne),
625
625
  create: (_dto) => ({}),
626
- delete: (_dto) => ({})
626
+ delete: (dto) => mechanizationMapper.getOne(dto)
627
627
  };
628
628
 
629
629
  // src/services/dashboard/mechanization/mechanization.service.ts
@@ -694,12 +694,14 @@ var createMechanizationServices = (client) => ({
694
694
  return wrapError(error);
695
695
  }
696
696
  },
697
- delete: async ({ params }) => {
697
+ delete: async ({
698
+ pathParams
699
+ }) => {
698
700
  try {
699
701
  const response = await client.typed(
700
702
  "delete",
701
703
  "/farmers/{farmerId}/mechanizations/{mechanizationId}",
702
- { pathParams: params }
704
+ { pathParams }
703
705
  );
704
706
  return R10.Ok(
705
707
  mechanizationMapper.delete(response.result.data.mechanization)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agroyaar/sdk",
3
- "version": "3.6.7",
3
+ "version": "3.6.9",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",