@aws-amplify/api 4.0.49-next.32 → 4.0.49-next.36
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 +131 -0
- package/lib/API.js +2 -2
- package/lib/API.js.map +1 -1
- package/lib/index.d.ts +4 -0
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +13 -0
- package/lib-esm/API.js +2 -2
- package/lib-esm/API.js.map +1 -1
- package/lib-esm/index.js +1 -1
- package/package.json +6 -5
- package/src/API.ts +2 -2
- package/src/index.ts +1 -1
package/lib/API.d.ts
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { AWSAppSyncRealTimeProvider } from '@aws-amplify/pubsub';
|
|
2
|
+
import { GraphQLOptions, GraphQLResult, GraphQLOperation, OperationTypeNode } from '@aws-amplify/api-graphql';
|
|
3
|
+
import Observable from 'zen-observable-ts';
|
|
4
|
+
import { GraphQLQuery, GraphQLSubscription } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated
|
|
7
|
+
* Use RestApi or GraphQLAPI to reduce your application bundle size
|
|
8
|
+
* Export Cloud Logic APIs
|
|
9
|
+
*/
|
|
10
|
+
export declare class APIClass {
|
|
11
|
+
/**
|
|
12
|
+
* Initialize API with AWS configuration
|
|
13
|
+
* @param {Object} options - Configuration object for API
|
|
14
|
+
*/
|
|
15
|
+
private _options;
|
|
16
|
+
private _restApi;
|
|
17
|
+
private _graphqlApi;
|
|
18
|
+
Auth: import("@aws-amplify/auth/lib-esm/Auth").AuthClass;
|
|
19
|
+
Cache: import("@aws-amplify/cache/lib-esm/types").ICache;
|
|
20
|
+
Credentials: import("@aws-amplify/core").CredentialsClass;
|
|
21
|
+
/**
|
|
22
|
+
* Initialize API with AWS configuration
|
|
23
|
+
* @param {Object} options - Configuration object for API
|
|
24
|
+
*/
|
|
25
|
+
constructor(options: any);
|
|
26
|
+
getModuleName(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Configure API part with aws configurations
|
|
29
|
+
* @param {Object} config - Configuration of the API
|
|
30
|
+
* @return {Object} - The current configuration
|
|
31
|
+
*/
|
|
32
|
+
configure(options: any): any;
|
|
33
|
+
/**
|
|
34
|
+
* Make a GET request
|
|
35
|
+
* @param apiName - The api name of the request
|
|
36
|
+
* @param path - The path of the request
|
|
37
|
+
* @param [init] - Request extra params
|
|
38
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
39
|
+
*/
|
|
40
|
+
get(apiName: string, path: string, init: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Make a POST request
|
|
45
|
+
* @param apiName - The api name of the request
|
|
46
|
+
* @param path - The path of the request
|
|
47
|
+
* @param [init] - Request extra params
|
|
48
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
49
|
+
*/
|
|
50
|
+
post(apiName: string, path: string, init: {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}): Promise<any>;
|
|
53
|
+
/**
|
|
54
|
+
* Make a PUT request
|
|
55
|
+
* @param apiName - The api name of the request
|
|
56
|
+
* @param path - The path of the request
|
|
57
|
+
* @param [init] - Request extra params
|
|
58
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
59
|
+
*/
|
|
60
|
+
put(apiName: string, path: string, init: {
|
|
61
|
+
[key: string]: any;
|
|
62
|
+
}): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* Make a PATCH request
|
|
65
|
+
* @param apiName - The api name of the request
|
|
66
|
+
* @param path - The path of the request
|
|
67
|
+
* @param [init] - Request extra params
|
|
68
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
69
|
+
*/
|
|
70
|
+
patch(apiName: string, path: string, init: {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}): Promise<any>;
|
|
73
|
+
/**
|
|
74
|
+
* Make a DEL request
|
|
75
|
+
* @param apiName - The api name of the request
|
|
76
|
+
* @param path - The path of the request
|
|
77
|
+
* @param [init] - Request extra params
|
|
78
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
79
|
+
*/
|
|
80
|
+
del(apiName: string, path: string, init: {
|
|
81
|
+
[key: string]: any;
|
|
82
|
+
}): Promise<any>;
|
|
83
|
+
/**
|
|
84
|
+
* Make a HEAD request
|
|
85
|
+
* @param apiName - The api name of the request
|
|
86
|
+
* @param path - The path of the request
|
|
87
|
+
* @param [init] - Request extra params
|
|
88
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
89
|
+
*/
|
|
90
|
+
head(apiName: string, path: string, init: {
|
|
91
|
+
[key: string]: any;
|
|
92
|
+
}): Promise<any>;
|
|
93
|
+
/**
|
|
94
|
+
* Checks to see if an error thrown is from an api request cancellation
|
|
95
|
+
* @param error - Any error
|
|
96
|
+
* @return If the error was from an api request cancellation
|
|
97
|
+
*/
|
|
98
|
+
isCancel(error: any): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Cancels an inflight request for either a GraphQL request or a Rest API request.
|
|
101
|
+
* @param request - request to cancel
|
|
102
|
+
* @param [message] - custom error message
|
|
103
|
+
* @return If the request was cancelled
|
|
104
|
+
*/
|
|
105
|
+
cancel(request: Promise<any>, message?: string): boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Getting endpoint for API
|
|
108
|
+
* @param apiName - The name of the api
|
|
109
|
+
* @return The endpoint of the api
|
|
110
|
+
*/
|
|
111
|
+
endpoint(apiName: string): Promise<string>;
|
|
112
|
+
/**
|
|
113
|
+
* to get the operation type
|
|
114
|
+
* @param operation
|
|
115
|
+
*/
|
|
116
|
+
getGraphqlOperationType(operation: GraphQLOperation): OperationTypeNode;
|
|
117
|
+
/**
|
|
118
|
+
* Executes a GraphQL operation
|
|
119
|
+
*
|
|
120
|
+
* @param options - GraphQL Options
|
|
121
|
+
* @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
|
|
122
|
+
* @returns An Observable if queryType is 'subscription', else a promise of the graphql result from the query.
|
|
123
|
+
*/
|
|
124
|
+
graphql<T>(options: GraphQLOptions, additionalHeaders?: {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
}): T extends GraphQLQuery<T> ? Promise<GraphQLResult<T>> : T extends GraphQLSubscription<T> ? Observable<{
|
|
127
|
+
provider: AWSAppSyncRealTimeProvider;
|
|
128
|
+
value: GraphQLResult<T>;
|
|
129
|
+
}> : Promise<GraphQLResult<any>> | Observable<object>;
|
|
130
|
+
}
|
|
131
|
+
export declare const API: APIClass;
|
package/lib/API.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
/*
|
|
5
|
-
* Copyright 2017-
|
|
5
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
6
6
|
*
|
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
8
8
|
* the License. A copy of the License is located at
|
|
@@ -31,7 +31,7 @@ var APIClass = /** @class */ (function () {
|
|
|
31
31
|
*/
|
|
32
32
|
function APIClass(options) {
|
|
33
33
|
this.Auth = auth_1.Auth;
|
|
34
|
-
this.Cache = cache_1.
|
|
34
|
+
this.Cache = cache_1.Cache;
|
|
35
35
|
this.Credentials = core_1.Credentials;
|
|
36
36
|
this._options = options;
|
|
37
37
|
this._restApi = new api_rest_1.RestAPIClass(options);
|
package/lib/API.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,0CAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;GAWG;AACH,0CAAyC;AACzC,4CAA2C;AAE3C,kDAAqD;AACrD,wDAMkC;AACl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C,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YAC1C,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SAC9C;aAAM,IAAI,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;YACpD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;SACjD;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED;;;;OAIG;IACG,2BAAQ,GAAd,UAAe,OAAe;;;gBAC7B,sBAAO,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAC;;;KACvC;IAED;;;OAGG;IACH,0CAAuB,GAAvB,UAAwB,SAA2B;QAClD,OAAO,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;IAC5D,CAAC;IAoBD,0BAAO,GAAP,UACC,OAAuB,EACvB,iBAA6C;QAE7C,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;IAC7D,CAAC;IACF,eAAC;AAAD,CAAC,AA3MD,IA2MC;AA3MY,4BAAQ;AA6MR,QAAA,GAAG,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC;AACtC,cAAO,CAAC,QAAQ,CAAC,WAAG,CAAC,CAAC"}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2017-
|
|
3
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
6
|
* the License. A copy of the License is located at
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This exports from the types directory is a temporary workaround, since Amplify CLI currently
|
|
3
|
+
* generates code that relies on this import path https://github.com/aws-amplify/amplify-cli/issues/3863
|
|
4
|
+
* This will be removed in future release when CLI and customers moves to recommeneded import styles.
|
|
5
|
+
*/
|
|
6
|
+
export { graphqlOperation, GraphQLAuthError, GraphQLResult, GRAPHQL_AUTH_MODE, } from '@aws-amplify/api-graphql';
|
|
7
|
+
declare const queryType: unique symbol;
|
|
8
|
+
export declare type GraphQLQuery<T> = T & {
|
|
9
|
+
readonly [queryType]: 'query';
|
|
10
|
+
};
|
|
11
|
+
export declare type GraphQLSubscription<T> = T & {
|
|
12
|
+
readonly [queryType]: 'subscription';
|
|
13
|
+
};
|
package/lib-esm/API.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright 2017-
|
|
3
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
4
4
|
*
|
|
5
5
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
6
6
|
* the License. A copy of the License is located at
|
|
@@ -12,7 +12,7 @@ import { __assign, __awaiter, __generator } from "tslib";
|
|
|
12
12
|
* and limitations under the License.
|
|
13
13
|
*/
|
|
14
14
|
import { Auth } from '@aws-amplify/auth';
|
|
15
|
-
import {
|
|
15
|
+
import { Cache } from '@aws-amplify/cache';
|
|
16
16
|
import { RestAPIClass } from '@aws-amplify/api-rest';
|
|
17
17
|
import { GraphQLAPIClass, } from '@aws-amplify/api-graphql';
|
|
18
18
|
import { Amplify, ConsoleLogger as Logger, Credentials, } from '@aws-amplify/core';
|
package/lib-esm/API.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"API.js","sourceRoot":"","sources":["../src/API.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,IAAI,EAAE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AAI,CAAC,CAAC;AACtC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC"}
|
package/lib-esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
5
|
* the License. A copy of the License is located at
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/api",
|
|
3
|
-
"version": "4.0.49-next.
|
|
3
|
+
"version": "4.0.49-next.36+580cda186",
|
|
4
4
|
"description": "Api category of aws-amplify",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"module": "./lib-esm/index.js",
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
"build": "npm run clean && npm run build:esm && npm run build:cjs",
|
|
36
36
|
"clean": "rimraf lib-esm lib dist",
|
|
37
37
|
"format": "echo \"Not implemented\"",
|
|
38
|
-
"lint": "tslint 'src/**/*.ts'"
|
|
38
|
+
"lint": "tslint 'src/**/*.ts' && npm run ts-coverage",
|
|
39
|
+
"ts-coverage": "typescript-coverage-report -p ./tsconfig.build.json -t 91.93"
|
|
39
40
|
},
|
|
40
41
|
"repository": {
|
|
41
42
|
"type": "git",
|
|
@@ -57,8 +58,8 @@
|
|
|
57
58
|
"index.*.d.ts"
|
|
58
59
|
],
|
|
59
60
|
"dependencies": {
|
|
60
|
-
"@aws-amplify/api-graphql": "2.3.13-next.
|
|
61
|
-
"@aws-amplify/api-rest": "2.0.49-next.
|
|
61
|
+
"@aws-amplify/api-graphql": "2.3.13-next.36+580cda186",
|
|
62
|
+
"@aws-amplify/api-rest": "2.0.49-next.36+580cda186",
|
|
62
63
|
"tslib": "^2.0.0"
|
|
63
64
|
},
|
|
64
65
|
"jest": {
|
|
@@ -105,5 +106,5 @@
|
|
|
105
106
|
"lib-esm"
|
|
106
107
|
]
|
|
107
108
|
},
|
|
108
|
-
"gitHead": "
|
|
109
|
+
"gitHead": "580cda186f10ead3bb99acb7a4825c435c657d33"
|
|
109
110
|
}
|
package/src/API.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
5
|
* the License. A copy of the License is located at
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* and limitations under the License.
|
|
12
12
|
*/
|
|
13
13
|
import { Auth } from '@aws-amplify/auth';
|
|
14
|
-
import {
|
|
14
|
+
import { Cache } from '@aws-amplify/cache';
|
|
15
15
|
import { AWSAppSyncRealTimeProvider } from '@aws-amplify/pubsub';
|
|
16
16
|
import { RestAPIClass } from '@aws-amplify/api-rest';
|
|
17
17
|
import {
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2017-
|
|
2
|
+
* Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
|
|
5
5
|
* the License. A copy of the License is located at
|