@dynatrace-sdk/http-client 1.0.10 → 1.2.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/docs/DOCS.md CHANGED
@@ -3,23 +3,19 @@ title: "@dynatrace-sdk/http-client"
3
3
  description: An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
4
4
  ---
5
5
 
6
+
6
7
  # @dynatrace-sdk/http-client
7
8
 
8
9
  An environment agnostic (browser/deno vs nodejs) abstraction layer for making HTTP calls.
9
10
 
10
- import NpmLogo from "@site/static/img/npm-logo.png";
11
+ import NpmLogo from '@site/static/img/npm-logo.png';
11
12
 
12
13
  <div class="row margin-bottom--md">
13
14
  <div class="col">
14
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client">
15
- <span class="margin-right--xs">@dynatrace-sdk/http-client</span>
16
- <img className="no-zoom" width="20px" src={NpmLogo} />
17
- </a>
15
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client" target="_blank" rel="noopener noreferrer"> <span class="margin-right--xs">@dynatrace-sdk/http-client</span> <img className="no-zoom" width="20px" src={NpmLogo} /> </a>
18
16
  </div>
19
- <div class="col" style={{ textAlign: "right" }}>
20
- <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.0.10">
21
- v1.0.10
22
- </a>
17
+ <div class="col" style={{textAlign: 'right'}}>
18
+ <a href="https://www.npmjs.com/package/@dynatrace-sdk/http-client/v/1.2.0" target="_blank" rel="noopener noreferrer">v1.2.0</a>
23
19
  </div>
24
20
  </div>
25
21
 
@@ -27,52 +23,59 @@ import NpmLogo from "@site/static/img/npm-logo.png";
27
23
  npm install @dynatrace-sdk/http-client
