@aws-amplify/api 6.0.1-unstable.04fd02c.0 → 6.0.1-unstable.cfbde4c.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/internals/generateServerClient.d.ts +11 -0
- package/lib/internals/generateServerClient.js +27 -0
- package/lib/internals/generateServerClient.js.map +1 -0
- package/lib/internals/index.d.ts +1 -0
- package/lib/internals/index.js +2 -0
- package/lib/internals/index.js.map +1 -1
- package/lib/server.d.ts +0 -13
- package/lib/server.js +0 -22
- package/lib/server.js.map +1 -1
- package/lib-esm/internals/generateServerClient.d.ts +11 -0
- package/lib-esm/internals/generateServerClient.js +24 -0
- package/lib-esm/internals/generateServerClient.js.map +1 -0
- package/lib-esm/internals/index.d.ts +1 -0
- package/lib-esm/internals/index.js +1 -0
- package/lib-esm/internals/index.js.map +1 -1
- package/lib-esm/server.d.ts +0 -13
- package/lib-esm/server.js +0 -21
- package/lib-esm/server.js.map +1 -1
- package/package.json +4 -4
- package/src/internals/generateServerClient.ts +38 -0
- package/src/internals/index.ts +1 -0
- package/src/server.ts +0 -47
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServerClientGenerationParams, V6Client, V6ClientSSR } from '@aws-amplify/api-graphql';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
*
|
|
5
|
+
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
6
|
+
* compatible context object for config and auth fetching.
|
|
7
|
+
*
|
|
8
|
+
* @param params
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateServerClient<T extends Record<any, any> = never, ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>>(params: ServerClientGenerationParams): ClientType;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
const api_graphql_1 = require("@aws-amplify/api-graphql");
|
|
6
|
+
const internals_1 = require("@aws-amplify/api-graphql/internals");
|
|
7
|
+
/**
|
|
8
|
+
* @private
|
|
9
|
+
*
|
|
10
|
+
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
11
|
+
* compatible context object for config and auth fetching.
|
|
12
|
+
*
|
|
13
|
+
* @param params
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
16
|
+
function generateServerClient(params) {
|
|
17
|
+
const client = {
|
|
18
|
+
[api_graphql_1.__amplify]: params.amplify,
|
|
19
|
+
graphql: internals_1.graphql,
|
|
20
|
+
cancel: internals_1.cancel,
|
|
21
|
+
isCancelError: internals_1.isCancelError,
|
|
22
|
+
models: {},
|
|
23
|
+
};
|
|
24
|
+
return client;
|
|
25
|
+
}
|
|
26
|
+
exports.generateServerClient = generateServerClient;
|
|
27
|
+
//# sourceMappingURL=generateServerClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateServerClient.js","sourceRoot":"","sources":["../../src/internals/generateServerClient.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,0DAKkC;AAClC,kEAI4C;AAE5C;;;;;;;;GAQG;AACH,SAAgB,oBAAoB,CAGlC,MAAoC;IACrC,MAAM,MAAM,GAAG;QACd,CAAC,uBAAS,CAAC,EAAE,MAAM,CAAC,OAAO;QAC3B,OAAO,EAAP,mBAAO;QACP,MAAM,EAAN,kBAAM;QACN,aAAa,EAAb,yBAAa;QACb,MAAM,EAAE,EAAE;KACH,CAAC;IAET,OAAO,MAAoB,CAAC;AAC7B,CAAC;AAbD,oDAaC"}
|
package/lib/internals/index.d.ts
CHANGED
package/lib/internals/index.js
CHANGED
|
@@ -5,4 +5,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
var InternalAPI_1 = require("./InternalAPI");
|
|
6
6
|
exports.InternalAPI = InternalAPI_1.InternalAPI;
|
|
7
7
|
exports.InternalAPIClass = InternalAPI_1.InternalAPIClass;
|
|
8
|
+
var generateServerClient_1 = require("./generateServerClient");
|
|
9
|
+
exports.generateServerClient = generateServerClient_1.generateServerClient;
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,6CAA8D;AAArD,oCAAA,WAAW,CAAA;AAAE,yCAAA,gBAAgB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":";;AAAA,qEAAqE;AACrE,sCAAsC;AACtC,6CAA8D;AAArD,oCAAA,WAAW,CAAA;AAAE,yCAAA,gBAAgB,CAAA;AACtC,+DAA8D;AAArD,sDAAA,oBAAoB,CAAA"}
|
package/lib/server.d.ts
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
export { GraphQLQuery, GraphQLSubscription } from './types';
|
|
2
|
-
import { V6Client, V6ClientSSR, ServerClientGenerationParams } from '@aws-amplify/api-graphql';
|
|
3
|
-
export type { GraphQLResult, GraphQLReturnType, } from '@aws-amplify/api-graphql';
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
*
|
|
7
|
-
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
8
|
-
* compatible context object for config and auth fetching.
|
|
9
|
-
*
|
|
10
|
-
* @param params
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateClient<T extends Record<any, any> = never, ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>>(params: ServerClientGenerationParams): ClientType;
|
|
14
1
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
package/lib/server.js
CHANGED
|
@@ -2,28 +2,6 @@
|
|
|
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
|
-
const internals_1 = require("@aws-amplify/api-graphql/internals");
|
|
6
|
-
const api_graphql_1 = require("@aws-amplify/api-graphql");
|
|
7
|
-
/**
|
|
8
|
-
* @private
|
|
9
|
-
*
|
|
10
|
-
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
11
|
-
* compatible context object for config and auth fetching.
|
|
12
|
-
*
|
|
13
|
-
* @param params
|
|
14
|
-
* @returns
|
|
15
|
-
*/
|
|
16
|
-
function generateClient(params) {
|
|
17
|
-
const client = {
|
|
18
|
-
[api_graphql_1.__amplify]: params.amplify,
|
|
19
|
-
graphql: internals_1.graphql,
|
|
20
|
-
cancel: internals_1.cancel,
|
|
21
|
-
isCancelError: internals_1.isCancelError,
|
|
22
|
-
models: {},
|
|
23
|
-
};
|
|
24
|
-
return client;
|
|
25
|
-
}
|
|
26
|
-
exports.generateClient = generateClient;
|
|
27
5
|
var server_1 = require("@aws-amplify/api-rest/server");
|
|
28
6
|
exports.get = server_1.get;
|
|
29
7
|
exports.put = server_1.put;
|
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;;AAEtC,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ServerClientGenerationParams, V6Client, V6ClientSSR } from '@aws-amplify/api-graphql';
|
|
2
|
+
/**
|
|
3
|
+
* @private
|
|
4
|
+
*
|
|
5
|
+
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
6
|
+
* compatible context object for config and auth fetching.
|
|
7
|
+
*
|
|
8
|
+
* @param params
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateServerClient<T extends Record<any, any> = never, ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>>(params: ServerClientGenerationParams): ClientType;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { __amplify, } from '@aws-amplify/api-graphql';
|
|
4
|
+
import { graphql, cancel, isCancelError, } from '@aws-amplify/api-graphql/internals';
|
|
5
|
+
/**
|
|
6
|
+
* @private
|
|
7
|
+
*
|
|
8
|
+
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
9
|
+
* compatible context object for config and auth fetching.
|
|
10
|
+
*
|
|
11
|
+
* @param params
|
|
12
|
+
* @returns
|
|
13
|
+
*/
|
|
14
|
+
export function generateServerClient(params) {
|
|
15
|
+
const client = {
|
|
16
|
+
[__amplify]: params.amplify,
|
|
17
|
+
graphql,
|
|
18
|
+
cancel,
|
|
19
|
+
isCancelError,
|
|
20
|
+
models: {},
|
|
21
|
+
};
|
|
22
|
+
return client;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=generateServerClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateServerClient.js","sourceRoot":"","sources":["../../src/internals/generateServerClient.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAO,EAIN,SAAS,GACT,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,OAAO,EACP,MAAM,EACN,aAAa,GACb,MAAM,oCAAoC,CAAC;AAE5C;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAGlC,MAAoC;IACrC,MAAM,MAAM,GAAG;QACd,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO;QAC3B,OAAO;QACP,MAAM;QACN,aAAa;QACb,MAAM,EAAE,EAAE;KACH,CAAC;IAET,OAAO,MAAoB,CAAC;AAC7B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
export { InternalAPI, InternalAPIClass } from './InternalAPI';
|
|
4
|
+
export { generateServerClient } from './generateServerClient';
|
|
4
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internals/index.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/lib-esm/server.d.ts
CHANGED
|
@@ -1,14 +1 @@
|
|
|
1
|
-
export { GraphQLQuery, GraphQLSubscription } from './types';
|
|
2
|
-
import { V6Client, V6ClientSSR, ServerClientGenerationParams } from '@aws-amplify/api-graphql';
|
|
3
|
-
export type { GraphQLResult, GraphQLReturnType, } from '@aws-amplify/api-graphql';
|
|
4
|
-
/**
|
|
5
|
-
* @private
|
|
6
|
-
*
|
|
7
|
-
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
8
|
-
* compatible context object for config and auth fetching.
|
|
9
|
-
*
|
|
10
|
-
* @param params
|
|
11
|
-
* @returns
|
|
12
|
-
*/
|
|
13
|
-
export declare function generateClient<T extends Record<any, any> = never, ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>>(params: ServerClientGenerationParams): ClientType;
|
|
14
1
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
package/lib-esm/server.js
CHANGED
|
@@ -1,25 +1,4 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
import { graphql, cancel, isCancelError, } from '@aws-amplify/api-graphql/internals';
|
|
4
|
-
import { __amplify, } from '@aws-amplify/api-graphql';
|
|
5
|
-
/**
|
|
6
|
-
* @private
|
|
7
|
-
*
|
|
8
|
-
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
9
|
-
* compatible context object for config and auth fetching.
|
|
10
|
-
*
|
|
11
|
-
* @param params
|
|
12
|
-
* @returns
|
|
13
|
-
*/
|
|
14
|
-
export function generateClient(params) {
|
|
15
|
-
const client = {
|
|
16
|
-
[__amplify]: params.amplify,
|
|
17
|
-
graphql,
|
|
18
|
-
cancel,
|
|
19
|
-
isCancelError,
|
|
20
|
-
models: {},
|
|
21
|
-
};
|
|
22
|
-
return client;
|
|
23
|
-
}
|
|
24
3
|
export { get, put, post, del, head, patch, isCancelError, } from '@aws-amplify/api-rest/server';
|
|
25
4
|
//# 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;AAEtC,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-unstable.
|
|
3
|
+
"version": "6.0.1-unstable.cfbde4c.0+cfbde4c",
|
|
4
4
|
"description": "Api category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"server"
|
|
52
52
|
],
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@aws-amplify/api-graphql": "4.0.1-unstable.
|
|
55
|
-
"@aws-amplify/api-rest": "4.0.1-unstable.
|
|
54
|
+
"@aws-amplify/api-graphql": "4.0.1-unstable.cfbde4c.0+cfbde4c",
|
|
55
|
+
"@aws-amplify/api-rest": "4.0.1-unstable.cfbde4c.0+cfbde4c",
|
|
56
56
|
"tslib": "^2.5.0"
|
|
57
57
|
},
|
|
58
58
|
"jest": {
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"lib-esm"
|
|
100
100
|
]
|
|
101
101
|
},
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "cfbde4c7962de77bd43ba20811b84c4d7d333b42"
|
|
103
103
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ServerClientGenerationParams,
|
|
6
|
+
V6Client,
|
|
7
|
+
V6ClientSSR,
|
|
8
|
+
__amplify,
|
|
9
|
+
} from '@aws-amplify/api-graphql';
|
|
10
|
+
import {
|
|
11
|
+
graphql,
|
|
12
|
+
cancel,
|
|
13
|
+
isCancelError,
|
|
14
|
+
} from '@aws-amplify/api-graphql/internals';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @private
|
|
18
|
+
*
|
|
19
|
+
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
20
|
+
* compatible context object for config and auth fetching.
|
|
21
|
+
*
|
|
22
|
+
* @param params
|
|
23
|
+
* @returns
|
|
24
|
+
*/
|
|
25
|
+
export function generateServerClient<
|
|
26
|
+
T extends Record<any, any> = never,
|
|
27
|
+
ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>
|
|
28
|
+
>(params: ServerClientGenerationParams): ClientType {
|
|
29
|
+
const client = {
|
|
30
|
+
[__amplify]: params.amplify,
|
|
31
|
+
graphql,
|
|
32
|
+
cancel,
|
|
33
|
+
isCancelError,
|
|
34
|
+
models: {},
|
|
35
|
+
} as any;
|
|
36
|
+
|
|
37
|
+
return client as ClientType;
|
|
38
|
+
}
|
package/src/internals/index.ts
CHANGED
package/src/server.ts
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
|
-
export { GraphQLQuery, GraphQLSubscription } from './types';
|
|
5
|
-
import {
|
|
6
|
-
graphql,
|
|
7
|
-
cancel,
|
|
8
|
-
isCancelError,
|
|
9
|
-
} from '@aws-amplify/api-graphql/internals';
|
|
10
|
-
import {
|
|
11
|
-
AmplifyServer,
|
|
12
|
-
getAmplifyServerContext,
|
|
13
|
-
} from '@aws-amplify/core/internals/adapter-core';
|
|
14
|
-
|
|
15
|
-
import {
|
|
16
|
-
__amplify,
|
|
17
|
-
V6Client,
|
|
18
|
-
V6ClientSSR,
|
|
19
|
-
ServerClientGenerationParams,
|
|
20
|
-
} from '@aws-amplify/api-graphql';
|
|
21
|
-
|
|
22
|
-
export type {
|
|
23
|
-
GraphQLResult,
|
|
24
|
-
GraphQLReturnType,
|
|
25
|
-
} from '@aws-amplify/api-graphql';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* @private
|
|
29
|
-
*
|
|
30
|
-
* Creates a client that can be used to make GraphQL requests, using a provided `AmplifyClassV6`
|
|
31
|
-
* compatible context object for config and auth fetching.
|
|
32
|
-
*
|
|
33
|
-
* @param params
|
|
34
|
-
* @returns
|
|
35
|
-
*/
|
|
36
|
-
export function generateClient<
|
|
37
|
-
T extends Record<any, any> = never,
|
|
38
|
-
ClientType extends V6ClientSSR<T> | V6Client<T> = V6ClientSSR<T>
|
|
39
|
-
>(params: ServerClientGenerationParams): ClientType {
|
|
40
|
-
const client = {
|
|
41
|
-
[__amplify]: params.amplify,
|
|
42
|
-
graphql,
|
|
43
|
-
cancel,
|
|
44
|
-
isCancelError,
|
|
45
|
-
models: {},
|
|
46
|
-
} as any;
|
|
47
|
-
|
|
48
|
-
return client as ClientType;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
4
|
export {
|
|
52
5
|
get,
|
|
53
6
|
put,
|