@miso.ai/server-sdk 0.6.6-beta.16 → 0.6.6-beta.17
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/package.json +2 -2
- package/src/api/helpers.js +2 -5
- package/src/stream/delete.js +4 -0
- package/src/version.js +1 -1
package/package.json
CHANGED
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"simonpai <simon.pai@askmiso.com>"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@miso.ai/server-commons": "0.6.6-beta.
|
|
19
|
+
"@miso.ai/server-commons": "0.6.6-beta.17",
|
|
20
20
|
"axios": "^1.6.2",
|
|
21
21
|
"axios-retry": "^4.5.0",
|
|
22
22
|
"dotenv": "^16.0.1",
|
|
23
23
|
"split2": "^4.1.0",
|
|
24
24
|
"yargs": "^17.5.1"
|
|
25
25
|
},
|
|
26
|
-
"version": "0.6.6-beta.
|
|
26
|
+
"version": "0.6.6-beta.17"
|
|
27
27
|
}
|
package/src/api/helpers.js
CHANGED
|
@@ -135,18 +135,15 @@ export function process422ResponseBody(payload, { data } = {}) {
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
export async function batchDelete(client, type, ids, options = {}) {
|
|
138
|
-
const url = buildUrl(client, `${type}/_delete`,
|
|
138
|
+
const url = buildUrl(client, `${type}/_delete`, options);
|
|
139
139
|
const payload = buildBatchDeletePayload(type, ids);
|
|
140
140
|
const { data } = await client._axios.post(url, payload);
|
|
141
141
|
return data;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export function buildUrl(client, path, {
|
|
144
|
+
export function buildUrl(client, path, { dryRun, params: extraParams } = {}) {
|
|
145
145
|
let { server, key } = client._options;
|
|
146
146
|
let params = `?api_key=${key}`;
|
|
147
|
-
if (async) {
|
|
148
|
-
params += '&async=1';
|
|
149
|
-
}
|
|
150
147
|
if (dryRun) {
|
|
151
148
|
params += '&dry_run=1';
|
|
152
149
|
}
|
package/src/stream/delete.js
CHANGED
|
@@ -11,6 +11,8 @@ export default class DeleteStream extends stream.BufferedWriteStream {
|
|
|
11
11
|
objectMode,
|
|
12
12
|
heartbeatInterval,
|
|
13
13
|
// sink
|
|
14
|
+
dryRun,
|
|
15
|
+
params,
|
|
14
16
|
recordsPerSecond,
|
|
15
17
|
// buffer
|
|
16
18
|
recordsPerRequest,
|
|
@@ -35,6 +37,8 @@ export default class DeleteStream extends stream.BufferedWriteStream {
|
|
|
35
37
|
|
|
36
38
|
this._sink = new DeleteSink(client, {
|
|
37
39
|
type,
|
|
40
|
+
dryRun,
|
|
41
|
+
params,
|
|
38
42
|
recordsPerSecond,
|
|
39
43
|
});
|
|
40
44
|
|
package/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '0.6.6-beta.
|
|
1
|
+
export default '0.6.6-beta.17';
|