@aws-amplify/api 4.0.33-cloud-logging.9 → 4.0.33-unstable.10

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.
@@ -9889,9 +9889,9 @@ function () {
9889
9889
  /**
9890
9890
  * Executes a GraphQL operation
9891
9891
  *
9892
- * @param {GraphQLOptions} GraphQL Options
9893
- * @param {object} additionalHeaders headers to merge in after any `graphql_headers` set in the config
9894
- * @returns {Promise<GraphQLResult> | Observable<object>}
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
- throw new Error("invalid operation type: " + operationType);
9945
+ default:
9946
+ throw new Error("invalid operation type: " + operationType);
9947
+ }
9947
9948
  };
9948
9949
 
9949
9950
  GraphQLAPIClass.prototype._graphql = function (_a, additionalHeaders, initParams) {
@@ -12749,11 +12750,7 @@ function (_super) {
12749
12750
  };
12750
12751
 
12751
12752
  AWSAppSyncRealTimeProvider.prototype._handleIncomingSubscriptionMessage = function (message) {
12752
- if (message.data && message.data === '{"type":"ka"}') {
12753
- logger.verbose("subscription message from AWS AppSync RealTime: " + message.data);
12754
- } else {
12755
- logger.debug("subscription message from AWS AppSync RealTime: " + message.data);
12756
- }
12753
+ logger.debug("subscription message from AWS AppSync RealTime: " + message.data);
12757
12754
 
12758
12755
  var _a = JSON.parse(message.data),
12759
12756
  _b = _a.id,
@@ -12772,21 +12769,12 @@ function (_super) {
12772
12769
  subscriptionReadyCallback = _c.subscriptionReadyCallback,
12773
12770
  subscriptionFailedCallback = _c.subscriptionFailedCallback;
12774
12771
 
12775
- if (!id && !observer && !query && Object.keys(variables).length === 0) {
12776
- logger.verbose({
12777
- id: id,
12778
- observer: observer,
12779
- query: query,
12780
- variables: variables
12781
- });
12782
- } else {
12783
- logger.debug({
12784
- id: id,
12785
- observer: observer,
12786
- query: query,
12787
- variables: variables
12788
- });
12789
- }
12772
+ logger.debug({
12773
+ id: id,
12774
+ observer: observer,
12775
+ query: query,
12776
+ variables: variables
12777
+ });
12790
12778
 
12791
12779
  if (type === MESSAGE_TYPES.GQL_DATA && payload && payload.data) {
12792
12780
  if (observer) {
@@ -15211,10 +15199,10 @@ function () {
15211
15199
  };
15212
15200
  /**
15213
15201
  * Make a GET request
15214
- * @param {string} apiName - The api name of the request
15215
- * @param {string} path - The path of the request
15216
- * @param {json} [init] - Request extra params
15217
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15218
15206
  */
15219
15207
 
15220
15208
 
@@ -15223,10 +15211,10 @@ function () {
15223
15211
  };
15224
15212
  /**
15225
15213
  * Make a POST request
15226
- * @param {string} apiName - The api name of the request
15227
- * @param {string} path - The path of the request
15228
- * @param {json} [init] - Request extra params
15229
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15230
15218
  */
15231
15219
 
15232
15220
 
@@ -15235,10 +15223,10 @@ function () {
15235
15223
  };
15236
15224
  /**
15237
15225
  * Make a PUT request
15238
- * @param {string} apiName - The api name of the request
15239
- * @param {string} path - The path of the request
15240
- * @param {json} [init] - Request extra params
15241
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15242
15230
  */
15243
15231
 
15244
15232
 
@@ -15247,10 +15235,10 @@ function () {
15247
15235
  };
15248
15236
  /**
15249
15237
  * Make a PATCH request
15250
- * @param {string} apiName - The api name of the request
15251
- * @param {string} path - The path of the request
15252
- * @param {json} [init] - Request extra params
15253
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15254
15242
  */
15255
15243
 
15256
15244
 
@@ -15259,10 +15247,10 @@ function () {
15259
15247
  };
15260
15248
  /**
15261
15249
  * Make a DEL request
15262
- * @param {string} apiName - The api name of the request
15263
- * @param {string} path - The path of the request
15264
- * @param {json} [init] - Request extra params
15265
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15266
15254
  */
15267
15255
 
15268
15256
 
@@ -15271,10 +15259,10 @@ function () {
15271
15259
  };
15272
15260
  /**
15273
15261
  * Make a HEAD request
15274
- * @param {string} apiName - The api name of the request
15275
- * @param {string} path - The path of the request
15276
- * @param {json} [init] - Request extra params
15277
- * @return {Promise} - A promise that resolves to an object with response status and JSON data, if successful.
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.
15278
15266
  */
15279
15267
 
15280
15268
 
@@ -15283,8 +15271,8 @@ function () {
15283
15271
  };
15284
15272
  /**
15285
15273
  * Checks to see if an error thrown is from an api request cancellation
15286
- * @param {any} error - Any error
15287
- * @return {boolean} - A boolean indicating if the error was from an api request cancellation
15274
+ * @param error - Any error
15275
+ * @return If the error was from an api request cancellation
15288
15276
  */
15289
15277
 
15290
15278
 
@@ -15293,8 +15281,9 @@ function () {
15293
15281
  };
15294
15282
  /**
15295
15283
  * Cancels an inflight request
15296
- * @param {any} request - request to cancel
15297
- * @return {boolean} - A boolean indicating if the request was cancelled
15284
+ * @param request - request to cancel
15285
+ * @param [message] - custom error message
15286
+ * @return If the request was cancelled
15298
15287
  */
15299
15288
 
15300
15289
 
@@ -15303,8 +15292,8 @@ function () {
15303
15292
  };
15304
15293
  /**
15305
15294
  * Getting endpoint for API
15306
- * @param {string} apiName - The name of the api
15307
- * @return {string} - The endpoint of the api
15295
+ * @param apiName - The name of the api
15296
+ * @return The endpoint of the api
15308
15297
  */
15309
15298
 
15310
15299
 
@@ -15326,14 +15315,6 @@ function () {
15326
15315
  APIClass.prototype.getGraphqlOperationType = function (operation) {
15327
15316
  return this._graphqlApi.getGraphqlOperationType(operation);
15328
15317
  };
15329
- /**
15330
- * Executes a GraphQL operation
15331
- *
15332
- * @param {GraphQLOptions} GraphQL Options
15333
- * @param {object} additionalHeaders headers to merge in after any `graphql_headers` set in the config
15334
- * @returns {Promise<GraphQLResult> | Observable<object>}
15335
- */
15336
-
15337
15318
 
15338
15319
  APIClass.prototype.graphql = function (options, additionalHeaders) {
15339
15320
  return this._graphqlApi.graphql(options, additionalHeaders);