@aws-amplify/data-schema
Advanced tools
Comparing version 0.16.0 to 0.16.1
@@ -6,9 +6,4 @@ 'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addSchemaToClientWithInstance = exports.addSchemaToClient = void 0; | ||
const tslib_1 = require("tslib"); | ||
tslib_1.__exportStar(require("./client/index.v3"), exports); | ||
var addSchemaToClient_1 = require("./addSchemaToClient"); | ||
Object.defineProperty(exports, "addSchemaToClient", { enumerable: true, get: function () { return addSchemaToClient_1.addSchemaToClient; } }); | ||
var addSchemaToClientWithInstance_1 = require("./addSchemaToClientWithInstance"); | ||
Object.defineProperty(exports, "addSchemaToClientWithInstance", { enumerable: true, get: function () { return addSchemaToClientWithInstance_1.addSchemaToClientWithInstance; } }); | ||
//# sourceMappingURL=index.v3.js.map |
@@ -267,3 +267,3 @@ /** | ||
}; | ||
export type ClientInternalsGetter = (client: any) => ClientInternals; | ||
export type ClientInternalsGetter = (client: BaseClient) => ClientInternals; | ||
export type BaseClient = BaseBrowserClient | BaseSSRClient; | ||
@@ -270,0 +270,0 @@ export type BaseBrowserClient = { |
@@ -12,2 +12,12 @@ import { ExtractModelMeta } from '@aws-amplify/data-schema-types'; | ||
export type CustomHeaders = Record<string, string> | (() => Promise<Record<string, string>>); | ||
/** | ||
* Request options that are passed to custom header functions. | ||
* `method` and `headers` are not included in custom header functions passed to | ||
* subscriptions. | ||
*/ | ||
export type RequestOptions = { | ||
url: string; | ||
queryString: string; | ||
method?: string; | ||
}; | ||
export type CustomQueries<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any; | ||
@@ -17,1 +27,31 @@ export type CustomMutations<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any; | ||
export type ModelSortDirection = 'ASC' | 'DESC'; | ||
export type ClientExtensions<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'CLIENT'>; | ||
mutations: CustomMutations<T, 'CLIENT'>; | ||
subscriptions: CustomSubscriptions<T, 'CLIENT'>; | ||
}; | ||
export type ClientExtensionsSSRRequest<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T, 'REQUEST'>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'REQUEST'>; | ||
mutations: CustomMutations<T, 'REQUEST'>; | ||
}; | ||
export type ClientExtensionsSSRCookies<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T, 'COOKIES'>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'COOKIES'>; | ||
mutations: CustomMutations<T, 'COOKIES'>; | ||
}; | ||
export type ClientInternals = { | ||
amplify: any; | ||
authMode: any; | ||
authToken: string | undefined; | ||
headers: CustomHeaders | undefined; | ||
}; | ||
export type BaseClient = { | ||
graphql(...args: any): Promise<Record<string, any>>; | ||
cancel(promise: Promise<any>, message?: string): boolean; | ||
isCancelError(error: any): boolean; | ||
}; |
export * from './client/index.v3'; | ||
export { addSchemaToClient } from './addSchemaToClient'; | ||
export { addSchemaToClientWithInstance } from './addSchemaToClientWithInstance'; | ||
export { BaseClient, ClientInternals } from './bridge-types'; | ||
export declare function addSchemaToClient<_T extends Record<any, any> = never>(client: any, apiGraphqlConfig: any, getInternals: any): any; | ||
export declare function addSchemaToClientWithInstance<_T extends Record<any, any>>(client: any, params: any, getInternals: any): any; |
{ | ||
"name": "@aws-amplify/data-schema", | ||
"version": "0.16.0", | ||
"version": "0.16.1", | ||
"license": "Apache-2.0", | ||
@@ -37,2 +37,3 @@ "repository": { | ||
"types": "./dist/esm/runtime/index.d.ts", | ||
"types@<5": "./dist/esm/runtime/index.v3.d.ts", | ||
"import": "./dist/esm/runtime/index.mjs", | ||
@@ -39,0 +40,0 @@ "require": "./dist/cjs/runtime/index.js", |
{ | ||
"name": "@aws-amplify/data-schema/runtime", | ||
"main": "../dist/cjs/runtime/index.js", | ||
"typings": "./defer-to-types-versions", | ||
"module": "../dist/esm/runtime/index.mjs", | ||
"types": "../dist/esm/runtime/index.d.ts", | ||
"react-native": "../src/runtime/index.ts", | ||
"sideEffects": false | ||
"sideEffects": false, | ||
"typesVersions": { | ||
"<5": { | ||
"defer-to-types-versions": [ | ||
"../dist/esm/runtime/index.v3.d.ts" | ||
] | ||
}, | ||
">=5": { | ||
"defer-to-types-versions": [ | ||
"../dist/esm/runtime/index.d.ts" | ||
] | ||
} | ||
} | ||
} |
@@ -358,3 +358,3 @@ /* eslint-disable @typescript-eslint/no-namespace */ | ||
export type ClientInternalsGetter = (client: any) => ClientInternals; | ||
export type ClientInternalsGetter = (client: BaseClient) => ClientInternals; | ||
@@ -361,0 +361,0 @@ export type BaseClient = BaseBrowserClient | BaseSSRClient; |
@@ -34,2 +34,13 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
/** | ||
* Request options that are passed to custom header functions. | ||
* `method` and `headers` are not included in custom header functions passed to | ||
* subscriptions. | ||
*/ | ||
export type RequestOptions = { | ||
url: string; | ||
queryString: string; | ||
method?: string; | ||
}; | ||
export type CustomQueries< | ||
@@ -54,1 +65,36 @@ Schema extends Record<any, any>, | ||
export type ModelSortDirection = 'ASC' | 'DESC'; | ||
export type ClientExtensions<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'CLIENT'>; | ||
mutations: CustomMutations<T, 'CLIENT'>; | ||
subscriptions: CustomSubscriptions<T, 'CLIENT'>; | ||
}; | ||
export type ClientExtensionsSSRRequest<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T, 'REQUEST'>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'REQUEST'>; | ||
mutations: CustomMutations<T, 'REQUEST'>; | ||
}; | ||
export type ClientExtensionsSSRCookies<T extends Record<any, any> = never> = { | ||
models: ModelTypes<T, 'COOKIES'>; | ||
enums: EnumTypes<T>; | ||
queries: CustomQueries<T, 'COOKIES'>; | ||
mutations: CustomMutations<T, 'COOKIES'>; | ||
}; | ||
export type ClientInternals = { | ||
amplify: any; | ||
authMode: any; | ||
authToken: string | undefined; | ||
headers: CustomHeaders | undefined; | ||
}; | ||
export type BaseClient = { | ||
graphql(...args: any): Promise<Record<string, any>>; | ||
cancel(promise: Promise<any>, message?: string): boolean; | ||
isCancelError(error: any): boolean; | ||
}; |
@@ -5,4 +5,9 @@ // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
export * from './client/index.v3'; | ||
export { addSchemaToClient } from './addSchemaToClient'; | ||
export { addSchemaToClientWithInstance } from './addSchemaToClientWithInstance'; | ||
export { BaseClient, ClientInternals } from './bridge-types'; | ||
export declare function addSchemaToClient<_T extends Record<any, any> = never>( | ||
client: any, | ||
apiGraphqlConfig: any, | ||
getInternals: any, | ||
): any; | ||
export declare function addSchemaToClientWithInstance< | ||
_T extends Record<any, any>, | ||
>(client: any, params: any, getInternals: any): any; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1768181
342758
20081
0
10
2