@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.
- package/CHANGELOG.md +7 -21
- package/LICENSE +183 -183
- package/lib/graphql-api-provider.d.ts +12 -10
- package/lib/graphql-api-provider.d.ts.map +1 -1
- package/lib/graphql-api-provider.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/lib/transformer-context/index.js +5 -1
- package/lib/transformer-context/index.js.map +1 -1
- package/package.json +3 -3
- package/src/graphql-api-provider.ts +16 -11
- package/src/index.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
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)
|
|
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)
|
|
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)
|
|
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)
|
|
115
|
-
addSchemaDependency(construct: CfnResource)
|
|
119
|
+
addToSchema: (addition: string) => void;
|
|
120
|
+
addSchemaDependency: (construct: CfnResource) => boolean;
|
|
116
121
|
|
|
117
|
-
grant(grantee: IGrantable, resources: APIIAMResourceProvider, ...actions: string[])
|
|
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[])
|
|
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[])
|
|
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[])
|
|
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)
|
|
152
|
+
resourceArns: (api: GraphQLAPIProvider) => string[];
|
|
148
153
|
}
|
package/src/index.ts
CHANGED