@tinacms/graphql 0.0.0-0a77b75-20241004023651

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/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,180 @@
1
+ /**
2
+
3
+ */
4
+ import { type FieldDefinitionNode, type ScalarTypeDefinitionNode, type InputValueDefinitionNode, type ObjectTypeDefinitionNode, type InterfaceTypeDefinitionNode, type NamedTypeNode, type UnionTypeDefinitionNode, type TypeDefinitionNode, type DirectiveNode, type EnumTypeDefinitionNode, type InputObjectTypeDefinitionNode, type DocumentNode, type FragmentDefinitionNode, type SelectionNode, type FieldNode, type InlineFragmentNode, type OperationDefinitionNode } from 'graphql';
5
+ export declare const SysFieldDefinition: {
6
+ kind: "Field";
7
+ name: {
8
+ kind: "Name";
9
+ value: string;
10
+ };
11
+ arguments: any[];
12
+ directives: any[];
13
+ selectionSet: {
14
+ kind: "SelectionSet";
15
+ selections: {
16
+ kind: "Field";
17
+ name: {
18
+ kind: "Name";
19
+ value: string;
20
+ };
21
+ arguments: any[];
22
+ directives: any[];
23
+ }[];
24
+ };
25
+ };
26
+ /**
27
+ * the `gql` module provides functions and types which can be
28
+ * used to build up the GraphQL AST. The primary reason for us using
29
+ * this instead of the [builders provided by the graphql package](https://graphql.org/graphql-js/type/#examples)
30
+ * is due to the dynamic and asynchronous nature of our needs.
31
+ *
32
+ * The tradeoff is a low-level API that's often more verbose, and it's
33
+ * not a complete match of the GraphQL spec, so additional properties will likely
34
+ * be needed as our needs grow.
35
+ */
36
+ export declare const astBuilder: {
37
+ /**
38
+ * `FormFieldBuilder` acts as a shortcut to building an entire `ObjectTypeDefinition`, we use this
39
+ * because all Tina field objects share a common set of fields ('name', 'label', 'component')
40
+ */
41
+ FormFieldBuilder: ({ name, additionalFields, }: {
42
+ name: string;
43
+ additionalFields?: FieldDefinitionNode[];
44
+ }) => ObjectTypeDefinitionNode;
45
+ ScalarTypeDefinition: ({ name, description, }: {
46
+ name: string;
47
+ description?: string;
48
+ }) => ScalarTypeDefinitionNode;
49
+ InputValueDefinition: ({ name, type, list, required, }: {
50
+ name: string;
51
+ type: string | InputObjectTypeDefinitionNode | EnumTypeDefinitionNode;
52
+ list?: boolean;
53
+ required?: boolean;
54
+ }) => InputValueDefinitionNode;
55
+ EnumDefinition: (props: {
56
+ name: string;
57
+ required?: boolean;
58
+ values: string[];
59
+ }) => EnumTypeDefinitionNode;
60
+ FieldNodeDefinition: ({ name, type, args, list, required, }: {
61
+ name: string;
62
+ type: string | TypeDefinitionNode;
63
+ required?: boolean;
64
+ list?: boolean;
65
+ args?: InputValueDefinitionNode[];
66
+ }) => FieldNode;
67
+ FieldDefinition: ({ name, type, args, list, required, }: {
68
+ name: string;
69
+ type: string | TypeDefinitionNode;
70
+ required?: boolean;
71
+ list?: boolean;
72
+ args?: InputValueDefinitionNode[];
73
+ }) => FieldDefinitionNode;
74
+ InterfaceTypeDefinition: ({ name, fields, description, }: {
75
+ name: string;
76
+ description?: string;
77
+ fields: FieldDefinitionNode[];
78
+ }) => InterfaceTypeDefinitionNode;
79
+ InputObjectTypeDefinition: ({ name, fields, }: {
80
+ name: string;
81
+ fields: InputValueDefinitionNode[] | ObjectTypeDefinitionNode[];
82
+ }) => InputObjectTypeDefinitionNode;
83
+ UnionTypeDefinition: ({ name, types, }: {
84
+ name: string;
85
+ types: (string | TypeDefinitionNode)[];
86
+ }) => UnionTypeDefinitionNode;
87
+ NamedType: ({ name }: {
88
+ name: string;
89
+ }) => NamedTypeNode;
90
+ ObjectTypeDefinition: ({ name, fields, interfaces, directives, args, }: {
91
+ name: string;
92
+ fields: FieldDefinitionNode[];
93
+ interfaces?: NamedTypeNode[];
94
+ directives?: DirectiveNode[];
95
+ args?: NamedTypeNode[];
96
+ }) => ObjectTypeDefinitionNode;
97
+ FieldWithSelectionSetDefinition: ({ name, selections, }: {
98
+ name: string;
99
+ selections: SelectionNode[];
100
+ }) => {
101
+ name: {
102
+ kind: "Name";
103
+ value: string;
104
+ };
105
+ kind: "Field";
106
+ selectionSet: {
107
+ kind: "SelectionSet";
108
+ selections: SelectionNode[];
109
+ };
110
+ };
111
+ InlineFragmentDefinition: ({ name, selections, }: {
112
+ name: string;
113
+ selections: SelectionNode[];
114
+ }) => InlineFragmentNode;
115
+ FragmentDefinition: ({ name, fragmentName, selections, }: {
116
+ name: string;
117
+ fragmentName: string;
118
+ selections: SelectionNode[];
119
+ }) => FragmentDefinitionNode;
120
+ TYPES: {
121
+ Scalar: (type: scalarNames) => string;
122
+ MultiCollectionDocument: string;
123
+ CollectionDocumentUnion: string;
124
+ Folder: string;
125
+ String: string;
126
+ Password: string;
127
+ Reference: string;
128
+ Collection: string;
129
+ ID: string;
130
+ SystemInfo: string;
131
+ Boolean: string;
132
+ JSON: string;
133
+ Node: string;
134
+ PageInfo: string;
135
+ Connection: string;
136
+ Number: string;
137
+ Document: string;
138
+ };
139
+ QueryOperationDefinition: ({ queryName, fragName, }: {
140
+ queryName: string;
141
+ fragName: string;
142
+ }) => OperationDefinitionNode;
143
+ ListQueryOperationDefinition: ({ queryName, fragName, filterType, dataLayer, }: {
144
+ queryName: string;
145
+ fragName: string;
146
+ filterType: string;
147
+ dataLayer: boolean;
148
+ }) => OperationDefinitionNode;
149
+ toGraphQLAst: (ast: {
150
+ globalTemplates: TypeDefinitionNode[];
151
+ query: TypeDefinitionNode;
152
+ definitions: TypeDefinitionNode[];
153
+ }) => DocumentNode;
154
+ };
155
+ type scalarNames = 'string' | 'boolean' | 'datetime' | 'image' | 'text' | 'number';
156
+ export declare const extractInlineTypes: (item: TypeDefinitionNode | TypeDefinitionNode[]) => any;
157
+ export declare function walk(maybeNode: TypeDefinitionNode, visited?: WeakSet<WeakKey>): IterableIterator<TypeDefinitionNode>;
158
+ export declare function addNamespaceToSchema<T extends object | string>(maybeNode: T, namespace?: string[]): T;
159
+ export declare const NAMER: {
160
+ dataFilterTypeNameOn: (namespace: string[]) => string;
161
+ dataFilterTypeName: (namespace: string[]) => string;
162
+ dataMutationTypeNameOn: (namespace: string[]) => string;
163
+ dataMutationTypeName: (namespace: string[]) => string;
164
+ dataMutationUpdateTypeName: (namespace: string[]) => string;
165
+ updateName: (namespace: string[]) => string;
166
+ createName: (namespace: string[]) => string;
167
+ documentQueryName: () => string;
168
+ documentConnectionQueryName: () => string;
169
+ collectionQueryName: () => string;
170
+ collectionListQueryName: () => string;
171
+ queryName: (namespace: string[]) => string;
172
+ generateQueryListName: (namespace: string[]) => string;
173
+ fragmentName: (namespace: string[]) => string;
174
+ collectionTypeName: (namespace: string[]) => string;
175
+ documentTypeName: (namespace: string[]) => string;
176
+ dataTypeName: (namespace: string[]) => string;
177
+ referenceConnectionType: (namespace: string[]) => string;
178
+ referenceConnectionEdgesTypeName: (namespace: string[]) => string;
179
+ };
180
+ export {};
@@ -0,0 +1,22 @@
1
+ import { Collectable } from '@tinacms/schema-tools';
2
+ export type HashOptions = {
3
+ saltLength?: number;
4
+ keyLength?: number;
5
+ iterations?: number;
6
+ digest?: 'sha256' | 'sha512';
7
+ };
8
+ export declare const generatePasswordHash: ({ password, opts: { saltLength, keyLength, iterations, digest, }, }: {
9
+ password: string;
10
+ opts?: HashOptions;
11
+ }) => Promise<string>;
12
+ export declare const checkPasswordHash: ({ saltedHash, password, opts: { saltLength, keyLength, iterations, digest, }, }: {
13
+ saltedHash: string;
14
+ password: string;
15
+ opts?: HashOptions;
16
+ }) => Promise<boolean>;
17
+ export declare const mapUserFields: (collectable: Collectable, prefix?: string[]) => {
18
+ path: string[];
19
+ collectable: Collectable;
20
+ idFieldName?: string;
21
+ passwordFieldName?: string;
22
+ }[];
@@ -0,0 +1,18 @@
1
+ /**
2
+
3
+ */
4
+ import type { TinaSchema, Config } from '@tinacms/schema-tools';
5
+ export declare const buildDotTinaFiles: ({ config, flags, buildSDK, }: {
6
+ config: Config;
7
+ flags?: string[];
8
+ buildSDK?: boolean;
9
+ }) => Promise<{
10
+ graphQLSchema: {
11
+ kind: "Document";
12
+ definitions: any;
13
+ };
14
+ tinaSchema: TinaSchema;
15
+ lookup: Record<string, import("./database").LookupMapType>;
16
+ fragDoc: string;
17
+ queryDoc: string;
18
+ }>;
@@ -0,0 +1,268 @@
1
+ /**
2
+
3
+ */
4
+ import { LookupMapType } from '../database';
5
+ import type { ObjectTypeDefinitionNode, InlineFragmentNode, FieldDefinitionNode } from 'graphql';
6
+ import type { Collection, Template } from '@tinacms/schema-tools';
7
+ import { TinaSchema } from '@tinacms/schema-tools';
8
+ export declare const createBuilder: ({ tinaSchema, }: {
9
+ tinaSchema: TinaSchema;
10
+ }) => Promise<Builder>;
11
+ /**
12
+ * The builder class is responsible for creating GraphQL AST definitions
13
+ * for a given portion of the Tina schema. In some cases that will also mean
14
+ * storing a reference to how we can resolve that type when we come across it.
15
+ */
16
+ export declare class Builder {
17
+ config: {
18
+ tinaSchema: TinaSchema;
19
+ };
20
+ private maxDepth;
21
+ tinaSchema: TinaSchema;
22
+ lookupMap: Record<string, LookupMapType>;
23
+ constructor(config: {
24
+ tinaSchema: TinaSchema;
25
+ });
26
+ private addToLookupMap;
27
+ /**
28
+ * ```graphql
29
+ * # ex.
30
+ * {
31
+ * getCollection(collection: $collection) {
32
+ * name
33
+ * documents {...}
34
+ * }
35
+ * }
36
+ * ```
37
+ *
38
+ * @param collections
39
+ */
40
+ buildCollectionDefinition: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
41
+ /**
42
+ * ```graphql
43
+ * # ex.
44
+ * {
45
+ * getCollections {
46
+ * name
47
+ * documents {...}
48
+ * }
49
+ * }
50
+ * ```
51
+ *
52
+ * @param collections
53
+ */
54
+ buildMultiCollectionDefinition: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
55
+ /**
56
+ * ```graphql
57
+ * # ex.
58
+ * {
59
+ * node(id: $id) {
60
+ * id
61
+ * data {...}
62
+ * }
63
+ * }
64
+ * ```
65
+ */
66
+ multiNodeDocument: () => Promise<FieldDefinitionNode>;
67
+ /**
68
+ * ```graphql
69
+ * # ex.
70
+ * {
71
+ * getDocument(collection: $collection, relativePath: $relativePath) {
72
+ * id
73
+ * data {...}
74
+ * }
75
+ * }
76
+ * ```
77
+ *
78
+ * @param collections
79
+ */
80
+ multiCollectionDocument: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
81
+ /**
82
+ * ```graphql
83
+ * # ex.
84
+ * {
85
+ * addPendingDocument(collection: $collection, relativePath: $relativePath, params: $params) {
86
+ * id
87
+ * data {...}
88
+ * }
89
+ * }
90
+ * ```
91
+ *
92
+ * @param collections
93
+ */
94
+ addMultiCollectionDocumentMutation: () => Promise<FieldDefinitionNode>;
95
+ /**
96
+ * ```graphql
97
+ * # ex.
98
+ * {
99
+ * createDocument(relativePath: $relativePath, params: $params) {
100
+ * id
101
+ * data {...}
102
+ * }
103
+ * }
104
+ * ```
105
+ *
106
+ * @param collections
107
+ */
108
+ buildCreateCollectionDocumentMutation: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
109
+ /**
110
+ * ```graphql
111
+ * # ex.
112
+ * {
113
+ * updateDocument(relativePath: $relativePath, params: $params) {
114
+ * id
115
+ * data {...}
116
+ * }
117
+ * }
118
+ * ```
119
+ *
120
+ * @param collections
121
+ */
122
+ buildUpdateCollectionDocumentMutation: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
123
+ /**
124
+ * ```graphql
125
+ * # ex.
126
+ * {
127
+ * deleteDocument(relativePath: $relativePath, params: $params) {
128
+ * id
129
+ * data {...}
130
+ * }
131
+ * }
132
+ * ```
133
+ *
134
+ * @param collections
135
+ */
136
+ buildDeleteCollectionDocumentMutation: (collections: Collection<true>[]) => Promise<FieldDefinitionNode>;
137
+ /**
138
+ * ```graphql
139
+ * # ex.
140
+ * {
141
+ * createFolder(folderName: $folderName, params: $params) {
142
+ * id
143
+ * data {...}
144
+ * }
145
+ * }
146
+ * ```
147
+ *
148
+ * @param collections
149
+ */
150
+ buildCreateCollectionFolderMutation: () => Promise<FieldDefinitionNode>;
151
+ /**
152
+ * ```graphql
153
+ * # ex.
154
+ * {
155
+ * getPostDocument(relativePath: $relativePath) {
156
+ * id
157
+ * data {...}
158
+ * }
159
+ * }
160
+ * ```
161
+ *
162
+ * @param collection
163
+ */
164
+ collectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
165
+ authenticationCollectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
166
+ updatePasswordMutation: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
167
+ authorizationCollectionDocument: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
168
+ /**
169
+ * Turns a collection into a fragment that gets updated on build. This fragment does not resolve references
170
+ * ```graphql
171
+ * # ex.
172
+ * fragment AuthorsParts on Authors {
173
+ * name
174
+ * avatar
175
+ * ...
176
+ * }
177
+ * ```
178
+ *
179
+ * @public
180
+ * @param collection a Tina Cloud collection
181
+ */
182
+ collectionFragment: (collection: Collection<true>) => Promise<import("graphql").FragmentDefinitionNode>;
183
+ /**
184
+ * Given a collection this function returns its selections set. For example for Post this would return
185
+ *
186
+ * "
187
+ * body
188
+ * title
189
+ * ... on Author {
190
+ * name
191
+ * heroImg
192
+ * }
193
+ *
194
+ * But in the AST format
195
+ *
196
+ * */
197
+ private _getCollectionFragmentSelections;
198
+ private _buildFieldNodeForFragments;
199
+ buildTemplateFragments(template: Template<true>, depth: number): Promise<InlineFragmentNode | boolean>;
200
+ /**
201
+ * ```graphql
202
+ * # ex.
203
+ * mutation {
204
+ * updatePostDocument(relativePath: $relativePath, params: $params) {
205
+ * id
206
+ * data {...}
207
+ * }
208
+ * }
209
+ * ```
210
+ *
211
+ * @param collection
212
+ */
213
+ updateCollectionDocumentMutation: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
214
+ /**
215
+ * ```graphql
216
+ * # ex.
217
+ * mutation {
218
+ * createPostDocument(relativePath: $relativePath, params: $params) {
219
+ * id
220
+ * data {...}
221
+ * }
222
+ * }
223
+ * ```
224
+ *
225
+ * @param collection
226
+ */
227
+ createCollectionDocumentMutation: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
228
+ /**
229
+ * ```graphql
230
+ * # ex.
231
+ * {
232
+ * getPostList(first: 10) {
233
+ * edges {
234
+ * node {
235
+ * id
236
+ * }
237
+ * }
238
+ * }
239
+ * }
240
+ * ```
241
+ *
242
+ * @param collection
243
+ */
244
+ collectionDocumentList: (collection: Collection<true>) => Promise<FieldDefinitionNode>;
245
+ /**
246
+ * GraphQL type definitions which remain unchanged regardless
247
+ * of the supplied Tina schema. Ex. "node" interface
248
+ */
249
+ buildStaticDefinitions: () => (import("graphql").ScalarTypeDefinitionNode | ObjectTypeDefinitionNode | import("graphql").InterfaceTypeDefinitionNode[])[];
250
+ private _buildCollectionDocumentType;
251
+ private _buildAuthDocumentType;
252
+ private _filterCollectionDocumentType;
253
+ private _buildTemplateFilter;
254
+ private _updateCollectionDocumentMutationType;
255
+ private _buildTemplateMutation;
256
+ private _buildMultiCollectionDocumentDefinition;
257
+ private _buildMultiCollectionDocumentListDefinition;
258
+ private _buildFieldFilter;
259
+ private _buildFieldMutation;
260
+ private _buildReferenceMutation;
261
+ private _buildPasswordMutation;
262
+ private _buildUpdateDocumentMutationParams;
263
+ private _buildObjectOrUnionData;
264
+ private _connectionFilterBuilder;
265
+ private _connectionFieldBuilder;
266
+ private _buildDataField;
267
+ private _buildTemplateData;
268
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+
3
+ */
4
+ export declare const staticDefinitions: (import("graphql").ScalarTypeDefinitionNode | import("graphql").ObjectTypeDefinitionNode | import("graphql").InterfaceTypeDefinitionNode[])[];
@@ -0,0 +1,3 @@
1
+ import { Template } from '@tinacms/schema-tools/src';
2
+ export declare const replaceNameOverrides: (template: Template, obj: any) => object;
3
+ export declare const applyNameOverrides: (template: Template, obj: any) => object;