@serenity-js/rest 3.0.0-rc.8 → 3.0.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/CHANGELOG.md +80 -1851
- package/README.md +8 -10
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/lib/models/DeleteRequest.d.ts +66 -0
- package/lib/models/DeleteRequest.d.ts.map +1 -0
- package/lib/models/DeleteRequest.js +73 -0
- package/lib/models/DeleteRequest.js.map +1 -0
- package/lib/models/GetRequest.d.ts +73 -0
- package/lib/models/GetRequest.d.ts.map +1 -0
- package/lib/models/GetRequest.js +80 -0
- package/lib/models/GetRequest.js.map +1 -0
- package/lib/models/HTTPRequest.d.ts +48 -0
- package/lib/models/HTTPRequest.d.ts.map +1 -0
- package/lib/{model → models}/HTTPRequest.js +14 -23
- package/lib/models/HTTPRequest.js.map +1 -0
- package/lib/models/HeadRequest.d.ts +58 -0
- package/lib/models/HeadRequest.d.ts.map +1 -0
- package/lib/models/HeadRequest.js +65 -0
- package/lib/models/HeadRequest.js.map +1 -0
- package/lib/models/OptionsRequest.d.ts +61 -0
- package/lib/models/OptionsRequest.d.ts.map +1 -0
- package/lib/models/OptionsRequest.js +68 -0
- package/lib/models/OptionsRequest.js.map +1 -0
- package/lib/models/PatchRequest.d.ts +65 -0
- package/lib/models/PatchRequest.d.ts.map +1 -0
- package/lib/models/PatchRequest.js +74 -0
- package/lib/models/PatchRequest.js.map +1 -0
- package/lib/models/PostRequest.d.ts +105 -0
- package/lib/models/PostRequest.d.ts.map +1 -0
- package/lib/models/PostRequest.js +114 -0
- package/lib/models/PostRequest.js.map +1 -0
- package/lib/models/PutRequest.d.ts +75 -0
- package/lib/models/PutRequest.d.ts.map +1 -0
- package/lib/models/PutRequest.js +84 -0
- package/lib/models/PutRequest.js.map +1 -0
- package/lib/{model → models}/index.d.ts +1 -0
- package/lib/models/index.d.ts.map +1 -0
- package/lib/{model → models}/index.js +5 -1
- package/lib/models/index.js.map +1 -0
- package/lib/screenplay/abilities/CallAnApi.d.ts +88 -99
- package/lib/screenplay/abilities/CallAnApi.d.ts.map +1 -0
- package/lib/screenplay/abilities/CallAnApi.js +94 -107
- package/lib/screenplay/abilities/CallAnApi.js.map +1 -1
- package/lib/screenplay/abilities/index.d.ts +1 -0
- package/lib/screenplay/abilities/index.d.ts.map +1 -0
- package/lib/screenplay/abilities/index.js +5 -1
- package/lib/screenplay/abilities/index.js.map +1 -1
- package/lib/screenplay/index.d.ts +1 -0
- package/lib/screenplay/index.d.ts.map +1 -0
- package/lib/screenplay/index.js +5 -1
- package/lib/screenplay/index.js.map +1 -1
- package/lib/screenplay/interactions/ChangeApiConfig.d.ts +96 -95
- package/lib/screenplay/interactions/ChangeApiConfig.d.ts.map +1 -0
- package/lib/screenplay/interactions/ChangeApiConfig.js +98 -107
- package/lib/screenplay/interactions/ChangeApiConfig.js.map +1 -1
- package/lib/screenplay/interactions/Send.d.ts +24 -41
- package/lib/screenplay/interactions/Send.d.ts.map +1 -0
- package/lib/screenplay/interactions/Send.js +37 -51
- package/lib/screenplay/interactions/Send.js.map +1 -1
- package/lib/screenplay/interactions/index.d.ts +1 -1
- package/lib/screenplay/interactions/index.d.ts.map +1 -0
- package/lib/screenplay/interactions/index.js +5 -2
- package/lib/screenplay/interactions/index.js.map +1 -1
- package/lib/screenplay/questions/LastResponse.d.ts +152 -98
- package/lib/screenplay/questions/LastResponse.d.ts.map +1 -0
- package/lib/screenplay/questions/LastResponse.js +149 -97
- package/lib/screenplay/questions/LastResponse.js.map +1 -1
- package/lib/screenplay/questions/index.d.ts +1 -0
- package/lib/screenplay/questions/index.d.ts.map +1 -0
- package/lib/screenplay/questions/index.js +5 -1
- package/lib/screenplay/questions/index.js.map +1 -1
- package/package.json +20 -43
- package/src/index.ts +1 -1
- package/src/models/DeleteRequest.ts +73 -0
- package/src/models/GetRequest.ts +80 -0
- package/src/{model → models}/HTTPRequest.ts +17 -26
- package/src/models/HeadRequest.ts +65 -0
- package/src/models/OptionsRequest.ts +68 -0
- package/src/models/PatchRequest.ts +75 -0
- package/src/models/PostRequest.ts +115 -0
- package/src/models/PutRequest.ts +85 -0
- package/src/screenplay/abilities/CallAnApi.ts +90 -108
- package/src/screenplay/interactions/ChangeApiConfig.ts +99 -111
- package/src/screenplay/interactions/Send.ts +46 -61
- package/src/screenplay/interactions/index.ts +0 -1
- package/src/screenplay/questions/LastResponse.ts +153 -100
- package/tsconfig.build.json +10 -0
- package/lib/model/DeleteRequest.d.ts +0 -63
- package/lib/model/DeleteRequest.js +0 -70
- package/lib/model/DeleteRequest.js.map +0 -1
- package/lib/model/GetRequest.d.ts +0 -70
- package/lib/model/GetRequest.js +0 -77
- package/lib/model/GetRequest.js.map +0 -1
- package/lib/model/HTTPRequest.d.ts +0 -56
- package/lib/model/HTTPRequest.js.map +0 -1
- package/lib/model/HeadRequest.d.ts +0 -55
- package/lib/model/HeadRequest.js +0 -62
- package/lib/model/HeadRequest.js.map +0 -1
- package/lib/model/OptionsRequest.d.ts +0 -58
- package/lib/model/OptionsRequest.js +0 -65
- package/lib/model/OptionsRequest.js.map +0 -1
- package/lib/model/PatchRequest.d.ts +0 -65
- package/lib/model/PatchRequest.js +0 -74
- package/lib/model/PatchRequest.js.map +0 -1
- package/lib/model/PostRequest.d.ts +0 -102
- package/lib/model/PostRequest.js +0 -111
- package/lib/model/PostRequest.js.map +0 -1
- package/lib/model/PutRequest.d.ts +0 -75
- package/lib/model/PutRequest.js +0 -84
- package/lib/model/PutRequest.js.map +0 -1
- package/lib/model/index.js.map +0 -1
- package/lib/screenplay/interactions/ChangeApiUrl.d.ts +0 -82
- package/lib/screenplay/interactions/ChangeApiUrl.js +0 -97
- package/lib/screenplay/interactions/ChangeApiUrl.js.map +0 -1
- package/src/model/DeleteRequest.ts +0 -71
- package/src/model/GetRequest.ts +0 -78
- package/src/model/HeadRequest.ts +0 -63
- package/src/model/OptionsRequest.ts +0 -66
- package/src/model/PatchRequest.ts +0 -76
- package/src/model/PostRequest.ts +0 -113
- package/src/model/PutRequest.ts +0 -86
- package/src/screenplay/interactions/ChangeApiUrl.ts +0 -97
- package/tsconfig.eslint.json +0 -10
- /package/src/{model → models}/index.ts +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PutRequest = void 0;
|
|
4
|
+
const core_1 = require("@serenity-js/core");
|
|
5
|
+
const HTTPRequest_1 = require("./HTTPRequest");
|
|
6
|
+
/**
|
|
7
|
+
* The PUT method requests that the state of the target resource be
|
|
8
|
+
* created or replaced with the state defined by the representation
|
|
9
|
+
* enclosed in the request message payload.
|
|
10
|
+
*
|
|
11
|
+
* PUT request should be used when you want to create
|
|
12
|
+
* a new resource at a known `resourceUri` (e.g. `/books/0-688-00230-7`)
|
|
13
|
+
* or replace an existing resource at such `resourceUri`.
|
|
14
|
+
*
|
|
15
|
+
* PUT request is [idempotent](https://developer.mozilla.org/en-US/docs/Glossary/Idempotent):
|
|
16
|
+
* calling it once or several times successively has the same effect (that is no _side effect_).
|
|
17
|
+
*
|
|
18
|
+
* ## Create a new resource at a known location
|
|
19
|
+
*
|
|
20
|
+
* ```ts
|
|
21
|
+
* import { actorCalled } from '@serenity-js/core';
|
|
22
|
+
* import { CallAnApi, LastResponse, PutRequest, Send } from '@serenity-js/rest';
|
|
23
|
+
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
24
|
+
*
|
|
25
|
+
* await actorCalled('Apisit')
|
|
26
|
+
* .whoCan(CallAnApi.at('https://api.example.org/'))
|
|
27
|
+
* .attemptsTo(
|
|
28
|
+
* Send.a(PutRequest.to('/books/0-688-00230-7').with({
|
|
29
|
+
* isbn: '0-688-00230-7',
|
|
30
|
+
* title: 'Zen and the Art of Motorcycle Maintenance: An Inquiry into Values',
|
|
31
|
+
* author: 'Robert M. Pirsig',
|
|
32
|
+
* })),
|
|
33
|
+
* Ensure.that(LastResponse.status(), equals(201)),
|
|
34
|
+
* )
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ## Learn more
|
|
38
|
+
* - https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT
|
|
39
|
+
* - https://tools.ietf.org/html/rfc7231#section-4.3.4
|
|
40
|
+
*
|
|
41
|
+
* @group Models
|
|
42
|
+
*/
|
|
43
|
+
class PutRequest extends HTTPRequest_1.HTTPRequest {
|
|
44
|
+
/**
|
|
45
|
+
* Configures the object with a destination URI.
|
|
46
|
+
*
|
|
47
|
+
* When the `resourceUri` is not a fully qualified URL but a path, such as `/products/2`,
|
|
48
|
+
* it gets concatenated with the URL provided to the Axios instance
|
|
49
|
+
* when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
|
|
50
|
+
*
|
|
51
|
+
* @param resourceUri
|
|
52
|
+
* The URI where the {@apilink Actor}
|
|
53
|
+
* should send the {@apilink HTTPRequest}
|
|
54
|
+
*/
|
|
55
|
+
static to(resourceUri) {
|
|
56
|
+
return new PutRequest(resourceUri);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Configures the object with a request body.
|
|
60
|
+
*
|
|
61
|
+
* @param data
|
|
62
|
+
* Data to be sent to the `resourceUri`
|
|
63
|
+
*/
|
|
64
|
+
with(data) {
|
|
65
|
+
return new PutRequest(this.resourceUri, data, this.config);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Overrides the default Axios request configuration provided
|
|
69
|
+
* when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
|
|
70
|
+
*
|
|
71
|
+
* #### Learn more
|
|
72
|
+
* - {@apilink Answerable}
|
|
73
|
+
* - {@apilink WithAnswerableProperties}
|
|
74
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
75
|
+
*
|
|
76
|
+
* @param {Answerable<WithAnswerableProperties<AxiosRequestConfig>>} config
|
|
77
|
+
* Axios request configuration overrides
|
|
78
|
+
*/
|
|
79
|
+
using(config) {
|
|
80
|
+
return new PutRequest(this.resourceUri, this.data, core_1.Question.fromObject(config));
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
exports.PutRequest = PutRequest;
|
|
84
|
+
//# sourceMappingURL=PutRequest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PutRequest.js","sourceRoot":"","sources":["../../src/models/PutRequest.ts"],"names":[],"mappings":";;;AAAA,4CAAmF;AAGnF,+CAA4C;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,UAAW,SAAQ,yBAAW;IAEvC;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,CAAC,WAA+B;QACrC,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IAED;;;;;OAKG;IACH,IAAI,CAAC,IAAqB;QACtB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,MAAgE;QAClE,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,EAAE,eAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;IACpF,CAAC;CACJ;AA1CD,gCA0CC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,gDAA8B;AAC9B,mDAAiC;AACjC,iDAA+B;AAC/B,gDAA8B;AAC9B,+CAA6B"}
|
|
@@ -1,151 +1,140 @@
|
|
|
1
|
-
import { Ability
|
|
2
|
-
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
1
|
+
import { Ability } from '@serenity-js/core';
|
|
2
|
+
import { AxiosDefaults, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
3
3
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* An {@link @serenity-js/core/lib/screenplay~Ability} that enables the {@link Actor} to call a HTTP API.
|
|
6
|
-
* If you need to connect via a proxy, check out [this article](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d).
|
|
4
|
+
* An {@apilink Ability} that enables the {@apilink Actor} to call an HTTP API.
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
* import { Actor } from '@serenity-js/core';
|
|
10
|
-
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
11
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
6
|
+
* If you need to connect via a proxy, check out ["Using Axios behind corporate proxies"](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d).
|
|
12
7
|
*
|
|
13
|
-
*
|
|
14
|
-
* CallAnApi.at('https://myapp.com/api'),
|
|
15
|
-
* );
|
|
8
|
+
* ## Using the default Axios HTTP client
|
|
16
9
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
10
|
+
* ```ts
|
|
11
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
12
|
+
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
13
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
21
14
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
15
|
+
* await actorCalled('Apisitt')
|
|
16
|
+
* .whoCan(
|
|
17
|
+
* CallAnApi.at('https://api.example.org/')
|
|
18
|
+
* )
|
|
19
|
+
* .attemptsTo(
|
|
20
|
+
* Send.a(GetRequest.to('/users/2')),
|
|
21
|
+
* Ensure.that(LastResponse.status(), equals(200)),
|
|
22
|
+
* )
|
|
23
|
+
* ```
|
|
26
24
|
*
|
|
27
|
-
*
|
|
25
|
+
* ## Using Axios client with custom configuration
|
|
28
26
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* },
|
|
34
|
-
* });
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
29
|
+
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
30
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
35
31
|
*
|
|
36
|
-
*
|
|
37
|
-
* CallAnApi.using(axiosInstance),
|
|
38
|
-
* );
|
|
32
|
+
* import * as axios from 'axios'
|
|
39
33
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
34
|
+
* const axiosInstance = axios.create({
|
|
35
|
+
* timeout: 5 * 1000,
|
|
36
|
+
* headers: {
|
|
37
|
+
* 'X-Custom-Api-Key': 'secret-key',
|
|
38
|
+
* },
|
|
39
|
+
* });
|
|
44
40
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
41
|
+
* await actorCalled('Apisitt')
|
|
42
|
+
* .whoCan(
|
|
43
|
+
* CallAnApi.using(axiosInstance),
|
|
44
|
+
* )
|
|
45
|
+
* .attemptsTo(
|
|
46
|
+
* Send.a(GetRequest.to('/users/2')),
|
|
47
|
+
* Ensure.that(LastResponse.status(), equals(200)),
|
|
48
|
+
* )
|
|
49
|
+
* ```
|
|
47
50
|
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
51
|
+
* ## Learn more
|
|
52
|
+
* - https://github.com/axios/axios
|
|
53
|
+
* - https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
|
|
54
|
+
*
|
|
55
|
+
* @group Abilities
|
|
50
56
|
*/
|
|
51
|
-
export declare class CallAnApi
|
|
57
|
+
export declare class CallAnApi extends Ability {
|
|
52
58
|
private readonly axiosInstance;
|
|
53
59
|
/** @private */
|
|
54
60
|
private lastResponse;
|
|
55
61
|
/**
|
|
56
|
-
* @
|
|
57
|
-
* Ability to Call and api at a specified baseUrl
|
|
62
|
+
* Produces an {@apilink Ability|ability} to call a REST api at a specified baseUrl
|
|
58
63
|
*
|
|
59
|
-
*
|
|
64
|
+
* Default timeout is set to 2s.
|
|
60
65
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
66
|
+
* Default request headers:
|
|
67
|
+
* - `Accept`: `application/json,application/xml`
|
|
63
68
|
*
|
|
64
|
-
* @param
|
|
65
|
-
* @returns {CallAnApi}
|
|
69
|
+
* @param baseURL
|
|
66
70
|
*/
|
|
67
71
|
static at(baseURL: string): CallAnApi;
|
|
68
72
|
/**
|
|
69
|
-
* @
|
|
70
|
-
* Ability to Call a REST API using a given axios instance.
|
|
73
|
+
* Produces an {@apilink Ability|ability} to call a REST API using a given axios instance.
|
|
71
74
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
+
* Useful when you need to customise Axios to
|
|
76
|
+
* [make it aware of proxies](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d),
|
|
77
|
+
* for example.
|
|
75
78
|
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
79
|
+
* #### Learn more
|
|
80
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
78
81
|
*
|
|
79
|
-
* @
|
|
82
|
+
* @param axiosInstance
|
|
80
83
|
*/
|
|
81
84
|
static using(axiosInstance: AxiosInstance): CallAnApi;
|
|
82
85
|
/**
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* from within the {@link @serenity-js/core/lib/screenplay~Interaction} classes,
|
|
86
|
-
* such as {@link Send}.
|
|
86
|
+
* #### Learn more
|
|
87
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
87
88
|
*
|
|
88
|
-
* @param
|
|
89
|
-
* @return {CallAnApi}
|
|
90
|
-
*/
|
|
91
|
-
static as(actor: UsesAbilities): CallAnApi;
|
|
92
|
-
/**
|
|
93
|
-
* @param {AxiosInstance} axiosInstance
|
|
89
|
+
* @param axiosInstance
|
|
94
90
|
* A pre-configured instance of the Axios HTTP client
|
|
95
|
-
*
|
|
96
|
-
* @see {@link AxiosInstance}
|
|
97
91
|
*/
|
|
98
92
|
constructor(axiosInstance: AxiosInstance);
|
|
99
93
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
* has been instantiated and given to the {@link Actor}.
|
|
94
|
+
* Allows for the original Axios config to be changed after
|
|
95
|
+
* the {@apilink Ability|ability} to {@apilink CallAnApi}
|
|
96
|
+
* has been instantiated and given to the {@apilink Actor}.
|
|
104
97
|
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
98
|
+
* #### Learn more
|
|
99
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
107
100
|
*
|
|
108
|
-
* @
|
|
101
|
+
* @param fn
|
|
109
102
|
*/
|
|
110
|
-
modifyConfig(fn: (original:
|
|
103
|
+
modifyConfig(fn: (original: AxiosDefaults<any>) => any): void;
|
|
111
104
|
/**
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
* Response will be cached and available via {@link CallAnApi#mapLastResponse}
|
|
105
|
+
* Sends an HTTP request to a specified url.
|
|
106
|
+
* Response will be cached and available via {@apilink mapLastResponse}
|
|
115
107
|
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* @returns {Promise<AxiosResponse>}
|
|
121
|
-
* A promise of an AxiosResponse
|
|
108
|
+
* #### Learn more
|
|
109
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
110
|
+
* - [AxiosResponse](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L133-L140)
|
|
122
111
|
*
|
|
123
|
-
* @
|
|
124
|
-
*
|
|
112
|
+
* @param config
|
|
113
|
+
* Axios request configuration, which can be used to override the defaults
|
|
114
|
+
* provided when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
|
|
125
115
|
*/
|
|
126
116
|
request(config: AxiosRequestConfig): Promise<AxiosResponse>;
|
|
127
117
|
/**
|
|
128
|
-
* @
|
|
129
|
-
*
|
|
130
|
-
* any any defaults {@link AxiosInstance} has been configured with.
|
|
118
|
+
* Resolves the final URL, based on the {@apilink AxiosRequestConfig} provided
|
|
119
|
+
* and any defaults that the {@apilink AxiosInstance} has been configured with.
|
|
131
120
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
121
|
+
* #### Learn more
|
|
122
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
123
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
134
124
|
*
|
|
135
|
-
* @
|
|
136
|
-
* @see {@link AxiosInstance}
|
|
125
|
+
* @param config
|
|
137
126
|
*/
|
|
138
127
|
resolveUrl(config: AxiosRequestConfig): string;
|
|
139
128
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* Useful when you need to extract a portion of the {@link AxiosResponse} object.
|
|
129
|
+
* Maps the last cached response to another type.
|
|
130
|
+
* Useful when you need to extract a portion of the {@apilink AxiosResponse} object.
|
|
143
131
|
*
|
|
144
|
-
*
|
|
145
|
-
*
|
|
132
|
+
* #### Learn more
|
|
133
|
+
* - [AxiosResponse](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L133-L140)
|
|
146
134
|
*
|
|
147
|
-
* @
|
|
135
|
+
* @param mappingFunction
|
|
148
136
|
*/
|
|
149
|
-
mapLastResponse<T>(
|
|
137
|
+
mapLastResponse<T>(mappingFunction: (response: AxiosResponse) => T): T;
|
|
150
138
|
private captureResponseOf;
|
|
151
139
|
}
|
|
140
|
+
//# sourceMappingURL=CallAnApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CallAnApi.d.ts","sourceRoot":"","sources":["../../../src/screenplay/abilities/CallAnApi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAwD,MAAM,mBAAmB,CAAC;AAClG,OAAc,EAAE,aAAa,EAAc,aAAa,EAAgB,kBAAkB,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEzH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,qBAAa,SAAU,SAAQ,OAAO;IA8CtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IA5C1C,eAAe;IACf,OAAO,CAAC,YAAY,CAAgB;IAEpC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS;IAQrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE,aAAa,GAAG,SAAS;IAIrD;;;;;;OAMG;gBAC0B,aAAa,EAAE,aAAa;IAIzD;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,IAAI;IAI7D;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC;IAI3D;;;;;;;;;OASG;IACH,UAAU,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM;IAI9C;;;;;;;;OAQG;IACH,eAAe,CAAC,CAAC,EAAE,eAAe,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,CAAC,GAAG,CAAC;IAQtE,OAAO,CAAC,iBAAiB;CA0B5B"}
|
|
@@ -1,79 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.CallAnApi = void 0;
|
|
4
7
|
const core_1 = require("@serenity-js/core");
|
|
5
|
-
const axios_1 = require("axios");
|
|
6
|
-
const mergeConfig = require('axios/lib/core/mergeConfig'); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
7
|
-
const buildFullPath = require('axios/lib/core/buildFullPath'); // eslint-disable-line @typescript-eslint/no-var-requires
|
|
8
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
9
|
/**
|
|
9
|
-
* @
|
|
10
|
-
* An {@link @serenity-js/core/lib/screenplay~Ability} that enables the {@link Actor} to call a HTTP API.
|
|
11
|
-
* If you need to connect via a proxy, check out [this article](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d).
|
|
10
|
+
* An {@apilink Ability} that enables the {@apilink Actor} to call an HTTP API.
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
* import { Actor } from '@serenity-js/core';
|
|
15
|
-
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
16
|
-
* import { Ensure, equals } from '@serenity-js/assertions';
|
|
12
|
+
* If you need to connect via a proxy, check out ["Using Axios behind corporate proxies"](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d).
|
|
17
13
|
*
|
|
18
|
-
*
|
|
19
|
-
* CallAnApi.at('https://myapp.com/api'),
|
|
20
|
-
* );
|
|
14
|
+
* ## Using the default Axios HTTP client
|
|
21
15
|
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
18
|
+
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
19
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
26
20
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
21
|
+
* await actorCalled('Apisitt')
|
|
22
|
+
* .whoCan(
|
|
23
|
+
* CallAnApi.at('https://api.example.org/')
|
|
24
|
+
* )
|
|
25
|
+
* .attemptsTo(
|
|
26
|
+
* Send.a(GetRequest.to('/users/2')),
|
|
27
|
+
* Ensure.that(LastResponse.status(), equals(200)),
|
|
28
|
+
* )
|
|
29
|
+
* ```
|
|
31
30
|
*
|
|
32
|
-
*
|
|
31
|
+
* ## Using Axios client with custom configuration
|
|
33
32
|
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* },
|
|
39
|
-
* });
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { actorCalled } from '@serenity-js/core'
|
|
35
|
+
* import { CallAnApi, GetRequest, LastResponse, Send } from '@serenity-js/rest'
|
|
36
|
+
* import { Ensure, equals } from '@serenity-js/assertions'
|
|
40
37
|
*
|
|
41
|
-
*
|
|
42
|
-
* CallAnApi.using(axiosInstance),
|
|
43
|
-
* );
|
|
38
|
+
* import * as axios from 'axios'
|
|
44
39
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
40
|
+
* const axiosInstance = axios.create({
|
|
41
|
+
* timeout: 5 * 1000,
|
|
42
|
+
* headers: {
|
|
43
|
+
* 'X-Custom-Api-Key': 'secret-key',
|
|
44
|
+
* },
|
|
45
|
+
* });
|
|
49
46
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
47
|
+
* await actorCalled('Apisitt')
|
|
48
|
+
* .whoCan(
|
|
49
|
+
* CallAnApi.using(axiosInstance),
|
|
50
|
+
* )
|
|
51
|
+
* .attemptsTo(
|
|
52
|
+
* Send.a(GetRequest.to('/users/2')),
|
|
53
|
+
* Ensure.that(LastResponse.status(), equals(200)),
|
|
54
|
+
* )
|
|
55
|
+
* ```
|
|
52
56
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
57
|
+
* ## Learn more
|
|
58
|
+
* - https://github.com/axios/axios
|
|
59
|
+
* - https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
|
|
60
|
+
*
|
|
61
|
+
* @group Abilities
|
|
55
62
|
*/
|
|
56
|
-
class CallAnApi {
|
|
57
|
-
/**
|
|
58
|
-
* @param {AxiosInstance} axiosInstance
|
|
59
|
-
* A pre-configured instance of the Axios HTTP client
|
|
60
|
-
*
|
|
61
|
-
* @see {@link AxiosInstance}
|
|
62
|
-
*/
|
|
63
|
-
constructor(axiosInstance) {
|
|
64
|
-
this.axiosInstance = axiosInstance;
|
|
65
|
-
}
|
|
63
|
+
class CallAnApi extends core_1.Ability {
|
|
66
64
|
/**
|
|
67
|
-
* @
|
|
68
|
-
* Ability to Call and api at a specified baseUrl
|
|
65
|
+
* Produces an {@apilink Ability|ability} to call a REST api at a specified baseUrl
|
|
69
66
|
*
|
|
70
|
-
*
|
|
67
|
+
* Default timeout is set to 2s.
|
|
71
68
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
69
|
+
* Default request headers:
|
|
70
|
+
* - `Accept`: `application/json,application/xml`
|
|
74
71
|
*
|
|
75
|
-
* @param
|
|
76
|
-
* @returns {CallAnApi}
|
|
72
|
+
* @param baseURL
|
|
77
73
|
*/
|
|
78
74
|
static at(baseURL) {
|
|
79
75
|
return new CallAnApi(axios_1.default.create({
|
|
@@ -83,95 +79,86 @@ class CallAnApi {
|
|
|
83
79
|
}));
|
|
84
80
|
}
|
|
85
81
|
/**
|
|
86
|
-
* @
|
|
87
|
-
* Ability to Call a REST API using a given axios instance.
|
|
82
|
+
* Produces an {@apilink Ability|ability} to call a REST API using a given axios instance.
|
|
88
83
|
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
84
|
+
* Useful when you need to customise Axios to
|
|
85
|
+
* [make it aware of proxies](https://janmolak.com/node-js-axios-behind-corporate-proxies-8b17a6f31f9d),
|
|
86
|
+
* for example.
|
|
92
87
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
88
|
+
* #### Learn more
|
|
89
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
95
90
|
*
|
|
96
|
-
* @
|
|
91
|
+
* @param axiosInstance
|
|
97
92
|
*/
|
|
98
93
|
static using(axiosInstance) {
|
|
99
94
|
return new CallAnApi(axiosInstance);
|
|
100
95
|
}
|
|
101
96
|
/**
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* from within the {@link @serenity-js/core/lib/screenplay~Interaction} classes,
|
|
105
|
-
* such as {@link Send}.
|
|
97
|
+
* #### Learn more
|
|
98
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
106
99
|
*
|
|
107
|
-
* @param
|
|
108
|
-
*
|
|
100
|
+
* @param axiosInstance
|
|
101
|
+
* A pre-configured instance of the Axios HTTP client
|
|
109
102
|
*/
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
constructor(axiosInstance) {
|
|
104
|
+
super();
|
|
105
|
+
this.axiosInstance = axiosInstance;
|
|
112
106
|
}
|
|
113
107
|
/**
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
* has been instantiated and given to the {@link Actor}.
|
|
108
|
+
* Allows for the original Axios config to be changed after
|
|
109
|
+
* the {@apilink Ability|ability} to {@apilink CallAnApi}
|
|
110
|
+
* has been instantiated and given to the {@apilink Actor}.
|
|
118
111
|
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
112
|
+
* #### Learn more
|
|
113
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
121
114
|
*
|
|
122
|
-
* @
|
|
115
|
+
* @param fn
|
|
123
116
|
*/
|
|
124
117
|
modifyConfig(fn) {
|
|
125
118
|
fn(this.axiosInstance.defaults);
|
|
126
119
|
}
|
|
127
120
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* Response will be cached and available via {@link CallAnApi#mapLastResponse}
|
|
121
|
+
* Sends an HTTP request to a specified url.
|
|
122
|
+
* Response will be cached and available via {@apilink mapLastResponse}
|
|
131
123
|
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
* @returns {Promise<AxiosResponse>}
|
|
137
|
-
* A promise of an AxiosResponse
|
|
124
|
+
* #### Learn more
|
|
125
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
126
|
+
* - [AxiosResponse](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L133-L140)
|
|
138
127
|
*
|
|
139
|
-
* @
|
|
140
|
-
*
|
|
128
|
+
* @param config
|
|
129
|
+
* Axios request configuration, which can be used to override the defaults
|
|
130
|
+
* provided when the {@apilink Ability|ability} to {@apilink CallAnApi} was instantiated.
|
|
141
131
|
*/
|
|
142
132
|
request(config) {
|
|
143
133
|
return this.captureResponseOf(this.axiosInstance.request(config));
|
|
144
134
|
}
|
|
145
135
|
/**
|
|
146
|
-
* @
|
|
147
|
-
*
|
|
148
|
-
* any any defaults {@link AxiosInstance} has been configured with.
|
|
136
|
+
* Resolves the final URL, based on the {@apilink AxiosRequestConfig} provided
|
|
137
|
+
* and any defaults that the {@apilink AxiosInstance} has been configured with.
|
|
149
138
|
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
139
|
+
* #### Learn more
|
|
140
|
+
* - [AxiosRequestConfig](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L75-L113)
|
|
141
|
+
* - [AxiosInstance](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L235-L238)
|
|
152
142
|
*
|
|
153
|
-
* @
|
|
154
|
-
* @see {@link AxiosInstance}
|
|
143
|
+
* @param config
|
|
155
144
|
*/
|
|
156
145
|
resolveUrl(config) {
|
|
157
|
-
|
|
158
|
-
return buildFullPath(merged.baseURL, merged.url);
|
|
146
|
+
return this.axiosInstance.getUri(config);
|
|
159
147
|
}
|
|
160
148
|
/**
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* Useful when you need to extract a portion of the {@link AxiosResponse} object.
|
|
149
|
+
* Maps the last cached response to another type.
|
|
150
|
+
* Useful when you need to extract a portion of the {@apilink AxiosResponse} object.
|
|
164
151
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
152
|
+
* #### Learn more
|
|
153
|
+
* - [AxiosResponse](https://github.com/axios/axios/blob/v0.27.2/index.d.ts#L133-L140)
|
|
167
154
|
*
|
|
168
|
-
* @
|
|
155
|
+
* @param mappingFunction
|
|
169
156
|
*/
|
|
170
|
-
mapLastResponse(
|
|
157
|
+
mapLastResponse(mappingFunction) {
|
|
171
158
|
if (!this.lastResponse) {
|
|
172
159
|
throw new core_1.LogicError(`Make sure to perform a HTTP API call before checking on the response`);
|
|
173
160
|
}
|
|
174
|
-
return
|
|
161
|
+
return mappingFunction(this.lastResponse);
|
|
175
162
|
}
|
|
176
163
|
captureResponseOf(promisedResponse) {
|
|
177
164
|
return promisedResponse
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallAnApi.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/CallAnApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CallAnApi.js","sourceRoot":"","sources":["../../../src/screenplay/abilities/CallAnApi.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAkG;AAClG,kDAAyH;AAEzH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,MAAa,SAAU,SAAQ,cAAO;IAKlC;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,CAAC,OAAe;QACrB,OAAO,IAAI,SAAS,CAAC,eAAK,CAAC,MAAM,CAAC;YAC9B,OAAO;YACP,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,EAAE,MAAM,EAAE,kCAAkC,EAAE;SAC1D,CAAC,CAAC,CAAC;IACR,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,KAAK,CAAC,aAA4B;QACrC,OAAO,IAAI,SAAS,CAAC,aAAa,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACH,YAA6B,aAA4B;QACrD,KAAK,EAAE,CAAC;QADiB,kBAAa,GAAb,aAAa,CAAe;IAEzD,CAAC;IAED;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAyC;QAClD,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,MAA0B;QAC9B,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACtE,CAAC;IAED;;;;;;;;;OASG;IACH,UAAU,CAAC,MAA0B;QACjC,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED;;;;;;;;OAQG;IACH,eAAe,CAAI,eAA+C;QAC9D,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACpB,MAAM,IAAI,iBAAU,CAAC,sEAAsE,CAAC,CAAC;SAChG;QAED,OAAO,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC9C,CAAC;IAEO,iBAAiB,CAAC,gBAA8B;QACpD,OAAO,gBAAgB;aAClB,IAAI,CACD,YAAY,CAAC,EAAE;YACX,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;YAEjC,OAAO,YAAY,CAAC;QACxB,CAAC,EACD,KAAK,CAAC,EAAE;YACJ,QAAQ,IAAI,EAAE;gBACV,KAAK,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;oBACxC,MAAM,IAAI,2BAAoB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;gBACvE,KAAK,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;oBACpC,MAAM,IAAI,2BAAoB,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;gBAC1E,KAAK,KAAK,YAAY,SAAS;oBAC3B,MAAM,IAAI,yBAAkB,CAAC,wDAAwD,EAAE,KAAK,CAAC,CAAC;gBAClG,KAAK,CAAG,KAAoB,CAAC,QAAQ;oBACjC,MAAM,IAAI,2BAAoB,CAAC,yBAAyB,EAAE,KAAK,CAAC,CAAC,CAAG,4BAA4B;gBACpG;oBACI,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC;oBAEnC,OAAO,KAAK,CAAC,QAAQ,CAAC;aAC7B;QACL,CAAC,CACJ,CAAC;IACV,CAAC;CACJ;AAzID,8BAyIC"}
|