@aws-amplify/api 6.0.1-api-v6-models.01b2bb8.0 → 6.0.1-api-v6-models.9351bcf.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/lib/API.d.ts +2 -2
- package/lib/API.js +4 -2
- package/lib/API.js.map +1 -1
- package/lib/server.d.ts +2 -2
- package/lib/server.js +4 -4
- package/lib/server.js.map +1 -1
- package/lib-esm/API.d.ts +2 -2
- package/lib-esm/API.js +4 -2
- package/lib-esm/API.js.map +1 -1
- package/lib-esm/server.d.ts +2 -2
- package/lib-esm/server.js +4 -4
- package/lib-esm/server.js.map +1 -1
- package/package.json +4 -4
- package/src/API.ts +8 -5
- package/src/server.ts +4 -2
package/lib/API.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
1
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
2
2
|
/**
|
|
3
3
|
* Generates an API client that can work with models or raw GraphQL
|
|
4
4
|
*/
|
|
5
|
-
export declare function generateClient<T extends Record<any, any> = never>(): V6Client<T>;
|
|
5
|
+
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions): V6Client<T>;
|
package/lib/API.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
3
4
|
var internals_1 = require("@aws-amplify/api-graphql/internals");
|
|
4
5
|
var core_1 = require("@aws-amplify/core");
|
|
5
6
|
/**
|
|
6
7
|
* Generates an API client that can work with models or raw GraphQL
|
|
7
8
|
*/
|
|
8
|
-
function generateClient() {
|
|
9
|
-
|
|
9
|
+
function generateClient(options) {
|
|
10
|
+
if (options === void 0) { options = {}; }
|
|
11
|
+
return internals_1.generateClient(tslib_1.__assign(tslib_1.__assign({}, options), { amplify: core_1.Amplify }));
|
|
10
12
|
}
|
|
11
13
|
exports.generateClient = generateClient;
|
|
12
14
|
//# sourceMappingURL=API.js.map
|
package/lib/API.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":";;;AAGA,gEAA8F;AAC9F,0CAA4C;AAE5C;;GAEG;AACH,SAAgB,cAAc,CAC7B,OAAuC;IAAvC,wBAAA,EAAA,YAAuC;IAEvC,OAAO,0BAAsB,uCACzB,OAAO,KACV,OAAO,EAAE,cAAO,IACf,CAAC;AACJ,CAAC;AAPD,wCAOC"}
|
package/lib/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { GraphQLQuery, GraphQLSubscription } from './types';
|
|
2
2
|
import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
|
|
3
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
3
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
4
4
|
export type { GraphQLResult, GraphQLReturnType, } from '@aws-amplify/api-graphql';
|
|
5
5
|
/**
|
|
6
6
|
* Generates an API client that can work with models or raw GraphQL
|
|
7
7
|
*/
|
|
8
|
-
export declare function generateClient<T extends Record<any, any> = never>(contextSpec: AmplifyServer.ContextSpec): V6Client<T>;
|
|
8
|
+
export declare function generateClient<T extends Record<any, any> = never>(contextSpec: AmplifyServer.ContextSpec, options?: CommonPublicClientOptions): V6Client<T>;
|
|
9
9
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
package/lib/server.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
5
6
|
var internals_1 = require("@aws-amplify/api-graphql/internals");
|
|
6
7
|
var adapter_core_1 = require("@aws-amplify/core/internals/adapter-core");
|
|
7
8
|
/**
|
|
8
9
|
* Generates an API client that can work with models or raw GraphQL
|
|
9
10
|
*/
|
|
10
|
-
function generateClient(contextSpec) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
11
|
+
function generateClient(contextSpec, options) {
|
|
12
|
+
if (options === void 0) { options = {}; }
|
|
13
|
+
return internals_1.generateClient(tslib_1.__assign(tslib_1.__assign({}, options), { amplify: adapter_core_1.getAmplifyServerContext(contextSpec).amplify }));
|
|
14
14
|
}
|
|
15
15
|
exports.generateClient = generateClient;
|
|
16
16
|
var server_1 = require("@aws-amplify/api-rest/server");
|
package/lib/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;;AAGtC,gEAA8F;AAC9F,yEAGkD;AASlD;;GAEG;AACH,SAAgB,cAAc,CAC7B,WAAsC,EACtC,OAAuC;IAAvC,wBAAA,EAAA,YAAuC;IAEvC,OAAO,0BAAsB,uCACzB,OAAO,KACV,OAAO,EAAE,sCAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,IACpD,CAAC;AACJ,CAAC;AARD,wCAQC;AAED,uDAQsC;AAPrC,uBAAA,GAAG,CAAA;AACH,uBAAA,GAAG,CAAA;AACH,wBAAA,IAAI,CAAA;AACJ,uBAAA,GAAG,CAAA;AACH,wBAAA,IAAI,CAAA;AACJ,yBAAA,KAAK,CAAA;AACL,iCAAA,aAAa,CAAA"}
|
package/lib-esm/API.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
1
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
2
2
|
/**
|
|
3
3
|
* Generates an API client that can work with models or raw GraphQL
|
|
4
4
|
*/
|
|
5
|
-
export declare function generateClient<T extends Record<any, any> = never>(): V6Client<T>;
|
|
5
|
+
export declare function generateClient<T extends Record<any, any> = never>(options?: CommonPublicClientOptions): V6Client<T>;
|
package/lib-esm/API.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { __assign } from "tslib";
|
|
1
2
|
import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals';
|
|
2
3
|
import { Amplify } from '@aws-amplify/core';
|
|
3
4
|
/**
|
|
4
5
|
* Generates an API client that can work with models or raw GraphQL
|
|
5
6
|
*/
|
|
6
|
-
export function generateClient() {
|
|
7
|
-
|
|
7
|
+
export function generateClient(options) {
|
|
8
|
+
if (options === void 0) { options = {}; }
|
|
9
|
+
return internalGenerateClient(__assign(__assign({}, options), { amplify: Amplify }));
|
|
8
10
|
}
|
|
9
11
|
//# sourceMappingURL=API.js.map
|
package/lib-esm/API.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,cAAc;
|
|
1
|
+
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,cAAc,CAC7B,OAAuC;IAAvC,wBAAA,EAAA,YAAuC;IAEvC,OAAO,sBAAsB,uBACzB,OAAO,KACV,OAAO,EAAE,OAAO,IACf,CAAC;AACJ,CAAC"}
|
package/lib-esm/server.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export { GraphQLQuery, GraphQLSubscription } from './types';
|
|
2
2
|
import { AmplifyServer } from '@aws-amplify/core/internals/adapter-core';
|
|
3
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
3
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
4
4
|
export type { GraphQLResult, GraphQLReturnType, } from '@aws-amplify/api-graphql';
|
|
5
5
|
/**
|
|
6
6
|
* Generates an API client that can work with models or raw GraphQL
|
|
7
7
|
*/
|
|
8
|
-
export declare function generateClient<T extends Record<any, any> = never>(contextSpec: AmplifyServer.ContextSpec): V6Client<T>;
|
|
8
|
+
export declare function generateClient<T extends Record<any, any> = never>(contextSpec: AmplifyServer.ContextSpec, options?: CommonPublicClientOptions): V6Client<T>;
|
|
9
9
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
package/lib-esm/server.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { __assign } from "tslib";
|
|
3
4
|
import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals';
|
|
4
5
|
import { getAmplifyServerContext, } from '@aws-amplify/core/internals/adapter-core';
|
|
5
6
|
/**
|
|
6
7
|
* Generates an API client that can work with models or raw GraphQL
|
|
7
8
|
*/
|
|
8
|
-
export function generateClient(contextSpec) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
});
|
|
9
|
+
export function generateClient(contextSpec, options) {
|
|
10
|
+
if (options === void 0) { options = {}; }
|
|
11
|
+
return internalGenerateClient(__assign(__assign({}, options), { amplify: getAmplifyServerContext(contextSpec).amplify }));
|
|
12
12
|
}
|
|
13
13
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
|
14
14
|
//# sourceMappingURL=server.js.map
|
package/lib-esm/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAGtC,OAAO,EAAE,cAAc,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC9F,OAAO,EAEN,uBAAuB,GACvB,MAAM,0CAA0C,CAAC;AASlD;;GAEG;AACH,MAAM,UAAU,cAAc,CAC7B,WAAsC,EACtC,OAAuC;IAAvC,wBAAA,EAAA,YAAuC;IAEvC,OAAO,sBAAsB,uBACzB,OAAO,KACV,OAAO,EAAE,uBAAuB,CAAC,WAAW,CAAC,CAAC,OAAO,IACpD,CAAC;AACJ,CAAC;AAED,OAAO,EACN,GAAG,EACH,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,EACJ,KAAK,EACL,aAAa,GACb,MAAM,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api",
|
|
3
|
-
"version": "6.0.1-api-v6-models.
|
|
3
|
+
"version": "6.0.1-api-v6-models.9351bcf.0+9351bcf",
|
|
4
4
|
"description": "Api category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"server"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@aws-amplify/api-graphql": "4.0.1-api-v6-models.
|
|
62
|
-
"@aws-amplify/api-rest": "4.0.1-api-v6-models.
|
|
61
|
+
"@aws-amplify/api-graphql": "4.0.1-api-v6-models.9351bcf.0+9351bcf",
|
|
62
|
+
"@aws-amplify/api-rest": "4.0.1-api-v6-models.9351bcf.0+9351bcf",
|
|
63
63
|
"tslib": "^2.6.1"
|
|
64
64
|
},
|
|
65
65
|
"jest": {
|
|
@@ -106,5 +106,5 @@
|
|
|
106
106
|
"lib-esm"
|
|
107
107
|
]
|
|
108
108
|
},
|
|
109
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "9351bcfbeb9ec15f67fc6404ca192689a398d260"
|
|
110
110
|
}
|
package/src/API.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
3
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
4
4
|
import { generateClient as internalGenerateClient } from '@aws-amplify/api-graphql/internals';
|
|
5
5
|
import { Amplify } from '@aws-amplify/core';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Generates an API client that can work with models or raw GraphQL
|
|
9
9
|
*/
|
|
10
|
-
export function generateClient<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return internalGenerateClient({
|
|
10
|
+
export function generateClient<T extends Record<any, any> = never>(
|
|
11
|
+
options: CommonPublicClientOptions = {}
|
|
12
|
+
): V6Client<T> {
|
|
13
|
+
return internalGenerateClient({
|
|
14
|
+
...options,
|
|
15
|
+
amplify: Amplify,
|
|
16
|
+
});
|
|
14
17
|
}
|
package/src/server.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
getAmplifyServerContext,
|
|
9
9
|
} from '@aws-amplify/core/internals/adapter-core';
|
|
10
10
|
|
|
11
|
-
import { V6Client } from '@aws-amplify/api-graphql';
|
|
11
|
+
import { V6Client, CommonPublicClientOptions } from '@aws-amplify/api-graphql';
|
|
12
12
|
|
|
13
13
|
export type {
|
|
14
14
|
GraphQLResult,
|
|
@@ -19,9 +19,11 @@ export type {
|
|
|
19
19
|
* Generates an API client that can work with models or raw GraphQL
|
|
20
20
|
*/
|
|
21
21
|
export function generateClient<T extends Record<any, any> = never>(
|
|
22
|
-
contextSpec: AmplifyServer.ContextSpec
|
|
22
|
+
contextSpec: AmplifyServer.ContextSpec,
|
|
23
|
+
options: CommonPublicClientOptions = {}
|
|
23
24
|
): V6Client<T> {
|
|
24
25
|
return internalGenerateClient({
|
|
26
|
+
...options,
|
|
25
27
|
amplify: getAmplifyServerContext(contextSpec).amplify,
|
|
26
28
|
});
|
|
27
29
|
}
|