@skyramp/skyramp 1.3.3 → 1.3.4
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/package.json
CHANGED
|
@@ -7,8 +7,9 @@ export interface AsyncRequestOptions {
|
|
|
7
7
|
method?: string;
|
|
8
8
|
body?: string;
|
|
9
9
|
headers?: Record<string, string>;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
cookies?: Record<string, string>;
|
|
11
|
+
pathParams?: Record<string, string | number | boolean>;
|
|
12
|
+
queryParams?: Record<string, string | string[] | number | boolean>;
|
|
12
13
|
formParams?: Record<string, string | number | boolean>;
|
|
13
14
|
multipartParams?: Record<string, string | number | boolean>;
|
|
14
15
|
dataOverride?: Record<string, string | number | boolean>;
|
|
@@ -33,6 +34,18 @@ export class AsyncRequest {
|
|
|
33
34
|
*/
|
|
34
35
|
getAsyncRequestValue(path: string | null): string;
|
|
35
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Returns request's cookie value construct for asynchronous backend
|
|
39
|
+
* @param cookieName The name of the cookie
|
|
40
|
+
*/
|
|
41
|
+
getCookieValue(cookieName: string): string;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns request's response header value construct for asynchronous backend
|
|
45
|
+
* @param headerName The name of the response header
|
|
46
|
+
*/
|
|
47
|
+
getResponseHeaderValue(headerName: string): string;
|
|
48
|
+
|
|
36
49
|
/**
|
|
37
50
|
* Returns request's status check construct for asynchronous backend
|
|
38
51
|
* @param code The expected status code
|
|
@@ -42,6 +42,24 @@ class AsyncRequest {
|
|
|
42
42
|
return `requests.${this.request.name}.res.${path}`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Returns request's cookie value construct for asynchronous backend
|
|
47
|
+
* @param {string} cookieName - The name of the cookie
|
|
48
|
+
* @returns {string} The cookie value reference
|
|
49
|
+
*/
|
|
50
|
+
getCookieValue(cookieName) {
|
|
51
|
+
return `requests.${this.request.name}.cookies["${cookieName}"]`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Returns request's response header value construct for asynchronous backend
|
|
56
|
+
* @param {string} headerName - The name of the response header
|
|
57
|
+
* @returns {string} The response header value reference
|
|
58
|
+
*/
|
|
59
|
+
getResponseHeaderValue(headerName) {
|
|
60
|
+
return `requests.${this.request.name}.headers["${headerName}"]`;
|
|
61
|
+
}
|
|
62
|
+
|
|
45
63
|
/**
|
|
46
64
|
* Returns request's status check construct for asynchronous backend
|
|
47
65
|
* @param {string|number} code - The expected status code
|
|
@@ -111,6 +129,7 @@ class AsyncScenario {
|
|
|
111
129
|
* @param {string} [options.method] - The HTTP method of the request (e.g., GET, POST)
|
|
112
130
|
* @param {string} [options.body] - The body of the request
|
|
113
131
|
* @param {Object} [options.headers] - The headers of the request
|
|
132
|
+
* @param {Object} [options.cookies] - The cookies of the request
|
|
114
133
|
* @param {Object} [options.pathParams] - The path parameters of the request
|
|
115
134
|
* @param {Object} [options.queryParams] - The query parameters of the request
|
|
116
135
|
* @param {Object} [options.formParams] - The form parameters of the request
|
|
@@ -132,6 +151,7 @@ class AsyncScenario {
|
|
|
132
151
|
method,
|
|
133
152
|
body,
|
|
134
153
|
headers,
|
|
154
|
+
cookies,
|
|
135
155
|
pathParams,
|
|
136
156
|
queryParams,
|
|
137
157
|
formParams,
|
|
@@ -152,6 +172,7 @@ class AsyncScenario {
|
|
|
152
172
|
method,
|
|
153
173
|
body,
|
|
154
174
|
headers,
|
|
175
|
+
cookies,
|
|
155
176
|
pathParams,
|
|
156
177
|
queryParams,
|
|
157
178
|
formParams,
|
|
@@ -12,8 +12,8 @@ interface RequestV2Options {
|
|
|
12
12
|
headers?: {[headerName: string]: string};
|
|
13
13
|
cookies?: {[cookieName: string]: string};
|
|
14
14
|
dataOverride?: {[dataName: string]: string | number | boolean | object};
|
|
15
|
-
pathParams?: {[pathName: string]: string
|
|
16
|
-
queryParams?: {[queryName: string]: string | number | boolean | object};
|
|
15
|
+
pathParams?: {[pathName: string]: string| number | boolean | object};
|
|
16
|
+
queryParams?: {[queryName: string]: string | string[] | number | boolean | object};
|
|
17
17
|
formParams?: {[formParamName: string]: string | number | boolean | object};
|
|
18
18
|
multipartParams?: Array<MultipartParam>;
|
|
19
19
|
expectedCode?: string;
|