@aws-amplify/api 4.0.33-unstable.7 → 4.0.33
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/CHANGELOG.md +11 -0
- package/dist/aws-amplify-api.js +37 -43
- package/dist/aws-amplify-api.js.map +1 -1
- package/dist/aws-amplify-api.min.js +1 -1
- package/dist/aws-amplify-api.min.js.map +1 -1
- package/lib/API.d.ts +62 -44
- package/lib/API.js +31 -37
- package/lib/API.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/index.d.ts +7 -0
- package/lib-esm/API.d.ts +62 -44
- package/lib-esm/API.js +31 -37
- package/lib-esm/API.js.map +1 -1
- package/lib-esm/index.d.ts +1 -0
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/index.d.ts +7 -0
- package/package.json +4 -4
- package/src/API.ts +86 -46
- package/src/index.ts +2 -0
- package/src/types/index.ts +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.33](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.32...@aws-amplify/api@4.0.33) (2022-02-28)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **@aws-amplify/api:** Improve API.graphql return type ([#9197](https://github.com/aws-amplify/amplify-js/issues/9197)) ([9a0531b](https://github.com/aws-amplify/amplify-js/commit/9a0531b11e9eb6659d36ca0c51c642b3d947f63c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.0.32](https://github.com/aws-amplify/amplify-js/compare/@aws-amplify/api@4.0.31...@aws-amplify/api@4.0.32) (2022-02-03)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @aws-amplify/api
|
package/dist/aws-amplify-api.js
CHANGED
|
@@ -9889,9 +9889,9 @@ function () {
|
|
|
9889
9889
|
/**
|
|
9890
9890
|
* Executes a GraphQL operation
|
|
9891
9891
|
*
|
|
9892
|
-
* @param
|
|
9893
|
-
* @param
|
|
9894
|
-
* @returns
|
|
9892
|
+
* @param options - GraphQL Options
|
|
9893
|
+
* @param [additionalHeaders] - headers to merge in after any `graphql_headers` set in the config
|
|
9894
|
+
* @returns An Observable if the query is a subscription query, else a promise of the graphql result.
|
|
9895
9895
|
*/
|
|
9896
9896
|
|
|
9897
9897
|
|
|
@@ -9941,9 +9941,10 @@ function () {
|
|
|
9941
9941
|
variables: variables,
|
|
9942
9942
|
authMode: authMode
|
|
9943
9943
|
}, headers);
|
|
9944
|
-
}
|
|
9945
9944
|
|
|
9946
|
-
|
|
9945
|
+
default:
|
|
9946
|
+
throw new Error("invalid operation type: " + operationType);
|
|
9947
|
+
}
|
|
9947
9948
|
};
|
|
9948
9949
|
|
|
9949
9950
|
GraphQLAPIClass.prototype._graphql = function (_a, additionalHeaders, initParams) {
|
|
@@ -15198,10 +15199,10 @@ function () {
|
|
|
15198
15199
|
};
|
|
15199
15200
|
/**
|
|
15200
15201
|
* Make a GET request
|
|
15201
|
-
* @param
|
|
15202
|
-
* @param
|
|
15203
|
-
* @param
|
|
15204
|
-
* @return
|
|
15202
|
+
* @param apiName - The api name of the request
|
|
15203
|
+
* @param path - The path of the request
|
|
15204
|
+
* @param [init] - Request extra params
|
|
15205
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15205
15206
|
*/
|
|
15206
15207
|
|
|
15207
15208
|
|
|
@@ -15210,10 +15211,10 @@ function () {
|
|
|
15210
15211
|
};
|
|
15211
15212
|
/**
|
|
15212
15213
|
* Make a POST request
|
|
15213
|
-
* @param
|
|
15214
|
-
* @param
|
|
15215
|
-
* @param
|
|
15216
|
-
* @return
|
|
15214
|
+
* @param apiName - The api name of the request
|
|
15215
|
+
* @param path - The path of the request
|
|
15216
|
+
* @param [init] - Request extra params
|
|
15217
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15217
15218
|
*/
|
|
15218
15219
|
|
|
15219
15220
|
|
|
@@ -15222,10 +15223,10 @@ function () {
|
|
|
15222
15223
|
};
|
|
15223
15224
|
/**
|
|
15224
15225
|
* Make a PUT request
|
|
15225
|
-
* @param
|
|
15226
|
-
* @param
|
|
15227
|
-
* @param
|
|
15228
|
-
* @return
|
|
15226
|
+
* @param apiName - The api name of the request
|
|
15227
|
+
* @param path - The path of the request
|
|
15228
|
+
* @param [init] - Request extra params
|
|
15229
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15229
15230
|
*/
|
|
15230
15231
|
|
|
15231
15232
|
|
|
@@ -15234,10 +15235,10 @@ function () {
|
|
|
15234
15235
|
};
|
|
15235
15236
|
/**
|
|
15236
15237
|
* Make a PATCH request
|
|
15237
|
-
* @param
|
|
15238
|
-
* @param
|
|
15239
|
-
* @param
|
|
15240
|
-
* @return
|
|
15238
|
+
* @param apiName - The api name of the request
|
|
15239
|
+
* @param path - The path of the request
|
|
15240
|
+
* @param [init] - Request extra params
|
|
15241
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15241
15242
|
*/
|
|
15242
15243
|
|
|
15243
15244
|
|
|
@@ -15246,10 +15247,10 @@ function () {
|
|
|
15246
15247
|
};
|
|
15247
15248
|
/**
|
|
15248
15249
|
* Make a DEL request
|
|
15249
|
-
* @param
|
|
15250
|
-
* @param
|
|
15251
|
-
* @param
|
|
15252
|
-
* @return
|
|
15250
|
+
* @param apiName - The api name of the request
|
|
15251
|
+
* @param path - The path of the request
|
|
15252
|
+
* @param [init] - Request extra params
|
|
15253
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15253
15254
|
*/
|
|
15254
15255
|
|
|
15255
15256
|
|
|
@@ -15258,10 +15259,10 @@ function () {
|
|
|
15258
15259
|
};
|
|
15259
15260
|
/**
|
|
15260
15261
|
* Make a HEAD request
|
|
15261
|
-
* @param
|
|
15262
|
-
* @param
|
|
15263
|
-
* @param
|
|
15264
|
-
* @return
|
|
15262
|
+
* @param apiName - The api name of the request
|
|
15263
|
+
* @param path - The path of the request
|
|
15264
|
+
* @param [init] - Request extra params
|
|
15265
|
+
* @return A promise that resolves to an object with response status and JSON data, if successful.
|
|
15265
15266
|
*/
|
|
15266
15267
|
|
|
15267
15268
|
|
|
@@ -15270,8 +15271,8 @@ function () {
|
|
|
15270
15271
|
};
|
|
15271
15272
|
/**
|
|
15272
15273
|
* Checks to see if an error thrown is from an api request cancellation
|
|
15273
|
-
* @param
|
|
15274
|
-
* @return
|
|
15274
|
+
* @param error - Any error
|
|
15275
|
+
* @return If the error was from an api request cancellation
|
|
15275
15276
|
*/
|
|
15276
15277
|
|
|
15277
15278
|
|
|
@@ -15280,8 +15281,9 @@ function () {
|
|
|
15280
15281
|
};
|
|
15281
15282
|
/**
|
|
15282
15283
|
* Cancels an inflight request
|
|
15283
|
-
* @param
|
|
15284
|
-
* @
|
|
15284
|
+
* @param request - request to cancel
|
|
15285
|
+
* @param [message] - custom error message
|
|
15286
|
+
* @return If the request was cancelled
|
|
15285
15287
|
*/
|
|
15286
15288
|
|
|
15287
15289
|
|
|
@@ -15290,8 +15292,8 @@ function () {
|
|
|
15290
15292
|
};
|
|
15291
15293
|
/**
|
|
15292
15294
|
* Getting endpoint for API
|
|
15293
|
-
* @param
|
|
15294
|
-
* @return
|
|
15295
|
+
* @param apiName - The name of the api
|
|
15296
|
+
* @return The endpoint of the api
|
|
15295
15297
|
*/
|
|
15296
15298
|
|
|
15297
15299
|
|
|
@@ -15313,14 +15315,6 @@ function () {
|
|
|
15313
15315
|
APIClass.prototype.getGraphqlOperationType = function (operation) {
|
|
15314
15316
|
return this._graphqlApi.getGraphqlOperationType(operation);
|
|
15315
15317
|
};
|
|
15316
|
-
/**
|
|
15317
|
-
* Executes a GraphQL operation
|
|
15318
|
-
*
|
|
15319
|
-
* @param {GraphQLOptions} GraphQL Options
|
|
15320
|
-
* @param {object} additionalHeaders headers to merge in after any `graphql_headers` set in the config
|
|
15321
|
-
* @returns {Promise<GraphQLResult> | Observable<object>}
|
|
15322
|
-
*/
|
|
15323
|
-
|
|
15324
15318
|
|
|
15325
15319
|
APIClass.prototype.graphql = function (options, additionalHeaders) {
|
|
15326
15320
|
return this._graphqlApi.graphql(options, additionalHeaders);
|