@aws-sdk/client-appsync 3.211.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.
@@ -18,6 +18,7 @@ import { DeleteGraphqlApiCommandInput, DeleteGraphqlApiCommandOutput } from "../
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";
@@ -68,6 +69,7 @@ export declare const serializeAws_restJson1DeleteGraphqlApiCommand: (input: Dele
68
69
  export declare const serializeAws_restJson1DeleteResolverCommand: (input: DeleteResolverCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
69
70
  export declare const serializeAws_restJson1DeleteTypeCommand: (input: DeleteTypeCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
70
71
  export declare const serializeAws_restJson1DisassociateApiCommand: (input: DisassociateApiCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
72
+ export declare const serializeAws_restJson1EvaluateCodeCommand: (input: EvaluateCodeCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
71
73
  export declare const serializeAws_restJson1EvaluateMappingTemplateCommand: (input: EvaluateMappingTemplateCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
72
74
  export declare const serializeAws_restJson1FlushApiCacheCommand: (input: FlushApiCacheCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
73
75
  export declare const serializeAws_restJson1GetApiAssociationCommand: (input: GetApiAssociationCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
@@ -118,6 +120,7 @@ export declare const deserializeAws_restJson1DeleteGraphqlApiCommand: (output: _
118
120
  export declare const deserializeAws_restJson1DeleteResolverCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteResolverCommandOutput>;
119
121
  export declare const deserializeAws_restJson1DeleteTypeCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DeleteTypeCommandOutput>;
120
122
  export declare const deserializeAws_restJson1DisassociateApiCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<DisassociateApiCommandOutput>;
123
+ export declare const deserializeAws_restJson1EvaluateCodeCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<EvaluateCodeCommandOutput>;
121
124
  export declare const deserializeAws_restJson1EvaluateMappingTemplateCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<EvaluateMappingTemplateCommandOutput>;
122
125
  export declare const deserializeAws_restJson1FlushApiCacheCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<FlushApiCacheCommandOutput>;
123
126
  export declare const deserializeAws_restJson1GetApiAssociationCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetApiAssociationCommandOutput>;
@@ -72,6 +72,10 @@ import {
72
72
  DisassociateApiCommandInput,
73
73
  DisassociateApiCommandOutput,
74
74
  } from "./commands/DisassociateApiCommand";
75
+ import {
76
+ EvaluateCodeCommandInput,
77
+ EvaluateCodeCommandOutput,
78
+ } from "./commands/EvaluateCodeCommand";
75
79
  import {
76
80
  EvaluateMappingTemplateCommandInput,
77
81
  EvaluateMappingTemplateCommandOutput,
@@ -435,6 +439,19 @@ export declare class AppSync extends AppSyncClient {
435
439
  options: __HttpHandlerOptions,
436
440
  cb: (err: any, data?: DisassociateApiCommandOutput) => void
437
441
  ): void;
442
+ evaluateCode(
443
+ args: EvaluateCodeCommandInput,
444
+ options?: __HttpHandlerOptions
445
+ ): Promise<EvaluateCodeCommandOutput>;
446
+ evaluateCode(
447
+ args: EvaluateCodeCommandInput,
448
+ cb: (err: any, data?: EvaluateCodeCommandOutput) => void
449
+ ): void;
450
+ evaluateCode(
451
+ args: EvaluateCodeCommandInput,
452
+ options: __HttpHandlerOptions,
453
+ cb: (err: any, data?: EvaluateCodeCommandOutput) => void
454
+ ): void;
438
455
  evaluateMappingTemplate(
439
456
  args: EvaluateMappingTemplateCommandInput,
440
457
  options?: __HttpHandlerOptions
@@ -115,6 +115,10 @@ import {
115
115
  DisassociateApiCommandInput,
116
116
  DisassociateApiCommandOutput,
117
117
  } from "./commands/DisassociateApiCommand";
118
+ import {
119
+ EvaluateCodeCommandInput,
120
+ EvaluateCodeCommandOutput,
121
+ } from "./commands/EvaluateCodeCommand";
118
122
  import {
119
123
  EvaluateMappingTemplateCommandInput,
120
124
  EvaluateMappingTemplateCommandOutput,
@@ -267,6 +271,7 @@ export declare type ServiceInputTypes =
267
271
  | DeleteResolverCommandInput
268
272
  | DeleteTypeCommandInput
269
273
  | DisassociateApiCommandInput
274
+ | EvaluateCodeCommandInput
270
275
  | EvaluateMappingTemplateCommandInput
271
276
  | FlushApiCacheCommandInput
272
277
  | GetApiAssociationCommandInput
@@ -318,6 +323,7 @@ export declare type ServiceOutputTypes =
318
323
  | DeleteResolverCommandOutput
319
324
  | DeleteTypeCommandOutput
320
325
  | DisassociateApiCommandOutput
326
+ | EvaluateCodeCommandOutput
321
327
  | EvaluateMappingTemplateCommandOutput
322
328
  | FlushApiCacheCommandOutput
323
329
  | GetApiAssociationCommandOutput
@@ -0,0 +1,34 @@
1
+ import { EndpointParameterInstructions } from "@aws-sdk/middleware-endpoint";
2
+ import { Command as $Command } from "@aws-sdk/smithy-client";
3
+ import {
4
+ Handler,
5
+ HttpHandlerOptions as __HttpHandlerOptions,
6
+ MetadataBearer as __MetadataBearer,
7
+ MiddlewareStack,
8
+ } from "@aws-sdk/types";
9
+ import {
10
+ AppSyncClientResolvedConfig,
11
+ ServiceInputTypes,
12
+ ServiceOutputTypes,
13
+ } from "../AppSyncClient";
14
+ import { EvaluateCodeRequest, EvaluateCodeResponse } from "../models/models_0";
15
+ export interface EvaluateCodeCommandInput extends EvaluateCodeRequest {}
16
+ export interface EvaluateCodeCommandOutput
17
+ extends EvaluateCodeResponse,
18
+ __MetadataBearer {}
19
+ export declare class EvaluateCodeCommand extends $Command<
20
+ EvaluateCodeCommandInput,
21
+ EvaluateCodeCommandOutput,
22
+ AppSyncClientResolvedConfig
23
+ > {
24
+ readonly input: EvaluateCodeCommandInput;
25
+ static getEndpointParameterInstructions(): EndpointParameterInstructions;
26
+ constructor(input: EvaluateCodeCommandInput);
27
+ resolveMiddleware(
28
+ clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
29
+ configuration: AppSyncClientResolvedConfig,
30
+ options?: __HttpHandlerOptions
31
+ ): Handler<EvaluateCodeCommandInput, EvaluateCodeCommandOutput>;
32
+ private serialize;
33
+ private deserialize;
34
+ }
@@ -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";
@@ -113,6 +113,13 @@ export declare class ApiLimitExceededException extends __BaseException {
113
113
  opts: __ExceptionOptionType<ApiLimitExceededException, __BaseException>
114
114
  );
115
115
  }
116
+ export declare enum RuntimeName {
117
+ APPSYNC_JS = "APPSYNC_JS",
118
+ }
119
+ export interface AppSyncRuntime {
120
+ name: RuntimeName | string | undefined;
121
+ runtimeVersion: string | undefined;
122
+ }
116
123
  export interface AssociateApiRequest {
117
124
  domainName: string | undefined;
118
125
  apiId: string | undefined;
@@ -120,9 +127,27 @@ export interface AssociateApiRequest {
120
127
  export interface AssociateApiResponse {
121
128
  apiAssociation?: ApiAssociation;
122
129
  }
130
+ export interface CodeErrorLocation {
131
+ line?: number;
132
+ column?: number;
133
+ span?: number;
134
+ }
135
+ export interface CodeError {
136
+ errorType?: string;
137
+ value?: string;
138
+ location?: CodeErrorLocation;
139
+ }
140
+ export interface BadRequestDetail {
141
+ codeErrors?: CodeError[];
142
+ }
143
+ export declare enum BadRequestReason {
144
+ CODE_ERROR = "CODE_ERROR",
145
+ }
123
146
  export declare class BadRequestException extends __BaseException {
124
147
  readonly name: "BadRequestException";
125
148
  readonly $fault: "client";
149
+ reason?: BadRequestReason | string;
150
+ detail?: BadRequestDetail;
126
151
  constructor(
127
152
  opts: __ExceptionOptionType<BadRequestException, __BaseException>
128
153
  );
@@ -312,9 +337,11 @@ export interface CreateFunctionRequest {
312
337
  dataSourceName: string | undefined;
313
338
  requestMappingTemplate?: string;
314
339
  responseMappingTemplate?: string;
315
- functionVersion: string | undefined;
340
+ functionVersion?: string;
316
341
  syncConfig?: SyncConfig;
317
342
  maxBatchSize?: number;
343
+ runtime?: AppSyncRuntime;
344
+ code?: string;
318
345
  }
319
346
  export interface FunctionConfiguration {
320
347
  functionId?: string;
@@ -327,6 +354,8 @@ export interface FunctionConfiguration {
327
354
  functionVersion?: string;
328
355
  syncConfig?: SyncConfig;
329
356
  maxBatchSize?: number;
357
+ runtime?: AppSyncRuntime;
358
+ code?: string;
330
359
  }
331
360
  export interface CreateFunctionResponse {
332
361
  functionConfiguration?: FunctionConfiguration;
@@ -403,6 +432,8 @@ export interface CreateResolverRequest {
403
432
  syncConfig?: SyncConfig;
404
433
  cachingConfig?: CachingConfig;
405
434
  maxBatchSize?: number;
435
+ runtime?: AppSyncRuntime;
436
+ code?: string;
406
437
  }
407
438
  export interface Resolver {
408
439
  typeName?: string;
@@ -416,6 +447,8 @@ export interface Resolver {
416
447
  syncConfig?: SyncConfig;
417
448
  cachingConfig?: CachingConfig;
418
449
  maxBatchSize?: number;
450
+ runtime?: AppSyncRuntime;
451
+ code?: string;
419
452
  }
420
453
  export interface CreateResolverResponse {
421
454
  resolver?: Resolver;
@@ -481,6 +514,21 @@ export interface DisassociateApiRequest {
481
514
  domainName: string | undefined;
482
515
  }
483
516
  export interface DisassociateApiResponse {}
517
+ export interface EvaluateCodeRequest {
518
+ runtime: AppSyncRuntime | undefined;
519
+ code: string | undefined;
520
+ context: string | undefined;
521
+ function?: string;
522
+ }
523
+ export interface EvaluateCodeErrorDetail {
524
+ message?: string;
525
+ codeErrors?: CodeError[];
526
+ }
527
+ export interface EvaluateCodeResponse {
528
+ evaluationResult?: string;
529
+ error?: EvaluateCodeErrorDetail;
530
+ logs?: string[];
531
+ }
484
532
  export interface EvaluateMappingTemplateRequest {
485
533
  template: string | undefined;
486
534
  context: string | undefined;
@@ -491,6 +539,7 @@ export interface ErrorDetail {
491
539
  export interface EvaluateMappingTemplateResponse {
492
540
  evaluationResult?: string;
493
541
  error?: ErrorDetail;
542
+ logs?: string[];
494
543
  }
495
544
  export interface FlushApiCacheRequest {
496
545
  apiId: string | undefined;
@@ -729,9 +778,11 @@ export interface UpdateFunctionRequest {
729
778
  dataSourceName: string | undefined;
730
779
  requestMappingTemplate?: string;
731
780
  responseMappingTemplate?: string;
732
- functionVersion: string | undefined;
781
+ functionVersion?: string;
733
782
  syncConfig?: SyncConfig;
734
783
  maxBatchSize?: number;
784
+ runtime?: AppSyncRuntime;
785
+ code?: string;
735
786
  }
736
787
  export interface UpdateFunctionResponse {
737
788
  functionConfiguration?: FunctionConfiguration;
@@ -762,6 +813,8 @@ export interface UpdateResolverRequest {
762
813
  syncConfig?: SyncConfig;
763
814
  cachingConfig?: CachingConfig;
764
815
  maxBatchSize?: number;
816
+ runtime?: AppSyncRuntime;
817
+ code?: string;
765
818
  }
766
819
  export interface UpdateResolverResponse {
767
820
  resolver?: Resolver;
@@ -792,12 +845,22 @@ export declare const ApiAssociationFilterSensitiveLog: (
792
845
  ) => any;
793
846
  export declare const ApiCacheFilterSensitiveLog: (obj: ApiCache) => any;
794
847
  export declare const ApiKeyFilterSensitiveLog: (obj: ApiKey) => any;
848
+ export declare const AppSyncRuntimeFilterSensitiveLog: (
849
+ obj: AppSyncRuntime
850
+ ) => any;
795
851
  export declare const AssociateApiRequestFilterSensitiveLog: (
796
852
  obj: AssociateApiRequest
797
853
  ) => any;
798
854
  export declare const AssociateApiResponseFilterSensitiveLog: (
799
855
  obj: AssociateApiResponse
800
856
  ) => any;
857
+ export declare const CodeErrorLocationFilterSensitiveLog: (
858
+ obj: CodeErrorLocation
859
+ ) => any;
860
+ export declare const CodeErrorFilterSensitiveLog: (obj: CodeError) => any;
861
+ export declare const BadRequestDetailFilterSensitiveLog: (
862
+ obj: BadRequestDetail
863
+ ) => any;
801
864
  export declare const AwsIamConfigFilterSensitiveLog: (obj: AwsIamConfig) => any;
802
865
  export declare const AuthorizationConfigFilterSensitiveLog: (
803
866
  obj: AuthorizationConfig
@@ -952,6 +1015,15 @@ export declare const DisassociateApiRequestFilterSensitiveLog: (
952
1015
  export declare const DisassociateApiResponseFilterSensitiveLog: (
953
1016
  obj: DisassociateApiResponse
954
1017
  ) => any;
1018
+ export declare const EvaluateCodeRequestFilterSensitiveLog: (
1019
+ obj: EvaluateCodeRequest
1020
+ ) => any;
1021
+ export declare const EvaluateCodeErrorDetailFilterSensitiveLog: (
1022
+ obj: EvaluateCodeErrorDetail
1023
+ ) => any;
1024
+ export declare const EvaluateCodeResponseFilterSensitiveLog: (
1025
+ obj: EvaluateCodeResponse
1026
+ ) => any;
955
1027
  export declare const EvaluateMappingTemplateRequestFilterSensitiveLog: (
956
1028
  obj: EvaluateMappingTemplateRequest
957
1029
  ) => any;
@@ -75,6 +75,10 @@ import {
75
75
  DisassociateApiCommandInput,
76
76
  DisassociateApiCommandOutput,
77
77
  } from "../commands/DisassociateApiCommand";
78
+ import {
79
+ EvaluateCodeCommandInput,
80
+ EvaluateCodeCommandOutput,
81
+ } from "../commands/EvaluateCodeCommand";
78
82
  import {
79
83
  EvaluateMappingTemplateCommandInput,
80
84
  EvaluateMappingTemplateCommandOutput,
@@ -275,6 +279,10 @@ export declare const serializeAws_restJson1DisassociateApiCommand: (
275
279
  input: DisassociateApiCommandInput,
276
280
  context: __SerdeContext
277
281
  ) => Promise<__HttpRequest>;
282
+ export declare const serializeAws_restJson1EvaluateCodeCommand: (
283
+ input: EvaluateCodeCommandInput,
284
+ context: __SerdeContext
285
+ ) => Promise<__HttpRequest>;
278
286
  export declare const serializeAws_restJson1EvaluateMappingTemplateCommand: (
279
287
  input: EvaluateMappingTemplateCommandInput,
280
288
  context: __SerdeContext
@@ -475,6 +483,10 @@ export declare const deserializeAws_restJson1DisassociateApiCommand: (
475
483
  output: __HttpResponse,
476
484
  context: __SerdeContext
477
485
  ) => Promise<DisassociateApiCommandOutput>;
486
+ export declare const deserializeAws_restJson1EvaluateCodeCommand: (
487
+ output: __HttpResponse,
488
+ context: __SerdeContext
489
+ ) => Promise<EvaluateCodeCommandOutput>;
478
490
  export declare const deserializeAws_restJson1EvaluateMappingTemplateCommand: (
479
491
  output: __HttpResponse,
480
492
  context: __SerdeContext
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-appsync",
3
3
  "description": "AWS SDK for JavaScript Appsync Client for Node.js, Browser and React Native",
4
- "version": "3.211.0",
4
+ "version": "3.213.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,36 +19,36 @@
19
19
  "dependencies": {
20
20
  "@aws-crypto/sha256-browser": "2.0.0",
21
21
  "@aws-crypto/sha256-js": "2.0.0",
22
- "@aws-sdk/client-sts": "3.211.0",
23
- "@aws-sdk/config-resolver": "3.209.0",
24
- "@aws-sdk/credential-provider-node": "3.211.0",
25
- "@aws-sdk/fetch-http-handler": "3.208.0",
26
- "@aws-sdk/hash-node": "3.208.0",
27
- "@aws-sdk/invalid-dependency": "3.208.0",
28
- "@aws-sdk/middleware-content-length": "3.208.0",
29
- "@aws-sdk/middleware-endpoint": "3.208.0",
30
- "@aws-sdk/middleware-host-header": "3.208.0",
31
- "@aws-sdk/middleware-logger": "3.208.0",
32
- "@aws-sdk/middleware-recursion-detection": "3.208.0",
33
- "@aws-sdk/middleware-retry": "3.209.0",
34
- "@aws-sdk/middleware-serde": "3.208.0",
35
- "@aws-sdk/middleware-signing": "3.208.0",
36
- "@aws-sdk/middleware-stack": "3.208.0",
37
- "@aws-sdk/middleware-user-agent": "3.208.0",
38
- "@aws-sdk/node-config-provider": "3.209.0",
39
- "@aws-sdk/node-http-handler": "3.208.0",
40
- "@aws-sdk/protocol-http": "3.208.0",
41
- "@aws-sdk/smithy-client": "3.209.0",
42
- "@aws-sdk/types": "3.208.0",
43
- "@aws-sdk/url-parser": "3.208.0",
22
+ "@aws-sdk/client-sts": "3.213.0",
23
+ "@aws-sdk/config-resolver": "3.212.0",
24
+ "@aws-sdk/credential-provider-node": "3.212.0",
25
+ "@aws-sdk/fetch-http-handler": "3.212.0",
26
+ "@aws-sdk/hash-node": "3.212.0",
27
+ "@aws-sdk/invalid-dependency": "3.212.0",
28
+ "@aws-sdk/middleware-content-length": "3.212.0",
29
+ "@aws-sdk/middleware-endpoint": "3.212.0",
30
+ "@aws-sdk/middleware-host-header": "3.212.0",
31
+ "@aws-sdk/middleware-logger": "3.212.0",
32
+ "@aws-sdk/middleware-recursion-detection": "3.212.0",
33
+ "@aws-sdk/middleware-retry": "3.212.0",
34
+ "@aws-sdk/middleware-serde": "3.212.0",
35
+ "@aws-sdk/middleware-signing": "3.212.0",
36
+ "@aws-sdk/middleware-stack": "3.212.0",
37
+ "@aws-sdk/middleware-user-agent": "3.212.0",
38
+ "@aws-sdk/node-config-provider": "3.212.0",
39
+ "@aws-sdk/node-http-handler": "3.212.0",
40
+ "@aws-sdk/protocol-http": "3.212.0",
41
+ "@aws-sdk/smithy-client": "3.212.0",
42
+ "@aws-sdk/types": "3.212.0",
43
+ "@aws-sdk/url-parser": "3.212.0",
44
44
  "@aws-sdk/util-base64": "3.208.0",
45
45
  "@aws-sdk/util-body-length-browser": "3.188.0",
46
46
  "@aws-sdk/util-body-length-node": "3.208.0",
47
- "@aws-sdk/util-defaults-mode-browser": "3.209.0",
48
- "@aws-sdk/util-defaults-mode-node": "3.209.0",
49
- "@aws-sdk/util-endpoints": "3.211.0",
50
- "@aws-sdk/util-user-agent-browser": "3.208.0",
51
- "@aws-sdk/util-user-agent-node": "3.209.0",
47
+ "@aws-sdk/util-defaults-mode-browser": "3.212.0",
48
+ "@aws-sdk/util-defaults-mode-node": "3.212.0",
49
+ "@aws-sdk/util-endpoints": "3.212.0",
50
+ "@aws-sdk/util-user-agent-browser": "3.212.0",
51
+ "@aws-sdk/util-user-agent-node": "3.212.0",
52
52
  "@aws-sdk/util-utf8-browser": "3.188.0",
53
53
  "@aws-sdk/util-utf8-node": "3.208.0",
54
54
  "tslib": "^2.3.1"