@aws-amplify/graphql-transformer-interfaces 1.14.0-category-split-test.0 → 1.14.1-alpha.40

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.
@@ -1,4 +1,6 @@
1
- import { CfnResource, Construct, IAsset, IConstruct } from '@aws-cdk/core';
1
+ import {
2
+ CfnResource, Construct, IAsset, IConstruct,
3
+ } from '@aws-cdk/core';
2
4
  import { Grant, IGrantable, IRole } from '@aws-cdk/aws-iam';
3
5
  import { TransformHostProvider } from './transform-host-provider';
4
6
 
@@ -91,16 +93,19 @@ export enum TemplateType {
91
93
  }
92
94
  export interface InlineMappingTemplateProvider {
93
95
  type: TemplateType.INLINE;
94
- bind(scope: Construct): string;
96
+ bind: (scope: Construct) => string;
97
+ getTemplateHash: () => string;
95
98
  }
99
+
96
100
  export interface S3MappingTemplateProvider {
97
101
  type: TemplateType.S3_LOCATION;
98
- bind(scope: Construct): string;
102
+ bind: (scope: Construct) => string;
103
+ getTemplateHash: () => string;
99
104
  }
100
105
 
101
106
  export interface S3MappingFunctionCodeProvider {
102
107
  type: TemplateType.S3_LOCATION;
103
- bind(scope: Construct): IAsset;
108
+ bind: (scope: Construct) => IAsset;
104
109
  }
105
110
 
106
111
  export type MappingTemplateProvider = InlineMappingTemplateProvider | S3MappingTemplateProvider;
@@ -111,31 +116,31 @@ export interface GraphQLAPIProvider {
111
116
 
112
117
  // getDefaultAuthorization(): Readonly<AuthorizationMode>;
113
118
  // getAdditionalAuthorizationModes(): Readonly<AuthorizationMode[]>;
114
- addToSchema(addition: string): void;
115
- addSchemaDependency(construct: CfnResource): boolean;
119
+ addToSchema: (addition: string) => void;
120
+ addSchemaDependency: (construct: CfnResource) => boolean;
116
121
 
117
- grant(grantee: IGrantable, resources: APIIAMResourceProvider, ...actions: string[]): Grant;
122
+ grant: (grantee: IGrantable, resources: APIIAMResourceProvider, ...actions: string[]) => Grant;
118
123
  // /**
119
124
  // * Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
120
125
  // *
121
126
  // * @param grantee The principal.
122
127
  // * @param fields The fields to grant access to that are Mutations (leave blank for all).
123
128
  // */
124
- grantMutation(grantee: IGrantable, ...fields: string[]): Grant;
129
+ grantMutation: (grantee: IGrantable, ...fields: string[]) => Grant;
125
130
  // /**
126
131
  // * Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
127
132
  // *
128
133
  // * @param grantee The principal.
129
134
  // * @param fields The fields to grant access to that are Queries (leave blank for all).
130
135
  // */
131
- grantQuery(grantee: IGrantable, ...fields: string[]): Grant;
136
+ grantQuery: (grantee: IGrantable, ...fields: string[]) => Grant;
132
137
  // /**
133
138
  // * Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
134
139
  // *
135
140
  // * @param grantee The principal.
136
141
  // * @param fields The fields to grant access to that are Subscriptions (leave blank for all).
137
142
  // */
138
- grantSubscription(grantee: IGrantable, ...fields: string[]): Grant;
143
+ grantSubscription: (grantee: IGrantable, ...fields: string[]) => Grant;
139
144
  }
140
145
 
141
146
  export interface APIIAMResourceProvider {
@@ -144,5 +149,5 @@ export interface APIIAMResourceProvider {
144
149
  *
145
150
  * @param api The GraphQL API to give permissions
146
151
  */
147
- resourceArns(api: GraphQLAPIProvider): string[];
152
+ resourceArns: (api: GraphQLAPIProvider) => string[];
148
153
  }
package/src/index.ts CHANGED
@@ -29,6 +29,7 @@ export {
29
29
  AppSyncAuthConfigurationUserPoolEntry,
30
30
  AppSyncAuthMode,
31
31
  UserPoolConfig,
32
+ SearchableDataSourceOptions,
32
33
  } from './graphql-api-provider';
33
34
 
34
35
  export { TransformHostProvider, DynamoDbDataSourceOptions } from './transform-host-provider';