bruce-models 5.9.6 → 5.9.7

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.
@@ -4032,7 +4032,7 @@
4032
4032
  OrderBy: filter.orderBy,
4033
4033
  Filter: requestFilter,
4034
4034
  LODType: filter.lodCategoryId,
4035
- BruceEntityType: filter.entityTypeId,
4035
+ BruceEntityType: (!filter.entityTypeId ? null : filter.entityTypeId),
4036
4036
  PageIndex: filter.pageIndex,
4037
4037
  PageSize: filter.pageSize,
4038
4038
  historicKey: historicKey,
@@ -4084,7 +4084,7 @@
4084
4084
  urlParams.set("LODType", body.LODType);
4085
4085
  }
4086
4086
  if (body.BruceEntityType) {
4087
- urlParams.set("BruceEntityType", body.BruceEntityType);
4087
+ urlParams.set("BruceEntityType", typeof body.BruceEntityType == "string" ? body.BruceEntityType : body.BruceEntityType.join(","));
4088
4088
  }
4089
4089
  if (body.PageIndex) {
4090
4090
  urlParams.set("PageIndex", String(body.PageIndex));
@@ -4183,7 +4183,7 @@
4183
4183
  expandLocation,
4184
4184
  expandImports,
4185
4185
  expandSources,
4186
- entityTypeId: filter.entityTypeId,
4186
+ entityTypeId: typeof filter.entityTypeId == "string" ? filter.entityTypeId : filter.entityTypeId.join(","),
4187
4187
  historicFrom: historicFrom,
4188
4188
  historicKey: historicKey,
4189
4189
  historicTo: historicTo,
@@ -4202,12 +4202,40 @@
4202
4202
  nextPage = data.NextPage;
4203
4203
  nextPageUrl = data.NextPageURL;
4204
4204
  }
4205
+ // Callback to get the next page.
4206
+ let getNextPage;
4207
+ if (nextPage) {
4208
+ getNextPage = () => __awaiter(this, void 0, void 0, function* () {
4209
+ let urlStr = null;
4210
+ if (nextPageUrl.startsWith("http")) {
4211
+ urlStr = nextPageUrl;
4212
+ }
4213
+ else {
4214
+ urlStr = api.ConstructUrl({
4215
+ cdn: false,
4216
+ url: nextPageUrl
4217
+ });
4218
+ }
4219
+ const data = yield api.get(urlStr, exports.Api.PrepReqParams(reqParams));
4220
+ // Update URL so we can re-use the same function instance.
4221
+ nextPageUrl = data.NextPageURL;
4222
+ return {
4223
+ entities: data.Items,
4224
+ totalCount: data.TotalCount,
4225
+ imports: data.Imports,
4226
+ nextPage: data.NextPage,
4227
+ nextPageUrl: data.NextPageURL,
4228
+ getNextPage: nextPageUrl ? getNextPage : null
4229
+ };
4230
+ });
4231
+ }
4205
4232
  return {
4206
4233
  entities,
4207
4234
  totalCount,
4208
4235
  imports,
4209
4236
  nextPage,
4210
- nextPageUrl
4237
+ nextPageUrl,
4238
+ getNextPage
4211
4239
  };
4212
4240
  });
4213
4241
  }
@@ -15312,7 +15340,7 @@
15312
15340
  })(exports.Scenario || (exports.Scenario = {}));
15313
15341
 
15314
15342
  // This is updated with the package.json version on build.
15315
- const VERSION = "5.9.6";
15343
+ const VERSION = "5.9.7";
15316
15344
 
15317
15345
  exports.VERSION = VERSION;
15318
15346
  exports.AbstractApi = AbstractApi;