@aws-sdk/client-appsync 3.212.0 → 3.213.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/README.md +2 -2
- package/dist-cjs/AppSync.js +15 -0
- package/dist-cjs/commands/EvaluateCodeCommand.js +46 -0
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/models/models_0.js +42 -4
- package/dist-cjs/protocols/Aws_restJson1.js +162 -2
- package/dist-es/AppSync.js +15 -0
- package/dist-es/commands/EvaluateCodeCommand.js +42 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +31 -0
- package/dist-es/protocols/Aws_restJson1.js +157 -0
- package/dist-types/AppSync.d.ts +26 -18
- package/dist-types/AppSyncClient.d.ts +5 -4
- package/dist-types/commands/CreateFunctionCommand.d.ts +1 -2
- package/dist-types/commands/CreateResolverCommand.d.ts +2 -2
- package/dist-types/commands/EvaluateCodeCommand.d.ts +41 -0
- package/dist-types/commands/EvaluateMappingTemplateCommand.d.ts +5 -6
- package/dist-types/commands/ListApiKeysCommand.d.ts +3 -4
- package/dist-types/commands/StartSchemaCreationCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +459 -293
- package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
- package/dist-types/ts3.4/AppSync.d.ts +17 -0
- package/dist-types/ts3.4/AppSyncClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/EvaluateCodeCommand.d.ts +34 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +74 -2
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +12 -0
- package/package.json +2 -2
|
@@ -16,6 +16,7 @@ export * from "./DeleteGraphqlApiCommand";
|
|
|
16
16
|
export * from "./DeleteResolverCommand";
|
|
17
17
|
export * from "./DeleteTypeCommand";
|
|
18
18
|
export * from "./DisassociateApiCommand";
|
|
19
|
+
export * from "./EvaluateCodeCommand";
|
|
19
20
|
export * from "./EvaluateMappingTemplateCommand";
|
|
20
21
|
export * from "./FlushApiCacheCommand";
|
|
21
22
|
export * from "./GetApiAssociationCommand";
|
|
@@ -92,6 +92,14 @@ export class ApiLimitExceededException extends __BaseException {
|
|
|
92
92
|
Object.setPrototypeOf(this, ApiLimitExceededException.prototype);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
+
export var RuntimeName;
|
|
96
|
+
(function (RuntimeName) {
|
|
97
|
+
RuntimeName["APPSYNC_JS"] = "APPSYNC_JS";
|
|
98
|
+
})(RuntimeName || (RuntimeName = {}));
|
|
99
|
+
export var BadRequestReason;
|
|
100
|
+
(function (BadRequestReason) {
|
|
101
|
+
BadRequestReason["CODE_ERROR"] = "CODE_ERROR";
|
|
102
|
+
})(BadRequestReason || (BadRequestReason = {}));
|
|
95
103
|
export class BadRequestException extends __BaseException {
|
|
96
104
|
constructor(opts) {
|
|
97
105
|
super({
|
|
@@ -102,6 +110,8 @@ export class BadRequestException extends __BaseException {
|
|
|
102
110
|
this.name = "BadRequestException";
|
|
103
111
|
this.$fault = "client";
|
|
104
112
|
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
113
|
+
this.reason = opts.reason;
|
|
114
|
+
this.detail = opts.detail;
|
|
105
115
|
}
|
|
106
116
|
}
|
|
107
117
|
export class InternalFailureException extends __BaseException {
|
|
@@ -262,12 +272,24 @@ export const ApiCacheFilterSensitiveLog = (obj) => ({
|
|
|
262
272
|
export const ApiKeyFilterSensitiveLog = (obj) => ({
|
|
263
273
|
...obj,
|
|
264
274
|
});
|
|
275
|
+
export const AppSyncRuntimeFilterSensitiveLog = (obj) => ({
|
|
276
|
+
...obj,
|
|
277
|
+
});
|
|
265
278
|
export const AssociateApiRequestFilterSensitiveLog = (obj) => ({
|
|
266
279
|
...obj,
|
|
267
280
|
});
|
|
268
281
|
export const AssociateApiResponseFilterSensitiveLog = (obj) => ({
|
|
269
282
|
...obj,
|
|
270
283
|
});
|
|
284
|
+
export const CodeErrorLocationFilterSensitiveLog = (obj) => ({
|
|
285
|
+
...obj,
|
|
286
|
+
});
|
|
287
|
+
export const CodeErrorFilterSensitiveLog = (obj) => ({
|
|
288
|
+
...obj,
|
|
289
|
+
});
|
|
290
|
+
export const BadRequestDetailFilterSensitiveLog = (obj) => ({
|
|
291
|
+
...obj,
|
|
292
|
+
});
|
|
271
293
|
export const AwsIamConfigFilterSensitiveLog = (obj) => ({
|
|
272
294
|
...obj,
|
|
273
295
|
});
|
|
@@ -436,6 +458,15 @@ export const DisassociateApiRequestFilterSensitiveLog = (obj) => ({
|
|
|
436
458
|
export const DisassociateApiResponseFilterSensitiveLog = (obj) => ({
|
|
437
459
|
...obj,
|
|
438
460
|
});
|
|
461
|
+
export const EvaluateCodeRequestFilterSensitiveLog = (obj) => ({
|
|
462
|
+
...obj,
|
|
463
|
+
});
|
|
464
|
+
export const EvaluateCodeErrorDetailFilterSensitiveLog = (obj) => ({
|
|
465
|
+
...obj,
|
|
466
|
+
});
|
|
467
|
+
export const EvaluateCodeResponseFilterSensitiveLog = (obj) => ({
|
|
468
|
+
...obj,
|
|
469
|
+
});
|
|
439
470
|
export const EvaluateMappingTemplateRequestFilterSensitiveLog = (obj) => ({
|
|
440
471
|
...obj,
|
|
441
472
|
});
|
|
@@ -144,6 +144,7 @@ export const serializeAws_restJson1CreateFunctionCommand = async (input, context
|
|
|
144
144
|
resolvedPath = __resolvedPath(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
|
|
145
145
|
let body;
|
|
146
146
|
body = JSON.stringify({
|
|
147
|
+
...(input.code != null && { code: input.code }),
|
|
147
148
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
148
149
|
...(input.description != null && { description: input.description }),
|
|
149
150
|
...(input.functionVersion != null && { functionVersion: input.functionVersion }),
|
|
@@ -151,6 +152,7 @@ export const serializeAws_restJson1CreateFunctionCommand = async (input, context
|
|
|
151
152
|
...(input.name != null && { name: input.name }),
|
|
152
153
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
153
154
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
155
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
154
156
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
155
157
|
});
|
|
156
158
|
return new __HttpRequest({
|
|
@@ -213,6 +215,7 @@ export const serializeAws_restJson1CreateResolverCommand = async (input, context
|
|
|
213
215
|
...(input.cachingConfig != null && {
|
|
214
216
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
215
217
|
}),
|
|
218
|
+
...(input.code != null && { code: input.code }),
|
|
216
219
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
217
220
|
...(input.fieldName != null && { fieldName: input.fieldName }),
|
|
218
221
|
...(input.kind != null && { kind: input.kind }),
|
|
@@ -222,6 +225,7 @@ export const serializeAws_restJson1CreateResolverCommand = async (input, context
|
|
|
222
225
|
}),
|
|
223
226
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
224
227
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
228
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
225
229
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
226
230
|
});
|
|
227
231
|
return new __HttpRequest({
|
|
@@ -408,6 +412,29 @@ export const serializeAws_restJson1DisassociateApiCommand = async (input, contex
|
|
|
408
412
|
body,
|
|
409
413
|
});
|
|
410
414
|
};
|
|
415
|
+
export const serializeAws_restJson1EvaluateCodeCommand = async (input, context) => {
|
|
416
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
417
|
+
const headers = {
|
|
418
|
+
"content-type": "application/json",
|
|
419
|
+
};
|
|
420
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataplane-evaluatecode";
|
|
421
|
+
let body;
|
|
422
|
+
body = JSON.stringify({
|
|
423
|
+
...(input.code != null && { code: input.code }),
|
|
424
|
+
...(input.context != null && { context: input.context }),
|
|
425
|
+
...(input.function != null && { function: input.function }),
|
|
426
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
427
|
+
});
|
|
428
|
+
return new __HttpRequest({
|
|
429
|
+
protocol,
|
|
430
|
+
hostname,
|
|
431
|
+
port,
|
|
432
|
+
method: "POST",
|
|
433
|
+
headers,
|
|
434
|
+
path: resolvedPath,
|
|
435
|
+
body,
|
|
436
|
+
});
|
|
437
|
+
};
|
|
411
438
|
export const serializeAws_restJson1EvaluateMappingTemplateCommand = async (input, context) => {
|
|
412
439
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
413
440
|
const headers = {
|
|
@@ -989,6 +1016,7 @@ export const serializeAws_restJson1UpdateFunctionCommand = async (input, context
|
|
|
989
1016
|
resolvedPath = __resolvedPath(resolvedPath, input, "functionId", () => input.functionId, "{functionId}", false);
|
|
990
1017
|
let body;
|
|
991
1018
|
body = JSON.stringify({
|
|
1019
|
+
...(input.code != null && { code: input.code }),
|
|
992
1020
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
993
1021
|
...(input.description != null && { description: input.description }),
|
|
994
1022
|
...(input.functionVersion != null && { functionVersion: input.functionVersion }),
|
|
@@ -996,6 +1024,7 @@ export const serializeAws_restJson1UpdateFunctionCommand = async (input, context
|
|
|
996
1024
|
...(input.name != null && { name: input.name }),
|
|
997
1025
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
998
1026
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
1027
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
999
1028
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
1000
1029
|
});
|
|
1001
1030
|
return new __HttpRequest({
|
|
@@ -1059,6 +1088,7 @@ export const serializeAws_restJson1UpdateResolverCommand = async (input, context
|
|
|
1059
1088
|
...(input.cachingConfig != null && {
|
|
1060
1089
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
1061
1090
|
}),
|
|
1091
|
+
...(input.code != null && { code: input.code }),
|
|
1062
1092
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
1063
1093
|
...(input.kind != null && { kind: input.kind }),
|
|
1064
1094
|
...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
|
|
@@ -1067,6 +1097,7 @@ export const serializeAws_restJson1UpdateResolverCommand = async (input, context
|
|
|
1067
1097
|
}),
|
|
1068
1098
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
1069
1099
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
1100
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
1070
1101
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
1071
1102
|
});
|
|
1072
1103
|
return new __HttpRequest({
|
|
@@ -1434,6 +1465,9 @@ const deserializeAws_restJson1CreateResolverCommandError = async (output, contex
|
|
|
1434
1465
|
};
|
|
1435
1466
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1436
1467
|
switch (errorCode) {
|
|
1468
|
+
case "BadRequestException":
|
|
1469
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1470
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1437
1471
|
case "ConcurrentModificationException":
|
|
1438
1472
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
1439
1473
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -1767,6 +1801,9 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
1767
1801
|
};
|
|
1768
1802
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1769
1803
|
switch (errorCode) {
|
|
1804
|
+
case "BadRequestException":
|
|
1805
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1806
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1770
1807
|
case "ConcurrentModificationException":
|
|
1771
1808
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
1772
1809
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -1873,6 +1910,51 @@ const deserializeAws_restJson1DisassociateApiCommandError = async (output, conte
|
|
|
1873
1910
|
});
|
|
1874
1911
|
}
|
|
1875
1912
|
};
|
|
1913
|
+
export const deserializeAws_restJson1EvaluateCodeCommand = async (output, context) => {
|
|
1914
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1915
|
+
return deserializeAws_restJson1EvaluateCodeCommandError(output, context);
|
|
1916
|
+
}
|
|
1917
|
+
const contents = map({
|
|
1918
|
+
$metadata: deserializeMetadata(output),
|
|
1919
|
+
});
|
|
1920
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1921
|
+
if (data.error != null) {
|
|
1922
|
+
contents.error = deserializeAws_restJson1EvaluateCodeErrorDetail(data.error, context);
|
|
1923
|
+
}
|
|
1924
|
+
if (data.evaluationResult != null) {
|
|
1925
|
+
contents.evaluationResult = __expectString(data.evaluationResult);
|
|
1926
|
+
}
|
|
1927
|
+
if (data.logs != null) {
|
|
1928
|
+
contents.logs = deserializeAws_restJson1Logs(data.logs, context);
|
|
1929
|
+
}
|
|
1930
|
+
return contents;
|
|
1931
|
+
};
|
|
1932
|
+
const deserializeAws_restJson1EvaluateCodeCommandError = async (output, context) => {
|
|
1933
|
+
const parsedOutput = {
|
|
1934
|
+
...output,
|
|
1935
|
+
body: await parseErrorBody(output.body, context),
|
|
1936
|
+
};
|
|
1937
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1938
|
+
switch (errorCode) {
|
|
1939
|
+
case "AccessDeniedException":
|
|
1940
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
1941
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1942
|
+
case "BadRequestException":
|
|
1943
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1944
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1945
|
+
case "InternalFailureException":
|
|
1946
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
1947
|
+
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
1948
|
+
default:
|
|
1949
|
+
const parsedBody = parsedOutput.body;
|
|
1950
|
+
throwDefaultError({
|
|
1951
|
+
output,
|
|
1952
|
+
parsedBody,
|
|
1953
|
+
exceptionCtor: __BaseException,
|
|
1954
|
+
errorCode,
|
|
1955
|
+
});
|
|
1956
|
+
}
|
|
1957
|
+
};
|
|
1876
1958
|
export const deserializeAws_restJson1EvaluateMappingTemplateCommand = async (output, context) => {
|
|
1877
1959
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1878
1960
|
return deserializeAws_restJson1EvaluateMappingTemplateCommandError(output, context);
|
|
@@ -1887,6 +1969,9 @@ export const deserializeAws_restJson1EvaluateMappingTemplateCommand = async (out
|
|
|
1887
1969
|
if (data.evaluationResult != null) {
|
|
1888
1970
|
contents.evaluationResult = __expectString(data.evaluationResult);
|
|
1889
1971
|
}
|
|
1972
|
+
if (data.logs != null) {
|
|
1973
|
+
contents.logs = deserializeAws_restJson1Logs(data.logs, context);
|
|
1974
|
+
}
|
|
1890
1975
|
return contents;
|
|
1891
1976
|
};
|
|
1892
1977
|
const deserializeAws_restJson1EvaluateMappingTemplateCommandError = async (output, context) => {
|
|
@@ -3217,6 +3302,9 @@ const deserializeAws_restJson1UpdateResolverCommandError = async (output, contex
|
|
|
3217
3302
|
};
|
|
3218
3303
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3219
3304
|
switch (errorCode) {
|
|
3305
|
+
case "BadRequestException":
|
|
3306
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
3307
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3220
3308
|
case "ConcurrentModificationException":
|
|
3221
3309
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
3222
3310
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -3336,9 +3424,15 @@ const deserializeAws_restJson1ApiLimitExceededExceptionResponse = async (parsedO
|
|
|
3336
3424
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
3337
3425
|
const contents = map({});
|
|
3338
3426
|
const data = parsedOutput.body;
|
|
3427
|
+
if (data.detail != null) {
|
|
3428
|
+
contents.detail = deserializeAws_restJson1BadRequestDetail(data.detail, context);
|
|
3429
|
+
}
|
|
3339
3430
|
if (data.message != null) {
|
|
3340
3431
|
contents.message = __expectString(data.message);
|
|
3341
3432
|
}
|
|
3433
|
+
if (data.reason != null) {
|
|
3434
|
+
contents.reason = __expectString(data.reason);
|
|
3435
|
+
}
|
|
3342
3436
|
const exception = new BadRequestException({
|
|
3343
3437
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3344
3438
|
...contents,
|
|
@@ -3438,6 +3532,12 @@ const serializeAws_restJson1AdditionalAuthenticationProviders = (input, context)
|
|
|
3438
3532
|
return serializeAws_restJson1AdditionalAuthenticationProvider(entry, context);
|
|
3439
3533
|
});
|
|
3440
3534
|
};
|
|
3535
|
+
const serializeAws_restJson1AppSyncRuntime = (input, context) => {
|
|
3536
|
+
return {
|
|
3537
|
+
...(input.name != null && { name: input.name }),
|
|
3538
|
+
...(input.runtimeVersion != null && { runtimeVersion: input.runtimeVersion }),
|
|
3539
|
+
};
|
|
3540
|
+
};
|
|
3441
3541
|
const serializeAws_restJson1AuthorizationConfig = (input, context) => {
|
|
3442
3542
|
return {
|
|
3443
3543
|
...(input.authorizationType != null && { authorizationType: input.authorizationType }),
|
|
@@ -3665,6 +3765,12 @@ const deserializeAws_restJson1ApiKeys = (output, context) => {
|
|
|
3665
3765
|
});
|
|
3666
3766
|
return retVal;
|
|
3667
3767
|
};
|
|
3768
|
+
const deserializeAws_restJson1AppSyncRuntime = (output, context) => {
|
|
3769
|
+
return {
|
|
3770
|
+
name: __expectString(output.name),
|
|
3771
|
+
runtimeVersion: __expectString(output.runtimeVersion),
|
|
3772
|
+
};
|
|
3773
|
+
};
|
|
3668
3774
|
const deserializeAws_restJson1AuthorizationConfig = (output, context) => {
|
|
3669
3775
|
return {
|
|
3670
3776
|
authorizationType: __expectString(output.authorizationType),
|
|
@@ -3677,6 +3783,11 @@ const deserializeAws_restJson1AwsIamConfig = (output, context) => {
|
|
|
3677
3783
|
signingServiceName: __expectString(output.signingServiceName),
|
|
3678
3784
|
};
|
|
3679
3785
|
};
|
|
3786
|
+
const deserializeAws_restJson1BadRequestDetail = (output, context) => {
|
|
3787
|
+
return {
|
|
3788
|
+
codeErrors: output.codeErrors != null ? deserializeAws_restJson1CodeErrors(output.codeErrors, context) : undefined,
|
|
3789
|
+
};
|
|
3790
|
+
};
|
|
3680
3791
|
const deserializeAws_restJson1CachingConfig = (output, context) => {
|
|
3681
3792
|
return {
|
|
3682
3793
|
cachingKeys: output.cachingKeys != null ? deserializeAws_restJson1CachingKeys(output.cachingKeys, context) : undefined,
|
|
@@ -3694,6 +3805,31 @@ const deserializeAws_restJson1CachingKeys = (output, context) => {
|
|
|
3694
3805
|
});
|
|
3695
3806
|
return retVal;
|
|
3696
3807
|
};
|
|
3808
|
+
const deserializeAws_restJson1CodeError = (output, context) => {
|
|
3809
|
+
return {
|
|
3810
|
+
errorType: __expectString(output.errorType),
|
|
3811
|
+
location: output.location != null ? deserializeAws_restJson1CodeErrorLocation(output.location, context) : undefined,
|
|
3812
|
+
value: __expectString(output.value),
|
|
3813
|
+
};
|
|
3814
|
+
};
|
|
3815
|
+
const deserializeAws_restJson1CodeErrorLocation = (output, context) => {
|
|
3816
|
+
return {
|
|
3817
|
+
column: __expectInt32(output.column),
|
|
3818
|
+
line: __expectInt32(output.line),
|
|
3819
|
+
span: __expectInt32(output.span),
|
|
3820
|
+
};
|
|
3821
|
+
};
|
|
3822
|
+
const deserializeAws_restJson1CodeErrors = (output, context) => {
|
|
3823
|
+
const retVal = (output || [])
|
|
3824
|
+
.filter((e) => e != null)
|
|
3825
|
+
.map((entry) => {
|
|
3826
|
+
if (entry === null) {
|
|
3827
|
+
return null;
|
|
3828
|
+
}
|
|
3829
|
+
return deserializeAws_restJson1CodeError(entry, context);
|
|
3830
|
+
});
|
|
3831
|
+
return retVal;
|
|
3832
|
+
};
|
|
3697
3833
|
const deserializeAws_restJson1CognitoUserPoolConfig = (output, context) => {
|
|
3698
3834
|
return {
|
|
3699
3835
|
appIdClientRegex: __expectString(output.appIdClientRegex),
|
|
@@ -3786,8 +3922,15 @@ const deserializeAws_restJson1ErrorDetail = (output, context) => {
|
|
|
3786
3922
|
message: __expectString(output.message),
|
|
3787
3923
|
};
|
|
3788
3924
|
};
|
|
3925
|
+
const deserializeAws_restJson1EvaluateCodeErrorDetail = (output, context) => {
|
|
3926
|
+
return {
|
|
3927
|
+
codeErrors: output.codeErrors != null ? deserializeAws_restJson1CodeErrors(output.codeErrors, context) : undefined,
|
|
3928
|
+
message: __expectString(output.message),
|
|
3929
|
+
};
|
|
3930
|
+
};
|
|
3789
3931
|
const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
|
|
3790
3932
|
return {
|
|
3933
|
+
code: __expectString(output.code),
|
|
3791
3934
|
dataSourceName: __expectString(output.dataSourceName),
|
|
3792
3935
|
description: __expectString(output.description),
|
|
3793
3936
|
functionArn: __expectString(output.functionArn),
|
|
@@ -3797,6 +3940,7 @@ const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
|
|
|
3797
3940
|
name: __expectString(output.name),
|
|
3798
3941
|
requestMappingTemplate: __expectString(output.requestMappingTemplate),
|
|
3799
3942
|
responseMappingTemplate: __expectString(output.responseMappingTemplate),
|
|
3943
|
+
runtime: output.runtime != null ? deserializeAws_restJson1AppSyncRuntime(output.runtime, context) : undefined,
|
|
3800
3944
|
syncConfig: output.syncConfig != null ? deserializeAws_restJson1SyncConfig(output.syncConfig, context) : undefined,
|
|
3801
3945
|
};
|
|
3802
3946
|
};
|
|
@@ -3890,6 +4034,17 @@ const deserializeAws_restJson1LogConfig = (output, context) => {
|
|
|
3890
4034
|
fieldLogLevel: __expectString(output.fieldLogLevel),
|
|
3891
4035
|
};
|
|
3892
4036
|
};
|
|
4037
|
+
const deserializeAws_restJson1Logs = (output, context) => {
|
|
4038
|
+
const retVal = (output || [])
|
|
4039
|
+
.filter((e) => e != null)
|
|
4040
|
+
.map((entry) => {
|
|
4041
|
+
if (entry === null) {
|
|
4042
|
+
return null;
|
|
4043
|
+
}
|
|
4044
|
+
return __expectString(entry);
|
|
4045
|
+
});
|
|
4046
|
+
return retVal;
|
|
4047
|
+
};
|
|
3893
4048
|
const deserializeAws_restJson1MapOfStringToString = (output, context) => {
|
|
3894
4049
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3895
4050
|
if (value === null) {
|
|
@@ -3938,6 +4093,7 @@ const deserializeAws_restJson1RelationalDatabaseDataSourceConfig = (output, cont
|
|
|
3938
4093
|
const deserializeAws_restJson1Resolver = (output, context) => {
|
|
3939
4094
|
return {
|
|
3940
4095
|
cachingConfig: output.cachingConfig != null ? deserializeAws_restJson1CachingConfig(output.cachingConfig, context) : undefined,
|
|
4096
|
+
code: __expectString(output.code),
|
|
3941
4097
|
dataSourceName: __expectString(output.dataSourceName),
|
|
3942
4098
|
fieldName: __expectString(output.fieldName),
|
|
3943
4099
|
kind: __expectString(output.kind),
|
|
@@ -3948,6 +4104,7 @@ const deserializeAws_restJson1Resolver = (output, context) => {
|
|
|
3948
4104
|
requestMappingTemplate: __expectString(output.requestMappingTemplate),
|
|
3949
4105
|
resolverArn: __expectString(output.resolverArn),
|
|
3950
4106
|
responseMappingTemplate: __expectString(output.responseMappingTemplate),
|
|
4107
|
+
runtime: output.runtime != null ? deserializeAws_restJson1AppSyncRuntime(output.runtime, context) : undefined,
|
|
3951
4108
|
syncConfig: output.syncConfig != null ? deserializeAws_restJson1SyncConfig(output.syncConfig, context) : undefined,
|
|
3952
4109
|
typeName: __expectString(output.typeName),
|
|
3953
4110
|
};
|
package/dist-types/AppSync.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "./c
|
|
|
18
18
|
import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "./commands/DeleteResolverCommand";
|
|
19
19
|
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
|
|
20
20
|
import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "./commands/DisassociateApiCommand";
|
|
21
|
+
import { EvaluateCodeCommandInput, EvaluateCodeCommandOutput } from "./commands/EvaluateCodeCommand";
|
|
21
22
|
import { EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput } from "./commands/EvaluateMappingTemplateCommand";
|
|
22
23
|
import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "./commands/FlushApiCacheCommand";
|
|
23
24
|
import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "./commands/GetApiAssociationCommand";
|
|
@@ -51,8 +52,8 @@ import { UpdateGraphqlApiCommandInput, UpdateGraphqlApiCommandOutput } from "./c
|
|
|
51
52
|
import { UpdateResolverCommandInput, UpdateResolverCommandOutput } from "./commands/UpdateResolverCommand";
|
|
52
53
|
import { UpdateTypeCommandInput, UpdateTypeCommandOutput } from "./commands/UpdateTypeCommand";
|
|
53
54
|
/**
|
|
54
|
-
* <p>AppSync provides API actions for creating and interacting with data
|
|
55
|
-
*
|
|
55
|
+
* <p>AppSync provides API actions for creating and interacting with data sources using GraphQL
|
|
56
|
+
* from your application.</p>
|
|
56
57
|
*/
|
|
57
58
|
export declare class AppSync extends AppSyncClient {
|
|
58
59
|
/**
|
|
@@ -87,8 +88,7 @@ export declare class AppSync extends AppSyncClient {
|
|
|
87
88
|
createDomainName(args: CreateDomainNameCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateDomainNameCommandOutput) => void): void;
|
|
88
89
|
/**
|
|
89
90
|
* <p>Creates a <code>Function</code> object.</p>
|
|
90
|
-
* <p>A function is a reusable entity. You can use multiple functions to compose the resolver
|
|
91
|
-
* logic.</p>
|
|
91
|
+
* <p>A function is a reusable entity. You can use multiple functions to compose the resolver logic.</p>
|
|
92
92
|
*/
|
|
93
93
|
createFunction(args: CreateFunctionCommandInput, options?: __HttpHandlerOptions): Promise<CreateFunctionCommandOutput>;
|
|
94
94
|
createFunction(args: CreateFunctionCommandInput, cb: (err: any, data?: CreateFunctionCommandOutput) => void): void;
|
|
@@ -101,8 +101,8 @@ export declare class AppSync extends AppSyncClient {
|
|
|
101
101
|
createGraphqlApi(args: CreateGraphqlApiCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: CreateGraphqlApiCommandOutput) => void): void;
|
|
102
102
|
/**
|
|
103
103
|
* <p>Creates a <code>Resolver</code> object.</p>
|
|
104
|
-
* <p>A resolver converts incoming requests into a format that a data source can understand,
|
|
105
|
-
*
|
|
104
|
+
* <p>A resolver converts incoming requests into a format that a data source can understand, and converts the data
|
|
105
|
+
* source's responses into GraphQL.</p>
|
|
106
106
|
*/
|
|
107
107
|
createResolver(args: CreateResolverCommandInput, options?: __HttpHandlerOptions): Promise<CreateResolverCommandOutput>;
|
|
108
108
|
createResolver(args: CreateResolverCommandInput, cb: (err: any, data?: CreateResolverCommandOutput) => void): void;
|
|
@@ -168,12 +168,21 @@ export declare class AppSync extends AppSyncClient {
|
|
|
168
168
|
disassociateApi(args: DisassociateApiCommandInput, cb: (err: any, data?: DisassociateApiCommandOutput) => void): void;
|
|
169
169
|
disassociateApi(args: DisassociateApiCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DisassociateApiCommandOutput) => void): void;
|
|
170
170
|
/**
|
|
171
|
-
* <p>Evaluates
|
|
172
|
-
* request
|
|
173
|
-
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
176
|
-
|
|
171
|
+
* <p>Evaluates the given code and returns the response. The code definition requirements depend on the specified
|
|
172
|
+
* runtime. For <code>APPSYNC_JS</code> runtimes, the code defines the request and response functions. The request
|
|
173
|
+
* function takes the incoming request after a GraphQL operation is parsed and converts it into a request
|
|
174
|
+
* configuration for the selected data source operation. The response function interprets responses from the data
|
|
175
|
+
* source and maps it to the shape of the GraphQL field output type. </p>
|
|
176
|
+
*/
|
|
177
|
+
evaluateCode(args: EvaluateCodeCommandInput, options?: __HttpHandlerOptions): Promise<EvaluateCodeCommandOutput>;
|
|
178
|
+
evaluateCode(args: EvaluateCodeCommandInput, cb: (err: any, data?: EvaluateCodeCommandOutput) => void): void;
|
|
179
|
+
evaluateCode(args: EvaluateCodeCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: EvaluateCodeCommandOutput) => void): void;
|
|
180
|
+
/**
|
|
181
|
+
* <p>Evaluates a given template and returns the response. The mapping template can be a request or response
|
|
182
|
+
* template.</p>
|
|
183
|
+
* <p>Request templates take the incoming request after a GraphQL operation is parsed and convert it into a
|
|
184
|
+
* request configuration for the selected data source operation. Response templates interpret responses from the
|
|
185
|
+
* data source and map it to the shape of the GraphQL field output type.</p>
|
|
177
186
|
* <p>Mapping templates are written in the Apache Velocity Template Language (VTL).</p>
|
|
178
187
|
*/
|
|
179
188
|
evaluateMappingTemplate(args: EvaluateMappingTemplateCommandInput, options?: __HttpHandlerOptions): Promise<EvaluateMappingTemplateCommandOutput>;
|
|
@@ -248,10 +257,9 @@ export declare class AppSync extends AppSyncClient {
|
|
|
248
257
|
/**
|
|
249
258
|
* <p>Lists the API keys for a given API.</p>
|
|
250
259
|
* <note>
|
|
251
|
-
* <p>API keys are deleted automatically 60 days after they expire. However, they may still
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* deleted.</p>
|
|
260
|
+
* <p>API keys are deleted automatically 60 days after they expire. However, they may still be included in the
|
|
261
|
+
* response until they have actually been deleted. You can safely call <code>DeleteApiKey</code> to manually
|
|
262
|
+
* delete a key before it's automatically deleted.</p>
|
|
255
263
|
* </note>
|
|
256
264
|
*/
|
|
257
265
|
listApiKeys(args: ListApiKeysCommandInput, options?: __HttpHandlerOptions): Promise<ListApiKeysCommandOutput>;
|
|
@@ -307,8 +315,8 @@ export declare class AppSync extends AppSyncClient {
|
|
|
307
315
|
listTypes(args: ListTypesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListTypesCommandOutput) => void): void;
|
|
308
316
|
/**
|
|
309
317
|
* <p>Adds a new schema to your GraphQL API.</p>
|
|
310
|
-
* <p>This operation is asynchronous. Use to
|
|
311
|
-
*
|
|
318
|
+
* <p>This operation is asynchronous. Use to determine when it has
|
|
319
|
+
* completed.</p>
|
|
312
320
|
*/
|
|
313
321
|
startSchemaCreation(args: StartSchemaCreationCommandInput, options?: __HttpHandlerOptions): Promise<StartSchemaCreationCommandOutput>;
|
|
314
322
|
startSchemaCreation(args: StartSchemaCreationCommandInput, cb: (err: any, data?: StartSchemaCreationCommandOutput) => void): void;
|
|
@@ -25,6 +25,7 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "./c
|
|
|
25
25
|
import { DeleteResolverCommandInput, DeleteResolverCommandOutput } from "./commands/DeleteResolverCommand";
|
|
26
26
|
import { DeleteTypeCommandInput, DeleteTypeCommandOutput } from "./commands/DeleteTypeCommand";
|
|
27
27
|
import { DisassociateApiCommandInput, DisassociateApiCommandOutput } from "./commands/DisassociateApiCommand";
|
|
28
|
+
import { EvaluateCodeCommandInput, EvaluateCodeCommandOutput } from "./commands/EvaluateCodeCommand";
|
|
28
29
|
import { EvaluateMappingTemplateCommandInput, EvaluateMappingTemplateCommandOutput } from "./commands/EvaluateMappingTemplateCommand";
|
|
29
30
|
import { FlushApiCacheCommandInput, FlushApiCacheCommandOutput } from "./commands/FlushApiCacheCommand";
|
|
30
31
|
import { GetApiAssociationCommandInput, GetApiAssociationCommandOutput } from "./commands/GetApiAssociationCommand";
|
|
@@ -58,8 +59,8 @@ import { UpdateGraphqlApiCommandInput, UpdateGraphqlApiCommandOutput } from "./c
|
|
|
58
59
|
import { UpdateResolverCommandInput, UpdateResolverCommandOutput } from "./commands/UpdateResolverCommand";
|
|
59
60
|
import { UpdateTypeCommandInput, UpdateTypeCommandOutput } from "./commands/UpdateTypeCommand";
|
|
60
61
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
61
|
-
export declare type ServiceInputTypes = AssociateApiCommandInput | CreateApiCacheCommandInput | CreateApiKeyCommandInput | CreateDataSourceCommandInput | CreateDomainNameCommandInput | CreateFunctionCommandInput | CreateGraphqlApiCommandInput | CreateResolverCommandInput | CreateTypeCommandInput | DeleteApiCacheCommandInput | DeleteApiKeyCommandInput | DeleteDataSourceCommandInput | DeleteDomainNameCommandInput | DeleteFunctionCommandInput | DeleteGraphqlApiCommandInput | DeleteResolverCommandInput | DeleteTypeCommandInput | DisassociateApiCommandInput | EvaluateMappingTemplateCommandInput | FlushApiCacheCommandInput | GetApiAssociationCommandInput | GetApiCacheCommandInput | GetDataSourceCommandInput | GetDomainNameCommandInput | GetFunctionCommandInput | GetGraphqlApiCommandInput | GetIntrospectionSchemaCommandInput | GetResolverCommandInput | GetSchemaCreationStatusCommandInput | GetTypeCommandInput | ListApiKeysCommandInput | ListDataSourcesCommandInput | ListDomainNamesCommandInput | ListFunctionsCommandInput | ListGraphqlApisCommandInput | ListResolversByFunctionCommandInput | ListResolversCommandInput | ListTagsForResourceCommandInput | ListTypesCommandInput | StartSchemaCreationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApiCacheCommandInput | UpdateApiKeyCommandInput | UpdateDataSourceCommandInput | UpdateDomainNameCommandInput | UpdateFunctionCommandInput | UpdateGraphqlApiCommandInput | UpdateResolverCommandInput | UpdateTypeCommandInput;
|
|
62
|
-
export declare type ServiceOutputTypes = AssociateApiCommandOutput | CreateApiCacheCommandOutput | CreateApiKeyCommandOutput | CreateDataSourceCommandOutput | CreateDomainNameCommandOutput | CreateFunctionCommandOutput | CreateGraphqlApiCommandOutput | CreateResolverCommandOutput | CreateTypeCommandOutput | DeleteApiCacheCommandOutput | DeleteApiKeyCommandOutput | DeleteDataSourceCommandOutput | DeleteDomainNameCommandOutput | DeleteFunctionCommandOutput | DeleteGraphqlApiCommandOutput | DeleteResolverCommandOutput | DeleteTypeCommandOutput | DisassociateApiCommandOutput | EvaluateMappingTemplateCommandOutput | FlushApiCacheCommandOutput | GetApiAssociationCommandOutput | GetApiCacheCommandOutput | GetDataSourceCommandOutput | GetDomainNameCommandOutput | GetFunctionCommandOutput | GetGraphqlApiCommandOutput | GetIntrospectionSchemaCommandOutput | GetResolverCommandOutput | GetSchemaCreationStatusCommandOutput | GetTypeCommandOutput | ListApiKeysCommandOutput | ListDataSourcesCommandOutput | ListDomainNamesCommandOutput | ListFunctionsCommandOutput | ListGraphqlApisCommandOutput | ListResolversByFunctionCommandOutput | ListResolversCommandOutput | ListTagsForResourceCommandOutput | ListTypesCommandOutput | StartSchemaCreationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApiCacheCommandOutput | UpdateApiKeyCommandOutput | UpdateDataSourceCommandOutput | UpdateDomainNameCommandOutput | UpdateFunctionCommandOutput | UpdateGraphqlApiCommandOutput | UpdateResolverCommandOutput | UpdateTypeCommandOutput;
|
|
62
|
+
export declare type ServiceInputTypes = AssociateApiCommandInput | CreateApiCacheCommandInput | CreateApiKeyCommandInput | CreateDataSourceCommandInput | CreateDomainNameCommandInput | CreateFunctionCommandInput | CreateGraphqlApiCommandInput | CreateResolverCommandInput | CreateTypeCommandInput | DeleteApiCacheCommandInput | DeleteApiKeyCommandInput | DeleteDataSourceCommandInput | DeleteDomainNameCommandInput | DeleteFunctionCommandInput | DeleteGraphqlApiCommandInput | DeleteResolverCommandInput | DeleteTypeCommandInput | DisassociateApiCommandInput | EvaluateCodeCommandInput | EvaluateMappingTemplateCommandInput | FlushApiCacheCommandInput | GetApiAssociationCommandInput | GetApiCacheCommandInput | GetDataSourceCommandInput | GetDomainNameCommandInput | GetFunctionCommandInput | GetGraphqlApiCommandInput | GetIntrospectionSchemaCommandInput | GetResolverCommandInput | GetSchemaCreationStatusCommandInput | GetTypeCommandInput | ListApiKeysCommandInput | ListDataSourcesCommandInput | ListDomainNamesCommandInput | ListFunctionsCommandInput | ListGraphqlApisCommandInput | ListResolversByFunctionCommandInput | ListResolversCommandInput | ListTagsForResourceCommandInput | ListTypesCommandInput | StartSchemaCreationCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateApiCacheCommandInput | UpdateApiKeyCommandInput | UpdateDataSourceCommandInput | UpdateDomainNameCommandInput | UpdateFunctionCommandInput | UpdateGraphqlApiCommandInput | UpdateResolverCommandInput | UpdateTypeCommandInput;
|
|
63
|
+
export declare type ServiceOutputTypes = AssociateApiCommandOutput | CreateApiCacheCommandOutput | CreateApiKeyCommandOutput | CreateDataSourceCommandOutput | CreateDomainNameCommandOutput | CreateFunctionCommandOutput | CreateGraphqlApiCommandOutput | CreateResolverCommandOutput | CreateTypeCommandOutput | DeleteApiCacheCommandOutput | DeleteApiKeyCommandOutput | DeleteDataSourceCommandOutput | DeleteDomainNameCommandOutput | DeleteFunctionCommandOutput | DeleteGraphqlApiCommandOutput | DeleteResolverCommandOutput | DeleteTypeCommandOutput | DisassociateApiCommandOutput | EvaluateCodeCommandOutput | EvaluateMappingTemplateCommandOutput | FlushApiCacheCommandOutput | GetApiAssociationCommandOutput | GetApiCacheCommandOutput | GetDataSourceCommandOutput | GetDomainNameCommandOutput | GetFunctionCommandOutput | GetGraphqlApiCommandOutput | GetIntrospectionSchemaCommandOutput | GetResolverCommandOutput | GetSchemaCreationStatusCommandOutput | GetTypeCommandOutput | ListApiKeysCommandOutput | ListDataSourcesCommandOutput | ListDomainNamesCommandOutput | ListFunctionsCommandOutput | ListGraphqlApisCommandOutput | ListResolversByFunctionCommandOutput | ListResolversCommandOutput | ListTagsForResourceCommandOutput | ListTypesCommandOutput | StartSchemaCreationCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateApiCacheCommandOutput | UpdateApiKeyCommandOutput | UpdateDataSourceCommandOutput | UpdateDomainNameCommandOutput | UpdateFunctionCommandOutput | UpdateGraphqlApiCommandOutput | UpdateResolverCommandOutput | UpdateTypeCommandOutput;
|
|
63
64
|
export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> {
|
|
64
65
|
/**
|
|
65
66
|
* The HTTP handler to use. Fetch in browser and Https in Nodejs.
|
|
@@ -173,8 +174,8 @@ declare type AppSyncClientResolvedConfigType = __SmithyResolvedConfiguration<__H
|
|
|
173
174
|
export interface AppSyncClientResolvedConfig extends AppSyncClientResolvedConfigType {
|
|
174
175
|
}
|
|
175
176
|
/**
|
|
176
|
-
* <p>AppSync provides API actions for creating and interacting with data
|
|
177
|
-
*
|
|
177
|
+
* <p>AppSync provides API actions for creating and interacting with data sources using GraphQL
|
|
178
|
+
* from your application.</p>
|
|
178
179
|
*/
|
|
179
180
|
export declare class AppSyncClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, AppSyncClientResolvedConfig> {
|
|
180
181
|
/**
|
|
@@ -9,8 +9,7 @@ export interface CreateFunctionCommandOutput extends CreateFunctionResponse, __M
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>Creates a <code>Function</code> object.</p>
|
|
12
|
-
* <p>A function is a reusable entity. You can use multiple functions to compose the resolver
|
|
13
|
-
* logic.</p>
|
|
12
|
+
* <p>A function is a reusable entity. You can use multiple functions to compose the resolver logic.</p>
|
|
14
13
|
* @example
|
|
15
14
|
* Use a bare-bones client and the command you need to make an API call.
|
|
16
15
|
* ```javascript
|
|
@@ -9,8 +9,8 @@ export interface CreateResolverCommandOutput extends CreateResolverResponse, __M
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>Creates a <code>Resolver</code> object.</p>
|
|
12
|
-
* <p>A resolver converts incoming requests into a format that a data source can understand,
|
|
13
|
-
*
|
|
12
|
+
* <p>A resolver converts incoming requests into a format that a data source can understand, and converts the data
|
|
13
|
+
* source's responses into GraphQL.</p>
|
|
14
14
|
* @example
|
|
15
15
|
* Use a bare-bones client and the command you need to make an API call.
|
|
16
16
|
* ```javascript
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
3
|
+
import { Handler, HttpHandlerOptions as __HttpHandlerOptions, MetadataBearer as __MetadataBearer, MiddlewareStack } from "@aws-sdk/types";
|
|
4
|
+
import { AppSyncClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../AppSyncClient";
|
|
5
|
+
import { EvaluateCodeRequest, EvaluateCodeResponse } from "../models/models_0";
|
|
6
|
+
export interface EvaluateCodeCommandInput extends EvaluateCodeRequest {
|
|
7
|
+
}
|
|
8
|
+
export interface EvaluateCodeCommandOutput extends EvaluateCodeResponse, __MetadataBearer {
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* <p>Evaluates the given code and returns the response. The code definition requirements depend on the specified
|
|
12
|
+
* runtime. For <code>APPSYNC_JS</code> runtimes, the code defines the request and response functions. The request
|
|
13
|
+
* function takes the incoming request after a GraphQL operation is parsed and converts it into a request
|
|
14
|
+
* configuration for the selected data source operation. The response function interprets responses from the data
|
|
15
|
+
* source and maps it to the shape of the GraphQL field output type. </p>
|
|
16
|
+
* @example
|
|
17
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
18
|
+
* ```javascript
|
|
19
|
+
* import { AppSyncClient, EvaluateCodeCommand } from "@aws-sdk/client-appsync"; // ES Modules import
|
|
20
|
+
* // const { AppSyncClient, EvaluateCodeCommand } = require("@aws-sdk/client-appsync"); // CommonJS import
|
|
21
|
+
* const client = new AppSyncClient(config);
|
|
22
|
+
* const command = new EvaluateCodeCommand(input);
|
|
23
|
+
* const response = await client.send(command);
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @see {@link EvaluateCodeCommandInput} for command's `input` shape.
|
|
27
|
+
* @see {@link EvaluateCodeCommandOutput} for command's `response` shape.
|
|
28
|
+
* @see {@link AppSyncClientResolvedConfig | config} for AppSyncClient's `config` shape.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
export declare class EvaluateCodeCommand extends $Command<EvaluateCodeCommandInput, EvaluateCodeCommandOutput, AppSyncClientResolvedConfig> {
|
|
32
|
+
readonly input: EvaluateCodeCommandInput;
|
|
33
|
+
static getEndpointParameterInstructions(): EndpointParameterInstructions;
|
|
34
|
+
constructor(input: EvaluateCodeCommandInput);
|
|
35
|
+
/**
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
resolveMiddleware(clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: AppSyncClientResolvedConfig, options?: __HttpHandlerOptions): Handler<EvaluateCodeCommandInput, EvaluateCodeCommandOutput>;
|
|
39
|
+
private serialize;
|
|
40
|
+
private deserialize;
|
|
41
|
+
}
|
|
@@ -8,12 +8,11 @@ export interface EvaluateMappingTemplateCommandInput extends EvaluateMappingTemp
|
|
|
8
8
|
export interface EvaluateMappingTemplateCommandOutput extends EvaluateMappingTemplateResponse, __MetadataBearer {
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* <p>Evaluates a given template and returns the response. The mapping template can be a
|
|
12
|
-
*
|
|
13
|
-
* <p>Request templates take the incoming request after a GraphQL operation is parsed and
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* field output type.</p>
|
|
11
|
+
* <p>Evaluates a given template and returns the response. The mapping template can be a request or response
|
|
12
|
+
* template.</p>
|
|
13
|
+
* <p>Request templates take the incoming request after a GraphQL operation is parsed and convert it into a
|
|
14
|
+
* request configuration for the selected data source operation. Response templates interpret responses from the
|
|
15
|
+
* data source and map it to the shape of the GraphQL field output type.</p>
|
|
17
16
|
* <p>Mapping templates are written in the Apache Velocity Template Language (VTL).</p>
|
|
18
17
|
* @example
|
|
19
18
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -10,10 +10,9 @@ export interface ListApiKeysCommandOutput extends ListApiKeysResponse, __Metadat
|
|
|
10
10
|
/**
|
|
11
11
|
* <p>Lists the API keys for a given API.</p>
|
|
12
12
|
* <note>
|
|
13
|
-
* <p>API keys are deleted automatically 60 days after they expire. However, they may still
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* deleted.</p>
|
|
13
|
+
* <p>API keys are deleted automatically 60 days after they expire. However, they may still be included in the
|
|
14
|
+
* response until they have actually been deleted. You can safely call <code>DeleteApiKey</code> to manually
|
|
15
|
+
* delete a key before it's automatically deleted.</p>
|
|
17
16
|
* </note>
|
|
18
17
|
* @example
|
|
19
18
|
* Use a bare-bones client and the command you need to make an API call.
|
|
@@ -9,8 +9,8 @@ export interface StartSchemaCreationCommandOutput extends StartSchemaCreationRes
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* <p>Adds a new schema to your GraphQL API.</p>
|
|
12
|
-
* <p>This operation is asynchronous. Use to
|
|
13
|
-
*
|
|
12
|
+
* <p>This operation is asynchronous. Use to determine when it has
|
|
13
|
+
* completed.</p>
|
|
14
14
|
* @example
|
|
15
15
|
* Use a bare-bones client and the command you need to make an API call.
|
|
16
16
|
* ```javascript
|