@agroyaar/sdk 1.0.5 → 1.0.6

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
@@ -105,13 +105,15 @@ var createMechanizationServices = (client) => ({
105
105
  const { data } = await client.get(
106
106
  `/statics/mechanizations-varieties?kindName=${kindName}`
107
107
  );
108
- return data && import_ts_belt.R.Ok(
108
+ return import_ts_belt.R.Ok(
109
109
  mappers.getMechanizationVarietyList(
110
110
  data.result.data.mechanizationVarieties
111
111
  )
112
112
  );
113
- } catch (_error) {
114
- return import_ts_belt.R.Error(new Error());
113
+ } catch (error) {
114
+ const err = error instanceof Error ? error : new Error(String(error));
115
+ console.error("MechanizationVariety API Error:", err);
116
+ return import_ts_belt.R.Error(err);
115
117
  }
116
118
  }
117
119
  });
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import * as _mobily_ts_belt from '@mobily/ts-belt';
2
+
1
3
  declare const __brand: unique symbol;
2
4
  type Brand<B> = {
3
5
  readonly [__brand]: B;
@@ -33,7 +35,7 @@ type ClientConfig = {
33
35
  declare const createSDK: (config: ClientConfig) => {
34
36
  dashboardServices: {
35
37
  mechanization: {
36
- getMechanizationVarieties: ({ kindName, }: MechanizationVarietyVariables) => Promise<any>;
38
+ getMechanizationVarieties: ({ kindName, }: MechanizationVarietyVariables) => Promise<_mobily_ts_belt.Ok<MechanizationVarietyModel[]> | _mobily_ts_belt.Error<Error>>;
37
39
  };
38
40
  };
39
41
  };
package/dist/index.mjs CHANGED
@@ -69,13 +69,15 @@ var createMechanizationServices = (client) => ({
69
69
  const { data } = await client.get(
70
70
  `/statics/mechanizations-varieties?kindName=${kindName}`
71
71
  );
72
- return data && R.Ok(
72
+ return R.Ok(
73
73
  mappers.getMechanizationVarietyList(
74
74
  data.result.data.mechanizationVarieties
75
75
  )
76
76
  );
77
- } catch (_error) {
78
- return R.Error(new Error());
77
+ } catch (error) {
78
+ const err = error instanceof Error ? error : new Error(String(error));
79
+ console.error("MechanizationVariety API Error:", err);
80
+ return R.Error(err);
79
81
  }
80
82
  }
81
83
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agroyaar/sdk",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",