@trayio/cdk-dsl 3.13.0 → 3.13.1-unstable
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.
|
@@ -34,16 +34,23 @@ export declare class HttpOperationRequest {
|
|
|
34
34
|
constructor(path: string, method: HttpMethod, request: HttpRequest, contentType: O.Option<HttpContentType>, body: HttpOperationBody);
|
|
35
35
|
}
|
|
36
36
|
export type HttpOperationRequestHandler<AUTH extends OperationHandlerAuth<unknown, unknown>, IN> = (ctx: OperationHandlerContext<AUTH>, input: IN, request: HttpOperationRequestBuilder) => HttpOperationRequest;
|
|
37
|
-
|
|
37
|
+
type HttpOperationErrorHandlingResponse = {
|
|
38
|
+
body: any;
|
|
39
|
+
headers: HttpHeaders;
|
|
40
|
+
statusCode: Number;
|
|
41
|
+
};
|
|
42
|
+
export type HttpOperationResponseErrorHandling<OUT> = (response: HttpOperationErrorHandlingResponse) => OperationHandlerResult<OUT>;
|
|
38
43
|
export type HttpOperationResponseParser<BODY, OUT> = (body: BODY) => OperationHandlerResult<OUT>;
|
|
39
44
|
export declare class HttpOperationResponseBuilder<OUT> {
|
|
40
45
|
private response;
|
|
41
46
|
private errorHandling;
|
|
42
|
-
|
|
47
|
+
private errorContentType;
|
|
48
|
+
constructor(response: HttpResponse, errorHandling: HttpOperationResponseErrorHandling<OUT>, errorContentType: O.Option<HttpContentType>);
|
|
43
49
|
getStatusCode(): number;
|
|
44
50
|
getHeader(name: string): HttpHeaderValue | undefined;
|
|
45
51
|
getHeaders(): HttpHeaders;
|
|
46
52
|
withErrorHandling(errorHandling: HttpOperationResponseErrorHandling<OUT>): HttpOperationResponseBuilder<OUT>;
|
|
53
|
+
withJsonErrorHandling(errorHandling: HttpOperationResponseErrorHandling<OUT>): HttpOperationResponseBuilder<OUT>;
|
|
47
54
|
parseWithoutBody(responseParser: HttpOperationResponseParser<undefined, OUT>): HttpOperationResponse<OUT>;
|
|
48
55
|
parseWithBodyAsText(responseParser: HttpOperationResponseParser<string, OUT>): HttpOperationResponse<OUT>;
|
|
49
56
|
parseWithBodyAsJson<T extends DynamicType>(responseParser?: HttpOperationResponseParser<T, OUT>): HttpOperationResponse<OUT>;
|
|
@@ -54,7 +61,8 @@ export declare class HttpOperationResponse<OUT> {
|
|
|
54
61
|
readonly errorHandling: HttpOperationResponseErrorHandling<OUT>;
|
|
55
62
|
readonly contentType: O.Option<HttpContentType>;
|
|
56
63
|
readonly responseParser: HttpOperationResponseParser<any, OUT>;
|
|
57
|
-
|
|
64
|
+
readonly errorContentType: O.Option<HttpContentType>;
|
|
65
|
+
constructor(response: HttpResponse, errorHandling: HttpOperationResponseErrorHandling<OUT>, errorContentType: O.Option<HttpContentType>, contentType: O.Option<HttpContentType>, responseParser: HttpOperationResponseParser<any, OUT>);
|
|
58
66
|
}
|
|
59
67
|
export type HttpOperationResponseHandler<AUTH extends OperationHandlerAuth<unknown, unknown>, IN, OUT> = (ctx: OperationHandlerContext<AUTH>, input: IN, response: HttpOperationResponseBuilder<OUT>) => HttpOperationResponse<OUT>;
|
|
60
68
|
export declare class HttpOperationHandler<AUTH extends OperationHandlerAuth<unknown, unknown>, IN, OUT> {
|
|
@@ -84,4 +92,5 @@ export declare class HttpOperationHandlerConfiguration<AUTH extends OperationHan
|
|
|
84
92
|
private initialRequest;
|
|
85
93
|
}
|
|
86
94
|
export type HttpOperationHandlerSetup<AUTH extends OperationHandlerAuth<unknown, unknown>, IN, OUT> = (http: HttpOperationHandlerConfiguration<AUTH, IN, OUT>) => HttpOperationHandler<AUTH, IN, OUT>;
|
|
95
|
+
export {};
|
|
87
96
|
//# sourceMappingURL=HttpOperationHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpOperationHandler.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/HttpOperationHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EACf,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,WAA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UAAU,GAAG,2BAA2B;IAI3D,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B;IAIjD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,2BAA2B;IAI3D,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,2BAA2B;CAS5E;AAED,qBAAa,oBAAoB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;gBAGhC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,EACtC,IAAI,EAAE,iBAAiB;CAQxB;AAED,MAAM,MAAM,2BAA2B,CACtC,IAAI,SAAS,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,EACnD,EAAE,IACC,CACH,GAAG,EAAE,uBAAuB,CAAC,IAAI,CAAC,EAClC,KAAK,EAAE,EAAE,EACT,OAAO,EAAE,2BAA2B,KAChC,oBAAoB,CAAC;AAE1B,MAAM,MAAM,kCAAkC,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"HttpOperationHandler.d.ts","sourceRoot":"","sources":["../../../src/connector/operation/HttpOperationHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EACf,UAAU,EACV,WAAW,EACX,eAAe,EACf,YAAY,EACZ,WAAW,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,aAAa,EACb,WAAW,EACX,MAAM,yCAAyC,CAAC;AAIjD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAClC,OAAO,EACN,oBAAoB,EACpB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CAAC,KAClD,oBAAoB,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -132,9 +132,11 @@ exports.HttpOperationRequest = HttpOperationRequest;
|
|
|
132
132
|
class HttpOperationResponseBuilder {
|
|
133
133
|
response;
|
|
134
134
|
errorHandling;
|
|
135
|
-
|
|
135
|
+
errorContentType;
|
|
136
|
+
constructor(response, errorHandling, errorContentType) {
|
|
136
137
|
this.response = response;
|
|
137
138
|
this.errorHandling = errorHandling;
|
|
139
|
+
this.errorContentType = errorContentType;
|
|
138
140
|
}
|
|
139
141
|
getStatusCode() {
|
|
140
142
|
return this.response.statusCode;
|
|
@@ -146,19 +148,22 @@ class HttpOperationResponseBuilder {
|
|
|
146
148
|
return this.response.headers;
|
|
147
149
|
}
|
|
148
150
|
withErrorHandling(errorHandling) {
|
|
149
|
-
return new HttpOperationResponseBuilder(this.response, errorHandling);
|
|
151
|
+
return new HttpOperationResponseBuilder(this.response, errorHandling, O.none);
|
|
152
|
+
}
|
|
153
|
+
withJsonErrorHandling(errorHandling) {
|
|
154
|
+
return new HttpOperationResponseBuilder(this.response, errorHandling, O.some(Http_1.HttpContentType.Json));
|
|
150
155
|
}
|
|
151
156
|
parseWithoutBody(responseParser) {
|
|
152
|
-
return new HttpOperationResponse(this.response, this.errorHandling, O.none, responseParser);
|
|
157
|
+
return new HttpOperationResponse(this.response, this.errorHandling, this.errorContentType, O.none, responseParser);
|
|
153
158
|
}
|
|
154
159
|
parseWithBodyAsText(responseParser) {
|
|
155
|
-
return new HttpOperationResponse(this.response, this.errorHandling, O.some(Http_1.HttpContentType.Text), responseParser);
|
|
160
|
+
return new HttpOperationResponse(this.response, this.errorHandling, this.errorContentType, O.some(Http_1.HttpContentType.Text), responseParser);
|
|
156
161
|
}
|
|
157
162
|
parseWithBodyAsJson(responseParser = (body) => OperationHandler_1.OperationHandlerResult.success(body)) {
|
|
158
|
-
return new HttpOperationResponse(this.response, this.errorHandling, O.some(Http_1.HttpContentType.Json), responseParser);
|
|
163
|
+
return new HttpOperationResponse(this.response, this.errorHandling, this.errorContentType, O.some(Http_1.HttpContentType.Json), responseParser);
|
|
159
164
|
}
|
|
160
165
|
parseWithBodyAsFile(responseParser) {
|
|
161
|
-
return new HttpOperationResponse(this.response, this.errorHandling, O.some(Http_1.HttpContentType.OctetStream), responseParser);
|
|
166
|
+
return new HttpOperationResponse(this.response, this.errorHandling, this.errorContentType, O.some(Http_1.HttpContentType.OctetStream), responseParser);
|
|
162
167
|
}
|
|
163
168
|
}
|
|
164
169
|
exports.HttpOperationResponseBuilder = HttpOperationResponseBuilder;
|
|
@@ -167,7 +172,9 @@ class HttpOperationResponse {
|
|
|
167
172
|
errorHandling;
|
|
168
173
|
contentType;
|
|
169
174
|
responseParser;
|
|
170
|
-
|
|
175
|
+
errorContentType;
|
|
176
|
+
constructor(response, errorHandling, errorContentType, contentType, responseParser) {
|
|
177
|
+
this.errorContentType = errorContentType;
|
|
171
178
|
this.response = response;
|
|
172
179
|
this.errorHandling = errorHandling;
|
|
173
180
|
this.contentType = contentType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trayio/cdk-dsl",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.1-unstable",
|
|
4
4
|
"description": "A DSL for connector development",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./*": "./dist/*.js"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@trayio/commons": "3.13.
|
|
17
|
+
"@trayio/commons": "3.13.1-unstable"
|
|
18
18
|
},
|
|
19
19
|
"typesVersions": {
|
|
20
20
|
"*": {
|