@pioneer-platform/pioneer-sdk 4.20.10 → 4.20.11

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
@@ -314,9 +314,9 @@ var require_lib = __commonJS((exports2) => {
314
314
  spec: specData_1,
315
315
  execute: function(request) {
316
316
  return __awaiter(_this, undefined, undefined, function() {
317
- var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, url, httpReq;
318
- return __generator(this, function(_a2) {
319
- switch (_a2.label) {
317
+ var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, finalPath, _i, _a2, _b2, key, value, placeholder, url, httpReq;
318
+ return __generator(this, function(_c) {
319
+ switch (_c.label) {
320
320
  case 0:
321
321
  operationId = request.operationId, parameters = request.parameters, requestBody = request.requestBody;
322
322
  targetPath = "";
@@ -339,7 +339,17 @@ var require_lib = __commonJS((exports2) => {
339
339
  if (specData_1.servers && specData_1.servers.length > 0) {
340
340
  baseUrl = specData_1.servers[0].url;
341
341
  }
342
- url = "".concat(baseUrl).concat(targetPath);
342
+ finalPath = targetPath;
343
+ if (parameters) {
344
+ for (_i = 0, _a2 = Object.entries(parameters);_i < _a2.length; _i++) {
345
+ _b2 = _a2[_i], key = _b2[0], value = _b2[1];
346
+ placeholder = "{".concat(key, "}");
347
+ if (finalPath.includes(placeholder)) {
348
+ finalPath = finalPath.replace(placeholder, encodeURIComponent(String(value)));
349
+ }
350
+ }
351
+ }
352
+ url = "".concat(baseUrl).concat(finalPath);
343
353
  httpReq = {
344
354
  method: targetMethod.toUpperCase(),
345
355
  url,
@@ -351,7 +361,7 @@ var require_lib = __commonJS((exports2) => {
351
361
  };
352
362
  return [4, customHttpClient(httpReq)];
353
363
  case 1:
354
- return [2, _a2.sent()];
364
+ return [2, _c.sent()];
355
365
  }
356
366
  });
357
367
  });
package/dist/index.es.js CHANGED
@@ -297,9 +297,9 @@ var require_lib = __commonJS((exports) => {
297
297
  spec: specData_1,
298
298
  execute: function(request) {
299
299
  return __awaiter(_this, undefined, undefined, function() {
300
- var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, url, httpReq;
301
- return __generator(this, function(_a2) {
302
- switch (_a2.label) {
300
+ var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, finalPath, _i, _a2, _b2, key, value, placeholder, url, httpReq;
301
+ return __generator(this, function(_c) {
302
+ switch (_c.label) {
303
303
  case 0:
304
304
  operationId = request.operationId, parameters = request.parameters, requestBody = request.requestBody;
305
305
  targetPath = "";
@@ -322,7 +322,17 @@ var require_lib = __commonJS((exports) => {
322
322
  if (specData_1.servers && specData_1.servers.length > 0) {
323
323
  baseUrl = specData_1.servers[0].url;
324
324
  }
325
- url = "".concat(baseUrl).concat(targetPath);
325
+ finalPath = targetPath;
326
+ if (parameters) {
327
+ for (_i = 0, _a2 = Object.entries(parameters);_i < _a2.length; _i++) {
328
+ _b2 = _a2[_i], key = _b2[0], value = _b2[1];
329
+ placeholder = "{".concat(key, "}");
330
+ if (finalPath.includes(placeholder)) {
331
+ finalPath = finalPath.replace(placeholder, encodeURIComponent(String(value)));
332
+ }
333
+ }
334
+ }
335
+ url = "".concat(baseUrl).concat(finalPath);
326
336
  httpReq = {
327
337
  method: targetMethod.toUpperCase(),
328
338
  url,
@@ -334,7 +344,7 @@ var require_lib = __commonJS((exports) => {
334
344
  };
335
345
  return [4, customHttpClient(httpReq)];
336
346
  case 1:
337
- return [2, _a2.sent()];
347
+ return [2, _c.sent()];
338
348
  }
339
349
  });
340
350
  });
package/dist/index.js CHANGED
@@ -297,9 +297,9 @@ var require_lib = __commonJS((exports) => {
297
297
  spec: specData_1,
298
298
  execute: function(request) {
299
299
  return __awaiter(_this, undefined, undefined, function() {
300
- var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, url, httpReq;
301
- return __generator(this, function(_a2) {
302
- switch (_a2.label) {
300
+ var operationId, parameters, requestBody, targetPath, targetMethod, path, method, baseUrl, finalPath, _i, _a2, _b2, key, value, placeholder, url, httpReq;
301
+ return __generator(this, function(_c) {
302
+ switch (_c.label) {
303
303
  case 0:
304
304
  operationId = request.operationId, parameters = request.parameters, requestBody = request.requestBody;
305
305
  targetPath = "";
@@ -322,7 +322,17 @@ var require_lib = __commonJS((exports) => {
322
322
  if (specData_1.servers && specData_1.servers.length > 0) {
323
323
  baseUrl = specData_1.servers[0].url;
324
324
  }
325
- url = "".concat(baseUrl).concat(targetPath);
325
+ finalPath = targetPath;
326
+ if (parameters) {
327
+ for (_i = 0, _a2 = Object.entries(parameters);_i < _a2.length; _i++) {
328
+ _b2 = _a2[_i], key = _b2[0], value = _b2[1];
329
+ placeholder = "{".concat(key, "}");
330
+ if (finalPath.includes(placeholder)) {
331
+ finalPath = finalPath.replace(placeholder, encodeURIComponent(String(value)));
332
+ }
333
+ }
334
+ }
335
+ url = "".concat(baseUrl).concat(finalPath);
326
336
  httpReq = {
327
337
  method: targetMethod.toUpperCase(),
328
338
  url,
@@ -334,7 +344,7 @@ var require_lib = __commonJS((exports) => {
334
344
  };
335
345
  return [4, customHttpClient(httpReq)];
336
346
  case 1:
337
- return [2, _a2.sent()];
347
+ return [2, _c.sent()];
338
348
  }
339
349
  });
340
350
  });
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "author": "highlander",
3
3
  "name": "@pioneer-platform/pioneer-sdk",
4
- "version": "4.20.10",
4
+ "version": "4.20.11",
5
5
  "dependencies": {
6
6
  "@keepkey/keepkey-sdk": "^0.2.62",
7
7
  "@pioneer-platform/loggerdog": "^8.11.0",
8
8
  "@pioneer-platform/pioneer-caip": "^9.10.0",
9
- "@pioneer-platform/pioneer-client": "^9.10.3",
9
+ "@pioneer-platform/pioneer-client": "^9.10.4",
10
10
  "@pioneer-platform/pioneer-coins": "^9.11.0",
11
11
  "@pioneer-platform/pioneer-discovery": "^0.8.0",
12
12
  "@pioneer-platform/pioneer-events": "^8.11.0",