@aws-amplify/api 6.1.10-unstable.0ecded1.0 → 6.1.10-unstable.ca2e4b8.0
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/API.js +2 -2
- package/dist/cjs/API.js.map +1 -1
- package/dist/esm/API.d.ts +3 -2
- package/dist/esm/API.mjs +2 -2
- package/dist/esm/API.mjs.map +1 -1
- package/package.json +5 -4
- package/src/API.ts +12 -7
package/dist/cjs/API.js
CHANGED
|
@@ -10,9 +10,9 @@ const core_1 = require("@aws-amplify/core");
|
|
|
10
10
|
* @returns {@link V6Client}
|
|
11
11
|
* @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.
|
|
12
12
|
*/
|
|
13
|
-
function generateClient(options
|
|
13
|
+
function generateClient(options) {
|
|
14
14
|
return (0, internals_1.generateClient)({
|
|
15
|
-
...options,
|
|
15
|
+
...(options || {}),
|
|
16
16
|
amplify: core_1.Amplify,
|
|
17
17
|
});
|
|
18
18
|
}
|
package/dist/cjs/API.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.js","sources":["../../src/API.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateClient = void 0;\nconst internals_1 = require(\"@aws-amplify/api-graphql/internals\");\nconst core_1 = require(\"@aws-amplify/core\");\n/**\n * Generates an API client that can work with models or raw GraphQL\n *\n * @returns {@link V6Client}\n * @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.\n */\nfunction generateClient(options
|
|
1
|
+
{"version":3,"file":"API.js","sources":["../../src/API.ts"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateClient = void 0;\nconst internals_1 = require(\"@aws-amplify/api-graphql/internals\");\nconst core_1 = require(\"@aws-amplify/core\");\n/**\n * Generates an API client that can work with models or raw GraphQL\n *\n * @returns {@link V6Client}\n * @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.\n */\nfunction generateClient(options) {\n return (0, internals_1.generateClient)({\n ...(options || {}),\n amplify: core_1.Amplify,\n });\n}\nexports.generateClient = generateClient;\n"],"names":[],"mappings":";;AACA,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AAC9D,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAAC;AAChC,MAAM,WAAW,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;AAClE,MAAM,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,cAAc,CAAC,OAAO,EAAE;AACjC,IAAI,OAAO,IAAI,WAAW,CAAC,cAAc,EAAE;AAC3C,QAAQ,IAAI,OAAO,IAAI,EAAE,CAAC;AAC1B,QAAQ,OAAO,EAAE,MAAM,CAAC,OAAO;AAC/B,KAAK,CAAC,CAAC;AACP,CAAC;AACD,OAAO,CAAC,cAAc,GAAG,cAAc;;"}
|
package/dist/esm/API.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { V6Client } from '@aws-amplify/api-graphql';
|
|
2
|
+
import { CommonPublicClientOptions, DefaultCommonClientOptions } from '@aws-amplify/api-graphql/internals';
|
|
2
3
|
/**
|
|
3
4
|
* Generates an API client that can work with models or raw GraphQL
|
|
4
5
|
*
|
|
5
6
|
* @returns {@link V6Client}
|
|
6
7
|
* @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.
|
|
7
8
|
*/
|
|
8
|
-
export declare function generateClient<T extends Record<any, any> = never>(options?:
|
|
9
|
+
export declare function generateClient<T extends Record<any, any> = never, Options extends CommonPublicClientOptions = DefaultCommonClientOptions>(options?: Options): V6Client<T, Options>;
|
package/dist/esm/API.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import { Amplify } from '@aws-amplify/core';
|
|
|
7
7
|
* @returns {@link V6Client}
|
|
8
8
|
* @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.
|
|
9
9
|
*/
|
|
10
|
-
function generateClient(options
|
|
10
|
+
function generateClient(options) {
|
|
11
11
|
return generateClient$1({
|
|
12
|
-
...options,
|
|
12
|
+
...(options || {}),
|
|
13
13
|
amplify: Amplify,
|
|
14
14
|
});
|
|
15
15
|
}
|
package/dist/esm/API.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.mjs","sources":["../../src/API.ts"],"sourcesContent":["import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals';\nimport { Amplify } from '@aws-amplify/core';\n/**\n * Generates an API client that can work with models or raw GraphQL\n *\n * @returns {@link V6Client}\n * @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.\n */\nexport function generateClient(options
|
|
1
|
+
{"version":3,"file":"API.mjs","sources":["../../src/API.ts"],"sourcesContent":["import { generateClient as internalGenerateClient, } from '@aws-amplify/api-graphql/internals';\nimport { Amplify } from '@aws-amplify/core';\n/**\n * Generates an API client that can work with models or raw GraphQL\n *\n * @returns {@link V6Client}\n * @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.\n */\nexport function generateClient(options) {\n return internalGenerateClient({\n ...(options || {}),\n amplify: Amplify,\n });\n}\n"],"names":["internalGenerateClient"],"mappings":";;;AAEA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAC,OAAO,EAAE;AACxC,IAAI,OAAOA,gBAAsB,CAAC;AAClC,QAAQ,IAAI,OAAO,IAAI,EAAE,CAAC;AAC1B,QAAQ,OAAO,EAAE,OAAO;AACxB,KAAK,CAAC,CAAC;AACP;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api",
|
|
3
|
-
"version": "6.1.10-unstable.
|
|
3
|
+
"version": "6.1.10-unstable.ca2e4b8.0+ca2e4b8",
|
|
4
4
|
"description": "Api category of aws-amplify",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.mjs",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
},
|
|
69
69
|
"homepage": "https://aws-amplify.github.io/",
|
|
70
70
|
"devDependencies": {
|
|
71
|
+
"jest-fetch-mock": "3.0.3",
|
|
71
72
|
"typescript": "5.0.2"
|
|
72
73
|
},
|
|
73
74
|
"files": [
|
|
@@ -79,9 +80,9 @@
|
|
|
79
80
|
"server"
|
|
80
81
|
],
|
|
81
82
|
"dependencies": {
|
|
82
|
-
"@aws-amplify/api-graphql": "4.6.8-unstable.
|
|
83
|
-
"@aws-amplify/api-rest": "4.0.65-unstable.
|
|
83
|
+
"@aws-amplify/api-graphql": "4.6.8-unstable.ca2e4b8.0+ca2e4b8",
|
|
84
|
+
"@aws-amplify/api-rest": "4.0.65-unstable.ca2e4b8.0+ca2e4b8",
|
|
84
85
|
"tslib": "^2.5.0"
|
|
85
86
|
},
|
|
86
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "ca2e4b87a456dfe9a027e49bdcd912a2cba8e59d"
|
|
87
88
|
}
|
package/src/API.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { V6Client } from '@aws-amplify/api-graphql';
|
|
4
|
+
import {
|
|
5
|
+
CommonPublicClientOptions,
|
|
6
|
+
DefaultCommonClientOptions,
|
|
7
|
+
generateClient as internalGenerateClient,
|
|
8
|
+
} from '@aws-amplify/api-graphql/internals';
|
|
5
9
|
import { Amplify } from '@aws-amplify/core';
|
|
6
10
|
|
|
7
11
|
/**
|
|
@@ -10,11 +14,12 @@ import { Amplify } from '@aws-amplify/core';
|
|
|
10
14
|
* @returns {@link V6Client}
|
|
11
15
|
* @throws {@link Error} - Throws error when client cannot be generated due to configuration issues.
|
|
12
16
|
*/
|
|
13
|
-
export function generateClient<
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
export function generateClient<
|
|
18
|
+
T extends Record<any, any> = never,
|
|
19
|
+
Options extends CommonPublicClientOptions = DefaultCommonClientOptions,
|
|
20
|
+
>(options?: Options): V6Client<T, Options> {
|
|
16
21
|
return internalGenerateClient({
|
|
17
|
-
...options,
|
|
22
|
+
...(options || ({} as any)),
|
|
18
23
|
amplify: Amplify,
|
|
19
|
-
}) as unknown as V6Client<T>;
|
|
24
|
+
}) as unknown as V6Client<T, Options>;
|
|
20
25
|
}
|