@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
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
AWS SDK for JavaScript AppSync Client for Node.js, Browser and React Native.
|
|
11
11
|
|
|
12
|
-
<p>AppSync provides API actions for creating and interacting with data
|
|
13
|
-
|
|
12
|
+
<p>AppSync provides API actions for creating and interacting with data sources using GraphQL
|
|
13
|
+
from your application.</p>
|
|
14
14
|
|
|
15
15
|
## Installing
|
|
16
16
|
|
package/dist-cjs/AppSync.js
CHANGED
|
@@ -20,6 +20,7 @@ const DeleteGraphqlApiCommand_1 = require("./commands/DeleteGraphqlApiCommand");
|
|
|
20
20
|
const DeleteResolverCommand_1 = require("./commands/DeleteResolverCommand");
|
|
21
21
|
const DeleteTypeCommand_1 = require("./commands/DeleteTypeCommand");
|
|
22
22
|
const DisassociateApiCommand_1 = require("./commands/DisassociateApiCommand");
|
|
23
|
+
const EvaluateCodeCommand_1 = require("./commands/EvaluateCodeCommand");
|
|
23
24
|
const EvaluateMappingTemplateCommand_1 = require("./commands/EvaluateMappingTemplateCommand");
|
|
24
25
|
const FlushApiCacheCommand_1 = require("./commands/FlushApiCacheCommand");
|
|
25
26
|
const GetApiAssociationCommand_1 = require("./commands/GetApiAssociationCommand");
|
|
@@ -305,6 +306,20 @@ class AppSync extends AppSyncClient_1.AppSyncClient {
|
|
|
305
306
|
return this.send(command, optionsOrCb);
|
|
306
307
|
}
|
|
307
308
|
}
|
|
309
|
+
evaluateCode(args, optionsOrCb, cb) {
|
|
310
|
+
const command = new EvaluateCodeCommand_1.EvaluateCodeCommand(args);
|
|
311
|
+
if (typeof optionsOrCb === "function") {
|
|
312
|
+
this.send(command, optionsOrCb);
|
|
313
|
+
}
|
|
314
|
+
else if (typeof cb === "function") {
|
|
315
|
+
if (typeof optionsOrCb !== "object")
|
|
316
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
317
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
return this.send(command, optionsOrCb);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
308
323
|
evaluateMappingTemplate(args, optionsOrCb, cb) {
|
|
309
324
|
const command = new EvaluateMappingTemplateCommand_1.EvaluateMappingTemplateCommand(args);
|
|
310
325
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvaluateCodeCommand = void 0;
|
|
4
|
+
const middleware_endpoint_1 = require("@aws-sdk/middleware-endpoint");
|
|
5
|
+
const middleware_serde_1 = require("@aws-sdk/middleware-serde");
|
|
6
|
+
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
|
+
const models_0_1 = require("../models/models_0");
|
|
8
|
+
const Aws_restJson1_1 = require("../protocols/Aws_restJson1");
|
|
9
|
+
class EvaluateCodeCommand extends smithy_client_1.Command {
|
|
10
|
+
constructor(input) {
|
|
11
|
+
super();
|
|
12
|
+
this.input = input;
|
|
13
|
+
}
|
|
14
|
+
static getEndpointParameterInstructions() {
|
|
15
|
+
return {
|
|
16
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
17
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
18
|
+
Region: { type: "builtInParams", name: "region" },
|
|
19
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
23
|
+
this.middlewareStack.use((0, middleware_serde_1.getSerdePlugin)(configuration, this.serialize, this.deserialize));
|
|
24
|
+
this.middlewareStack.use((0, middleware_endpoint_1.getEndpointPlugin)(configuration, EvaluateCodeCommand.getEndpointParameterInstructions()));
|
|
25
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
26
|
+
const { logger } = configuration;
|
|
27
|
+
const clientName = "AppSyncClient";
|
|
28
|
+
const commandName = "EvaluateCodeCommand";
|
|
29
|
+
const handlerExecutionContext = {
|
|
30
|
+
logger,
|
|
31
|
+
clientName,
|
|
32
|
+
commandName,
|
|
33
|
+
inputFilterSensitiveLog: models_0_1.EvaluateCodeRequestFilterSensitiveLog,
|
|
34
|
+
outputFilterSensitiveLog: models_0_1.EvaluateCodeResponseFilterSensitiveLog,
|
|
35
|
+
};
|
|
36
|
+
const { requestHandler } = configuration;
|
|
37
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
38
|
+
}
|
|
39
|
+
serialize(input, context) {
|
|
40
|
+
return (0, Aws_restJson1_1.serializeAws_restJson1EvaluateCodeCommand)(input, context);
|
|
41
|
+
}
|
|
42
|
+
deserialize(output, context) {
|
|
43
|
+
return (0, Aws_restJson1_1.deserializeAws_restJson1EvaluateCodeCommand)(output, context);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.EvaluateCodeCommand = EvaluateCodeCommand;
|
|
@@ -19,6 +19,7 @@ tslib_1.__exportStar(require("./DeleteGraphqlApiCommand"), exports);
|
|
|
19
19
|
tslib_1.__exportStar(require("./DeleteResolverCommand"), exports);
|
|
20
20
|
tslib_1.__exportStar(require("./DeleteTypeCommand"), exports);
|
|
21
21
|
tslib_1.__exportStar(require("./DisassociateApiCommand"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./EvaluateCodeCommand"), exports);
|
|
22
23
|
tslib_1.__exportStar(require("./EvaluateMappingTemplateCommand"), exports);
|
|
23
24
|
tslib_1.__exportStar(require("./FlushApiCacheCommand"), exports);
|
|
24
25
|
tslib_1.__exportStar(require("./GetApiAssociationCommand"), exports);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.
|
|
6
|
-
exports.UpdateTypeResponseFilterSensitiveLog = exports.UpdateTypeRequestFilterSensitiveLog = exports.UpdateResolverResponseFilterSensitiveLog = exports.UpdateResolverRequestFilterSensitiveLog = exports.UpdateGraphqlApiResponseFilterSensitiveLog = exports.UpdateGraphqlApiRequestFilterSensitiveLog = exports.UpdateFunctionResponseFilterSensitiveLog = void 0;
|
|
3
|
+
exports.DynamodbDataSourceConfigFilterSensitiveLog = exports.DeltaSyncConfigFilterSensitiveLog = exports.CreateApiKeyResponseFilterSensitiveLog = exports.CreateApiKeyRequestFilterSensitiveLog = exports.CreateApiCacheResponseFilterSensitiveLog = exports.CreateApiCacheRequestFilterSensitiveLog = exports.AuthorizationConfigFilterSensitiveLog = exports.AwsIamConfigFilterSensitiveLog = exports.BadRequestDetailFilterSensitiveLog = exports.CodeErrorFilterSensitiveLog = exports.CodeErrorLocationFilterSensitiveLog = exports.AssociateApiResponseFilterSensitiveLog = exports.AssociateApiRequestFilterSensitiveLog = exports.AppSyncRuntimeFilterSensitiveLog = exports.ApiKeyFilterSensitiveLog = exports.ApiCacheFilterSensitiveLog = exports.ApiAssociationFilterSensitiveLog = exports.AdditionalAuthenticationProviderFilterSensitiveLog = exports.CognitoUserPoolConfigFilterSensitiveLog = exports.OpenIDConnectConfigFilterSensitiveLog = exports.LambdaAuthorizerConfigFilterSensitiveLog = exports.SchemaStatus = exports.GraphQLSchemaException = exports.OutputType = exports.TypeDefinitionFormat = exports.ResolverKind = exports.DefaultAction = exports.FieldLogLevel = exports.ConflictHandlerType = exports.ConflictDetectionType = exports.DataSourceType = exports.RelationalDatabaseSourceType = exports.LimitExceededException = exports.UnauthorizedException = exports.ConcurrentModificationException = exports.AuthorizationType = exports.NotFoundException = exports.InternalFailureException = exports.BadRequestException = exports.BadRequestReason = exports.RuntimeName = exports.ApiLimitExceededException = exports.ApiKeyValidityOutOfBoundsException = exports.ApiKeyLimitExceededException = exports.ApiCacheType = exports.ApiCacheStatus = exports.ApiCachingBehavior = exports.AssociationStatus = exports.AuthenticationType = exports.AccessDeniedException = void 0;
|
|
4
|
+
exports.EvaluateCodeErrorDetailFilterSensitiveLog = exports.EvaluateCodeRequestFilterSensitiveLog = exports.DisassociateApiResponseFilterSensitiveLog = exports.DisassociateApiRequestFilterSensitiveLog = exports.DeleteTypeResponseFilterSensitiveLog = exports.DeleteTypeRequestFilterSensitiveLog = exports.DeleteResolverResponseFilterSensitiveLog = exports.DeleteResolverRequestFilterSensitiveLog = exports.DeleteGraphqlApiResponseFilterSensitiveLog = exports.DeleteGraphqlApiRequestFilterSensitiveLog = exports.DeleteFunctionResponseFilterSensitiveLog = exports.DeleteFunctionRequestFilterSensitiveLog = exports.DeleteDomainNameResponseFilterSensitiveLog = exports.DeleteDomainNameRequestFilterSensitiveLog = exports.DeleteDataSourceResponseFilterSensitiveLog = exports.DeleteDataSourceRequestFilterSensitiveLog = exports.DeleteApiKeyResponseFilterSensitiveLog = exports.DeleteApiKeyRequestFilterSensitiveLog = exports.DeleteApiCacheResponseFilterSensitiveLog = exports.DeleteApiCacheRequestFilterSensitiveLog = exports.CreateTypeResponseFilterSensitiveLog = exports.TypeFilterSensitiveLog = exports.CreateTypeRequestFilterSensitiveLog = exports.CreateResolverResponseFilterSensitiveLog = exports.ResolverFilterSensitiveLog = exports.CreateResolverRequestFilterSensitiveLog = exports.PipelineConfigFilterSensitiveLog = exports.CachingConfigFilterSensitiveLog = exports.CreateGraphqlApiResponseFilterSensitiveLog = exports.GraphqlApiFilterSensitiveLog = exports.CreateGraphqlApiRequestFilterSensitiveLog = exports.UserPoolConfigFilterSensitiveLog = exports.LogConfigFilterSensitiveLog = exports.CreateFunctionResponseFilterSensitiveLog = exports.FunctionConfigurationFilterSensitiveLog = exports.CreateFunctionRequestFilterSensitiveLog = exports.SyncConfigFilterSensitiveLog = exports.LambdaConflictHandlerConfigFilterSensitiveLog = exports.CreateDomainNameResponseFilterSensitiveLog = exports.DomainNameConfigFilterSensitiveLog = exports.CreateDomainNameRequestFilterSensitiveLog = exports.CreateDataSourceResponseFilterSensitiveLog = exports.DataSourceFilterSensitiveLog = exports.CreateDataSourceRequestFilterSensitiveLog = exports.RelationalDatabaseDataSourceConfigFilterSensitiveLog = exports.RdsHttpEndpointConfigFilterSensitiveLog = exports.OpenSearchServiceDataSourceConfigFilterSensitiveLog = exports.LambdaDataSourceConfigFilterSensitiveLog = exports.HttpDataSourceConfigFilterSensitiveLog = exports.ElasticsearchDataSourceConfigFilterSensitiveLog = void 0;
|
|
5
|
+
exports.UntagResourceResponseFilterSensitiveLog = exports.UntagResourceRequestFilterSensitiveLog = exports.TagResourceResponseFilterSensitiveLog = exports.TagResourceRequestFilterSensitiveLog = exports.StartSchemaCreationResponseFilterSensitiveLog = exports.StartSchemaCreationRequestFilterSensitiveLog = exports.ListTypesResponseFilterSensitiveLog = exports.ListTypesRequestFilterSensitiveLog = exports.ListTagsForResourceResponseFilterSensitiveLog = exports.ListTagsForResourceRequestFilterSensitiveLog = exports.ListResolversByFunctionResponseFilterSensitiveLog = exports.ListResolversByFunctionRequestFilterSensitiveLog = exports.ListResolversResponseFilterSensitiveLog = exports.ListResolversRequestFilterSensitiveLog = exports.ListGraphqlApisResponseFilterSensitiveLog = exports.ListGraphqlApisRequestFilterSensitiveLog = exports.ListFunctionsResponseFilterSensitiveLog = exports.ListFunctionsRequestFilterSensitiveLog = exports.ListDomainNamesResponseFilterSensitiveLog = exports.ListDomainNamesRequestFilterSensitiveLog = exports.ListDataSourcesResponseFilterSensitiveLog = exports.ListDataSourcesRequestFilterSensitiveLog = exports.ListApiKeysResponseFilterSensitiveLog = exports.ListApiKeysRequestFilterSensitiveLog = exports.GetTypeResponseFilterSensitiveLog = exports.GetTypeRequestFilterSensitiveLog = exports.GetSchemaCreationStatusResponseFilterSensitiveLog = exports.GetSchemaCreationStatusRequestFilterSensitiveLog = exports.GetResolverResponseFilterSensitiveLog = exports.GetResolverRequestFilterSensitiveLog = exports.GetIntrospectionSchemaResponseFilterSensitiveLog = exports.GetIntrospectionSchemaRequestFilterSensitiveLog = exports.GetGraphqlApiResponseFilterSensitiveLog = exports.GetGraphqlApiRequestFilterSensitiveLog = exports.GetFunctionResponseFilterSensitiveLog = exports.GetFunctionRequestFilterSensitiveLog = exports.GetDomainNameResponseFilterSensitiveLog = exports.GetDomainNameRequestFilterSensitiveLog = exports.GetDataSourceResponseFilterSensitiveLog = exports.GetDataSourceRequestFilterSensitiveLog = exports.GetApiCacheResponseFilterSensitiveLog = exports.GetApiCacheRequestFilterSensitiveLog = exports.GetApiAssociationResponseFilterSensitiveLog = exports.GetApiAssociationRequestFilterSensitiveLog = exports.FlushApiCacheResponseFilterSensitiveLog = exports.FlushApiCacheRequestFilterSensitiveLog = exports.EvaluateMappingTemplateResponseFilterSensitiveLog = exports.ErrorDetailFilterSensitiveLog = exports.EvaluateMappingTemplateRequestFilterSensitiveLog = exports.EvaluateCodeResponseFilterSensitiveLog = void 0;
|
|
6
|
+
exports.UpdateTypeResponseFilterSensitiveLog = exports.UpdateTypeRequestFilterSensitiveLog = exports.UpdateResolverResponseFilterSensitiveLog = exports.UpdateResolverRequestFilterSensitiveLog = exports.UpdateGraphqlApiResponseFilterSensitiveLog = exports.UpdateGraphqlApiRequestFilterSensitiveLog = exports.UpdateFunctionResponseFilterSensitiveLog = exports.UpdateFunctionRequestFilterSensitiveLog = exports.UpdateDomainNameResponseFilterSensitiveLog = exports.UpdateDomainNameRequestFilterSensitiveLog = exports.UpdateDataSourceResponseFilterSensitiveLog = exports.UpdateDataSourceRequestFilterSensitiveLog = exports.UpdateApiKeyResponseFilterSensitiveLog = exports.UpdateApiKeyRequestFilterSensitiveLog = exports.UpdateApiCacheResponseFilterSensitiveLog = exports.UpdateApiCacheRequestFilterSensitiveLog = void 0;
|
|
7
7
|
const AppSyncServiceException_1 = require("./AppSyncServiceException");
|
|
8
8
|
class AccessDeniedException extends AppSyncServiceException_1.AppSyncServiceException {
|
|
9
9
|
constructor(opts) {
|
|
@@ -102,6 +102,14 @@ class ApiLimitExceededException extends AppSyncServiceException_1.AppSyncService
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
exports.ApiLimitExceededException = ApiLimitExceededException;
|
|
105
|
+
var RuntimeName;
|
|
106
|
+
(function (RuntimeName) {
|
|
107
|
+
RuntimeName["APPSYNC_JS"] = "APPSYNC_JS";
|
|
108
|
+
})(RuntimeName = exports.RuntimeName || (exports.RuntimeName = {}));
|
|
109
|
+
var BadRequestReason;
|
|
110
|
+
(function (BadRequestReason) {
|
|
111
|
+
BadRequestReason["CODE_ERROR"] = "CODE_ERROR";
|
|
112
|
+
})(BadRequestReason = exports.BadRequestReason || (exports.BadRequestReason = {}));
|
|
105
113
|
class BadRequestException extends AppSyncServiceException_1.AppSyncServiceException {
|
|
106
114
|
constructor(opts) {
|
|
107
115
|
super({
|
|
@@ -112,6 +120,8 @@ class BadRequestException extends AppSyncServiceException_1.AppSyncServiceExcept
|
|
|
112
120
|
this.name = "BadRequestException";
|
|
113
121
|
this.$fault = "client";
|
|
114
122
|
Object.setPrototypeOf(this, BadRequestException.prototype);
|
|
123
|
+
this.reason = opts.reason;
|
|
124
|
+
this.detail = opts.detail;
|
|
115
125
|
}
|
|
116
126
|
}
|
|
117
127
|
exports.BadRequestException = BadRequestException;
|
|
@@ -286,6 +296,10 @@ const ApiKeyFilterSensitiveLog = (obj) => ({
|
|
|
286
296
|
...obj,
|
|
287
297
|
});
|
|
288
298
|
exports.ApiKeyFilterSensitiveLog = ApiKeyFilterSensitiveLog;
|
|
299
|
+
const AppSyncRuntimeFilterSensitiveLog = (obj) => ({
|
|
300
|
+
...obj,
|
|
301
|
+
});
|
|
302
|
+
exports.AppSyncRuntimeFilterSensitiveLog = AppSyncRuntimeFilterSensitiveLog;
|
|
289
303
|
const AssociateApiRequestFilterSensitiveLog = (obj) => ({
|
|
290
304
|
...obj,
|
|
291
305
|
});
|
|
@@ -294,6 +308,18 @@ const AssociateApiResponseFilterSensitiveLog = (obj) => ({
|
|
|
294
308
|
...obj,
|
|
295
309
|
});
|
|
296
310
|
exports.AssociateApiResponseFilterSensitiveLog = AssociateApiResponseFilterSensitiveLog;
|
|
311
|
+
const CodeErrorLocationFilterSensitiveLog = (obj) => ({
|
|
312
|
+
...obj,
|
|
313
|
+
});
|
|
314
|
+
exports.CodeErrorLocationFilterSensitiveLog = CodeErrorLocationFilterSensitiveLog;
|
|
315
|
+
const CodeErrorFilterSensitiveLog = (obj) => ({
|
|
316
|
+
...obj,
|
|
317
|
+
});
|
|
318
|
+
exports.CodeErrorFilterSensitiveLog = CodeErrorFilterSensitiveLog;
|
|
319
|
+
const BadRequestDetailFilterSensitiveLog = (obj) => ({
|
|
320
|
+
...obj,
|
|
321
|
+
});
|
|
322
|
+
exports.BadRequestDetailFilterSensitiveLog = BadRequestDetailFilterSensitiveLog;
|
|
297
323
|
const AwsIamConfigFilterSensitiveLog = (obj) => ({
|
|
298
324
|
...obj,
|
|
299
325
|
});
|
|
@@ -518,6 +544,18 @@ const DisassociateApiResponseFilterSensitiveLog = (obj) => ({
|
|
|
518
544
|
...obj,
|
|
519
545
|
});
|
|
520
546
|
exports.DisassociateApiResponseFilterSensitiveLog = DisassociateApiResponseFilterSensitiveLog;
|
|
547
|
+
const EvaluateCodeRequestFilterSensitiveLog = (obj) => ({
|
|
548
|
+
...obj,
|
|
549
|
+
});
|
|
550
|
+
exports.EvaluateCodeRequestFilterSensitiveLog = EvaluateCodeRequestFilterSensitiveLog;
|
|
551
|
+
const EvaluateCodeErrorDetailFilterSensitiveLog = (obj) => ({
|
|
552
|
+
...obj,
|
|
553
|
+
});
|
|
554
|
+
exports.EvaluateCodeErrorDetailFilterSensitiveLog = EvaluateCodeErrorDetailFilterSensitiveLog;
|
|
555
|
+
const EvaluateCodeResponseFilterSensitiveLog = (obj) => ({
|
|
556
|
+
...obj,
|
|
557
|
+
});
|
|
558
|
+
exports.EvaluateCodeResponseFilterSensitiveLog = EvaluateCodeResponseFilterSensitiveLog;
|
|
521
559
|
const EvaluateMappingTemplateRequestFilterSensitiveLog = (obj) => ({
|
|
522
560
|
...obj,
|
|
523
561
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.serializeAws_restJson1UpdateResolverCommand = exports.serializeAws_restJson1UpdateGraphqlApiCommand = exports.serializeAws_restJson1UpdateFunctionCommand = exports.serializeAws_restJson1UpdateDomainNameCommand = exports.serializeAws_restJson1UpdateDataSourceCommand = exports.serializeAws_restJson1UpdateApiKeyCommand = exports.serializeAws_restJson1UpdateApiCacheCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StartSchemaCreationCommand = exports.serializeAws_restJson1ListTypesCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1ListResolversByFunctionCommand = exports.serializeAws_restJson1ListResolversCommand = exports.serializeAws_restJson1ListGraphqlApisCommand = exports.serializeAws_restJson1ListFunctionsCommand = exports.serializeAws_restJson1ListDomainNamesCommand = exports.serializeAws_restJson1ListDataSourcesCommand = exports.serializeAws_restJson1ListApiKeysCommand = exports.serializeAws_restJson1GetTypeCommand = exports.serializeAws_restJson1GetSchemaCreationStatusCommand = exports.serializeAws_restJson1GetResolverCommand = exports.serializeAws_restJson1GetIntrospectionSchemaCommand = exports.serializeAws_restJson1GetGraphqlApiCommand = exports.serializeAws_restJson1GetFunctionCommand = exports.serializeAws_restJson1GetDomainNameCommand = exports.serializeAws_restJson1GetDataSourceCommand = exports.serializeAws_restJson1GetApiCacheCommand = exports.serializeAws_restJson1GetApiAssociationCommand = exports.serializeAws_restJson1FlushApiCacheCommand = exports.serializeAws_restJson1EvaluateMappingTemplateCommand = exports.serializeAws_restJson1EvaluateCodeCommand = exports.serializeAws_restJson1DisassociateApiCommand = exports.serializeAws_restJson1DeleteTypeCommand = exports.serializeAws_restJson1DeleteResolverCommand = exports.serializeAws_restJson1DeleteGraphqlApiCommand = exports.serializeAws_restJson1DeleteFunctionCommand = exports.serializeAws_restJson1DeleteDomainNameCommand = exports.serializeAws_restJson1DeleteDataSourceCommand = exports.serializeAws_restJson1DeleteApiKeyCommand = exports.serializeAws_restJson1DeleteApiCacheCommand = exports.serializeAws_restJson1CreateTypeCommand = exports.serializeAws_restJson1CreateResolverCommand = exports.serializeAws_restJson1CreateGraphqlApiCommand = exports.serializeAws_restJson1CreateFunctionCommand = exports.serializeAws_restJson1CreateDomainNameCommand = exports.serializeAws_restJson1CreateDataSourceCommand = exports.serializeAws_restJson1CreateApiKeyCommand = exports.serializeAws_restJson1CreateApiCacheCommand = exports.serializeAws_restJson1AssociateApiCommand = void 0;
|
|
4
|
+
exports.deserializeAws_restJson1UpdateGraphqlApiCommand = exports.deserializeAws_restJson1UpdateFunctionCommand = exports.deserializeAws_restJson1UpdateDomainNameCommand = exports.deserializeAws_restJson1UpdateDataSourceCommand = exports.deserializeAws_restJson1UpdateApiKeyCommand = exports.deserializeAws_restJson1UpdateApiCacheCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StartSchemaCreationCommand = exports.deserializeAws_restJson1ListTypesCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1ListResolversByFunctionCommand = exports.deserializeAws_restJson1ListResolversCommand = exports.deserializeAws_restJson1ListGraphqlApisCommand = exports.deserializeAws_restJson1ListFunctionsCommand = exports.deserializeAws_restJson1ListDomainNamesCommand = exports.deserializeAws_restJson1ListDataSourcesCommand = exports.deserializeAws_restJson1ListApiKeysCommand = exports.deserializeAws_restJson1GetTypeCommand = exports.deserializeAws_restJson1GetSchemaCreationStatusCommand = exports.deserializeAws_restJson1GetResolverCommand = exports.deserializeAws_restJson1GetIntrospectionSchemaCommand = exports.deserializeAws_restJson1GetGraphqlApiCommand = exports.deserializeAws_restJson1GetFunctionCommand = exports.deserializeAws_restJson1GetDomainNameCommand = exports.deserializeAws_restJson1GetDataSourceCommand = exports.deserializeAws_restJson1GetApiCacheCommand = exports.deserializeAws_restJson1GetApiAssociationCommand = exports.deserializeAws_restJson1FlushApiCacheCommand = exports.deserializeAws_restJson1EvaluateMappingTemplateCommand = exports.deserializeAws_restJson1EvaluateCodeCommand = exports.deserializeAws_restJson1DisassociateApiCommand = exports.deserializeAws_restJson1DeleteTypeCommand = exports.deserializeAws_restJson1DeleteResolverCommand = exports.deserializeAws_restJson1DeleteGraphqlApiCommand = exports.deserializeAws_restJson1DeleteFunctionCommand = exports.deserializeAws_restJson1DeleteDomainNameCommand = exports.deserializeAws_restJson1DeleteDataSourceCommand = exports.deserializeAws_restJson1DeleteApiKeyCommand = exports.deserializeAws_restJson1DeleteApiCacheCommand = exports.deserializeAws_restJson1CreateTypeCommand = exports.deserializeAws_restJson1CreateResolverCommand = exports.deserializeAws_restJson1CreateGraphqlApiCommand = exports.deserializeAws_restJson1CreateFunctionCommand = exports.deserializeAws_restJson1CreateDomainNameCommand = exports.deserializeAws_restJson1CreateDataSourceCommand = exports.deserializeAws_restJson1CreateApiKeyCommand = exports.deserializeAws_restJson1CreateApiCacheCommand = exports.deserializeAws_restJson1AssociateApiCommand = exports.serializeAws_restJson1UpdateTypeCommand = void 0;
|
|
5
|
+
exports.deserializeAws_restJson1UpdateTypeCommand = exports.deserializeAws_restJson1UpdateResolverCommand = void 0;
|
|
5
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
6
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
7
8
|
const AppSyncServiceException_1 = require("../models/AppSyncServiceException");
|
|
@@ -153,6 +154,7 @@ const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
|
|
|
153
154
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "apiId", () => input.apiId, "{apiId}", false);
|
|
154
155
|
let body;
|
|
155
156
|
body = JSON.stringify({
|
|
157
|
+
...(input.code != null && { code: input.code }),
|
|
156
158
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
157
159
|
...(input.description != null && { description: input.description }),
|
|
158
160
|
...(input.functionVersion != null && { functionVersion: input.functionVersion }),
|
|
@@ -160,6 +162,7 @@ const serializeAws_restJson1CreateFunctionCommand = async (input, context) => {
|
|
|
160
162
|
...(input.name != null && { name: input.name }),
|
|
161
163
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
162
164
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
165
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
163
166
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
164
167
|
});
|
|
165
168
|
return new protocol_http_1.HttpRequest({
|
|
@@ -224,6 +227,7 @@ const serializeAws_restJson1CreateResolverCommand = async (input, context) => {
|
|
|
224
227
|
...(input.cachingConfig != null && {
|
|
225
228
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
226
229
|
}),
|
|
230
|
+
...(input.code != null && { code: input.code }),
|
|
227
231
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
228
232
|
...(input.fieldName != null && { fieldName: input.fieldName }),
|
|
229
233
|
...(input.kind != null && { kind: input.kind }),
|
|
@@ -233,6 +237,7 @@ const serializeAws_restJson1CreateResolverCommand = async (input, context) => {
|
|
|
233
237
|
}),
|
|
234
238
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
235
239
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
240
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
236
241
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
237
242
|
});
|
|
238
243
|
return new protocol_http_1.HttpRequest({
|
|
@@ -430,6 +435,30 @@ const serializeAws_restJson1DisassociateApiCommand = async (input, context) => {
|
|
|
430
435
|
});
|
|
431
436
|
};
|
|
432
437
|
exports.serializeAws_restJson1DisassociateApiCommand = serializeAws_restJson1DisassociateApiCommand;
|
|
438
|
+
const serializeAws_restJson1EvaluateCodeCommand = async (input, context) => {
|
|
439
|
+
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
440
|
+
const headers = {
|
|
441
|
+
"content-type": "application/json",
|
|
442
|
+
};
|
|
443
|
+
const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/dataplane-evaluatecode";
|
|
444
|
+
let body;
|
|
445
|
+
body = JSON.stringify({
|
|
446
|
+
...(input.code != null && { code: input.code }),
|
|
447
|
+
...(input.context != null && { context: input.context }),
|
|
448
|
+
...(input.function != null && { function: input.function }),
|
|
449
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
450
|
+
});
|
|
451
|
+
return new protocol_http_1.HttpRequest({
|
|
452
|
+
protocol,
|
|
453
|
+
hostname,
|
|
454
|
+
port,
|
|
455
|
+
method: "POST",
|
|
456
|
+
headers,
|
|
457
|
+
path: resolvedPath,
|
|
458
|
+
body,
|
|
459
|
+
});
|
|
460
|
+
};
|
|
461
|
+
exports.serializeAws_restJson1EvaluateCodeCommand = serializeAws_restJson1EvaluateCodeCommand;
|
|
433
462
|
const serializeAws_restJson1EvaluateMappingTemplateCommand = async (input, context) => {
|
|
434
463
|
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
435
464
|
const headers = {
|
|
@@ -1039,6 +1068,7 @@ const serializeAws_restJson1UpdateFunctionCommand = async (input, context) => {
|
|
|
1039
1068
|
resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "functionId", () => input.functionId, "{functionId}", false);
|
|
1040
1069
|
let body;
|
|
1041
1070
|
body = JSON.stringify({
|
|
1071
|
+
...(input.code != null && { code: input.code }),
|
|
1042
1072
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
1043
1073
|
...(input.description != null && { description: input.description }),
|
|
1044
1074
|
...(input.functionVersion != null && { functionVersion: input.functionVersion }),
|
|
@@ -1046,6 +1076,7 @@ const serializeAws_restJson1UpdateFunctionCommand = async (input, context) => {
|
|
|
1046
1076
|
...(input.name != null && { name: input.name }),
|
|
1047
1077
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
1048
1078
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
1079
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
1049
1080
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
1050
1081
|
});
|
|
1051
1082
|
return new protocol_http_1.HttpRequest({
|
|
@@ -1111,6 +1142,7 @@ const serializeAws_restJson1UpdateResolverCommand = async (input, context) => {
|
|
|
1111
1142
|
...(input.cachingConfig != null && {
|
|
1112
1143
|
cachingConfig: serializeAws_restJson1CachingConfig(input.cachingConfig, context),
|
|
1113
1144
|
}),
|
|
1145
|
+
...(input.code != null && { code: input.code }),
|
|
1114
1146
|
...(input.dataSourceName != null && { dataSourceName: input.dataSourceName }),
|
|
1115
1147
|
...(input.kind != null && { kind: input.kind }),
|
|
1116
1148
|
...(input.maxBatchSize != null && { maxBatchSize: input.maxBatchSize }),
|
|
@@ -1119,6 +1151,7 @@ const serializeAws_restJson1UpdateResolverCommand = async (input, context) => {
|
|
|
1119
1151
|
}),
|
|
1120
1152
|
...(input.requestMappingTemplate != null && { requestMappingTemplate: input.requestMappingTemplate }),
|
|
1121
1153
|
...(input.responseMappingTemplate != null && { responseMappingTemplate: input.responseMappingTemplate }),
|
|
1154
|
+
...(input.runtime != null && { runtime: serializeAws_restJson1AppSyncRuntime(input.runtime, context) }),
|
|
1122
1155
|
...(input.syncConfig != null && { syncConfig: serializeAws_restJson1SyncConfig(input.syncConfig, context) }),
|
|
1123
1156
|
});
|
|
1124
1157
|
return new protocol_http_1.HttpRequest({
|
|
@@ -1496,6 +1529,9 @@ const deserializeAws_restJson1CreateResolverCommandError = async (output, contex
|
|
|
1496
1529
|
};
|
|
1497
1530
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1498
1531
|
switch (errorCode) {
|
|
1532
|
+
case "BadRequestException":
|
|
1533
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1534
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1499
1535
|
case "ConcurrentModificationException":
|
|
1500
1536
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
1501
1537
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -1837,6 +1873,9 @@ const deserializeAws_restJson1DeleteResolverCommandError = async (output, contex
|
|
|
1837
1873
|
};
|
|
1838
1874
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1839
1875
|
switch (errorCode) {
|
|
1876
|
+
case "BadRequestException":
|
|
1877
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
1878
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
1840
1879
|
case "ConcurrentModificationException":
|
|
1841
1880
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
1842
1881
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -1945,6 +1984,52 @@ const deserializeAws_restJson1DisassociateApiCommandError = async (output, conte
|
|
|
1945
1984
|
});
|
|
1946
1985
|
}
|
|
1947
1986
|
};
|
|
1987
|
+
const deserializeAws_restJson1EvaluateCodeCommand = async (output, context) => {
|
|
1988
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1989
|
+
return deserializeAws_restJson1EvaluateCodeCommandError(output, context);
|
|
1990
|
+
}
|
|
1991
|
+
const contents = map({
|
|
1992
|
+
$metadata: deserializeMetadata(output),
|
|
1993
|
+
});
|
|
1994
|
+
const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
|
|
1995
|
+
if (data.error != null) {
|
|
1996
|
+
contents.error = deserializeAws_restJson1EvaluateCodeErrorDetail(data.error, context);
|
|
1997
|
+
}
|
|
1998
|
+
if (data.evaluationResult != null) {
|
|
1999
|
+
contents.evaluationResult = (0, smithy_client_1.expectString)(data.evaluationResult);
|
|
2000
|
+
}
|
|
2001
|
+
if (data.logs != null) {
|
|
2002
|
+
contents.logs = deserializeAws_restJson1Logs(data.logs, context);
|
|
2003
|
+
}
|
|
2004
|
+
return contents;
|
|
2005
|
+
};
|
|
2006
|
+
exports.deserializeAws_restJson1EvaluateCodeCommand = deserializeAws_restJson1EvaluateCodeCommand;
|
|
2007
|
+
const deserializeAws_restJson1EvaluateCodeCommandError = async (output, context) => {
|
|
2008
|
+
const parsedOutput = {
|
|
2009
|
+
...output,
|
|
2010
|
+
body: await parseErrorBody(output.body, context),
|
|
2011
|
+
};
|
|
2012
|
+
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2013
|
+
switch (errorCode) {
|
|
2014
|
+
case "AccessDeniedException":
|
|
2015
|
+
case "com.amazonaws.appsync#AccessDeniedException":
|
|
2016
|
+
throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
2017
|
+
case "BadRequestException":
|
|
2018
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
2019
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
2020
|
+
case "InternalFailureException":
|
|
2021
|
+
case "com.amazonaws.appsync#InternalFailureException":
|
|
2022
|
+
throw await deserializeAws_restJson1InternalFailureExceptionResponse(parsedOutput, context);
|
|
2023
|
+
default:
|
|
2024
|
+
const parsedBody = parsedOutput.body;
|
|
2025
|
+
(0, smithy_client_1.throwDefaultError)({
|
|
2026
|
+
output,
|
|
2027
|
+
parsedBody,
|
|
2028
|
+
exceptionCtor: AppSyncServiceException_1.AppSyncServiceException,
|
|
2029
|
+
errorCode,
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
1948
2033
|
const deserializeAws_restJson1EvaluateMappingTemplateCommand = async (output, context) => {
|
|
1949
2034
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1950
2035
|
return deserializeAws_restJson1EvaluateMappingTemplateCommandError(output, context);
|
|
@@ -1959,6 +2044,9 @@ const deserializeAws_restJson1EvaluateMappingTemplateCommand = async (output, co
|
|
|
1959
2044
|
if (data.evaluationResult != null) {
|
|
1960
2045
|
contents.evaluationResult = (0, smithy_client_1.expectString)(data.evaluationResult);
|
|
1961
2046
|
}
|
|
2047
|
+
if (data.logs != null) {
|
|
2048
|
+
contents.logs = deserializeAws_restJson1Logs(data.logs, context);
|
|
2049
|
+
}
|
|
1962
2050
|
return contents;
|
|
1963
2051
|
};
|
|
1964
2052
|
exports.deserializeAws_restJson1EvaluateMappingTemplateCommand = deserializeAws_restJson1EvaluateMappingTemplateCommand;
|
|
@@ -3320,6 +3408,9 @@ const deserializeAws_restJson1UpdateResolverCommandError = async (output, contex
|
|
|
3320
3408
|
};
|
|
3321
3409
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
3322
3410
|
switch (errorCode) {
|
|
3411
|
+
case "BadRequestException":
|
|
3412
|
+
case "com.amazonaws.appsync#BadRequestException":
|
|
3413
|
+
throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
|
|
3323
3414
|
case "ConcurrentModificationException":
|
|
3324
3415
|
case "com.amazonaws.appsync#ConcurrentModificationException":
|
|
3325
3416
|
throw await deserializeAws_restJson1ConcurrentModificationExceptionResponse(parsedOutput, context);
|
|
@@ -3440,9 +3531,15 @@ const deserializeAws_restJson1ApiLimitExceededExceptionResponse = async (parsedO
|
|
|
3440
3531
|
const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
|
|
3441
3532
|
const contents = map({});
|
|
3442
3533
|
const data = parsedOutput.body;
|
|
3534
|
+
if (data.detail != null) {
|
|
3535
|
+
contents.detail = deserializeAws_restJson1BadRequestDetail(data.detail, context);
|
|
3536
|
+
}
|
|
3443
3537
|
if (data.message != null) {
|
|
3444
3538
|
contents.message = (0, smithy_client_1.expectString)(data.message);
|
|
3445
3539
|
}
|
|
3540
|
+
if (data.reason != null) {
|
|
3541
|
+
contents.reason = (0, smithy_client_1.expectString)(data.reason);
|
|
3542
|
+
}
|
|
3446
3543
|
const exception = new models_0_1.BadRequestException({
|
|
3447
3544
|
$metadata: deserializeMetadata(parsedOutput),
|
|
3448
3545
|
...contents,
|
|
@@ -3542,6 +3639,12 @@ const serializeAws_restJson1AdditionalAuthenticationProviders = (input, context)
|
|
|
3542
3639
|
return serializeAws_restJson1AdditionalAuthenticationProvider(entry, context);
|
|
3543
3640
|
});
|
|
3544
3641
|
};
|
|
3642
|
+
const serializeAws_restJson1AppSyncRuntime = (input, context) => {
|
|
3643
|
+
return {
|
|
3644
|
+
...(input.name != null && { name: input.name }),
|
|
3645
|
+
...(input.runtimeVersion != null && { runtimeVersion: input.runtimeVersion }),
|
|
3646
|
+
};
|
|
3647
|
+
};
|
|
3545
3648
|
const serializeAws_restJson1AuthorizationConfig = (input, context) => {
|
|
3546
3649
|
return {
|
|
3547
3650
|
...(input.authorizationType != null && { authorizationType: input.authorizationType }),
|
|
@@ -3769,6 +3872,12 @@ const deserializeAws_restJson1ApiKeys = (output, context) => {
|
|
|
3769
3872
|
});
|
|
3770
3873
|
return retVal;
|
|
3771
3874
|
};
|
|
3875
|
+
const deserializeAws_restJson1AppSyncRuntime = (output, context) => {
|
|
3876
|
+
return {
|
|
3877
|
+
name: (0, smithy_client_1.expectString)(output.name),
|
|
3878
|
+
runtimeVersion: (0, smithy_client_1.expectString)(output.runtimeVersion),
|
|
3879
|
+
};
|
|
3880
|
+
};
|
|
3772
3881
|
const deserializeAws_restJson1AuthorizationConfig = (output, context) => {
|
|
3773
3882
|
return {
|
|
3774
3883
|
authorizationType: (0, smithy_client_1.expectString)(output.authorizationType),
|
|
@@ -3781,6 +3890,11 @@ const deserializeAws_restJson1AwsIamConfig = (output, context) => {
|
|
|
3781
3890
|
signingServiceName: (0, smithy_client_1.expectString)(output.signingServiceName),
|
|
3782
3891
|
};
|
|
3783
3892
|
};
|
|
3893
|
+
const deserializeAws_restJson1BadRequestDetail = (output, context) => {
|
|
3894
|
+
return {
|
|
3895
|
+
codeErrors: output.codeErrors != null ? deserializeAws_restJson1CodeErrors(output.codeErrors, context) : undefined,
|
|
3896
|
+
};
|
|
3897
|
+
};
|
|
3784
3898
|
const deserializeAws_restJson1CachingConfig = (output, context) => {
|
|
3785
3899
|
return {
|
|
3786
3900
|
cachingKeys: output.cachingKeys != null ? deserializeAws_restJson1CachingKeys(output.cachingKeys, context) : undefined,
|
|
@@ -3798,6 +3912,31 @@ const deserializeAws_restJson1CachingKeys = (output, context) => {
|
|
|
3798
3912
|
});
|
|
3799
3913
|
return retVal;
|
|
3800
3914
|
};
|
|
3915
|
+
const deserializeAws_restJson1CodeError = (output, context) => {
|
|
3916
|
+
return {
|
|
3917
|
+
errorType: (0, smithy_client_1.expectString)(output.errorType),
|
|
3918
|
+
location: output.location != null ? deserializeAws_restJson1CodeErrorLocation(output.location, context) : undefined,
|
|
3919
|
+
value: (0, smithy_client_1.expectString)(output.value),
|
|
3920
|
+
};
|
|
3921
|
+
};
|
|
3922
|
+
const deserializeAws_restJson1CodeErrorLocation = (output, context) => {
|
|
3923
|
+
return {
|
|
3924
|
+
column: (0, smithy_client_1.expectInt32)(output.column),
|
|
3925
|
+
line: (0, smithy_client_1.expectInt32)(output.line),
|
|
3926
|
+
span: (0, smithy_client_1.expectInt32)(output.span),
|
|
3927
|
+
};
|
|
3928
|
+
};
|
|
3929
|
+
const deserializeAws_restJson1CodeErrors = (output, context) => {
|
|
3930
|
+
const retVal = (output || [])
|
|
3931
|
+
.filter((e) => e != null)
|
|
3932
|
+
.map((entry) => {
|
|
3933
|
+
if (entry === null) {
|
|
3934
|
+
return null;
|
|
3935
|
+
}
|
|
3936
|
+
return deserializeAws_restJson1CodeError(entry, context);
|
|
3937
|
+
});
|
|
3938
|
+
return retVal;
|
|
3939
|
+
};
|
|
3801
3940
|
const deserializeAws_restJson1CognitoUserPoolConfig = (output, context) => {
|
|
3802
3941
|
return {
|
|
3803
3942
|
appIdClientRegex: (0, smithy_client_1.expectString)(output.appIdClientRegex),
|
|
@@ -3890,8 +4029,15 @@ const deserializeAws_restJson1ErrorDetail = (output, context) => {
|
|
|
3890
4029
|
message: (0, smithy_client_1.expectString)(output.message),
|
|
3891
4030
|
};
|
|
3892
4031
|
};
|
|
4032
|
+
const deserializeAws_restJson1EvaluateCodeErrorDetail = (output, context) => {
|
|
4033
|
+
return {
|
|
4034
|
+
codeErrors: output.codeErrors != null ? deserializeAws_restJson1CodeErrors(output.codeErrors, context) : undefined,
|
|
4035
|
+
message: (0, smithy_client_1.expectString)(output.message),
|
|
4036
|
+
};
|
|
4037
|
+
};
|
|
3893
4038
|
const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
|
|
3894
4039
|
return {
|
|
4040
|
+
code: (0, smithy_client_1.expectString)(output.code),
|
|
3895
4041
|
dataSourceName: (0, smithy_client_1.expectString)(output.dataSourceName),
|
|
3896
4042
|
description: (0, smithy_client_1.expectString)(output.description),
|
|
3897
4043
|
functionArn: (0, smithy_client_1.expectString)(output.functionArn),
|
|
@@ -3901,6 +4047,7 @@ const deserializeAws_restJson1FunctionConfiguration = (output, context) => {
|
|
|
3901
4047
|
name: (0, smithy_client_1.expectString)(output.name),
|
|
3902
4048
|
requestMappingTemplate: (0, smithy_client_1.expectString)(output.requestMappingTemplate),
|
|
3903
4049
|
responseMappingTemplate: (0, smithy_client_1.expectString)(output.responseMappingTemplate),
|
|
4050
|
+
runtime: output.runtime != null ? deserializeAws_restJson1AppSyncRuntime(output.runtime, context) : undefined,
|
|
3904
4051
|
syncConfig: output.syncConfig != null ? deserializeAws_restJson1SyncConfig(output.syncConfig, context) : undefined,
|
|
3905
4052
|
};
|
|
3906
4053
|
};
|
|
@@ -3994,6 +4141,17 @@ const deserializeAws_restJson1LogConfig = (output, context) => {
|
|
|
3994
4141
|
fieldLogLevel: (0, smithy_client_1.expectString)(output.fieldLogLevel),
|
|
3995
4142
|
};
|
|
3996
4143
|
};
|
|
4144
|
+
const deserializeAws_restJson1Logs = (output, context) => {
|
|
4145
|
+
const retVal = (output || [])
|
|
4146
|
+
.filter((e) => e != null)
|
|
4147
|
+
.map((entry) => {
|
|
4148
|
+
if (entry === null) {
|
|
4149
|
+
return null;
|
|
4150
|
+
}
|
|
4151
|
+
return (0, smithy_client_1.expectString)(entry);
|
|
4152
|
+
});
|
|
4153
|
+
return retVal;
|
|
4154
|
+
};
|
|
3997
4155
|
const deserializeAws_restJson1MapOfStringToString = (output, context) => {
|
|
3998
4156
|
return Object.entries(output).reduce((acc, [key, value]) => {
|
|
3999
4157
|
if (value === null) {
|
|
@@ -4042,6 +4200,7 @@ const deserializeAws_restJson1RelationalDatabaseDataSourceConfig = (output, cont
|
|
|
4042
4200
|
const deserializeAws_restJson1Resolver = (output, context) => {
|
|
4043
4201
|
return {
|
|
4044
4202
|
cachingConfig: output.cachingConfig != null ? deserializeAws_restJson1CachingConfig(output.cachingConfig, context) : undefined,
|
|
4203
|
+
code: (0, smithy_client_1.expectString)(output.code),
|
|
4045
4204
|
dataSourceName: (0, smithy_client_1.expectString)(output.dataSourceName),
|
|
4046
4205
|
fieldName: (0, smithy_client_1.expectString)(output.fieldName),
|
|
4047
4206
|
kind: (0, smithy_client_1.expectString)(output.kind),
|
|
@@ -4052,6 +4211,7 @@ const deserializeAws_restJson1Resolver = (output, context) => {
|
|
|
4052
4211
|
requestMappingTemplate: (0, smithy_client_1.expectString)(output.requestMappingTemplate),
|
|
4053
4212
|
resolverArn: (0, smithy_client_1.expectString)(output.resolverArn),
|
|
4054
4213
|
responseMappingTemplate: (0, smithy_client_1.expectString)(output.responseMappingTemplate),
|
|
4214
|
+
runtime: output.runtime != null ? deserializeAws_restJson1AppSyncRuntime(output.runtime, context) : undefined,
|
|
4055
4215
|
syncConfig: output.syncConfig != null ? deserializeAws_restJson1SyncConfig(output.syncConfig, context) : undefined,
|
|
4056
4216
|
typeName: (0, smithy_client_1.expectString)(output.typeName),
|
|
4057
4217
|
};
|
package/dist-es/AppSync.js
CHANGED
|
@@ -17,6 +17,7 @@ import { DeleteGraphqlApiCommand, } from "./commands/DeleteGraphqlApiCommand";
|
|
|
17
17
|
import { DeleteResolverCommand, } from "./commands/DeleteResolverCommand";
|
|
18
18
|
import { DeleteTypeCommand } from "./commands/DeleteTypeCommand";
|
|
19
19
|
import { DisassociateApiCommand, } from "./commands/DisassociateApiCommand";
|
|
20
|
+
import { EvaluateCodeCommand, } from "./commands/EvaluateCodeCommand";
|
|
20
21
|
import { EvaluateMappingTemplateCommand, } from "./commands/EvaluateMappingTemplateCommand";
|
|
21
22
|
import { FlushApiCacheCommand, } from "./commands/FlushApiCacheCommand";
|
|
22
23
|
import { GetApiAssociationCommand, } from "./commands/GetApiAssociationCommand";
|
|
@@ -302,6 +303,20 @@ export class AppSync extends AppSyncClient {
|
|
|
302
303
|
return this.send(command, optionsOrCb);
|
|
303
304
|
}
|
|
304
305
|
}
|
|
306
|
+
evaluateCode(args, optionsOrCb, cb) {
|
|
307
|
+
const command = new EvaluateCodeCommand(args);
|
|
308
|
+
if (typeof optionsOrCb === "function") {
|
|
309
|
+
this.send(command, optionsOrCb);
|
|
310
|
+
}
|
|
311
|
+
else if (typeof cb === "function") {
|
|
312
|
+
if (typeof optionsOrCb !== "object")
|
|
313
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
314
|
+
this.send(command, optionsOrCb || {}, cb);
|
|
315
|
+
}
|
|
316
|
+
else {
|
|
317
|
+
return this.send(command, optionsOrCb);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
305
320
|
evaluateMappingTemplate(args, optionsOrCb, cb) {
|
|
306
321
|
const command = new EvaluateMappingTemplateCommand(args);
|
|
307
322
|
if (typeof optionsOrCb === "function") {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
|
+
import { EvaluateCodeRequestFilterSensitiveLog, EvaluateCodeResponseFilterSensitiveLog, } from "../models/models_0";
|
|
5
|
+
import { deserializeAws_restJson1EvaluateCodeCommand, serializeAws_restJson1EvaluateCodeCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export class EvaluateCodeCommand extends $Command {
|
|
7
|
+
constructor(input) {
|
|
8
|
+
super();
|
|
9
|
+
this.input = input;
|
|
10
|
+
}
|
|
11
|
+
static getEndpointParameterInstructions() {
|
|
12
|
+
return {
|
|
13
|
+
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
|
14
|
+
Endpoint: { type: "builtInParams", name: "endpoint" },
|
|
15
|
+
Region: { type: "builtInParams", name: "region" },
|
|
16
|
+
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
20
|
+
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
21
|
+
this.middlewareStack.use(getEndpointPlugin(configuration, EvaluateCodeCommand.getEndpointParameterInstructions()));
|
|
22
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
23
|
+
const { logger } = configuration;
|
|
24
|
+
const clientName = "AppSyncClient";
|
|
25
|
+
const commandName = "EvaluateCodeCommand";
|
|
26
|
+
const handlerExecutionContext = {
|
|
27
|
+
logger,
|
|
28
|
+
clientName,
|
|
29
|
+
commandName,
|
|
30
|
+
inputFilterSensitiveLog: EvaluateCodeRequestFilterSensitiveLog,
|
|
31
|
+
outputFilterSensitiveLog: EvaluateCodeResponseFilterSensitiveLog,
|
|
32
|
+
};
|
|
33
|
+
const { requestHandler } = configuration;
|
|
34
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
35
|
+
}
|
|
36
|
+
serialize(input, context) {
|
|
37
|
+
return serializeAws_restJson1EvaluateCodeCommand(input, context);
|
|
38
|
+
}
|
|
39
|
+
deserialize(output, context) {
|
|
40
|
+
return deserializeAws_restJson1EvaluateCodeCommand(output, context);
|
|
41
|
+
}
|
|
42
|
+
}
|