@dynatrace-sdk/http-client 1.0.3 → 1.0.5

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/docs/DOCS.md CHANGED
@@ -1,96 +1,74 @@
1
- # http-client
1
+ ---
2
+ title: @dynatrace-sdk/http-client
3
+ description:
4
+ ---
2
5
 
3
- SDK package version **1.0.3**
6
+ # @dynatrace-sdk/http-client
4
7
 
5
- ```bash
6
- npm install @dynatrace-sdk/http-client
7
- ```
8
+ import NpmLogo from '@site/static/img/npm-logo.png';
8
9
 
10
+ <div class="row margin-bottom--md">
11
+ <div class="col">
12
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client">
13
+ <span class="margin-right--xs">@dynatrace-sdk/http-client</span>
14
+ <img className="no-zoom" width="20px" src={NpmLogo} />
15
+ </a>
16
+ </div>
17
+ <div class="col" style={{textAlign: 'right'}}>
18
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.5">v1.0.5</a>
19
+ </div>
20
+ </div>
9
21
 
22
+ ```bash
23
+ npm install @dynatrace-sdk/http-client
24
+ ```
10
25
 
11
26
  ## Classes
12
27
 
13
- ### PlatformBaseError
14
- <!-- default child "Class" -->
15
-
28
+ ### PlatformBaseError
16
29
 
30
+ <!-- default child "Class" -->
17
31
 
18
32
  #### Constructors
19
33
 
20
34
  ##### new PlatformBaseError(message,cause?)
21
- <div class="padding-left--md">
22
-
23
- **Parameters**
24
-
25
- <div class="padding-left--md padding-bottom--md">
26
- <strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
27
- <div class="padding-left--md">
28
-
29
-
30
-
31
- </div>
32
-
33
-
34
-
35
- </div>
36
35
 
37
- <div class="padding-left--md padding-bottom--md">
38
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
39
36
  <div class="padding-left--md">
40
37
 
38
+ #### Parameters
41
39
 
40
+ | Name | Type |
41
+ | ---------------------------- | ---------------------------------------------------------------------------------------- |
42
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
43
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
42
44
 
43
45
  </div>
44
46
 
45
-
46
-
47
- </div>
48
-
49
-
50
-
51
- </div>
52
-
53
-
54
-
55
47
  #### Properties
56
48
 
57
- <div class="padding-left--md padding-bottom--md">
58
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
59
- <div class="padding-left--md">
60
-
61
-
62
-
63
- </div>
64
-
65
-
66
-
67
- </div>
49
+ | Name | Type |
50
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- |
51
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
52
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
53
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
54
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
55
+ | prepareStackTrace | Object |
56
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> |
68
57
 
58
+ ### PlatformBinary
69
59
 
70
-
71
- ### PlatformBinary
72
60
  <!-- default child "Class" -->
73
- Represents an environment agnostic (browser vs node) abstraction layer for binary data.
74
61
 
62
+ Represents an environment agnostic (browser vs node) abstraction layer for binary data.
75
63
 
76
64
  #### Properties
77
65
 
78
- <div class="padding-left--md padding-bottom--md">
79
- <strong>data</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt;
80
- <div class="padding-left--md">
81
-
82
-
83
-
84
- </div>
85
-
86
-
87
-
88
- </div>
89
-
66
+ | Name | Type |
67
+ | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
+ | data<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt; |
90
69
 
91
70
  #### Methods
92
71
 
93
-
94
72
  ##### get
95
73
 
96
74
  <div class="padding-bottom--md">
@@ -100,37 +78,18 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
100
78
 
101
79
  Returns the binary data in a form that conforms to the specified type.
102
80
 
103
-
104
- **Parameters**
105
-
106
- <div class="padding-left--md padding-bottom--md">
107
- <strong>type</strong>: <a href="#t">T</a>
108
- <div class="padding-left--md">
109
-
110
- The type of the data.
111
- Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `stream`.
112
-
113
- </div>
114
-
115
-
116
-
117
81
  </div>
118
82
 
83
+ #### Parameters
119
84
 
85
+ | Name | Type | Description |
86
+ | ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
87
+ | type<sup>\*required</sup> | <a href="#t">T</a> | <p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
120
88
 
121
89
  <!-- no returns -->
122
90
 
123
-
124
-
125
- </div>
126
-
127
-
128
-
129
91
  </div>
130
92
 
131
-
132
-
133
-
134
93
  ##### from
135
94
 
136
95
  <div class="padding-bottom--md">
@@ -138,38 +97,18 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
138
97
 
139
98
  <div class="padding-left--md">
140
99
 
141
-
142
-
143
-
144
- **Parameters**
145
-
146
- <div class="padding-left--md padding-bottom--md">
147
- <strong>data</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt; | <a href="#buffer">Buffer</a> | <a href="#readable">Readable</a>
148
- <div class="padding-left--md">
149
-
150
-
151
-
152
- </div>
153
-
154
-
155
-
156
100
  </div>
157
101
 
102
+ #### Parameters
158
103
 
104
+ | Name | Type |
105
+ | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
106
+ | data<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="#uint8array">Uint8Array</a>&gt; &#124; <a href="#buffer">Buffer</a> &#124; <a href="#readable">Readable</a> |
159
107
 
160
108
  <!-- no returns -->
161
109
 
162
-
163
-
164
- </div>
165
-
166
-
167
-
168
110
  </div>
169
111
 
170
-
171
-
172
-
173
112
  ##### fromJson
174
113
 
175
114
  <div class="padding-bottom--md">
@@ -177,38 +116,18 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
177
116
 
178
117
  <div class="padding-left--md">
179
118
 
180
-
181
-
182
-
183
- **Parameters**
184
-
185
- <div class="padding-left--md padding-bottom--md">
186
- <strong>json</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
187
- <div class="padding-left--md">
188
-
189
-
190
-
191
- </div>
192
-
193
-
194
-
195
119
  </div>
196
120
 
121
+ #### Parameters
197
122
 
123
+ | Name | Type |
124
+ | ------------------------- | ---------------------------------------------------------------------------------------- |
125
+ | json<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
198
126
 
199
127
  <!-- no returns -->
200
128
 
201
-
202
-
203
- </div>
204
-
205
-
206
-
207
129
  </div>
208
130
 
209
-
210
-
211
-
212
131
  ##### fromText
213
132
 
214
133
  <div class="padding-bottom--md">
