@encatch/api-sdk 0.0.4 → 0.0.5

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
@@ -194,20 +194,15 @@ var _EncatchApiSDK = class _EncatchApiSDK {
194
194
  }
195
195
  async refineText(params) {
196
196
  this._log("Refining text with params:", JSON.stringify(params, null, 2));
197
- try {
198
- const result = await this._makeRequest(
199
- _EncatchApiSDK.ENDPOINTS.REFINE_TEXT,
200
- {
201
- method: "POST",
202
- body: params
203
- }
204
- );
205
- this._log("Text refined successfully: ", result);
206
- return result;
207
- } catch (error) {
208
- this._log("Error refining text: ", error);
209
- throw error;
210
- }
197
+ const result = await this._makeRequest(
198
+ _EncatchApiSDK.ENDPOINTS.REFINE_TEXT,
199
+ {
200
+ method: "POST",
201
+ body: params
202
+ }
203
+ );
204
+ this._log("Text refine response: ", result);
205
+ return result;
211
206
  }
212
207
  async _makeRequest(endpoint, options) {
213
208
  const url = `${this.hostUrl}${endpoint}`;
package/dist/index.js CHANGED
@@ -160,20 +160,15 @@ var _EncatchApiSDK = class _EncatchApiSDK {
160
160
  }
161
161
  async refineText(params) {
162
162
  this._log("Refining text with params:", JSON.stringify(params, null, 2));
163
- try {
164
- const result = await this._makeRequest(
165
- _EncatchApiSDK.ENDPOINTS.REFINE_TEXT,
166
- {
167
- method: "POST",
168
- body: params
169
- }
170
- );
171
- this._log("Text refined successfully: ", result);
172
- return result;
173
- } catch (error) {
174
- this._log("Error refining text: ", error);
175
- throw error;
176
- }
163
+ const result = await this._makeRequest(
164
+ _EncatchApiSDK.ENDPOINTS.REFINE_TEXT,
165
+ {
166
+ method: "POST",
167
+ body: params
168
+ }
169
+ );
170
+ this._log("Text refine response: ", result);
171
+ return result;
177
172
  }
178
173
  async _makeRequest(endpoint, options) {
179
174
  const url = `${this.hostUrl}${endpoint}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@encatch/api-sdk",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -20,7 +20,7 @@
20
20
  "pako": "^2.1.0",
21
21
  "ts-case-convert": "^2.1.0",
22
22
  "zod": "^4.1.8",
23
- "@encatch/schema": "0.1.28"
23
+ "@encatch/schema": "0.1.29"
24
24
  },
25
25
  "scripts": {
26
26
  "dev": "vite",