rotacloud 2.0.1 → 2.0.3
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/ops.js +3 -3
- package/package.json +1 -1
- package/src/ops.ts +3 -3
package/dist/ops.js
CHANGED
|
@@ -86,7 +86,7 @@ function deleteBatchOp(ctx, ids) {
|
|
|
86
86
|
...ctx.request,
|
|
87
87
|
method: 'DELETE',
|
|
88
88
|
url: `${ctx.service.endpointVersion}/${ctx.service.endpoint}`,
|
|
89
|
-
data: ids,
|
|
89
|
+
data: { ids },
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
/** Operation for listing all entities on a v1 endpoint for a given query by
|
|
@@ -111,7 +111,7 @@ opts) {
|
|
|
111
111
|
yield* res.data.slice(0, maxEntities);
|
|
112
112
|
if (entityCount >= maxEntities)
|
|
113
113
|
return;
|
|
114
|
-
for (const pagedRequest of requestPaginated(res,
|
|
114
|
+
for (const pagedRequest of requestPaginated(res, queriedRequest)) {
|
|
115
115
|
const pagedRes = await ctx.client.request(pagedRequest);
|
|
116
116
|
for (const entity of pagedRes.data) {
|
|
117
117
|
yield entity;
|
|
@@ -201,7 +201,7 @@ opts) {
|
|
|
201
201
|
yield res;
|
|
202
202
|
if (entityCount >= maxEntities)
|
|
203
203
|
return;
|
|
204
|
-
for (const pagedRequest of requestPaginated(res,
|
|
204
|
+
for (const pagedRequest of requestPaginated(res, queriedRequest)) {
|
|
205
205
|
const pagedRes = await ctx.client.request(pagedRequest);
|
|
206
206
|
yield pagedRes;
|
|
207
207
|
entityCount += pagedRes.data.length;
|
package/package.json
CHANGED
package/src/ops.ts
CHANGED
|
@@ -273,7 +273,7 @@ function deleteBatchOp(ctx: OperationContext, ids: number[]): RequestConfig<unkn
|
|
|
273
273
|
...ctx.request,
|
|
274
274
|
method: 'DELETE',
|
|
275
275
|
url: `${ctx.service.endpointVersion}/${ctx.service.endpoint}`,
|
|
276
|
-
data: ids,
|
|
276
|
+
data: { ids },
|
|
277
277
|
};
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -303,7 +303,7 @@ export async function* listOp<T, Query>(
|
|
|
303
303
|
yield* res.data.slice(0, maxEntities);
|
|
304
304
|
if (entityCount >= maxEntities) return;
|
|
305
305
|
|
|
306
|
-
for (const pagedRequest of requestPaginated(res,
|
|
306
|
+
for (const pagedRequest of requestPaginated(res, queriedRequest)) {
|
|
307
307
|
const pagedRes = await ctx.client.request<T[]>(pagedRequest);
|
|
308
308
|
for (const entity of pagedRes.data) {
|
|
309
309
|
yield entity;
|
|
@@ -407,7 +407,7 @@ async function* listByPageOp<T, Query>(
|
|
|
407
407
|
yield res;
|
|
408
408
|
if (entityCount >= maxEntities) return;
|
|
409
409
|
|
|
410
|
-
for (const pagedRequest of requestPaginated(res,
|
|
410
|
+
for (const pagedRequest of requestPaginated(res, queriedRequest)) {
|
|
411
411
|
const pagedRes = await ctx.client.request<T[]>(pagedRequest);
|
|
412
412
|
yield pagedRes;
|
|
413
413
|
entityCount += pagedRes.data.length;
|