@aws-amplify/data-schema 0.16.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/runtime/index.v3.js +0 -5
- package/dist/cjs/runtime/index.v3.js.map +1 -1
- package/dist/esm/runtime/bridge-types.d.ts +1 -1
- package/dist/esm/runtime/client/index.v3.d.ts +40 -0
- package/dist/esm/runtime/index.v3.d.ts +2 -3
- package/dist/esm/runtime/index.v3.mjs +0 -2
- package/dist/esm/runtime/index.v3.mjs.map +1 -1
- package/dist/meta/cjs.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/runtime/package.json +14 -2
- package/src/runtime/bridge-types.ts +1 -1
- package/src/runtime/client/index.v3.ts +46 -0
- package/src/runtime/index.v3.ts +8 -3
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
// SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.addSchemaToClientWithInstance = exports.addSchemaToClient = void 0;
|
|
7
6
|
const tslib_1 = require("tslib");
|
|
8
7
|
tslib_1.__exportStar(require("./client/index.v3"), exports);
|
|
9
|
-
var addSchemaToClient_1 = require("./addSchemaToClient");
|
|
10
|
-
Object.defineProperty(exports, "addSchemaToClient", { enumerable: true, get: function () { return addSchemaToClient_1.addSchemaToClient; } });
|
|
11
|
-
var addSchemaToClientWithInstance_1 = require("./addSchemaToClientWithInstance");
|
|
12
|
-
Object.defineProperty(exports, "addSchemaToClientWithInstance", { enumerable: true, get: function () { return addSchemaToClientWithInstance_1.addSchemaToClientWithInstance; } });
|
|
13
8
|
//# sourceMappingURL=index.v3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.v3.js","sources":["../../../src/runtime/index.v3.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\
|
|
1
|
+
{"version":3,"file":"index.v3.js","sources":["../../../src/runtime/index.v3.ts"],"sourcesContent":["\"use strict\";\n// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./client/index.v3\"), exports);\n"],"names":[],"mappings":";;AACA;AACA;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;;"}
|
|
@@ -264,7 +264,7 @@ export type ClientInternals = {
|
|
|
264
264
|
authToken: string | undefined;
|
|
265
265
|
headers: CustomHeaders | undefined;
|
|
266
266
|
};
|
|
267
|
-
export type ClientInternalsGetter = (client:
|
|
267
|
+
export type ClientInternalsGetter = (client: BaseClient) => ClientInternals;
|
|
268
268
|
export type BaseClient = BaseBrowserClient | BaseSSRClient;
|
|
269
269
|
export type BaseBrowserClient = {
|
|
270
270
|
graphql: GraphQLMethod;
|
|
@@ -9,7 +9,47 @@ export type SelectionSet<_Model, _Path> = any;
|
|
|
9
9
|
* promise.
|
|
10
10
|
*/
|
|
11
11
|
export type CustomHeaders = Record<string, string> | (() => Promise<Record<string, string>>);
|
|
12
|
+
/**
|
|
13
|
+
* Request options that are passed to custom header functions.
|
|
14
|
+
* `method` and `headers` are not included in custom header functions passed to
|
|
15
|
+
* subscriptions.
|
|
16
|
+
*/
|
|
17
|
+
export type RequestOptions = {
|
|
18
|
+
url: string;
|
|
19
|
+
queryString: string;
|
|
20
|
+
method?: string;
|
|
21
|
+
};
|
|
12
22
|
export type CustomQueries<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;
|
|
13
23
|
export type CustomMutations<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;
|
|
14
24
|
export type CustomSubscriptions<Schema extends Record<any, any>, _Context extends string = 'CLIENT', _ModelMeta extends Record<any, any> = ExtractModelMeta<Schema>> = any;
|
|
15
25
|
export type ModelSortDirection = 'ASC' | 'DESC';
|
|
26
|
+
export type ClientExtensions<T extends Record<any, any> = never> = {
|
|
27
|
+
models: ModelTypes<T>;
|
|
28
|
+
enums: EnumTypes<T>;
|
|
29
|
+
queries: CustomQueries<T, 'CLIENT'>;
|
|
30
|
+
mutations: CustomMutations<T, 'CLIENT'>;
|
|
31
|
+
subscriptions: CustomSubscriptions<T, 'CLIENT'>;
|
|
32
|
+
};
|
|
33
|
+
export type ClientExtensionsSSRRequest<T extends Record<any, any> = never> = {
|
|
34
|
+
models: ModelTypes<T, 'REQUEST'>;
|
|
35
|
+
enums: EnumTypes<T>;
|
|
36
|
+
queries: CustomQueries<T, 'REQUEST'>;
|
|
37
|
+
mutations: CustomMutations<T, 'REQUEST'>;
|
|
38
|
+
};
|
|
39
|
+
export type ClientExtensionsSSRCookies<T extends Record<any, any> = never> = {
|
|
40
|
+
models: ModelTypes<T, 'COOKIES'>;
|
|
41
|
+
enums: EnumTypes<T>;
|
|
42
|
+
queries: CustomQueries<T, 'COOKIES'>;
|
|
43
|
+
mutations: CustomMutations<T, 'COOKIES'>;
|
|
44
|
+
};
|
|
45
|
+
export type ClientInternals = {
|
|
46
|
+
amplify: any;
|
|
47
|
+
authMode: any;
|
|
48
|
+
authToken: string | undefined;
|
|
49
|
+
headers: CustomHeaders | undefined;
|
|
50
|
+
};
|
|
51
|
+
export type BaseClient = {
|
|
52
|
+
graphql(...args: any): Promise<Record<string, any>>;
|
|
53
|
+
cancel(promise: Promise<any>, message?: string): boolean;
|
|
54
|
+
isCancelError(error: any): boolean;
|
|
55
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export * from './client/index.v3';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export { BaseClient, ClientInternals } from './bridge-types';
|
|
2
|
+
export declare function addSchemaToClient<_T extends Record<any, any> = never>(client: any, apiGraphqlConfig: any, getInternals: any): any;
|
|
3
|
+
export declare function addSchemaToClientWithInstance<_T extends Record<any, any>>(client: any, params: any, getInternals: any): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.v3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.v3.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|