@aws-amplify/amplify-api-next-alpha
Advanced tools
Comparing version 0.5.0 to 0.6.0
import type { Authorization, ImpliedAuthFields } from './Authorization'; | ||
import { type Prettify, type UnionToIntersection, type ExcludeEmpty, __modelMeta__ } from '@aws-amplify/amplify-api-next-types-alpha'; | ||
import { type Prettify, type UnionToIntersection, type ExcludeEmpty, __modelMeta__, ListReturnValue, SingularReturnValue } from '@aws-amplify/amplify-api-next-types-alpha'; | ||
import type { ModelField } from './ModelField'; | ||
@@ -60,3 +60,3 @@ import type { ModelRelationalField, ModelRelationalFieldParamShape, ModelRelationalTypeArgFactory } from './ModelRelationalField'; | ||
type InjectImplicitModels<Schema> = Prettify<Schema & ExtractImplicitModelNames<Schema>>; | ||
type GetRelationshipRef<T, RM extends keyof T, TypeArg extends ModelRelationalFieldParamShape, Flat extends boolean, ResolvedModel = ResolveRelationalFieldsForModel<T, RM, Flat>, Model = TypeArg['valueRequired'] extends true ? ResolvedModel : ResolvedModel | null | undefined, Value = TypeArg['array'] extends true ? Array<Model> : Model> = () => Promise<Prettify<Value>>; | ||
type GetRelationshipRef<T, RM extends keyof T, TypeArg extends ModelRelationalFieldParamShape, Flat extends boolean, ResolvedModel = ResolveRelationalFieldsForModel<T, RM, Flat>, Model = TypeArg['valueRequired'] extends true ? ResolvedModel : ResolvedModel | null | undefined, Value = TypeArg['array'] extends true ? Array<Model> : Model> = () => Value extends Array<any> ? ListReturnValue<Prettify<Model>> : SingularReturnValue<Prettify<Model>>; | ||
type ResolveRelationalFieldsForModel<Schema, ModelName extends keyof Schema, Flat extends boolean> = { | ||
@@ -63,0 +63,0 @@ [FieldName in keyof Schema[ModelName]]: Schema[ModelName][FieldName] extends ModelRelationalFieldParamShape ? Schema[ModelName][FieldName]['relatedModel'] extends keyof Schema ? GetRelationshipRef<Schema, Schema[ModelName][FieldName]['relatedModel'], Schema[ModelName][FieldName], Flat> : never : Schema[ModelName][FieldName]; |
{ | ||
"name": "@aws-amplify/amplify-api-next-alpha", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
104740