lambder 1.0.96 → 1.0.97
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,5 +34,5 @@ export default class LambderResponseBuilder {
|
|
|
34
34
|
cors(): LambderResolverResponse;
|
|
35
35
|
fileBase64(fileBase64: string, mimeType: string, headers?: Record<string, string | string[]>): LambderResolverResponse;
|
|
36
36
|
file(filePath: string, headers?: Record<string, string | string[]>, fallbackFilePath?: string): LambderResolverResponse;
|
|
37
|
-
api<T = any>(payload: T | null, { versionExpired, sessionExpired, notAuthorized, message, errorMessage, }
|
|
37
|
+
api<T = any>(payload: T | null, { versionExpired, sessionExpired, notAuthorized, message, errorMessage, }?: LambderApiResponseConfig, headers?: Record<string, string | string[]>): LambderResolverResponse;
|
|
38
38
|
}
|
|
@@ -119,7 +119,10 @@ export default class LambderResponseBuilder {
|
|
|
119
119
|
return this.fileBase64(bodyBase64, mimeType || "", headers);
|
|
120
120
|
}
|
|
121
121
|
;
|
|
122
|
-
api(payload, { versionExpired, sessionExpired, notAuthorized, message = null, errorMessage = null, }
|
|
122
|
+
api(payload, { versionExpired, sessionExpired, notAuthorized, message = null, errorMessage = null, } = {
|
|
123
|
+
versionExpired: undefined, sessionExpired: undefined, notAuthorized: undefined,
|
|
124
|
+
message: null, errorMessage: null,
|
|
125
|
+
}, headers) {
|
|
123
126
|
return this.json({
|
|
124
127
|
apiVersion: this.apiVersion,
|
|
125
128
|
payload,
|
package/package.json
CHANGED
|
@@ -175,7 +175,10 @@ export default class LambderResponseBuilder {
|
|
|
175
175
|
{
|
|
176
176
|
versionExpired, sessionExpired, notAuthorized,
|
|
177
177
|
message = null, errorMessage = null,
|
|
178
|
-
}: LambderApiResponseConfig
|
|
178
|
+
}: LambderApiResponseConfig = {
|
|
179
|
+
versionExpired: undefined, sessionExpired: undefined, notAuthorized: undefined,
|
|
180
|
+
message: null, errorMessage: null,
|
|
181
|
+
},
|
|
179
182
|
headers?: Record<string, string|string[]>,
|
|
180
183
|
): LambderResolverResponse {
|
|
181
184
|
return this.json({
|