@byted-apaas/server-sdk-node 1.1.24 → 1.1.25

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "1.1.24",
3
+ "version": "1.1.25",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
@@ -1409,6 +1409,7 @@ async function getExecutionUserTaskInfo(executionId) {
1409
1409
  let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.getExecutionUserTaskInfo);
1410
1410
  let urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)()).replace(replaceKeys.id, `${executionId}`);
1411
1411
  urlPath += `?operator=${utils.getUserIDFromCtx()}`;
1412
+ options.headers.User = utils.getUserIDFromCtx();
1412
1413
  let res = await openapi.doRequest(null, urlPath, options);
1413
1414
  if (!res) {
1414
1415
  throw new exceptions.InternalError('getExecutionUserTaskInfo result is empty');
@@ -1422,6 +1423,7 @@ async function executeFlow(apiName, option, async) {
1422
1423
  }
1423
1424
  let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.executeFlow);
1424
1425
  const urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)()).replace(replaceKeys.apiName, apiName);
1426
+ options.headers.User = utils.getUserIDFromCtx();
1425
1427
  options.json = {
1426
1428
  'operator': utils.getUserIDFromCtx(),
1427
1429
  'variables': (0, common_1.transMapToFlowVariable)(option.params),
@@ -1446,6 +1448,7 @@ async function revokeExecution(executionId, revokeOptions) {
1446
1448
  }
1447
1449
  let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.revokeExecution);
1448
1450
  let urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)()).replace(replaceKeys.id, `${executionId}`);
1451
+ options.headers.User = utils.getUserIDFromCtx();
1449
1452
  let reason = undefined;
1450
1453
  if (revokeOptions && revokeOptions.reason) {
1451
1454
  reason = {
@@ -1467,6 +1470,7 @@ async function getExecutionInfo(executionId) {
1467
1470
  let options = commonHttp.getOptions(null, constants_2.openapiHttpPath.getExecutionInfo);
1468
1471
  let urlPath = options._reqPath.replace(replaceKeys.namespace, await (0, common_1.getNamespaceForOpenAndFaaSSDK)()).replace(replaceKeys.id, `${executionId}`);
1469
1472
  urlPath += `?operator=${utils.getUserIDFromCtx()}`;
1473
+ options.headers.User = utils.getUserIDFromCtx();
1470
1474
  let res = await openapi.doRequest(null, urlPath, options);
1471
1475
  if (!res || !res.executionInfo) {
1472
1476
  throw new exceptions.InternalError(`getExecutionInfo result is empty`);