@encatch/api-sdk 0.0.4 → 0.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 +9 -14
- package/dist/index.js +9 -14
- package/package.json +2 -2
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
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
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
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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.
|
|
3
|
+
"version": "0.0.6",
|
|
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.
|
|
23
|
+
"@encatch/schema": "0.1.29"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"dev": "vite",
|