@serenity-js/rest 3.25.0 → 3.25.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +1 -1
  3. package/lib/screenplay/abilities/CallAnApi.d.ts +17 -15
  4. package/lib/screenplay/abilities/CallAnApi.d.ts.map +1 -1
  5. package/lib/screenplay/abilities/CallAnApi.js +17 -15
  6. package/lib/screenplay/abilities/CallAnApi.js.map +1 -1
  7. package/lib/screenplay/interactions/ChangeApiConfig.d.ts +11 -11
  8. package/lib/screenplay/interactions/ChangeApiConfig.js +11 -11
  9. package/lib/screenplay/interactions/Send.d.ts +3 -3
  10. package/lib/screenplay/interactions/Send.js +3 -3
  11. package/lib/screenplay/models/DeleteRequest.d.ts +6 -6
  12. package/lib/screenplay/models/DeleteRequest.js +6 -6
  13. package/lib/screenplay/models/GetRequest.d.ts +6 -6
  14. package/lib/screenplay/models/GetRequest.js +6 -6
  15. package/lib/screenplay/models/HTTPRequest.d.ts +3 -3
  16. package/lib/screenplay/models/HTTPRequest.js +3 -3
  17. package/lib/screenplay/models/HeadRequest.d.ts +6 -6
  18. package/lib/screenplay/models/HeadRequest.js +6 -6
  19. package/lib/screenplay/models/OptionsRequest.d.ts +6 -6
  20. package/lib/screenplay/models/OptionsRequest.js +6 -6
  21. package/lib/screenplay/models/PatchRequest.d.ts +6 -6
  22. package/lib/screenplay/models/PatchRequest.js +6 -6
  23. package/lib/screenplay/models/PostRequest.d.ts +6 -6
  24. package/lib/screenplay/models/PostRequest.js +6 -6
  25. package/lib/screenplay/models/PutRequest.d.ts +6 -6
  26. package/lib/screenplay/models/PutRequest.js +6 -6
  27. package/lib/screenplay/questions/LastResponse.d.ts +6 -6
  28. package/lib/screenplay/questions/LastResponse.js +6 -6
  29. package/package.json +4 -4
  30. package/src/screenplay/abilities/CallAnApi.ts +17 -15
  31. package/src/screenplay/interactions/ChangeApiConfig.ts +11 -11
  32. package/src/screenplay/interactions/Send.ts +3 -3
  33. package/src/screenplay/models/DeleteRequest.ts +6 -6
  34. package/src/screenplay/models/GetRequest.ts +6 -6
  35. package/src/screenplay/models/HTTPRequest.ts +3 -3
  36. package/src/screenplay/models/HeadRequest.ts +6 -6
  37. package/src/screenplay/models/OptionsRequest.ts +6 -6
  38. package/src/screenplay/models/PatchRequest.ts +6 -6
  39. package/src/screenplay/models/PostRequest.ts +6 -6
  40. package/src/screenplay/models/PutRequest.ts +6 -6
  41. package/src/screenplay/questions/LastResponse.ts +6 -6
