@uipath/vertical-solutions-tool 1.197.0 → 1.198.0-preview.81
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 +625 -170
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -27537,7 +27537,7 @@ var require_src6 = __commonJS((exports) => {
|
|
|
27537
27537
|
var package_default = {
|
|
27538
27538
|
name: "@uipath/vertical-solutions-tool",
|
|
27539
27539
|
license: "MIT",
|
|
27540
|
-
version: "1.
|
|
27540
|
+
version: "1.198.0-preview.81",
|
|
27541
27541
|
description: "Scaffold and generate Vertical Solution projects.",
|
|
27542
27542
|
private: false,
|
|
27543
27543
|
repository: {
|
|
@@ -27582,7 +27582,7 @@ var package_default = {
|
|
|
27582
27582
|
"@uipath/auth": "workspace:*",
|
|
27583
27583
|
"@uipath/common": "workspace:*",
|
|
27584
27584
|
"@uipath/filesystem": "workspace:*",
|
|
27585
|
-
"@uipath/uipath-typescript": "^1.
|
|
27585
|
+
"@uipath/uipath-typescript": "^1.5.2",
|
|
27586
27586
|
"@inquirer/prompts": "^8.3.2",
|
|
27587
27587
|
"@types/node": "^25.5.2",
|
|
27588
27588
|
commander: "^14.0.3",
|
|
@@ -32638,6 +32638,7 @@ function getLogFilePath() {
|
|
|
32638
32638
|
// ../common/src/output-format-context.ts
|
|
32639
32639
|
var formatSlot = singleton("OutputFormat");
|
|
32640
32640
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
32641
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
32641
32642
|
var filterSlot = singleton("OutputFilter");
|
|
32642
32643
|
function getOutputFormat() {
|
|
32643
32644
|
return formatSlot.get("json");
|
|
@@ -33705,6 +33706,9 @@ var OutputFormatter;
|
|
|
33705
33706
|
if (opts?.warning) {
|
|
33706
33707
|
data.Warning = opts.warning;
|
|
33707
33708
|
}
|
|
33709
|
+
if (opts?.pagination) {
|
|
33710
|
+
data.Pagination = opts.pagination;
|
|
33711
|
+
}
|
|
33708
33712
|
success(data);
|
|
33709
33713
|
}
|
|
33710
33714
|
OutputFormatter.emitList = emitList;
|
|
@@ -34152,6 +34156,7 @@ var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
|
34152
34156
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
34153
34157
|
// ../common/src/interactivity-context.ts
|
|
34154
34158
|
var modeSlot = singleton("InteractivityMode");
|
|
34159
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
34155
34160
|
function getInteractivityMode() {
|
|
34156
34161
|
return modeSlot.get("auto") ?? "auto";
|
|
34157
34162
|
}
|
|
@@ -55967,6 +55972,10 @@ var getAuthContext = async (options = {}) => {
|
|
|
55967
55972
|
tenantName
|
|
55968
55973
|
};
|
|
55969
55974
|
};
|
|
55975
|
+
|
|
55976
|
+
// ../auth/src/index.ts
|
|
55977
|
+
init_constants();
|
|
55978
|
+
|
|
55970
55979
|
// ../auth/src/interactive.ts
|
|
55971
55980
|
init_src();
|
|
55972
55981
|
|
|
@@ -60200,7 +60209,8 @@ var MAESTRO_ENDPOINTS = {
|
|
|
60200
60209
|
GET_VARIABLES: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/variables`,
|
|
60201
60210
|
CANCEL: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/cancel`,
|
|
60202
60211
|
PAUSE: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/pause`,
|
|
60203
|
-
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume
|
|
60212
|
+
RESUME: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/resume`,
|
|
60213
|
+
RETRY: (instanceId) => `${PIMS_BASE}/api/v1/instances/${instanceId}/retry`
|
|
60204
60214
|
},
|
|
60205
60215
|
INCIDENTS: {
|
|
60206
60216
|
GET_ALL: `${PIMS_BASE}/api/v1/incidents/summary`,
|
|
@@ -60223,7 +60233,9 @@ var MAESTRO_ENDPOINTS = {
|
|
|
60223
60233
|
TOP_ELEMENTS_WITH_FAILURE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopElementswithFailure`,
|
|
60224
60234
|
INSTANCE_STATUS_BY_DATE: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/InstanceStatusByDate`,
|
|
60225
60235
|
TOP_PROCESSES_BY_DURATION: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/TopProcessesByDuration`,
|
|
60226
|
-
|
|
60236
|
+
INSTANCE_COUNT_BY_STATUS: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/InstanceCountByStatus`,
|
|
60237
|
+
ELEMENT_COUNT_BY_STATUS: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/ElementCountByStatus`,
|
|
60238
|
+
INCIDENTS_BY_TIME_WINDOW: `${INSIGHTS_RTM_BASE}/agenticInstanceStatus/IncidentsByTimeWindow`
|
|
60227
60239
|
}
|
|
60228
60240
|
};
|
|
60229
60241
|
var DATA_FABRIC_TENANT_FOLDER_ID = "00000000-0000-0000-0000-000000000000";
|
|
@@ -60233,7 +60245,7 @@ var DATA_FABRIC_ENDPOINTS = {
|
|
|
60233
60245
|
GET_ALL_V2: `${DATAFABRIC_BASE}/api/v2/Entity`,
|
|
60234
60246
|
GET_ENTITY_RECORDS: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read`,
|
|
60235
60247
|
GET_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/Entity/${entityId}`,
|
|
60236
|
-
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/read/${recordId}`,
|
|
60248
|
+
GET_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/v2/EntityService/entity/${entityId}/read/${recordId}`,
|
|
60237
60249
|
INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert`,
|
|
60238
60250
|
BATCH_INSERT_BY_ID: (entityId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/insert-batch`,
|
|
60239
60251
|
UPDATE_RECORD_BY_ID: (entityId, recordId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${entityId}/update/${recordId}`,
|
|
@@ -60258,6 +60270,14 @@ var DATA_FABRIC_ENDPOINTS = {
|
|
|
60258
60270
|
INSERT_BY_NAME: (choiceSetName) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/insert`,
|
|
60259
60271
|
UPDATE_BY_NAME: (choiceSetName, valueId) => `${DATAFABRIC_BASE}/api/EntityService/${choiceSetName}/choiceset/${valueId}/update`,
|
|
60260
60272
|
DELETE_BY_ID: (choiceSetId) => `${DATAFABRIC_BASE}/api/EntityService/entity/${choiceSetId}/choiceset/delete`
|
|
60273
|
+
},
|
|
60274
|
+
ROLES: {
|
|
60275
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/v2/Role`
|
|
60276
|
+
},
|
|
60277
|
+
DIRECTORY: {
|
|
60278
|
+
GET_ALL: `${DATAFABRIC_BASE}/api/Directory`,
|
|
60279
|
+
ASSIGN_ROLES: `${DATAFABRIC_BASE}/api/Directory/Role`,
|
|
60280
|
+
REVOKE_ROLES: `${DATAFABRIC_BASE}/api/Directory/RevokeRole`
|
|
60261
60281
|
}
|
|
60262
60282
|
};
|
|
60263
60283
|
var IDENTITY_ENDPOINTS = {
|
|
@@ -60478,7 +60498,7 @@ class EmbeddedTokenManager {
|
|
|
60478
60498
|
this.cancelRefresh?.();
|
|
60479
60499
|
}
|
|
60480
60500
|
}
|
|
60481
|
-
var SDK_VERSION = "1.
|
|
60501
|
+
var SDK_VERSION = "1.5.2";
|
|
60482
60502
|
var CLOUD_ROLE_NAME = "uipath-ts-sdk";
|
|
60483
60503
|
var SDK_SERVICE_NAME = "UiPath.TypeScript.Sdk";
|
|
60484
60504
|
var SDK_LOGGER_NAME = "uipath-ts-sdk-telemetry";
|
|
@@ -61732,16 +61752,16 @@ function toISOUtc(value) {
|
|
|
61732
61752
|
return isNaN(date6.getTime()) ? value : date6.toISOString();
|
|
61733
61753
|
}
|
|
61734
61754
|
function transformData(data, fieldMapping) {
|
|
61755
|
+
if (data == null) {
|
|
61756
|
+
return data;
|
|
61757
|
+
}
|
|
61735
61758
|
if (Array.isArray(data)) {
|
|
61736
61759
|
return data.map((item) => transformData(item, fieldMapping));
|
|
61737
61760
|
}
|
|
61738
|
-
const result = {
|
|
61739
|
-
for (const [
|
|
61740
|
-
|
|
61741
|
-
|
|
61742
|
-
delete result[sourceField];
|
|
61743
|
-
result[targetField] = value;
|
|
61744
|
-
}
|
|
61761
|
+
const result = {};
|
|
61762
|
+
for (const [key, value] of Object.entries(data)) {
|
|
61763
|
+
const renamedKey = fieldMapping[key] ?? key;
|
|
61764
|
+
result[renamedKey] = value;
|
|
61745
61765
|
}
|
|
61746
61766
|
return result;
|
|
61747
61767
|
}
|
|
@@ -61826,6 +61846,26 @@ function transformRequest(data, responseMap) {
|
|
|
61826
61846
|
}
|
|
61827
61847
|
return result;
|
|
61828
61848
|
}
|
|
61849
|
+
var ODATA_FIELD_PARAM_KEYS = ["filter", "orderby", "select", "expand"];
|
|
61850
|
+
var ODATA_TOKEN_RE = /'(?:[^']|'')*'|[A-Za-z_][A-Za-z0-9_]*/g;
|
|
61851
|
+
function rewriteODataIdentifiers(expression, requestMap) {
|
|
61852
|
+
if (!expression)
|
|
61853
|
+
return expression;
|
|
61854
|
+
return expression.replace(ODATA_TOKEN_RE, (match) => match.startsWith("'") ? match : requestMap[match] ?? match);
|
|
61855
|
+
}
|
|
61856
|
+
function transformOptions(options, responseMap) {
|
|
61857
|
+
const requestMap = reverseMap(responseMap);
|
|
61858
|
+
if (Object.keys(requestMap).length === 0)
|
|
61859
|
+
return options;
|
|
61860
|
+
const result = { ...options };
|
|
61861
|
+
for (const key of ODATA_FIELD_PARAM_KEYS) {
|
|
61862
|
+
const value = result[key];
|
|
61863
|
+
if (typeof value === "string") {
|
|
61864
|
+
result[key] = rewriteODataIdentifiers(value, requestMap);
|
|
61865
|
+
}
|
|
61866
|
+
}
|
|
61867
|
+
return result;
|
|
61868
|
+
}
|
|
61829
61869
|
function arrayDictionaryToRecord(dictionary) {
|
|
61830
61870
|
if (!dictionary || !dictionary.keys || !dictionary.values) {
|
|
61831
61871
|
return {};
|
|
@@ -62311,6 +62351,7 @@ var EntityFieldDataType;
|
|
|
62311
62351
|
EntityFieldDataType2["BOOLEAN"] = "BOOLEAN";
|
|
62312
62352
|
EntityFieldDataType2["BIG_INTEGER"] = "BIG_INTEGER";
|
|
62313
62353
|
EntityFieldDataType2["MULTILINE_TEXT"] = "MULTILINE_TEXT";
|
|
62354
|
+
EntityFieldDataType2["MULTILINE_MAX"] = "MULTILINE_MAX";
|
|
62314
62355
|
EntityFieldDataType2["FILE"] = "FILE";
|
|
62315
62356
|
EntityFieldDataType2["CHOICE_SET_SINGLE"] = "CHOICE_SET_SINGLE";
|
|
62316
62357
|
EntityFieldDataType2["CHOICE_SET_MULTIPLE"] = "CHOICE_SET_MULTIPLE";
|
|
@@ -62404,10 +62445,12 @@ var SqlFieldType;
|
|
|
62404
62445
|
SqlFieldType2["BIT"] = "BIT";
|
|
62405
62446
|
SqlFieldType2["DECIMAL"] = "DECIMAL";
|
|
62406
62447
|
SqlFieldType2["MULTILINE"] = "MULTILINE";
|
|
62448
|
+
SqlFieldType2["MULTILINE_MAX"] = "MULTILINE_MAX";
|
|
62407
62449
|
})(SqlFieldType || (SqlFieldType = {}));
|
|
62408
62450
|
var ENTITY_TYPE_IDS = {
|
|
62409
62451
|
[EntityType.ChoiceSet]: 1
|
|
62410
62452
|
};
|
|
62453
|
+
var MAX_QUERY_JOINS = 3;
|
|
62411
62454
|
var EntityMap = {
|
|
62412
62455
|
createTime: "createdTime",
|
|
62413
62456
|
updateTime: "updatedTime",
|
|
@@ -62427,6 +62470,7 @@ var EntitySchemaFieldTypeMap = {
|
|
|
62427
62470
|
[EntityFieldDataType.BOOLEAN]: { sqlTypeName: SqlFieldType.BIT, fieldDisplayType: FieldDisplayType.Basic },
|
|
62428
62471
|
[EntityFieldDataType.BIG_INTEGER]: { sqlTypeName: SqlFieldType.BIGINT, fieldDisplayType: FieldDisplayType.Basic },
|
|
62429
62472
|
[EntityFieldDataType.MULTILINE_TEXT]: { sqlTypeName: SqlFieldType.MULTILINE, fieldDisplayType: FieldDisplayType.Basic },
|
|
62473
|
+
[EntityFieldDataType.MULTILINE_MAX]: { sqlTypeName: SqlFieldType.MULTILINE_MAX, fieldDisplayType: FieldDisplayType.Basic },
|
|
62430
62474
|
[EntityFieldDataType.FILE]: { sqlTypeName: SqlFieldType.UNIQUEIDENTIFIER, fieldDisplayType: FieldDisplayType.File },
|
|
62431
62475
|
[EntityFieldDataType.CHOICE_SET_SINGLE]: { sqlTypeName: SqlFieldType.INT, fieldDisplayType: FieldDisplayType.ChoiceSetSingle },
|
|
62432
62476
|
[EntityFieldDataType.CHOICE_SET_MULTIPLE]: { sqlTypeName: SqlFieldType.NVARCHAR, fieldDisplayType: FieldDisplayType.ChoiceSetMultiple },
|
|
@@ -62443,6 +62487,7 @@ var FieldDisplayTypeToDataType = {
|
|
|
62443
62487
|
var ENTITY_FIELD_CONSTRAINT_DEFAULTS = {
|
|
62444
62488
|
STRING_LENGTH_LIMIT: 200,
|
|
62445
62489
|
MULTILINE_TEXT_LENGTH_LIMIT: 200,
|
|
62490
|
+
MULTILINE_MAX_LENGTH_LIMIT: 128 * 1024,
|
|
62446
62491
|
DECIMAL_LENGTH_LIMIT: 1000,
|
|
62447
62492
|
DECIMAL_PRECISION: 2,
|
|
62448
62493
|
BOOLEAN_LENGTH_LIMIT: 100,
|
|
@@ -62459,6 +62504,9 @@ var ENTITY_FIELD_CONSTRAINT_SPEC = {
|
|
|
62459
62504
|
[EntityFieldDataType.MULTILINE_TEXT]: {
|
|
62460
62505
|
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 1e4 }
|
|
62461
62506
|
},
|
|
62507
|
+
[EntityFieldDataType.MULTILINE_MAX]: {
|
|
62508
|
+
[EntityFieldConstraint.LengthLimit]: { min: 1, max: 128 * 1024 }
|
|
62509
|
+
},
|
|
62462
62510
|
[EntityFieldDataType.INTEGER]: {
|
|
62463
62511
|
[EntityFieldConstraint.MaxValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER },
|
|
62464
62512
|
[EntityFieldConstraint.MinValue]: { min: -Number.MAX_SAFE_INTEGER, max: Number.MAX_SAFE_INTEGER }
|
|
@@ -62495,7 +62543,8 @@ var EntityFieldTypeMap = {
|
|
|
62495
62543
|
[SqlFieldType.DATE]: EntityFieldDataType.DATE,
|
|
62496
62544
|
[SqlFieldType.BIT]: EntityFieldDataType.BOOLEAN,
|
|
62497
62545
|
[SqlFieldType.DECIMAL]: EntityFieldDataType.DECIMAL,
|
|
62498
|
-
[SqlFieldType.MULTILINE]: EntityFieldDataType.MULTILINE_TEXT
|
|
62546
|
+
[SqlFieldType.MULTILINE]: EntityFieldDataType.MULTILINE_TEXT,
|
|
62547
|
+
[SqlFieldType.MULTILINE_MAX]: EntityFieldDataType.MULTILINE_MAX
|
|
62499
62548
|
};
|
|
62500
62549
|
|
|
62501
62550
|
class EntityService extends BaseService {
|
|
@@ -62598,6 +62647,11 @@ class EntityService extends BaseService {
|
|
|
62598
62647
|
return entities;
|
|
62599
62648
|
}
|
|
62600
62649
|
async queryRecordsById(id, options) {
|
|
62650
|
+
if (options?.joins && options.joins.length > MAX_QUERY_JOINS) {
|
|
62651
|
+
throw new ValidationError3({
|
|
62652
|
+
message: `A maximum of ${MAX_QUERY_JOINS} joins is supported per query (received ${options.joins.length})`
|
|
62653
|
+
});
|
|
62654
|
+
}
|
|
62601
62655
|
const { folderKey, expansionLevel, ...rest } = options ?? {};
|
|
62602
62656
|
const downstreamOptions = options === undefined ? undefined : rest;
|
|
62603
62657
|
return PaginationHelpers.getAll({
|
|
@@ -62616,7 +62670,7 @@ class EntityService extends BaseService {
|
|
|
62616
62670
|
countParam: ENTITY_OFFSET_PARAMS.COUNT_PARAM
|
|
62617
62671
|
}
|
|
62618
62672
|
},
|
|
62619
|
-
excludeFromPrefix: ["filterGroup", "selectedFields", "sortOptions", "aggregates", "groupBy"]
|
|
62673
|
+
excludeFromPrefix: ["filterGroup", "selectedFields", "sortOptions", "aggregates", "groupBy", "joins"]
|
|
62620
62674
|
}, downstreamOptions);
|
|
62621
62675
|
}
|
|
62622
62676
|
async importRecordsById(id, file2, options) {
|
|
@@ -62846,7 +62900,7 @@ class EntityService extends BaseService {
|
|
|
62846
62900
|
this.validateFieldConstraints(fieldType, field, field.fieldName);
|
|
62847
62901
|
const isRelationship = fieldType === EntityFieldDataType.RELATIONSHIP;
|
|
62848
62902
|
const isFile = fieldType === EntityFieldDataType.FILE;
|
|
62849
|
-
if (
|
|
62903
|
+
if (isRelationship && (!field.referenceEntityId || !field.referenceFieldId)) {
|
|
62850
62904
|
throw new ValidationError3({
|
|
62851
62905
|
message: `Field '${field.fieldName}' of type ${fieldType} requires both referenceEntityId and referenceFieldId (UUIDs of the target entity and field).`
|
|
62852
62906
|
});
|
|
@@ -62872,9 +62926,9 @@ class EntityService extends BaseService {
|
|
|
62872
62926
|
...field.choiceSetId !== undefined && { choiceSetId: field.choiceSetId },
|
|
62873
62927
|
...(isRelationship || isFile) && { isForeignKey: true },
|
|
62874
62928
|
...isRelationship && { referenceType: ReferenceType.ManyToOne },
|
|
62875
|
-
|
|
62929
|
+
...!isFile && referenceEntityBody !== undefined && { referenceEntity: referenceEntityBody },
|
|
62876
62930
|
...referenceChoiceSetBody !== undefined && { referenceChoiceSet: referenceChoiceSetBody },
|
|
62877
|
-
|
|
62931
|
+
...!isFile && field.referenceFieldId !== undefined && { referenceField: { id: field.referenceFieldId } }
|
|
62878
62932
|
};
|
|
62879
62933
|
}
|
|
62880
62934
|
resolveFieldDataType(f) {
|
|
@@ -62919,6 +62973,8 @@ class EntityService extends BaseService {
|
|
|
62919
62973
|
return { lengthLimit: field.lengthLimit ?? defaults.STRING_LENGTH_LIMIT };
|
|
62920
62974
|
case EntityFieldDataType.MULTILINE_TEXT:
|
|
62921
62975
|
return { lengthLimit: field.lengthLimit ?? defaults.MULTILINE_TEXT_LENGTH_LIMIT };
|
|
62976
|
+
case EntityFieldDataType.MULTILINE_MAX:
|
|
62977
|
+
return { lengthLimit: field.lengthLimit ?? defaults.MULTILINE_MAX_LENGTH_LIMIT };
|
|
62922
62978
|
case EntityFieldDataType.DECIMAL:
|
|
62923
62979
|
return {
|
|
62924
62980
|
lengthLimit: defaults.DECIMAL_LENGTH_LIMIT,
|
|
@@ -63125,6 +63181,249 @@ __decorate([
|
|
|
63125
63181
|
__decorate([
|
|
63126
63182
|
track("Choicesets.DeleteValuesById")
|
|
63127
63183
|
], ChoiceSetService.prototype, "deleteValuesById", null);
|
|
63184
|
+
var DataFabricRoleType;
|
|
63185
|
+
(function(DataFabricRoleType2) {
|
|
63186
|
+
DataFabricRoleType2["System"] = "System";
|
|
63187
|
+
DataFabricRoleType2["UserDefined"] = "UserDefined";
|
|
63188
|
+
})(DataFabricRoleType || (DataFabricRoleType = {}));
|
|
63189
|
+
function isRecord$1(value) {
|
|
63190
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
63191
|
+
}
|
|
63192
|
+
function isDataFabricRole(value) {
|
|
63193
|
+
if (!isRecord$1(value)) {
|
|
63194
|
+
return false;
|
|
63195
|
+
}
|
|
63196
|
+
const { id, name, type, directoryEntityCount, folderId } = value;
|
|
63197
|
+
const hasValidDirectoryEntityCount = directoryEntityCount === undefined || directoryEntityCount === null || typeof directoryEntityCount === "number";
|
|
63198
|
+
const hasValidFolderId = folderId === undefined || typeof folderId === "string";
|
|
63199
|
+
return typeof id === "string" && typeof name === "string" && (type === DataFabricRoleType.System || type === DataFabricRoleType.UserDefined) && hasValidDirectoryEntityCount && hasValidFolderId;
|
|
63200
|
+
}
|
|
63201
|
+
function validateRolesResponse(data) {
|
|
63202
|
+
if (Array.isArray(data) && data.every(isDataFabricRole)) {
|
|
63203
|
+
return data;
|
|
63204
|
+
}
|
|
63205
|
+
throw new ServerError({
|
|
63206
|
+
message: "Invalid Data Fabric roles response format."
|
|
63207
|
+
});
|
|
63208
|
+
}
|
|
63209
|
+
|
|
63210
|
+
class DataFabricRoleService extends BaseService {
|
|
63211
|
+
async getAll(options = {}) {
|
|
63212
|
+
const params = createParams({
|
|
63213
|
+
stats: options.stats ?? true
|
|
63214
|
+
});
|
|
63215
|
+
const headers = createHeaders({ [FOLDER_KEY]: options.folderKey });
|
|
63216
|
+
const response = await this.get(DATA_FABRIC_ENDPOINTS.ROLES.GET_ALL, { params, headers });
|
|
63217
|
+
return validateRolesResponse(response.data);
|
|
63218
|
+
}
|
|
63219
|
+
}
|
|
63220
|
+
__decorate([
|
|
63221
|
+
track("DataFabricRoles.GetAll")
|
|
63222
|
+
], DataFabricRoleService.prototype, "getAll", null);
|
|
63223
|
+
var DataFabricDirectoryEntityType;
|
|
63224
|
+
(function(DataFabricDirectoryEntityType2) {
|
|
63225
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["User"] = 0] = "User";
|
|
63226
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["Group"] = 1] = "Group";
|
|
63227
|
+
DataFabricDirectoryEntityType2[DataFabricDirectoryEntityType2["Application"] = 2] = "Application";
|
|
63228
|
+
})(DataFabricDirectoryEntityType || (DataFabricDirectoryEntityType = {}));
|
|
63229
|
+
var DataFabricDirectoryEntityTypeName;
|
|
63230
|
+
(function(DataFabricDirectoryEntityTypeName2) {
|
|
63231
|
+
DataFabricDirectoryEntityTypeName2["User"] = "User";
|
|
63232
|
+
DataFabricDirectoryEntityTypeName2["Group"] = "Group";
|
|
63233
|
+
DataFabricDirectoryEntityTypeName2["Application"] = "Application";
|
|
63234
|
+
})(DataFabricDirectoryEntityTypeName || (DataFabricDirectoryEntityTypeName = {}));
|
|
63235
|
+
var DEFAULT_DIRECTORY_PAGE_SIZE = 100;
|
|
63236
|
+
var MAX_DIRECTORY_PAGE_SIZE = 100;
|
|
63237
|
+
function validateDirectoryListResponse(data) {
|
|
63238
|
+
if (data === null || typeof data !== "object" || Array.isArray(data)) {
|
|
63239
|
+
throw new ServerError({
|
|
63240
|
+
message: "Invalid Data Fabric directory response format."
|
|
63241
|
+
});
|
|
63242
|
+
}
|
|
63243
|
+
const response = data;
|
|
63244
|
+
if (typeof response.totalCount !== "number" || !Array.isArray(response.results)) {
|
|
63245
|
+
throw new ServerError({
|
|
63246
|
+
message: "Invalid Data Fabric directory response format."
|
|
63247
|
+
});
|
|
63248
|
+
}
|
|
63249
|
+
return {
|
|
63250
|
+
totalCount: response.totalCount,
|
|
63251
|
+
results: response.results
|
|
63252
|
+
};
|
|
63253
|
+
}
|
|
63254
|
+
function isRecord2(value) {
|
|
63255
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
63256
|
+
}
|
|
63257
|
+
function isDirectoryEntityTypeName(value) {
|
|
63258
|
+
return value === DataFabricDirectoryEntityTypeName.User || value === DataFabricDirectoryEntityTypeName.Group || value === DataFabricDirectoryEntityTypeName.Application;
|
|
63259
|
+
}
|
|
63260
|
+
function isDirectoryRole(value) {
|
|
63261
|
+
if (!isRecord2(value)) {
|
|
63262
|
+
return false;
|
|
63263
|
+
}
|
|
63264
|
+
return typeof value.id === "string" && typeof value.name === "string";
|
|
63265
|
+
}
|
|
63266
|
+
function normalizeDirectoryEntry(entry) {
|
|
63267
|
+
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))) {
|
|
63268
|
+
throw new ServerError({
|
|
63269
|
+
message: "Invalid Data Fabric directory entry response format."
|
|
63270
|
+
});
|
|
63271
|
+
}
|
|
63272
|
+
const normalized = {
|
|
63273
|
+
externalId: entry.externalId,
|
|
63274
|
+
name: entry.name,
|
|
63275
|
+
type: entry.type,
|
|
63276
|
+
roles: entry.roles ?? [],
|
|
63277
|
+
isUIEnabled: entry.isUIEnabled ?? true
|
|
63278
|
+
};
|
|
63279
|
+
if (entry.email !== undefined) {
|
|
63280
|
+
normalized.email = entry.email;
|
|
63281
|
+
}
|
|
63282
|
+
if (entry.objectType !== undefined) {
|
|
63283
|
+
normalized.objectType = entry.objectType;
|
|
63284
|
+
}
|
|
63285
|
+
return normalized;
|
|
63286
|
+
}
|
|
63287
|
+
function normalizePrincipalIds(principalIds) {
|
|
63288
|
+
const ids = Array.isArray(principalIds) ? principalIds : [principalIds];
|
|
63289
|
+
return [...new Set(ids.map((id) => id.trim()).filter(Boolean))];
|
|
63290
|
+
}
|
|
63291
|
+
function normalizeRoleIds(roleIds) {
|
|
63292
|
+
return [...new Set(roleIds.map((id) => id.trim()).filter(Boolean))];
|
|
63293
|
+
}
|
|
63294
|
+
function normalizePrincipalType(type) {
|
|
63295
|
+
if (typeof type === "number") {
|
|
63296
|
+
if (type === DataFabricDirectoryEntityType.User || type === DataFabricDirectoryEntityType.Group || type === DataFabricDirectoryEntityType.Application) {
|
|
63297
|
+
return type;
|
|
63298
|
+
}
|
|
63299
|
+
throw new ValidationError3({
|
|
63300
|
+
message: "Invalid Data Fabric principal type."
|
|
63301
|
+
});
|
|
63302
|
+
}
|
|
63303
|
+
switch (type) {
|
|
63304
|
+
case DataFabricDirectoryEntityTypeName.User:
|
|
63305
|
+
return DataFabricDirectoryEntityType.User;
|
|
63306
|
+
case DataFabricDirectoryEntityTypeName.Group:
|
|
63307
|
+
return DataFabricDirectoryEntityType.Group;
|
|
63308
|
+
case DataFabricDirectoryEntityTypeName.Application:
|
|
63309
|
+
return DataFabricDirectoryEntityType.Application;
|
|
63310
|
+
default:
|
|
63311
|
+
throw new ValidationError3({
|
|
63312
|
+
message: "Invalid Data Fabric principal type."
|
|
63313
|
+
});
|
|
63314
|
+
}
|
|
63315
|
+
}
|
|
63316
|
+
function roleIdsFromEntry(entry) {
|
|
63317
|
+
if (!entry) {
|
|
63318
|
+
return [];
|
|
63319
|
+
}
|
|
63320
|
+
return normalizeRoleIds(entry.roles.map((role) => role.id));
|
|
63321
|
+
}
|
|
63322
|
+
function clampDirectoryPageSize(pageSize) {
|
|
63323
|
+
return Math.max(1, Math.min(pageSize ?? DEFAULT_DIRECTORY_PAGE_SIZE, MAX_DIRECTORY_PAGE_SIZE));
|
|
63324
|
+
}
|
|
63325
|
+
|
|
63326
|
+
class DataFabricDirectoryService extends BaseService {
|
|
63327
|
+
async fetchAllEntries(options = {}) {
|
|
63328
|
+
const top = clampDirectoryPageSize(options.pageSize);
|
|
63329
|
+
const entries = [];
|
|
63330
|
+
let skip = 0;
|
|
63331
|
+
while (true) {
|
|
63332
|
+
const page = await this.list(skip === 0 ? { top } : { top, skip });
|
|
63333
|
+
entries.push(...page.results);
|
|
63334
|
+
if (page.results.length < top || page.totalCount !== undefined && entries.length >= page.totalCount) {
|
|
63335
|
+
return entries;
|
|
63336
|
+
}
|
|
63337
|
+
skip += top;
|
|
63338
|
+
}
|
|
63339
|
+
}
|
|
63340
|
+
async list(options = {}) {
|
|
63341
|
+
const params = createParams({
|
|
63342
|
+
skip: options.skip,
|
|
63343
|
+
top: clampDirectoryPageSize(options.top)
|
|
63344
|
+
});
|
|
63345
|
+
const response = await this.get(DATA_FABRIC_ENDPOINTS.DIRECTORY.GET_ALL, { params });
|
|
63346
|
+
const data = validateDirectoryListResponse(response.data);
|
|
63347
|
+
const results = data.results.map(normalizeDirectoryEntry);
|
|
63348
|
+
return {
|
|
63349
|
+
totalCount: data.totalCount,
|
|
63350
|
+
results
|
|
63351
|
+
};
|
|
63352
|
+
}
|
|
63353
|
+
async getAll(options = {}) {
|
|
63354
|
+
return this.fetchAllEntries(options);
|
|
63355
|
+
}
|
|
63356
|
+
async assignRoles(principalIds, principalType, roleIds, options = {}) {
|
|
63357
|
+
const normalizedPrincipalIds = normalizePrincipalIds(principalIds);
|
|
63358
|
+
const normalizedRoleIds = normalizeRoleIds(roleIds);
|
|
63359
|
+
if (normalizedPrincipalIds.length === 0) {
|
|
63360
|
+
throw new ValidationError3({ message: "At least one principal ID is required." });
|
|
63361
|
+
}
|
|
63362
|
+
if (normalizedRoleIds.length === 0) {
|
|
63363
|
+
throw new ValidationError3({ message: "At least one Data Fabric role ID is required." });
|
|
63364
|
+
}
|
|
63365
|
+
const type = normalizePrincipalType(principalType);
|
|
63366
|
+
const preserveExisting = options.preserveExisting ?? true;
|
|
63367
|
+
const existingById = new Map;
|
|
63368
|
+
if (preserveExisting) {
|
|
63369
|
+
for (const entry of await this.fetchAllEntries()) {
|
|
63370
|
+
existingById.set(entry.externalId.toLowerCase(), entry);
|
|
63371
|
+
}
|
|
63372
|
+
}
|
|
63373
|
+
return Promise.all(normalizedPrincipalIds.map(async (principalId) => {
|
|
63374
|
+
const existing = existingById.get(principalId.toLowerCase());
|
|
63375
|
+
const mergedRoleIds = preserveExisting ? normalizeRoleIds([...roleIdsFromEntry(existing), ...normalizedRoleIds]) : normalizedRoleIds;
|
|
63376
|
+
const payload = {
|
|
63377
|
+
directoryEntities: [
|
|
63378
|
+
{
|
|
63379
|
+
externalId: principalId,
|
|
63380
|
+
type,
|
|
63381
|
+
resolved: true
|
|
63382
|
+
}
|
|
63383
|
+
],
|
|
63384
|
+
roles: mergedRoleIds,
|
|
63385
|
+
isUIEnabled: options.uiEnabled ?? true
|
|
63386
|
+
};
|
|
63387
|
+
await this.post(DATA_FABRIC_ENDPOINTS.DIRECTORY.ASSIGN_ROLES, payload);
|
|
63388
|
+
return {
|
|
63389
|
+
principalId,
|
|
63390
|
+
roleIds: mergedRoleIds
|
|
63391
|
+
};
|
|
63392
|
+
}));
|
|
63393
|
+
}
|
|
63394
|
+
async revokeRoles(principalIds) {
|
|
63395
|
+
const normalizedPrincipalIds = normalizePrincipalIds(principalIds);
|
|
63396
|
+
if (normalizedPrincipalIds.length === 0) {
|
|
63397
|
+
throw new ValidationError3({ message: "At least one principal ID is required." });
|
|
63398
|
+
}
|
|
63399
|
+
const payload = {
|
|
63400
|
+
externalIds: normalizedPrincipalIds
|
|
63401
|
+
};
|
|
63402
|
+
await this.post(DATA_FABRIC_ENDPOINTS.DIRECTORY.REVOKE_ROLES, payload);
|
|
63403
|
+
}
|
|
63404
|
+
}
|
|
63405
|
+
__decorate([
|
|
63406
|
+
track("DataFabricDirectory.List")
|
|
63407
|
+
], DataFabricDirectoryService.prototype, "list", null);
|
|
63408
|
+
__decorate([
|
|
63409
|
+
track("DataFabricDirectory.GetAll")
|
|
63410
|
+
], DataFabricDirectoryService.prototype, "getAll", null);
|
|
63411
|
+
__decorate([
|
|
63412
|
+
track("DataFabricDirectory.AssignRoles")
|
|
63413
|
+
], DataFabricDirectoryService.prototype, "assignRoles", null);
|
|
63414
|
+
__decorate([
|
|
63415
|
+
track("DataFabricDirectory.RevokeRoles")
|
|
63416
|
+
], DataFabricDirectoryService.prototype, "revokeRoles", null);
|
|
63417
|
+
var InstanceStatsMap = {
|
|
63418
|
+
countOfAllInstances: "totalCount",
|
|
63419
|
+
countOfRunning: "runningCount",
|
|
63420
|
+
countOfTransitioning: "transitioningCount",
|
|
63421
|
+
countOfPaused: "pausedCount",
|
|
63422
|
+
countOfFaulted: "faultedCount",
|
|
63423
|
+
countOfCompleted: "completedCount",
|
|
63424
|
+
countOfCancelled: "cancelledCount",
|
|
63425
|
+
countOfDeleted: "deletedCount"
|
|
63426
|
+
};
|
|
63128
63427
|
function createProcessMethods(processData, service) {
|
|
63129
63428
|
return {
|
|
63130
63429
|
async getIncidents() {
|
|
@@ -63139,7 +63438,36 @@ function createProcessMethods(processData, service) {
|
|
|
63139
63438
|
throw new Error("Process key is undefined");
|
|
63140
63439
|
if (!processData.packageId)
|
|
63141
63440
|
throw new Error("Package ID is undefined");
|
|
63142
|
-
return service.getElementStats(
|
|
63441
|
+
return service.getElementStats({
|
|
63442
|
+
processKey: processData.processKey,
|
|
63443
|
+
packageId: processData.packageId,
|
|
63444
|
+
packageVersion,
|
|
63445
|
+
startTime,
|
|
63446
|
+
endTime
|
|
63447
|
+
});
|
|
63448
|
+
},
|
|
63449
|
+
getInstanceStats(startTime, endTime, packageVersion) {
|
|
63450
|
+
if (!processData.processKey)
|
|
63451
|
+
throw new Error("Process key is undefined");
|
|
63452
|
+
if (!processData.packageId)
|
|
63453
|
+
throw new Error("Package ID is undefined");
|
|
63454
|
+
return service.getInstanceStats({
|
|
63455
|
+
processKey: processData.processKey,
|
|
63456
|
+
packageId: processData.packageId,
|
|
63457
|
+
packageVersion,
|
|
63458
|
+
startTime,
|
|
63459
|
+
endTime
|
|
63460
|
+
});
|
|
63461
|
+
},
|
|
63462
|
+
getInstanceStatusTimeline(startTime, endTime, options) {
|
|
63463
|
+
if (!processData.processKey)
|
|
63464
|
+
throw new Error("Process key is undefined");
|
|
63465
|
+
return service.getInstanceStatusTimeline(startTime, endTime, { ...options, processKeys: [processData.processKey] });
|
|
63466
|
+
},
|
|
63467
|
+
getIncidentsTimeline(startTime, endTime, options) {
|
|
63468
|
+
if (!processData.processKey)
|
|
63469
|
+
throw new Error("Process key is undefined");
|
|
63470
|
+
return service.getIncidentsTimeline(startTime, endTime, { ...options, processKeys: [processData.processKey] });
|
|
63143
63471
|
}
|
|
63144
63472
|
};
|
|
63145
63473
|
}
|
|
@@ -63147,121 +63475,6 @@ function createProcessWithMethods(processData, service) {
|
|
|
63147
63475
|
const methods = createProcessMethods(processData, service);
|
|
63148
63476
|
return Object.assign({}, processData, methods);
|
|
63149
63477
|
}
|
|
63150
|
-
function buildInsightsTopBody(startTime, endTime, isCaseManagement, options) {
|
|
63151
|
-
return {
|
|
63152
|
-
commonParams: {
|
|
63153
|
-
startTime: startTime.getTime(),
|
|
63154
|
-
endTime: endTime.getTime(),
|
|
63155
|
-
isCaseManagement,
|
|
63156
|
-
...options?.packageId ? { packageId: options.packageId } : {},
|
|
63157
|
-
...options?.processKey ? { processKey: options.processKey } : {},
|
|
63158
|
-
...options?.version ? { version: options.version } : {}
|
|
63159
|
-
}
|
|
63160
|
-
};
|
|
63161
|
-
}
|
|
63162
|
-
async function fetchInstanceStatusTimeline(postFn, startTime, endTime, isCaseManagement, options) {
|
|
63163
|
-
const response = await postFn(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, {
|
|
63164
|
-
commonParams: {
|
|
63165
|
-
startTime: startTime.getTime(),
|
|
63166
|
-
endTime: endTime.getTime(),
|
|
63167
|
-
isCaseManagement
|
|
63168
|
-
},
|
|
63169
|
-
timeSliceUnit: options?.groupBy,
|
|
63170
|
-
timezoneOffset: new Date().getTimezoneOffset() * -1
|
|
63171
|
-
});
|
|
63172
|
-
return response.data ?? [];
|
|
63173
|
-
}
|
|
63174
|
-
function buildElementCountByStatusBody(processKey, packageId, startTime, endTime, packageVersion) {
|
|
63175
|
-
return {
|
|
63176
|
-
commonParams: {
|
|
63177
|
-
processKey,
|
|
63178
|
-
packageId,
|
|
63179
|
-
startTime: startTime.getTime(),
|
|
63180
|
-
endTime: endTime.getTime(),
|
|
63181
|
-
version: packageVersion
|
|
63182
|
-
}
|
|
63183
|
-
};
|
|
63184
|
-
}
|
|
63185
|
-
var ProcessIncidentMap = {
|
|
63186
|
-
errorTimeUtc: "errorTime"
|
|
63187
|
-
};
|
|
63188
|
-
var ProcessIncidentSummaryMap = {
|
|
63189
|
-
firstTimeUtc: "firstOccuranceTime"
|
|
63190
|
-
};
|
|
63191
|
-
|
|
63192
|
-
class BpmnHelpers {
|
|
63193
|
-
static parseBpmnElementsForIncidents(bpmnXml) {
|
|
63194
|
-
const elementInfo = {};
|
|
63195
|
-
try {
|
|
63196
|
-
const bpmnOpenTagRegex = /<bpmn:([A-Za-z][\w.-]*)\b[^>]*>/g;
|
|
63197
|
-
for (const tagMatch of bpmnXml.matchAll(bpmnOpenTagRegex)) {
|
|
63198
|
-
const [fullTag, elementType] = tagMatch;
|
|
63199
|
-
const idMatch = /\bid\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
63200
|
-
if (!idMatch) {
|
|
63201
|
-
continue;
|
|
63202
|
-
}
|
|
63203
|
-
const elementId = idMatch[1];
|
|
63204
|
-
const nameMatch = /\bname\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
63205
|
-
const name = nameMatch ? nameMatch[1] : "";
|
|
63206
|
-
const activityType = this.formatActivityTypeForIncidents(elementType);
|
|
63207
|
-
const activityName = name || elementId;
|
|
63208
|
-
elementInfo[elementId] = {
|
|
63209
|
-
type: activityType,
|
|
63210
|
-
name: activityName
|
|
63211
|
-
};
|
|
63212
|
-
}
|
|
63213
|
-
} catch (error52) {
|
|
63214
|
-
console.warn("Failed to parse BPMN XML for incidents:", error52);
|
|
63215
|
-
}
|
|
63216
|
-
return elementInfo;
|
|
63217
|
-
}
|
|
63218
|
-
static formatActivityTypeForIncidents(elementType) {
|
|
63219
|
-
return elementType.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
63220
|
-
}
|
|
63221
|
-
static async enrichIncidentsWithBpmnData(incidents, folderKey, service) {
|
|
63222
|
-
const uniqueInstanceIds = [...new Set(incidents.map((i) => i.instanceId))];
|
|
63223
|
-
if (uniqueInstanceIds.length === 1) {
|
|
63224
|
-
const elementInfo = await this.getBpmnElementInfo(uniqueInstanceIds[0], folderKey, service);
|
|
63225
|
-
return incidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
63226
|
-
} else {
|
|
63227
|
-
return this.enrichMultipleInstanceIncidents(incidents, folderKey, service);
|
|
63228
|
-
}
|
|
63229
|
-
}
|
|
63230
|
-
static async enrichMultipleInstanceIncidents(incidents, folderKey, service) {
|
|
63231
|
-
const groups = incidents.reduce((acc, incident) => {
|
|
63232
|
-
const id = incident.instanceId || NO_INSTANCE;
|
|
63233
|
-
(acc[id] = acc[id] || []).push(incident);
|
|
63234
|
-
return acc;
|
|
63235
|
-
}, {});
|
|
63236
|
-
const results = await Promise.all(Object.entries(groups).map(async (entry) => {
|
|
63237
|
-
const [instanceId, groupIncidents] = entry;
|
|
63238
|
-
const elementInfo = await this.getBpmnElementInfo(instanceId, folderKey, service);
|
|
63239
|
-
return groupIncidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
63240
|
-
}));
|
|
63241
|
-
return results.flat();
|
|
63242
|
-
}
|
|
63243
|
-
static async getBpmnElementInfo(instanceId, folderKey, service) {
|
|
63244
|
-
if (!instanceId || instanceId === NO_INSTANCE) {
|
|
63245
|
-
return {};
|
|
63246
|
-
}
|
|
63247
|
-
try {
|
|
63248
|
-
const bpmnXml = await service.getBpmn(instanceId, folderKey);
|
|
63249
|
-
return this.parseBpmnElementsForIncidents(bpmnXml);
|
|
63250
|
-
} catch (error52) {
|
|
63251
|
-
console.warn(`Failed to get BPMN for instance ${instanceId}:`, error52);
|
|
63252
|
-
return {};
|
|
63253
|
-
}
|
|
63254
|
-
}
|
|
63255
|
-
static transformIncidentWithBpmn(incident, elementInfo) {
|
|
63256
|
-
const element = elementInfo[incident.elementId];
|
|
63257
|
-
const transformed = transformData(incident, ProcessIncidentMap);
|
|
63258
|
-
return {
|
|
63259
|
-
...transformed,
|
|
63260
|
-
incidentElementActivityType: element?.type || UNKNOWN2,
|
|
63261
|
-
incidentElementActivityName: element?.name || UNKNOWN2
|
|
63262
|
-
};
|
|
63263
|
-
}
|
|
63264
|
-
}
|
|
63265
63478
|
function createProcessInstanceMethods(instanceData, service) {
|
|
63266
63479
|
return {
|
|
63267
63480
|
async cancel(options) {
|
|
@@ -63285,6 +63498,13 @@ function createProcessInstanceMethods(instanceData, service) {
|
|
|
63285
63498
|
throw new Error("Process instance folder key is undefined");
|
|
63286
63499
|
return service.resume(instanceData.instanceId, instanceData.folderKey, options);
|
|
63287
63500
|
},
|
|
63501
|
+
async retry(options) {
|
|
63502
|
+
if (!instanceData.instanceId)
|
|
63503
|
+
throw new Error("Process instance ID is undefined");
|
|
63504
|
+
if (!instanceData.folderKey)
|
|
63505
|
+
throw new Error("Process instance folder key is undefined");
|
|
63506
|
+
return service.retry(instanceData.instanceId, instanceData.folderKey, options);
|
|
63507
|
+
},
|
|
63288
63508
|
async getIncidents() {
|
|
63289
63509
|
if (!instanceData.instanceId)
|
|
63290
63510
|
throw new Error("Process instance ID is undefined");
|
|
@@ -63349,7 +63569,36 @@ function createCaseMethods(caseData, service) {
|
|
|
63349
63569
|
throw new Error("Process key is undefined");
|
|
63350
63570
|
if (!caseData.packageId)
|
|
63351
63571
|
throw new Error("Package ID is undefined");
|
|
63352
|
-
return service.getElementStats(
|
|
63572
|
+
return service.getElementStats({
|
|
63573
|
+
processKey: caseData.processKey,
|
|
63574
|
+
packageId: caseData.packageId,
|
|
63575
|
+
packageVersion,
|
|
63576
|
+
startTime,
|
|
63577
|
+
endTime
|
|
63578
|
+
});
|
|
63579
|
+
},
|
|
63580
|
+
getInstanceStats(startTime, endTime, packageVersion) {
|
|
63581
|
+
if (!caseData.processKey)
|
|
63582
|
+
throw new Error("Process key is undefined");
|
|
63583
|
+
if (!caseData.packageId)
|
|
63584
|
+
throw new Error("Package ID is undefined");
|
|
63585
|
+
return service.getInstanceStats({
|
|
63586
|
+
processKey: caseData.processKey,
|
|
63587
|
+
packageId: caseData.packageId,
|
|
63588
|
+
packageVersion,
|
|
63589
|
+
startTime,
|
|
63590
|
+
endTime
|
|
63591
|
+
});
|
|
63592
|
+
},
|
|
63593
|
+
getInstanceStatusTimeline(startTime, endTime, options) {
|
|
63594
|
+
if (!caseData.processKey)
|
|
63595
|
+
throw new Error("Process key is undefined");
|
|
63596
|
+
return service.getInstanceStatusTimeline(startTime, endTime, { ...options, processKeys: [caseData.processKey] });
|
|
63597
|
+
},
|
|
63598
|
+
getIncidentsTimeline(startTime, endTime, options) {
|
|
63599
|
+
if (!caseData.processKey)
|
|
63600
|
+
throw new Error("Process key is undefined");
|
|
63601
|
+
return service.getIncidentsTimeline(startTime, endTime, { ...options, processKeys: [caseData.processKey] });
|
|
63353
63602
|
}
|
|
63354
63603
|
};
|
|
63355
63604
|
}
|
|
@@ -63488,6 +63737,123 @@ var InstanceFinalStatus;
|
|
|
63488
63737
|
InstanceFinalStatus2["Faulted"] = "Faulted";
|
|
63489
63738
|
InstanceFinalStatus2["Cancelled"] = "Cancelled";
|
|
63490
63739
|
})(InstanceFinalStatus || (InstanceFinalStatus = {}));
|
|
63740
|
+
function buildInsightsTopBody(startTime, endTime, isCaseManagement, options) {
|
|
63741
|
+
return {
|
|
63742
|
+
commonParams: {
|
|
63743
|
+
startTime: startTime.getTime(),
|
|
63744
|
+
endTime: endTime.getTime(),
|
|
63745
|
+
isCaseManagement,
|
|
63746
|
+
...options?.packageId ? { packageId: options.packageId } : {},
|
|
63747
|
+
...options?.processKey ? { processKey: options.processKey } : {},
|
|
63748
|
+
...options?.version ? { version: options.version } : {}
|
|
63749
|
+
}
|
|
63750
|
+
};
|
|
63751
|
+
}
|
|
63752
|
+
function buildInsightsTimelineBody(startTime, endTime, isCaseManagement, options) {
|
|
63753
|
+
return {
|
|
63754
|
+
commonParams: {
|
|
63755
|
+
startTime: startTime.getTime(),
|
|
63756
|
+
endTime: endTime.getTime(),
|
|
63757
|
+
isCaseManagement,
|
|
63758
|
+
...options?.packageId ? { packageId: options.packageId } : {},
|
|
63759
|
+
...options?.version ? { version: options.version } : {},
|
|
63760
|
+
...options?.processKeys ? { processKeys: options.processKeys } : {}
|
|
63761
|
+
},
|
|
63762
|
+
timeSliceUnit: options?.groupBy ?? TimeInterval.Day,
|
|
63763
|
+
timezoneOffset: new Date().getTimezoneOffset() * -1
|
|
63764
|
+
};
|
|
63765
|
+
}
|
|
63766
|
+
function buildInsightsCommonBody(request) {
|
|
63767
|
+
return {
|
|
63768
|
+
commonParams: {
|
|
63769
|
+
processKey: request.processKey,
|
|
63770
|
+
packageId: request.packageId,
|
|
63771
|
+
startTime: request.startTime.getTime(),
|
|
63772
|
+
endTime: request.endTime.getTime(),
|
|
63773
|
+
version: request.packageVersion
|
|
63774
|
+
}
|
|
63775
|
+
};
|
|
63776
|
+
}
|
|
63777
|
+
var ProcessIncidentMap = {
|
|
63778
|
+
errorTimeUtc: "errorTime"
|
|
63779
|
+
};
|
|
63780
|
+
var ProcessIncidentSummaryMap = {
|
|
63781
|
+
firstTimeUtc: "firstOccuranceTime"
|
|
63782
|
+
};
|
|
63783
|
+
|
|
63784
|
+
class BpmnHelpers {
|
|
63785
|
+
static parseBpmnElementsForIncidents(bpmnXml) {
|
|
63786
|
+
const elementInfo = {};
|
|
63787
|
+
try {
|
|
63788
|
+
const bpmnOpenTagRegex = /<bpmn:([A-Za-z][\w.-]*)\b[^>]*>/g;
|
|
63789
|
+
for (const tagMatch of bpmnXml.matchAll(bpmnOpenTagRegex)) {
|
|
63790
|
+
const [fullTag, elementType] = tagMatch;
|
|
63791
|
+
const idMatch = /\bid\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
63792
|
+
if (!idMatch) {
|
|
63793
|
+
continue;
|
|
63794
|
+
}
|
|
63795
|
+
const elementId = idMatch[1];
|
|
63796
|
+
const nameMatch = /\bname\s*=\s*"([^"]*)"/.exec(fullTag);
|
|
63797
|
+
const name = nameMatch ? nameMatch[1] : "";
|
|
63798
|
+
const activityType = this.formatActivityTypeForIncidents(elementType);
|
|
63799
|
+
const activityName = name || elementId;
|
|
63800
|
+
elementInfo[elementId] = {
|
|
63801
|
+
type: activityType,
|
|
63802
|
+
name: activityName
|
|
63803
|
+
};
|
|
63804
|
+
}
|
|
63805
|
+
} catch (error52) {
|
|
63806
|
+
console.warn("Failed to parse BPMN XML for incidents:", error52);
|
|
63807
|
+
}
|
|
63808
|
+
return elementInfo;
|
|
63809
|
+
}
|
|
63810
|
+
static formatActivityTypeForIncidents(elementType) {
|
|
63811
|
+
return elementType.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
63812
|
+
}
|
|
63813
|
+
static async enrichIncidentsWithBpmnData(incidents, folderKey, service) {
|
|
63814
|
+
const uniqueInstanceIds = [...new Set(incidents.map((i) => i.instanceId))];
|
|
63815
|
+
if (uniqueInstanceIds.length === 1) {
|
|
63816
|
+
const elementInfo = await this.getBpmnElementInfo(uniqueInstanceIds[0], folderKey, service);
|
|
63817
|
+
return incidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
63818
|
+
} else {
|
|
63819
|
+
return this.enrichMultipleInstanceIncidents(incidents, folderKey, service);
|
|
63820
|
+
}
|
|
63821
|
+
}
|
|
63822
|
+
static async enrichMultipleInstanceIncidents(incidents, folderKey, service) {
|
|
63823
|
+
const groups = incidents.reduce((acc, incident) => {
|
|
63824
|
+
const id = incident.instanceId || NO_INSTANCE;
|
|
63825
|
+
(acc[id] = acc[id] || []).push(incident);
|
|
63826
|
+
return acc;
|
|
63827
|
+
}, {});
|
|
63828
|
+
const results = await Promise.all(Object.entries(groups).map(async (entry) => {
|
|
63829
|
+
const [instanceId, groupIncidents] = entry;
|
|
63830
|
+
const elementInfo = await this.getBpmnElementInfo(instanceId, folderKey, service);
|
|
63831
|
+
return groupIncidents.map((incident) => this.transformIncidentWithBpmn(incident, elementInfo));
|
|
63832
|
+
}));
|
|
63833
|
+
return results.flat();
|
|
63834
|
+
}
|
|
63835
|
+
static async getBpmnElementInfo(instanceId, folderKey, service) {
|
|
63836
|
+
if (!instanceId || instanceId === NO_INSTANCE) {
|
|
63837
|
+
return {};
|
|
63838
|
+
}
|
|
63839
|
+
try {
|
|
63840
|
+
const bpmnXml = await service.getBpmn(instanceId, folderKey);
|
|
63841
|
+
return this.parseBpmnElementsForIncidents(bpmnXml);
|
|
63842
|
+
} catch (error52) {
|
|
63843
|
+
console.warn(`Failed to get BPMN for instance ${instanceId}:`, error52);
|
|
63844
|
+
return {};
|
|
63845
|
+
}
|
|
63846
|
+
}
|
|
63847
|
+
static transformIncidentWithBpmn(incident, elementInfo) {
|
|
63848
|
+
const element = elementInfo[incident.elementId];
|
|
63849
|
+
const transformed = transformData(incident, ProcessIncidentMap);
|
|
63850
|
+
return {
|
|
63851
|
+
...transformed,
|
|
63852
|
+
incidentElementActivityType: element?.type || UNKNOWN2,
|
|
63853
|
+
incidentElementActivityName: element?.name || UNKNOWN2
|
|
63854
|
+
};
|
|
63855
|
+
}
|
|
63856
|
+
}
|
|
63491
63857
|
var ProcessInstanceMap = {
|
|
63492
63858
|
startedTimeUtc: "startedTime",
|
|
63493
63859
|
completedTimeUtc: "completedTime",
|
|
@@ -63599,6 +63965,15 @@ class ProcessInstancesService extends BaseService {
|
|
|
63599
63965
|
data: response.data
|
|
63600
63966
|
};
|
|
63601
63967
|
}
|
|
63968
|
+
async retry(instanceId, folderKey, options) {
|
|
63969
|
+
const response = await this.post(MAESTRO_ENDPOINTS.INSTANCES.RETRY(instanceId), options || {}, {
|
|
63970
|
+
headers: createHeaders({ [FOLDER_KEY]: folderKey })
|
|
63971
|
+
});
|
|
63972
|
+
return {
|
|
63973
|
+
success: true,
|
|
63974
|
+
data: response.data
|
|
63975
|
+
};
|
|
63976
|
+
}
|
|
63602
63977
|
parseBpmnVariables(bpmnXml) {
|
|
63603
63978
|
const variableMap = new Map;
|
|
63604
63979
|
const variableSourceMap = this.getVariableSource(bpmnXml);
|
|
@@ -63707,6 +64082,9 @@ __decorate([
|
|
|
63707
64082
|
__decorate([
|
|
63708
64083
|
track("ProcessInstances.Resume")
|
|
63709
64084
|
], ProcessInstancesService.prototype, "resume", null);
|
|
64085
|
+
__decorate([
|
|
64086
|
+
track("ProcessInstances.Retry")
|
|
64087
|
+
], ProcessInstancesService.prototype, "retry", null);
|
|
63710
64088
|
__decorate([
|
|
63711
64089
|
track("ProcessInstances.GetVariables")
|
|
63712
64090
|
], ProcessInstancesService.prototype, "getVariables", null);
|
|
@@ -63748,7 +64126,12 @@ class MaestroProcessesService extends BaseService {
|
|
|
63748
64126
|
}));
|
|
63749
64127
|
}
|
|
63750
64128
|
async getInstanceStatusTimeline(startTime, endTime, options) {
|
|
63751
|
-
|
|
64129
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, buildInsightsTimelineBody(startTime, endTime, false, options));
|
|
64130
|
+
return data ?? [];
|
|
64131
|
+
}
|
|
64132
|
+
async getIncidentsTimeline(startTime, endTime, options) {
|
|
64133
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INCIDENTS_BY_TIME_WINDOW, buildInsightsTimelineBody(startTime, endTime, false, options));
|
|
64134
|
+
return data?.dataPoints ?? [];
|
|
63752
64135
|
}
|
|
63753
64136
|
async getTopFaultedCount(startTime, endTime, options) {
|
|
63754
64137
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, false, options));
|
|
@@ -63763,10 +64146,14 @@ class MaestroProcessesService extends BaseService {
|
|
|
63763
64146
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, false, options));
|
|
63764
64147
|
return (data ?? []).map((process21) => ({ ...process21, name: process21.packageId }));
|
|
63765
64148
|
}
|
|
63766
|
-
async getElementStats(
|
|
63767
|
-
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS,
|
|
64149
|
+
async getElementStats(request) {
|
|
64150
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
63768
64151
|
return data ?? [];
|
|
63769
64152
|
}
|
|
64153
|
+
async getInstanceStats(request) {
|
|
64154
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
64155
|
+
return transformData(data, InstanceStatsMap);
|
|
64156
|
+
}
|
|
63770
64157
|
}
|
|
63771
64158
|
__decorate([
|
|
63772
64159
|
track("MaestroProcesses.GetAll")
|
|
@@ -63783,6 +64170,9 @@ __decorate([
|
|
|
63783
64170
|
__decorate([
|
|
63784
64171
|
track("MaestroProcesses.GetInstanceStatusTimeline")
|
|
63785
64172
|
], MaestroProcessesService.prototype, "getInstanceStatusTimeline", null);
|
|
64173
|
+
__decorate([
|
|
64174
|
+
track("MaestroProcesses.GetIncidentsTimeline")
|
|
64175
|
+
], MaestroProcessesService.prototype, "getIncidentsTimeline", null);
|
|
63786
64176
|
__decorate([
|
|
63787
64177
|
track("MaestroProcesses.GetTopFaultedCount")
|
|
63788
64178
|
], MaestroProcessesService.prototype, "getTopFaultedCount", null);
|
|
@@ -63792,6 +64182,9 @@ __decorate([
|
|
|
63792
64182
|
__decorate([
|
|
63793
64183
|
track("MaestroProcesses.GetElementStats")
|
|
63794
64184
|
], MaestroProcessesService.prototype, "getElementStats", null);
|
|
64185
|
+
__decorate([
|
|
64186
|
+
track("MaestroProcesses.GetInstanceStats")
|
|
64187
|
+
], MaestroProcessesService.prototype, "getInstanceStats", null);
|
|
63795
64188
|
|
|
63796
64189
|
class ProcessIncidentsService extends BaseService {
|
|
63797
64190
|
async getAll() {
|
|
@@ -63834,7 +64227,12 @@ class CasesService extends BaseService {
|
|
|
63834
64227
|
}));
|
|
63835
64228
|
}
|
|
63836
64229
|
async getInstanceStatusTimeline(startTime, endTime, options) {
|
|
63837
|
-
|
|
64230
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_STATUS_BY_DATE, buildInsightsTimelineBody(startTime, endTime, true, options));
|
|
64231
|
+
return data ?? [];
|
|
64232
|
+
}
|
|
64233
|
+
async getIncidentsTimeline(startTime, endTime, options) {
|
|
64234
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INCIDENTS_BY_TIME_WINDOW, buildInsightsTimelineBody(startTime, endTime, true, options));
|
|
64235
|
+
return data?.dataPoints ?? [];
|
|
63838
64236
|
}
|
|
63839
64237
|
async getTopFaultedCount(startTime, endTime, options) {
|
|
63840
64238
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_WITH_FAILURE, buildInsightsTopBody(startTime, endTime, true, options));
|
|
@@ -63849,10 +64247,14 @@ class CasesService extends BaseService {
|
|
|
63849
64247
|
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.TOP_PROCESSES_BY_DURATION, buildInsightsTopBody(startTime, endTime, true, options));
|
|
63850
64248
|
return (data ?? []).map((process21) => ({ ...process21, name: this.extractCaseName(process21.packageId) }));
|
|
63851
64249
|
}
|
|
63852
|
-
async getElementStats(
|
|
63853
|
-
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS,
|
|
64250
|
+
async getElementStats(request) {
|
|
64251
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.ELEMENT_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
63854
64252
|
return data ?? [];
|
|
63855
64253
|
}
|
|
64254
|
+
async getInstanceStats(request) {
|
|
64255
|
+
const { data } = await this.post(MAESTRO_ENDPOINTS.INSIGHTS.INSTANCE_COUNT_BY_STATUS, buildInsightsCommonBody(request));
|
|
64256
|
+
return transformData(data, InstanceStatsMap);
|
|
64257
|
+
}
|
|
63856
64258
|
extractCaseName(packageId) {
|
|
63857
64259
|
const caseManagementIndex = packageId.indexOf("CaseManagement.");
|
|
63858
64260
|
if (caseManagementIndex !== -1) {
|
|
@@ -63874,6 +64276,9 @@ __decorate([
|
|
|
63874
64276
|
__decorate([
|
|
63875
64277
|
track("Cases.GetInstanceStatusTimeline")
|
|
63876
64278
|
], CasesService.prototype, "getInstanceStatusTimeline", null);
|
|
64279
|
+
__decorate([
|
|
64280
|
+
track("Cases.GetIncidentsTimeline")
|
|
64281
|
+
], CasesService.prototype, "getIncidentsTimeline", null);
|
|
63877
64282
|
__decorate([
|
|
63878
64283
|
track("Cases.GetTopFaultedCount")
|
|
63879
64284
|
], CasesService.prototype, "getTopFaultedCount", null);
|
|
@@ -63883,6 +64288,9 @@ __decorate([
|
|
|
63883
64288
|
__decorate([
|
|
63884
64289
|
track("Cases.GetElementStats")
|
|
63885
64290
|
], CasesService.prototype, "getElementStats", null);
|
|
64291
|
+
__decorate([
|
|
64292
|
+
track("Cases.GetInstanceStats")
|
|
64293
|
+
], CasesService.prototype, "getInstanceStats", null);
|
|
63886
64294
|
var CaseInstanceMap = {
|
|
63887
64295
|
startedTimeUtc: "startedTime",
|
|
63888
64296
|
completedTimeUtc: "completedTime",
|
|
@@ -64015,6 +64423,7 @@ class TaskService extends BaseService {
|
|
|
64015
64423
|
const transformedTask = transformData(pascalToCamelCaseKeys(task), TaskMap);
|
|
64016
64424
|
return createTaskWithMethods(applyDataTransforms(transformedTask, { field: "status", valueMap: TaskStatusMap }), this);
|
|
64017
64425
|
};
|
|
64426
|
+
const apiOptions = options ? transformOptions(options, TaskMap) : options;
|
|
64018
64427
|
return PaginationHelpers.getAll({
|
|
64019
64428
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
64020
64429
|
getEndpoint: () => endpoint,
|
|
@@ -64031,7 +64440,7 @@ class TaskService extends BaseService {
|
|
|
64031
64440
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
64032
64441
|
}
|
|
64033
64442
|
}
|
|
64034
|
-
},
|
|
64443
|
+
}, apiOptions);
|
|
64035
64444
|
}
|
|
64036
64445
|
async getById(id, options = {}, folderId) {
|
|
64037
64446
|
const { taskType, ...restOptions } = options;
|
|
@@ -64043,8 +64452,8 @@ class TaskService extends BaseService {
|
|
|
64043
64452
|
}
|
|
64044
64453
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
64045
64454
|
const modifiedOptions = this.addDefaultExpand(restOptions);
|
|
64046
|
-
const
|
|
64047
|
-
const apiOptions = addPrefixToKeys(
|
|
64455
|
+
const apiFieldOptions = transformOptions(modifiedOptions, TaskMap);
|
|
64456
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
64048
64457
|
const response = await this.get(TASK_ENDPOINTS.GET_BY_ID(id), {
|
|
64049
64458
|
params: apiOptions,
|
|
64050
64459
|
headers
|
|
@@ -64509,7 +64918,7 @@ class FolderScopedService extends BaseService {
|
|
|
64509
64918
|
}
|
|
64510
64919
|
return response.data?.value;
|
|
64511
64920
|
}
|
|
64512
|
-
async getByNameLookup(resourceType, endpoint, name, options, transform3) {
|
|
64921
|
+
async getByNameLookup(resourceType, endpoint, name, options, transform3, responseFieldMap) {
|
|
64513
64922
|
const validatedName = validateName(resourceType, name);
|
|
64514
64923
|
const { folderId, folderKey, folderPath, ...queryOptions } = options;
|
|
64515
64924
|
const headers = resolveFolderHeaders({
|
|
@@ -64519,8 +64928,9 @@ class FolderScopedService extends BaseService {
|
|
|
64519
64928
|
resourceType: `${resourceType}.getByName`,
|
|
64520
64929
|
fallbackFolderKey: this.config.folderKey
|
|
64521
64930
|
});
|
|
64931
|
+
const apiFieldOptions = responseFieldMap ? transformOptions(queryOptions, responseFieldMap) : queryOptions;
|
|
64522
64932
|
const apiOptions = {
|
|
64523
|
-
...addPrefixToKeys(
|
|
64933
|
+
...addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions)),
|
|
64524
64934
|
$filter: `Name eq '${validatedName.replace(SINGLE_QUOTE_RE, "''")}'`,
|
|
64525
64935
|
$top: "1"
|
|
64526
64936
|
};
|
|
@@ -64570,6 +64980,7 @@ var AssetMap = {
|
|
|
64570
64980
|
class AssetService extends FolderScopedService {
|
|
64571
64981
|
async getAll(options) {
|
|
64572
64982
|
const transformAssetResponse = (asset) => transformData(pascalToCamelCaseKeys(asset), AssetMap);
|
|
64983
|
+
const apiOptions = options ? transformOptions(options, AssetMap) : options;
|
|
64573
64984
|
return PaginationHelpers.getAll({
|
|
64574
64985
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
64575
64986
|
getEndpoint: (folderId) => folderId ? ASSET_ENDPOINTS.GET_BY_FOLDER : ASSET_ENDPOINTS.GET_ALL,
|
|
@@ -64585,12 +64996,12 @@ class AssetService extends FolderScopedService {
|
|
|
64585
64996
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
64586
64997
|
}
|
|
64587
64998
|
}
|
|
64588
|
-
},
|
|
64999
|
+
}, apiOptions);
|
|
64589
65000
|
}
|
|
64590
65001
|
async getById(id, folderId, options = {}) {
|
|
64591
65002
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
64592
|
-
const
|
|
64593
|
-
const apiOptions = addPrefixToKeys(
|
|
65003
|
+
const apiFieldOptions = transformOptions(options, AssetMap);
|
|
65004
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
64594
65005
|
const response = await this.get(ASSET_ENDPOINTS.GET_BY_ID(id), {
|
|
64595
65006
|
headers,
|
|
64596
65007
|
params: apiOptions
|
|
@@ -64599,7 +65010,7 @@ class AssetService extends FolderScopedService {
|
|
|
64599
65010
|
return transformedAsset;
|
|
64600
65011
|
}
|
|
64601
65012
|
async getByName(name, options = {}) {
|
|
64602
|
-
return this.getByNameLookup("Asset", ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap));
|
|
65013
|
+
return this.getByNameLookup("Asset", ASSET_ENDPOINTS.GET_BY_FOLDER, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), AssetMap), AssetMap);
|
|
64603
65014
|
}
|
|
64604
65015
|
async updateValueById(id, newValue, options) {
|
|
64605
65016
|
if (!id) {
|
|
@@ -64738,6 +65149,7 @@ class BucketService extends FolderScopedService {
|
|
|
64738
65149
|
fallbackFolderKey: this.config.folderKey
|
|
64739
65150
|
});
|
|
64740
65151
|
const transformBlobItem = (item) => transformData(item, BucketMap);
|
|
65152
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
64741
65153
|
return PaginationHelpers.getAll({
|
|
64742
65154
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
64743
65155
|
getEndpoint: () => BUCKET_ENDPOINTS.GET_FILE_META_DATA(bucketId),
|
|
@@ -64753,7 +65165,7 @@ class BucketService extends FolderScopedService {
|
|
|
64753
65165
|
},
|
|
64754
65166
|
excludeFromPrefix: ["prefix"],
|
|
64755
65167
|
headers
|
|
64756
|
-
},
|
|
65168
|
+
}, apiRestOptions);
|
|
64757
65169
|
}
|
|
64758
65170
|
async uploadFile(bucketIdOrOptions, path5, content, options) {
|
|
64759
65171
|
let bucketId;
|
|
@@ -64828,9 +65240,10 @@ class BucketService extends FolderScopedService {
|
|
|
64828
65240
|
resourceType: "Buckets.getReadUri",
|
|
64829
65241
|
fallbackFolderKey: this.config.folderKey
|
|
64830
65242
|
});
|
|
65243
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
64831
65244
|
const queryOptions = {
|
|
64832
65245
|
expiryInMinutes,
|
|
64833
|
-
...addPrefixToKeys(
|
|
65246
|
+
...addPrefixToKeys(apiRestOptions, ODATA_PREFIX, Object.keys(apiRestOptions))
|
|
64834
65247
|
};
|
|
64835
65248
|
return this._getUri(BUCKET_ENDPOINTS.GET_READ_URI(bucketId), bucketId, resolvedPath, headers, queryOptions);
|
|
64836
65249
|
}
|
|
@@ -64884,6 +65297,7 @@ class BucketService extends FolderScopedService {
|
|
|
64884
65297
|
fallbackFolderKey: this.config.folderKey
|
|
64885
65298
|
});
|
|
64886
65299
|
const transformBucketFile = (file2) => transformData(pascalToCamelCaseKeys(file2), BucketMap);
|
|
65300
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
64887
65301
|
return PaginationHelpers.getAll({
|
|
64888
65302
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
64889
65303
|
getEndpoint: () => BUCKET_ENDPOINTS.GET_FILES(bucketId),
|
|
@@ -64900,7 +65314,7 @@ class BucketService extends FolderScopedService {
|
|
|
64900
65314
|
},
|
|
64901
65315
|
excludeFromPrefix: ["directory", "recursive", "fileNameRegex"],
|
|
64902
65316
|
headers
|
|
64903
|
-
}, { ...
|
|
65317
|
+
}, { ...apiRestOptions, directory: "/", recursive: true });
|
|
64904
65318
|
}
|
|
64905
65319
|
async deleteFile(bucketId, path5, options) {
|
|
64906
65320
|
if (!bucketId) {
|
|
@@ -64923,9 +65337,10 @@ class BucketService extends FolderScopedService {
|
|
|
64923
65337
|
}
|
|
64924
65338
|
async _getWriteUri(options) {
|
|
64925
65339
|
const { bucketId, path: path5, expiryInMinutes, headers, ...restOptions } = options;
|
|
65340
|
+
const apiRestOptions = transformOptions(restOptions, BucketMap);
|
|
64926
65341
|
const queryOptions = {
|
|
64927
65342
|
expiryInMinutes,
|
|
64928
|
-
...addPrefixToKeys(
|
|
65343
|
+
...addPrefixToKeys(apiRestOptions, ODATA_PREFIX, Object.keys(apiRestOptions))
|
|
64929
65344
|
};
|
|
64930
65345
|
return this._getUri(BUCKET_ENDPOINTS.GET_WRITE_URI(bucketId), bucketId, path5, headers, queryOptions);
|
|
64931
65346
|
}
|
|
@@ -65018,8 +65433,8 @@ class AttachmentService extends BaseService {
|
|
|
65018
65433
|
if (!id) {
|
|
65019
65434
|
throw new ValidationError3({ message: "id is required for getById" });
|
|
65020
65435
|
}
|
|
65021
|
-
const
|
|
65022
|
-
const apiOptions = addPrefixToKeys(
|
|
65436
|
+
const apiFieldOptions = transformOptions(options, { ...AttachmentsMap, ...BucketMap });
|
|
65437
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
65023
65438
|
const response = await this.get(ORCHESTRATOR_ATTACHMENT_ENDPOINTS.GET_BY_ID(id), {
|
|
65024
65439
|
params: apiOptions
|
|
65025
65440
|
});
|
|
@@ -65184,6 +65599,7 @@ class JobService extends FolderScopedService {
|
|
|
65184
65599
|
const rawJob = transformData(pascalToCamelCaseKeys(job), JobMap);
|
|
65185
65600
|
return createJobWithMethods(rawJob, this);
|
|
65186
65601
|
};
|
|
65602
|
+
const apiOptions = options ? transformOptions(options, JobMap) : options;
|
|
65187
65603
|
return PaginationHelpers.getAll({
|
|
65188
65604
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
65189
65605
|
getEndpoint: () => JOB_ENDPOINTS.GET_ALL,
|
|
@@ -65199,7 +65615,7 @@ class JobService extends FolderScopedService {
|
|
|
65199
65615
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
65200
65616
|
}
|
|
65201
65617
|
}
|
|
65202
|
-
},
|
|
65618
|
+
}, apiOptions);
|
|
65203
65619
|
}
|
|
65204
65620
|
async getById(id, folderId, options) {
|
|
65205
65621
|
if (!id) {
|
|
@@ -65209,8 +65625,8 @@ class JobService extends FolderScopedService {
|
|
|
65209
65625
|
throw new ValidationError3({ message: "folderId is required for getById" });
|
|
65210
65626
|
}
|
|
65211
65627
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
65212
|
-
const
|
|
65213
|
-
const apiOptions =
|
|
65628
|
+
const apiFieldOptions = options ? transformOptions(options, JobMap) : {};
|
|
65629
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
65214
65630
|
const response = await this.get(JOB_ENDPOINTS.GET_BY_KEY(id), {
|
|
65215
65631
|
params: apiOptions,
|
|
65216
65632
|
headers
|
|
@@ -65378,6 +65794,8 @@ var JobState;
|
|
|
65378
65794
|
JobState2["Stopped"] = "Stopped";
|
|
65379
65795
|
JobState2["Suspended"] = "Suspended";
|
|
65380
65796
|
JobState2["Resumed"] = "Resumed";
|
|
65797
|
+
JobState2["Cancelled"] = "Cancelled";
|
|
65798
|
+
JobState2["Unknown"] = "Unknown";
|
|
65381
65799
|
})(JobState || (JobState = {}));
|
|
65382
65800
|
var ProcessMap = {
|
|
65383
65801
|
lastModificationTime: "lastModifiedTime",
|
|
@@ -65396,6 +65814,7 @@ var ProcessMap = {
|
|
|
65396
65814
|
class ProcessService extends FolderScopedService {
|
|
65397
65815
|
async getAll(options) {
|
|
65398
65816
|
const transformProcessResponse = (process21) => transformData(pascalToCamelCaseKeys(process21), ProcessMap);
|
|
65817
|
+
const apiOptions = options ? transformOptions(options, ProcessMap) : options;
|
|
65399
65818
|
return PaginationHelpers.getAll({
|
|
65400
65819
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
65401
65820
|
getEndpoint: () => PROCESS_ENDPOINTS.GET_ALL,
|
|
@@ -65411,7 +65830,7 @@ class ProcessService extends FolderScopedService {
|
|
|
65411
65830
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
65412
65831
|
}
|
|
65413
65832
|
}
|
|
65414
|
-
},
|
|
65833
|
+
}, apiOptions);
|
|
65415
65834
|
}
|
|
65416
65835
|
async start(request, optionsOrFolderId, legacyOptions) {
|
|
65417
65836
|
let folderId;
|
|
@@ -65439,8 +65858,8 @@ class ProcessService extends FolderScopedService {
|
|
|
65439
65858
|
const requestBody = {
|
|
65440
65859
|
startInfo: apiRequest
|
|
65441
65860
|
};
|
|
65442
|
-
const
|
|
65443
|
-
const apiOptions = addPrefixToKeys(
|
|
65861
|
+
const apiFieldOptions = transformOptions(queryOptions, ProcessMap);
|
|
65862
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
65444
65863
|
const response = await this.post(PROCESS_ENDPOINTS.START_PROCESS, requestBody, {
|
|
65445
65864
|
params: apiOptions,
|
|
65446
65865
|
headers
|
|
@@ -65450,8 +65869,8 @@ class ProcessService extends FolderScopedService {
|
|
|
65450
65869
|
}
|
|
65451
65870
|
async getById(id, folderId, options = {}) {
|
|
65452
65871
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
65453
|
-
const
|
|
65454
|
-
const apiOptions = addPrefixToKeys(
|
|
65872
|
+
const apiFieldOptions = transformOptions(options, ProcessMap);
|
|
65873
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
65455
65874
|
const response = await this.get(PROCESS_ENDPOINTS.GET_BY_ID(id), {
|
|
65456
65875
|
headers,
|
|
65457
65876
|
params: apiOptions
|
|
@@ -65460,7 +65879,7 @@ class ProcessService extends FolderScopedService {
|
|
|
65460
65879
|
return transformedProcess;
|
|
65461
65880
|
}
|
|
65462
65881
|
async getByName(name, options = {}) {
|
|
65463
|
-
return this.getByNameLookup("Process", PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap));
|
|
65882
|
+
return this.getByNameLookup("Process", PROCESS_ENDPOINTS.GET_ALL, name, options, (raw) => transformData(pascalToCamelCaseKeys(raw), ProcessMap), ProcessMap);
|
|
65464
65883
|
}
|
|
65465
65884
|
}
|
|
65466
65885
|
__decorate([
|
|
@@ -65484,6 +65903,7 @@ var QueueMap = {
|
|
|
65484
65903
|
class QueueService extends FolderScopedService {
|
|
65485
65904
|
async getAll(options) {
|
|
65486
65905
|
const transformQueueResponse = (queue) => transformData(pascalToCamelCaseKeys(queue), QueueMap);
|
|
65906
|
+
const apiOptions = options ? transformOptions(options, QueueMap) : options;
|
|
65487
65907
|
return PaginationHelpers.getAll({
|
|
65488
65908
|
serviceAccess: this.createPaginationServiceAccess(),
|
|
65489
65909
|
getEndpoint: (folderId) => folderId ? QUEUE_ENDPOINTS.GET_BY_FOLDER : QUEUE_ENDPOINTS.GET_ALL,
|
|
@@ -65499,12 +65919,12 @@ class QueueService extends FolderScopedService {
|
|
|
65499
65919
|
countParam: ODATA_OFFSET_PARAMS.COUNT_PARAM
|
|
65500
65920
|
}
|
|
65501
65921
|
}
|
|
65502
|
-
},
|
|
65922
|
+
}, apiOptions);
|
|
65503
65923
|
}
|
|
65504
65924
|
async getById(id, folderId, options = {}) {
|
|
65505
65925
|
const headers = createHeaders({ [FOLDER_ID]: folderId });
|
|
65506
|
-
const
|
|
65507
|
-
const apiOptions = addPrefixToKeys(
|
|
65926
|
+
const apiFieldOptions = transformOptions(options, QueueMap);
|
|
65927
|
+
const apiOptions = addPrefixToKeys(apiFieldOptions, ODATA_PREFIX, Object.keys(apiFieldOptions));
|
|
65508
65928
|
const response = await this.get(QUEUE_ENDPOINTS.GET_BY_ID(id), {
|
|
65509
65929
|
headers,
|
|
65510
65930
|
params: apiOptions
|
|
@@ -65545,7 +65965,9 @@ class UiPath2 extends UiPath$1 {
|
|
|
65545
65965
|
}
|
|
65546
65966
|
get entities() {
|
|
65547
65967
|
return Object.assign(this.getService(EntityService), {
|
|
65548
|
-
choicesets: this.getService(ChoiceSetService)
|
|
65968
|
+
choicesets: this.getService(ChoiceSetService),
|
|
65969
|
+
roles: this.getService(DataFabricRoleService),
|
|
65970
|
+
directory: this.getService(DataFabricDirectoryService)
|
|
65549
65971
|
});
|
|
65550
65972
|
}
|
|
65551
65973
|
get tasks() {
|
|
@@ -65650,6 +66072,17 @@ var AgentErrorSortColumn;
|
|
|
65650
66072
|
AgentErrorSortColumn2["LastSeenFolderName"] = "LastSeenFolderName";
|
|
65651
66073
|
AgentErrorSortColumn2["LastSeenFolderPath"] = "LastSeenFolderPath";
|
|
65652
66074
|
})(AgentErrorSortColumn || (AgentErrorSortColumn = {}));
|
|
66075
|
+
var AgentType;
|
|
66076
|
+
(function(AgentType2) {
|
|
66077
|
+
AgentType2["Autonomous"] = "Autonomous";
|
|
66078
|
+
AgentType2["Conversational"] = "Conversational";
|
|
66079
|
+
AgentType2["Coded"] = "Coded";
|
|
66080
|
+
})(AgentType || (AgentType = {}));
|
|
66081
|
+
var AgentExecutionType;
|
|
66082
|
+
(function(AgentExecutionType2) {
|
|
66083
|
+
AgentExecutionType2["Debug"] = "Debug";
|
|
66084
|
+
AgentExecutionType2["Runtime"] = "Runtime";
|
|
66085
|
+
})(AgentExecutionType || (AgentExecutionType = {}));
|
|
65653
66086
|
var AgentMemoryExecutionType;
|
|
65654
66087
|
(function(AgentMemoryExecutionType2) {
|
|
65655
66088
|
AgentMemoryExecutionType2["Debug"] = "Debug";
|
|
@@ -65943,6 +66376,28 @@ var SpanAttachmentDirection;
|
|
|
65943
66376
|
SpanAttachmentDirection2["In"] = "In";
|
|
65944
66377
|
SpanAttachmentDirection2["Out"] = "Out";
|
|
65945
66378
|
})(SpanAttachmentDirection || (SpanAttachmentDirection = {}));
|
|
66379
|
+
var AgentGovernanceMode;
|
|
66380
|
+
(function(AgentGovernanceMode2) {
|
|
66381
|
+
AgentGovernanceMode2["Audit"] = "AUDIT";
|
|
66382
|
+
AgentGovernanceMode2["Enforce"] = "ENFORCE";
|
|
66383
|
+
AgentGovernanceMode2["Unknown"] = "Unknown";
|
|
66384
|
+
})(AgentGovernanceMode || (AgentGovernanceMode = {}));
|
|
66385
|
+
var AgentGovernanceVerdict;
|
|
66386
|
+
(function(AgentGovernanceVerdict2) {
|
|
66387
|
+
AgentGovernanceVerdict2["Allow"] = "ALLOW";
|
|
66388
|
+
AgentGovernanceVerdict2["Deny"] = "DENY";
|
|
66389
|
+
AgentGovernanceVerdict2["Unknown"] = "Unknown";
|
|
66390
|
+
})(AgentGovernanceVerdict || (AgentGovernanceVerdict = {}));
|
|
66391
|
+
var AgentGovernanceSection;
|
|
66392
|
+
(function(AgentGovernanceSection2) {
|
|
66393
|
+
AgentGovernanceSection2["Totals"] = "totals";
|
|
66394
|
+
AgentGovernanceSection2["Hook"] = "hook";
|
|
66395
|
+
AgentGovernanceSection2["Agent"] = "agent";
|
|
66396
|
+
AgentGovernanceSection2["Policy"] = "policy";
|
|
66397
|
+
AgentGovernanceSection2["Pack"] = "pack";
|
|
66398
|
+
AgentGovernanceSection2["Action"] = "action";
|
|
66399
|
+
AgentGovernanceSection2["Mode"] = "mode";
|
|
66400
|
+
})(AgentGovernanceSection || (AgentGovernanceSection = {}));
|
|
65946
66401
|
|
|
65947
66402
|
// src/api/createSdk.ts
|
|
65948
66403
|
var createSdk = async () => {
|
|
@@ -66466,4 +66921,4 @@ export {
|
|
|
66466
66921
|
metadata
|
|
66467
66922
|
};
|
|
66468
66923
|
|
|
66469
|
-
//# debugId=
|
|
66924
|
+
//# debugId=2D94742D82D7B6F064756E2164756E21
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/vertical-solutions-tool",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.198.0-preview.81",
|
|
5
5
|
"description": "Scaffold and generate Vertical Solution projects.",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d6a326ee051d553694b61f4923bcf1719d2e5110"
|
|
38
38
|
}
|