28
24
  ```
29
25
 
26
+
30
27
  ## Classes
31
28
 
32
29
  ### PlatformBaseError
33
-
34
30
  <!-- default child "Class" -->
35
31
 
32
+
33
+
36
34
  #### Constructors
37
35
 
38
36
  ##### new PlatformBaseError(message,cause?)
39
-
40
37
  <div class="padding-left--md">
41
38
 
42
39
  #### Parameters
43
40
 
44
- | Name | Type |
45
- | ---------------------------- | ---------------------------------------------------------------------------------------- |
46
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
47
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
41
+ | Name | Type |
42
+ | --- | --- |
43
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
44
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
45
+
46
+
47
+
48
48
 
49
49
  </div>
50
50
 
51
+
52
+
51
53
  #### Properties
52
54
 
53
- | Name | Type |
54
- | ------------------------------------ | ---------------------------------------------------------------------------------------- |
55
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
56
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
57
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
58
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
59
- | prepareStackTrace | Object |
60
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> |
55
+ | Name | Type |
56
+ | --- | --- |
57
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
58
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
59
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
60
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
61
+ |prepareStackTrace|Object|
62
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|
61
63
 
62
- ### PlatformBinary
63
64
 
65
+ ### PlatformBinary
64
66
  <!-- default child "Class" -->
65
-
66
67
  Represents an environment agnostic (browser vs node) abstraction layer for binary data.
67
68
 
69
+
68
70
  #### Properties
69
71
 
70
- | Name | Type |
71
- | ------------------------- | --------------------------------------------------------------- |
72
- | data<sup>\*required</sup> | ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; |
72
+ | Name | Type |
73
+ | --- | --- |
74
+ |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt;|
73
75
 
74
76
  #### Methods
75
77
 
78
+
76
79
  ##### get
77
80
 
78
81
  <div class="padding-bottom--md">
@@ -82,272 +85,420 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
82
85
 
83
86
  Returns the binary data in a form that conforms to the specified type.
84
87
 
88
+
89
+
85
90
  </div>
86
91
 
92
+
87
93
  #### Parameters
88
94
 
89
- | Name | Type | Description |
90
- | ------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
91
- | type<sup>\*required</sup> | T | <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> |
95
+ | Name | Type | Description |
96
+ | --- | --- | --- |
97
+ |type<sup>*required</sup>|T|<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> |
98
+
99
+
100
+
101
+
102
+
92
103
 
93
- {/* no returns */}
94
104
 
95
105
  </div>
96
106
 
107
+
108
+
109
+
97
110
  ##### from
98
111
 
99
112
  <div class="padding-bottom--md">
100
- <strong>from(data): <a href="#binary">Binary</a></strong>
113
+ <strong>from(data): [Binary](#binary)</strong>
101
114
 
102
115
  <div class="padding-left--md">
103
116
 
117
+
118
+
119
+
120
+
104
121
  </div>
105
122
 
123
+
106
124
  #### Parameters
107
125
 
108
- | Name | Type |
109
- | ------------------------- | --------------------------------------------------------------------------------------------- |
110
- | data<sup>\*required</sup> | ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable |
126
+ | Name | Type |
127
+ | --- | --- |
128
+ |data<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; ReadableStream&lt;Uint8Array&gt; &#124; Buffer &#124; Readable|
129
+
130
+
131
+
132
+
133
+
111
134
 
112
- {/* no returns */}
113
135
 
114
136
  </div>
115
137
 
138
+
139
+
140
+
116
141
  ##### fromJson
117
142
 
118
143
  <div class="padding-bottom--md">
119
- <strong>fromJson(json): <a href="#binary">Binary</a></strong>
144
+ <strong>fromJson(json): [Binary](#binary)</strong>
120
145
 
121
146
  <div class="padding-left--md">
122
147
 
148
+
149
+
150
+
151
+
123
152
  </div>
124
153
 
154
+
125
155
  #### Parameters
126
156
 
127
- | Name | Type |
128
- | ------------------------- | ---------------------------------------------------------------------------------------- |
129
- | json<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
157
+ | Name | Type |
158
+ | --- | --- |
159
+ |json<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
160
+
161
+
162
+
163
+
164
+
130
165
 
131
- {/* no returns */}
132
166
 
133
167
  </div>
134
168
 
169
+
170
+
171
+
135
172
  ##### fromText
136
173
 
137
174
  <div class="padding-bottom--md">
138
- <strong>fromText(text): <a href="#binary">Binary</a></strong>
175
+ <strong>fromText(text): [Binary](#binary)</strong>
139
176
 
140
177
  <div class="padding-left--md">
141
178
 
179
+
180
+
181
+
182
+
142
183
  </div>
143
184
 
185
+
144
186
  #### Parameters
145
187
 
146
- | Name | Type |
147
- | ------------------------- | ----------------------------------------------------------------------------- |
148
- | text<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
188
+ | Name | Type |
189
+ | --- | --- |
190
+ |text<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
191
+
192
+
193
+
194
+
195
+
149
196
 
150
- {/* no returns */}
151
197
 
152
198
  </div>
153
199
 
154
- ### PlatformDataTypeError
155
200
 
201
+
202
+
203
+ ### PlatformDataTypeError
156
204
  <!-- default child "Class" -->
157
205
 
206
+
207
+
158
208
  #### Constructors
159
209
 
160
210
  ##### new PlatformDataTypeError(message,cause?)
161
-
162
211
  <div class="padding-left--md">
163
212
 
164
213
  #### Parameters
165
214
 
166
- | Name | Type |
167
- | ---------------------------- | ---------------------------------------------------------------------------------------- |
168
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
169
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
215
+ | Name | Type |
216
+ | --- | --- |
217
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
218
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
219
+
220
+
221
+
170
222
 
171
223
  </div>
172
224
 
225
+
226
+
173
227
  #### Properties
174
228
 
175
- | Name | Type | Description |
176
- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
177
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
178
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
179
- | name<sup>\*required</sup> | "DataTypeError" | The error name. |
180
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
181
- | prepareStackTrace | Object | |
182
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
229
+ | Name | Type | Description |
230
+ | --- | --- | --- |
231
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
232
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
233
+ |name<sup>*required</sup>|"DataTypeError"|The error name. |
234
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
235
+ |prepareStackTrace|Object| |
236
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
183
237
 
184
- ### PlatformHttpClient
185
238
 
239
+ ### PlatformHttpClient
186
240
  <!-- default child "Class" -->
187
-
188
241
  The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
189
242
  It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
190
243
 
191
244
  Currently, only the requests to the Platform Services and the Serverless Functions are supported.
192
245
 
193
- #### Constructors
194
246
 
195
- ##### new PlatformHttpClient()
247
+ #### Constructors
196
248
 
249
+ ##### new PlatformHttpClient(options?)
197
250
  <div class="padding-left--md">
198
251
 
199
- {/* no parameters */}
252
+ #### Parameters
253
+
254
+ | Name | Type |
255
+ | --- | --- |
256
+ |options|HttpClientConfiguration|
257
+
258
+
259
+
200
260
 
201
261
  </div>
202
262
 
263
+
264
+
265
+ #### Properties
266
+
267
+ | Name | Type |
268
+ | --- | --- |
269
+ |_baseUrl<sup>*required</sup>|undefined &#124; [string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
270
+ |_defaultHeaders<sup>*required</sup>|undefined &#124; [Headers](#headers)|
271
+
203
272
  #### Methods
204
273
 
274
+
275
+ ##### _setBaseURL
276
+
277
+ <div class="padding-bottom--md">
278
+ <strong>_setBaseURL(baseUrl): void</strong>
279
+
280
+ <div class="padding-left--md">
281
+
282
+ Sets HTTP Client Instance baseUrl param to the incoming value `baseUrl`.
283
+
284
+
285
+
286
+ </div>
287
+
288
+
289
+ #### Parameters
290
+
291
+ | Name | Type | Description |
292
+ | --- | --- | --- |
293
+ |baseUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|Base URL used in the request path. |
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+ </div>
302
+
303
+
304
+
305
+
306
+ ##### _setDefaultHeaders
307
+
308
+ <div class="padding-bottom--md">
309
+ <strong>_setDefaultHeaders(defaultHeaders): void</strong>
310
+
311
+ <div class="padding-left--md">
312
+
313
+ Sets HTTP Client Instance defaultHeaders param to the incoming value `defaultHeaders`.
314
+
315
+
316
+
317
+ </div>
318
+
319
+
320
+ #### Parameters
321
+
322
+ | Name | Type | Description |
323
+ | --- | --- | --- |
324
+ |defaultHeaders<sup>*required</sup>|[Headers](#headers)|HTTP Headers to be used in outgoing requests. |
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ </div>
333
+
334
+
335
+
336
+
205
337
  ##### send
206
338
 
207
339
  <div class="padding-bottom--md">
208
- <strong>send(options): Promise&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
340
+ <strong>send(options): Promise&lt;[HttpClientResponse](#httpclientresponse)&gt;</strong>
209
341
 
210
342
  <div class="padding-left--md">
211
343
 
212
344
  Sends an http request as configured by the `options`.
213
345
  Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
214
346
  when one of the following situations happen:
215
-
216
347
  - `DataTypeError` - request body does not conform to the specified request body type,
217
348
  - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
218
349
  - `HttpClientResponseError` - response status is considered invalid by the status validator,
219
350
  - `HttpClientAbortError` - request was aborted.
220
351
 
352
+
353
+
221
354
  </div>
222
355
 
356
+
223
357
  #### Parameters
224
358
 
225
- | Name | Type | Description |
226
- | ---------------------------- | ------------------------------------------------------------------------- | -------------------------------------- |
227
- | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;T&gt; | Options used to configure the request. |
359
+ | Name | Type | Description |
360
+ | --- | --- | --- |
361
+ |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
362
+
363
+
364
+
228
365
 
229
366
  #### Returns
230
367
 
231
368
  Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the response object or rejects with an error.
232
369
 
370
+
371
+
372
+
233
373
  </div>
234
374
 
235
- ### PlatformHttpClientAbortError
236
375
 
237
- <!-- default child "Class" -->
238
376
 
377
+
378
+ ### PlatformHttpClientAbortError
379
+ <!-- default child "Class" -->
239
380
  Represents a situation when the request was aborted.
240
381
 
382
+
241
383
  #### Constructors
242
384
 
243
385
  ##### new PlatformHttpClientAbortError(cause)
244
-
245
386
  <div class="padding-left--md">
246
387
 
247
388
  #### Parameters
248
389
 
249
- | Name | Type |
250
- | -------------------------- | ---------------------------------------------------------------------------------------- |
251
- | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
390
+ | Name | Type |
391
+ | --- | --- |
392
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
393
+
394
+
395
+
252
396
 
253
397
  </div>
254
398
 
399
+
400
+
255
401
  #### Properties
256
402
 
257
- | Name | Type | Description |
258
- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
259
- | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
260
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
261
- | name<sup>\*required</sup> | "AbortError" | The error name. |
262
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
263
- | prepareStackTrace | Object | |
264
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
403
+ | Name | Type | Description |
404
+ | --- | --- | --- |
405
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
406
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
407
+ |name<sup>*required</sup>|"AbortError"|The error name. |
408
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
409
+ |prepareStackTrace|Object| |
410
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
265
411
 
266
- ### PlatformHttpClientRequestError
267
412
 
413
+ ### PlatformHttpClientRequestError
268
414
  <!-- default child "Class" -->
269
-
270
415
  Represents a situation when the request is invalid and cannot be sent.
271
416
 
417
+
272
418
  #### Constructors
273
419
 
274
420
  ##### new PlatformHttpClientRequestError(cause)
275
-
276
421
  <div class="padding-left--md">
277
422
 
278
423
  #### Parameters
279
424
 
280
- | Name | Type |
281
- | -------------------------- | ---------------------------------------------------------------------------------------- |
282
- | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
425
+ | Name | Type |
426
+ | --- | --- |
427
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
428
+
429
+
430
+
283
431
 
284
432
  </div>
285
433
 
434
+
435
+
286
436
  #### Properties
287
437
 
288
- | Name | Type | Description |
289
- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
290
- | cause<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
291
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
292
- | name<sup>\*required</sup> | "RequestError" | The error name. |
293
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
294
- | prepareStackTrace | Object | |
295
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
438
+ | Name | Type | Description |
439
+ | --- | --- | --- |
440
+ |cause<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
441
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
442
+ |name<sup>*required</sup>|"RequestError"|The error name. |
443
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
444
+ |prepareStackTrace|Object| |
445
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
296
446
 
297
- ### PlatformHttpClientResponse
298
447
 
448
+ ### PlatformHttpClientResponse
299
449
  <!-- default child "Class" -->
300
-
301
450
  Represents the response to a request.
302
451
 
452
+
303
453
  #### Constructors
304
454
 
305
455
  ##### new PlatformHttpClientResponse(response)
306
-
307
456
  <div class="padding-left--md">
308
457
 
309
458
  #### Parameters
310
459
 
311
- | Name | Type |
312
- | ----------------------------- | -------- |
313
- | response<sup>\*required</sup> | Response |
460
+ | Name | Type |
461
+ | --- | --- |
462
+ |response<sup>*required</sup>|Response|
463
+
464
+
465
+
314
466
 
315
467
  </div>
316
468
 
469
+
470
+
317
471
  #### Properties
318
472
 
319
- | Name | Type |
320
- | ----------------------------- | -------- |
321
- | response<sup>\*required</sup> | Response |
473
+ | Name | Type |
474
+ | --- | --- |
475
+ |response<sup>*required</sup>|Response|
322
476
 
323
477
  #### Accessors
324
478
 
325
479
  ##### headers
326
-
327
480
  <!-- default child "Accessor" -->
328
-
329
481
  The response headers.
330
482
 
331
- ##### status
332
483
 
484
+ ##### status
333
485
  <!-- default child "Accessor" -->
334
-
335
486
  The status code of the response.
336
487
 
337
- ##### statusText
338
488
 
489
+ ##### statusText
339
490
  <!-- default child "Accessor" -->
340
-
341
491
  The status message corresponding to the status code.
342
492
 
343
- ##### url
344
493
 
494
+ ##### url
345
495
  <!-- default child "Accessor" -->
346
-
347
496
  The URL of the response.
348
497
 
498
+
349
499
  #### Methods
350
500
 
501
+
351
502
  ##### body
352
503
 
353
504
  <div class="padding-bottom--md">
@@ -357,99 +508,180 @@ The URL of the response.
357
508
 
358
509
  Returns the response body in a form that conforms to the specified response body type.
359
510
 
511
+
512
+
360
513
  </div>
361
514
 
515
+
362
516
  #### Parameters
363
517
 
364
- | Name | Type | Description |
365
- | ------------------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
366
- | responseBodyType<sup>\*required</sup> | T | <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> |
518
+ | Name | Type | Description |
519
+ | --- | --- | --- |
520
+ |responseBodyType<sup>*required</sup>|T|<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> |
521
+
522
+
523
+
524
+
525
+
367
526
 
368
- {/* no returns */}
369
527
 
370
528
  </div>
371
529
 
372
- ### PlatformHttpClientResponseError
373
530
 
374
- <!-- default child "Class" -->
375
531
 
532
+
533
+ ### PlatformHttpClientResponseError
534
+ <!-- default child "Class" -->
376
535
  Represents a situation when the response status is considered invalid by the status validator.
377
536
 
537
+
378
538
  #### Constructors
379
539
 
380
540
  ##### new PlatformHttpClientResponseError(response,data?)
381
-
382
541
  <div class="padding-left--md">
383
542
 
384
543
  #### Parameters
385
544
 
386
- | Name | Type |
387
- | ----------------------------- | ----------------------------------------------------------------------------- |
388
- | response<sup>\*required</sup> | Response |
389
- | data | Object |
390
- | data.requestMethod | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
545
+ | Name | Type |
546
+ | --- | --- |
547
+ |response<sup>*required</sup>|Response|
548
+ |data|Object|
549
+ |data.requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
550
+
551
+
552
+
391
553
 
392
554
  </div>
393
555
 
556
+
557
+
394
558
  #### Properties
395
559
 
396
- | Name | Type | Description |
397
- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
398
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
399
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
400
- | name<sup>\*required</sup> | "ResponseError" | The error name. |
401
- | requestMethod | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
402
- | response<sup>\*required</sup> | <a href="#httpclientresponse">HttpClientResponse</a> | The response. |
403
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
404
- | prepareStackTrace | Object | |
405
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
560
+ | Name | Type | Description |
561
+ | --- | --- | --- |
562
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
563
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
564
+ |name<sup>*required</sup>|"ResponseError"|The error name. |
565
+ |requestMethod|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
566
+ |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response. |
567
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
568
+ |prepareStackTrace|Object| |
569
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
406
570
 
407
- ### PlatformUnsupportedOperationError
408
571
 
572
+ ### PlatformUnsupportedOperationError
409
573
  <!-- default child "Class" -->
410
574
 
575
+
576
+
411
577
  #### Constructors
412
578
 
413
579
  ##### new PlatformUnsupportedOperationError(message,cause?)
414
-
415
580
  <div class="padding-left--md">
416
581
 
417
582
  #### Parameters
418
583
 
419
- | Name | Type |
420
- | ---------------------------- | ---------------------------------------------------------------------------------------- |
421
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
422
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
584
+ | Name | Type |
585
+ | --- | --- |
586
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
587
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
588
+
589
+
590
+
423
591
 
424
592
  </div>
425
593
 
594
+
595
+
426
596
  #### Properties
427
597
 
428
- | Name | Type | Description |
429
- | ------------------------------------ | ---------------------------------------------------------------------------------------- | --------------------- |
430
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
431
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
432
- | name<sup>\*required</sup> | "UnsupportedOperationError" | The error name. |
433
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
434
- | prepareStackTrace | Object | |
435
- | stackTraceLimit<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | |
598
+ | Name | Type | Description |
599
+ | --- | --- | --- |
600
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
601
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
602
+ |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
603
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
604
+ |prepareStackTrace|Object| |
605
+ |stackTraceLimit<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)| |
606
+
607
+
608
+ ### _OAuthHttpClient
609
+ <!-- default child "Class" -->
610
+ DO NOT USE - internal use only.
611
+
612
+
613
+ #### Constructors
614
+
615
+ ##### new _OAuthHttpClient(config)
616
+
617
+
618
+
619
+ #### Properties
620
+
621
+ | Name | Type |
622
+ | --- | --- |
623
+ |oauthToken|OAuthToken|
624
+
625
+ #### Methods
626
+
627
+
628
+ ##### send
629
+
630
+ <div class="padding-bottom--md">
631
+ <strong>send(options): Promise&lt;[HttpClientResponse](#httpclientresponse)&gt;</strong>
632
+
633
+ <div class="padding-left--md">
634
+
635
+ Sends an http request as configured by the `options`.
636
+ Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
637
+ when one of the following situations happen:
638
+ - `DataTypeError` - request body does not conform to the specified request body type,
639
+ - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
640
+ - `HttpClientResponseError` - response status is considered invalid by the status validator,
641
+ - `HttpClientAbortError` - request was aborted.
642
+
643
+
644
+
645
+ </div>
646
+
647
+
648
+ #### Parameters
649
+
650
+ | Name | Type | Description |
651
+ | --- | --- | --- |
652
+ |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
653
+
654
+
655
+
656
+
657
+ #### Returns
658
+
659
+ Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the response object or rejects with an error.
660
+
661
+
662
+
663
+
664
+ </div>
665
+
666
+
667
+
436
668
 
437
669
  ## Interfaces
438
670
 
439
671
  ### AbortController
440
-
441
672
  <!-- default child "Interface" -->
442
-
443
673
  Represents a controller object that allows to abort one or more requests as and when desired.
444
674
 
675
+
445
676
  #### Properties
446
677
 
447
- | Name | Type | Description |
448
- | --------------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
449
- | 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. |
678
+ | Name | Type | Description |
679
+ | --- | --- | --- |
680
+ |signal<sup>*required</sup>|[AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal)|Returns an AbortSignal object instance, which can be used to communicate with a request. |
450
681
 
451
682
  #### Methods
452
683
 
684
+
453
685
  ##### abort
454
686
 
455
687
  <div class="padding-bottom--md">
@@ -459,30 +691,36 @@ Represents a controller object that allows to abort one or more requests as and
459
691
 
460
692
  Aborts a request before it has completed.
461
693
 
694
+
695
+
462
696
  </div>
463
697
 
464
- {/* no parameters */}
465
698
 
466
- {/* no returns */}
699
+
700
+
701
+
467
702
 
468
703
  </div>
469
704
 
470
- ### AbortSignal
471
705
 
472
- <!-- default child "Interface" -->
473
706
 
707
+
708
+ ### AbortSignal
709
+ <!-- default child "Interface" -->
474
710
  Represents a signal object that allows to communicate with the request and abort it using the `AbortController`.
475
711
 
712
+
476
713
  #### Properties
477
714
 
478
- | Name | Type | Description |
479
- | ---------------------------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
480
- | 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. |
481
- | onabort<sup>\*required</sup> | null &#124; Object | Invoked when the requests the signal is communicating with are aborted. |
482
- | reason<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | |
715
+ | Name | Type | Description |
716
+ | --- | --- | --- |
717
+ |aborted<sup>*required</sup>|[boolean](https://developer.mozilla.org/en-US/docs/Glossary/Boolean)|A flag indicating whether the requests the signal is communicating with are aborted. |
718
+ |onabort<sup>*required</sup>|null &#124; Object|Invoked when the requests the signal is communicating with are aborted. |
719
+ |reason<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)| |
483
720
 
484
721
  #### Methods
485
722
 
723
+
486
724
  ##### throwIfAborted
487
725
 
488
726
  <div class="padding-bottom--md">
@@ -490,35 +728,45 @@ Represents a signal object that allows to communicate with the request and abort
490
728
 
491
729
  <div class="padding-left--md">
492
730
 
731
+
732
+
733
+
734
+
493
735
  </div>
494
736
 
495
- {/* no parameters */}
496
737
 
497
- {/* no returns */}
738
+
739
+
740
+
498
741
 
499
742
  </div>
500
743
 
501
- ### BaseError
502
744
 
745
+
746
+
747
+ ### BaseError
503
748
  <!-- default child "Interface" -->
504
749
 
750
+
751
+
505
752
  #### Properties
506
753
 
507
- | Name | Type |
508
- | ---------------------------- | ---------------------------------------------------------------------------------------- |
509
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
510
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
511
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
512
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
754
+ | Name | Type |
755
+ | --- | --- |
756
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
757
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
758
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
759
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
513
760
 
514
- ### Binary
515
761
 
762
+ ### Binary
516
763
  <!-- default child "Interface" -->
517
-
518
764
  Represents an environment agnostic (browser vs node) abstraction layer for binary data.
519
765
 
766
+
520
767
  #### Methods
521
768
 
769
+
522
770
  ##### get
523
771
 
524
772
  <div class="padding-bottom--md">
@@ -528,187 +776,211 @@ Represents an environment agnostic (browser vs node) abstraction layer for binar
528
776
 
529
777
  Returns the binary data in a form that conforms to the specified type.
530
778
 
779
+
780
+
531
781
  </div>
532
782
 
783
+
533
784
  #### Parameters
534
785
 
535
- | Name | Type | Description |
536
- | ------------------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
537
- | type<sup>\*required</sup> | T | <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> |
786
+ | Name | Type | Description |
787
+ | --- | --- | --- |
788
+ |type<sup>*required</sup>|T|<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> |
789
+
790
+
791
+
792
+
793
+
538
794
 
539
- {/* no returns */}
540
795
 
541
796
  </div>
542
797
 
543
- ### BinaryFormDataRequestField
544
798
 
545
- <!-- default child "Interface" -->
546
799
 
800
+
801
+ ### BinaryFormDataRequestField
802
+ <!-- default child "Interface" -->
547
803
  Represents an binary field.
548
804
 
805
+
549
806
  #### Properties
550
807
 
551
- | Name | Type | Description |
552
- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
553
- | 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> |
554
- | 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> |
555
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
556
- | type<sup>\*required</sup> | "binary" | A binary field type discriminator. |
557
- | value<sup>\*required</sup> | ArrayBuffer &#124; Blob &#124; Buffer &#124; Readable &#124; <a href="#binary">Binary</a> &#124; ReadableStream&lt;<a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a>&gt; &#124; File | The field's value. |
808
+ | Name | Type | Description |
809
+ | --- | --- | --- |
810
+ |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the binary is 'application/octet-stream'.</p> |
811
+ |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the binary is 'binary'.</p> |
812
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
813
+ |type<sup>*required</sup>|"binary"|A binary field type discriminator. |
814
+ |value<sup>*required</sup>|ArrayBuffer &#124; Blob &#124; Buffer &#124; Readable &#124; [Binary](#binary) &#124; ReadableStream&lt;[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)&gt; &#124; File|The field's value. |
558
815
 
559
- ### BinaryFormDataResponseField
560
816
 
817
+ ### BinaryFormDataResponseField
561
818
  <!-- default child "Interface" -->
562
819
 
820
+
821
+
563
822
  #### Properties
564
823
 
565
- | Name | Type |
566
- | -------------------------------- | ----------------------------------------------------------------------------- |
567
- | contentType<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
568
- | filename<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
569
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
570
- | type<sup>\*required</sup> | "binary" |
571
- | value<sup>\*required</sup> | <a href="#binary">Binary</a> |
824
+ | Name | Type |
825
+ | --- | --- |
826
+ |contentType<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
827
+ |filename<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
828
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
829
+ |type<sup>*required</sup>|"binary"|
830
+ |value<sup>*required</sup>|[Binary](#binary)|
572
831
 
573
- ### DataTypeError
574
832
 
833
+ ### DataTypeError
575
834
  <!-- default child "Interface" -->
576
835
 
836
+
837
+
577
838
  #### Properties
578
839
 
579
- | Name | Type | Description |
580
- | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
581
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
582
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
583
- | name<sup>\*required</sup> | "DataTypeError" | The error name. |
584
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
840
+ | Name | Type | Description |
841
+ | --- | --- | --- |
842
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
843
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
844
+ |name<sup>*required</sup>|"DataTypeError"|The error name. |
845
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
585
846
 
586
- ### Headers
587
847
 
848
+ ### Headers
588
849
  <!-- default child "Interface" -->
589
-
590
850
  Represents http headers.
591
851
 
592
- ### HttpClient
593
852
 
853
+ ### HttpClient
594
854
  <!-- default child "Interface" -->
595
-
596
855
  The http client that serves as an environment agnostic (browser vs node) abstraction for making http calls.
597
856
  It handles the authentication of the requests made to the Platform Services and the Serverless Functions.
598
857
 
599
858
  Currently, only the requests to the Platform Services and the Serverless Functions are supported.
600
859
 
860
+
601
861
  #### Methods
602
862
 
863
+
603
864
  ##### send
604
865
 
605
866
  <div class="padding-bottom--md">
606
- <strong>send(options): Promise&lt;<a href="#httpclientresponse">HttpClientResponse</a>&gt;</strong>
867
+ <strong>send(options): Promise&lt;[HttpClientResponse](#httpclientresponse)&gt;</strong>
607
868
 
608
869
  <div class="padding-left--md">
609
870
 
610
871
  Sends an http request as configured by the `options`.
611
872
  Returns a promise that resolves with a response object for successful requests or rejects with an appropriate error
612
873
  when one of the following situations happen:
613
-
614
874
  - `DataTypeError` - request body does not conform to the specified request body type,
615
875
  - `HttpClientRequestError` - request cannot be sent (e.g. due to network error or invalid request),
616
876
  - `HttpClientResponseError` - response status is considered invalid by the status validator,
617
877
  - `HttpClientAbortError` - request was aborted.
618
878
 
879
+
880
+
619
881
  </div>
620
882
 
883
+
621
884
  #### Parameters
622
885
 
623
- | Name | Type | Description |
624
- | ---------------------------- | ------------------------------------------------------------------------- | -------------------------------------- |
625
- | options<sup>\*required</sup> | <a href="#httpclientrequestoptions">HttpClientRequestOptions</a>&lt;T&gt; | Options used to configure the request. |
886
+ | Name | Type | Description |
887
+ | --- | --- | --- |
888
+ |options<sup>*required</sup>|[HttpClientRequestOptions](#httpclientrequestoptions)&lt;T&gt;|Options used to configure the request. |
889
+
890
+
891
+
626
892
 
627
893
  #### Returns
628
894
 
629
895
  Promise&amp;lt;HttpClientResponse&amp;gt; A promise that resolves with the response object or rejects with an error.
630
896
 
897
+
898
+
899
+
631
900
  </div>
632
901
 
633
- ### HttpClientAbortError
634
902
 
635
- <!-- default child "Interface" -->
636
903
 
904
+
905
+ ### HttpClientAbortError
906
+ <!-- default child "Interface" -->
637
907
  Represents a situation when the request was aborted.
638
908
 
909
+
639
910
  #### Properties
640
911
 
641
- | Name | Type | Description |
642
- | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
643
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
644
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
645
- | name<sup>\*required</sup> | "AbortError" | The error name. |
646
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
912
+ | Name | Type | Description |
913
+ | --- | --- | --- |
914
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
915
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
916
+ |name<sup>*required</sup>|"AbortError"|The error name. |
917
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
647
918
 
648
- ### HttpClientNetworkError
649
919
 
920
+ ### HttpClientNetworkError
650
921
  <!-- default child "Interface" -->
651
-
652
922
  Represents a situation when a network error occurred.
653
923
 
924
+
654
925
  #### Properties
655
926
 
656
- | Name | Type | Description |
657
- | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
658
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
659
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
660
- | name<sup>\*required</sup> | "NetworkError" | The error name. |
661
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
927
+ | Name | Type | Description |
928
+ | --- | --- | --- |
929
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
930
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
931
+ |name<sup>*required</sup>|"NetworkError"|The error name. |
932
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
662
933
 
663
- ### HttpClientRequestError
664
934
 
935
+ ### HttpClientRequestError
665
936
  <!-- default child "Interface" -->
666
-
667
937
  Represents a situation when the request is invalid and cannot be sent.
668
938
 
939
+
669
940
  #### Properties
670
941
 
671
- | Name | Type | Description |
672
- | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
673
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
674
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
675
- | name<sup>\*required</sup> | "RequestError" | The error name. |
676
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
942
+ | Name | Type | Description |
943
+ | --- | --- | --- |
944
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
945
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
946
+ |name<sup>*required</sup>|"RequestError"|The error name. |
947
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
677
948
 
678
- ### HttpClientRequestOptions
679
949
 
950
+ ### HttpClientRequestOptions
680
951
  <!-- default child "Interface" -->
681
-
682
952
  Represents the options used to configure the request.
683
953
 
954
+
684
955
  #### Properties
685
956
 
686
- | Name | Type | Description |
687
- | ------------------------ | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
688
- | body | RequestBodyTypes&lt;T&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> |
689
- | headers | <a href="#headers">Headers</a> | The request headers. |
690
- | 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>. |
691
- | requestBodyType | T | <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> |
692
- | 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> |
693
- | url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL of the resource to fetch. |
957
+ | Name | Type | Description |
958
+ | --- | --- | --- |
959
+ |body|RequestBodyTypes&lt;T&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> |
960
+ |headers|[Headers](#headers)|The request headers. |
961
+ |method|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The request method, e.g. <code>GET</code>, <code>POST</code>. |
962
+ |requestBodyType|T|<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> |
963
+ |statusValidator|[StatusValidator](#statusvalidator)|<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> |
964
+ |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL of the resource to fetch. |
694
965
 
695
- ### HttpClientResponse
696
966
 
967
+ ### HttpClientResponse
697
968
  <!-- default child "Interface" -->
698
-
699
969
  Represents the response to a request.
700
970
 
971
+
701
972
  #### Properties
702
973
 
703
- | Name | Type | Description |
704
- | ------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------- |
705
- | headers<sup>\*required</sup> | <a href="#headers">Headers</a> | The response headers. |
706
- | status<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/Number">number</a> | The status code of the response. |
707
- | 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. |
708
- | url<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The URL of the response. |
974
+ | Name | Type | Description |
975
+ | --- | --- | --- |
976
+ |headers<sup>*required</sup>|[Headers](#headers)|The response headers. |
977
+ |status<sup>*required</sup>|[number](https://developer.mozilla.org/en-US/docs/Glossary/Number)|The status code of the response. |
978
+ |statusText<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The status message corresponding to the status code. |
979
+ |url<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The URL of the response. |
709
980
 
710
981
  #### Methods
711
982
 
983
+
712
984
  ##### body
713
985
 
714
986
  <div class="padding-bottom--md">
@@ -718,92 +990,123 @@ Represents the response to a request.
718
990
 
719
991
  Returns the response body in a form that conforms to the specified response body type.
720
992
 
993
+
994
+
721
995
  </div>
722
996
 
997
+
723
998
  #### Parameters
724
999
 
725
- | Name | Type | Description |
726
- | ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
727
- | responseBodyType | T | <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> |
1000
+ | Name | Type | Description |
1001
+ | --- | --- | --- |
1002
+ |responseBodyType|T|<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> |
1003
+
1004
+
1005
+
1006
+
1007
+
728
1008
 
729
- {/* no returns */}
730
1009
 
731
1010
  </div>
732
1011
 
733
- ### HttpClientResponseError
734
1012
 
735
- <!-- default child "Interface" -->
736
1013
 
1014
+
1015
+ ### HttpClientResponseError
1016
+ <!-- default child "Interface" -->
737
1017
  Represents a situation when the response status is considered invalid by the status validator.
738
1018
 
1019
+
739
1020
  #### Properties
740
1021
 
741
- | Name | Type | Description |
742
- | ----------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
743
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
744
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
745
- | name<sup>\*required</sup> | "ResponseError" | The error name. |
746
- | response<sup>\*required</sup> | <a href="#httpclientresponse">HttpClientResponse</a> | The response. |
747
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1022
+ | Name | Type | Description |
1023
+ | --- | --- | --- |
1024
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
1025
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
1026
+ |name<sup>*required</sup>|"ResponseError"|The error name. |
1027
+ |response<sup>*required</sup>|[HttpClientResponse](#httpclientresponse)|The response. |
1028
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
748
1029
 
749
- ### JsonFormDataRequestField
750
1030
 
1031
+ ### JsonFormDataRequestField
751
1032
  <!-- default child "Interface" -->
752
-
753
1033
  Represents a JSON field.
754
1034
 
1035
+
755
1036
  #### Properties
756
1037
 
757
- | Name | Type | Description |
758
- | -------------------------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
759
- | 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> |
760
- | 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> |
761
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
762
- | type<sup>\*required</sup> | "json" | A JSON field type discriminator. |
763
- | value<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The field's value. |
1038
+ | Name | Type | Description |
1039
+ | --- | --- | --- |
1040
+ |contentType|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The content type of the data contained in <code>value</code>. The default content type for the JSON is 'application/json'.</p> |
1041
+ |filename|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|<p>The filename reported to the server. The default filename for the JSON is 'json'.</p> |
1042
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
1043
+ |type<sup>*required</sup>|"json"|A JSON field type discriminator. |
1044
+ |value<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The field's value. |
764
1045
 
765
- ### StatusValidator
766
1046
 
1047
+ ### StatusValidator
767
1048
  <!-- default child "Interface" -->
768
1049
 
769
- ### TextFormDataRequestField
770
1050
 
771
- <!-- default child "Interface" -->
772
1051
 
1052
+ ### TextFormDataRequestField
1053
+ <!-- default child "Interface" -->
773
1054
  Represents a plain text field. No filename and content type is set.
774
1055
 
1056
+
775
1057
  #### Properties
776
1058
 
777
- | Name | Type | Description |
778
- | -------------------------- | ----------------------------------------------------------------------------- | -------------------------------------- |
779
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The name of the field. |
780
- | type<sup>\*required</sup> | "text" | A plain text field type discriminator. |
781
- | value<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | The field's value. |
1059
+ | Name | Type | Description |
1060
+ | --- | --- | --- |
1061
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The name of the field. |
1062
+ |type<sup>*required</sup>|"text"|A plain text field type discriminator. |
1063
+ |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|The field's value. |
782
1064
 
783
- ### TextFormDataResponseField
784
1065
 
1066
+ ### TextFormDataResponseField
785
1067
  <!-- default child "Interface" -->
786
1068
 
1069
+
1070
+
787
1071
  #### Properties
788
1072
 
789
- | Name | Type |
790
- | -------------------------- | ----------------------------------------------------------------------------- |
791
- | name<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
792
- | type<sup>\*required</sup> | "text" |
793
- | value<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> |
1073
+ | Name | Type |
1074
+ | --- | --- |
1075
+ |name<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1076
+ |type<sup>*required</sup>|"text"|
1077
+ |value<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1078
+
794
1079
 
795
1080
  ### UnsupportedOperationError
1081
+ <!-- default child "Interface" -->
1082
+
1083
+
1084
+
1085
+ #### Properties
1086
+
1087
+ | Name | Type | Description |
1088
+ | --- | --- | --- |
1089
+ |cause|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|The error root cause. |
1090
+ |message<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
1091
+ |name<sup>*required</sup>|"UnsupportedOperationError"|The error name. |
1092
+ |stack|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)| |
796
1093
 
1094
+
1095
+ ### _OAuthHttpClientConfig
797
1096
  <!-- default child "Interface" -->
1097
+ DO NOT USE - internal use only.
1098
+
798
1099
 
799
1100
  #### Properties
800
1101
 
801
- | Name | Type | Description |
802
- | ---------------------------- | ---------------------------------------------------------------------------------------- | --------------------- |
803
- | cause | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> | The error root cause. |
804
- | message<sup>\*required</sup> | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
805
- | name<sup>\*required</sup> | "UnsupportedOperationError" | The error name. |
806
- | stack | <a href="https://developer.mozilla.org/en-US/docs/Glossary/String">string</a> | |
1102
+ | Name | Type |
1103
+ | --- | --- |
1104
+ |authUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1105
+ |clientId<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1106
+ |environmentUrl<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1107
+ |scopes<sup>*required</sup>|Array&lt;[string](https://developer.mozilla.org/en-US/docs/Glossary/String)&gt;|
1108
+ |secret<sup>*required</sup>|[string](https://developer.mozilla.org/en-US/docs/Glossary/String)|
1109
+
807
1110
 
808
1111
  ## Variables
809
1112
 
@@ -811,28 +1114,41 @@ Represents a plain text field. No filename and content type is set.
811
1114
  <strong>PlatformAbortController</strong>: Object
812
1115
  <div class="padding-left--md">
813
1116
 
1117
+
1118
+
814
1119
  </div>
815
1120
 
1121
+
1122
+
816
1123
  </div>
817
1124
 
818
1125
  <div class="padding-left--md padding-bottom--md">
819
1126
  <strong>PlatformAbortSignal</strong>: Object
820
1127
  <div class="padding-left--md">
821
1128
 
1129
+
1130
+
822
1131
  </div>
823
1132
 
1133
+
1134
+
824
1135
  </div>
825
1136
 
826
1137
  <div class="padding-left--md padding-bottom--md">
827
- <strong>httpClient</strong>: <a href="#httpclient">HttpClient</a>
1138
+ <strong>httpClient</strong>: [HttpClient](#httpclient)
828
1139
  <div class="padding-left--md">
829
1140
 
1141
+
1142
+
830
1143
  </div>
831
1144
 
1145
+
1146
+
832
1147
  </div>
833
1148
 
834
1149
  ## Functions
835
1150
 
1151
+
836
1152
  ### isHttpClientAbortError
837
1153
 
838
1154
  <div class="padding-bottom--md">
@@ -840,18 +1156,30 @@ Represents a plain text field. No filename and content type is set.
840
1156
 
841
1157
  <div class="padding-left--md">
842
1158
 
1159
+
1160
+
1161
+
1162
+
843
1163
  </div>
844
1164
 
1165
+
845
1166
  #### Parameters
846
1167
 
847
- | Name | Type |
848
- | ---------------------- | ---------------------------------------------------------------------------------------- |
849
- | e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1168
+ | Name | Type |
1169
+ | --- | --- |
1170
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1171
+
1172
+
1173
+
1174
+
1175
+
850
1176
 
851
- {/* no returns */}
852
1177
 
853
1178
  </div>
854
1179
 
1180
+
1181
+
1182
+
855
1183
  ### isHttpClientNetworkError
856
1184
 
857
1185
  <div class="padding-bottom--md">
@@ -859,18 +1187,30 @@ Represents a plain text field. No filename and content type is set.
859
1187
 
860
1188
  <div class="padding-left--md">
861
1189
 
1190
+
1191
+
1192
+
1193
+
862
1194
  </div>
863
1195
 
1196
+
864
1197
  #### Parameters
865
1198
 
866
- | Name | Type |
867
- | ---------------------- | ---------------------------------------------------------------------------------------- |
868
- | e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1199
+ | Name | Type |
1200
+ | --- | --- |
1201
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1202
+
1203
+
1204
+
1205
+
1206
+
869
1207
 
870
- {/* no returns */}
871
1208
 
872
1209
  </div>
873
1210
 
1211
+
1212
+
1213
+
874
1214
  ### isHttpClientRequestError
875
1215
 
876
1216
  <div class="padding-bottom--md">
@@ -878,18 +1218,30 @@ Represents a plain text field. No filename and content type is set.
878
1218
 
879
1219
  <div class="padding-left--md">
880
1220
 
1221
+
1222
+
1223
+
1224
+
881
1225
  </div>
882
1226
 
1227
+
883
1228
  #### Parameters
884
1229
 
885
- | Name | Type |
886
- | ---------------------- | ---------------------------------------------------------------------------------------- |
887
- | e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1230
+ | Name | Type |
1231
+ | --- | --- |
1232
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1233
+
1234
+
1235
+
1236
+
1237
+
888
1238
 
889
- {/* no returns */}
890
1239
 
891
1240
  </div>
892
1241
 
1242
+
1243
+
1244
+
893
1245
  ### isHttpClientResponseError
894
1246
 
895
1247
  <div class="padding-bottom--md">
@@ -897,14 +1249,26 @@ Represents a plain text field. No filename and content type is set.
897
1249
 
898
1250
  <div class="padding-left--md">
899
1251
 
1252
+
1253
+
1254
+
1255
+
900
1256
  </div>
901
1257
 
1258
+
902
1259
  #### Parameters
903
1260
 
904
- | Name | Type |
905
- | ---------------------- | ---------------------------------------------------------------------------------------- |
906
- | e<sup>\*required</sup> | <a href="https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any">any</a> |
1261
+ | Name | Type |
1262
+ | --- | --- |
1263
+ |e<sup>*required</sup>|[any](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any)|
1264
+
1265
+
1266
+
1267
+
1268
+
907
1269
 
908
- {/* no returns */}
909
1270
 
910
1271
  </div>
1272
+
1273
+
1274
+