@vertexvis/api-client-node 0.33.2 → 0.35.0

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.
@@ -270,7 +270,12 @@ const createSceneItemBatch = ({ client, createSceneItemReqs: createItemReqs, fai
270
270
  const batchRes = yield Promise.all(batchOps.map((is) => limit(poll, is)));
271
271
  itemResults = batchRes.flatMap((b, i) => (0, queued_jobs_1.isBatch)(b.res)
272
272
  ? b.res['vertexvis/batch:results'].map((r, j) => {
273
- return { req: batchOps[i].ops[j].data, res: r };
273
+ return {
274
+ // `batchOps[i].ops[j].data` is guaranteed to be of type `CreateSceneItemRequestData`, as the
275
+ // `createSceneItems` used to construct operations only deals with this type of payload.
276
+ req: batchOps[i].ops[j].data,
277
+ res: r,
278
+ };
274
279
  })
275
280
  : []);
276
281
  itemErrors = itemErrors.concat(itemResults.filter((resultItem) => (0, utils_1.isApiError)(resultItem.res)));
@@ -279,9 +284,14 @@ const createSceneItemBatch = ({ client, createSceneItemReqs: createItemReqs, fai
279
284
  errors.forEach((error) => {
280
285
  console.log(error);
281
286
  error.ops.forEach((op) => {
282
- // `error.res` guaranteed to be non-null due to `isApiError()` condition above
283
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
284
- itemErrors.push({ req: op.data, res: error.res });
287
+ itemErrors.push({
288
+ // `op.data` is guaranteed to be of type `CreateSceneItemRequestData`, as the
289
+ // `createSceneItems` used to construct operations only deals with this type of payload.
290
+ req: op.data,
291
+ // `error.res` guaranteed to be non-null due to `isApiError()` condition above
292
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
293
+ res: error.res,
294
+ });
285
295
  });
286
296
  });
287
297
  return { batchOps, batchErrors, itemErrors, itemResults };
@@ -1 +1 @@
1
- export declare const version = "0.33.2";
1
+ export declare const version = "0.35.0";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- exports.version = '0.33.2';
4
+ exports.version = '0.35.0';