@@ -46,11 +46,11 @@ export class DeleteRequest extends HTTPRequest {
46
46
  *
47
47
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
48
48
  * it gets concatenated with the URL provided to the Axios instance
49
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
49
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
50
50
  *
51
51
  * @param resourceUri
52
- * The URI where the {@apilink Actor}
53
- * should send the {@apilink HTTPRequest}
52
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
53
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
54
54
  */
55
55
  static to(resourceUri: Answerable<string>): DeleteRequest {
56
56
  return new DeleteRequest(resourceUri);
@@ -58,11 +58,11 @@ export class DeleteRequest extends HTTPRequest {
58
58
 
59
59
  /**
60
60
  * Overrides the default Axios request configuration provided
61
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
61
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
62
62
  *
63
63
  * #### Learn more
64
- * - {@apilink Answerable}
65
- * - {@apilink WithAnswerableProperties}
64
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
65
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
66
66
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
67
67
  *
68
68
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -53,11 +53,11 @@ export class GetRequest extends HTTPRequest {
53
53
  *
54
54
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
55
55
  * it gets concatenated with the URL provided to the Axios instance
56
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
56
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
57
57
  *
58
58
  * @param resourceUri
59
- * The URI where the {@apilink Actor}
60
- * should send the {@apilink HTTPRequest}
59
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
60
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
61
61
  */
62
62
  static to(resourceUri: Answerable<string>): GetRequest {
63
63
  return new GetRequest(resourceUri);
@@ -65,11 +65,11 @@ export class GetRequest extends HTTPRequest {
65
65
 
66
66
  /**
67
67
  * Overrides the default Axios request configuration provided
68
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
68
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
69
69
  *
70
70
  * #### Learn more
71
- * - {@apilink Answerable}
72
- * - {@apilink WithAnswerableProperties}
71
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
72
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
73
73
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
74
74
  *
75
75
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -4,8 +4,8 @@ import { d } from '@serenity-js/core/lib/io';
4
4
  import type { AxiosRequestConfig } from 'axios';
5
5
 
6
6
  /**
7
- * HTTP Request sent by the {@apilink Actor}
8
- * using the {@apilink Interaction|interaction} to {@apilink Send}
7
+ * HTTP Request sent by the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
8
+ * using the [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`Send`](https://serenity-js.org/api/rest/class/Send/)
9
9
  *
10
10
  * @group Models
11
11
  */
@@ -20,7 +20,7 @@ export abstract class HTTPRequest extends Question<Promise<AxiosRequestConfig>>
20
20
  *
21
21
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} [config]
22
22
  * Axios request configuration, which can be used to override the defaults
23
- * provided when the {@apilink Ability|ability} to {@apilink CallAnApi} is instantiated
23
+ * provided when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) is instantiated
24
24
  */
25
25
  protected constructor(
26
26
  protected readonly resourceUri?: Answerable<string>,
@@ -38,11 +38,11 @@ export class HeadRequest extends HTTPRequest {
38
38
  *
39
39
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
40
40
  * it gets concatenated with the URL provided to the Axios instance
41
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
41
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
42
42
  *
43
43
  * @param resourceUri
44
- * The URI where the {@apilink Actor}
45
- * should send the {@apilink HTTPRequest}
44
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
45
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
46
46
  */
47
47
  static to(resourceUri: Answerable<string>): HeadRequest {
48
48
  return new HeadRequest(resourceUri);
@@ -50,11 +50,11 @@ export class HeadRequest extends HTTPRequest {
50
50
 
51
51
  /**
52
52
  * Overrides the default Axios request configuration provided
53
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
53
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
54
54
  *
55
55
  * #### Learn more
56
- * - {@apilink Answerable}
57
- * - {@apilink WithAnswerableProperties}
56
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
57
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
58
58
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
59
59
  *
60
60
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -41,11 +41,11 @@ export class OptionsRequest extends HTTPRequest {
41
41
  *
42
42
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
43
43
  * it gets concatenated with the URL provided to the Axios instance
44
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
44
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
45
45
  *
46
46
  * @param resourceUri
47
- * The URI where the {@apilink Actor}
48
- * should send the {@apilink HTTPRequest}
47
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
48
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
49
49
  */
50
50
  static to(resourceUri: Answerable<string>): OptionsRequest {
51
51
  return new OptionsRequest(resourceUri);
@@ -53,11 +53,11 @@ export class OptionsRequest extends HTTPRequest {
53
53
 
54
54
  /**
55
55
  * Overrides the default Axios request configuration provided
56
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
56
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
57
57
  *
58
58
  * #### Learn more
59
- * - {@apilink Answerable}
60
- * - {@apilink WithAnswerableProperties}
59
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
60
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
61
61
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
62
62
  *
63
63
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -38,11 +38,11 @@ export class PatchRequest extends HTTPRequest {
38
38
  *
39
39
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
40
40
  * it gets concatenated with the URL provided to the Axios instance
41
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
41
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
42
42
  *
43
43
  * @param resourceUri
44
- * The URI where the {@apilink Actor}
45
- * should send the {@apilink HTTPRequest}
44
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
45
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
46
46
  */
47
47
  static to(resourceUri: Answerable<string>): PatchRequest {
48
48
  return new PatchRequest(resourceUri);
@@ -60,11 +60,11 @@ export class PatchRequest extends HTTPRequest {
60
60
 
61
61
  /**
62
62
  * Overrides the default Axios request configuration provided
63
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
63
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
64
64
  *
65
65
  * #### Learn more
66
- * - {@apilink Answerable}
67
- * - {@apilink WithAnswerableProperties}
66
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
67
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
68
68
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
69
69
  *
70
70
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -78,11 +78,11 @@ export class PostRequest extends HTTPRequest {
78
78
  *
79
79
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
80
80
  * it gets concatenated with the URL provided to the Axios instance
81
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
81
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
82
82
  *
83
83
  * @param resourceUri
84
- * The URI where the {@apilink Actor}
85
- * should send the {@apilink HTTPRequest}
84
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
85
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
86
86
  */
87
87
  static to(resourceUri: Answerable<string>): PostRequest {
88
88
  return new PostRequest(resourceUri);
@@ -100,11 +100,11 @@ export class PostRequest extends HTTPRequest {
100
100
 
101
101
  /**
102
102
  * Overrides the default Axios request configuration provided
103
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
103
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
104
104
  *
105
105
  * #### Learn more
106
- * - {@apilink Answerable}
107
- * - {@apilink WithAnswerableProperties}
106
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
107
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
108
108
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
109
109
  *
110
110
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -48,11 +48,11 @@ export class PutRequest extends HTTPRequest {
48
48
  *
49
49
  * When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
50
50
  * it gets concatenated with the URL provided to the Axios instance
51
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
51
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
52
52
  *
53
53
  * @param resourceUri
54
- * The URI where the {@apilink Actor}
55
- * should send the {@apilink HTTPRequest}
54
+ * The URI where the [`Actor`](https://serenity-js.org/api/core/class/Actor/)
55
+ * should send the [`HTTPRequest`](https://serenity-js.org/api/rest/class/HTTPRequest/)
56
56
  */
57
57
  static to(resourceUri: Answerable<string>): PutRequest {
58
58
  return new PutRequest(resourceUri);
@@ -70,11 +70,11 @@ export class PutRequest extends HTTPRequest {
70
70
 
71
71
  /**
72
72
  * Overrides the default Axios request configuration provided
73
- * when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
73
+ * when the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/) was instantiated.
74
74
  *
75
75
  * #### Learn more
76
- * - {@apilink Answerable}
77
- * - {@apilink WithAnswerableProperties}
76
+ * - [`Answerable`](https://serenity-js.org/api/core/#Answerable)
77
+ * - [`WithAnswerableProperties`](https://serenity-js.org/api/core/#WithAnswerableProperties)
78
78
  * - [AxiosRequestConfig](https://axios-http.com/docs/req_config)
79
79
  *
80
80
  * @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
@@ -5,8 +5,8 @@ import type { RawAxiosResponseHeaders } from 'axios';
5
5
  import { CallAnApi } from '../abilities';
6
6
 
7
7
  /**
8
- * Provides access to the properties of the last {@apilink AxiosResponse} object,
9
- * cached on the {@apilink Ability|ability} to {@apilink CallAnApi}.
8
+ * Provides access to the properties of the last [`AxiosResponse`](https://axios-http.com/docs/res_schema) object,
9
+ * cached on the [ability](https://serenity-js.org/api/core/class/Ability/) to [`CallAnApi`](https://serenity-js.org/api/rest/class/CallAnApi/).
10
10
  *
11
11
  * ## Verify response to a GET request
12
12
  *
@@ -69,7 +69,7 @@ import { CallAnApi } from '../abilities';
69
69
  export class LastResponse {
70
70
 
71
71
  /**
72
- * Retrieves the status code of the {@apilink LastResponse|last response}
72
+ * Retrieves the status code of the [last response](https://serenity-js.org/api/rest/class/LastResponse/)
73
73
  *
74
74
  * #### Learn more
75
75
  * - [HTTP response status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)
@@ -81,7 +81,7 @@ export class LastResponse {
81
81
  }
82
82
 
83
83
  /**
84
- * Retrieves the body of the {@apilink LastResponse|last response}
84
+ * Retrieves the body of the [last response](https://serenity-js.org/api/rest/class/LastResponse/)
85
85
  *
86
86
  * #### A type-safe approach using generics
87
87
  *
@@ -161,7 +161,7 @@ export class LastResponse {
161
161
  }
162
162
 
163
163
  /**
164
- * Retrieves a header of the {@apilink LastResponse|last response}, identified by `name`
164
+ * Retrieves a header of the [last response](https://serenity-js.org/api/rest/class/LastResponse/), identified by `name`
165
165
  *
166
166
  * ## Asserting on a header
167
167
  *
@@ -187,7 +187,7 @@ export class LastResponse {
187
187
  }
188
188
 
189
189
  /**
190
- * Retrieves all the headers of the {@apilink LastResponse|last response}.
190
+ * Retrieves all the headers of the [last response](https://serenity-js.org/api/rest/class/LastResponse/).
191
191
  *
192
192
  * ## Asserting on a header
193
193
  *