@aws-amplify/data-schema-types
Advanced tools
Comparing version 0.4.2 to 0.5.0
@@ -241,5 +241,7 @@ import { DeepReadOnlyObject, UnwrapArray, UnionToIntersection, Prettify } from '../util'; | ||
nextToken?: string | null; | ||
headers?: CustomHeaders; | ||
} : { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => IsArray extends true ? ListReturnValue<Prettify<Model>> : SingularReturnValue<Prettify<Model>>; | ||
@@ -309,2 +311,3 @@ export type AuthMode = 'apiKey' | 'iam' | 'oidc' | 'userPool' | 'lambda' | 'none'; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -314,2 +317,3 @@ update: (model: Prettify<ModelIdentifier<ModelMeta> & Partial<MutationInput<Model, ModelMeta>>>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -319,2 +323,3 @@ delete: (identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -325,2 +330,3 @@ get<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -334,2 +340,3 @@ list<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -363,2 +370,3 @@ onCreate<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -368,2 +376,3 @@ update: (model: Prettify<ModelIdentifier<ModelMeta> & Partial<MutationInput<Model, ModelMeta>>>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -373,2 +382,3 @@ delete: (identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -379,2 +389,3 @@ get<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -388,2 +399,3 @@ list<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -395,2 +407,3 @@ }; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -400,2 +413,3 @@ update: (contextSpec: any, model: Prettify<ModelIdentifier<ModelMeta> & Partial<MutationInput<Model, ModelMeta>>>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -405,2 +419,3 @@ delete: (contextSpec: any, identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}) => SingularReturnValue<Model>; | ||
@@ -411,2 +426,3 @@ get<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(contextSpec: any, identifier: ModelIdentifier<ModelMeta>, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -420,2 +436,3 @@ list<FlatModel extends Record<string, unknown> = ResolvedModel<Model>, SelectionSet extends ReadonlyArray<ModelPath<FlatModel>> = never[]>(contextSpec: any, options?: { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -427,2 +444,7 @@ }; | ||
}; | ||
/** | ||
* Custom headers that can be passed either to the client or to individual | ||
* calls, either as a static object or a function that returns a promise. | ||
*/ | ||
export type CustomHeaders = Record<string, string> | (() => Promise<Headers>); | ||
export {}; |
@@ -5,1 +5,6 @@ export declare const __modelMeta__: unique symbol; | ||
export type SelectionSet<_Model, _Path> = any; | ||
/** | ||
* Custom headers that can be passed either to the client or to individual | ||
* calls, either as a static object or a function that returns a promise. | ||
*/ | ||
export type CustomHeaders = Record<string, string> | (() => Promise<Headers>); |
{ | ||
"name": "@aws-amplify/data-schema-types", | ||
"version": "0.4.2", | ||
"version": "0.5.0", | ||
"license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./lib-esm/index.d.ts", |
@@ -363,2 +363,3 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
nextToken?: string | null; | ||
headers?: CustomHeaders; | ||
} | ||
@@ -368,2 +369,3 @@ : { | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
@@ -459,3 +461,7 @@ ) => IsArray extends true | ||
model: Prettify<MutationInput<Model, ModelMeta>>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -466,7 +472,15 @@ update: ( | ||
>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
delete: ( | ||
identifier: ModelIdentifier<ModelMeta>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -482,2 +496,3 @@ get< | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
@@ -495,2 +510,3 @@ ): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -539,3 +555,7 @@ onCreate< | ||
model: Prettify<MutationInput<Model, ModelMeta>>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -546,7 +566,15 @@ update: ( | ||
>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
delete: ( | ||
identifier: ModelIdentifier<ModelMeta>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -562,2 +590,3 @@ get< | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
@@ -575,2 +604,3 @@ ): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
@@ -587,3 +617,7 @@ }; | ||
model: Prettify<MutationInput<Model, ModelMeta>>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -595,3 +629,7 @@ update: ( | ||
>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -601,3 +639,7 @@ delete: ( | ||
identifier: ModelIdentifier<ModelMeta>, | ||
options?: { authMode?: AuthMode; authToken?: string }, | ||
options?: { | ||
authMode?: AuthMode; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
) => SingularReturnValue<Model>; | ||
@@ -614,2 +656,3 @@ get< | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
@@ -629,2 +672,3 @@ ): SingularReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
authToken?: string; | ||
headers?: CustomHeaders; | ||
}, | ||
@@ -653,1 +697,7 @@ ): ListReturnValue<ReturnValue<Model, FlatModel, SelectionSet>>; | ||
}; | ||
/** | ||
* Custom headers that can be passed either to the client or to individual | ||
* calls, either as a static object or a function that returns a promise. | ||
*/ | ||
export type CustomHeaders = Record<string, string> | (() => Promise<Headers>); |
@@ -16,1 +16,7 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
export type SelectionSet<_Model, _Path> = any; | ||
/** | ||
* Custom headers that can be passed either to the client or to individual | ||
* calls, either as a static object or a function that returns a promise. | ||
*/ | ||
export type CustomHeaders = Record<string, string> | (() => Promise<Headers>); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57447
1299