@@ -216,132 +135,69 @@ Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `s
216
135
 
217
136
  <div class="padding-left--md">
218
137
 
219
-
220
-
221
-
222
- **Parameters**
223
-
224
- <div class="padding-left--md padding-bottom--md">
225
- <strong>text</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
226
- <div class="padding-left--md">
227
-
228
-
229
-
230
- </div>
231
-
232
-
233
-
234
138
  </div>
235
139
 
140
+ #### Parameters
236
141
 
142
+ | Name | Type |
143
+ | ------------------------- | ----------------------------------------------------------------------------- |
144
+ | text<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
237
145
 
238
146
  <!-- no returns -->
239
147
 
240
-
241
-
242
- </div>
243
-
244
-
245
-
246
148
  </div>
247
149
 
150
+ ### PlatformDataTypeError
248
151
 
249
-
250
-
251
- ### PlatformDataTypeError
252
152
  <!-- default child "Class" -->
253
153
 
254
-
255
-
256
154
  #### Constructors
257
155
 
258
156
  ##### new PlatformDataTypeError(message,cause?)
259
- <div class="padding-left--md">
260
-
261
- **Parameters**
262
-
263
- <div class="padding-left--md padding-bottom--md">
264
- <strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
265
- <div class="padding-left--md">
266
157
 
267
-
268
-
269
- </div>
270
-
271
-
272
-
273
- </div>
274
-
275
- <div class="padding-left--md padding-bottom--md">
276
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
277
158
  <div class="padding-left--md">
278
159
 
160
+ #### Parameters
279
161
 
162
+ | Name | Type |
163
+ | ---------------------------- | ---------------------------------------------------------------------------------------- |
164
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
165
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
280
166
 
281
167
  </div>
282
168
 
283
-
284
-
285
- </div>
286
-
287
-
288
-
289
- </div>
290
-
291
-
292
-
293
169
  #### Properties
294
170
 
295
- <div class="padding-left--md padding-bottom--md">
296
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
297
- <div class="padding-left--md">
298
-
299
- The error root cause.
300
-
301
- </div>
302
-
303
-
304
-
305
- </div>
306
-
307
-
308
- <div class="padding-left--md padding-bottom--md">
309
- <strong>name</strong>: "DataTypeError"
310
- <div class="padding-left--md">
311
-
312
- The error name.
313
-
314
- </div>
315
-
316
-
317
-
318
- </div>
319
-
171
+ | Name | Type | Description |
172
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
173
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
174
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
175
+ | name<sup>\*required</sup> | "DataTypeError" | The error name. |
176
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
177
+ | prepareStackTrace | Object | |
178
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
320
179
 
180
+ ### PlatformHttpClient
321
181
 
322
- ### PlatformHttpClient
323
182
  <!-- default child "Class" -->
183
+
324
184
  The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
325
185
  It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
326
186
 
327
187
  Currently, only the requests to the Platform Services and the Serverless Functions are supported.
328
188
 
329
-
330
189
  #### Constructors
331
190
 
332
191
  ##### new PlatformHttpClient()
192
+
333
193
  <div class="padding-left--md">
334
194
 
335
195
  <!-- no parameters -->
336
196
 
337
-
338
197
  </div>
339
198
 
340
-
341
-
342
199
  #### Methods
343
200
 
344
-
345
201
  ##### send
346
202
 
347
203
  <div class="padding-bottom--md">
@@ -352,1424 +208,595 @@ Currently, only the requests to the Platform Services and the Serverless Functio
352
208
  Sends an http request as configured by the `options`.
353
209
  Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
354
210
  when one of the following situations happen:
211
+
355
212
  - `DataTypeError` - request body does not conform to the specified request body type,
356
213
  - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
357
214
  - `HttpClientResponseError` - response status is considered invalid by the status validator,
358
- - `HttpClientAbortError` - request was aborted.
359
-
360
-
361
- **Parameters**
362
-
363
- <div class="padding-left--md padding-bottom--md">
364
- <strong>options</strong>: <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt;
365
- <div class="padding-left--md">
366
-
367
- Options used to configure the request.
368
-
369
- </div>
370
-
371
-
372
-
373
- </div>
374
-
375
-
376
-
377
- #### Returns
378
-
379
- <div class="padding-left--md">
380
- Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
381
-
382
- </div>
383
-
384
-
385
-
386
-
387
-
388
- </div>
389
-
390
-
391
-
392
- </div>
393
-
394
-
395
-
396
-
397
- ### PlatformHttpClientAbortError
398
- <!-- default child "Class" -->
399
- Represents a situation when the request was aborted.
400
-
401
-
402
- #### Constructors
403
-
404
- ##### new PlatformHttpClientAbortError(cause)
405
- <div class="padding-left--md">
406
-
407
- **Parameters**
408
-
409
- <div class="padding-left--md padding-bottom--md">
410
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
411
- <div class="padding-left--md">
412
-
413
-
414
-
415
- </div>
416
-
417
-
418
-
419
- </div>
420
-
421
-
422
-
423
- </div>
424
-
425
-
426
-
427
- #### Properties
428
-
429
- <div class="padding-left--md padding-bottom--md">
430
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
431
- <div class="padding-left--md">
432
-
433
- The error root cause.
434
-
435
- </div>
436
-
437
-
438
-
439
- </div>
440
-
441
-
442
- <div class="padding-left--md padding-bottom--md">
443
- <strong>name</strong>: "AbortError"
444
- <div class="padding-left--md">
445
-
446
- The error name.
447
-
448
- </div>
449
-
450
-
451
-
452
- </div>
453
-
454
-
455
-
456
- ### PlatformHttpClientRequestError
457
- <!-- default child "Class" -->
458
- Represents a situation when the request is invalid and cannot be sent.
459
-
460
-
461
- #### Constructors
462
-
463
- ##### new PlatformHttpClientRequestError(cause)
464
- <div class="padding-left--md">
465
-
466
- **Parameters**
467
-
468
- <div class="padding-left--md padding-bottom--md">
469
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
470
- <div class="padding-left--md">
471
-
472
-
473
-
474
- </div>
475
-
476
-
477
-
478
- </div>
479
-
480
-
481
-
482
- </div>
483
-
484
-
485
-
486
- #### Properties
487
-
488
- <div class="padding-left--md padding-bottom--md">
489
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
490
- <div class="padding-left--md">
491
-
492
- The error root cause.
493
-
494
- </div>
495
-
496
-
497
-
498
- </div>
499
-
500
-
501
- <div class="padding-left--md padding-bottom--md">
502
- <strong>name</strong>: "RequestError"
503
- <div class="padding-left--md">
504
-
505
- The error name.
506
-
507
- </div>
508
-
509
-
510
-
511
- </div>
512
-
513
-
514
-
515
- ### PlatformHttpClientResponse
516
- <!-- default child "Class" -->
517
- Represents the response to a request.
518
-
519
-
520
- #### Constructors
521
-
522
- ##### new PlatformHttpClientResponse(response)
523
- <div class="padding-left--md">
524
-
525
- **Parameters**
526
-
527
- <div class="padding-left--md padding-bottom--md">
528
- <strong>response</strong>: <a href="#response">Response</a>
529
- <div class="padding-left--md">
530
-
531
-
532
-
533
- </div>
534
-
535
-
536
-
537
- </div>
538
-
539
-
540
-
541
- </div>
542
-
543
-
544
-
545
- #### Accessors
546
-
547
- ##### headers
548
- <!-- default child "Accessor" -->
549
- The response headers.
550
-
551
-
552
- ##### status
553
- <!-- default child "Accessor" -->
554
- The status code of the response.
555
-
556
-
557
- ##### statusText
558
- <!-- default child "Accessor" -->
559
- The status message corresponding to the status code.
560
-
561
-
562
- ##### url
563
- <!-- default child "Accessor" -->
564
- The URL of the response.
565
-
566
-
567
- #### Methods
568
-
569
-
570
- ##### body
571
-
572
- <div class="padding-bottom--md">
573
- <strong>body(responseBodyType): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
574
-
575
- <div class="padding-left--md">
576
-
577
- Returns the response body in a form that conforms to the specified response body type.
578
-
579
-
580
- **Parameters**
581
-
582
- <div class="padding-left--md padding-bottom--md">
583
- <strong>responseBodyType</strong>: <a href="#t">T</a>
584
- <div class="padding-left--md">
585
-
586
- The type of the response body.
587
- Can be `text`, `json`, `binary`, `form-data`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `stream`.
588
- The default response body type is `json`.
589
-
590
- </div>
591
-
592
-
593
-
594
- </div>
595
-
596
-
597
-
598
- <!-- no returns -->
599
-
600
-
601
-
602
- </div>
603
-
604
-
605
-
606
- </div>
607
-
608
-
609
-
610
-
611
- ### PlatformHttpClientResponseError
612
- <!-- default child "Class" -->
613
- Represents a situation when the response status is considered invalid by the status validator.
614
-
615
-
616
- #### Constructors
617
-
618
- ##### new PlatformHttpClientResponseError(response)
619
- <div class="padding-left--md">
620
-
621
- **Parameters**
622
-
623
- <div class="padding-left--md padding-bottom--md">
624
- <strong>response</strong>: <a href="#response">Response</a>
625
- <div class="padding-left--md">
626
-
627
-
628
-
629
- </div>
630
-
631
-
632
-
633
- </div>
634
-
635
-
636
-
637
- </div>
638
-
639
-
640
-
641
- #### Properties
642
-
643
- <div class="padding-left--md padding-bottom--md">
644
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
645
- <div class="padding-left--md">
646
-
647
- The error root cause.
648
-
649
- </div>
650
-
651
-
652
-
653
- </div>
654
-
655
-
656
- <div class="padding-left--md padding-bottom--md">
657
- <strong>name</strong>: "ResponseError"
658
- <div class="padding-left--md">
659
-
660
- The error name.
661
-
662
- </div>
663
-
664
-
665
-
666
- </div>
667
-
668
-
669
- <div class="padding-left--md padding-bottom--md">
670
- <strong>response</strong>: <a href="#httpclientresponse">HttpClientResponse</a>
671
- <div class="padding-left--md">
672
-
673
- The response.
674
-
675
- </div>
676
-
677
-
678
-
679
- </div>
680
-
681
-
682
-
683
- ### PlatformUnsupportedOperationError
684
- <!-- default child "Class" -->
685
-
686
-
687
-
688
- #### Constructors
689
-
690
- ##### new PlatformUnsupportedOperationError(message,cause?)
691
- <div class="padding-left--md">
692
-
693
- **Parameters**
694
-
695
- <div class="padding-left--md padding-bottom--md">
696
- <strong>message</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
697
- <div class="padding-left--md">
698
-
699
-
700
-
701
- </div>
702
-
703
-
704
-
705
- </div>
706
-
707
- <div class="padding-left--md padding-bottom--md">
708
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
709
- <div class="padding-left--md">
710
-
711
-
712
-
713
- </div>
714
-
715
-
716
-
717
- </div>
718
-
719
-
720
-
721
- </div>
722
-
723
-
724
-
725
- #### Properties
726
-
727
- <div class="padding-left--md padding-bottom--md">
728
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
729
- <div class="padding-left--md">
730
-
731
- The error root cause.
732
-
733
- </div>
734
-
735
-
736
-
737
- </div>
738
-
739
-
740
- <div class="padding-left--md padding-bottom--md">
741
- <strong>name</strong>: "UnsupportedOperationError"
742
- <div class="padding-left--md">
743
-
744
- The error name.
745
-
746
- </div>
747
-
748
-
749
-
750
- </div>
751
-
752
-
753
- ## Interfaces
754
-
755
- ### AbortController
756
- <!-- default child "Interface" -->
757
- Represents a controller object that allows to abort one or more requests as and when desired.
758
-
759
-
760
- #### Properties
761
-
762
- <div class="padding-left--md padding-bottom--md">
763
- <strong>signal</strong>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal">AbortSignal</a>
764
- <div class="padding-left--md">
765
-
766
- Returns an AbortSignal object instance, which can be used to communicate with a request.
767
-
768
- </div>
769
-
770
-
771
-
772
- </div>
773
-
774
-
775
- #### Methods
776
-
777
-
778
- ##### abort
779
-
780
- <div class="padding-bottom--md">
781
- <strong>abort(): void</strong>
782
-
783
- <div class="padding-left--md">
784
-
785
- Aborts a request before it has completed.
786
-
787
-
788
- <!-- no parameters -->
789
-
790
-
791
- <!-- no returns -->
792
-
793
-
794
-
795
- </div>
796
-
797
-
798
-
799
- </div>
800
-
801
-
802
-
803
-
804
- ### AbortSignal
805
- <!-- default child "Interface" -->
806
- Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
807
-
808
-
809
- #### Properties
810
-
811
- <div class="padding-left--md padding-bottom--md">
812
- <strong>aborted</strong>: boolean
813
- <div class="padding-left--md">
814
-
815
- A flag indicating whether the requests the signal is communicating with are aborted.
816
-
817
- </div>
818
-
819
-
820
-
821
- </div>
822
-
823
-
824
- <div class="padding-left--md padding-bottom--md">
825
- <strong>onabort</strong>: null | Object
826
- <div class="padding-left--md">
827
-
828
- Invoked when the requests the signal is communicating with are aborted.
829
-
830
- </div>
831
-
832
-
833
-
834
- </div>
835
-
836
-
837
- <div class="padding-left--md padding-bottom--md">
838
- <strong>reason</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
839
- <div class="padding-left--md">
840
-
841
-
842
-
843
- </div>
844
-
845
-
846
-
847
- </div>
848
-
849
-
850
- #### Methods
851
-
852
-
853
- ##### throwIfAborted
854
-
855
- <div class="padding-bottom--md">
856
- <strong>throwIfAborted(): void</strong>
857
-
858
- <div class="padding-left--md">
859
-
860
-
861
-
862
-
863
- <!-- no parameters -->
864
-
865
-
866
- <!-- no returns -->
867
-
868
-
869
-
870
- </div>
871
-
872
-
873
-
874
- </div>
875
-
876
-
877
-
878
-
879
- ### BaseError
880
- <!-- default child "Interface" -->
881
-
882
-
883
-
884
- #### Properties
885
-
886
- <div class="padding-left--md padding-bottom--md">
887
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
888
- <div class="padding-left--md">
889
-
890
-
891
-
892
- </div>
893
-
894
-
895
-
896
- </div>
897
-
898
-
899
- <div class="padding-left--md padding-bottom--md">
900
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
901
- <div class="padding-left--md">
902
-
903
-
904
-
905
- </div>
906
-
907
-
908
-
909
- </div>
910
-
911
-
912
-
913
- ### Binary
914
- <!-- default child "Interface" -->
915
- Represents an environment agnostic (browser vs node) abstraction layer for binary data.
916
-
917
-
918
- #### Methods
919
-
920
-
921
- ##### get
922
-
923
- <div class="padding-bottom--md">
924
- <strong>get(type): <a href="#datatypes">DataTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
925
-
926
- <div class="padding-left--md">
927
-
928
- Returns the binary data in a form that conforms to the specified type.
929
-
930
-
931
- **Parameters**
932
-
933
- <div class="padding-left--md padding-bottom--md">
934
- <strong>type</strong>: <a href="#t">T</a>
935
- <div class="padding-left--md">
936
-
937
- The type of the data.
938
- Can be `text`, `json`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `stream`.
939
-
940
- </div>
941
-
942
-
943
-
944
- </div>
945
-
946
-
947
-
948
- <!-- no returns -->
949
-
950
-
951
-
952
- </div>
953
-
954
-
955
-
956
- </div>
957
-
958
-
959
-
960
-
961
- ### BinaryFormDataRequestField
962
- <!-- default child "Interface" -->
963
- Represents an binary field.
964
-
965
-
966
- #### Properties
967
-
968
- <div class="padding-left--md padding-bottom--md">
969
- <strong>contentType</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
970
- <div class="padding-left--md">
971
-
972
- The content type of the data contained in `value`.
973
- The default content type for the binary is 'application/octet-stream'.
974
-
975
- </div>
976
-
977
-
978
-
979
- </div>
980
-
981
-
982
- <div class="padding-left--md padding-bottom--md">
983
- <strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
984
- <div class="padding-left--md">
985
-
986
- The filename reported to the server.
987
- The default filename for the binary is 'binary'.
988
-
989
- </div>
990
-
991
-
992
-
993
- </div>
994
-
995
-
996
- <div class="padding-left--md padding-bottom--md">
997
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
998
- <div class="padding-left--md">
999
-
1000
- The name of the field.
1001
-
1002
- </div>
1003
-
1004
-
1005
-
1006
- </div>
1007
-
1008
-
1009
- <div class="padding-left--md padding-bottom--md">
1010
- <strong>type</strong>: "binary"
1011
- <div class="padding-left--md">
1012
-
1013
- A binary field type discriminator.
1014
-
1015
- </div>
1016
-
1017
-
1018
-
1019
- </div>
1020
-
1021
-
1022
- <div class="padding-left--md padding-bottom--md">
1023
- <strong>value</strong>: <a href="#arraybuffer">ArrayBuffer</a> | <a href="#blob">Blob</a> | <a href="#buffer">Buffer</a> | <a href="#readable">Readable</a> | <a href="#binary">Binary</a> | <a href="#readablestream">ReadableStream</a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>&gt; | <a href="#file">File</a>
1024
- <div class="padding-left--md">
1025
-
1026
- The field's value.
1027
-
1028
- </div>
1029
-
1030
-
1031
-
1032
- </div>
1033
-
1034
-
1035
-
1036
- ### BinaryFormDataResponseField
1037
- <!-- default child "Interface" -->
1038
-
1039
-
1040
-
1041
- #### Properties
1042
-
1043
- <div class="padding-left--md padding-bottom--md">
1044
- <strong>contentType</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1045
- <div class="padding-left--md">
1046
-
1047
-
1048
-
1049
- </div>
1050
-
1051
-
1052
-
1053
- </div>
1054
-
1055
-
1056
- <div class="padding-left--md padding-bottom--md">
1057
- <strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1058
- <div class="padding-left--md">
1059
-
1060
-
1061
-
1062
- </div>
1063
-
1064
-
1065
-
1066
- </div>
1067
-
1068
-
1069
- <div class="padding-left--md padding-bottom--md">
1070
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1071
- <div class="padding-left--md">
1072
-
1073
-
1074
-
1075
- </div>
1076
-
1077
-
1078
-
1079
- </div>
1080
-
1081
-
1082
- <div class="padding-left--md padding-bottom--md">
1083
- <strong>type</strong>: "binary"
1084
- <div class="padding-left--md">
1085
-
1086
-
1087
-
1088
- </div>
1089
-
1090
-
1091
-
1092
- </div>
1093
-
1094
-
1095
- <div class="padding-left--md padding-bottom--md">
1096
- <strong>value</strong>: <a href="#binary">Binary</a>
1097
- <div class="padding-left--md">
1098
-
1099
-
1100
-
1101
- </div>
1102
-
1103
-
1104
-
1105
- </div>
1106
-
1107
-
1108
-
1109
- ### DataTypeError
1110
- <!-- default child "Interface" -->
1111
-
1112
-
1113
-
1114
- #### Properties
1115
-
1116
- <div class="padding-left--md padding-bottom--md">
1117
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1118
- <div class="padding-left--md">
1119
-
1120
- The error root cause.
1121
-
1122
- </div>
1123
-
1124
-
1125
-
1126
- </div>
1127
-
1128
-
1129
- <div class="padding-left--md padding-bottom--md">
1130
- <strong>name</strong>: "DataTypeError"
1131
- <div class="padding-left--md">
1132
-
1133
- The error name.
1134
-
1135
- </div>
1136
-
1137
-
1138
-
1139
- </div>
1140
-
1141
-
1142
-
1143
- ### Headers
1144
- <!-- default child "Interface" -->
1145
- Represents http headers.
1146
-
1147
-
1148
- ### HttpClient
1149
- <!-- default child "Interface" -->
1150
- The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
1151
- It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
1152
-
1153
- Currently, only the requests to the Platform Services and the Serverless Functions are supported.
1154
-
1155
-
1156
- #### Methods
1157
-
1158
-
1159
- ##### send
1160
-
1161
- <div class="padding-bottom--md">
1162
- <strong>send(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
1163
-
1164
- <div class="padding-left--md">
1165
-
1166
- Sends an http request as configured by the `options`.
1167
- Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
1168
- when one of the following situations happen:
1169
- - `DataTypeError` - request body does not conform to the specified request body type,
1170
- - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
1171
- - `HttpClientResponseError` - response status is considered invalid by the status validator,
1172
- - `HttpClientAbortError` - request was aborted.
1173
-
1174
-
1175
- **Parameters**
1176
-
1177
- <div class="padding-left--md padding-bottom--md">
1178
- <strong>options</strong>: <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt;
1179
- <div class="padding-left--md">
1180
-
1181
- Options used to configure the request.
1182
-
1183
- </div>
1184
-
1185
-
1186
-
1187
- </div>
1188
-
1189
-
1190
-
1191
- #### Returns
1192
-
1193
- <div class="padding-left--md">
1194
- Promise&lt;HttpClientResponse&gt; A promise that resolves with the response object or rejects with an error.
1195
-
1196
- </div>
1197
-
1198
-
1199
-
1200
-
1201
-
1202
- </div>
1203
-
1204
-
1205
-
1206
- </div>
1207
-
1208
-
1209
-
1210
-
1211
- ### HttpClientAbortError
1212
- <!-- default child "Interface" -->
1213
- Represents a situation when the request was aborted.
1214
-
1215
-
1216
- #### Properties
1217
-
1218
- <div class="padding-left--md padding-bottom--md">
1219
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1220
- <div class="padding-left--md">
1221
-
1222
- The error root cause.
1223
-
1224
- </div>
1225
-
1226
-
1227
-
1228
- </div>
1229
-
1230
-
1231
- <div class="padding-left--md padding-bottom--md">
1232
- <strong>name</strong>: "AbortError"
1233
- <div class="padding-left--md">
1234
-
1235
- The error name.
1236
-
1237
- </div>
1238
-
1239
-
1240
-
1241
- </div>
1242
-
1243
-
1244
-
1245
- ### HttpClientNetworkError
1246
- <!-- default child "Interface" -->
1247
- Represents a situation when a network error occurred.
1248
-
1249
-
1250
- #### Properties
1251
-
1252
- <div class="padding-left--md padding-bottom--md">
1253
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1254
- <div class="padding-left--md">
1255
-
1256
- The error root cause.
1257
-
1258
- </div>
1259
-
1260
-
1261
-
1262
- </div>
1263
-
1264
-
1265
- <div class="padding-left--md padding-bottom--md">
1266
- <strong>name</strong>: "NetworkError"
1267
- <div class="padding-left--md">
1268
-
1269
- The error name.
1270
-
1271
- </div>
1272
-
1273
-
1274
-
1275
- </div>
1276
-
1277
-
1278
-
1279
- ### HttpClientRequestError
1280
- <!-- default child "Interface" -->
1281
- Represents a situation when the request is invalid and cannot be sent.
1282
-
1283
-
1284
- #### Properties
1285
-
1286
- <div class="padding-left--md padding-bottom--md">
1287
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1288
- <div class="padding-left--md">
1289
-
1290
- The error root cause.
1291
-
1292
- </div>
1293
-
1294
-
1295
-
1296
- </div>
1297
-
1298
-
1299
- <div class="padding-left--md padding-bottom--md">
1300
- <strong>name</strong>: "RequestError"
1301
- <div class="padding-left--md">
1302
-
1303
- The error name.
1304
-
1305
- </div>
1306
-
1307
-
1308
-
1309
- </div>
1310
-
1311
-
1312
-
1313
- ### HttpClientRequestOptions
1314
- <!-- default child "Interface" -->
1315
- Represents the options used to configure the request.
1316
-
1317
-
1318
- #### Properties
1319
-
1320
- <div class="padding-left--md padding-bottom--md">
1321
- <strong>abortSignal</strong>: <a href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal">AbortSignal</a>
1322
- <div class="padding-left--md">
1323
-
1324
- An AbortSignal instance that can be used to cancel the request.
1325
-
1326
- </div>
1327
-
1328
-
1329
-
1330
- </div>
1331
-
1332
-
1333
- <div class="padding-left--md padding-bottom--md">
1334
- <strong>body</strong>: <a href="#requestbodytypes">RequestBodyTypes</a>&lt;<a href="#t">T</a>&gt;
1335
- <div class="padding-left--md">
1336
-
1337
- A request body that will be send along with the request.
1338
- The structure of the request body needs to conform to the specified request body type.
1339
-
1340
- </div>
1341
-
1342
-
1343
-
1344
- </div>
1345
-
1346
-
1347
- <div class="padding-left--md padding-bottom--md">
1348
- <strong>headers</strong>: <a href="#headers">Headers</a>
1349
- <div class="padding-left--md">
1350
-
1351
- The request headers.
1352
-
1353
- </div>
1354
-
1355
-
1356
-
1357
- </div>
1358
-
1359
-
1360
- <div class="padding-left--md padding-bottom--md">
1361
- <strong>method</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1362
- <div class="padding-left--md">
1363
-
1364
- The request method, e.g. `GET`, `POST`.
1365
-
1366
- </div>
1367
-
1368
-
1369
-
1370
- </div>
1371
-
1372
-
1373
- <div class="padding-left--md padding-bottom--md">
1374
- <strong>requestBodyType</strong>: <a href="#t">T</a>
1375
- <div class="padding-left--md">
1376
-
1377
- The type of the request body. Can be `text`, `json`, `binary` or `form-data`.
1378
- The default request body type is `json`.
1379
-
1380
- </div>
1381
-
1382
-
215
+ - `HttpClientAbortError` - request was aborted.
1383
216
 
1384
217
  </div>
1385
218
 
219
+ #### Parameters
1386
220
 
1387
- <div class="padding-left--md padding-bottom--md">
1388
- <strong>statusValidator</strong>: <a href="#statusvalidator">StatusValidator</a>
1389
- <div class="padding-left--md">
221
+ | Name | Type | Description |
222
+ | ---------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------- |
223
+ | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt; | Options used to configure the request. |
224
+
225
+ #### Returns
1390
226
 
1391
- A custom status validator function.
1392
- If the status validator function returns `true` the returned promise resolves with the `HttpClientResponse`
1393
- Otherwise the promise rejects with the `StatusError`.
1394
- The default status validator function considers the `2xx` status codes as valid.
227
+ Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
1395
228
 
1396
229
  </div>
1397
230
 
231
+ ### PlatformHttpClientAbortError
1398
232
 
233
+ <!-- default child "Class" -->
1399
234
 
1400
- </div>
235
+ Represents a situation when the request was aborted.
1401
236
 
237
+ #### Constructors
238
+
239
+ ##### new PlatformHttpClientAbortError(cause)
1402
240
 
1403
- <div class="padding-left--md padding-bottom--md">
1404
- <strong>url</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1405
241
  <div class="padding-left--md">
1406
242
 
1407
- The URL of the resource to fetch.
243
+ #### Parameters
1408
244
 
1409
- </div>
245
+ | Name | Type |
246
+ | -------------------------- | ---------------------------------------------------------------------------------------- |
247
+ | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1410
248
 
249
+ </div>
1411
250
 
251
+ #### Properties
1412
252
 
1413
- </div>
253
+ | Name | Type | Description |
254
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
255
+ | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
256
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
257
+ | name<sup>\*required</sup> | "AbortError" | The error name. |
258
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
259
+ | prepareStackTrace | Object | |
260
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
1414
261
 
262
+ ### PlatformHttpClientRequestError
1415
263
 
264
+ <!-- default child "Class" -->
1416
265
 
1417
- ### HttpClientResponse
1418
- <!-- default child "Interface" -->
1419
- Represents the response to a request.
266
+ Represents a situation when the request is invalid and cannot be sent.
1420
267
 
268
+ #### Constructors
1421
269
 
1422
- #### Properties
270
+ ##### new PlatformHttpClientRequestError(cause)
1423
271
 
1424
- <div class="padding-left--md padding-bottom--md">
1425
- <strong>headers</strong>: <a href="#headers">Headers</a>
1426
272
  <div class="padding-left--md">
1427
273
 
1428
- The response headers.
274
+ #### Parameters
275
+
276
+ | Name | Type |
277
+ | -------------------------- | ---------------------------------------------------------------------------------------- |
278
+ | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1429
279
 
1430
280
  </div>
1431
281
 
282
+ #### Properties
1432
283
 
284
+ | Name | Type | Description |
285
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
286
+ | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
287
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
288
+ | name<sup>\*required</sup> | "RequestError" | The error name. |
289
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
290
+ | prepareStackTrace | Object | |
291
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
1433
292
 
1434
- </div>
293
+ ### PlatformHttpClientResponse
1435
294
 
295
+ <!-- default child "Class" -->
1436
296
 
1437
- <div class="padding-left--md padding-bottom--md">
1438
- <strong>status</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a>
1439
- <div class="padding-left--md">
297
+ Represents the response to a request.
1440
298
 
1441
- The status code of the response.
299
+ #### Constructors
1442
300
 
1443
- </div>
301
+ ##### new PlatformHttpClientResponse(response)
1444
302
 
303
+ <div class="padding-left--md">
304
+
305
+ #### Parameters
1445
306
 
307
+ | Name | Type |
308
+ | ----------------------------- | -------------------------------- |
309
+ | response<sup>\*required</sup> | <a href="#response">Response</a> |
1446
310
 
1447
311
  </div>
1448
312
 
313
+ #### Properties
1449
314
 
1450
- <div class="padding-left--md padding-bottom--md">
1451
- <strong>statusText</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1452
- <div class="padding-left--md">
315
+ | Name | Type |
316
+ | ----------------------------- | -------------------------------- |
317
+ | response<sup>\*required</sup> | <a href="#response">Response</a> |
1453
318
 
1454
- The status message corresponding to the status code.
319
+ #### Accessors
1455
320
 
1456
- </div>
321
+ ##### headers
1457
322
 
323
+ <!-- default child "Accessor" -->
1458
324
 
325
+ The response headers.
1459
326
 
1460
- </div>
327
+ ##### status
1461
328
 
329
+ <!-- default child "Accessor" -->
1462
330
 
1463
- <div class="padding-left--md padding-bottom--md">
1464
- <strong>url</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1465
- <div class="padding-left--md">
331
+ The status code of the response.
1466
332
 
1467
- The URL of the response.
333
+ ##### statusText
1468
334
 
1469
- </div>
335
+ <!-- default child "Accessor" -->
1470
336
 
337
+ The status message corresponding to the status code.
1471
338
 
339
+ ##### url
1472
340
 
1473
- </div>
341
+ <!-- default child "Accessor" -->
1474
342
 
343
+ The URL of the response.
1475
344
 
1476
345
  #### Methods
1477
346
 
1478
-
1479
347
  ##### body
1480
348
 
1481
349
  <div class="padding-bottom--md">
1482
- <strong>body(responseBodyType?): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
350
+ <strong>body(responseBodyType): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
1483
351
 
1484
352
  <div class="padding-left--md">
1485
353
 
1486
354
  Returns the response body in a form that conforms to the specified response body type.
1487
355
 
1488
-
1489
- **Parameters**
1490
-
1491
- <div class="padding-left--md padding-bottom--md">
1492
- <strong>responseBodyType</strong>: <a href="#t">T</a>
1493
- <div class="padding-left--md">
1494
-
1495
- The type of the response body.
1496
- Can be `text`, `json`, `binary`, `form-data`, `array-buffer`, `blob`, `readable-stream`, `buffer` or `stream`.
1497
- The default response body type is `json`.
1498
-
1499
356
  </div>
1500
357
 
358
+ #### Parameters
359
+
360
+ | Name | Type | Description |
361
+ | ------------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
362
+ | responseBodyType<sup>\*required</sup> | <a href="#t">T</a> | <p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
1501
363
 
364
+ <!-- no returns -->
1502
365
 
1503
366
  </div>
1504
367
 
368
+ ### PlatformHttpClientResponseError
1505
369
 
370
+ <!-- default child "Class" -->
1506
371
 
1507
- <!-- no returns -->
372
+ Represents a situation when the response status is considered invalid by the status validator.
1508
373
 
374
+ #### Constructors
1509
375
 
376
+ ##### new PlatformHttpClientResponseError(response)
1510
377
 
1511
- </div>
378
+ <div class="padding-left--md">
1512
379
 
380
+ #### Parameters
1513
381
 
382
+ | Name | Type |
383
+ | ----------------------------- | -------------------------------- |
384
+ | response<sup>\*required</sup> | <a href="#response">Response</a> |
1514
385
 
1515
386
  </div>
1516
387
 
388
+ #### Properties
1517
389
 
390
+ | Name | Type | Description |
391
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
392
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
393
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
394
+ | name<sup>\*required</sup> | "ResponseError" | The error name. |
395
+ | response<sup>\*required</sup> | <a href="#httpclientresponse">HttpClientResponse</a> | The response. |
396
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
397
+ | prepareStackTrace | Object | |
398
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
1518
399
 
400
+ ### PlatformUnsupportedOperationError
1519
401
 
1520
- ### HttpClientResponseError
1521
- <!-- default child "Interface" -->
1522
- Represents a situation when the response status is considered invalid by the status validator.
402
+ <!-- default child "Class" -->
1523
403
 
404
+ #### Constructors
1524
405
 
1525
- #### Properties
406
+ ##### new PlatformUnsupportedOperationError(message,cause?)
1526
407
 
1527
- <div class="padding-left--md padding-bottom--md">
1528
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1529
408
  <div class="padding-left--md">
1530
409
 
1531
- The error root cause.
410
+ #### Parameters
411
+
412
+ | Name | Type |
413
+ | ---------------------------- | ---------------------------------------------------------------------------------------- |
414
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
415
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1532
416
 
1533
417
  </div>
1534
418
 
419
+ #### Properties
1535
420
 
421
+ | Name | Type | Description |
422
+ | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
423
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
424
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
425
+ | name<sup>\*required</sup> | "UnsupportedOperationError" | The error name. |
426
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
427
+ | prepareStackTrace | Object | |
428
+ | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
1536
429
 
1537
- </div>
430
+ ## Interfaces
1538
431
 
432
+ ### AbortController
1539
433
 
1540
- <div class="padding-left--md padding-bottom--md">
1541
- <strong>name</strong>: "ResponseError"
1542
- <div class="padding-left--md">
434
+ <!-- default child "Interface" -->
1543
435
 
1544
- The error name.
436
+ Represents a controller object that allows to abort one or more requests as and when desired.
1545
437
 
1546
- </div>
438
+ #### Properties
1547
439
 
440
+ | Name | Type | Description |
441
+ | --------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
442
+ | signal<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal">AbortSignal</a> | Returns an AbortSignal object instance, which can be used to communicate with a request. |
1548
443
 
444
+ #### Methods
1549
445
 
1550
- </div>
446
+ ##### abort
1551
447
 
448
+ <div class="padding-bottom--md">
449
+ <strong>abort(): void</strong>
1552
450
 
1553
- <div class="padding-left--md padding-bottom--md">
1554
- <strong>response</strong>: <a href="#httpclientresponse">HttpClientResponse</a>
1555
451
  <div class="padding-left--md">
1556
452
 
1557
- The response.
453
+ Aborts a request before it has completed.
1558
454
 
1559
455
  </div>
1560
456
 
457
+ <!-- no parameters -->
1561
458
 
459
+ <!-- no returns -->
1562
460
 
1563
461
  </div>
1564
462
 
463
+ ### AbortSignal
1565
464
 
1566
-
1567
- ### JsonFormDataRequestField
1568
465
  <!-- default child "Interface" -->
1569
- Represents a JSON field.
1570
466
 
467
+ Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
1571
468
 
1572
469
  #### Properties
1573
470
 
1574
- <div class="padding-left--md padding-bottom--md">
1575
- <strong>contentType</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1576
- <div class="padding-left--md">
471
+ | Name | Type | Description |
472
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
473
+ | aborted<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Boolean">boolean</a> | A flag indicating whether the requests the signal is communicating with are aborted. |
474
+ | onabort<sup>\*required</sup> | null &#124; Object | Invoked when the requests the signal is communicating with are aborted. |
475
+ | reason<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | |
1577
476
 
1578
- The content type of the data contained in `value`.
1579
- The default content type for the JSON is 'application/json'.
477
+ #### Methods
1580
478
 
1581
- </div>
479
+ ##### throwIfAborted
1582
480
 
481
+ <div class="padding-bottom--md">
482
+ <strong>throwIfAborted(): void</strong>
1583
483
 
484
+ <div class="padding-left--md">
1584
485
 
1585
486
  </div>
1586
487
 
488
+ <!-- no parameters -->
1587
489
 
1588
- <div class="padding-left--md padding-bottom--md">
1589
- <strong>filename</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1590
- <div class="padding-left--md">
1591
-
1592
- The filename reported to the server.
1593
- The default filename for the JSON is 'json'.
490
+ <!-- no returns -->
1594
491
 
1595
492
  </div>
1596
493
 
494
+ ### BaseError
1597
495
 
496
+ <!-- default child "Interface" -->
1598
497
 
1599
- </div>
1600
-
498
+ #### Properties
1601
499
 
1602
- <div class="padding-left--md padding-bottom--md">
1603
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1604
- <div class="padding-left--md">
500
+ | Name | Type |
501
+ | ---------------------------- | ---------------------------------------------------------------------------------------- |
502
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
503
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
504
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
505
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
1605
506
 
1606
- The name of the field.
507
+ ### Binary
1607
508
 
1608
- </div>
509
+ <!-- default child "Interface" -->
1609
510
 
511
+ Represents an environment agnostic (browser vs node) abstraction layer for binary data.
1610
512
 
513
+ #### Methods
1611
514
 
1612
- </div>
515
+ ##### get
1613
516
 
517
+ <div class="padding-bottom--md">
518
+ <strong>get(type): <a href="#datatypes">DataTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
1614
519
 
1615
- <div class="padding-left--md padding-bottom--md">
1616
- <strong>type</strong>: "json"
1617
520
  <div class="padding-left--md">
1618
521
 
1619
- A JSON field type discriminator.
522
+ Returns the binary data in a form that conforms to the specified type.
1620
523
 
1621
524
  </div>
1622
525
 
526
+ #### Parameters
527
+
528
+ | Name | Type | Description |
529
+ | ------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
530
+ | type<sup>\*required</sup> | <a href="#t">T</a> | <p>The type of the data. Can be <code>text</code>, <code>json</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>.</p> |
1623
531
 
532
+ <!-- no returns -->
1624
533
 
1625
534
  </div>
1626
535
 
536
+ ### BinaryFormDataRequestField
1627
537
 
1628
- <div class="padding-left--md padding-bottom--md">
1629
- <strong>value</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1630
- <div class="padding-left--md">
538
+ <!-- default child "Interface" -->
1631
539
 
1632
- The field's value.
540
+ Represents an binary field.
1633
541
 
1634
- </div>
542
+ #### Properties
1635
543
 
544
+ | Name | Type | Description |
545
+ | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
546
+ | contentType | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The content type of the data contained in <code>value</code>. The default content type for the binary is 'application/octet-stream'.</p> |
547
+ | filename | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The filename reported to the server. The default filename for the binary is 'binary'.</p> |
548
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
549
+ | type<sup>\*required</sup> | "binary" | A binary field type discriminator. |
550
+ | value<sup>\*required</sup> | <a href="#arraybuffer">ArrayBuffer</a> &#124; <a href="#blob">Blob</a> &#124; <a href="#buffer">Buffer</a> &#124; <a href="#readable">Readable</a> &#124; <a href="#binary">Binary</a> &#124; <a href="#readablestream">ReadableStream</a>&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>&gt; &#124; <a href="#file">File</a> | The field's value. |
1636
551
 
552
+ ### BinaryFormDataResponseField
1637
553
 
1638
- </div>
554
+ <!-- default child "Interface" -->
555
+
556
+ #### Properties
1639
557
 
558
+ | Name | Type |
559
+ | -------------------------------- | ----------------------------------------------------------------------------- |
560
+ | contentType<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
561
+ | filename<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
562
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
563
+ | type<sup>\*required</sup> | "binary" |
564
+ | value<sup>\*required</sup> | <a href="#binary">Binary</a> |
1640
565
 
566
+ ### DataTypeError
1641
567
 
1642
- ### StatusValidator
1643
568
  <!-- default child "Interface" -->
1644
569
 
570
+ #### Properties
571
+
572
+ | Name | Type | Description |
573
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
574
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
575
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
576
+ | name<sup>\*required</sup> | "DataTypeError" | The error name. |
577
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1645
578
 
579
+ ### Headers
1646
580
 
1647
- ### TextFormDataRequestField
1648
581
  <!-- default child "Interface" -->
1649
- Represents a plain text field. No filename and content type is set.
1650
582
 
583
+ Represents http headers.
1651
584
 
1652
- #### Properties
1653
-
1654
- <div class="padding-left--md padding-bottom--md">
1655
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1656
- <div class="padding-left--md">
585
+ ### HttpClient
1657
586
 
1658
- The name of the field.
587
+ <!-- default child "Interface" -->
1659
588
 
1660
- </div>
589
+ The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
590
+ It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
1661
591
 
592
+ Currently, only the requests to the Platform Services and the Serverless Functions are supported.
1662
593
 
594
+ #### Methods
1663
595
 
1664
- </div>
596
+ ##### send
1665
597
 
598
+ <div class="padding-bottom--md">
599
+ <strong>send(options): <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise">Promise</a>&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
1666
600
 
1667
- <div class="padding-left--md padding-bottom--md">
1668
- <strong>type</strong>: "text"
1669
601
  <div class="padding-left--md">
1670
602
 
1671
- A plain text field type discriminator.
603
+ Sends an http request as configured by the `options`.
604
+ Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
605
+ when one of the following situations happen:
606
+
607
+ - `DataTypeError` - request body does not conform to the specified request body type,
608
+ - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
609
+ - `HttpClientResponseError` - response status is considered invalid by the status validator,
610
+ - `HttpClientAbortError` - request was aborted.
1672
611
 
1673
612
  </div>
1674
613
 
614
+ #### Parameters
615
+
616
+ | Name | Type | Description |
617
+ | ---------------------------- | ------------------------------------------------------------------------------------------ | -------------------------------------- |
618
+ | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;<a href="#t">T</a>&gt; | Options used to configure the request. |
619
+
620
+ #### Returns
1675
621
 
622
+ Promise<HttpClientResponse> A promise that resolves with the response object or rejects with an error.
1676
623
 
1677
624
  </div>
1678
625
 
626
+ ### HttpClientAbortError
1679
627
 
1680
- <div class="padding-left--md padding-bottom--md">
1681
- <strong>value</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1682
- <div class="padding-left--md">
628
+ <!-- default child "Interface" -->
1683
629
 
1684
- The field's value.
630
+ Represents a situation when the request was aborted.
1685
631
 
1686
- </div>
632
+ #### Properties
1687
633
 
634
+ | Name | Type | Description |
635
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
636
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
637
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
638
+ | name<sup>\*required</sup> | "AbortError" | The error name. |
639
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1688
640
 
641
+ ### HttpClientNetworkError
1689
642
 
1690
- </div>
643
+ <!-- default child "Interface" -->
1691
644
 
645
+ Represents a situation when a network error occurred.
1692
646
 
647
+ #### Properties
1693
648
 
1694
- ### TextFormDataResponseField
1695
- <!-- default child "Interface" -->
649
+ | Name | Type | Description |
650
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
651
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
652
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
653
+ | name<sup>\*required</sup> | "NetworkError" | The error name. |
654
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1696
655
 
656
+ ### HttpClientRequestError
1697
657
 
658
+ <!-- default child "Interface" -->
659
+
660
+ Represents a situation when the request is invalid and cannot be sent.
1698
661
 
1699
662
  #### Properties
1700
663
 
1701
- <div class="padding-left--md padding-bottom--md">
1702
- <strong>name</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1703
- <div class="padding-left--md">
664
+ | Name | Type | Description |
665
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
666
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
667
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
668
+ | name<sup>\*required</sup> | "RequestError" | The error name. |
669
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1704
670
 
671
+ ### HttpClientRequestOptions
1705
672
 
673
+ <!-- default child "Interface" -->
1706
674
 
1707
- </div>
675
+ Represents the options used to configure the request.
1708
676
 
677
+ #### Properties
1709
678
 
679
+ | Name | Type | Description |
680
+ | ------------------------ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
681
+ | body | <a href="#requestbodytypes">RequestBodyTypes</a>&lt;<a href="#t">T</a>&gt; | <p>A request body that will be send along with the request. The structure of the request body needs to conform to the specified request body type.</p> |
682
+ | headers | <a href="#headers">Headers</a> | The request headers. |
683
+ | method | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The request method, e.g. <code>GET</code>, <code>POST</code>. |
684
+ | requestBodyType | <a href="#t">T</a> | <p>The type of the request body. Can be <code>text</code>, <code>json</code>, <code>binary</code> or <code>form-data</code>. The default request body type is <code>json</code>.</p> |
685
+ | statusValidator | <a href="#statusvalidator">StatusValidator</a> | <p>A custom status validator function. If the status validator function returns <code>true</code> the returned promise resolves with the <code>HttpClientResponse</code> Otherwise the promise rejects with the <code>StatusError</code>. The default status validator function considers the <code>2xx</code> status codes as valid.</p> |
686
+ | url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL of the resource to fetch. |
1710
687
 
1711
- </div>
688
+ ### HttpClientResponse
1712
689
 
690
+ <!-- default child "Interface" -->
1713
691
 
1714
- <div class="padding-left--md padding-bottom--md">
1715
- <strong>type</strong>: "text"
1716
- <div class="padding-left--md">
692
+ Represents the response to a request.
1717
693
 
694
+ #### Properties
1718
695
 
696
+ | Name | Type | Description |
697
+ | ------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------- |
698
+ | headers<sup>\*required</sup> | <a href="#headers">Headers</a> | The response headers. |
699
+ | status<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The status code of the response. |
700
+ | statusText<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The status message corresponding to the status code. |
701
+ | url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL of the response. |
1719
702
 
1720
- </div>
703
+ #### Methods
704
+
705
+ ##### body
706
+
707
+ <div class="padding-bottom--md">
708
+ <strong>body(responseBodyType?): <a href="#responsebodytypes">ResponseBodyTypes</a>&lt;<a href="#t">T</a>&gt;</strong>
1721
709
 
710
+ <div class="padding-left--md">
1722
711
 
712
+ Returns the response body in a form that conforms to the specified response body type.
1723
713
 
1724
714
  </div>
1725
715
 
716
+ #### Parameters
1726
717
 
1727
- <div class="padding-left--md padding-bottom--md">
1728
- <strong>value</strong>: <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a>
1729
- <div class="padding-left--md">
1730
-
718
+ | Name | Type | Description |
719
+ | ---------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
720
+ | responseBodyType | <a href="#t">T</a> | <p>The type of the response body. Can be <code>text</code>, <code>json</code>, <code>binary</code>, <code>form-data</code>, <code>array-buffer</code>, <code>blob</code>, <code>readable-stream</code>, <code>buffer</code> or <code>stream</code>. The default response body type is <code>json</code>.</p> |
1731
721
 
722
+ <!-- no returns -->
1732
723
 
1733
724
  </div>
1734
725
 
726
+ ### HttpClientResponseError
1735
727
 
728
+ <!-- default child "Interface" -->
1736
729
 
1737
- </div>
730
+ Represents a situation when the response status is considered invalid by the status validator.
731
+
732
+ #### Properties
1738
733
 
734
+ | Name | Type | Description |
735
+ | ----------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
736
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
737
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
738
+ | name<sup>\*required</sup> | "ResponseError" | The error name. |
739
+ | response<sup>\*required</sup> | <a href="#httpclientresponse">HttpClientResponse</a> | The response. |
740
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1739
741
 
742
+ ### JsonFormDataRequestField
1740
743
 
1741
- ### UnsupportedOperationError
1742
744
  <!-- default child "Interface" -->
1743
745
 
1744
-
746
+ Represents a JSON field.
1745
747
 
1746
748
  #### Properties
1747
749
 
1748
- <div class="padding-left--md padding-bottom--md">
1749
- <strong>cause</strong>: <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>
1750
- <div class="padding-left--md">
750
+ | Name | Type | Description |
751
+ | -------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
752
+ | contentType | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The content type of the data contained in <code>value</code>. The default content type for the JSON is 'application/json'.</p> |
753
+ | filename | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | <p>The filename reported to the server. The default filename for the JSON is 'json'.</p> |
754
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
755
+ | type<sup>\*required</sup> | "json" | A JSON field type discriminator. |
756
+ | value<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The field's value. |
1751
757
 
1752
- The error root cause.
758
+ ### StatusValidator
1753
759
 
1754
- </div>
760
+ <!-- default child "Interface" -->
1755
761
 
762
+ ### TextFormDataRequestField
1756
763
 
764
+ <!-- default child "Interface" -->
1757
765
 
1758
- </div>
766
+ Represents a plain text field. No filename and content type is set.
1759
767
 
768
+ #### Properties
1760
769
 
1761
- <div class="padding-left--md padding-bottom--md">
1762
- <strong>name</strong>: "UnsupportedOperationError"
1763
- <div class="padding-left--md">
770
+ | Name | Type | Description |
771
+ | -------------------------- | ----------------------------------------------------------------------------- | -------------------------------------- |
772
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
773
+ | type<sup>\*required</sup> | "text" | A plain text field type discriminator. |
774
+ | value<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The field's value. |
1764
775
 
1765
- The error name.
776
+ ### TextFormDataResponseField
1766
777
 
1767
- </div>
778
+ <!-- default child "Interface" -->
779
+
780
+ #### Properties
1768
781
 
782
+ | Name | Type |
783
+ | -------------------------- | ----------------------------------------------------------------------------- |
784
+ | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
785
+ | type<sup>\*required</sup> | "text" |
786
+ | value<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
1769
787
 
788
+ ### UnsupportedOperationError
1770
789
 
1771
- </div>
790
+ <!-- default child "Interface" -->
791
+
792
+ #### Properties
1772
793
 
794
+ | Name | Type | Description |
795
+ | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
796
+ | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
797
+ | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
798
+ | name<sup>\*required</sup> | "UnsupportedOperationError" | The error name. |
799
+ | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1773
800
 
1774
801
  ## Variables
1775
802
 
@@ -1777,37 +804,22 @@ The error name.
1777
804
  <strong>PlatformAbortController</strong>: Object
1778
805
  <div class="padding-left--md">
1779
806
 
1780
-
1781
-
1782
807
  </div>
1783
808
 
1784
-
1785
-
1786
809
  </div>
1787
810
 
1788
-
1789
811
  <div class="padding-left--md padding-bottom--md">
1790
812
  <strong>PlatformAbortSignal</strong>: Object
1791
813
  <div class="padding-left--md">
1792
814
 
1793
-
1794
-
1795
815
  </div>
1796
816
 
1797
-
1798
-
1799
817
  </div>
1800
818
 
1801
-
1802
819
  <div class="padding-left--md padding-bottom--md">
1803
820
  <strong>httpClient</strong>: <a href="#httpclient">HttpClient</a>
1804
821
  <div class="padding-left--md">
1805
822
 
1806
-
1807
-
1808
823
  </div>
1809
824
 
1810
-
1811
-
1812
825
  </div>
1813
-