@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.
@@ -263,7 +263,12 @@ export const createSceneItemBatch = ({ client, createSceneItemReqs: createItemRe
263
263
  const batchRes = yield Promise.all(batchOps.map((is) => limit(poll, is)));
264
264
  itemResults = batchRes.flatMap((b, i) => isBatch(b.res)
265
265
  ? b.res['vertexvis/batch:results'].map((r, j) => {
266
- return { req: batchOps[i].ops[j].data, res: r };
266
+ return {
267
+ // `batchOps[i].ops[j].data` is guaranteed to be of type `CreateSceneItemRequestData`, as the
268
+ // `createSceneItems` used to construct operations only deals with this type of payload.
269
+ req: batchOps[i].ops[j].data,
270
+ res: r,
271
+ };
267
272
  })
268
273
  : []);
269
274
  itemErrors = itemErrors.concat(itemResults.filter((resultItem) => isApiError(resultItem.res)));
@@ -272,9 +277,14 @@ export const createSceneItemBatch = ({ client, createSceneItemReqs: createItemRe
272
277
  errors.forEach((error) => {
273
278
  console.log(error);
274
279
  error.ops.forEach((op) => {
275
- // `error.res` guaranteed to be non-null due to `isApiError()` condition above
276
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
277
- itemErrors.push({ req: op.data, res: error.res });
280
+ itemErrors.push({
281
+ // `op.data` is guaranteed to be of type `CreateSceneItemRequestData`, as the
282
+ // `createSceneItems` used to construct operations only deals with this type of payload.
283
+ req: op.data,
284
+ // `error.res` guaranteed to be non-null due to `isApiError()` condition above
285
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
286
+ res: error.res,
287
+ });
278
288
  });
279
289
  });
280
290
  return { batchOps, batchErrors, itemErrors, itemResults };
@@ -1 +1 @@
1
- export declare const version = "0.33.2";
1
+ export declare const version = "0.35.0";
@@ -1 +1 @@
1
- export const version = '0.33.2';
1
+ export const version = '0.35.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertexvis/api-client-node",
3
- "version": "0.33.2",
3
+ "version": "0.35.0",
4
4
  "description": "The Vertex REST API client for Node.js.",
5
5
  "license": "MIT",
6
6
  "author": "Vertex Developers <support@vertexvis.com> (https://developer.vertexvis.com)",