minikai 1.17.1 → 1.19.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.
- package/README.md +391 -1
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/labels/client/Client.js +4 -4
- package/dist/cjs/api/resources/minis/client/Client.d.ts +8 -1
- package/dist/cjs/api/resources/minis/client/Client.js +58 -15
- package/dist/cjs/api/resources/records/client/Client.d.ts +1 -8
- package/dist/cjs/api/resources/records/client/Client.js +32 -38
- package/dist/cjs/api/resources/skills/client/Client.d.ts +7 -0
- package/dist/cjs/api/resources/skills/client/Client.js +54 -11
- package/dist/cjs/api/resources/users/client/Client.js +1 -1
- package/dist/cjs/api/types/StringSegment.d.ts +7 -0
- package/dist/cjs/api/types/StringSegment.js +3 -0
- package/dist/cjs/api/types/index.d.ts +1 -0
- package/dist/cjs/api/types/index.js +1 -0
- package/dist/cjs/environments.d.ts +3 -2
- package/dist/cjs/environments.js +2 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/labels/client/Client.mjs +4 -4
- package/dist/esm/api/resources/minis/client/Client.d.mts +8 -1
- package/dist/esm/api/resources/minis/client/Client.mjs +58 -15
- package/dist/esm/api/resources/records/client/Client.d.mts +1 -8
- package/dist/esm/api/resources/records/client/Client.mjs +32 -38
- package/dist/esm/api/resources/skills/client/Client.d.mts +7 -0
- package/dist/esm/api/resources/skills/client/Client.mjs +54 -11
- package/dist/esm/api/resources/users/client/Client.mjs +1 -1
- package/dist/esm/api/types/StringSegment.d.mts +7 -0
- package/dist/esm/api/types/StringSegment.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +1 -0
- package/dist/esm/api/types/index.mjs +1 -0
- package/dist/esm/environments.d.mts +3 -2
- package/dist/esm/environments.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +144 -2
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@ The Minikai TypeScript library provides convenient access to the Minikai APIs fr
|
|
|
14
14
|
- [Request and Response Types](#request-and-response-types)
|
|
15
15
|
- [Exception Handling](#exception-handling)
|
|
16
16
|
- [File Uploads](#file-uploads)
|
|
17
|
+
- [Binary Response](#binary-response)
|
|
17
18
|
- [Advanced](#advanced)
|
|
18
19
|
- [Subpackage Exports](#subpackage-exports)
|
|
19
20
|
- [Additional Headers](#additional-headers)
|
|
@@ -59,7 +60,7 @@ This SDK allows you to configure different environments for API requests.
|
|
|
59
60
|
import { MinikaiClient, MinikaiEnvironment } from "minikai";
|
|
60
61
|
|
|
61
62
|
const client = new MinikaiClient({
|
|
62
|
-
environment: MinikaiEnvironment.
|
|
63
|
+
environment: MinikaiEnvironment.Australia,
|
|
63
64
|
});
|
|
64
65
|
```
|
|
65
66
|
|
|
@@ -140,6 +141,395 @@ The metadata is used to set the `Content-Length`, `Content-Type`, and `Content-D
|
|
|
140
141
|
For example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.
|
|
141
142
|
|
|
142
143
|
|
|
144
|
+
## Binary Response
|
|
145
|
+
|
|
146
|
+
You can consume binary data from endpoints using the `BinaryResponse` type which lets you choose how to consume the data:
|
|
147
|
+
|
|
148
|
+
```typescript
|
|
149
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
150
|
+
const stream: ReadableStream<Uint8Array> = response.stream();
|
|
151
|
+
// const arrayBuffer: ArrayBuffer = await response.arrayBuffer();
|
|
152
|
+
// const blob: Blob = response.blob();
|
|
153
|
+
// const bytes: Uint8Array = response.bytes();
|
|
154
|
+
// You can only use the response body once, so you must choose one of the above methods.
|
|
155
|
+
// If you want to check if the response body has been used, you can use the following property.
|
|
156
|
+
const bodyUsed = response.bodyUsed;
|
|
157
|
+
```
|
|
158
|
+
<details>
|
|
159
|
+
<summary>Save binary response to a file</summary>
|
|
160
|
+
|
|
161
|
+
<blockquote>
|
|
162
|
+
<details>
|
|
163
|
+
<summary>Node.js</summary>
|
|
164
|
+
|
|
165
|
+
<blockquote>
|
|
166
|
+
<details>
|
|
167
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
import { createWriteStream } from 'fs';
|
|
171
|
+
import { Readable } from 'stream';
|
|
172
|
+
import { pipeline } from 'stream/promises';
|
|
173
|
+
|
|
174
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
175
|
+
|
|
176
|
+
const stream = response.stream();
|
|
177
|
+
const nodeStream = Readable.fromWeb(stream);
|
|
178
|
+
const writeStream = createWriteStream('path/to/file');
|
|
179
|
+
|
|
180
|
+
await pipeline(nodeStream, writeStream);
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
</details>
|
|
184
|
+
</blockquote>
|
|
185
|
+
|
|
186
|
+
<blockquote>
|
|
187
|
+
<details>
|
|
188
|
+
<summary>ArrayBuffer</summary>
|
|
189
|
+
|
|
190
|
+
```ts
|
|
191
|
+
import { writeFile } from 'fs/promises';
|
|
192
|
+
|
|
193
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
194
|
+
|
|
195
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
196
|
+
await writeFile('path/to/file', Buffer.from(arrayBuffer));
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
</details>
|
|
200
|
+
</blockquote>
|
|
201
|
+
|
|
202
|
+
<blockquote>
|
|
203
|
+
<details>
|
|
204
|
+
<summary>Blob</summary>
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
import { writeFile } from 'fs/promises';
|
|
208
|
+
|
|
209
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
210
|
+
|
|
211
|
+
const blob = await response.blob();
|
|
212
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
213
|
+
await writeFile('output.bin', Buffer.from(arrayBuffer));
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
</details>
|
|
217
|
+
</blockquote>
|
|
218
|
+
|
|
219
|
+
<blockquote>
|
|
220
|
+
<details>
|
|
221
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
import { writeFile } from 'fs/promises';
|
|
225
|
+
|
|
226
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
227
|
+
|
|
228
|
+
const bytes = await response.bytes();
|
|
229
|
+
await writeFile('path/to/file', bytes);
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
</details>
|
|
233
|
+
</blockquote>
|
|
234
|
+
|
|
235
|
+
</details>
|
|
236
|
+
</blockquote>
|
|
237
|
+
|
|
238
|
+
<blockquote>
|
|
239
|
+
<details>
|
|
240
|
+
<summary>Bun</summary>
|
|
241
|
+
|
|
242
|
+
<blockquote>
|
|
243
|
+
<details>
|
|
244
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
248
|
+
|
|
249
|
+
const stream = response.stream();
|
|
250
|
+
await Bun.write('path/to/file', stream);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
</details>
|
|
254
|
+
</blockquote>
|
|
255
|
+
|
|
256
|
+
<blockquote>
|
|
257
|
+
<details>
|
|
258
|
+
<summary>ArrayBuffer</summary>
|
|
259
|
+
|
|
260
|
+
```ts
|
|
261
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
262
|
+
|
|
263
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
264
|
+
await Bun.write('path/to/file', arrayBuffer);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
</details>
|
|
268
|
+
</blockquote>
|
|
269
|
+
|
|
270
|
+
<blockquote>
|
|
271
|
+
<details>
|
|
272
|
+
<summary>Blob</summary>
|
|
273
|
+
|
|
274
|
+
```ts
|
|
275
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
276
|
+
|
|
277
|
+
const blob = await response.blob();
|
|
278
|
+
await Bun.write('path/to/file', blob);
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
</details>
|
|
282
|
+
</blockquote>
|
|
283
|
+
|
|
284
|
+
<blockquote>
|
|
285
|
+
<details>
|
|
286
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
287
|
+
|
|
288
|
+
```ts
|
|
289
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
290
|
+
|
|
291
|
+
const bytes = await response.bytes();
|
|
292
|
+
await Bun.write('path/to/file', bytes);
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
</details>
|
|
296
|
+
</blockquote>
|
|
297
|
+
|
|
298
|
+
</details>
|
|
299
|
+
</blockquote>
|
|
300
|
+
|
|
301
|
+
<blockquote>
|
|
302
|
+
<details>
|
|
303
|
+
<summary>Deno</summary>
|
|
304
|
+
|
|
305
|
+
<blockquote>
|
|
306
|
+
<details>
|
|
307
|
+
<summary>ReadableStream (most-efficient)</summary>
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
311
|
+
|
|
312
|
+
const stream = response.stream();
|
|
313
|
+
const file = await Deno.open('path/to/file', { write: true, create: true });
|
|
314
|
+
await stream.pipeTo(file.writable);
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
</details>
|
|
318
|
+
</blockquote>
|
|
319
|
+
|
|
320
|
+
<blockquote>
|
|
321
|
+
<details>
|
|
322
|
+
<summary>ArrayBuffer</summary>
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
326
|
+
|
|
327
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
328
|
+
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
</details>
|
|
332
|
+
</blockquote>
|
|
333
|
+
|
|
334
|
+
<blockquote>
|
|
335
|
+
<details>
|
|
336
|
+
<summary>Blob</summary>
|
|
337
|
+
|
|
338
|
+
```ts
|
|
339
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
340
|
+
|
|
341
|
+
const blob = await response.blob();
|
|
342
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
343
|
+
await Deno.writeFile('path/to/file', new Uint8Array(arrayBuffer));
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
</details>
|
|
347
|
+
</blockquote>
|
|
348
|
+
|
|
349
|
+
<blockquote>
|
|
350
|
+
<details>
|
|
351
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
355
|
+
|
|
356
|
+
const bytes = await response.bytes();
|
|
357
|
+
await Deno.writeFile('path/to/file', bytes);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
</details>
|
|
361
|
+
</blockquote>
|
|
362
|
+
|
|
363
|
+
</details>
|
|
364
|
+
</blockquote>
|
|
365
|
+
|
|
366
|
+
<blockquote>
|
|
367
|
+
<details>
|
|
368
|
+
<summary>Browser</summary>
|
|
369
|
+
|
|
370
|
+
<blockquote>
|
|
371
|
+
<details>
|
|
372
|
+
<summary>Blob (most-efficient)</summary>
|
|
373
|
+
|
|
374
|
+
```ts
|
|
375
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
376
|
+
|
|
377
|
+
const blob = await response.blob();
|
|
378
|
+
const url = URL.createObjectURL(blob);
|
|
379
|
+
|
|
380
|
+
// trigger download
|
|
381
|
+
const a = document.createElement('a');
|
|
382
|
+
a.href = url;
|
|
383
|
+
a.download = 'filename';
|
|
384
|
+
a.click();
|
|
385
|
+
URL.revokeObjectURL(url);
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
</details>
|
|
389
|
+
</blockquote>
|
|
390
|
+
|
|
391
|
+
<blockquote>
|
|
392
|
+
<details>
|
|
393
|
+
<summary>ReadableStream</summary>
|
|
394
|
+
|
|
395
|
+
```ts
|
|
396
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
397
|
+
|
|
398
|
+
const stream = response.stream();
|
|
399
|
+
const reader = stream.getReader();
|
|
400
|
+
const chunks = [];
|
|
401
|
+
|
|
402
|
+
while (true) {
|
|
403
|
+
const { done, value } = await reader.read();
|
|
404
|
+
if (done) break;
|
|
405
|
+
chunks.push(value);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
const blob = new Blob(chunks);
|
|
409
|
+
const url = URL.createObjectURL(blob);
|
|
410
|
+
|
|
411
|
+
// trigger download
|
|
412
|
+
const a = document.createElement('a');
|
|
413
|
+
a.href = url;
|
|
414
|
+
a.download = 'filename';
|
|
415
|
+
a.click();
|
|
416
|
+
URL.revokeObjectURL(url);
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
</details>
|
|
420
|
+
</blockquote>
|
|
421
|
+
|
|
422
|
+
<blockquote>
|
|
423
|
+
<details>
|
|
424
|
+
<summary>ArrayBuffer</summary>
|
|
425
|
+
|
|
426
|
+
```ts
|
|
427
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
428
|
+
|
|
429
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
430
|
+
const blob = new Blob([arrayBuffer]);
|
|
431
|
+
const url = URL.createObjectURL(blob);
|
|
432
|
+
|
|
433
|
+
// trigger download
|
|
434
|
+
const a = document.createElement('a');
|
|
435
|
+
a.href = url;
|
|
436
|
+
a.download = 'filename';
|
|
437
|
+
a.click();
|
|
438
|
+
URL.revokeObjectURL(url);
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
</details>
|
|
442
|
+
</blockquote>
|
|
443
|
+
|
|
444
|
+
<blockquote>
|
|
445
|
+
<details>
|
|
446
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
447
|
+
|
|
448
|
+
```ts
|
|
449
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
450
|
+
|
|
451
|
+
const bytes = await response.bytes();
|
|
452
|
+
const blob = new Blob([bytes]);
|
|
453
|
+
const url = URL.createObjectURL(blob);
|
|
454
|
+
|
|
455
|
+
// trigger download
|
|
456
|
+
const a = document.createElement('a');
|
|
457
|
+
a.href = url;
|
|
458
|
+
a.download = 'filename';
|
|
459
|
+
a.click();
|
|
460
|
+
URL.revokeObjectURL(url);
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
</details>
|
|
464
|
+
</blockquote>
|
|
465
|
+
|
|
466
|
+
</details>
|
|
467
|
+
</blockquote>
|
|
468
|
+
|
|
469
|
+
</details>
|
|
470
|
+
</blockquote>
|
|
471
|
+
|
|
472
|
+
<details>
|
|
473
|
+
<summary>Convert binary response to text</summary>
|
|
474
|
+
|
|
475
|
+
<blockquote>
|
|
476
|
+
<details>
|
|
477
|
+
<summary>ReadableStream</summary>
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
481
|
+
|
|
482
|
+
const stream = response.stream();
|
|
483
|
+
const text = await new Response(stream).text();
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
</details>
|
|
487
|
+
</blockquote>
|
|
488
|
+
|
|
489
|
+
<blockquote>
|
|
490
|
+
<details>
|
|
491
|
+
<summary>ArrayBuffer</summary>
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
495
|
+
|
|
496
|
+
const arrayBuffer = await response.arrayBuffer();
|
|
497
|
+
const text = new TextDecoder().decode(arrayBuffer);
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
</details>
|
|
501
|
+
</blockquote>
|
|
502
|
+
|
|
503
|
+
<blockquote>
|
|
504
|
+
<details>
|
|
505
|
+
<summary>Blob</summary>
|
|
506
|
+
|
|
507
|
+
```ts
|
|
508
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
509
|
+
|
|
510
|
+
const blob = await response.blob();
|
|
511
|
+
const text = await blob.text();
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
</details>
|
|
515
|
+
</blockquote>
|
|
516
|
+
|
|
517
|
+
<blockquote>
|
|
518
|
+
<details>
|
|
519
|
+
<summary>Bytes (UIntArray8)</summary>
|
|
520
|
+
|
|
521
|
+
```ts
|
|
522
|
+
const response = await client.minis.downloadMiniProfilePicture(...);
|
|
523
|
+
|
|
524
|
+
const bytes = await response.bytes();
|
|
525
|
+
const text = new TextDecoder().decode(bytes);
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
</details>
|
|
529
|
+
</blockquote>
|
|
530
|
+
|
|
531
|
+
</details>
|
|
532
|
+
|
|
143
533
|
## Advanced
|
|
144
534
|
|
|
145
535
|
### Subpackage Exports
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "minikai",
|
|
46
|
-
"X-Fern-SDK-Version": "1.
|
|
47
|
-
"User-Agent": "minikai/1.
|
|
46
|
+
"X-Fern-SDK-Version": "1.19.0",
|
|
47
|
+
"User-Agent": "minikai/1.19.0",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -79,7 +79,7 @@ class LabelsClient {
|
|
|
79
79
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
80
80
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
81
81
|
const _response = yield core.fetcher({
|
|
82
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
82
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Labels"),
|
|
83
83
|
method: "GET",
|
|
84
84
|
headers: _headers,
|
|
85
85
|
queryString: core.url
|
|
@@ -134,7 +134,7 @@ class LabelsClient {
|
|
|
134
134
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
135
135
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
136
|
const _response = yield core.fetcher({
|
|
137
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
137
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Labels"),
|
|
138
138
|
method: "POST",
|
|
139
139
|
headers: _headers,
|
|
140
140
|
contentType: "application/json",
|
|
@@ -189,7 +189,7 @@ class LabelsClient {
|
|
|
189
189
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
190
190
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
191
191
|
const _response = yield core.fetcher({
|
|
192
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
192
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Labels/${core.url.encodePathParam(id)}`),
|
|
193
193
|
method: "PUT",
|
|
194
194
|
headers: _headers,
|
|
195
195
|
contentType: "application/json",
|
|
@@ -243,7 +243,7 @@ class LabelsClient {
|
|
|
243
243
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
244
244
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
245
245
|
const _response = yield core.fetcher({
|
|
246
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
246
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Labels/${core.url.encodePathParam(id)}`),
|
|
247
247
|
method: "DELETE",
|
|
248
248
|
headers: _headers,
|
|
249
249
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -176,7 +176,7 @@ export declare class MinisClient {
|
|
|
176
176
|
* Retrieve a single version of a Mini.
|
|
177
177
|
*
|
|
178
178
|
* @param {string} id - Either the Minikai-assigned Guid for this resource (e.g. `abc12345-1234-1234-1234-123456789abc`) or the resource's `externalUri`, URL-encoded (e.g. `https%3A%2F%2Fpartner.example.com%2Fpatients%2F48291`). Responses always return the canonical Guid in the `id` field.
|
|
179
|
-
* @param {string} versionId
|
|
179
|
+
* @param {string} versionId
|
|
180
180
|
* @param {MinisClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
181
181
|
*
|
|
182
182
|
* @throws {@link Minikai.NotFoundError}
|
|
@@ -217,4 +217,11 @@ export declare class MinisClient {
|
|
|
217
217
|
*/
|
|
218
218
|
deleteMiniProfilePicture(id: string, requestOptions?: MinisClient.RequestOptions): core.HttpResponsePromise<void>;
|
|
219
219
|
private __deleteMiniProfilePicture;
|
|
220
|
+
/**
|
|
221
|
+
* Download a Mini's profile picture by its stored picture id.
|
|
222
|
+
*
|
|
223
|
+
* @throws {@link Minikai.NotFoundError}
|
|
224
|
+
*/
|
|
225
|
+
downloadMiniProfilePicture(id: string, pictureId: string, requestOptions?: MinisClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
|
|
226
|
+
private __downloadMiniProfilePicture;
|
|
220
227
|
}
|
|
@@ -77,7 +77,7 @@ class MinisClient {
|
|
|
77
77
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
78
78
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
79
79
|
const _response = yield core.fetcher({
|
|
80
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
80
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Minis"),
|
|
81
81
|
method: "GET",
|
|
82
82
|
headers: _headers,
|
|
83
83
|
queryString: core.url
|
|
@@ -126,7 +126,7 @@ class MinisClient {
|
|
|
126
126
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
127
127
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
128
128
|
const _response = yield core.fetcher({
|
|
129
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
129
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Minis"),
|
|
130
130
|
method: "POST",
|
|
131
131
|
headers: _headers,
|
|
132
132
|
contentType: "application/json",
|
|
@@ -177,7 +177,7 @@ class MinisClient {
|
|
|
177
177
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
178
178
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
179
179
|
const _response = yield core.fetcher({
|
|
180
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
180
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Minis/search"),
|
|
181
181
|
method: "POST",
|
|
182
182
|
headers: _headers,
|
|
183
183
|
contentType: "application/json",
|
|
@@ -230,7 +230,7 @@ class MinisClient {
|
|
|
230
230
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
231
231
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
232
232
|
const _response = yield core.fetcher({
|
|
233
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
233
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Minis/external"),
|
|
234
234
|
method: "POST",
|
|
235
235
|
headers: _headers,
|
|
236
236
|
contentType: "application/json",
|
|
@@ -286,7 +286,7 @@ class MinisClient {
|
|
|
286
286
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
287
287
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
288
288
|
const _response = yield core.fetcher({
|
|
289
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
289
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, "api/v1/Minis/external"),
|
|
290
290
|
method: "PUT",
|
|
291
291
|
headers: _headers,
|
|
292
292
|
contentType: "application/json",
|
|
@@ -337,7 +337,7 @@ class MinisClient {
|
|
|
337
337
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
338
338
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
339
339
|
const _response = yield core.fetcher({
|
|
340
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
340
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}`),
|
|
341
341
|
method: "GET",
|
|
342
342
|
headers: _headers,
|
|
343
343
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -389,7 +389,7 @@ class MinisClient {
|
|
|
389
389
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
390
390
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
391
391
|
const _response = yield core.fetcher({
|
|
392
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
392
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}`),
|
|
393
393
|
method: "PUT",
|
|
394
394
|
headers: _headers,
|
|
395
395
|
contentType: "application/json",
|
|
@@ -447,7 +447,7 @@ class MinisClient {
|
|
|
447
447
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
448
448
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
449
449
|
const _response = yield core.fetcher({
|
|
450
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
450
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}`),
|
|
451
451
|
method: "DELETE",
|
|
452
452
|
headers: _headers,
|
|
453
453
|
queryString: core.url
|
|
@@ -501,7 +501,7 @@ class MinisClient {
|
|
|
501
501
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
502
502
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
503
503
|
const _response = yield core.fetcher({
|
|
504
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
504
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}`),
|
|
505
505
|
method: "PATCH",
|
|
506
506
|
headers: _headers,
|
|
507
507
|
contentType: "application/json",
|
|
@@ -558,7 +558,7 @@ class MinisClient {
|
|
|
558
558
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
559
559
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
560
560
|
const _response = yield core.fetcher({
|
|
561
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
561
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/labels`),
|
|
562
562
|
method: "PUT",
|
|
563
563
|
headers: _headers,
|
|
564
564
|
contentType: "application/json",
|
|
@@ -617,7 +617,7 @@ class MinisClient {
|
|
|
617
617
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
618
618
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
619
619
|
const _response = yield core.fetcher({
|
|
620
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
620
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/versions`),
|
|
621
621
|
method: "GET",
|
|
622
622
|
headers: _headers,
|
|
623
623
|
queryString: core.url
|
|
@@ -656,7 +656,7 @@ class MinisClient {
|
|
|
656
656
|
* Retrieve a single version of a Mini.
|
|
657
657
|
*
|
|
658
658
|
* @param {string} id - Either the Minikai-assigned Guid for this resource (e.g. `abc12345-1234-1234-1234-123456789abc`) or the resource's `externalUri`, URL-encoded (e.g. `https%3A%2F%2Fpartner.example.com%2Fpatients%2F48291`). Responses always return the canonical Guid in the `id` field.
|
|
659
|
-
* @param {string} versionId
|
|
659
|
+
* @param {string} versionId
|
|
660
660
|
* @param {MinisClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
661
661
|
*
|
|
662
662
|
* @throws {@link Minikai.NotFoundError}
|
|
@@ -673,7 +673,7 @@ class MinisClient {
|
|
|
673
673
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
674
674
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
675
675
|
const _response = yield core.fetcher({
|
|
676
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
676
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/versions/${core.url.encodePathParam(versionId)}`),
|
|
677
677
|
method: "GET",
|
|
678
678
|
headers: _headers,
|
|
679
679
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -729,7 +729,7 @@ class MinisClient {
|
|
|
729
729
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
730
730
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
731
731
|
const _response = yield core.fetcher({
|
|
732
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
732
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/profile-picture`),
|
|
733
733
|
method: "POST",
|
|
734
734
|
headers: _headers,
|
|
735
735
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -782,7 +782,7 @@ class MinisClient {
|
|
|
782
782
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
783
783
|
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
784
784
|
const _response = yield core.fetcher({
|
|
785
|
-
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.
|
|
785
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/profile-picture`),
|
|
786
786
|
method: "DELETE",
|
|
787
787
|
headers: _headers,
|
|
788
788
|
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
@@ -810,5 +810,48 @@ class MinisClient {
|
|
|
810
810
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/api/v1/Minis/{id}/profile-picture");
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
+
/**
|
|
814
|
+
* Download a Mini's profile picture by its stored picture id.
|
|
815
|
+
*
|
|
816
|
+
* @throws {@link Minikai.NotFoundError}
|
|
817
|
+
*/
|
|
818
|
+
downloadMiniProfilePicture(id, pictureId, requestOptions) {
|
|
819
|
+
return core.HttpResponsePromise.fromPromise(this.__downloadMiniProfilePicture(id, pictureId, requestOptions));
|
|
820
|
+
}
|
|
821
|
+
__downloadMiniProfilePicture(id, pictureId, requestOptions) {
|
|
822
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
824
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
825
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
826
|
+
const _response = yield core.fetcher({
|
|
827
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.MinikaiEnvironment.Australia, `api/v1/Minis/${core.url.encodePathParam(id)}/profile-picture/${core.url.encodePathParam(pictureId)}`),
|
|
828
|
+
method: "GET",
|
|
829
|
+
headers: _headers,
|
|
830
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
831
|
+
responseType: "binary-response",
|
|
832
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
833
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
834
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
835
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
836
|
+
logging: this._options.logging,
|
|
837
|
+
});
|
|
838
|
+
if (_response.ok) {
|
|
839
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
840
|
+
}
|
|
841
|
+
if (_response.error.reason === "status-code") {
|
|
842
|
+
switch (_response.error.statusCode) {
|
|
843
|
+
case 404:
|
|
844
|
+
throw new Minikai.NotFoundError(_response.error.body, _response.rawResponse);
|
|
845
|
+
default:
|
|
846
|
+
throw new errors.MinikaiError({
|
|
847
|
+
statusCode: _response.error.statusCode,
|
|
848
|
+
body: _response.error.body,
|
|
849
|
+
rawResponse: _response.rawResponse,
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/api/v1/Minis/{id}/profile-picture/{pictureId}");
|
|
854
|
+
});
|
|
855
|
+
}
|
|
813
856
|
}
|
|
814
857
|
exports.MinisClient = MinisClient;
|