@uipath/tasks-tool 1.197.0 → 1.198.0-preview.80
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/tool.js +638 -173
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -27244,7 +27244,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27244
27244
|
var package_default = {
|
|
27245
27245
|
name: "@uipath/tasks-tool",
|
|
27246
27246
|
license: "MIT",
|
|
27247
|
-
version: "1.
|
|
27247
|
+
version: "1.198.0-preview.80",
|
|
27248
27248
|
description: "Manage Action Center tasks.",
|
|
27249
27249
|
type: "module",
|
|
27250
27250
|
main: "./dist/tool.js",
|
|
@@ -27265,7 +27265,7 @@ var package_default = {
|
|
|
27265
27265
|
"@types/node": "^25.5.2",
|
|
27266
27266
|
"@uipath/auth": "workspace:*",
|
|
27267
27267
|
"@uipath/common": "workspace:*",
|
|
27268
|
-
"@uipath/uipath-typescript": "^1.
|
|
27268
|
+
"@uipath/uipath-typescript": "^1.5.2",
|
|
27269
27269
|
commander: "^14.0.3",
|
|
27270
27270
|
typescript: "^6.0.2"
|
|
27271
27271
|
}
|
|
@@ -27331,8 +27331,15 @@ var TLS_ERROR_CODES = new Set([
|
|
|
27331
27331
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
27332
27332
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
27333
27333
|
function describeConnectivityError(error) {
|
|
27334
|
-
|
|
27335
|
-
|
|
27334
|
+
const queue = [error];
|
|
27335
|
+
const seen = new Set;
|
|
27336
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
27337
|
+
const current = queue.shift();
|
|
27338
|
+
if (current === null || typeof current !== "object")
|
|
27339
|
+
continue;
|
|
27340
|
+
if (seen.has(current))
|
|
27341
|
+
continue;
|
|
27342
|
+
seen.add(current);
|
|
27336
27343
|
const cur = current;
|
|
27337
27344
|
const code = typeof cur.code === "string" ? cur.code : undefined;
|
|
27338
27345
|
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
@@ -27352,7 +27359,10 @@ function describeConnectivityError(error) {
|
|
|
27352
27359
|
instructions: NETWORK_INSTRUCTIONS
|
|
27353
27360
|
};
|
|
27354
27361
|
}
|
|
27355
|
-
|
|
27362
|
+
if (cur.cause !== undefined)
|
|
27363
|
+
queue.push(cur.cause);
|
|
27364
|
+
if (Array.isArray(cur.errors))
|
|
27365
|
+
queue.push(...cur.errors);
|
|
27356
27366
|
}
|
|
27357
27367
|
return;
|
|
27358
27368
|
}
|
|
@@ -32601,6 +32611,7 @@ function getLogFilePath() {
|
|
|
32601
32611
|
// ../common/src/output-format-context.ts
|
|
32602
32612
|
var formatSlot = singleton("OutputFormat");
|
|
32603
32613
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
32614
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
32604
32615
|
var filterSlot = singleton("OutputFilter");
|
|
32605
32616
|
function getOutputFormat() {
|
|
32606
32617
|
return formatSlot.get("json");
|
|
@@ -33668,6 +33679,9 @@ var OutputFormatter;
|
|
|
33668
33679
|
if (opts?.warning) {
|
|
33669
33680
|
data.Warning = opts.warning;
|
|
33670
33681
|
}
|
|
33682
|
+
if (opts?.pagination) {
|
|
33683
|
+
data.Pagination = opts.pagination;
|
|
33684
|
+
}
|
|
33671
33685
|
success(data);
|
|
33672
33686
|
}
|
|
33673
33687
|
OutputFormatter.emitList = emitList;
|
|
@@ -34115,6 +34129,7 @@ var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
|
34115
34129
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
34116
34130
|
// ../common/src/interactivity-context.ts
|
|
34117
34131
|
var modeSlot = singleton("InteractivityMode");
|
|
34132
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
34118
34133
|
// ../common/src/option-aliases.ts
|
|
34119
34134
|
function warnDeprecatedOptionAlias(deprecatedFlag, preferredFlag) {
|
|
34120
34135
|
getOutputSink().writeErr(`[WARN] ${deprecatedFlag} is deprecated. Use ${preferredFlag} instead.
|
|
@@ -35358,6 +35373,10 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
35358
35373
|
function errorMessage(error) {
|
|
35359
35374
|
return error instanceof Error ? error.message : String(error);
|
|
35360
35375
|
}
|
|
35376
|
+
|
|
35377
|
+
// ../auth/src/index.ts
|
|
35378
|
+
init_constants();
|
|
35379
|
+
|
|
35361
35380
|
// ../auth/src/interactive.ts
|
|
35362
35381
|
init_src();
|
|
35363
35382
|
|
|
@@ -39591,7 +39610,8 @@ var MAESTRO_ENDPOINTS = {
|
|
|
39591
39610
|
GET_VARIABLES: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/variables`,
|
|
39592
39611
|
CANCEL: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/cancel`,
|
|
39593
39612
|
PAUSE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/pause`,
|
|
39594
|
-
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume
|
|
39613
|
+
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume`,
|
|
39614
|
+
RETRY: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/retry`
|
|
39595
39615
|
},
|
|
39596
39616
|
INCIDENTS: {
|
|
39597
39617
|
GET_ALL: `${PIMS_BASE}/api/v1/incidents/summary`,
|
|
@@ -39614,7 +39634,9 @@ var MAESTRO_ENDPOINTS = {
|
|
|
39614
39634
|
TOP_ELEMENTS_WITH_FAILURE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopElementswithFailure`,
|
|
39615
39635
|
INSTANCE_STATUS_BY_DATE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/InstanceStatusByDate`,
|
|
39616
39636
|
TOP_PROCESSES_BY_DURATION: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopProcessesByDuration`,
|
|
39617
|
-
|
|
39637
|
+
INSTANCE_COUNT_BY_STATUS: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/InstanceCountByStatus`,
|
|
39638
|
+
ELEMENT_COUNT_BY_STATUS: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/ElementCountByStatus`,
|
|
39639
|
+
INCIDENTS_BY_TIME_WINDOW: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/IncidentsByTimeWindow`
|
|
39618
39640
|
}
|
|
39619
39641
|
};
|
|
39620
39642
|
var DATA_FABRIC_TENANT_FOLDER_ID = "00000000-0000-0000-0000-000000000000";
|
|
@@ -39624,7 +39646,7 @@ var DATA_FABRIC_ENDPOINTS = {
|
|
|
39624
39646
|
GET_ALL_V2: `${DATAFABRIC_BASE}/api/v2/Entity`,
|
|
39625
39647
|
GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
|
|
39626
39648
|
GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
|
|
39627
|
-
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read/${recordId}`,
|
|
39649
|
+
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/v2/EntityService/entity/${entityId}/read/${recordId}`,
|
|
39628
39650
|
INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
|
|
39629
39651
|
BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
|
|
39630
39652
|
UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
|
|
@@ -39649,6 +39671,14 @@ var DATA_FABRIC_ENDPOINTS = {
|
|
|
39649
39671
|
INSERT_BY_NAME: (choiceSetName) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/insert`,
|
|
39650
39672
|
UPDATE_BY_NAME: (choiceSetName, valueId) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/${valueId}/update`,
|
|
39651
39673
|
DELETE_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/choiceset/delete`
|
|
39674
|
+
},
|
|
39675
|
+
ROLES: {
|
|
39676
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/v2/Role`
|
|
39677
|
+
},
|
|
39678
|
+
DIRECTORY: {
|
|
39679
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/Directory`,
|
|
39680
|
+
ASSIGN_ROLES: `${DATAFABRIC_BASE}/api/Directory/Role`,
|
|
39681
|
+
REVOKE_ROLES: `${DATAFABRIC_BASE}/api/Directory/RevokeRole`
|
|
39652
39682
|
}
|
|
39653
39683
|
};
|
|
39654
39684
|
var IDENTITY_ENDPOINTS = {
|
|
@@ -39869,7 +39899,7 @@ class EmbeddedTokenManager {
|
|
|
39869
39899
|
this.cancelRefresh?.();
|
|
39870
39900
|
}
|
|
39871
39901
|
}
|
|
39872
|
-
var SDK_VERSION = "1.
|
|
39902
|
+
var SDK_VERSION = "1.5.2";
|
|
39873
39903
|
var CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
39874
39904
|
var SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
39875
39905
|
var SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
@@ -41123,16 +41153,16 @@ function toISOUtc(value) {
|
|
|
41123
41153
|
return isNaN(date2.getTime()) ? value : date2.toISOString();
|
|
41124
41154
|
}
|
|
41125
41155
|
function transformData(data, fieldMapping) {
|
|
41156
|
+
if (data == null) {
|
|
41157
|
+
return data;
|
|
41158
|
+
}
|
|
41126
41159
|
if (Array.isArray(data)) {
|
|
41127
41160
|
return data.map((item) => transformData(item, fieldMapping));
|
|
41128
41161
|
}
|
|
41129
|
-
const result = {
|
|
41130
|
-
for (const [
|
|
41131
|
-
|
|
41132
|
-
|
|
41133
|
-
delete result[sourceField];
|
|
41134
|
-
result[targetField] = value;
|
|
41135
|
-
}
|
|
41162
|
+
const result = {};
|
|
41163
|
+
for (const [key, value] of Object.entries(data)) {
|
|
41164
|
+
const renamedKey = fieldMapping[key] ?? key;
|
|
41165
|
+
result[renamedKey] = value;
|
|
41136
41166
|
}
|
|
41137
41167
|
return result;
|
|
41138
41168
|
}
|
|
@@ -41217,6 +41247,26 @@ function transformRequest(data, responseMap) {
|
|
|
41217
41247
|
}
|
|
41218
41248
|
return result;
|
|
41219
41249
|
}
|
|
41250
|
+
var ODATA_FIELD_PARAM_KEYS = ["filter", "orderby", "select", "expand"];
|
|
41251
|
+
var ODATA_TOKEN_RE = /'(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*/g;
|
|
41252
|
+
function rewriteODataIdentifiers(expression, requestMap) {
|
|
41253
|
+
if (!expression)
|
|
41254
|
+
return expression;
|
|
41255
|
+
return expression.replace(ODATA_TOKEN_RE, (match) => match.startsWith("'") ? match : requestMap[match] ?? match);
|
|
41256
|
+
}
|
|
41257
|
+
function transformOptions(options, responseMap) {
|
|
41258
|
+
const requestMap = reverseMap(responseMap);
|
|
41259
|
+
if (Object.keys(requestMap).length === 0)
|
|
41260
|
+
return options;
|
|
41261
|
+
const result = { ...options };
|
|
41262
|
+
for (const key of ODATA_FIELD_PARAM_KEYS) {
|
|
41263
|
+
const value = result[key];
|
|
41264
|
+
if (typeof value === "string") {
|
|
41265
|
+
result[key] = rewriteODataIdentifiers(value, requestMap);
|
|
41266
|
+
}
|
|
41267
|
+
}
|
|
41268
|
+
return result;
|
|
41269
|
+
}
|
|
41220
41270
|
function arrayDictionaryToRecord(dictionary) {
|
|
41221
41271
|
if (!dictionary || !dictionary.keys || !dictionary.values) {
|
|
41222
41272
|
return {};
|
|
@@ -41702,6 +41752,7 @@ var EntityFieldDataType;
|
|
|
41702
41752
|
EntityFieldDataType2["BOOLEAN"] = "BOOLEAN";
|
|
41703
41753
|
EntityFieldDataType2["BIG_INTEGER"] = "BIG_INTEGER";
|
|
41704
41754
|
EntityFieldDataType2["MULTILINE_TEXT"] = "MULTILINE_TEXT";
|
|
41755
|
+
EntityFieldDataType2["MULTILINE_MAX"] = "MULTILINE_MAX";
|
|
41705
41756
|
EntityFieldDataType2["FILE"] = "FILE";
|
|
41706
41757
|
EntityFieldDataType2["CHOICE_SET_SINGLE"] = "CHOICE_SET_SINGLE";
|
|
41707
41758
|
EntityFieldDataType2["CHOICE_SET_MULTIPLE"] = "CHOICE_SET_MULTIPLE";
|
|
@@ -41795,10 +41846,12 @@ var SqlFieldType;
|
|
|
41795
41846
|
SqlFieldType2["BIT"] = "BIT";
|
|
41796
41847
|
SqlFieldType2["DECIMAL"] = "DECIMAL";
|
|
41797
41848
|
SqlFieldType2["MULTILINE"] = "MULTILINE";
|
|
41849
|
+
SqlFieldType2["MULTILINE_MAX"] = "MULTILINE_MAX";
|
|
41798
41850
|
})(SqlFieldType || (SqlFieldType = {}));
|
|
41799
41851
|
var ENTITY_TYPE_IDS = {
|
|
41800
41852
|
[EntityType.ChoiceSet]: 1
|
|
41801
41853
|
};
|
|
41854
|
+
var MAX_QUERY_JOINS = 3;
|
|
41802
41855
|
var EntityMap = {
|
|
41803
41856
|
createTime: "createdTime",
|
|
41804
41857
|
updateTime: "updatedTime",
|
|
@@ -41818,6 +41871,7 @@ var EntitySchemaFieldTypeMap = {
|
|
|
41818
41871
|
[EntityFieldDataType.BOOLEAN]: { sqlTypeName: SqlFieldType.BIT, fieldDisplayType: FieldDisplayType.Basic },
|
|
41819
41872
|
[EntityFieldDataType.BIG_INTEGER]: { sqlTypeName: SqlFieldType.BIGINT, fieldDisplayType: FieldDisplayType.Basic },
|
|
41820
41873
|
[EntityFieldDataType.MULTILINE_TEXT]: { sqlTypeName: SqlFieldType.MULTILINE, fieldDisplayType: FieldDisplayType.Basic },
|
|
41874
|
+
[EntityFieldDataType.MULTILINE_MAX]: { sqlTypeName: SqlFieldType.MULTILINE_MAX, fieldDisplayType: FieldDisplayType.Basic },
|
|
41821
41875
|
[EntityFieldDataType.FILE]: { sqlTypeName: SqlFieldType.UNIQUEIDENTIFIER, fieldDisplayType: FieldDisplayType.File },
|
|
41822
41876
|
[EntityFieldDataType.CHOICE_SET_SINGLE]: { sqlTypeName: SqlFieldType.INT, fieldDisplayType: FieldDisplayType.ChoiceSetSingle },
|
|
41823
41877
|
[EntityFieldDataType.CHOICE_SET_MULTIPLE]: { sqlTypeName: SqlFieldType.NVARCHAR, fieldDisplayType: FieldDisplayType.ChoiceSetMultiple },
|
|
@@ -41834,6 +41888,7 @@ var FieldDisplayTypeToDataType = {
|
|
|
41834
41888
|
var ENTITY_FIELD_CONSTRAINT_DEFAULTS = {
|
|
41835
41889
|
STRING_LENGTH_LIMIT: 200,
|
|
41836
41890
|
MULTILINE_TEXT_LENGTH_LIMIT: 200,
|
|
41891
|
+
MULTILINE_MAX_LENGTH_LIMIT: 128 * 1024,
|
|
41837
41892
|
DECIMAL_LENGTH_LIMIT: 1000,
|
|
41838
41893
|
DECIMAL_PRECISION: 2,
|
|
41839
41894
|
BOOLEAN_LENGTH_LIMIT: 100,
|
|
@@ -41850,6 +41905,9 @@ var ENTITY_FIELD_CONSTRAINT_SPEC = {
|
|
|
41850
41905
|
[EntityFieldDataType.MULTILINE_TEXT]: {
|
|
41851
41906
|
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 1e4 }
|
|
41852
41907
|
},
|
|
41908
|
+
[EntityFieldDataType.MULTILINE_MAX]: {
|
|
41909
|
+
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 128 * 1024 }
|
|
41910
|
+
},
|
|
41853
41911
|
[EntityFieldDataType.INTEGER]: {
|
|
41854
41912
|
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
41855
41913
|
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER }
|
|
@@ -41886,7 +41944,8 @@ var EntityFieldTypeMap = {
|
|
|
41886
41944
|
[SqlFieldType.DATE]: EntityFieldDataType.DATE,
|
|
41887
41945
|
[SqlFieldType.BIT]: EntityFieldDataType.BOOLEAN,
|
|
41888
41946
|
[SqlFieldType.DECIMAL]: EntityFieldDataType.DECIMAL,
|
|
41889
|
-
[SqlFieldType.MULTILINE]: EntityFieldDataType.MULTILINE_TEXT
|
|
41947
|
+
[SqlFieldType.MULTILINE]: EntityFieldDataType.MULTILINE_TEXT,
|
|
41948
|
+
[SqlFieldType.MULTILINE_MAX]: EntityFieldDataType.MULTILINE_MAX
|
|
41890
41949
|
};
|
|
41891
41950
|
|
|
41892
41951
|
class EntityService extends BaseService {
|
|
@@ -41989,6 +42048,11 @@ class EntityService extends BaseService {
|
|
|
41989
42048
|
return entities;
|
|
41990
42049
|
}
|
|
41991
42050
|
async queryRecordsById(id, options) {
|
|
42051
|
+
if (options?.joins && options.joins.length > MAX_QUERY_JOINS) {
|
|
42052
|
+
throw new ValidationError({
|
|
42053
|
+
message: `A maximum of ${MAX_QUERY_JOINS} joins is supported per query (received ${options.joins.length})`
|
|
42054
|
+
});
|
|
42055
|
+
}
|
|
41992
42056
|
const { folderKey, expansionLevel, ...rest } = options ?? {};
|
|
41993
42057
|
const downstreamOptions = options === undefined ? undefined : rest;
|
|
41994
42058
|
return PaginationHelpers.getAll({
|
|
@@ -42007,7 +42071,7 @@ class EntityService extends BaseService {
|
|
|
42007
42071
|
countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
|
|
42008
42072
|
}
|
|
42009
42073
|
},
|
|
42010
|
-
excludeFromPrefix: ["filterGroup", "selectedFields", "sortOptions", "aggregates", "groupBy"]
|
|
42074
|
+
excludeFromPrefix: ["filterGroup", "selectedFields", "sortOptions", "aggregates", "groupBy", "joins"]
|
|
42011
42075
|
}, downstreamOptions);
|
|
42012
42076
|
}
|
|
42013
42077
|
async importRecordsById(id, file, options) {
|
|
@@ -42237,7 +42301,7 @@ class EntityService extends BaseService {
|
|
|
42237
42301
|
this.validateFieldConstraints(fieldType, field, field.fieldName);
|
|
42238
42302
|
const isRelationship = fieldType === EntityFieldDataType.RELATIONSHIP;
|
|
42239
42303
|
const isFile = fieldType === EntityFieldDataType.FILE;
|
|
42240
|
-
if (
|
|
42304
|
+
if (isRelationship && (!field.referenceEntityId || !field.referenceFieldId)) {
|
|
42241
42305
|
throw new ValidationError({
|
|
42242
42306
|
message: `Field '${field.fieldName}' of type ${fieldType} requires both referenceEntityId and referenceFieldId (UUIDs of the target entity and field).`
|
|
42243
42307
|
});
|
|
@@ -42263,9 +42327,9 @@ class EntityService extends BaseService {
|
|
|
42263
42327
|
...field.choiceSetId !== undefined && { choiceSetId: field.choiceSetId },
|
|
42264
42328
|
...(isRelationship || isFile) && { isForeignKey: true },
|
|
42265
42329
|
...isRelationship && { referenceType: ReferenceType.ManyToOne },
|
|
42266
|
-
|
|
42330
|
+
...!isFile && referenceEntityBody !== undefined && { referenceEntity: referenceEntityBody },
|
|
42267
42331
|
...referenceChoiceSetBody !== undefined && { referenceChoiceSet: referenceChoiceSetBody },
|
|
42268
|
-
|
|
42332
|
+
...!isFile && field.referenceFieldId !== undefined && { referenceField: { id: field.referenceFieldId } }
|
|
42269
42333
|
};
|
|
42270
42334
|
}
|
|
42271
42335
|
resolveFieldDataType(f) {
|
|
@@ -42310,6 +42374,8 @@ class EntityService extends BaseService {
|
|
|
42310
42374
|
return { lengthLimit: field.lengthLimit ?? defaults.STRING_LENGTH_LIMIT };
|
|
42311
42375
|
case EntityFieldDataType.MULTILINE_TEXT:
|
|
42312
42376
|
return { lengthLimit: field.lengthLimit ?? defaults.MULTILINE_TEXT_LENGTH_LIMIT };
|
|
42377
|
+
case EntityFieldDataType.MULTILINE_MAX:
|
|
42378
|
+
return { lengthLimit: field.lengthLimit ?? defaults.MULTILINE_MAX_LENGTH_LIMIT };
|
|
42313
42379
|
case EntityFieldDataType.DECIMAL:
|
|
42314
42380
|
return {
|
|
42315
42381
|
lengthLimit: defaults.DECIMAL_LENGTH_LIMIT,
|
|
@@ -42516,143 +42582,300 @@ __decorate([
|
|
|
42516
42582
|
__decorate([
|
|
42517
42583
|
track("Choicesets.DeleteValuesById")
|
|
42518
42584
|
], ChoiceSetService.prototype, "deleteValuesById", null);
|
|
42519
|
-
|
|
42585
|
+
var DataFabricRoleType;
|
|
42586
|
+
(function(DataFabricRoleType2) {
|
|
42587
|
+
DataFabricRoleType2["System"] = "System";
|
|
42588
|
+
DataFabricRoleType2["UserDefined"] = "UserDefined";
|
|
42589
|
+
})(DataFabricRoleType || (DataFabricRoleType = {}));
|
|
42590
|
+
function isRecord$1(value) {
|
|
42591
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
42592
|
+
}
|
|
42593
|
+
function isDataFabricRole(value) {
|
|
42594
|
+
if (!isRecord$1(value)) {
|
|
42595
|
+
return false;
|
|
42596
|
+
}
|
|
42597
|
+
const { id, name, type, directoryEntityCount, folderId } = value;
|
|
42598
|
+
const hasValidDirectoryEntityCount = directoryEntityCount === undefined || directoryEntityCount === null || typeof directoryEntityCount === "number";
|
|
42599
|
+
const hasValidFolderId = folderId === undefined || typeof folderId === "string";
|
|
42600
|
+
return typeof id === "string" && typeof name === "string" && (type === DataFabricRoleType.System || type === DataFabricRoleType.UserDefined) && hasValidDirectoryEntityCount && hasValidFolderId;
|
|
42601
|
+
}
|
|
42602
|
+
function validateRolesResponse(data) {
|
|
42603
|
+
if (Array.isArray(data) && data.every(isDataFabricRole)) {
|
|
42604
|
+
return data;
|
|
42605
|
+
}
|
|
42606
|
+
throw new ServerError({
|
|
42607
|
+
message: "Invalid Data Fabric roles response format."
|
|
42608
|
+
});
|
|
42609
|
+
}
|
|
42610
|
+
|
|
42611
|
+
class DataFabricRoleService extends BaseService {
|
|
42612
|
+
async getAll(options = {}) {
|
|
42613
|
+
const params = createParams({
|
|
42614
|
+
stats: options.stats ?? true
|
|
42615
|
+
});
|
|
42616
|
+
const headers = createHeaders({ [FOLDER_KEY]: options.folderKey });
|
|
42617
|
+
const response = await this.get(DATA_FABRIC_ENDPOINTS.ROLES.GET_ALL, { params, headers });
|
|
42618
|
+
return validateRolesResponse(response.data);
|
|
42619
|
+
}
|
|
42620
|
+
}
|
|
42621
|
+
__decorate([
|
|
42622
|
+
track("DataFabricRoles.GetAll")
|
|
42623
|
+
], DataFabricRoleService.prototype, "getAll", null);
|
|
42624
|
+
var DataFabricDirectoryEntityType;
|
|
42625
|
+
(function(DataFabricDirectoryEntityType2) {
|
|
42626
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["User"] = 0] = "User";
|
|
42627
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["Group"] = 1] = "Group";
|
|
42628
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["Application"] = 2] = "Application";
|
|
42629
|
+
})(DataFabricDirectoryEntityType || (DataFabricDirectoryEntityType = {}));
|
|
42630
|
+
var DataFabricDirectoryEntityTypeName;
|
|
42631
|
+
(function(DataFabricDirectoryEntityTypeName2) {
|
|
42632
|
+
DataFabricDirectoryEntityTypeName2["User"] = "User";
|
|
42633
|
+
DataFabricDirectoryEntityTypeName2["Group"] = "Group";
|
|
42634
|
+
DataFabricDirectoryEntityTypeName2["Application"] = "Application";
|
|
42635
|
+
})(DataFabricDirectoryEntityTypeName || (DataFabricDirectoryEntityTypeName = {}));
|
|
42636
|
+
var DEFAULT_DIRECTORY_PAGE_SIZE = 100;
|
|
42637
|
+
var MAX_DIRECTORY_PAGE_SIZE = 100;
|
|
42638
|
+
function validateDirectoryListResponse(data) {
|
|
42639
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
42640
|
+
throw new ServerError({
|
|
42641
|
+
message: "Invalid Data Fabric directory response format."
|
|
42642
|
+
});
|
|
42643
|
+
}
|
|
42644
|
+
const response = data;
|
|
42645
|
+
if (typeof response.totalCount !== "number" || !Array.isArray(response.results)) {
|
|
42646
|
+
throw new ServerError({
|
|
42647
|
+
message: "Invalid Data Fabric directory response format."
|
|
42648
|
+
});
|
|
42649
|
+
}
|
|
42520
42650
|
return {
|
|
42521
|
-
|
|
42522
|
-
|
|
42523
|
-
throw new Error("Process key is undefined");
|
|
42524
|
-
if (!processData.folderKey)
|
|
42525
|
-
throw new Error("Folder key is undefined");
|
|
42526
|
-
return service.getIncidents(processData.processKey, processData.folderKey);
|
|
42527
|
-
},
|
|
42528
|
-
getElementStats(startTime, endTime, packageVersion) {
|
|
42529
|
-
if (!processData.processKey)
|
|
42530
|
-
throw new Error("Process key is undefined");
|
|
42531
|
-
if (!processData.packageId)
|
|
42532
|
-
throw new Error("Package ID is undefined");
|
|
42533
|
-
return service.getElementStats(processData.processKey, processData.packageId, startTime, endTime, packageVersion);
|
|
42534
|
-
}
|
|
42651
|
+
totalCount: response.totalCount,
|
|
42652
|
+
results: response.results
|
|
42535
42653
|
};
|
|
42536
42654
|
}
|
|
42537
|
-
function
|
|
42538
|
-
|
|
42539
|
-
return Object.assign({}, processData, methods);
|
|
42655
|
+
function isRecord2(value) {
|
|
42656
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
42540
42657
|
}
|
|
42541
|
-
function
|
|
42542
|
-
return
|
|
42543
|
-
|
|
42544
|
-
|
|
42545
|
-
|
|
42546
|
-
|
|
42547
|
-
|
|
42548
|
-
|
|
42549
|
-
|
|
42550
|
-
|
|
42658
|
+
function isDirectoryEntityTypeName(value) {
|
|
42659
|
+
return value === DataFabricDirectoryEntityTypeName.User || value === DataFabricDirectoryEntityTypeName.Group || value === DataFabricDirectoryEntityTypeName.Application;
|
|
42660
|
+
}
|
|
42661
|
+
function isDirectoryRole(value) {
|
|
42662
|
+
if (!isRecord2(value)) {
|
|
42663
|
+
return false;
|
|
42664
|
+
}
|
|
42665
|
+
return typeof value.id === "string" && typeof value.name === "string";
|
|
42666
|
+
}
|
|
42667
|
+
function normalizeDirectoryEntry(entry) {
|
|
42668
|
+
if (!isRecord2(entry) || typeof entry.externalId !== "string" || typeof entry.name !== "string" || !isDirectoryEntityTypeName(entry.type) || entry.email !== undefined && entry.email !== null && typeof entry.email !== "string" || entry.objectType !== undefined && entry.objectType !== null && typeof entry.objectType !== "string" || entry.isUIEnabled !== undefined && typeof entry.isUIEnabled !== "boolean" || entry.roles !== undefined && entry.roles !== null && (!Array.isArray(entry.roles) || !entry.roles.every(isDirectoryRole))) {
|
|
42669
|
+
throw new ServerError({
|
|
42670
|
+
message: "Invalid Data Fabric directory entry response format."
|
|
42671
|
+
});
|
|
42672
|
+
}
|
|
42673
|
+
const normalized = {
|
|
42674
|
+
externalId: entry.externalId,
|
|
42675
|
+
name: entry.name,
|
|
42676
|
+
type: entry.type,
|
|
42677
|
+
roles: entry.roles ?? [],
|
|
42678
|
+
isUIEnabled: entry.isUIEnabled ?? true
|
|
42551
42679
|
};
|
|
42680
|
+
if (entry.email !== undefined) {
|
|
42681
|
+
normalized.email = entry.email;
|
|
42682
|
+
}
|
|
42683
|
+
if (entry.objectType !== undefined) {
|
|
42684
|
+
normalized.objectType = entry.objectType;
|
|
42685
|
+
}
|
|
42686
|
+
return normalized;
|
|
42552
42687
|
}
|
|
42553
|
-
|
|
42554
|
-
const
|
|
42555
|
-
|
|
42556
|
-
startTime: startTime.getTime(),
|
|
42557
|
-
endTime: endTime.getTime(),
|
|
42558
|
-
isCaseManagement
|
|
42559
|
-
},
|
|
42560
|
-
timeSliceUnit: options?.groupBy,
|
|
42561
|
-
timezoneOffset: new Date().getTimezoneOffset() * -1
|
|
42562
|
-
});
|
|
42563
|
-
return response.data ?? [];
|
|
42688
|
+
function normalizePrincipalIds(principalIds) {
|
|
42689
|
+
const ids = Array.isArray(principalIds) ? principalIds : [principalIds];
|
|
42690
|
+
return [...new Set(ids.map((id) => id.trim()).filter(Boolean))];
|
|
42564
42691
|
}
|
|
42565
|
-
function
|
|
42566
|
-
return
|
|
42567
|
-
|
|
42568
|
-
|
|
42569
|
-
|
|
42570
|
-
|
|
42571
|
-
|
|
42572
|
-
version: packageVersion
|
|
42692
|
+
function normalizeRoleIds(roleIds) {
|
|
42693
|
+
return [...new Set(roleIds.map((id) => id.trim()).filter(Boolean))];
|
|
42694
|
+
}
|
|
42695
|
+
function normalizePrincipalType(type) {
|
|
42696
|
+
if (typeof type === "number") {
|
|
42697
|
+
if (type === DataFabricDirectoryEntityType.User || type === DataFabricDirectoryEntityType.Group || type === DataFabricDirectoryEntityType.Application) {
|
|
42698
|
+
return type;
|
|
42573
42699
|
}
|
|
42574
|
-
|
|
42700
|
+
throw new ValidationError({
|
|
42701
|
+
message: "Invalid Data Fabric principal type."
|
|
42702
|
+
});
|
|
42703
|
+
}
|
|
42704
|
+
switch (type) {
|
|
42705
|
+
case DataFabricDirectoryEntityTypeName.User:
|
|
42706
|
+
return DataFabricDirectoryEntityType.User;
|
|
42707
|
+
case DataFabricDirectoryEntityTypeName.Group:
|
|
42708
|
+
return DataFabricDirectoryEntityType.Group;
|
|
42709
|
+
case DataFabricDirectoryEntityTypeName.Application:
|
|
42710
|
+
return DataFabricDirectoryEntityType.Application;
|
|
42711
|
+
default:
|
|
42712
|
+
throw new ValidationError({
|
|
42713
|
+
message: "Invalid Data Fabric principal type."
|
|
42714
|
+
});
|
|
42715
|
+
}
|
|
42716
|
+
}
|
|
42717
|
+
function roleIdsFromEntry(entry) {
|
|
42718
|
+
if (!entry) {
|
|
42719
|
+
return [];
|
|
42720
|
+
}
|
|
42721
|
+
return normalizeRoleIds(entry.roles.map((role) => role.id));
|
|
42722
|
+
}
|
|
42723
|
+
function clampDirectoryPageSize(pageSize) {
|
|
42724
|
+
return Math.max(1, Math.min(pageSize ?? DEFAULT_DIRECTORY_PAGE_SIZE, MAX_DIRECTORY_PAGE_SIZE));
|
|
42575
42725
|
}
|
|
42576
|
-
var ProcessIncidentMap = {
|
|
42577
|
-
errorTimeUtc: "errorTime"
|
|
42578
|
-
};
|
|
42579
|
-
var ProcessIncidentSummaryMap = {
|
|
42580
|
-
firstTimeUtc: "firstOccuranceTime"
|
|
42581
|
-
};
|
|
42582
42726
|
|
|
42583
|
-
class
|
|
42584
|
-
|
|
42585
|
-
const
|
|
42586
|
-
|
|
42587
|
-
|
|
42588
|
-
|
|
42589
|
-
|
|
42590
|
-
|
|
42591
|
-
|
|
42592
|
-
|
|
42593
|
-
}
|
|
42594
|
-
const elementId = idMatch[1];
|
|
42595
|
-
const nameMatch = /\bname\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
42596
|
-
const name = nameMatch ? nameMatch[1] : "";
|
|
42597
|
-
const activityType = this.formatActivityTypeForIncidents(elementType);
|
|
42598
|
-
const activityName = name || elementId;
|
|
42599
|
-
elementInfo[elementId] = {
|
|
42600
|
-
type: activityType,
|
|
42601
|
-
name: activityName
|
|
42602
|
-
};
|
|
42727
|
+
class DataFabricDirectoryService extends BaseService {
|
|
42728
|
+
async fetchAllEntries(options = {}) {
|
|
42729
|
+
const top = clampDirectoryPageSize(options.pageSize);
|
|
42730
|
+
const entries = [];
|
|
42731
|
+
let skip = 0;
|
|
42732
|
+
while (true) {
|
|
42733
|
+
const page = await this.list(skip === 0 ? { top } : { top, skip });
|
|
42734
|
+
entries.push(...page.results);
|
|
42735
|
+
if (page.results.length < top || page.totalCount !== undefined && entries.length >= page.totalCount) {
|
|
42736
|
+
return entries;
|
|
42603
42737
|
}
|
|
42604
|
-
|
|
42605
|
-
console.warn("Failed to parse BPMN XML for incidents:", error);
|
|
42738
|
+
skip += top;
|
|
42606
42739
|
}
|
|
42607
|
-
return elementInfo;
|
|
42608
|
-
}
|
|
42609
|
-
static formatActivityTypeForIncidents(elementType) {
|
|
42610
|
-
return elementType.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
42611
42740
|
}
|
|
42612
|
-
|
|
42613
|
-
const
|
|
42614
|
-
|
|
42615
|
-
|
|
42616
|
-
|
|
42617
|
-
|
|
42618
|
-
|
|
42619
|
-
|
|
42741
|
+
async list(options = {}) {
|
|
42742
|
+
const params = createParams({
|
|
42743
|
+
skip: options.skip,
|
|
42744
|
+
top: clampDirectoryPageSize(options.top)
|
|
42745
|
+
});
|
|
42746
|
+
const response = await this.get(DATA_FABRIC_ENDPOINTS.DIRECTORY.GET_ALL, { params });
|
|
42747
|
+
const data = validateDirectoryListResponse(response.data);
|
|
42748
|
+
const results = data.results.map(normalizeDirectoryEntry);
|
|
42749
|
+
return {
|
|
42750
|
+
totalCount: data.totalCount,
|
|
42751
|
+
results
|
|
42752
|
+
};
|
|
42620
42753
|
}
|
|
42621
|
-
|
|
42622
|
-
|
|
42623
|
-
const id = incident.instanceId || NO_INSTANCE;
|
|
42624
|
-
(acc[id] = acc[id] || []).push(incident);
|
|
42625
|
-
return acc;
|
|
42626
|
-
}, {});
|
|
42627
|
-
const results = await Promise.all(Object.entries(groups).map(async (entry) => {
|
|
42628
|
-
const [instanceId, groupIncidents] = entry;
|
|
42629
|
-
const elementInfo = await this.getBpmnElementInfo(instanceId, folderKey, service);
|
|
42630
|
-
return groupIncidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
42631
|
-
}));
|
|
42632
|
-
return results.flat();
|
|
42754
|
+
async getAll(options = {}) {
|
|
42755
|
+
return this.fetchAllEntries(options);
|
|
42633
42756
|
}
|
|
42634
|
-
|
|
42635
|
-
|
|
42636
|
-
|
|
42757
|
+
async assignRoles(principalIds, principalType, roleIds, options = {}) {
|
|
42758
|
+
const normalizedPrincipalIds = normalizePrincipalIds(principalIds);
|
|
42759
|
+
const normalizedRoleIds = normalizeRoleIds(roleIds);
|
|
42760
|
+
if (normalizedPrincipalIds.length === 0) {
|
|
42761
|
+
throw new ValidationError({ message: "At least one principal ID is required." });
|
|
42637
42762
|
}
|
|
42638
|
-
|
|
42639
|
-
|
|
42640
|
-
|
|
42641
|
-
|
|
42642
|
-
|
|
42643
|
-
|
|
42763
|
+
if (normalizedRoleIds.length === 0) {
|
|
42764
|
+
throw new ValidationError({ message: "At least one Data Fabric role ID is required." });
|
|
42765
|
+
}
|
|
42766
|
+
const type = normalizePrincipalType(principalType);
|
|
42767
|
+
const preserveExisting = options.preserveExisting ?? true;
|
|
42768
|
+
const existingById = new Map;
|
|
42769
|
+
if (preserveExisting) {
|
|
42770
|
+
for (const entry of await this.fetchAllEntries()) {
|
|
42771
|
+
existingById.set(entry.externalId.toLowerCase(), entry);
|
|
42772
|
+
}
|
|
42644
42773
|
}
|
|
42774
|
+
return Promise.all(normalizedPrincipalIds.map(async (principalId) => {
|
|
42775
|
+
const existing = existingById.get(principalId.toLowerCase());
|
|
42776
|
+
const mergedRoleIds = preserveExisting ? normalizeRoleIds([...roleIdsFromEntry(existing), ...normalizedRoleIds]) : normalizedRoleIds;
|
|
42777
|
+
const payload = {
|
|
42778
|
+
directoryEntities: [
|
|
42779
|
+
{
|
|
42780
|
+
externalId: principalId,
|
|
42781
|
+
type,
|
|
42782
|
+
resolved: true
|
|
42783
|
+
}
|
|
42784
|
+
],
|
|
42785
|
+
roles: mergedRoleIds,
|
|
42786
|
+
isUIEnabled: options.uiEnabled ?? true
|
|
42787
|
+
};
|
|
42788
|
+
await this.post(DATA_FABRIC_ENDPOINTS.DIRECTORY.ASSIGN_ROLES, payload);
|
|
42789
|
+
return {
|
|
42790
|
+
principalId,
|
|
42791
|
+
roleIds: mergedRoleIds
|
|
42792
|
+
};
|
|
42793
|
+
}));
|
|
42645
42794
|
}
|
|
42646
|
-
|
|
42647
|
-
const
|
|
42648
|
-
|
|
42649
|
-
|
|
42650
|
-
|
|
42651
|
-
|
|
42652
|
-
|
|
42795
|
+
async revokeRoles(principalIds) {
|
|
42796
|
+
const normalizedPrincipalIds = normalizePrincipalIds(principalIds);
|
|
42797
|
+
if (normalizedPrincipalIds.length === 0) {
|
|
42798
|
+
throw new ValidationError({ message: "At least one principal ID is required." });
|
|
42799
|
+
}
|
|
42800
|
+
const payload = {
|
|
42801
|
+
externalIds: normalizedPrincipalIds
|
|
42653
42802
|
};
|
|
42803
|
+
await this.post(DATA_FABRIC_ENDPOINTS.DIRECTORY.REVOKE_ROLES, payload);
|
|
42654
42804
|
}
|
|
42655
42805
|
}
|
|
42806
|
+
__decorate([
|
|
42807
|
+
track("DataFabricDirectory.List")
|
|
42808
|
+
], DataFabricDirectoryService.prototype, "list", null);
|
|
42809
|
+
__decorate([
|
|
42810
|
+
track("DataFabricDirectory.GetAll")
|
|
42811
|
+
], DataFabricDirectoryService.prototype, "getAll", null);
|
|
42812
|
+
__decorate([
|
|
42813
|
+
track("DataFabricDirectory.AssignRoles")
|
|
42814
|
+
], DataFabricDirectoryService.prototype, "assignRoles", null);
|
|
42815
|
+
__decorate([
|
|
42816
|
+
track("DataFabricDirectory.RevokeRoles")
|
|
42817
|
+
], DataFabricDirectoryService.prototype, "revokeRoles", null);
|
|
42818
|
+
var InstanceStatsMap = {
|
|
42819
|
+
countOfAllInstances: "totalCount",
|
|
42820
|
+
countOfRunning: "runningCount",
|
|
42821
|
+
countOfTransitioning: "transitioningCount",
|
|
42822
|
+
countOfPaused: "pausedCount",
|
|
42823
|
+
countOfFaulted: "faultedCount",
|
|
42824
|
+
countOfCompleted: "completedCount",
|
|
42825
|
+
countOfCancelled: "cancelledCount",
|
|
42826
|
+
countOfDeleted: "deletedCount"
|
|
42827
|
+
};
|
|
42828
|
+
function createProcessMethods(processData, service) {
|
|
42829
|
+
return {
|
|
42830
|
+
async getIncidents() {
|
|
42831
|
+
if (!processData.processKey)
|
|
42832
|
+
throw new Error("Process key is undefined");
|
|
42833
|
+
if (!processData.folderKey)
|
|
42834
|
+
throw new Error("Folder key is undefined");
|
|
42835
|
+
return service.getIncidents(processData.processKey, processData.folderKey);
|
|
42836
|
+
},
|
|
42837
|
+
getElementStats(startTime, endTime, packageVersion) {
|
|
42838
|
+
if (!processData.processKey)
|
|
42839
|
+
throw new Error("Process key is undefined");
|
|
42840
|
+
if (!processData.packageId)
|
|
42841
|
+
throw new Error("Package ID is undefined");
|
|
42842
|
+
return service.getElementStats({
|
|
42843
|
+
processKey: processData.processKey,
|
|
42844
|
+
packageId: processData.packageId,
|
|
42845
|
+
packageVersion,
|
|
42846
|
+
startTime,
|
|
42847
|
+
endTime
|
|
42848
|
+
});
|
|
42849
|
+
},
|
|
42850
|
+
getInstanceStats(startTime, endTime, packageVersion) {
|
|
42851
|
+
if (!processData.processKey)
|
|
42852
|
+
throw new Error("Process key is undefined");
|
|
42853
|
+
if (!processData.packageId)
|
|
42854
|
+
throw new Error("Package ID is undefined");
|
|
42855
|
+
return service.getInstanceStats({
|
|
42856
|
+
processKey: processData.processKey,
|
|
42857
|
+
packageId: processData.packageId,
|
|
42858
|
+
packageVersion,
|
|
42859
|
+
startTime,
|
|
42860
|
+
endTime
|
|
42861
|
+
});
|
|
42862
|
+
},
|
|
42863
|
+
getInstanceStatusTimeline(startTime, endTime, options) {
|
|
42864
|
+
if (!processData.processKey)
|
|
42865
|
+
throw new Error("Process key is undefined");
|
|
42866
|
+
return service.getInstanceStatusTimeline(startTime, endTime, { ...options, processKeys: [processData.processKey] });
|
|
42867
|
+
},
|
|
42868
|
+
getIncidentsTimeline(startTime, endTime, options) {
|
|
42869
|
+
if (!processData.processKey)
|
|
42870
|
+
throw new Error("Process key is undefined");
|
|
42871
|
+
return service.getIncidentsTimeline(startTime, endTime, { ...options, processKeys: [processData.processKey] });
|
|
42872
|
+
}
|
|
42873
|
+
};
|
|
42874
|
+
}
|
|
42875
|
+
function createProcessWithMethods(processData, service) {
|
|
42876
|
+
const methods = createProcessMethods(processData, service);
|
|
42877
|
+
return Object.assign({}, processData, methods);
|
|
42878
|
+
}
|
|
42656
42879
|
function createProcessInstanceMethods(instanceData, service) {
|
|
42657
42880
|
return {
|
|
42658
42881
|
async cancel(options) {
|
|
@@ -42676,6 +42899,13 @@ function createProcessInstanceMethods(instanceData, service) {
|
|
|
42676
42899
|
throw new Error("Process instance folder key is undefined");
|
|
42677
42900
|
return service.resume(instanceData.instanceId, instanceData.folderKey, options);
|
|
42678
42901
|
},
|
|
42902
|
+
async retry(options) {
|
|
42903
|
+
if (!instanceData.instanceId)
|
|
42904
|
+
throw new Error("Process instance ID is undefined");
|
|
42905
|
+
if (!instanceData.folderKey)
|
|
42906
|
+
throw new Error("Process instance folder key is undefined");
|
|
42907
|
+
return service.retry(instanceData.instanceId, instanceData.folderKey, options);
|
|
42908
|
+
},
|
|
42679
42909
|
async getIncidents() {
|
|
42680
42910
|
if (!instanceData.instanceId)
|
|
42681
42911
|
throw new Error("Process instance ID is undefined");
|
|
@@ -42740,7 +42970,36 @@ function createCaseMethods(caseData, service) {
|
|
|
42740
42970
|
throw new Error("Process key is undefined");
|
|
42741
42971
|
if (!caseData.packageId)
|
|
42742
42972
|
throw new Error("Package ID is undefined");
|
|
42743
|
-
return service.getElementStats(
|
|
42973
|
+
return service.getElementStats({
|
|
42974
|
+
processKey: caseData.processKey,
|
|
42975
|
+
packageId: caseData.packageId,
|
|
42976
|
+
packageVersion,
|
|
42977
|
+
startTime,
|
|
42978
|
+
endTime
|
|
42979
|
+
});
|
|
42980
|
+
},
|
|
42981
|
+
getInstanceStats(startTime, endTime, packageVersion) {
|
|
42982
|
+
if (!caseData.processKey)
|
|
42983
|
+
throw new Error("Process key is undefined");
|
|
42984
|
+
if (!caseData.packageId)
|
|
42985
|
+
throw new Error("Package ID is undefined");
|
|
42986
|
+
return service.getInstanceStats({
|
|
42987
|
+
processKey: caseData.processKey,
|
|
42988
|
+
packageId: caseData.packageId,
|
|
42989
|
+
packageVersion,
|
|
42990
|
+
startTime,
|
|
42991
|
+
endTime
|
|
42992
|
+
});
|
|
42993
|
+
},
|
|
42994
|
+
getInstanceStatusTimeline(startTime, endTime, options) {
|
|
42995
|
+
if (!caseData.processKey)
|
|
42996
|
+
throw new Error("Process key is undefined");
|
|
42997
|
+
return service.getInstanceStatusTimeline(startTime, endTime, { ...options, processKeys: [caseData.processKey] });
|
|
42998
|
+
},
|
|
42999
|
+
getIncidentsTimeline(startTime, endTime, options) {
|
|
43000
|
+
if (!caseData.processKey)
|
|
43001
|
+
throw new Error("Process key is undefined");
|
|
43002
|
+
return service.getIncidentsTimeline(startTime, endTime, { ...options, processKeys: [caseData.processKey] });
|
|
42744
43003
|
}
|
|
42745
43004
|
};
|
|
42746
43005
|
}
|
|
@@ -42879,6 +43138,123 @@ var InstanceFinalStatus;
|
|
|
42879
43138
|
InstanceFinalStatus2["Faulted"] = "Faulted";
|
|
42880
43139
|
InstanceFinalStatus2["Cancelled"] = "Cancelled";
|
|
42881
43140
|
})(InstanceFinalStatus || (InstanceFinalStatus = {}));
|
|
43141
|
+
function buildInsightsTopBody(startTime, endTime, isCaseManagement, options) {
|
|
43142
|
+
return {
|
|
43143
|
+
commonParams: {
|
|
43144
|
+
startTime: startTime.getTime(),
|
|
43145
|
+
endTime: endTime.getTime(),
|
|
43146
|
+
isCaseManagement,
|
|
43147
|
+
...options?.packageId ? { packageId: options.packageId } : {},
|
|
43148
|
+
...options?.processKey ? { processKey: options.processKey } : {},
|
|
43149
|
+
...options?.version ? { version: options.version } : {}
|
|
43150
|
+
}
|
|
43151
|
+
};
|
|
43152
|
+
}
|
|
43153
|
+
function buildInsightsTimelineBody(startTime, endTime, isCaseManagement, options) {
|
|
43154
|
+
return {
|
|
43155
|
+
commonParams: {
|
|
43156
|
+
startTime: startTime.getTime(),
|
|
43157
|
+
endTime: endTime.getTime(),
|
|
43158
|
+
isCaseManagement,
|
|
43159
|
+
...options?.packageId ? { packageId: options.packageId } : {},
|
|
43160
|
+
...options?.version ? { version: options.version } : {},
|
|
43161
|
+
...options?.processKeys ? { processKeys: options.processKeys } : {}
|
|
43162
|
+
},
|
|
43163
|
+
timeSliceUnit: options?.groupBy ?? TimeInterval.Day,
|
|
43164
|
+
timezoneOffset: new Date().getTimezoneOffset() * -1
|
|
43165
|
+
};
|
|
43166
|
+
}
|
|
43167
|
+
function buildInsightsCommonBody(request) {
|
|
43168
|
+
return {
|
|
43169
|
+
commonParams: {
|
|
43170
|
+
processKey: request.processKey,
|
|
43171
|
+
packageId: request.packageId,
|
|
43172
|
+
startTime: request.startTime.getTime(),
|
|
43173
|
+
endTime: request.endTime.getTime(),
|
|
43174
|
+
version: request.packageVersion
|
|
43175
|
+
}
|
|
43176
|
+
};
|
|
43177
|
+
}
|
|
43178
|
+
var ProcessIncidentMap = {
|
|
43179
|
+
errorTimeUtc: "errorTime"
|
|
43180
|
+
};
|
|
43181
|
+
var ProcessIncidentSummaryMap = {
|
|
43182
|
+
firstTimeUtc: "firstOccuranceTime"
|
|
43183
|
+
};
|
|
43184
|
+
|
|
43185
|
+
class BpmnHelpers {
|
|
43186
|
+
static parseBpmnElementsForIncidents(bpmnXml) {
|
|
43187
|
+
const elementInfo = {};
|
|
43188
|
+
try {
|
|
43189
|
+
const bpmnOpenTagRegex = /<bpmn:([A-Za-z][\w.-]*)\b[^>]*>/g;
|
|
43190
|
+
for (const tagMatch of bpmnXml.matchAll(bpmnOpenTagRegex)) {
|
|
43191
|
+
const [fullTag, elementType] = tagMatch;
|
|
43192
|
+
const idMatch = /\bid\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
43193
|
+
if (!idMatch) {
|
|
43194
|
+
continue;
|
|
43195
|
+
}
|
|
43196
|
+
const elementId = idMatch[1];
|
|
43197
|
+
const nameMatch = /\bname\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
43198
|
+
const name = nameMatch ? nameMatch[1] : "";
|
|
43199
|
+
const activityType = this.formatActivityTypeForIncidents(elementType);
|
|
43200
|
+
const activityName = name || elementId;
|
|
43201
|
+
elementInfo[elementId] = {
|
|
43202
|
+
type: activityType,
|
|
43203
|
+
name: activityName
|
|
43204
|
+
};
|
|
43205
|
+
}
|
|
43206
|
+
} catch (error) {
|
|
43207
|
+
console.warn("Failed to parse BPMN XML for incidents:", error);
|
|
43208
|
+
}
|
|
43209
|
+
return elementInfo;
|
|
43210
|
+
}
|
|
43211
|
+
static formatActivityTypeForIncidents(elementType) {
|
|
43212
|
+
return elementType.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
43213
|
+
}
|
|
43214
|
+
static async enrichIncidentsWithBpmnData(incidents, folderKey, service) {
|
|
43215
|
+
const uniqueInstanceIds = [...new Set(incidents.map((i) => i.instanceId))];
|
|
43216
|
+
if (uniqueInstanceIds.length === 1) {
|
|
43217
|
+
const elementInfo = await this.getBpmnElementInfo(uniqueInstanceIds[0], folderKey, service);
|
|
43218
|
+
return incidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
43219
|
+
} else {
|
|
43220
|
+
return this.enrichMultipleInstanceIncidents(incidents, folderKey, service);
|
|
43221
|
+
}
|
|
43222
|
+
}
|
|
43223
|
+
static async enrichMultipleInstanceIncidents(incidents, folderKey, service) {
|
|
43224
|
+
const groups = incidents.reduce((acc, incident) => {
|
|
43225
|
+
const id = incident.instanceId || NO_INSTANCE;
|
|
43226
|
+
(acc[id] = acc[id] || []).push(incident);
|
|
43227
|
+
return acc;
|
|
43228
|
+
}, {});
|
|
43229
|
+
const results = await Promise.all(Object.entries(groups).map(async (entry) => {
|
|
43230
|
+
const [instanceId, groupIncidents] = entry;
|
|
43231
|
+
const elementInfo = await this.getBpmnElementInfo(instanceId, folderKey, service);
|
|
43232
|
+
return groupIncidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
43233
|
+
}));
|
|
43234
|
+
return results.flat();
|
|
43235
|
+
}
|
|
43236
|
+
static async getBpmnElementInfo(instanceId, folderKey, service) {
|
|
43237
|
+
if (!instanceId || instanceId === NO_INSTANCE) {
|
|
43238
|
+
return {};
|
|
43239
|
+
}
|
|
43240
|
+
try {
|
|
43241
|
+
const bpmnXml = await service.getBpmn(instanceId, folderKey);
|
|
43242
|
+
return this.parseBpmnElementsForIncidents(bpmnXml);
|
|
43243
|
+
} catch (error) {
|
|
43244
|
+
console.warn(`Failed to get BPMN for instance ${instanceId}:`, error);
|
|
43245
|
+
return {};
|
|
43246
|
+
}
|
|
43247
|
+
}
|
|
43248
|
+
static transformIncidentWithBpmn(incident, elementInfo) {
|
|
43249
|
+
const element = elementInfo[incident.elementId];
|
|
43250
|
+
const transformed = transformData(incident, ProcessIncidentMap);
|
|
43251
|
+
return {
|
|
43252
|
+
...transformed,
|
|
43253
|
+
incidentElementActivityType: element?.type || UNKNOWN2,
|
|
43254
|
+
incidentElementActivityName: element?.name || UNKNOWN2
|
|
43255
|
+
};
|
|
43256
|
+
}
|
|
43257
|
+
}
|
|
42882
43258
|
var ProcessInstanceMap = {
|
|
42883
43259
|
startedTimeUtc: "startedTime",
|
|
42884
43260
|
completedTimeUtc: "completedTime",
|
|
@@ -42990,6 +43366,15 @@ class ProcessInstancesService extends BaseService {
|
|
|
42990
43366
|
data: response.data
|
|
42991
43367
|
};
|
|
42992
43368
|
}
|
|
43369
|
+
async retry(instanceId, folderKey, options) {
|
|
43370
|
+
const response = await this.post(MAESTRO_ENDPOINTS.INSTANCES.RETRY(instanceId), options || {}, {
|
|
43371
|
+
headers: createHeaders({ [FOLDER_KEY]: folderKey })
|
|
43372
|
+
});
|
|
43373
|
+
return {
|
|
43374
|
+
success: true,
|
|
43375
|
+
data: response.data
|
|
43376
|
+
};
|
|
43377
|
+
}
|
|
42993
43378
|
parseBpmnVariables(bpmnXml) {
|
|
42994
43379
|
const variableMap = new Map;
|
|
42995
43380
|
const variableSourceMap = this.getVariableSource(bpmnXml);
|
|
@@ -43098,6 +43483,9 @@ __decorate([
|
|
|
43098
43483
|
__decorate([
|
|
43099
43484
|
track("ProcessInstances.Resume")
|
|
43100
43485
|
], ProcessInstancesService.prototype, "resume", null);
|
|
43486
|
+
__decorate([
|
|
43487
|
+
track("ProcessInstances.Retry")
|
|
43488
|
+
], ProcessInstancesService.prototype, "retry", null);
|
|
43101
43489
|
__decorate([
|
|
43102
43490
|
track("ProcessInstances.GetVariables")
|
|
43103
43491
|
], ProcessInstancesService.prototype, "getVariables", null);
|
|
@@ -43139,7 +43527,12 @@ class MaestroProcessesService extends BaseService {
|
|
|
43139
43527
|
}));
|
|
43140
43528
|
}
|
|
43141
43529
|
async getInstanceStatusTimeline(startTime, endTime, options) {
|
|
43142
|
-
|
|
43530
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, buildInsightsTimelineBody(startTime, endTime, false, options));
|
|
43531
|
+
return data ?? [];
|
|
43532
|
+
}
|
|
43533
|
+
async getIncidentsTimeline(startTime, endTime, options) {
|
|
43534
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INCIDENTS_BY_TIME_WINDOW, buildInsightsTimelineBody(startTime, endTime, false, options));
|
|
43535
|
+
return data?.dataPoints ?? [];
|
|
43143
43536
|
}
|
|
43144
43537
|
async getTopFaultedCount(startTime, endTime, options) {
|
|
43145
43538
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, false, options));
|
|
@@ -43154,10 +43547,14 @@ class MaestroProcessesService extends BaseService {
|
|
|
43154
43547
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, false, options));
|
|
43155
43548
|
return (data ?? []).map((process10) => ({ ...process10, name: process10.packageId }));
|
|
43156
43549
|
}
|
|
43157
|
-
async getElementStats(
|
|
43158
|
-
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS,
|
|
43550
|
+
async getElementStats(request) {
|
|
43551
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
43159
43552
|
return data ?? [];
|
|
43160
43553
|
}
|
|
43554
|
+
async getInstanceStats(request) {
|
|
43555
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
43556
|
+
return transformData(data, InstanceStatsMap);
|
|
43557
|
+
}
|
|
43161
43558
|
}
|
|
43162
43559
|
__decorate([
|
|
43163
43560
|
track("MaestroProcesses.GetAll")
|
|
@@ -43174,6 +43571,9 @@ __decorate([
|
|
|
43174
43571
|
__decorate([
|
|
43175
43572
|
track("MaestroProcesses.GetInstanceStatusTimeline")
|
|
43176
43573
|
], MaestroProcessesService.prototype, "getInstanceStatusTimeline", null);
|
|
43574
|
+
__decorate([
|
|
43575
|
+
track("MaestroProcesses.GetIncidentsTimeline")
|
|
43576
|
+
], MaestroProcessesService.prototype, "getIncidentsTimeline", null);
|
|
43177
43577
|
__decorate([
|
|
43178
43578
|
track("MaestroProcesses.GetTopFaultedCount")
|
|
43179
43579
|
], MaestroProcessesService.prototype, "getTopFaultedCount", null);
|
|
@@ -43183,6 +43583,9 @@ __decorate([
|
|
|
43183
43583
|
__decorate([
|
|
43184
43584
|
track("MaestroProcesses.GetElementStats")
|
|
43185
43585
|
], MaestroProcessesService.prototype, "getElementStats", null);
|
|
43586
|
+
__decorate([
|
|
43587
|
+
track("MaestroProcesses.GetInstanceStats")
|
|
43588
|
+
], MaestroProcessesService.prototype, "getInstanceStats", null);
|
|
43186
43589
|
|
|
43187
43590
|
class ProcessIncidentsService extends BaseService {
|
|
43188
43591
|
async getAll() {
|
|
@@ -43225,7 +43628,12 @@ class CasesService extends BaseService {
|
|
|
43225
43628
|
}));
|
|
43226
43629
|
}
|
|
43227
43630
|
async getInstanceStatusTimeline(startTime, endTime, options) {
|
|
43228
|
-
|
|
43631
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, buildInsightsTimelineBody(startTime, endTime, true, options));
|
|
43632
|
+
return data ?? [];
|
|
43633
|
+
}
|
|
43634
|
+
async getIncidentsTimeline(startTime, endTime, options) {
|
|
43635
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INCIDENTS_BY_TIME_WINDOW, buildInsightsTimelineBody(startTime, endTime, true, options));
|
|
43636
|
+
return data?.dataPoints ?? [];
|
|
43229
43637
|
}
|
|
43230
43638
|
async getTopFaultedCount(startTime, endTime, options) {
|
|
43231
43639
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, true, options));
|
|
@@ -43240,10 +43648,14 @@ class CasesService extends BaseService {
|
|
|
43240
43648
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, true, options));
|
|
43241
43649
|
return (data ?? []).map((process10) => ({ ...process10, name: this.extractCaseName(process10.packageId) }));
|
|
43242
43650
|
}
|
|
43243
|
-
async getElementStats(
|
|
43244
|
-
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS,
|
|
43651
|
+
async getElementStats(request) {
|
|
43652
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
43245
43653
|
return data ?? [];
|
|
43246
43654
|
}
|
|
43655
|
+
async getInstanceStats(request) {
|
|
43656
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
43657
|
+
return transformData(data, InstanceStatsMap);
|
|
43658
|
+
}
|
|
43247
43659
|
extractCaseName(packageId) {
|
|
43248
43660
|
const caseManagementIndex = packageId.indexOf("CaseManagement.");
|
|
43249
43661
|
if (caseManagementIndex !== -1) {
|
|
@@ -43265,6 +43677,9 @@ __decorate([
|
|
|
43265
43677
|
__decorate([
|
|
43266
43678
|
track("Cases.GetInstanceStatusTimeline")
|
|
43267
43679
|
], CasesService.prototype, "getInstanceStatusTimeline", null);
|
|
43680
|
+
__decorate([
|
|
43681
|
+
track("Cases.GetIncidentsTimeline")
|
|
43682
|
+
], CasesService.prototype, "getIncidentsTimeline", null);
|
|
43268
43683
|
__decorate([
|
|
43269
43684
|
track("Cases.GetTopFaultedCount")
|
|
43270
43685
|
], CasesService.prototype, "getTopFaultedCount", null);
|
|
@@ -43274,6 +43689,9 @@ __decorate([
|
|
|
43274
43689
|
__decorate([
|
|
43275
43690
|
track("Cases.GetElementStats")
|
|
43276
43691
|
], CasesService.prototype, "getElementStats", null);
|
|
43692
|
+
__decorate([
|
|
43693
|
+
track("Cases.GetInstanceStats")
|
|
43694
|
+
], CasesService.prototype, "getInstanceStats", null);
|
|
43277
43695
|
var CaseInstanceMap = {
|
|
43278
43696
|
startedTimeUtc: "startedTime",
|
|
43279
43697
|
completedTimeUtc: "completedTime",
|
|
@@ -43406,6 +43824,7 @@ class TaskService extends BaseService {
|
|
|
43406
43824
|
const transformedTask = transformData(pascalToCamelCaseKeys(task), TaskMap);
|
|
43407
43825
|
return createTaskWithMethods(applyDataTransforms(transformedTask, { field: "status", valueMap: TaskStatusMap }), this);
|
|
43408
43826
|
};
|
|
43827
|
+
const apiOptions = options ? transformOptions(options, TaskMap) : options;
|
|
43409
43828
|
return PaginationHelpers.getAll({
|
|
43410
43829
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
43411
43830
|
getEndpoint: () => endpoint,
|
|
@@ -43422,7 +43841,7 @@ class TaskService extends BaseService {
|
|
|
43422
43841
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
43423
43842
|
}
|
|
43424
43843
|
}
|
|
43425
|
-
},
|
|
43844
|
+
}, apiOptions);
|
|
43426
43845
|
}
|
|
43427
43846
|
async getById(id, options = {}, folderId) {
|
|
43428
43847
|
const { taskType, ...restOptions } = options;
|
|
@@ -43434,8 +43853,8 @@ class TaskService extends BaseService {
|
|
|
43434
43853
|
}
|
|
43435
43854
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
43436
43855
|
const modifiedOptions = this.addDefaultExpand(restOptions);
|
|
43437
|
-
const
|
|
43438
|
-
const apiOptions = addPrefixToKeys(
|
|
43856
|
+
const apiFieldOptions = transformOptions(modifiedOptions, TaskMap);
|
|
43857
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
43439
43858
|
const response = await this.get(TASK_ENDPOINTS.GET_BY_ID(id), {
|
|
43440
43859
|
params: apiOptions,
|
|
43441
43860
|
headers
|
|
@@ -43900,7 +44319,7 @@ class FolderScopedService extends BaseService {
|
|
|
43900
44319
|
}
|
|
43901
44320
|
return response.data?.value;
|
|
43902
44321
|
}
|
|
43903
|
-
async getByNameLookup(resourceType, endpoint, name, options, transform2) {
|
|
44322
|
+
async getByNameLookup(resourceType, endpoint, name, options, transform2, responseFieldMap) {
|
|
43904
44323
|
const validatedName = validateName(resourceType, name);
|
|
43905
44324
|
const { folderId, folderKey, folderPath, ...queryOptions } = options;
|
|
43906
44325
|
const headers = resolveFolderHeaders({
|
|
@@ -43910,8 +44329,9 @@ class FolderScopedService extends BaseService {
|
|
|
43910
44329
|
resourceType: `${resourceType}.getByName`,
|
|
43911
44330
|
fallbackFolderKey: this.config.folderKey
|
|
43912
44331
|
});
|
|
44332
|
+
const apiFieldOptions = responseFieldMap ? transformOptions(queryOptions, responseFieldMap) : queryOptions;
|
|
43913
44333
|
const apiOptions = {
|
|
43914
|
-
...addPrefixToKeys(
|
|
44334
|
+
...addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions)),
|
|
43915
44335
|
$filter: `Name eq '${validatedName.replace(SINGLE_QUOTE_RE, "''")}'`,
|
|
43916
44336
|
$top: "1"
|
|
43917
44337
|
};
|
|
@@ -43961,6 +44381,7 @@ var AssetMap = {
|
|
|
43961
44381
|
class AssetService extends FolderScopedService {
|
|
43962
44382
|
async getAll(options) {
|
|
43963
44383
|
const transformAssetResponse = (asset) => transformData(pascalToCamelCaseKeys(asset), AssetMap);
|
|
44384
|
+
const apiOptions = options ? transformOptions(options, AssetMap) : options;
|
|
43964
44385
|
return PaginationHelpers.getAll({
|
|
43965
44386
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
43966
44387
|
getEndpoint: (folderId) => folderId ? ASSET_ENDPOINTS.GET_BY_FOLDER : ASSET_ENDPOINTS.GET_ALL,
|
|
@@ -43976,12 +44397,12 @@ class AssetService extends FolderScopedService {
|
|
|
43976
44397
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
43977
44398
|
}
|
|
43978
44399
|
}
|
|
43979
|
-
},
|
|
44400
|
+
}, apiOptions);
|
|
43980
44401
|
}
|
|
43981
44402
|
async getById(id, folderId, options = {}) {
|
|
43982
44403
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
43983
|
-
const
|
|
43984
|
-
const apiOptions = addPrefixToKeys(
|
|
44404
|
+
const apiFieldOptions = transformOptions(options, AssetMap);
|
|
44405
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
43985
44406
|
const response = await this.get(ASSET_ENDPOINTS.GET_BY_ID(id), {
|
|
43986
44407
|
headers,
|
|
43987
44408
|
params: apiOptions
|
|
@@ -43990,7 +44411,7 @@ class AssetService extends FolderScopedService {
|
|
|
43990
44411
|
return transformedAsset;
|
|
43991
44412
|
}
|
|
43992
44413
|
async getByName(name, options = {}) {
|
|
43993
|
-
return this.getByNameLookup("Asset", ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap));
|
|
44414
|
+
return this.getByNameLookup("Asset", ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap), AssetMap);
|
|
43994
44415
|
}
|
|
43995
44416
|
async updateValueById(id, newValue, options) {
|
|
43996
44417
|
if (!id) {
|
|
@@ -44129,6 +44550,7 @@ class BucketService extends FolderScopedService {
|
|
|
44129
44550
|
fallbackFolderKey: this.config.folderKey
|
|
44130
44551
|
});
|
|
44131
44552
|
const transformBlobItem = (item) => transformData(item, BucketMap);
|
|
44553
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
44132
44554
|
return PaginationHelpers.getAll({
|
|
44133
44555
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
44134
44556
|
getEndpoint: () => BUCKET_ENDPOINTS.GET_FILE_META_DATA(bucketId),
|
|
@@ -44144,7 +44566,7 @@ class BucketService extends FolderScopedService {
|
|
|
44144
44566
|
},
|
|
44145
44567
|
excludeFromPrefix: ["prefix"],
|
|
44146
44568
|
headers
|
|
44147
|
-
},
|
|
44569
|
+
}, apiRestOptions);
|
|
44148
44570
|
}
|
|
44149
44571
|
async uploadFile(bucketIdOrOptions, path3, content, options) {
|
|
44150
44572
|
let bucketId;
|
|
@@ -44219,9 +44641,10 @@ class BucketService extends FolderScopedService {
|
|
|
44219
44641
|
resourceType: "Buckets.getReadUri",
|
|
44220
44642
|
fallbackFolderKey: this.config.folderKey
|
|
44221
44643
|
});
|
|
44644
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
44222
44645
|
const queryOptions = {
|
|
44223
44646
|
expiryInMinutes,
|
|
44224
|
-
...addPrefixToKeys(
|
|
44647
|
+
...addPrefixToKeys(apiRestOptions, ODATA_PREFIX, Object.keys(apiRestOptions))
|
|
44225
44648
|
};
|
|
44226
44649
|
return this._getUri(BUCKET_ENDPOINTS.GET_READ_URI(bucketId), bucketId, resolvedPath, headers, queryOptions);
|
|
44227
44650
|
}
|
|
@@ -44275,6 +44698,7 @@ class BucketService extends FolderScopedService {
|
|
|
44275
44698
|
fallbackFolderKey: this.config.folderKey
|
|
44276
44699
|
});
|
|
44277
44700
|
const transformBucketFile = (file) => transformData(pascalToCamelCaseKeys(file), BucketMap);
|
|
44701
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
44278
44702
|
return PaginationHelpers.getAll({
|
|
44279
44703
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
44280
44704
|
getEndpoint: () => BUCKET_ENDPOINTS.GET_FILES(bucketId),
|
|
@@ -44291,7 +44715,7 @@ class BucketService extends FolderScopedService {
|
|
|
44291
44715
|
},
|
|
44292
44716
|
excludeFromPrefix: ["directory", "recursive", "fileNameRegex"],
|
|
44293
44717
|
headers
|
|
44294
|
-
}, { ...
|
|
44718
|
+
}, { ...apiRestOptions, directory: "/", recursive: true });
|
|
44295
44719
|
}
|
|
44296
44720
|
async deleteFile(bucketId, path3, options) {
|
|
44297
44721
|
if (!bucketId) {
|
|
@@ -44314,9 +44738,10 @@ class BucketService extends FolderScopedService {
|
|
|
44314
44738
|
}
|
|
44315
44739
|
async _getWriteUri(options) {
|
|
44316
44740
|
const { bucketId, path: path3, expiryInMinutes, headers, ...restOptions } = options;
|
|
44741
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
44317
44742
|
const queryOptions = {
|
|
44318
44743
|
expiryInMinutes,
|
|
44319
|
-
...addPrefixToKeys(
|
|
44744
|
+
...addPrefixToKeys(apiRestOptions, ODATA_PREFIX, Object.keys(apiRestOptions))
|
|
44320
44745
|
};
|
|
44321
44746
|
return this._getUri(BUCKET_ENDPOINTS.GET_WRITE_URI(bucketId), bucketId, path3, headers, queryOptions);
|
|
44322
44747
|
}
|
|
@@ -44409,8 +44834,8 @@ class AttachmentService extends BaseService {
|
|
|
44409
44834
|
if (!id) {
|
|
44410
44835
|
throw new ValidationError({ message: "id is required for getById" });
|
|
44411
44836
|
}
|
|
44412
|
-
const
|
|
44413
|
-
const apiOptions = addPrefixToKeys(
|
|
44837
|
+
const apiFieldOptions = transformOptions(options, { ...AttachmentsMap, ...BucketMap });
|
|
44838
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
44414
44839
|
const response = await this.get(ORCHESTRATOR_ATTACHMENT_ENDPOINTS.GET_BY_ID(id), {
|
|
44415
44840
|
params: apiOptions
|
|
44416
44841
|
});
|
|
@@ -44575,6 +45000,7 @@ class JobService extends FolderScopedService {
|
|
|
44575
45000
|
const rawJob = transformData(pascalToCamelCaseKeys(job), JobMap);
|
|
44576
45001
|
return createJobWithMethods(rawJob, this);
|
|
44577
45002
|
};
|
|
45003
|
+
const apiOptions = options ? transformOptions(options, JobMap) : options;
|
|
44578
45004
|
return PaginationHelpers.getAll({
|
|
44579
45005
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
44580
45006
|
getEndpoint: () => JOB_ENDPOINTS.GET_ALL,
|
|
@@ -44590,7 +45016,7 @@ class JobService extends FolderScopedService {
|
|
|
44590
45016
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
44591
45017
|
}
|
|
44592
45018
|
}
|
|
44593
|
-
},
|
|
45019
|
+
}, apiOptions);
|
|
44594
45020
|
}
|
|
44595
45021
|
async getById(id, folderId, options) {
|
|
44596
45022
|
if (!id) {
|
|
@@ -44600,8 +45026,8 @@ class JobService extends FolderScopedService {
|
|
|
44600
45026
|
throw new ValidationError({ message: "folderId is required for getById" });
|
|
44601
45027
|
}
|
|
44602
45028
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
44603
|
-
const
|
|
44604
|
-
const apiOptions =
|
|
45029
|
+
const apiFieldOptions = options ? transformOptions(options, JobMap) : {};
|
|
45030
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
44605
45031
|
const response = await this.get(JOB_ENDPOINTS.GET_BY_KEY(id), {
|
|
44606
45032
|
params: apiOptions,
|
|
44607
45033
|
headers
|
|
@@ -44769,6 +45195,8 @@ var JobState;
|
|
|
44769
45195
|
JobState2["Stopped"] = "Stopped";
|
|
44770
45196
|
JobState2["Suspended"] = "Suspended";
|
|
44771
45197
|
JobState2["Resumed"] = "Resumed";
|
|
45198
|
+
JobState2["Cancelled"] = "Cancelled";
|
|
45199
|
+
JobState2["Unknown"] = "Unknown";
|
|
44772
45200
|
})(JobState || (JobState = {}));
|
|
44773
45201
|
var ProcessMap = {
|
|
44774
45202
|
lastModificationTime: "lastModifiedTime",
|
|
@@ -44787,6 +45215,7 @@ var ProcessMap = {
|
|
|
44787
45215
|
class ProcessService extends FolderScopedService {
|
|
44788
45216
|
async getAll(options) {
|
|
44789
45217
|
const transformProcessResponse = (process10) => transformData(pascalToCamelCaseKeys(process10), ProcessMap);
|
|
45218
|
+
const apiOptions = options ? transformOptions(options, ProcessMap) : options;
|
|
44790
45219
|
return PaginationHelpers.getAll({
|
|
44791
45220
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
44792
45221
|
getEndpoint: () => PROCESS_ENDPOINTS.GET_ALL,
|
|
@@ -44802,7 +45231,7 @@ class ProcessService extends FolderScopedService {
|
|
|
44802
45231
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
44803
45232
|
}
|
|
44804
45233
|
}
|
|
44805
|
-
},
|
|
45234
|
+
}, apiOptions);
|
|
44806
45235
|
}
|
|
44807
45236
|
async start(request, optionsOrFolderId, legacyOptions) {
|
|
44808
45237
|
let folderId;
|
|
@@ -44830,8 +45259,8 @@ class ProcessService extends FolderScopedService {
|
|
|
44830
45259
|
const requestBody = {
|
|
44831
45260
|
startInfo: apiRequest
|
|
44832
45261
|
};
|
|
44833
|
-
const
|
|
44834
|
-
const apiOptions = addPrefixToKeys(
|
|
45262
|
+
const apiFieldOptions = transformOptions(queryOptions, ProcessMap);
|
|
45263
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
44835
45264
|
const response = await this.post(PROCESS_ENDPOINTS.START_PROCESS, requestBody, {
|
|
44836
45265
|
params: apiOptions,
|
|
44837
45266
|
headers
|
|
@@ -44841,8 +45270,8 @@ class ProcessService extends FolderScopedService {
|
|
|
44841
45270
|
}
|
|
44842
45271
|
async getById(id, folderId, options = {}) {
|
|
44843
45272
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
44844
|
-
const
|
|
44845
|
-
const apiOptions = addPrefixToKeys(
|
|
45273
|
+
const apiFieldOptions = transformOptions(options, ProcessMap);
|
|
45274
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
44846
45275
|
const response = await this.get(PROCESS_ENDPOINTS.GET_BY_ID(id), {
|
|
44847
45276
|
headers,
|
|
44848
45277
|
params: apiOptions
|
|
@@ -44851,7 +45280,7 @@ class ProcessService extends FolderScopedService {
|
|
|
44851
45280
|
return transformedProcess;
|
|
44852
45281
|
}
|
|
44853
45282
|
async getByName(name, options = {}) {
|
|
44854
|
-
return this.getByNameLookup("Process", PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap));
|
|
45283
|
+
return this.getByNameLookup("Process", PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap), ProcessMap);
|
|
44855
45284
|
}
|
|
44856
45285
|
}
|
|
44857
45286
|
__decorate([
|
|
@@ -44875,6 +45304,7 @@ var QueueMap = {
|
|
|
44875
45304
|
class QueueService extends FolderScopedService {
|
|
44876
45305
|
async getAll(options) {
|
|
44877
45306
|
const transformQueueResponse = (queue) => transformData(pascalToCamelCaseKeys(queue), QueueMap);
|
|
45307
|
+
const apiOptions = options ? transformOptions(options, QueueMap) : options;
|
|
44878
45308
|
return PaginationHelpers.getAll({
|
|
44879
45309
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
44880
45310
|
getEndpoint: (folderId) => folderId ? QUEUE_ENDPOINTS.GET_BY_FOLDER : QUEUE_ENDPOINTS.GET_ALL,
|
|
@@ -44890,12 +45320,12 @@ class QueueService extends FolderScopedService {
|
|
|
44890
45320
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
44891
45321
|
}
|
|
44892
45322
|
}
|
|
44893
|
-
},
|
|
45323
|
+
}, apiOptions);
|
|
44894
45324
|
}
|
|
44895
45325
|
async getById(id, folderId, options = {}) {
|
|
44896
45326
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
44897
|
-
const
|
|
44898
|
-
const apiOptions = addPrefixToKeys(
|
|
45327
|
+
const apiFieldOptions = transformOptions(options, QueueMap);
|
|
45328
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
44899
45329
|
const response = await this.get(QUEUE_ENDPOINTS.GET_BY_ID(id), {
|
|
44900
45330
|
headers,
|
|
44901
45331
|
params: apiOptions
|
|
@@ -44936,7 +45366,9 @@ class UiPath2 extends UiPath$1 {
|
|
|
44936
45366
|
}
|
|
44937
45367
|
get entities() {
|
|
44938
45368
|
return Object.assign(this.getService(EntityService), {
|
|
44939
|
-
choicesets: this.getService(ChoiceSetService)
|
|
45369
|
+
choicesets: this.getService(ChoiceSetService),
|
|
45370
|
+
roles: this.getService(DataFabricRoleService),
|
|
45371
|
+
directory: this.getService(DataFabricDirectoryService)
|
|
44940
45372
|
});
|
|
44941
45373
|
}
|
|
44942
45374
|
get tasks() {
|
|
@@ -45041,6 +45473,17 @@ var AgentErrorSortColumn;
|
|
|
45041
45473
|
AgentErrorSortColumn2["LastSeenFolderName"] = "LastSeenFolderName";
|
|
45042
45474
|
AgentErrorSortColumn2["LastSeenFolderPath"] = "LastSeenFolderPath";
|
|
45043
45475
|
})(AgentErrorSortColumn || (AgentErrorSortColumn = {}));
|
|
45476
|
+
var AgentType;
|
|
45477
|
+
(function(AgentType2) {
|
|
45478
|
+
AgentType2["Autonomous"] = "Autonomous";
|
|
45479
|
+
AgentType2["Conversational"] = "Conversational";
|
|
45480
|
+
AgentType2["Coded"] = "Coded";
|
|
45481
|
+
})(AgentType || (AgentType = {}));
|
|
45482
|
+
var AgentExecutionType;
|
|
45483
|
+
(function(AgentExecutionType2) {
|
|
45484
|
+
AgentExecutionType2["Debug"] = "Debug";
|
|
45485
|
+
AgentExecutionType2["Runtime"] = "Runtime";
|
|
45486
|
+
})(AgentExecutionType || (AgentExecutionType = {}));
|
|
45044
45487
|
var AgentMemoryExecutionType;
|
|
45045
45488
|
(function(AgentMemoryExecutionType2) {
|
|
45046
45489
|
AgentMemoryExecutionType2["Debug"] = "Debug";
|
|
@@ -45334,6 +45777,28 @@ var SpanAttachmentDirection;
|
|
|
45334
45777
|
SpanAttachmentDirection2["In"] = "In";
|
|
45335
45778
|
SpanAttachmentDirection2["Out"] = "Out";
|
|
45336
45779
|
})(SpanAttachmentDirection || (SpanAttachmentDirection = {}));
|
|
45780
|
+
var AgentGovernanceMode;
|
|
45781
|
+
(function(AgentGovernanceMode2) {
|
|
45782
|
+
AgentGovernanceMode2["Audit"] = "AUDIT";
|
|
45783
|
+
AgentGovernanceMode2["Enforce"] = "ENFORCE";
|
|
45784
|
+
AgentGovernanceMode2["Unknown"] = "Unknown";
|
|
45785
|
+
})(AgentGovernanceMode || (AgentGovernanceMode = {}));
|
|
45786
|
+
var AgentGovernanceVerdict;
|
|
45787
|
+
(function(AgentGovernanceVerdict2) {
|
|
45788
|
+
AgentGovernanceVerdict2["Allow"] = "ALLOW";
|
|
45789
|
+
AgentGovernanceVerdict2["Deny"] = "DENY";
|
|
45790
|
+
AgentGovernanceVerdict2["Unknown"] = "Unknown";
|
|
45791
|
+
})(AgentGovernanceVerdict || (AgentGovernanceVerdict = {}));
|
|
45792
|
+
var AgentGovernanceSection;
|
|
45793
|
+
(function(AgentGovernanceSection2) {
|
|
45794
|
+
AgentGovernanceSection2["Totals"] = "totals";
|
|
45795
|
+
AgentGovernanceSection2["Hook"] = "hook";
|
|
45796
|
+
AgentGovernanceSection2["Agent"] = "agent";
|
|
45797
|
+
AgentGovernanceSection2["Policy"] = "policy";
|
|
45798
|
+
AgentGovernanceSection2["Pack"] = "pack";
|
|
45799
|
+
AgentGovernanceSection2["Action"] = "action";
|
|
45800
|
+
AgentGovernanceSection2["Mode"] = "mode";
|
|
45801
|
+
})(AgentGovernanceSection || (AgentGovernanceSection = {}));
|
|
45337
45802
|
|
|
45338
45803
|
// src/utils/sdk-client.ts
|
|
45339
45804
|
var createTasksClient = async (tenantOverride) => {
|
|
@@ -45790,4 +46255,4 @@ export {
|
|
|
45790
46255
|
metadata
|
|
45791
46256
|
};
|
|
45792
46257
|
|
|
45793
|
-
//# debugId=
|
|
46258
|
+
//# debugId=AFC456AC2015D57464756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/tasks-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.198.0-preview.80",
|
|
5
5
|
"description": "Manage Action Center tasks.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/tool.js",
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"registry": "https://registry.npmjs.org/"
|
|
16
16
|
},
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "9b2c3c0f21a256d2f38dd28bc97e72e6f7b10a9c"
|
|
18
18
|
}
|