bruce-models 7.1.104 → 7.1.105

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.
@@ -91,6 +91,10 @@ var Api;
91
91
  ECacheKey["EntityHistoricDataPage"] = "entityhistoricdatapage";
92
92
  ECacheKey["AccountLimits"] = "accountlimits";
93
93
  ECacheKey["WorkflowType"] = "workflowtype";
94
+ ECacheKey["WorkflowStatus"] = "workflowstatus";
95
+ ECacheKey["WorkflowQueue"] = "workflowqueue";
96
+ ECacheKey["WorkflowItem"] = "workflowitem";
97
+ ECacheKey["WorkflowSchedule"] = "workflowschedule";
94
98
  })(ECacheKey = Api.ECacheKey || (Api.ECacheKey = {}));
95
99
  // 1 minute.
96
100
  Api.DEFAULT_CACHE_DURATION = 60 * 1000;
@@ -368,6 +372,7 @@ var AccountConcept;
368
372
  EConcept["WORKFLOW_ITEM_STATUS"] = "wis";
369
373
  EConcept["WORKFLOW_ITEM_TYPE"] = "wit";
370
374
  EConcept["WORKFLOW_QUEUE"] = "wq";
375
+ EConcept["WORKFLOW_SCHEDULE"] = "ws";
371
376
  })(EConcept = AccountConcept.EConcept || (AccountConcept.EConcept = {}));
372
377
  let EAction;
373
378
  (function (EAction) {
@@ -704,6 +709,16 @@ var RecordChangeFeed;
704
709
  return [Api.ECacheKey.ProjectView, Api.ECacheKey.ProjectViewBookmark];
705
710
  case AccountConcept.EConcept.RELATION_TYPE:
706
711
  return [Api.ECacheKey.RelationType];
712
+ case AccountConcept.EConcept.WORKFLOW_ITEM:
713
+ return [Api.ECacheKey.WorkflowItem];
714
+ case AccountConcept.EConcept.WORKFLOW_ITEM_STATUS:
715
+ return [Api.ECacheKey.WorkflowStatus, Api.ECacheKey.WorkflowType, Api.ECacheKey.WorkflowItem];
716
+ case AccountConcept.EConcept.WORKFLOW_ITEM_TYPE:
717
+ return [Api.ECacheKey.WorkflowType, Api.ECacheKey.WorkflowItem, Api.ECacheKey.WorkflowSchedule];
718
+ case AccountConcept.EConcept.WORKFLOW_QUEUE:
719
+ return [Api.ECacheKey.WorkflowQueue, Api.ECacheKey.WorkflowType, Api.ECacheKey.WorkflowItem, Api.ECacheKey.WorkflowSchedule];
720
+ case AccountConcept.EConcept.WORKFLOW_SCHEDULE:
721
+ return [Api.ECacheKey.WorkflowSchedule, Api.ECacheKey.WorkflowItem];
707
722
  case AccountConcept.EConcept.TILESET:
708
723
  return [Api.ECacheKey.Tileset, Api.ECacheKey.PublishTileset, Api.ECacheKey.TilesetAccess];
709
724
  case AccountConcept.EConcept.UI_ENTITY_DISPLAY_SETTING:
@@ -23979,6 +23994,367 @@ var UrlUtils;
23979
23994
  UrlUtils.ConstructUrl = ConstructUrl;
23980
23995
  })(UrlUtils || (UrlUtils = {}));
23981
23996
 
