UNPKG

1.79 kBTypeScriptView Raw
1import Table, { KeySchema } from 'cloudform-types/types/dynamoDb/table';
2import Resolver from 'cloudform-types/types/appSync/resolver';
3import Template from 'cloudform-types/types/template';
4import { ObjectTypeDefinitionNode, InterfaceTypeDefinitionNode } from 'graphql';
5import { ObjectNode } from 'graphql-mapping-template';
6export declare class ResourceFactory {
7 makeParams(): {};
8 initTemplate(): Template;
9 updateTableForConnection(table: Table, connectionName: string, connectionAttributeName: string, sortField?: {
10 name: string;
11 type: string;
12 }): Table;
13 makeGetItemConnectionResolver(type: string, field: string, relatedType: string, connectionAttribute: string, idFieldName: string, sortFieldInfo?: {
14 primarySortFieldName: string;
15 sortFieldName: string;
16 sortFieldIsStringLike: boolean;
17 }): Resolver;
18 makeQueryConnectionResolver(type: string, field: string, relatedType: string, connectionAttribute: string, connectionName: string, idFieldName: string, sortKeyInfo?: {
19 fieldName: string;
20 attributeType: 'S' | 'B' | 'N';
21 }, limit?: number): Resolver;
22 makeGetItemConnectionWithKeyResolver(type: string, field: string, relatedType: string, connectionAttributes: string[], keySchema: KeySchema[]): Resolver;
23 makeQueryConnectionWithKeyResolver(type: string, field: string, relatedType: ObjectTypeDefinitionNode | InterfaceTypeDefinitionNode, connectionAttributes: string[], keySchema: KeySchema[], indexName: string, limit?: number): Resolver;
24 makeExpression(keySchema: KeySchema[], connectionAttributes: string[]): ObjectNode;
25 private condenseRangeKey;
26 makeCompositeSortKeyName(sortKeyName: string): string;
27 private getSortKeyNames;
28}
29//# sourceMappingURL=resources.d.ts.map
\No newline at end of file