@serenity-js/rest 3.0.0-rc.15 → 3.0.0-rc.18
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/CHANGELOG.md +263 -0
- package/lib/model/DeleteRequest.d.ts +3 -3
- package/lib/model/DeleteRequest.js +3 -2
- package/lib/model/DeleteRequest.js.map +1 -1
- package/lib/model/GetRequest.d.ts +3 -3
- package/lib/model/GetRequest.js +3 -2
- package/lib/model/GetRequest.js.map +1 -1
- package/lib/model/HTTPRequest.js +1 -1
- package/lib/model/HTTPRequest.js.map +1 -1
- package/lib/model/HeadRequest.d.ts +3 -3
- package/lib/model/HeadRequest.js +3 -2
- package/lib/model/HeadRequest.js.map +1 -1
- package/lib/model/OptionsRequest.d.ts +3 -3
- package/lib/model/OptionsRequest.js +3 -2
- package/lib/model/OptionsRequest.js.map +1 -1
- package/lib/model/PatchRequest.d.ts +3 -3
- package/lib/model/PatchRequest.js +3 -2
- package/lib/model/PatchRequest.js.map +1 -1
- package/lib/model/PostRequest.d.ts +3 -3
- package/lib/model/PostRequest.js +3 -2
- package/lib/model/PostRequest.js.map +1 -1
- package/lib/model/PutRequest.d.ts +3 -3
- package/lib/model/PutRequest.js +3 -2
- package/lib/model/PutRequest.js.map +1 -1
- package/package.json +8 -8
- package/src/model/DeleteRequest.ts +4 -4
- package/src/model/GetRequest.ts +4 -4
- package/src/model/HTTPRequest.ts +1 -1
- package/src/model/HeadRequest.ts +4 -4
- package/src/model/OptionsRequest.ts +4 -4
- package/src/model/PatchRequest.ts +4 -4
- package/src/model/PostRequest.ts +4 -4
- package/src/model/PutRequest.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.0.0-rc.18](https://github.com/serenity-js/serenity-js/compare/v2.33.9...v3.0.0-rc.18) (2022-06-06)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# [3.0.0-rc.17](https://github.com/serenity-js/serenity-js/compare/v2.33.8...v3.0.0-rc.17) (2022-06-02)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **core:** Screenplay-style Dictionary<T> to help resolve objects with nested Questions ([6a66778](https://github.com/serenity-js/serenity-js/commit/6a667788b7579f94edb70c36103d82ca3f146eed)), closes [#1219](https://github.com/serenity-js/serenity-js/issues/1219)
|
|
16
|
+
* **rest:** all HTTP requests accept DynamicRecord<AxiosRequestConfig> ([c28b47c](https://github.com/serenity-js/serenity-js/commit/c28b47cde53e2e0d3ee8313a1e21e15cbe78df9a)), closes [#463](https://github.com/serenity-js/serenity-js/issues/463)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
6
24
|
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
7
25
|
|
|
8
26
|
|
|
@@ -100,6 +118,26 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
100
118
|
|
|
101
119
|
|
|
102
120
|
|
|
121
|
+
# [3.0.0-rc.17](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.16...v3.0.0-rc.17) (2022-06-02)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### Features
|
|
125
|
+
|
|
126
|
+
* **core:** Screenplay-style Dictionary<T> to help resolve objects with nested Questions ([6a66778](https://github.com/serenity-js/serenity-js/commit/6a667788b7579f94edb70c36103d82ca3f146eed)), closes [#1219](https://github.com/serenity-js/serenity-js/issues/1219)
|
|
127
|
+
* **rest:** all HTTP requests accept DynamicRecord<AxiosRequestConfig> ([c28b47c](https://github.com/serenity-js/serenity-js/commit/c28b47cde53e2e0d3ee8313a1e21e15cbe78df9a)), closes [#463](https://github.com/serenity-js/serenity-js/issues/463)
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
# [3.0.0-rc.16](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v3.0.0-rc.16) (2022-04-15)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
103
141
|
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
104
142
|
|
|
105
143
|
|
|
@@ -190,6 +228,231 @@ modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped su
|
|
|
190
228
|
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
191
229
|
|
|
192
230
|
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
# [3.0.0-rc.15](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v3.0.0-rc.15) (2022-04-10)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
### Features
|
|
270
|
+
|
|
271
|
+
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
### Bug Fixes
|
|
287
|
+
|
|
288
|
+
* **core:** you can now retrieve the .length property of an Array wrapped in an Adapter<Array> ([c36e210](https://github.com/serenity-js/serenity-js/commit/c36e210c024052b96ba47e9663c7098e269c5688))
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
### Bug Fixes
|
|
296
|
+
|
|
297
|
+
* **rest:** corrected LastResponse to wrap .status(), .body(), .header() and .headers() in Adapters ([aab8e93](https://github.com/serenity-js/serenity-js/commit/aab8e93a19005710d9f333756cdae5aa21c31058)), closes [#1082](https://github.com/serenity-js/serenity-js/issues/1082)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### Bug Fixes
|
|
313
|
+
|
|
314
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
### Features
|
|
318
|
+
|
|
319
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
### BREAKING CHANGES
|
|
323
|
+
|
|
324
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
325
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
# [3.0.0-rc.14](https://github.com/serenity-js/serenity-js/compare/v2.33.3...v3.0.0-rc.14) (2022-03-28)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
# [3.0.0-rc.13](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.12...v3.0.0-rc.13) (2022-03-02)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# [3.0.0-rc.12](https://github.com/serenity-js/serenity-js/compare/v2.33.2...v3.0.0-rc.12) (2022-02-23)
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
# [3.0.0-rc.11](https://github.com/serenity-js/serenity-js/compare/v2.33.1...v3.0.0-rc.11) (2022-02-13)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
# [3.0.0-rc.10](https://github.com/serenity-js/serenity-js/compare/v2.33.0...v3.0.0-rc.10) (2022-02-03)
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
# [3.0.0-rc.9](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.8...v3.0.0-rc.9) (2022-02-01)
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
# [3.0.0-rc.8](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.7...v3.0.0-rc.8) (2022-01-28)
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
# [3.0.0-rc.7](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.6...v3.0.0-rc.7) (2022-01-28)
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
### Features
|
|
363
|
+
|
|
364
|
+
* **core:** replaced `Adapter` with `QuestionAdapter` and introduced `Optional` ([8d84ad3](https://github.com/serenity-js/serenity-js/commit/8d84ad3863e3c726533d0f21934fb1e2fa8b3022)), closes [#1103](https://github.com/serenity-js/serenity-js/issues/1103)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
# [3.0.0-rc.6](https://github.com/serenity-js/serenity-js/compare/v2.32.7...v3.0.0-rc.6) (2022-01-10)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
# [3.0.0-rc.5](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.4...v3.0.0-rc.5) (2022-01-07)
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
# [3.0.0-rc.4](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.3...v3.0.0-rc.4) (2021-12-30)
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
### Bug Fixes
|
|
380
|
+
|
|
381
|
+
* **core:** you can now retrieve the .length property of an Array wrapped in an Adapter<Array> ([c36e210](https://github.com/serenity-js/serenity-js/commit/c36e210c024052b96ba47e9663c7098e269c5688))
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
# [3.0.0-rc.3](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.2...v3.0.0-rc.3) (2021-12-29)
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
### Bug Fixes
|
|
389
|
+
|
|
390
|
+
* **rest:** corrected LastResponse to wrap .status(), .body(), .header() and .headers() in Adapters ([aab8e93](https://github.com/serenity-js/serenity-js/commit/aab8e93a19005710d9f333756cdae5aa21c31058)), closes [#1082](https://github.com/serenity-js/serenity-js/issues/1082)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
# [3.0.0-rc.2](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.1...v3.0.0-rc.2) (2021-12-09)
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
# [3.0.0-rc.1](https://github.com/serenity-js/serenity-js/compare/v3.0.0-rc.0...v3.0.0-rc.1) (2021-12-09)
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
# [3.0.0-rc.0](https://github.com/serenity-js/serenity-js/compare/v2.32.5...v3.0.0-rc.0) (2021-12-08)
|
|
403
|
+
|
|
404
|
+
|
|
405
|
+
### Bug Fixes
|
|
406
|
+
|
|
407
|
+
* **core:** 3.0 RC ([469d54e](https://github.com/serenity-js/serenity-js/commit/469d54e4f81ef430566b93852e3174826f8ef672)), closes [#805](https://github.com/serenity-js/serenity-js/issues/805)
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
### Features
|
|
411
|
+
|
|
412
|
+
* **core:** question.about produces "props" that proxy the methods of the underlying model ([f771872](https://github.com/serenity-js/serenity-js/commit/f771872c56b487e404002c3800fc8f3baaed804f))
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
### BREAKING CHANGES
|
|
416
|
+
|
|
417
|
+
* **core:** Introduced @serenity-js/web - a shared library for Serenity/JS Web integration
|
|
418
|
+
modules such as @serenity-js/protractor and @serenity-js/webdriverio. Dropped support for Node 12.
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
## [2.33.9](https://github.com/serenity-js/serenity-js/compare/v2.33.8...v2.33.9) (2022-06-02)
|
|
422
|
+
|
|
423
|
+
**Note:** Version bump only for package @serenity-js/rest
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
## [2.33.8](https://github.com/serenity-js/serenity-js/compare/v2.33.7...v2.33.8) (2022-05-07)
|
|
430
|
+
|
|
431
|
+
**Note:** Version bump only for package @serenity-js/rest
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
## [2.33.7](https://github.com/serenity-js/serenity-js/compare/v2.33.6...v2.33.7) (2022-05-05)
|
|
438
|
+
|
|
439
|
+
**Note:** Version bump only for package @serenity-js/rest
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
## [2.33.6](https://github.com/serenity-js/serenity-js/compare/v2.33.5...v2.33.6) (2022-04-15)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
### Bug Fixes
|
|
449
|
+
|
|
450
|
+
* **rest:** Allow disabling maxRedirects. Closes [#1181](https://github.com/serenity-js/serenity-js/issues/1181) ([e819409](https://github.com/serenity-js/serenity-js/commit/e81940946adb6e67948ea2591023cb16e178b94c))
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
455
|
+
|
|
193
456
|
## [2.33.5](https://github.com/serenity-js/serenity-js/compare/v2.33.4...v2.33.5) (2022-04-08)
|
|
194
457
|
|
|
195
458
|
**Note:** Version bump only for package @serenity-js/rest
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -54,10 +54,10 @@ export declare class DeleteRequest extends HTTPRequest {
|
|
|
54
54
|
* Overrides the default Axios request configuration provided
|
|
55
55
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
56
56
|
*
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
58
58
|
* Axios request configuration overrides
|
|
59
59
|
*
|
|
60
60
|
* @returns {DeleteRequest}
|
|
61
61
|
*/
|
|
62
|
-
using(config: Answerable<AxiosRequestConfig
|
|
62
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): DeleteRequest;
|
|
63
63
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DeleteRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -57,13 +58,13 @@ class DeleteRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
57
58
|
* Overrides the default Axios request configuration provided
|
|
58
59
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
59
60
|
*
|
|
60
|
-
* @param {
|
|
61
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
61
62
|
* Axios request configuration overrides
|
|
62
63
|
*
|
|
63
64
|
* @returns {DeleteRequest}
|
|
64
65
|
*/
|
|
65
66
|
using(config) {
|
|
66
|
-
return new DeleteRequest(this.resourceUri, undefined, config);
|
|
67
|
+
return new DeleteRequest(this.resourceUri, undefined, core_1.Dictionary.of(config));
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
70
|
exports.DeleteRequest = DeleteRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteRequest.js","sourceRoot":"","sources":["../../src/model/DeleteRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DeleteRequest.js","sourceRoot":"","sources":["../../src/model/DeleteRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAa,aAAc,SAAQ,yBAAW;IAE1C;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,aAAa,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IACjF,CAAC;CACJ;AAjCD,sCAiCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -61,10 +61,10 @@ export declare class GetRequest extends HTTPRequest {
|
|
|
61
61
|
* Overrides the default Axios request configuration provided
|
|
62
62
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
63
63
|
*
|
|
64
|
-
* @param {
|
|
64
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
65
65
|
* Axios request configuration overrides
|
|
66
66
|
*
|
|
67
67
|
* @returns {GetRequest}
|
|
68
68
|
*/
|
|
69
|
-
using(config: Answerable<AxiosRequestConfig
|
|
69
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): GetRequest;
|
|
70
70
|
}
|
package/lib/model/GetRequest.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GetRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -64,13 +65,13 @@ class GetRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
64
65
|
* Overrides the default Axios request configuration provided
|
|
65
66
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
66
67
|
*
|
|
67
|
-
* @param {
|
|
68
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
68
69
|
* Axios request configuration overrides
|
|
69
70
|
*
|
|
70
71
|
* @returns {GetRequest}
|
|
71
72
|
*/
|
|
72
73
|
using(config) {
|
|
73
|
-
return new GetRequest(this.resourceUri, undefined, config);
|
|
74
|
+
return new GetRequest(this.resourceUri, undefined, core_1.Dictionary.of(config));
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
77
|
exports.GetRequest = GetRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetRequest.js","sourceRoot":"","sources":["../../src/model/GetRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"GetRequest.js","sourceRoot":"","sources":["../../src/model/GetRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,MAAa,UAAW,SAAQ,yBAAW;IAEvC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9E,CAAC;CACJ;AAjCD,gCAiCC"}
|
package/lib/model/HTTPRequest.js
CHANGED
|
@@ -49,7 +49,7 @@ class HTTPRequest extends core_1.Question {
|
|
|
49
49
|
then(config =>
|
|
50
50
|
// eslint-disable-next-line unicorn/prefer-object-from-entries
|
|
51
51
|
Object.keys(config).reduce((acc, key) => {
|
|
52
|
-
if (config[key]) {
|
|
52
|
+
if (config[key] !== null && config[key] !== undefined) {
|
|
53
53
|
acc[key] = config[key];
|
|
54
54
|
}
|
|
55
55
|
return acc;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HTTPRequest.js","sourceRoot":"","sources":["../../src/model/HTTPRequest.ts"],"names":[],"mappings":";;;AAAA,4C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@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -46,10 +46,10 @@ export declare class HeadRequest extends HTTPRequest {
|
|
|
46
46
|
* Overrides the default Axios request configuration provided
|
|
47
47
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
48
48
|
*
|
|
49
|
-
* @param {
|
|
49
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
50
50
|
* Axios request configuration overrides
|
|
51
51
|
*
|
|
52
52
|
* @returns {HeadRequest}
|
|
53
53
|
*/
|
|
54
|
-
using(config: Answerable<AxiosRequestConfig
|
|
54
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): HeadRequest;
|
|
55
55
|
}
|
package/lib/model/HeadRequest.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.HeadRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -49,13 +50,13 @@ class HeadRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
49
50
|
* Overrides the default Axios request configuration provided
|
|
50
51
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
51
52
|
*
|
|
52
|
-
* @param {
|
|
53
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
53
54
|
* Axios request configuration overrides
|
|
54
55
|
*
|
|
55
56
|
* @returns {HeadRequest}
|
|
56
57
|
*/
|
|
57
58
|
using(config) {
|
|
58
|
-
return new HeadRequest(this.resourceUri, undefined, config);
|
|
59
|
+
return new HeadRequest(this.resourceUri, undefined, core_1.Dictionary.of(config));
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
exports.HeadRequest = HeadRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadRequest.js","sourceRoot":"","sources":["../../src/model/HeadRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"HeadRequest.js","sourceRoot":"","sources":["../../src/model/HeadRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,WAAY,SAAQ,yBAAW;IAExC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ;AAjCD,kCAiCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -49,10 +49,10 @@ export declare class OptionsRequest extends HTTPRequest {
|
|
|
49
49
|
* Overrides the default Axios request configuration provided
|
|
50
50
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
51
51
|
*
|
|
52
|
-
* @param {
|
|
52
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
53
53
|
* Axios request configuration overrides
|
|
54
54
|
*
|
|
55
55
|
* @returns {OptionsRequest}
|
|
56
56
|
*/
|
|
57
|
-
using(config: Answerable<AxiosRequestConfig
|
|
57
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): OptionsRequest;
|
|
58
58
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OptionsRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -52,13 +53,13 @@ class OptionsRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
52
53
|
* Overrides the default Axios request configuration provided
|
|
53
54
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
54
55
|
*
|
|
55
|
-
* @param {
|
|
56
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
56
57
|
* Axios request configuration overrides
|
|
57
58
|
*
|
|
58
59
|
* @returns {OptionsRequest}
|
|
59
60
|
*/
|
|
60
61
|
using(config) {
|
|
61
|
-
return new OptionsRequest(this.resourceUri, undefined, config);
|
|
62
|
+
return new OptionsRequest(this.resourceUri, undefined, core_1.Dictionary.of(config));
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
65
|
exports.OptionsRequest = OptionsRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OptionsRequest.js","sourceRoot":"","sources":["../../src/model/OptionsRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"OptionsRequest.js","sourceRoot":"","sources":["../../src/model/OptionsRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,cAAe,SAAQ,yBAAW;IAE3C;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAClF,CAAC;CACJ;AAjCD,wCAiCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -56,10 +56,10 @@ export declare class PatchRequest extends HTTPRequest {
|
|
|
56
56
|
* Overrides the default Axios request configuration provided
|
|
57
57
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
58
58
|
*
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
60
60
|
* Axios request configuration overrides
|
|
61
61
|
*
|
|
62
62
|
* @returns {PatchRequest}
|
|
63
63
|
*/
|
|
64
|
-
using(config: Answerable<AxiosRequestConfig
|
|
64
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PatchRequest;
|
|
65
65
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PatchRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -61,13 +62,13 @@ class PatchRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
61
62
|
* Overrides the default Axios request configuration provided
|
|
62
63
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
63
64
|
*
|
|
64
|
-
* @param {
|
|
65
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
65
66
|
* Axios request configuration overrides
|
|
66
67
|
*
|
|
67
68
|
* @returns {PatchRequest}
|
|
68
69
|
*/
|
|
69
70
|
using(config) {
|
|
70
|
-
return new PatchRequest(this.resourceUri, this.data, config);
|
|
71
|
+
return new PatchRequest(this.resourceUri, this.data, core_1.Dictionary.of(config));
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
74
|
exports.PatchRequest = PatchRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatchRequest.js","sourceRoot":"","sources":["../../src/model/PatchRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PatchRequest.js","sourceRoot":"","sources":["../../src/model/PatchRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,YAAa,SAAQ,yBAAW;IAEzC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,YAAY,CAAC,WAAW,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAChF,CAAC;CACJ;AA9CD,oCA8CC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -93,10 +93,10 @@ export declare class PostRequest extends HTTPRequest {
|
|
|
93
93
|
* Overrides the default Axios request configuration provided
|
|
94
94
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
95
95
|
*
|
|
96
|
-
* @param {
|
|
96
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
97
97
|
* Axios request configuration overrides
|
|
98
98
|
*
|
|
99
99
|
* @returns {PostRequest}
|
|
100
100
|
*/
|
|
101
|
-
using(config: Answerable<AxiosRequestConfig
|
|
101
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PostRequest;
|
|
102
102
|
}
|
package/lib/model/PostRequest.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PostRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -98,13 +99,13 @@ class PostRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
98
99
|
* Overrides the default Axios request configuration provided
|
|
99
100
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
100
101
|
*
|
|
101
|
-
* @param {
|
|
102
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
102
103
|
* Axios request configuration overrides
|
|
103
104
|
*
|
|
104
105
|
* @returns {PostRequest}
|
|
105
106
|
*/
|
|
106
107
|
using(config) {
|
|
107
|
-
return new PostRequest(this.resourceUri, this.data, config);
|
|
108
|
+
return new PostRequest(this.resourceUri, this.data, core_1.Dictionary.of(config));
|
|
108
109
|
}
|
|
109
110
|
}
|
|
110
111
|
exports.PostRequest = PostRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostRequest.js","sourceRoot":"","sources":["../../src/model/PostRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PostRequest.js","sourceRoot":"","sources":["../../src/model/PostRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAa,WAAY,SAAQ,yBAAW;IAExC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,WAAW,CAAC,WAAW,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAChE,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC/E,CAAC;CACJ;AA9CD,kCA8CC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import { HTTPRequest } from './HTTPRequest';
|
|
4
4
|
/**
|
|
@@ -66,10 +66,10 @@ export declare class PutRequest extends HTTPRequest {
|
|
|
66
66
|
* Overrides the default Axios request configuration provided
|
|
67
67
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
68
68
|
*
|
|
69
|
-
* @param {@serenity-js/core/lib/screenplay~
|
|
69
|
+
* @param {@serenity-js/core/lib/screenplay/questions~DynamicRecord<AxiosRequestConfig>} config
|
|
70
70
|
* Axios request configuration overrides
|
|
71
71
|
*
|
|
72
72
|
* @returns {PutRequest}
|
|
73
73
|
*/
|
|
74
|
-
using(config: Answerable<AxiosRequestConfig
|
|
74
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PutRequest;
|
|
75
75
|
}
|
package/lib/model/PutRequest.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PutRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
4
5
|
const HTTPRequest_1 = require("./HTTPRequest");
|
|
5
6
|
/**
|
|
6
7
|
* @desc
|
|
@@ -71,13 +72,13 @@ class PutRequest extends HTTPRequest_1.HTTPRequest {
|
|
|
71
72
|
* Overrides the default Axios request configuration provided
|
|
72
73
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
73
74
|
*
|
|
74
|
-
* @param {@serenity-js/core/lib/screenplay~
|
|
75
|
+
* @param {@serenity-js/core/lib/screenplay/questions~DynamicRecord<AxiosRequestConfig>} config
|
|
75
76
|
* Axios request configuration overrides
|
|
76
77
|
*
|
|
77
78
|
* @returns {PutRequest}
|
|
78
79
|
*/
|
|
79
80
|
using(config) {
|
|
80
|
-
return new PutRequest(this.resourceUri, this.data, config);
|
|
81
|
+
return new PutRequest(this.resourceUri, this.data, core_1.Dictionary.of(config));
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
exports.PutRequest = PutRequest;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PutRequest.js","sourceRoot":"","sources":["../../src/model/PutRequest.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PutRequest.js","sourceRoot":"","sources":["../../src/model/PutRequest.ts"],"names":[],"mappings":";;;AAAA,4CAA0E;AAG1E,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAa,UAAW,SAAQ,yBAAW;IAEvC;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;;;;;OAQG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,MAAqD;QACvD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,iBAAU,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9E,CAAC;CACJ;AA9CD,gCA8CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serenity-js/rest",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.18",
|
|
4
4
|
"description": "Test REST APIs with Serenity/JS",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Jan Molak",
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"npm": "^6 || ^7 || ^8"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@serenity-js/core": "3.0.0-rc.
|
|
51
|
+
"@serenity-js/core": "3.0.0-rc.18",
|
|
52
52
|
"axios": "^0.21.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@documentation/esdoc-template": "3.0.0",
|
|
56
56
|
"@integration/testing-tools": "3.0.0",
|
|
57
|
-
"@serenity-js/assertions": "3.0.0-rc.
|
|
58
|
-
"@types/chai": "^4.3.
|
|
59
|
-
"@types/mocha": "^9.1.
|
|
57
|
+
"@serenity-js/assertions": "3.0.0-rc.18",
|
|
58
|
+
"@types/chai": "^4.3.1",
|
|
59
|
+
"@types/mocha": "^9.1.1",
|
|
60
60
|
"axios-mock-adapter": "^1.20.0",
|
|
61
|
-
"mocha": "^
|
|
61
|
+
"mocha": "^10.0.0",
|
|
62
62
|
"ts-node": "^10.7.0",
|
|
63
|
-
"typescript": "^4.
|
|
63
|
+
"typescript": "^4.7.2"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "e6b62850b6c59e661314e5675d1f196e7e4fce03"
|
|
66
66
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -60,12 +60,12 @@ export class DeleteRequest extends HTTPRequest {
|
|
|
60
60
|
* Overrides the default Axios request configuration provided
|
|
61
61
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
62
62
|
*
|
|
63
|
-
* @param {
|
|
63
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
64
64
|
* Axios request configuration overrides
|
|
65
65
|
*
|
|
66
66
|
* @returns {DeleteRequest}
|
|
67
67
|
*/
|
|
68
|
-
using(config: Answerable<AxiosRequestConfig
|
|
69
|
-
return new DeleteRequest(this.resourceUri, undefined, config);
|
|
68
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): DeleteRequest {
|
|
69
|
+
return new DeleteRequest(this.resourceUri, undefined, Dictionary.of(config));
|
|
70
70
|
}
|
|
71
71
|
}
|
package/src/model/GetRequest.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -67,12 +67,12 @@ export class GetRequest extends HTTPRequest {
|
|
|
67
67
|
* Overrides the default Axios request configuration provided
|
|
68
68
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
69
69
|
*
|
|
70
|
-
* @param {
|
|
70
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
71
71
|
* Axios request configuration overrides
|
|
72
72
|
*
|
|
73
73
|
* @returns {GetRequest}
|
|
74
74
|
*/
|
|
75
|
-
using(config: Answerable<AxiosRequestConfig
|
|
76
|
-
return new GetRequest(this.resourceUri, undefined, config);
|
|
75
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): GetRequest {
|
|
76
|
+
return new GetRequest(this.resourceUri, undefined, Dictionary.of(config));
|
|
77
77
|
}
|
|
78
78
|
}
|
package/src/model/HTTPRequest.ts
CHANGED
|
@@ -61,7 +61,7 @@ export abstract class HTTPRequest extends Question<Promise<AxiosRequestConfig>>
|
|
|
61
61
|
then(config =>
|
|
62
62
|
// eslint-disable-next-line unicorn/prefer-object-from-entries
|
|
63
63
|
Object.keys(config).reduce((acc, key) => {
|
|
64
|
-
if (config[key]) {
|
|
64
|
+
if (config[key] !== null && config[key] !== undefined ) {
|
|
65
65
|
acc[key] = config[key];
|
|
66
66
|
}
|
|
67
67
|
return acc;
|
package/src/model/HeadRequest.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -52,12 +52,12 @@ export class HeadRequest extends HTTPRequest {
|
|
|
52
52
|
* Overrides the default Axios request configuration provided
|
|
53
53
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
54
54
|
*
|
|
55
|
-
* @param {
|
|
55
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
56
56
|
* Axios request configuration overrides
|
|
57
57
|
*
|
|
58
58
|
* @returns {HeadRequest}
|
|
59
59
|
*/
|
|
60
|
-
using(config: Answerable<AxiosRequestConfig
|
|
61
|
-
return new HeadRequest(this.resourceUri, undefined, config);
|
|
60
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): HeadRequest {
|
|
61
|
+
return new HeadRequest(this.resourceUri, undefined, Dictionary.of(config));
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -55,12 +55,12 @@ export class OptionsRequest extends HTTPRequest {
|
|
|
55
55
|
* Overrides the default Axios request configuration provided
|
|
56
56
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
57
57
|
*
|
|
58
|
-
* @param {
|
|
58
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
59
59
|
* Axios request configuration overrides
|
|
60
60
|
*
|
|
61
61
|
* @returns {OptionsRequest}
|
|
62
62
|
*/
|
|
63
|
-
using(config: Answerable<AxiosRequestConfig
|
|
64
|
-
return new OptionsRequest(this.resourceUri, undefined, config);
|
|
63
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): OptionsRequest {
|
|
64
|
+
return new OptionsRequest(this.resourceUri, undefined, Dictionary.of(config));
|
|
65
65
|
}
|
|
66
66
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -65,12 +65,12 @@ export class PatchRequest extends HTTPRequest {
|
|
|
65
65
|
* Overrides the default Axios request configuration provided
|
|
66
66
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
67
67
|
*
|
|
68
|
-
* @param {
|
|
68
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
69
69
|
* Axios request configuration overrides
|
|
70
70
|
*
|
|
71
71
|
* @returns {PatchRequest}
|
|
72
72
|
*/
|
|
73
|
-
using(config: Answerable<AxiosRequestConfig
|
|
74
|
-
return new PatchRequest(this.resourceUri, this.data, config);
|
|
73
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PatchRequest {
|
|
74
|
+
return new PatchRequest(this.resourceUri, this.data, Dictionary.of(config));
|
|
75
75
|
}
|
|
76
76
|
}
|
package/src/model/PostRequest.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -102,12 +102,12 @@ export class PostRequest extends HTTPRequest {
|
|
|
102
102
|
* Overrides the default Axios request configuration provided
|
|
103
103
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
104
104
|
*
|
|
105
|
-
* @param {
|
|
105
|
+
* @param {Answerable<DynamicRecord<AxiosRequestConfig>>} config
|
|
106
106
|
* Axios request configuration overrides
|
|
107
107
|
*
|
|
108
108
|
* @returns {PostRequest}
|
|
109
109
|
*/
|
|
110
|
-
using(config: Answerable<AxiosRequestConfig
|
|
111
|
-
return new PostRequest(this.resourceUri, this.data, config);
|
|
110
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PostRequest {
|
|
111
|
+
return new PostRequest(this.resourceUri, this.data, Dictionary.of(config));
|
|
112
112
|
}
|
|
113
113
|
}
|
package/src/model/PutRequest.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Answerable } from '@serenity-js/core';
|
|
1
|
+
import { Answerable, Dictionary, DynamicRecord } from '@serenity-js/core';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
import { HTTPRequest } from './HTTPRequest';
|
|
@@ -75,12 +75,12 @@ export class PutRequest extends HTTPRequest {
|
|
|
75
75
|
* Overrides the default Axios request configuration provided
|
|
76
76
|
* when {@link CallAnApi} {@link @serenity-js/core/lib/screenplay~Ability} was instantiated.
|
|
77
77
|
*
|
|
78
|
-
* @param {@serenity-js/core/lib/screenplay~
|
|
78
|
+
* @param {@serenity-js/core/lib/screenplay/questions~DynamicRecord<AxiosRequestConfig>} config
|
|
79
79
|
* Axios request configuration overrides
|
|
80
80
|
*
|
|
81
81
|
* @returns {PutRequest}
|
|
82
82
|
*/
|
|
83
|
-
using(config: Answerable<AxiosRequestConfig
|
|
84
|
-
return new PutRequest(this.resourceUri, this.data, config);
|
|
83
|
+
using(config: Answerable<DynamicRecord<AxiosRequestConfig>>): PutRequest {
|
|
84
|
+
return new PutRequest(this.resourceUri, this.data, Dictionary.of(config));
|
|
85
85
|
}
|
|
86
86
|
}
|