@rezamirzapour/pod-sdk 1.0.9 → 1.0.10
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.d.mts +21 -39
- package/dist/index.d.ts +21 -39
- package/dist/index.js +8 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -20
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -255,10 +255,8 @@ var SsoService = class {
|
|
|
255
255
|
var CaptchaService = class {
|
|
256
256
|
http;
|
|
257
257
|
clientId;
|
|
258
|
-
accessToken;
|
|
259
258
|
constructor(options) {
|
|
260
259
|
this.clientId = options.clientId;
|
|
261
|
-
this.accessToken = options.accessToken;
|
|
262
260
|
this.http = createNextHttp({
|
|
263
261
|
baseUrl: options.baseUrl,
|
|
264
262
|
serviceName: "POD-CAPTCHA"
|
|
@@ -267,28 +265,18 @@ var CaptchaService = class {
|
|
|
267
265
|
/**
|
|
268
266
|
* Get a new captcha image
|
|
269
267
|
*/
|
|
270
|
-
async get(
|
|
268
|
+
async get() {
|
|
271
269
|
const params = {};
|
|
272
|
-
if (options?.width) params.width = options.width;
|
|
273
|
-
if (options?.height) params.height = options.height;
|
|
274
|
-
if (options?.length) params.length = options.length;
|
|
275
|
-
if (options?.type) params.type = options.type;
|
|
276
|
-
if (options?.format) params.format = options.format;
|
|
277
|
-
if (options?.noise !== void 0) params.noise = options.noise;
|
|
278
|
-
if (options?.bgColor) params.bgColor = options.bgColor;
|
|
279
|
-
if (options?.fontColor) params.fontColor = options.fontColor;
|
|
280
|
-
if (options?.fontSize) params.fontSize = options.fontSize;
|
|
281
270
|
try {
|
|
282
271
|
const result = await this.http.post(
|
|
283
|
-
"/api/core/
|
|
272
|
+
"/api/core/captcha/get",
|
|
284
273
|
void 0,
|
|
285
274
|
{
|
|
286
275
|
params,
|
|
287
276
|
headers: {
|
|
288
277
|
"Content-Type": "application/json",
|
|
289
278
|
Accept: "application/json",
|
|
290
|
-
"Client-Id": this.clientId
|
|
291
|
-
"Access-Token": this.accessToken
|
|
279
|
+
"Client-Id": this.clientId
|
|
292
280
|
}
|
|
293
281
|
}
|
|
294
282
|
);
|
|
@@ -307,19 +295,19 @@ var CaptchaService = class {
|
|
|
307
295
|
/**
|
|
308
296
|
* Check if the entered captcha value is valid
|
|
309
297
|
*/
|
|
310
|
-
async check(
|
|
298
|
+
async check(options) {
|
|
311
299
|
try {
|
|
312
300
|
const result = await this.http.post(
|
|
313
|
-
`/api/core/
|
|
301
|
+
`/api/core/captcha/check`,
|
|
314
302
|
{
|
|
315
|
-
|
|
303
|
+
value: options.value,
|
|
304
|
+
hash: options.hash
|
|
316
305
|
},
|
|
317
306
|
{
|
|
318
307
|
headers: {
|
|
319
308
|
"Content-Type": "application/json",
|
|
320
309
|
Accept: "application/json",
|
|
321
|
-
"Client-Id": this.clientId
|
|
322
|
-
"Access-Token": this.accessToken
|
|
310
|
+
"Client-Id": this.clientId
|
|
323
311
|
}
|
|
324
312
|
}
|
|
325
313
|
);
|