23997
+ var WorkflowItem;
23998
+ (function (WorkflowItem) {
23999
+ function Get(params) {
24000
+ return __awaiter(this, void 0, void 0, function* () {
24001
+ let { api, workflowItemId, req } = params;
24002
+ if (isInvalidId(workflowItemId)) {
24003
+ throw ("Workflow Item ID is required.");
24004
+ }
24005
+ if (!api) {
24006
+ api = ENVIRONMENT.Api().GetBruceApi();
24007
+ }
24008
+ const key = GetCacheKey(workflowItemId);
24009
+ const cache = api.GetCacheItem(key, req);
24010
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
24011
+ return cache.data;
24012
+ }
24013
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
24014
+ try {
24015
+ const data = yield api.GET(`workflow/item/${workflowItemId}`, Api.PrepReqParams(req));
24016
+ res({ workflowItem: ParseResponse(data) });
24017
+ }
24018
+ catch (e) {
24019
+ rej(e);
24020
+ }
24021
+ }));
24022
+ api.SetCacheItem({ key, value: request, req });
24023
+ return request;
24024
+ });
24025
+ }
24026
+ WorkflowItem.Get = Get;
24027
+ function GetList(params) {
24028
+ return __awaiter(this, void 0, void 0, function* () {
24029
+ if (!params) {
24030
+ params = {};
24031
+ }
24032
+ let { api, req } = params;
24033
+ if (!api) {
24034
+ api = ENVIRONMENT.Api().GetBruceApi();
24035
+ }
24036
+ const url = BuildListUrl(params);
24037
+ const key = GetListCacheKey(params);
24038
+ const cache = api.GetCacheItem(key, req);
24039
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
24040
+ return cache.data;
24041
+ }
24042
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
24043
+ try {
24044
+ const data = yield api.GET(url, Api.PrepReqParams(req));
24045
+ res(ParseListResponse(data));
24046
+ }
24047
+ catch (e) {
24048
+ rej(e);
24049
+ }
24050
+ }));
24051
+ api.SetCacheItem({ key, value: request, req });
24052
+ return request;
24053
+ });
24054
+ }
24055
+ WorkflowItem.GetList = GetList;
24056
+ function Create(params) {
24057
+ var _a, _b, _c, _d, _e;
24058
+ return __awaiter(this, void 0, void 0, function* () {
24059
+ let { api, workflowItemTypeId, entityTypeId, workflowItem, req } = params;
24060
+ if (!api) {
24061
+ api = ENVIRONMENT.Api().GetBruceApi();
24062
+ }
24063
+ if (!workflowItem) {
24064
+ workflowItem = {};
24065
+ }
24066
+ const typeId = (_c = (_b = (_a = workflowItemTypeId !== null && workflowItemTypeId !== void 0 ? workflowItemTypeId : workflowItem["Workflow.ItemType.ID"]) !== null && _a !== void 0 ? _a : workflowItem["ItemType.ID"]) !== null && _b !== void 0 ? _b : workflowItem.WorkflowItemTypeID) !== null && _c !== void 0 ? _c : workflowItem.ItemTypeID;
24067
+ if (isInvalidId(typeId)) {
24068
+ throw ("Workflow Item Type ID is required.");
24069
+ }
24070
+ const typePath = encodePath(typeId);
24071
+ const entityTypePath = encodePath((_d = entityTypeId !== null && entityTypeId !== void 0 ? entityTypeId : workflowItem["EntityType.ID"]) !== null && _d !== void 0 ? _d : "");
24072
+ const data = yield api.POST(`workflow/createnew/${typePath}/${entityTypePath}`, workflowItem, Api.PrepReqParams(req));
24073
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.WorkflowItem);
24074
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Entity);
24075
+ return {
24076
+ workflowItem: ParseResponse(data),
24077
+ entity: (_e = parseObject$6(data)) === null || _e === void 0 ? void 0 : _e.Entity
24078
+ };
24079
+ });
24080
+ }
24081
+ WorkflowItem.Create = Create;
24082
+ function Update(params) {
24083
+ return __awaiter(this, void 0, void 0, function* () {
24084
+ let { api, workflowItem, req } = params;
24085
+ if (!api) {
24086
+ api = ENVIRONMENT.Api().GetBruceApi();
24087
+ }
24088
+ if (!workflowItem) {
24089
+ workflowItem = {};
24090
+ }
24091
+ const id = workflowItem.ID && workflowItem.ID > 0 ? workflowItem.ID : 0;
24092
+ const data = yield api.POST(`workflow/item/${id}`, workflowItem, Api.PrepReqParams(req));
24093
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.WorkflowItem);
24094
+ if (workflowItem["Entity.ID"]) {
24095
+ api.Cache.RemoveByStartsWith(`${Api.ECacheKey.Entity}${Api.ECacheKey.Id}${workflowItem["Entity.ID"]}`);
24096
+ }
24097
+ return { workflowItem: ParseResponse(data) };
24098
+ });
24099
+ }
24100
+ WorkflowItem.Update = Update;
24101
+ function Delete(params) {
24102
+ return __awaiter(this, void 0, void 0, function* () {
24103
+ let { api, workflowItemId, req } = params;
24104
+ if (isInvalidId(workflowItemId)) {
24105
+ throw ("Workflow Item ID is required.");
24106
+ }
24107
+ if (!api) {
24108
+ api = ENVIRONMENT.Api().GetBruceApi();
24109
+ }
24110
+ yield api.DELETE(`workflow/item/${workflowItemId}`, Api.PrepReqParams(req));
24111
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.WorkflowItem);
24112
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.Entity);
24113
+ });
24114
+ }
24115
+ WorkflowItem.Delete = Delete;
24116
+ function BuildListUrl(params) {
24117
+ var _a;
24118
+ const q = new URLSearchParams();
24119
+ appendParam(q, "pageSize", params === null || params === void 0 ? void 0 : params.pageSize);
24120
+ appendParam(q, "pageIndex", params === null || params === void 0 ? void 0 : params.pageIndex);
24121
+ appendParam(q, "OrderBy", params === null || params === void 0 ? void 0 : params.orderBy);
24122
+ appendParam(q, "SortOrder", params === null || params === void 0 ? void 0 : params.sortOrder);
24123
+ appendParam(q, "statusend", params === null || params === void 0 ? void 0 : params.statusEnd);
24124
+ appendParam(q, "assignedtome", params === null || params === void 0 ? void 0 : params.assignedToMe);
24125
+ appendParam(q, "itemtypeid", params === null || params === void 0 ? void 0 : params.itemTypeId);
24126
+ appendParam(q, "queueid", params === null || params === void 0 ? void 0 : params.queueId);
24127
+ appendParam(q, "scheduleid", (_a = params === null || params === void 0 ? void 0 : params.scheduleId) !== null && _a !== void 0 ? _a : params === null || params === void 0 ? void 0 : params.workflowScheduleId);
24128
+ appendParam(q, "statusid", params === null || params === void 0 ? void 0 : params.statusId);
24129
+ appendParam(q, "CreatedByUserID", params === null || params === void 0 ? void 0 : params.createdByUserId);
24130
+ appendParam(q, "DueDate", params === null || params === void 0 ? void 0 : params.dueDate);
24131
+ appendParam(q, "DueDateFrom", params === null || params === void 0 ? void 0 : params.dueDateFrom);
24132
+ appendParam(q, "DueDateTo", params === null || params === void 0 ? void 0 : params.dueDateTo);
24133
+ appendParam(q, "SlideID", params === null || params === void 0 ? void 0 : params.slideId);
24134
+ appendParam(q, "EntityID", params === null || params === void 0 ? void 0 : params.entityId);
24135
+ appendParam(q, "SubjectEntityID", params === null || params === void 0 ? void 0 : params.subjectEntityId);
24136
+ appendParam(q, "Description", params === null || params === void 0 ? void 0 : params.description);
24137
+ appendParam(q, "Search", params === null || params === void 0 ? void 0 : params.search);
24138
+ const qs = q.toString();
24139
+ return qs ? `workflow/itemsquery?${qs}` : "workflow/itemsquery";
24140
+ }
24141
+ WorkflowItem.BuildListUrl = BuildListUrl;
24142
+ function ParseResponse(response) {
24143
+ var _a, _b, _c, _d;
24144
+ const parsed = parseObject$6(response);
24145
+ const parsedResult = (_a = parseObject$6(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24146
+ return (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.WorkflowItem) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.WorkflowItem) !== null && _c !== void 0 ? _c : parsedResult) !== null && _d !== void 0 ? _d : parsed;
24147
+ }
24148
+ WorkflowItem.ParseResponse = ParseResponse;
24149
+ function ParseListResponse(response) {
24150
+ var _a;
24151
+ const parsed = parseObject$6(response);
24152
+ const parsedResult = (_a = parseObject$6(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24153
+ const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
24154
+ const items = Array.isArray(source)
24155
+ ? source
24156
+ : Array.isArray(source === null || source === void 0 ? void 0 : source.Items)
24157
+ ? source.Items
24158
+ : [];
24159
+ return {
24160
+ items,
24161
+ totalCount: source === null || source === void 0 ? void 0 : source.TotalCount,
24162
+ nextPage: source === null || source === void 0 ? void 0 : source.NextPage,
24163
+ nextPageUrl: source === null || source === void 0 ? void 0 : source.NextPageURL
24164
+ };
24165
+ }
24166
+ WorkflowItem.ParseListResponse = ParseListResponse;
24167
+ function GetCacheKey(id) {
24168
+ return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.Id}${id}`;
24169
+ }
24170
+ WorkflowItem.GetCacheKey = GetCacheKey;
24171
+ function GetListCacheKey(params) {
24172
+ return `${Api.ECacheKey.WorkflowItem}${Api.ECacheKey.ListId}${BuildListUrl(params)}`;
24173
+ }
24174
+ WorkflowItem.GetListCacheKey = GetListCacheKey;
24175
+ })(WorkflowItem || (WorkflowItem = {}));
24176
+ function appendParam(q, key, value) {
24177
+ if (value == null || value === "") {
24178
+ return;
24179
+ }
24180
+ if (Array.isArray(value)) {
24181
+ if (value.length) {
24182
+ q.append(key, value.join(","));
24183
+ }
24184
+ return;
24185
+ }
24186
+ q.append(key, String(value));
24187
+ }
24188
+ function parseObject$6(data) {
24189
+ if (data == null || data == undefined) {
24190
+ return null;
24191
+ }
24192
+ if (typeof data == "string") {
24193
+ try {
24194
+ return JSON.parse(data);
24195
+ }
24196
+ catch (_a) {
24197
+ return null;
24198
+ }
24199
+ }
24200
+ return data;
24201
+ }
24202
+ function isInvalidId(id) {
24203
+ return id == null || id === "" || !isFinite(Number(id)) || Number(id) <= 0;
24204
+ }
24205
+ function encodePath(value) {
24206
+ return encodeURIComponent(String(value !== null && value !== void 0 ? value : ""));
24207
+ }
24208
+
24209
+ var WorkflowSchedule;
24210
+ (function (WorkflowSchedule) {
24211
+ function Get(params) {
24212
+ return __awaiter(this, void 0, void 0, function* () {
24213
+ let { api, workflowScheduleId, req } = params;
24214
+ if (isInvalidId$1(workflowScheduleId)) {
24215
+ throw ("Workflow Schedule ID is required.");
24216
+ }
24217
+ if (!api) {
24218
+ api = ENVIRONMENT.Api().GetBruceApi();
24219
+ }
24220
+ const key = GetCacheKey(workflowScheduleId);
24221
+ const cache = api.GetCacheItem(key, req);
24222
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
24223
+ return cache.data;
24224
+ }
24225
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
24226
+ try {
24227
+ const data = yield api.GET(`workflow/schedule/${workflowScheduleId}`, Api.PrepReqParams(req));
24228
+ res({ workflowSchedule: ParseResponse(data) });
24229
+ }
24230
+ catch (e) {
24231
+ rej(e);
24232
+ }
24233
+ }));
24234
+ api.SetCacheItem({ key, value: request, req });
24235
+ return request;
24236
+ });
24237
+ }
24238
+ WorkflowSchedule.Get = Get;
24239
+ function GetList(params) {
24240
+ return __awaiter(this, void 0, void 0, function* () {
24241
+ if (!params) {
24242
+ params = {};
24243
+ }
24244
+ let { api, req } = params;
24245
+ if (!api) {
24246
+ api = ENVIRONMENT.Api().GetBruceApi();
24247
+ }
24248
+ const key = GetListCacheKey();
24249
+ const cache = api.GetCacheItem(key, req);
24250
+ if (cache === null || cache === void 0 ? void 0 : cache.found) {
24251
+ return cache.data;
24252
+ }
24253
+ const request = new Promise((res, rej) => __awaiter(this, void 0, void 0, function* () {
24254
+ try {
24255
+ const data = yield api.GET("workflow/schedules", Api.PrepReqParams(req));
24256
+ res({ workflowSchedules: ParseListResponse(data) });
24257
+ }
24258
+ catch (e) {
24259
+ rej(e);
24260
+ }
24261
+ }));
24262
+ api.SetCacheItem({ key, value: request, req });
24263
+ return request;
24264
+ });
24265
+ }
24266
+ WorkflowSchedule.GetList = GetList;
24267
+ function Update(params) {
24268
+ return __awaiter(this, void 0, void 0, function* () {
24269
+ let { api, workflowSchedule, req } = params;
24270
+ if (!api) {
24271
+ api = ENVIRONMENT.Api().GetBruceApi();
24272
+ }
24273
+ if (!workflowSchedule) {
24274
+ workflowSchedule = {};
24275
+ }
24276
+ const id = workflowSchedule.ID && workflowSchedule.ID > 0 ? workflowSchedule.ID : 0;
24277
+ const data = yield api.POST(`workflow/schedule/${id}`, workflowSchedule, Api.PrepReqParams(req));
24278
+ const parsed = ParseResponse(data);
24279
+ api.Cache.Remove(GetListCacheKey());
24280
+ if (id > 0) {
24281
+ api.Cache.Remove(GetCacheKey(id));
24282
+ }
24283
+ if (parsed === null || parsed === void 0 ? void 0 : parsed.ID) {
24284
+ api.Cache.Remove(GetCacheKey(parsed.ID));
24285
+ }
24286
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.WorkflowItem);
24287
+ return { workflowSchedule: parsed };
24288
+ });
24289
+ }
24290
+ WorkflowSchedule.Update = Update;
24291
+ function Delete(params) {
24292
+ return __awaiter(this, void 0, void 0, function* () {
24293
+ let { api, workflowScheduleId, req } = params;
24294
+ if (isInvalidId$1(workflowScheduleId)) {
24295
+ throw ("Workflow Schedule ID is required.");
24296
+ }
24297
+ if (!api) {
24298
+ api = ENVIRONMENT.Api().GetBruceApi();
24299
+ }
24300
+ yield api.DELETE(`workflow/schedule/${workflowScheduleId}`, Api.PrepReqParams(req));
24301
+ api.Cache.Remove(GetCacheKey(workflowScheduleId));
24302
+ api.Cache.Remove(GetListCacheKey());
24303
+ api.Cache.RemoveByStartsWith(Api.ECacheKey.WorkflowItem);
24304
+ });
24305
+ }
24306
+ WorkflowSchedule.Delete = Delete;
24307
+ function ParseResponse(response) {
24308
+ var _a, _b, _c, _d;
24309
+ const parsed = parseObject$7(response);
24310
+ const parsedResult = (_a = parseObject$7(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24311
+ return (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.WorkflowSchedule) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.WorkflowSchedule) !== null && _c !== void 0 ? _c : parsedResult) !== null && _d !== void 0 ? _d : parsed;
24312
+ }
24313
+ WorkflowSchedule.ParseResponse = ParseResponse;
24314
+ function ParseListResponse(response) {
24315
+ var _a;
24316
+ const parsed = parseObject$7(response);
24317
+ const parsedResult = (_a = parseObject$7(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24318
+ const source = parsedResult !== null && parsedResult !== void 0 ? parsedResult : parsed;
24319
+ if (Array.isArray(source === null || source === void 0 ? void 0 : source.Items)) {
24320
+ return source.Items;
24321
+ }
24322
+ if (Array.isArray(source === null || source === void 0 ? void 0 : source.WorkflowSchedules)) {
24323
+ return source.WorkflowSchedules;
24324
+ }
24325
+ if (Array.isArray(source)) {
24326
+ return source;
24327
+ }
24328
+ return [];
24329
+ }
24330
+ WorkflowSchedule.ParseListResponse = ParseListResponse;
24331
+ function GetCacheKey(id) {
24332
+ return `${Api.ECacheKey.WorkflowSchedule}${Api.ECacheKey.Id}${id}`;
24333
+ }
24334
+ WorkflowSchedule.GetCacheKey = GetCacheKey;
24335
+ function GetListCacheKey() {
24336
+ return Api.ECacheKey.WorkflowSchedule;
24337
+ }
24338
+ WorkflowSchedule.GetListCacheKey = GetListCacheKey;
24339
+ })(WorkflowSchedule || (WorkflowSchedule = {}));
24340
+ function parseObject$7(data) {
24341
+ if (data == null || data == undefined) {
24342
+ return null;
24343
+ }
24344
+ if (typeof data == "string") {
24345
+ try {
24346
+ return JSON.parse(data);
24347
+ }
24348
+ catch (_a) {
24349
+ return null;
24350
+ }
24351
+ }
24352
+ return data;
24353
+ }
24354
+ function isInvalidId$1(id) {
24355
+ return id == null || id === "" || !isFinite(Number(id)) || Number(id) <= 0;
24356
+ }
24357
+
23982
24358
  /**
23983
24359
  * Describes the "Workflow Type" concept within Nextspace.
23984
24360
  * The API names this record Workflow Item Type.
@@ -23992,7 +24368,7 @@ var WorkflowType;
23992
24368
  function Get(params) {
23993
24369
  return __awaiter(this, void 0, void 0, function* () {
23994
24370
  let { api, workflowTypeId, req: reqParams } = params;
23995
- if (isInvalidId(workflowTypeId)) {
24371
+ if (isInvalidId$2(workflowTypeId)) {
23996
24372
  throw ("Workflow Type ID is required.");
23997
24373
  }
23998
24374
  if (!api) {
@@ -24098,7 +24474,7 @@ var WorkflowType;
24098
24474
  function Delete(params) {
24099
24475
  return __awaiter(this, void 0, void 0, function* () {
24100
24476
  let { api, workflowTypeId, req: reqParams } = params;
24101
- if (isInvalidId(workflowTypeId)) {
24477
+ if (isInvalidId$2(workflowTypeId)) {
24102
24478
  throw ("Workflow Type ID is required.");
24103
24479
  }
24104
24480
  if (!api) {
@@ -24118,7 +24494,7 @@ var WorkflowType;
24118
24494
  function GetStatuses(params) {
24119
24495
  return __awaiter(this, void 0, void 0, function* () {
24120
24496
  let { api, workflowTypeId, req: reqParams } = params;
24121
- if (isInvalidId(workflowTypeId)) {
24497
+ if (isInvalidId$2(workflowTypeId)) {
24122
24498
  throw ("Workflow Type ID is required.");
24123
24499
  }
24124
24500
  if (!api) {
@@ -24156,7 +24532,7 @@ var WorkflowType;
24156
24532
  function AddStatuses(params) {
24157
24533
  return __awaiter(this, void 0, void 0, function* () {
24158
24534
  let { api, workflowTypeId, workflowStatusIds, req: reqParams } = params;
24159
- if (isInvalidId(workflowTypeId)) {
24535
+ if (isInvalidId$2(workflowTypeId)) {
24160
24536
  throw ("Workflow Type ID is required.");
24161
24537
  }
24162
24538
  if (!(workflowStatusIds === null || workflowStatusIds === void 0 ? void 0 : workflowStatusIds.length)) {
@@ -24180,7 +24556,7 @@ var WorkflowType;
24180
24556
  function RemoveStatuses(params) {
24181
24557
  return __awaiter(this, void 0, void 0, function* () {
24182
24558
  let { api, workflowTypeId, workflowStatusIds, req: reqParams } = params;
24183
- if (isInvalidId(workflowTypeId)) {
24559
+ if (isInvalidId$2(workflowTypeId)) {
24184
24560
  throw ("Workflow Type ID is required.");
24185
24561
  }
24186
24562
  if (!(workflowStatusIds === null || workflowStatusIds === void 0 ? void 0 : workflowStatusIds.length)) {
@@ -24202,8 +24578,8 @@ var WorkflowType;
24202
24578
  */
24203
24579
  function ParseResponse(response) {
24204
24580
  var _a, _b, _c, _d, _e, _f, _g, _h;
24205
- const parsed = parseObject$6(response);
24206
- const parsedResult = (_a = parseObject$6(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24581
+ const parsed = parseObject$8(response);
24582
+ const parsedResult = (_a = parseObject$8(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24207
24583
  return (_h = (_g = (_f = (_e = (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.WorkflowType) !== null && _b !== void 0 ? _b : parsed === null || parsed === void 0 ? void 0 : parsed.WorkflowItemType) !== null && _c !== void 0 ? _c : parsed === null || parsed === void 0 ? void 0 : parsed.BruceWorkflowItemType) !== null && _d !== void 0 ? _d : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.WorkflowType) !== null && _e !== void 0 ? _e : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.WorkflowItemType) !== null && _f !== void 0 ? _f : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.BruceWorkflowItemType) !== null && _g !== void 0 ? _g : parsedResult) !== null && _h !== void 0 ? _h : parsed;
24208
24584
  }
24209
24585
  WorkflowType.ParseResponse = ParseResponse;
@@ -24250,7 +24626,7 @@ var WorkflowType;
24250
24626
  })(WorkflowType || (WorkflowType = {}));
24251
24627
  // Alias that mirrors the API route/model wording.
24252
24628
  var WorkflowItemType = WorkflowType;
24253
- function parseObject$6(data) {
24629
+ function parseObject$8(data) {
24254
24630
  if (data == null || data == undefined) {
24255
24631
  return null;
24256
24632
  }
@@ -24264,13 +24640,13 @@ function parseObject$6(data) {
24264
24640
  }
24265
24641
  return data;
24266
24642
  }
24267
- function isInvalidId(id) {
24643
+ function isInvalidId$2(id) {
24268
24644
  return id == null || id === "" || !isFinite(Number(id)) || Number(id) <= 0;
24269
24645
  }
24270
24646
  function parseList(response, wrapperKeys) {
24271
24647
  var _a, _b, _c, _d, _e, _f;
24272
- const parsed = parseObject$6(response);
24273
- const parsedResult = (_a = parseObject$6(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24648
+ const parsed = parseObject$8(response);
24649
+ const parsedResult = (_a = parseObject$8(parsed === null || parsed === void 0 ? void 0 : parsed.Result)) !== null && _a !== void 0 ? _a : parsed === null || parsed === void 0 ? void 0 : parsed.Result;
24274
24650
  const list = (_f = (_e = (_d = (_c = (_b = parsed === null || parsed === void 0 ? void 0 : parsed.Items) !== null && _b !== void 0 ? _b : parsedResult === null || parsedResult === void 0 ? void 0 : parsedResult.Items) !== null && _c !== void 0 ? _c : getFirstWrappedArray(parsed, wrapperKeys)) !== null && _d !== void 0 ? _d : getFirstWrappedArray(parsedResult, wrapperKeys)) !== null && _e !== void 0 ? _e : parsedResult) !== null && _f !== void 0 ? _f : parsed;
24275
24651
  if (Array.isArray(list)) {
24276
24652
  return list;
@@ -24290,7 +24666,7 @@ function getFirstWrappedArray(data, wrapperKeys) {
24290
24666
  }
24291
24667
 
24292
24668
  // This is updated with the package.json version on build.
24293
- const VERSION = "7.1.104";
24669
+ const VERSION = "7.1.105";
24294
24670
 
24295
- export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, RequestLane, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, WorkflowType, WorkflowItemType };
24671
+ export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, RequestLane, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, WorkflowItem, WorkflowSchedule, WorkflowType, WorkflowItemType };
24296
24672
  //# sourceMappingURL=bruce-models.es5.js.map