diff --git a/src/components/ApiDocs/ApiComment.tsx b/src/components/ApiDocs/ApiComment.tsx index ebe172f6463..15c4d69dc32 100644 --- a/src/components/ApiDocs/ApiComment.tsx +++ b/src/components/ApiDocs/ApiComment.tsx @@ -1,6 +1,7 @@ import { Fragment } from 'react'; import { View } from '@aws-amplify/ui-react'; import { parseMarkdownLinks, parseMarkdown } from '@/utils/parseMdxLinks'; +import { MDXCode } from '../MDXComponents'; interface ApiCommentProps { apiComment?: any[]; @@ -15,6 +16,23 @@ export const ApiComment = ({ apiComment, codeBlock }: ApiCommentProps) => { } const commentList = apiComment.map((snippet, idx) => { if (snippet.kind === 'code') { + if (snippet.text.indexOf('```') !== -1) { + // If the comment contains a code block extract the language and render an MDXCode component + let text = snippet.text; + const regex = /(?<=```)([^\n```]*)/; + const lang = text.match(regex)[0]; + if (lang) { + text = text.replaceAll('```' + lang, '').replaceAll('```', ''); + } + return ( + + ); + } return {snippet.text.replaceAll('`', '')}; } else { const text = snippet.text; diff --git a/src/components/ApiDocs/display/ParameterType.tsx b/src/components/ApiDocs/display/ParameterType.tsx index 9567a66e724..dc0042ff7e2 100644 --- a/src/components/ApiDocs/display/ParameterType.tsx +++ b/src/components/ApiDocs/display/ParameterType.tsx @@ -1,11 +1,10 @@ import { View } from '@aws-amplify/ui-react'; import { TypeLink } from './TypeLink'; -import { LinkDataType } from './TypeLink'; import React from 'react'; import references from '@/directory/apiReferences.json'; interface typeDataType { - typeArguments?: LinkDataType[]; + typeArguments?: typeDataType[]; type: string | typeDataType; kind: number; types?: []; @@ -43,15 +42,19 @@ export const ParameterType = ({ typeData }: ParameterComponentType) => { // adds type arguments to an array to be rendered const addTypeArgs = ( - typeArgs: LinkDataType[], + typeArgs: typeDataType[], displayArray: TypeArguments ): TypeArguments => { const typeArgArray = typeArgs.reduce((acc, tArg, index) => { let retValue; if (index === 0) { - retValue = []; + retValue = []; } else { - retValue = [...acc, ', ', ]; + retValue = [ + ...acc, + ', ', + + ]; } if (tArg?.typeArguments?.length) { addTypeArgs(tArg.typeArguments, retValue); diff --git a/src/data/api-categories.mjs b/src/data/api-categories.mjs index 9bbdbfbfaa0..705bf7e440a 100644 --- a/src/data/api-categories.mjs +++ b/src/data/api-categories.mjs @@ -1,7 +1,8 @@ // mapping of api categories coming in from libraries to the associated categories in the docs export const API_CATEGORIES = { auth: 'auth', - storage: 'storage' + storage: 'storage', + data: 'datastore' }; export const API_SUB_CATEGORIES = { diff --git a/src/directory/apiReferences.json b/src/directory/apiReferences.json index 77fbff8e688..70781c407bb 100644 --- a/src/directory/apiReferences.json +++ b/src/directory/apiReferences.json @@ -162,6 +162,62 @@ "isExternal": true } }, + "208": { + "id": 208, + "name": "Readonly", + "variant": "declaration", + "kind": 2097152, + "flags": { + "isExternal": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Make all properties in T readonly" + } + ] + }, + "typeParameters": [ + 209 + ], + "type": { + "type": "mapped", + "parameter": "P", + "parameterType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "target": 209, + "name": "T", + "package": "typescript", + "refersToTypeParameter": true + } + }, + "templateType": { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "P" + }, + "name": "P", + "package": "typescript", + "refersToTypeParameter": true + }, + "objectType": { + "type": "reference", + "target": 209, + "name": "T", + "package": "typescript", + "refersToTypeParameter": true + } + }, + "readonlyModifier": "+" + } + }, "210": { "id": 210, "name": "StorageAccessLevel", @@ -14483,6 +14539,3422 @@ "name": "string" } }, + "2204": { + "id": 2204, + "name": "datastore", + "variant": "declaration", + "kind": 2, + "flags": {}, + "children": [ + { + "id": 3763, + "name": "initSchema", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3764 + ] + }, + { + "id": 3766, + "name": "syncExpression", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3767 + ] + } + ], + "groups": [ + { + "title": "Modules", + "children": [ + 2205 + ] + }, + { + "title": "Namespaces", + "children": [ + 2896 + ] + }, + { + "title": "Enumerations", + "children": [ + 2909, + 2912, + 2927, + 2930, + 2936, + 2942, + 2947, + 2952, + 2956, + 2960, + 2963 + ] + }, + { + "title": "Classes", + "children": [ + 2966, + 2979, + 3054, + 3137, + 3167, + 3184, + 3187 + ] + }, + { + "title": "Interfaces", + "children": [ + 3192, + 3194, + 3198, + 3205, + 3214, + 3218, + 3243, + 3247, + 3252, + 3259, + 3263, + 3270, + 3273, + 3276, + 3281, + 3289, + 3298, + 3307, + 3310, + 3314, + 3319, + 3321, + 3326, + 3338, + 3342, + 3362, + 3367, + 3371, + 3376, + 3383, + 3390, + 3393, + 3397, + 3442, + 3448, + 3460, + 3477 + ] + }, + { + "title": "Type Aliases", + "children": [ + 3484, + 3485, + 3486, + 3490, + 3491, + 3497, + 3501, + 3504, + 3508, + 3512, + 3513, + 3518, + 3519, + 3526, + 3528, + 3533, + 3536, + 3539, + 3542, + 3545, + 3546, + 3552, + 3553, + 3558, + 3561, + 3562, + 3563, + 3564, + 3565, + 3569, + 3573, + 3574, + 3575, + 3577, + 3582, + 3587, + 3592, + 3597, + 3601, + 3605, + 3610, + 3612, + 3614, + 3620, + 3621, + 3628, + 3630, + 3635, + 3640, + 3646, + 3651, + 3656, + 3661, + 3666, + 3670, + 3672, + 3673, + 3674, + 3677, + 3678, + 3679, + 3681, + 3683, + 3689, + 3691, + 3693, + 3699, + 3700, + 3706, + 3716 + ] + }, + { + "title": "Variables", + "children": [ + 3718, + 3719, + 3720, + 3721, + 3722 + ] + }, + { + "title": "Functions", + "children": [ + 3763, + 3766 + ] + } + ] + }, + "2729": { + "id": 2729, + "name": "AssociatedWith", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 2730, + 2731, + 2732, + 2733 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 2730, + 2731, + 2732, + 2733 + ] + } + ] + }, + "2730": { + "id": 2730, + "name": "associatedWith", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + }, + "2731": { + "id": 2731, + "name": "connectionType", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "HAS_ONE" + }, + { + "type": "literal", + "value": "HAS_MANY" + } + ] + } + }, + "2732": { + "id": 2732, + "name": "targetName", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "2733": { + "id": 2733, + "name": "targetNames", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "2753": { + "id": 2753, + "name": "EnumFieldType", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 2754 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 2754 + ] + } + ] + }, + "2754": { + "id": 2754, + "name": "enum", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "2810": { + "id": 2810, + "name": "SchemaEnum", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 2811, + 2812 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 2811, + 2812 + ] + } + ] + }, + "2811": { + "id": 2811, + "name": "name", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "2812": { + "id": 2812, + "name": "values", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "2813": { + "id": 2813, + "name": "TargetNameAssociation", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 2814, + 2815, + 2816 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 2814, + 2815, + 2816 + ] + } + ] + }, + "2814": { + "id": 2814, + "name": "connectionType", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "literal", + "value": "BELONGS_TO" + } + }, + "2815": { + "id": 2815, + "name": "targetName", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "2816": { + "id": 2816, + "name": "targetNames", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "2833": { + "id": 2833, + "name": "ConditionProducer", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 2834, + 2835 + ], + "type": { + "type": "reflection", + "declaration": { + "id": 2836, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "signatures": [ + 2837 + ] + } + } + }, + "2861": { + "id": 2861, + "name": "Option", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 2862 + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "target": 2863, + "name": "Option0", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 2864, + "typeArguments": [ + { + "type": "reference", + "target": 2862, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "Option1", + "package": "@aws-amplify/datastore" + } + ] + } + }, + "2862": { + "id": 2862, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": 3620, + "name": "PersistentModel", + "package": "@aws-amplify/datastore" + } + }, + "2863": { + "id": 2863, + "name": "Option0", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "tuple" + } + }, + "2864": { + "id": 2864, + "name": "Option1", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 2865 + ], + "type": { + "type": "tuple", + "elements": [ + { + "type": "union", + "types": [ + { + "type": "reference", + "target": 3700, + "typeArguments": [ + { + "type": "reference", + "target": 2865, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "V5ModelPredicate", + "package": "@aws-amplify/datastore" + }, + { + "type": "intrinsic", + "name": "undefined" + } + ] + } + ] + } + }, + "2881": { + "id": 2881, + "name": "SchemaEnums", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": 2810, + "name": "SchemaEnum", + "package": "@aws-amplify/datastore" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3270": { + "id": 3270, + "name": "KeyType", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3271, + 3272 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3271, + 3272 + ] + } + ] + }, + "3271": { + "id": 3271, + "name": "compositeKeys", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es2015.collection.d.ts", + "qualifiedName": "Set" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + } + ], + "name": "Set", + "package": "typescript" + } + } + }, + "3272": { + "id": 3272, + "name": "primaryKey", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "3273": { + "id": 3273, + "name": "ModelAttribute", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3274, + 3275 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3274, + 3275 + ] + } + ] + }, + "3274": { + "id": 3274, + "name": "properties", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3275": { + "id": 3275, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3298": { + "id": 3298, + "name": "ModelField", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3299, + 3300, + 3301, + 3302, + 3303, + 3304, + 3305, + 3306 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3299, + 3300, + 3301, + 3302, + 3303, + 3304, + 3305, + 3306 + ] + } + ] + }, + "3299": { + "id": 3299, + "name": "association", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3561, + "name": "ModelAssociation", + "package": "@aws-amplify/datastore" + } + }, + "3300": { + "id": 3300, + "name": "attributes", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 3562, + "name": "ModelAttributes", + "package": "@aws-amplify/datastore" + } + } + }, + "3301": { + "id": 3301, + "name": "isArray", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + "3302": { + "id": 3302, + "name": "isArrayNullable", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + "3303": { + "id": 3303, + "name": "isReadOnly", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + "3304": { + "id": 3304, + "name": "isRequired", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + "3305": { + "id": 3305, + "name": "name", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3306": { + "id": 3306, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "ID" + }, + { + "type": "literal", + "value": "String" + }, + { + "type": "literal", + "value": "Int" + }, + { + "type": "literal", + "value": "Float" + }, + { + "type": "literal", + "value": "Boolean" + }, + { + "type": "literal", + "value": "AWSDate" + }, + { + "type": "literal", + "value": "AWSTime" + }, + { + "type": "literal", + "value": "AWSDateTime" + }, + { + "type": "literal", + "value": "AWSTimestamp" + }, + { + "type": "literal", + "value": "AWSEmail" + }, + { + "type": "literal", + "value": "AWSJSON" + }, + { + "type": "literal", + "value": "AWSURL" + }, + { + "type": "literal", + "value": "AWSPhone" + }, + { + "type": "literal", + "value": "AWSIPAddress" + }, + { + "type": "reference", + "target": 3307, + "name": "ModelFieldType", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 3319, + "name": "NonModelFieldType", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 2753, + "name": "EnumFieldType", + "package": "@aws-amplify/datastore" + } + ] + } + }, + "3307": { + "id": 3307, + "name": "ModelFieldType", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3308, + 3309 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3308, + 3309 + ] + } + ] + }, + "3308": { + "id": 3308, + "name": "model", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3309": { + "id": 3309, + "name": "modelConstructor", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3314, + "typeArguments": [ + { + "type": "reference", + "target": 208, + "typeArguments": [ + { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + ], + "name": "Readonly", + "package": "typescript" + } + ], + "name": "ModelMeta", + "package": "@aws-amplify/datastore" + } + }, + "3314": { + "id": 3314, + "name": "ModelMeta", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3315, + 3316, + 3317 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3315, + 3316, + 3317 + ] + } + ], + "typeParameters": [ + 3318 + ] + }, + "3315": { + "id": 3315, + "name": "builder", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3326, + "typeArguments": [ + { + "type": "reference", + "target": 3318, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "ModelMeta.T", + "refersToTypeParameter": true + } + ], + "name": "PersistentModelConstructor", + "package": "@aws-amplify/datastore" + } + }, + "3316": { + "id": 3316, + "name": "pkField", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "3317": { + "id": 3317, + "name": "schema", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3383, + "name": "SchemaModel", + "package": "@aws-amplify/datastore" + } + }, + "3318": { + "id": 3318, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": 3620, + "name": "PersistentModel", + "package": "@aws-amplify/datastore" + } + }, + "3319": { + "id": 3319, + "name": "NonModelFieldType", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3320 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3320 + ] + } + ] + }, + "3320": { + "id": 3320, + "name": "nonModel", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3326": { + "id": 3326, + "name": "PersistentModelConstructor", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3327, + 3330 + ], + "groups": [ + { + "title": "Constructors", + "children": [ + 3327 + ] + }, + { + "title": "Methods", + "children": [ + 3330 + ] + } + ], + "typeParameters": [ + 3337 + ] + }, + "3327": { + "id": 3327, + "name": "constructor", + "variant": "declaration", + "kind": 512, + "flags": {}, + "signatures": [ + 3328 + ] + }, + "3328": { + "id": 3328, + "name": "new PersistentModelConstructor", + "variant": "signature", + "kind": 16384, + "flags": {}, + "parameters": [ + 3329 + ], + "type": { + "type": "reference", + "target": 3337, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelConstructor.T", + "refersToTypeParameter": true + } + }, + "3329": { + "id": 3329, + "name": "init", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 3565, + "typeArguments": [ + { + "type": "reference", + "target": 3337, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelConstructor.T", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3338, + "typeArguments": [ + { + "type": "reference", + "target": 3337, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelConstructor.T", + "refersToTypeParameter": true + } + ], + "name": "PersistentModelMetaData", + "package": "@aws-amplify/datastore" + } + ], + "name": "ModelInit", + "package": "@aws-amplify/datastore" + } + }, + "3330": { + "id": 3330, + "name": "copyOf", + "variant": "declaration", + "kind": 2048, + "flags": {}, + "signatures": [ + 3331 + ] + }, + "3331": { + "id": 3331, + "name": "copyOf", + "variant": "signature", + "kind": 4096, + "flags": {}, + "parameters": [ + 3332, + 3333 + ], + "type": { + "type": "reference", + "target": 3337, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelConstructor.T", + "refersToTypeParameter": true + } + }, + "3332": { + "id": 3332, + "name": "src", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 3337, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelConstructor.T", + "refersToTypeParameter": true + } + }, + "3333": { + "id": 3333, + "name": "mutator", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reflection", + "declaration": { + "id": 3334, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "signatures": [ + 3335 + ] + } + } + }, + "3337": { + "id": 3337, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": 3620, + "name": "PersistentModel", + "package": "@aws-amplify/datastore" + } + }, + "3338": { + "id": 3338, + "name": "PersistentModelMetaData", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3339, + 3340 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3339, + 3340 + ] + } + ], + "typeParameters": [ + 3341 + ] + }, + "3339": { + "id": 3339, + "name": "identifier", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3526, + "typeArguments": [ + { + "type": "reference", + "target": 3341, + "name": "T", + "package": "@aws-amplify/datastore", + "qualifiedName": "PersistentModelMetaData.T", + "refersToTypeParameter": true + } + ], + "name": "Identifier", + "package": "@aws-amplify/datastore" + } + }, + "3340": { + "id": 3340, + "name": "readOnlyFields", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3341": { + "id": 3341, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3376": { + "id": 3376, + "name": "RelationType", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3377, + 3378, + 3379, + 3380, + 3381, + 3382 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3377, + 3378, + 3379, + 3380, + 3381, + 3382 + ] + } + ] + }, + "3377": { + "id": 3377, + "name": "associatedWith", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "union", + "types": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + ] + } + }, + "3378": { + "id": 3378, + "name": "fieldName", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3379": { + "id": 3379, + "name": "modelName", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3380": { + "id": 3380, + "name": "relationType", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "literal", + "value": "HAS_ONE" + }, + { + "type": "literal", + "value": "HAS_MANY" + }, + { + "type": "literal", + "value": "BELONGS_TO" + } + ] + } + }, + "3381": { + "id": 3381, + "name": "targetName", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3382": { + "id": 3382, + "name": "targetNames", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + }, + "3383": { + "id": 3383, + "name": "SchemaModel", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3384, + 3385, + 3386, + 3387, + 3388, + 3389 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3384, + 3385, + 3386, + 3387, + 3388, + 3389 + ] + } + ] + }, + "3384": { + "id": 3384, + "name": "allFields", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Explicitly defined fields plus implied fields. (E.g., foreign keys.)" + } + ] + }, + "type": { + "type": "reference", + "target": 3564, + "name": "ModelFields", + "package": "@aws-amplify/datastore" + } + }, + "3385": { + "id": 3385, + "name": "attributes", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3562, + "name": "ModelAttributes", + "package": "@aws-amplify/datastore" + } + }, + "3386": { + "id": 3386, + "name": "fields", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Explicitly defined fields." + } + ] + }, + "type": { + "type": "reference", + "target": 3564, + "name": "ModelFields", + "package": "@aws-amplify/datastore" + } + }, + "3387": { + "id": 3387, + "name": "name", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3388": { + "id": 3388, + "name": "pluralName", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3389": { + "id": 3389, + "name": "syncable", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "intrinsic", + "name": "boolean" + } + }, + "3390": { + "id": 3390, + "name": "SchemaNonModel", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3391, + 3392 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3391, + 3392 + ] + } + ] + }, + "3391": { + "id": 3391, + "name": "fields", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3564, + "name": "ModelFields", + "package": "@aws-amplify/datastore" + } + }, + "3392": { + "id": 3392, + "name": "name", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3477": { + "id": 3477, + "name": "UserSchema", + "variant": "declaration", + "kind": 256, + "flags": {}, + "children": [ + 3478, + 3479, + 3480, + 3481, + 3482, + 3483 + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3478, + 3479, + 3480, + 3481, + 3482, + 3483 + ] + } + ] + }, + "3478": { + "id": 3478, + "name": "enums", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 2881, + "name": "SchemaEnums", + "package": "@aws-amplify/datastore" + } + }, + "3479": { + "id": 3479, + "name": "keys", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3574, + "name": "ModelKeys", + "package": "@aws-amplify/datastore" + } + }, + "3480": { + "id": 3480, + "name": "modelTopologicalOrdering", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es2015.collection.d.ts", + "qualifiedName": "Map" + }, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + } + ], + "name": "Map", + "package": "typescript" + } + }, + "3481": { + "id": 3481, + "name": "models", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3673, + "name": "SchemaModels", + "package": "@aws-amplify/datastore" + } + }, + "3482": { + "id": 3482, + "name": "nonModels", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3678, + "name": "SchemaNonModels", + "package": "@aws-amplify/datastore" + } + }, + "3483": { + "id": 3483, + "name": "relationships", + "variant": "declaration", + "kind": 1024, + "flags": { + "isOptional": true + }, + "type": { + "type": "reference", + "target": 3666, + "name": "RelationshipType", + "package": "@aws-amplify/datastore" + } + }, + "3491": { + "id": 3491, + "name": "CompositeIdentifier", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3492, + 3493 + ], + "type": { + "type": "reference", + "target": 3528, + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 3494, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3495, + "name": "fields", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3493, + "name": "K", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + { + "id": 3496, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3492, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3495, + 3496 + ] + } + ] + } + }, + { + "type": "literal", + "value": "CompositeIdentifier" + } + ], + "name": "IdentifierBrand", + "package": "@aws-amplify/datastore" + } + }, + "3492": { + "id": 3492, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3493": { + "id": 3493, + "name": "K", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "target": 3492, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + } + } + }, + "3495": { + "id": 3495, + "name": "fields", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3493, + "name": "K", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + "3496": { + "id": 3496, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3492, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + "3501": { + "id": 3501, + "name": "CustomIdentifier", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3502, + 3503 + ], + "type": { + "type": "reference", + "target": 3491, + "typeArguments": [ + { + "type": "reference", + "target": 3502, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "tuple", + "elements": [ + { + "type": "reference", + "target": 3503, + "name": "K", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ] + } + ], + "name": "CompositeIdentifier", + "package": "@aws-amplify/datastore" + } + }, + "3502": { + "id": 3502, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3504": { + "id": 3504, + "name": "DataStoreSchema", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "intersection", + "types": [ + { + "type": "reference", + "target": 3477, + "name": "UserSchema", + "package": "@aws-amplify/datastore" + }, + { + "type": "reflection", + "declaration": { + "id": 3505, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3506, + "name": "codegenVersion", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + { + "id": 3507, + "name": "version", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3506, + 3507 + ] + } + ] + } + } + ] + } + }, + "3506": { + "id": 3506, + "name": "codegenVersion", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3507": { + "id": 3507, + "name": "version", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "intrinsic", + "name": "string" + } + }, + "3526": { + "id": 3526, + "name": "Identifier", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3527 + ], + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "target": 3546, + "typeArguments": [ + { + "type": "reference", + "target": 3527, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "ManagedIdentifier", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 3614, + "typeArguments": [ + { + "type": "reference", + "target": 3527, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "OptionallyManagedIdentifier", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 3491, + "typeArguments": [ + { + "type": "reference", + "target": 3527, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "CompositeIdentifier", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 3501, + "typeArguments": [ + { + "type": "reference", + "target": 3527, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "CustomIdentifier", + "package": "@aws-amplify/datastore" + } + ] + } + }, + "3527": { + "id": 3527, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3528": { + "id": 3528, + "name": "IdentifierBrand", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3529, + 3530 + ], + "type": { + "type": "intersection", + "types": [ + { + "type": "reference", + "target": 3529, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reflection", + "declaration": { + "id": 3531, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3532, + "name": "[___identifierBrand__]", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3530, + "name": "K", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3532 + ] + } + ] + } + } + ] + } + }, + "3529": { + "id": 3529, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3530": { + "id": 3530, + "name": "K", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3532": { + "id": 3532, + "name": "[___identifierBrand__]", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3530, + "name": "K", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + "3545": { + "id": 3545, + "name": "IndexesType", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "tuple", + "elements": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "array", + "elementType": { + "type": "intrinsic", + "name": "string" + } + }, + { + "type": "optional", + "elementType": { + "type": "reference", + "target": 2767, + "name": "IndexOptions", + "package": "@aws-amplify/datastore" + } + } + ] + } + } + }, + "3546": { + "id": 3546, + "name": "ManagedIdentifier", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3547, + 3548 + ], + "type": { + "type": "reference", + "target": 3528, + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 3549, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3550, + "name": "field", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "conditional", + "checkType": { + "type": "reference", + "target": 3548, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "extendsType": { + "type": "intrinsic", + "name": "string" + }, + "trueType": { + "type": "reference", + "target": 3548, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + } + }, + { + "id": 3551, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3547, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3550, + 3551 + ] + } + ] + } + }, + { + "type": "literal", + "value": "ManagedIdentifier" + } + ], + "name": "IdentifierBrand", + "package": "@aws-amplify/datastore" + } + }, + "3547": { + "id": 3547, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3550": { + "id": 3550, + "name": "field", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "conditional", + "checkType": { + "type": "reference", + "target": 3548, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "extendsType": { + "type": "intrinsic", + "name": "string" + }, + "trueType": { + "type": "reference", + "target": 3548, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + } + }, + "3551": { + "id": 3551, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3547, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + "3561": { + "id": 3561, + "name": "ModelAssociation", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "union", + "types": [ + { + "type": "reference", + "target": 2729, + "name": "AssociatedWith", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 2813, + "name": "TargetNameAssociation", + "package": "@aws-amplify/datastore" + } + ] + } + }, + "3562": { + "id": 3562, + "name": "ModelAttributes", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 3273, + "name": "ModelAttribute", + "package": "@aws-amplify/datastore" + } + } + }, + "3564": { + "id": 3564, + "name": "ModelFields", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": 3298, + "name": "ModelField", + "package": "@aws-amplify/datastore" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3565": { + "id": 3565, + "name": "ModelInit", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3566, + 3567 + ], + "type": { + "type": "intersection", + "types": [ + { + "type": "mapped", + "parameter": "P", + "parameterType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "target": 2859, + "typeArguments": [ + { + "type": "reference", + "target": 3569, + "typeArguments": [ + { + "type": "reference", + "target": 3566, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3567, + "name": "M", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ModelInitBase", + "package": "@aws-amplify/datastore" + } + ], + "name": "OmitOptionalRelatives", + "package": "@aws-amplify/datastore" + } + }, + "templateType": { + "type": "reference", + "target": 3679, + "typeArguments": [ + { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "target": { + "sourceFileName": "packages/datastore/dist/esm/types.d.ts", + "qualifiedName": "P" + }, + "name": "P", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "objectType": { + "type": "reference", + "target": 3569, + "typeArguments": [ + { + "type": "reference", + "target": 3566, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3567, + "name": "M", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ModelInitBase", + "package": "@aws-amplify/datastore" + } + } + ], + "name": "SettableFieldType", + "package": "@aws-amplify/datastore" + } + }, + { + "type": "mapped", + "parameter": "P", + "parameterType": { + "type": "typeOperator", + "operator": "keyof", + "target": { + "type": "reference", + "target": 2868, + "typeArguments": [ + { + "type": "reference", + "target": 3569, + "typeArguments": [ + { + "type": "reference", + "target": 3566, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3567, + "name": "M", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ModelInitBase", + "package": "@aws-amplify/datastore" + } + ], + "name": "PickOptionalRelatives", + "package": "@aws-amplify/datastore" + } + }, + "templateType": { + "type": "reference", + "target": 3679, + "typeArguments": [ + { + "type": "indexedAccess", + "indexType": { + "type": "reference", + "target": { + "sourceFileName": "packages/datastore/dist/esm/types.d.ts", + "qualifiedName": "P" + }, + "name": "P", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "objectType": { + "type": "reference", + "target": 3569, + "typeArguments": [ + { + "type": "reference", + "target": 3566, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3567, + "name": "M", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ModelInitBase", + "package": "@aws-amplify/datastore" + } + } + ], + "name": "SettableFieldType", + "package": "@aws-amplify/datastore" + }, + "optionalModifier": "+" + } + ] + } + }, + "3574": { + "id": 3574, + "name": "ModelKeys", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": 3270, + "name": "KeyType", + "package": "@aws-amplify/datastore" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3605": { + "id": 3605, + "name": "NonModelTypeConstructor", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3606 + ], + "type": { + "type": "reflection", + "declaration": { + "id": 3607, + "name": "__type", + "variant": "declaration", + "kind": 512, + "flags": {}, + "signatures": [ + 3608 + ] + } + } + }, + "3614": { + "id": 3614, + "name": "OptionallyManagedIdentifier", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "typeParameters": [ + 3615, + 3616 + ], + "type": { + "type": "reference", + "target": 3528, + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 3617, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3618, + "name": "field", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "conditional", + "checkType": { + "type": "reference", + "target": 3616, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "extendsType": { + "type": "intrinsic", + "name": "string" + }, + "trueType": { + "type": "reference", + "target": 3616, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + } + }, + { + "id": 3619, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3615, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3618, + 3619 + ] + } + ] + } + }, + { + "type": "literal", + "value": "OptionallyManagedIdentifier" + } + ], + "name": "IdentifierBrand", + "package": "@aws-amplify/datastore" + } + }, + "3615": { + "id": 3615, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {} + }, + "3618": { + "id": 3618, + "name": "field", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "conditional", + "checkType": { + "type": "reference", + "target": 3616, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "extendsType": { + "type": "intrinsic", + "name": "string" + }, + "trueType": { + "type": "reference", + "target": 3616, + "name": "F", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + "falseType": { + "type": "intrinsic", + "name": "never" + } + } + }, + "3619": { + "id": 3619, + "name": "type", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3615, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + }, + "3620": { + "id": 3620, + "name": "PersistentModel", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 208, + "typeArguments": [ + { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + ], + "name": "Readonly", + "package": "typescript" + } + }, + "3666": { + "id": 3666, + "name": "RelationshipType", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reflection", + "declaration": { + "id": 3667, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3668, + "name": "indexes", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3545, + "name": "IndexesType", + "package": "@aws-amplify/datastore" + } + }, + { + "id": 3669, + "name": "relationTypes", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 3376, + "name": "RelationType", + "package": "@aws-amplify/datastore" + } + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3668, + 3669 + ] + } + ] + } + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3668": { + "id": 3668, + "name": "indexes", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3545, + "name": "IndexesType", + "package": "@aws-amplify/datastore" + } + }, + "3669": { + "id": 3669, + "name": "relationTypes", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "array", + "elementType": { + "type": "reference", + "target": 3376, + "name": "RelationType", + "package": "@aws-amplify/datastore" + } + } + }, + "3673": { + "id": 3673, + "name": "SchemaModels", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": 3383, + "name": "SchemaModel", + "package": "@aws-amplify/datastore" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3678": { + "id": 3678, + "name": "SchemaNonModels", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "reference", + "target": 3390, + "name": "SchemaNonModel", + "package": "@aws-amplify/datastore" + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3699": { + "id": 3699, + "name": "TypeConstructorMap", + "variant": "declaration", + "kind": 2097152, + "flags": {}, + "type": { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "union", + "types": [ + { + "type": "reference", + "target": 3326, + "typeArguments": [ + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "PersistentModelConstructor", + "package": "@aws-amplify/datastore" + }, + { + "type": "reference", + "target": 3605, + "typeArguments": [ + { + "type": "intrinsic", + "name": "unknown" + } + ], + "name": "NonModelTypeConstructor", + "package": "@aws-amplify/datastore" + } + ] + } + ], + "name": "Record", + "package": "typescript" + } + }, + "3763": { + "id": 3763, + "name": "initSchema", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3764 + ] + }, + "3764": { + "id": 3764, + "name": "initSchema", + "variant": "signature", + "kind": 4096, + "flags": {}, + "parameters": [ + 3765 + ], + "type": { + "type": "reference", + "target": 3699, + "name": "TypeConstructorMap", + "package": "@aws-amplify/datastore" + } + }, + "3765": { + "id": 3765, + "name": "userSchema", + "variant": "param", + "kind": 32768, + "flags": {}, + "type": { + "type": "reference", + "target": 3504, + "name": "DataStoreSchema", + "package": "@aws-amplify/datastore" + } + }, + "3766": { + "id": 3766, + "name": "syncExpression", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3767 + ] + }, + "3767": { + "id": 3767, + "name": "syncExpression", + "variant": "signature", + "kind": 4096, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "Build an expression that can be used to filter which items of a given Model\nare synchronized down from the GraphQL service. E.g.,\n\n" + }, + { + "kind": "code", + "text": "```ts\nimport { DataStore, syncExpression } from 'aws-amplify/datastore';\nimport { Post, Comment } from './models';\n\n\nDataStore.configure({\n\tsyncExpressions: [\n\t\tsyncExpression(Post, () => {\n\t\t\treturn (post) => post.rating.gt(5);\n\t\t}),\n\t\tsyncExpression(Comment, () => {\n\t\t\treturn (comment) => comment.status.eq('active');\n\t\t})\n\t]\n});\n```" + }, + { + "kind": "text", + "text": "\n\nWhen DataStore starts syncing, only Posts with " + }, + { + "kind": "code", + "text": "`rating > 5`" + }, + { + "kind": "text", + "text": " and Comments with\n" + }, + { + "kind": "code", + "text": "`status === 'active'`" + }, + { + "kind": "text", + "text": " will be synced down to the user's local store." + } + ], + "blockTags": [ + { + "tag": "@returns", + "content": [ + { + "kind": "text", + "text": "An sync expression object that can be attached to the DataStore " + }, + { + "kind": "code", + "text": "`syncExpressions`" + }, + { + "kind": "text", + "text": " configuration property." + } + ] + } + ] + }, + "typeParameter": [ + 3768, + 3769 + ], + "parameters": [ + 3770, + 3771 + ], + "type": { + "type": "reference", + "target": { + "sourceFileName": "node_modules/typescript/lib/lib.es5.d.ts", + "qualifiedName": "Promise" + }, + "typeArguments": [ + { + "type": "reflection", + "declaration": { + "id": 3772, + "name": "__type", + "variant": "declaration", + "kind": 65536, + "flags": {}, + "children": [ + { + "id": 3773, + "name": "conditionProducer", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 2833, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3769, + "name": "A", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ConditionProducer", + "package": "@aws-amplify/datastore" + } + }, + { + "id": 3774, + "name": "modelConstructor", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3326, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "PersistentModelConstructor", + "package": "@aws-amplify/datastore" + } + } + ], + "groups": [ + { + "title": "Properties", + "children": [ + 3773, + 3774 + ] + } + ] + } + } + ], + "name": "Promise", + "package": "typescript" + } + }, + "3768": { + "id": 3768, + "name": "T", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": 208, + "typeArguments": [ + { + "type": "reference", + "target": 4146, + "typeArguments": [ + { + "type": "intrinsic", + "name": "string" + }, + { + "type": "intrinsic", + "name": "any" + } + ], + "name": "Record", + "package": "typescript" + } + ], + "name": "Readonly", + "package": "typescript" + } + }, + "3769": { + "id": 3769, + "name": "A", + "variant": "typeParam", + "kind": 131072, + "flags": {}, + "type": { + "type": "reference", + "target": 2861, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "Option", + "package": "@aws-amplify/datastore" + } + }, + "3770": { + "id": 3770, + "name": "modelConstructor", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "The Model from the schema." + } + ] + }, + "type": { + "type": "reference", + "target": 3326, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "PersistentModelConstructor", + "package": "@aws-amplify/datastore" + } + }, + "3771": { + "id": 3771, + "name": "conditionProducer", + "variant": "param", + "kind": 32768, + "flags": {}, + "comment": { + "summary": [ + { + "kind": "text", + "text": "A function that builds a condition object that can describe how to filter the model." + } + ] + }, + "type": { + "type": "reference", + "target": 2833, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3769, + "name": "A", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ConditionProducer", + "package": "@aws-amplify/datastore" + } + }, + "3773": { + "id": 3773, + "name": "conditionProducer", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 2833, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + }, + { + "type": "reference", + "target": 3769, + "name": "A", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "ConditionProducer", + "package": "@aws-amplify/datastore" + } + }, + "3774": { + "id": 3774, + "name": "modelConstructor", + "variant": "declaration", + "kind": 1024, + "flags": {}, + "type": { + "type": "reference", + "target": 3326, + "typeArguments": [ + { + "type": "reference", + "target": 3768, + "name": "T", + "package": "@aws-amplify/datastore", + "refersToTypeParameter": true + } + ], + "name": "PersistentModelConstructor", + "package": "@aws-amplify/datastore" + } + }, "3775": { "id": 3775, "name": "in-app-messaging", @@ -737625,6 +741097,211 @@ } ] }, + { + "id": 2204, + "name": "datastore", + "variant": "declaration", + "kind": 2, + "flags": {}, + "children": [ + { + "id": 3763, + "name": "initSchema", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3764 + ] + }, + { + "id": 3766, + "name": "syncExpression", + "variant": "declaration", + "kind": 64, + "flags": {}, + "signatures": [ + 3767 + ] + } + ], + "groups": [ + { + "title": "Modules", + "children": [ + 2205 + ] + }, + { + "title": "Namespaces", + "children": [ + 2896 + ] + }, + { + "title": "Enumerations", + "children": [ + 2909, + 2912, + 2927, + 2930, + 2936, + 2942, + 2947, + 2952, + 2956, + 2960, + 2963 + ] + }, + { + "title": "Classes", + "children": [ + 2966, + 2979, + 3054, + 3137, + 3167, + 3184, + 3187 + ] + }, + { + "title": "Interfaces", + "children": [ + 3192, + 3194, + 3198, + 3205, + 3214, + 3218, + 3243, + 3247, + 3252, + 3259, + 3263, + 3270, + 3273, + 3276, + 3281, + 3289, + 3298, + 3307, + 3310, + 3314, + 3319, + 3321, + 3326, + 3338, + 3342, + 3362, + 3367, + 3371, + 3376, + 3383, + 3390, + 3393, + 3397, + 3442, + 3448, + 3460, + 3477 + ] + }, + { + "title": "Type Aliases", + "children": [ + 3484, + 3485, + 3486, + 3490, + 3491, + 3497, + 3501, + 3504, + 3508, + 3512, + 3513, + 3518, + 3519, + 3526, + 3528, + 3533, + 3536, + 3539, + 3542, + 3545, + 3546, + 3552, + 3553, + 3558, + 3561, + 3562, + 3563, + 3564, + 3565, + 3569, + 3573, + 3574, + 3575, + 3577, + 3582, + 3587, + 3592, + 3597, + 3601, + 3605, + 3610, + 3612, + 3614, + 3620, + 3621, + 3628, + 3630, + 3635, + 3640, + 3646, + 3651, + 3656, + 3661, + 3666, + 3670, + 3672, + 3673, + 3674, + 3677, + 3678, + 3679, + 3681, + 3683, + 3689, + 3691, + 3693, + 3699, + 3700, + 3706, + 3716 + ] + }, + { + "title": "Variables", + "children": [ + 3718, + 3719, + 3720, + 3721, + 3722 + ] + }, + { + "title": "Functions", + "children": [ + 3763, + 3766 + ] + } + ] + }, { "id": 297, "name": "analytics",