@aws-amplify/api-graphql 4.0.1-console-preview.b5a42af.0 → 4.0.1-console-preview.4ae78ed.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.
@@ -21,5 +21,17 @@ export declare class GraphQLAPIClass extends InternalGraphQLAPIClass {
21
21
  graphql<T = any>(options: GraphQLOptions, additionalHeaders?: {
22
22
  [key: string]: string;
23
23
  }): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>>;
24
+ /**
25
+ * Checks to see if an error thrown is from an api request cancellation
26
+ * @param error - Any error
27
+ * @returns A boolean indicating if the error was from an api request cancellation
28
+ */
29
+ isCancelError(error: any): boolean;
30
+ /**
31
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
32
+ * @param {any} request - request to cancel
33
+ * @returns A boolean indicating if the request was cancelled
34
+ */
35
+ cancel(request: Promise<any>, message?: string): boolean;
24
36
  }
25
37
  export declare const GraphQLAPI: GraphQLAPIClass;
@@ -29,6 +29,22 @@ var GraphQLAPIClass = /** @class */ (function (_super) {
29
29
  GraphQLAPIClass.prototype.graphql = function (options, additionalHeaders) {
30
30
  return _super.prototype.graphql.call(this, options, additionalHeaders);
31
31
  };
32
+ /**
33
+ * Checks to see if an error thrown is from an api request cancellation
34
+ * @param error - Any error
35
+ * @returns A boolean indicating if the error was from an api request cancellation
36
+ */
37
+ GraphQLAPIClass.prototype.isCancelError = function (error) {
38
+ return _super.prototype.isCancelError.call(this, error);
39
+ };
40
+ /**
41
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
42
+ * @param {any} request - request to cancel
43
+ * @returns A boolean indicating if the request was cancelled
44
+ */
45
+ GraphQLAPIClass.prototype.cancel = function (request, message) {
46
+ return _super.prototype.cancel.call(this, request, message);
47
+ };
32
48
  return GraphQLAPIClass;
33
49
  }(InternalGraphQLAPIClass));
34
50
  export { GraphQLAPIClass };
@@ -41,6 +41,18 @@ export declare class InternalGraphQLAPIClass {
41
41
  [key: string]: string;
42
42
  }, customUserAgentDetails?: CustomUserAgentDetails): Observable<GraphQLResult<T>> | Promise<GraphQLResult<T>>;
43
43
  private _graphql;
44
+ /**
45
+ * Checks to see if an error thrown is from an api request cancellation
46
+ * @param {any} error - Any error
47
+ * @return {boolean} - A boolean indicating if the error was from an api request cancellation
48
+ */
49
+ isCancelError(error: any): boolean;
50
+ /**
51
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
52
+ * @param {any} request - request to cancel
53
+ * @returns - A boolean indicating if the request was cancelled
54
+ */
55
+ cancel(request: Promise<any>, message?: string): boolean;
44
56
  private _graphqlSubscribe;
45
57
  }
46
58
  export declare const InternalGraphQLAPI: InternalGraphQLAPIClass;
@@ -5,7 +5,8 @@ import { print, parse, GraphQLError, } from 'graphql';
5
5
  import { Amplify, Cache, fetchAuthSession } from '@aws-amplify/core';
6
6
  import { ConsoleLogger as Logger, getAmplifyUserAgent, } from '@aws-amplify/core/internals/utils';
7
7
  import { GraphQLAuthError, } from '../types';
8
- import { post } from '@aws-amplify/api-rest/internals';
8
+ import { isCancelError as isCancelErrorREST } from '@aws-amplify/api-rest';
9
+ import { post, cancel as cancelREST, updateRequestToBeCancellable, } from '@aws-amplify/api-rest/internals';
9
10
  import { AWSAppSyncRealTimeProvider } from '../Providers/AWSAppSyncRealTimeProvider';
10
11
  var USER_AGENT_HEADER = 'x-amz-user-agent';
11
12
  var logger = new Logger('GraphQLAPI');
@@ -27,25 +28,26 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
27
28
  */
28
29
  function InternalGraphQLAPIClass(options) {
29
30
  this.Cache = Cache;
30
- this._api = { post: post };
31
+ this._api = { post: post, updateRequestToBeCancellable: updateRequestToBeCancellable };
31
32
  this._options = options;
32
33
  logger.debug('API Options', this._options);
33
34
  }
34
35
  InternalGraphQLAPIClass.prototype.getModuleName = function () {
35
36
  return 'InternalGraphQLAPI';
36
37
  };
37
- InternalGraphQLAPIClass.prototype._headerBasedAuth = function (defaultAuthenticationType, additionalHeaders, customUserAgentDetails) {
38
+ InternalGraphQLAPIClass.prototype._headerBasedAuth = function (authMode, additionalHeaders) {
38
39
  if (additionalHeaders === void 0) { additionalHeaders = {}; }
39
40
  var _a;
40
41
  return __awaiter(this, void 0, void 0, function () {
41
- var config, _b, region, appSyncGraphqlEndpoint, apiKey, defaultAuthMode, headers, _c, session, token, e_1;
42
+ var config, _b, region, appSyncGraphqlEndpoint, apiKey, defaultAuthMode, authenticationType, headers, _c, session, token, e_1;
42
43
  return __generator(this, function (_d) {
43
44
  switch (_d.label) {
44
45
  case 0:
45
46
  config = Amplify.getConfig();
46
47
  _b = config.API.GraphQL, region = _b.region, appSyncGraphqlEndpoint = _b.endpoint, apiKey = _b.apiKey, defaultAuthMode = _b.defaultAuthMode;
48
+ authenticationType = authMode || defaultAuthMode || 'iam';
47
49
  headers = {};
48
- _c = defaultAuthMode;
50
+ _c = authenticationType;
49
51
  switch (_c) {
50
52
  case 'apiKey': return [3 /*break*/, 1];
51
53
  case 'iam': return [3 /*break*/, 2];
@@ -138,7 +140,9 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
138
140
  switch (operationType) {
139
141
  case 'query':
140
142
  case 'mutation':
141
- var responsePromise = this._graphql({ query: query, variables: variables, authMode: authMode }, headers, customUserAgentDetails);
143
+ var abortController = new AbortController();
144
+ var responsePromise = this._graphql({ query: query, variables: variables, authMode: authMode }, headers, abortController, customUserAgentDetails);
145
+ this._api.updateRequestToBeCancellable(responsePromise, abortController);
142
146
  return responsePromise;
143
147
  case 'subscription':
144
148
  return this._graphqlSubscribe({ query: query, variables: variables, authMode: authMode }, headers, customUserAgentDetails);
@@ -146,11 +150,11 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
146
150
  throw new Error("invalid operation type: " + operationType);
147
151
  }
148
152
  };
149
- InternalGraphQLAPIClass.prototype._graphql = function (_a, additionalHeaders, customUserAgentDetails) {
153
+ InternalGraphQLAPIClass.prototype._graphql = function (_a, additionalHeaders, abortController, customUserAgentDetails) {
150
154
  var query = _a.query, variables = _a.variables, authMode = _a.authMode;
151
155
  if (additionalHeaders === void 0) { additionalHeaders = {}; }
152
156
  return __awaiter(this, void 0, void 0, function () {
153
- var config, _b, region, appSyncGraphqlEndpoint, customGraphqlEndpoint, customEndpointRegion, headers, _c, _d, _e, _f, _g, body, endpoint, error, response, responsePayload, err_1, errors;
157
+ var config, _b, region, appSyncGraphqlEndpoint, customGraphqlEndpoint, customEndpointRegion, headers, _c, _d, _e, _f, _g, body, endpoint, error, response, responseBody, result, err_1, errors;
154
158
  var _h;
155
159
  return __generator(this, function (_j) {
156
160
  switch (_j.label) {
@@ -162,7 +166,7 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
162
166
  _c = [{}];
163
167
  _d = !customGraphqlEndpoint;
164
168
  if (!_d) return [3 /*break*/, 2];
165
- return [4 /*yield*/, this._headerBasedAuth(authMode, additionalHeaders, customUserAgentDetails)];
169
+ return [4 /*yield*/, this._headerBasedAuth(authMode, additionalHeaders)];
166
170
  case 1:
167
171
  _d = (_j.sent());
168
172
  _j.label = 2;
@@ -171,7 +175,7 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
171
175
  _f = customGraphqlEndpoint;
172
176
  if (!_f) return [3 /*break*/, 6];
173
177
  if (!customEndpointRegion) return [3 /*break*/, 4];
174
- return [4 /*yield*/, this._headerBasedAuth(authMode, additionalHeaders, customUserAgentDetails)];
178
+ return [4 /*yield*/, this._headerBasedAuth(authMode, additionalHeaders)];
175
179
  case 3:
176
180
  _g = _j.sent();
177
181
  return [3 /*break*/, 5];
@@ -210,15 +214,23 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
210
214
  region: region,
211
215
  },
212
216
  },
217
+ abortController: abortController,
213
218
  })];
214
219
  case 8:
215
- responsePayload = (_j.sent()).body;
216
- return [4 /*yield*/, responsePayload.json()];
220
+ responseBody = (_j.sent()).body;
221
+ return [4 /*yield*/, responseBody.json()];
217
222
  case 9:
218
- response = _j.sent();
223
+ result = _j.sent();
224
+ response = result;
219
225
  return [3 /*break*/, 11];
220
226
  case 10:
221
227
  err_1 = _j.sent();
228
+ // If the exception is because user intentionally
229
+ // cancelled the request, do not modify the exception
230
+ // so that clients can identify the exception correctly.
231
+ if (isCancelErrorREST(err_1)) {
232
+ throw err_1;
233
+ }
222
234
  response = {
223
235
  data: {},
224
236
  errors: [new GraphQLError(err_1.message, null, null, null, null, err_1)],
@@ -234,8 +246,24 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
234
246
  });
235
247
  });
236
248
  };
249
+ /**
250
+ * Checks to see if an error thrown is from an api request cancellation
251
+ * @param {any} error - Any error
252
+ * @return {boolean} - A boolean indicating if the error was from an api request cancellation
253
+ */
254
+ InternalGraphQLAPIClass.prototype.isCancelError = function (error) {
255
+ return isCancelErrorREST(error);
256
+ };
257
+ /**
258
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
259
+ * @param {any} request - request to cancel
260
+ * @returns - A boolean indicating if the request was cancelled
261
+ */
262
+ InternalGraphQLAPIClass.prototype.cancel = function (request, message) {
263
+ return cancelREST(request, message);
264
+ };
237
265
  InternalGraphQLAPIClass.prototype._graphqlSubscribe = function (_a, additionalHeaders, customUserAgentDetails) {
238
- var query = _a.query, variables = _a.variables, defaultAuthenticationType = _a.authMode, authToken = _a.authToken;
266
+ var query = _a.query, variables = _a.variables, authMode = _a.authMode;
239
267
  if (additionalHeaders === void 0) { additionalHeaders = {}; }
240
268
  var _b;
241
269
  var GraphQL = ((_b = Amplify.getConfig().API) !== null && _b !== void 0 ? _b : {}).GraphQL;
@@ -247,9 +275,10 @@ var InternalGraphQLAPIClass = /** @class */ (function () {
247
275
  variables: variables,
248
276
  appSyncGraphqlEndpoint: GraphQL === null || GraphQL === void 0 ? void 0 : GraphQL.endpoint,
249
277
  region: GraphQL === null || GraphQL === void 0 ? void 0 : GraphQL.region,
250
- authenticationType: GraphQL === null || GraphQL === void 0 ? void 0 : GraphQL.defaultAuthMode,
278
+ authenticationType: authMode !== null && authMode !== void 0 ? authMode : GraphQL === null || GraphQL === void 0 ? void 0 : GraphQL.defaultAuthMode,
251
279
  apiKey: GraphQL === null || GraphQL === void 0 ? void 0 : GraphQL.apiKey,
252
- });
280
+ additionalHeaders: additionalHeaders,
281
+ }, customUserAgentDetails);
253
282
  };
254
283
  return InternalGraphQLAPIClass;
255
284
  }());
@@ -1,2 +1,2 @@
1
1
  export { InternalGraphQLAPI, InternalGraphQLAPIClass, } from './InternalGraphQLAPI';
2
- export { graphql } from './v6';
2
+ export { graphql, cancel, isCancelError } from './v6';
@@ -1,4 +1,4 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export { InternalGraphQLAPI, InternalGraphQLAPIClass, } from './InternalGraphQLAPI';
4
- export { graphql } from './v6';
4
+ export { graphql, cancel, isCancelError } from './v6';
@@ -86,4 +86,16 @@ import { GraphQLOptionsV6, GraphQLResponseV6 } from '../types';
86
86
  export declare function graphql<FALLBACK_TYPES = unknown, TYPED_GQL_STRING extends string = string>(options: GraphQLOptionsV6<FALLBACK_TYPES, TYPED_GQL_STRING>, additionalHeaders?: {
87
87
  [key: string]: string;
88
88
  }): GraphQLResponseV6<FALLBACK_TYPES, TYPED_GQL_STRING>;
89
+ /**
90
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
91
+ * @param {any} request - request to cancel
92
+ * @returns - A boolean indicating if the request was cancelled
93
+ */
94
+ export declare function cancel(promise: Promise<any>, message?: string): boolean;
95
+ /**
96
+ * Checks to see if an error thrown is from an api request cancellation
97
+ * @param {any} error - Any error
98
+ * @returns - A boolean indicating if the error was from an api request cancellation
99
+ */
100
+ export declare function isCancelError(error: any): boolean;
89
101
  export { GraphQLOptionsV6, GraphQLResponseV6 };
@@ -94,3 +94,19 @@ export function graphql(options, additionalHeaders) {
94
94
  var result = GraphQLAPI.graphql(options, additionalHeaders);
95
95
  return result;
96
96
  }
97
+ /**
98
+ * Cancels an inflight request. Only applicable for graphql queries and mutations
99
+ * @param {any} request - request to cancel
100
+ * @returns - A boolean indicating if the request was cancelled
101
+ */
102
+ export function cancel(promise, message) {
103
+ return GraphQLAPI.cancel(promise, message);
104
+ }
105
+ /**
106
+ * Checks to see if an error thrown is from an api request cancellation
107
+ * @param {any} error - Any error
108
+ * @returns - A boolean indicating if the error was from an api request cancellation
109
+ */
110
+ export function isCancelError(error) {
111
+ return GraphQLAPI.isCancelError(error);
112
+ }
@@ -614,8 +614,8 @@
614
614
  "signature": "622028afad3e12a65acced3c75ae7726bf56d49c199ec3607be2564fca27aac3"
615
615
  },
616
616
  "../../core/lib-esm/clients/types/http.d.ts": {
617
- "version": "b94fa6ecdfcf5c1c31d4baa822d7ecb40c9db548399b205563379f38d265372a",
618
- "signature": "b94fa6ecdfcf5c1c31d4baa822d7ecb40c9db548399b205563379f38d265372a"
617
+ "version": "1c4fdf9ba0d187c61e19d216ab3a3ba297b1c9b2a5a68367b1d8e7c070520c8e",
618
+ "signature": "1c4fdf9ba0d187c61e19d216ab3a3ba297b1c9b2a5a68367b1d8e7c070520c8e"
619
619
  },
620
620
  "../../core/lib-esm/clients/handlers/fetch.d.ts": {
621
621
  "version": "9e6390c460ca50e0b768107f2be5a14f3da4adb6e775ada0f239d2b3be5732c5",
@@ -1102,16 +1102,40 @@
1102
1102
  "signature": "4200db79a41dd88ecb68d2cc68f0e8124e71a610824b407b2b7d7bdb1b4b4210"
1103
1103
  },
1104
1104
  "../../core/lib-esm/providers/pinpoint/types/pinpoint.d.ts": {
1105
- "version": "d0beffa24a6ee04f6ac49081bb4e2b20acddef834efe61a188c73f88d2b78608",
1106
- "signature": "d0beffa24a6ee04f6ac49081bb4e2b20acddef834efe61a188c73f88d2b78608"
1105
+ "version": "79e4895890b313e8330023d329d975ed765f1ea52b8019fef4e2ee73e4cf8974",
1106
+ "signature": "79e4895890b313e8330023d329d975ed765f1ea52b8019fef4e2ee73e4cf8974"
1107
1107
  },
1108
1108
  "../../core/lib-esm/providers/pinpoint/types/index.d.ts": {
1109
1109
  "version": "4719d02184cf8209c2bb62e01d319f4452260159efdcdb04ceccb80468db87b8",
1110
1110
  "signature": "4719d02184cf8209c2bb62e01d319f4452260159efdcdb04ceccb80468db87b8"
1111
1111
  },
1112
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts": {
1113
+ "version": "934af09dfd245b15258ce15f4498ab9e8b1e3fa4244044c677018e3ddd23e3e7",
1114
+ "signature": "934af09dfd245b15258ce15f4498ab9e8b1e3fa4244044c677018e3ddd23e3e7"
1115
+ },
1116
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts": {
1117
+ "version": "346f46738659ad5a6975ce42ec89c76a1ee362e145c6f4251f57a6db11594c16",
1118
+ "signature": "346f46738659ad5a6975ce42ec89c76a1ee362e145c6f4251f57a6db11594c16"
1119
+ },
1120
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts": {
1121
+ "version": "7dc9c291678d23e9d84cd887dd02f53f601ca76d7ebf88cdff0e14632b03dfac",
1122
+ "signature": "7dc9c291678d23e9d84cd887dd02f53f601ca76d7ebf88cdff0e14632b03dfac"
1123
+ },
1124
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts": {
1125
+ "version": "1ee990513d8962dbe6706a80195eb0c03002939755151f3788df9dd359fdfc27",
1126
+ "signature": "1ee990513d8962dbe6706a80195eb0c03002939755151f3788df9dd359fdfc27"
1127
+ },
1128
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts": {
1129
+ "version": "993a054df1475502be18b0105062c831c4fc1f0924f64498e5c07dda71add987",
1130
+ "signature": "993a054df1475502be18b0105062c831c4fc1f0924f64498e5c07dda71add987"
1131
+ },
1132
+ "../../core/lib-esm/providers/personalize/types/index.d.ts": {
1133
+ "version": "93423211853e84f94c106169a9c18b695136928967398c33c70a24a8123b09b6",
1134
+ "signature": "93423211853e84f94c106169a9c18b695136928967398c33c70a24a8123b09b6"
1135
+ },
1112
1136
  "../../core/lib-esm/singleton/Analytics/types.d.ts": {
1113
- "version": "918cf1ba151c31cb372e2366b88a84bbad57953a8e8becbdf5629257a280b665",
1114
- "signature": "918cf1ba151c31cb372e2366b88a84bbad57953a8e8becbdf5629257a280b665"
1137
+ "version": "0c25f785089696f525f26d37c5cbd6656175dc7eb2c331fcbaa34ff4af0424dc",
1138
+ "signature": "0c25f785089696f525f26d37c5cbd6656175dc7eb2c331fcbaa34ff4af0424dc"
1115
1139
  },
1116
1140
  "../../core/lib-esm/singleton/Geo/types.d.ts": {
1117
1141
  "version": "0496344cca8596e5fcfbcf489ea39fd6ea82a4d6a010f968685edf5b4f6c2533",
@@ -1174,8 +1198,8 @@
1174
1198
  "signature": "edf7f975df241cc98c9f4c51aab781f4ecfc884ff6ce03cfd3c59a19a7e729b8"
1175
1199
  },
1176
1200
  "../../core/lib-esm/Platform/types.d.ts": {
1177
- "version": "419f10aa9fe307eb5e0b0d410a096d22126c75b36c7a9eb0c17d96c15a5e346f",
1178
- "signature": "419f10aa9fe307eb5e0b0d410a096d22126c75b36c7a9eb0c17d96c15a5e346f"
1201
+ "version": "b40c5c4fbafe286f2af07f72a600875f3dffa17d0d10554e282c51b0353f4c0a",
1202
+ "signature": "b40c5c4fbafe286f2af07f72a600875f3dffa17d0d10554e282c51b0353f4c0a"
1179
1203
  },
1180
1204
  "../../core/lib-esm/Platform/index.d.ts": {
1181
1205
  "version": "52470c64ff42d847d24be31b19aff4d39c4a74b2073de6cc7fb95545ef8d87a5",
@@ -1290,16 +1314,16 @@
1290
1314
  "signature": "92395e3e6898e201a167d96559042af069933f1a96662305bdc01fda3627bfbf"
1291
1315
  },
1292
1316
  "../../core/lib-esm/libraryUtils.d.ts": {
1293
- "version": "dbfa5cdfe9f79a5264488a3eaae0add2a26bbc274affcc5495ff5d2514bf1c92",
1294
- "signature": "dbfa5cdfe9f79a5264488a3eaae0add2a26bbc274affcc5495ff5d2514bf1c92"
1317
+ "version": "77d9972e4e2dd35f88e03335d8d0d9592a754693e4ea00d27f0ccc44f43c1c59",
1318
+ "signature": "77d9972e4e2dd35f88e03335d8d0d9592a754693e4ea00d27f0ccc44f43c1c59"
1295
1319
  },
1296
1320
  "../src/types/PubSub.ts": {
1297
1321
  "version": "70ac482472a54d226119a9a20fbb3f3baa04e9e305526ab90559626561206a64",
1298
1322
  "signature": "ad2b3dd90d30fe70b81a40ed52c2f676547c6d6cfb740278e8798c15d780ddde"
1299
1323
  },
1300
1324
  "../src/types/index.ts": {
1301
- "version": "1a24da5de1c918dce87fce82bb02abaedff4cd560562426bb7f557db231347af",
1302
- "signature": "bf4518dec4c41828155000b934a567d87e78a1fcbf84be908a4d545918e2ae23"
1325
+ "version": "8cc63a0a395a658e6307999a4dba9b82b466965c59d44226e21a76df8b9f727f",
1326
+ "signature": "6a5e869b97f16df46e0aa1510c561ce541d1f8dc548144de8bac12048ea64856"
1303
1327
  },
1304
1328
  "../../core/lib-esm/singleton/apis/fetchAuthSession.d.ts": {
1305
1329
  "version": "df1a1f23d18a3dac758a03f4f8f6a3d14e83fb78a45431d15e6833fb53ed8055",
@@ -1377,17 +1401,33 @@
1377
1401
  "version": "961b863ef850a0b1d97c21a273560ee4434a313849b41f4dc9505804f9a6108c",
1378
1402
  "signature": "961b863ef850a0b1d97c21a273560ee4434a313849b41f4dc9505804f9a6108c"
1379
1403
  },
1404
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts": {
1405
+ "version": "c7401c76b7d4c6fed3f63c48bc367e0f1bb73239c9f6927cd3563eb2c852285b",
1406
+ "signature": "c7401c76b7d4c6fed3f63c48bc367e0f1bb73239c9f6927cd3563eb2c852285b"
1407
+ },
1408
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts": {
1409
+ "version": "a4034567779613484830d1c1af7974c86ad15e72d02e7d8210ba172d5125aa75",
1410
+ "signature": "a4034567779613484830d1c1af7974c86ad15e72d02e7d8210ba172d5125aa75"
1411
+ },
1380
1412
  "../../api-rest/lib-esm/types/index.d.ts": {
1381
- "version": "355f4a6a20c7e7e71008bc0b3d2cf884955f5a282f5454559a846dbb25de0c90",
1382
- "signature": "355f4a6a20c7e7e71008bc0b3d2cf884955f5a282f5454559a846dbb25de0c90"
1413
+ "version": "169cd28bdae65ec83843d65788241d23127f85d7505c5321e5d39bd7963c351b",
1414
+ "signature": "169cd28bdae65ec83843d65788241d23127f85d7505c5321e5d39bd7963c351b"
1415
+ },
1416
+ "../../api-rest/lib-esm/apis/index.d.ts": {
1417
+ "version": "c1cc2140f3a7d5009ad8239fcf08148403151aa4f81e10bbdc3dbf56e40aaeac",
1418
+ "signature": "c1cc2140f3a7d5009ad8239fcf08148403151aa4f81e10bbdc3dbf56e40aaeac"
1419
+ },
1420
+ "../../api-rest/lib-esm/index.d.ts": {
1421
+ "version": "43435b5a5cad6dad7db911c06f882350195c64d195fa123d983a9a53f6e4c213",
1422
+ "signature": "43435b5a5cad6dad7db911c06f882350195c64d195fa123d983a9a53f6e4c213"
1383
1423
  },
1384
- "../../api-rest/lib-esm/common/internalPost.d.ts": {
1385
- "version": "c0d71d3612c629c3aeac8ae585aa7414079db966b12d68c6e8bed53b0f95c9de",
1386
- "signature": "c0d71d3612c629c3aeac8ae585aa7414079db966b12d68c6e8bed53b0f95c9de"
1424
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts": {
1425
+ "version": "b8e39c8a045b834fd828b6bb5e4b4473735c53aa19dddc9b4d855f803af3b075",
1426
+ "signature": "b8e39c8a045b834fd828b6bb5e4b4473735c53aa19dddc9b4d855f803af3b075"
1387
1427
  },
1388
1428
  "../../api-rest/lib-esm/internals/index.d.ts": {
1389
- "version": "97c6154ece4cb52c6751865e7f2b6a724259be9e009723aea5c4b1f2a1fa5d0d",
1390
- "signature": "97c6154ece4cb52c6751865e7f2b6a724259be9e009723aea5c4b1f2a1fa5d0d"
1429
+ "version": "6aab8143bd3d7dac7f4d5caaf4570c72c0368d5bbb82f38e3dca090a92902310",
1430
+ "signature": "6aab8143bd3d7dac7f4d5caaf4570c72c0368d5bbb82f38e3dca090a92902310"
1391
1431
  },
1392
1432
  "../../../node_modules/@types/uuid/index.d.ts": {
1393
1433
  "version": "f875e913ef24873eb2a469605402595f1c783070b52a98e53686b32c0f827f7f",
@@ -1414,20 +1454,20 @@
1414
1454
  "signature": "1e99d3031c6655bc40f2a8d877d7a10a8747d29046f6e4b0e1dba3590cd2fdf8"
1415
1455
  },
1416
1456
  "../src/internals/InternalGraphQLAPI.ts": {
1417
- "version": "1a2400e965cd867002a5eebdc3b5fa844f1ff01222bc7f91068499383dfa66f6",
1418
- "signature": "186c82c1cbd4eb233c4fde8e8f264511fbba3187e270c384c570343dee075ee4"
1457
+ "version": "a612370b2c60bf029ee457af362c4885509d1194cde4f3c0704eac5a40bc293b",
1458
+ "signature": "3247c9c68592c4a9f34556a8cfcc45aeed26ec3267bfd21a69adb449503e1ab9"
1419
1459
  },
1420
1460
  "../src/internals/v6.ts": {
1421
- "version": "49f318f6c79f74c78ad69e2b9bc41d3c61503c0ddb0acbd59480de34ca229adf",
1422
- "signature": "a72d34503d7f8c6383f9c790bf2dc0eb5632aecede931722ec8533c9037f710b"
1461
+ "version": "2acd7dbd0aa7c028f597a68a21cce2b24e9ed4a254a650ed144a162a9653f476",
1462
+ "signature": "0f47c5d42e6526f88680ae26a132a26f9c9a6bca2870018b3c9eaaa236ed2c7f"
1423
1463
  },
1424
1464
  "../src/internals/index.ts": {
1425
- "version": "8bdbe39fe773b405ea146a0c24f05e9076e3e077db0300a5d252ad5077152346",
1426
- "signature": "4cf4241ff35fcbf795831cf65599dc51999e569b729313d8eee29cd3d6e68fbc"
1465
+ "version": "fb1777ce66d6451dc4e6ceca4ebc3cf547156a8a24758affec39bb1e23acf966",
1466
+ "signature": "60c49aaa36553821d12c4dabba54609c41f4254aed660ccaa5cc6495d4b24bd9"
1427
1467
  },
1428
1468
  "../src/GraphQLAPI.ts": {
1429
- "version": "fcbfe3d72cbf74861bbbeab1263aa9ce5e05eead438668b39bc37ef3d9969c99",
1430
- "signature": "a1d545a3fcdb3875893950744ce5980f5612fcc22df50dd60bde9f31fe1bdbc5"
1469
+ "version": "e728905616fa216dfc13c3f044c4f349ff3a534c3849888b6614cf40e2cc899b",
1470
+ "signature": "fd3d568c0c5301c0d8aea98d012ba4cee64535ebd582028a8131c438fc03d566"
1431
1471
  },
1432
1472
  "../src/index.ts": {
1433
1473
  "version": "98d8433766c112c8658d03649ac495f403979234c503594a7b7baf3b5f8e5a02",
@@ -3183,8 +3223,38 @@
3183
3223
  "../../../node_modules/@types/node/base.d.ts",
3184
3224
  "../../../node_modules/@types/node/index.d.ts"
3185
3225
  ],
3226
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts": [
3227
+ "../../../node_modules/@types/node/base.d.ts",
3228
+ "../../../node_modules/@types/node/index.d.ts"
3229
+ ],
3230
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts": [
3231
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts",
3232
+ "../../../node_modules/@types/node/base.d.ts",
3233
+ "../../../node_modules/@types/node/index.d.ts"
3234
+ ],
3235
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts": [
3236
+ "../../../node_modules/@types/node/base.d.ts",
3237
+ "../../../node_modules/@types/node/index.d.ts"
3238
+ ],
3239
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts": [
3240
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts",
3241
+ "../../../node_modules/@types/node/base.d.ts",
3242
+ "../../../node_modules/@types/node/index.d.ts"
3243
+ ],
3244
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts": [
3245
+ "../../../node_modules/@types/node/base.d.ts",
3246
+ "../../../node_modules/@types/node/index.d.ts"
3247
+ ],
3248
+ "../../core/lib-esm/providers/personalize/types/index.d.ts": [
3249
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts",
3250
+ "../../../node_modules/@types/node/base.d.ts",
3251
+ "../../../node_modules/@types/node/index.d.ts"
3252
+ ],
3186
3253
  "../../core/lib-esm/singleton/Analytics/types.d.ts": [
3187
3254
  "../../core/lib-esm/providers/pinpoint/types/index.d.ts",
3255
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts",
3256
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts",
3257
+ "../../core/lib-esm/providers/personalize/types/index.d.ts",
3188
3258
  "../../../node_modules/@types/node/base.d.ts",
3189
3259
  "../../../node_modules/@types/node/index.d.ts"
3190
3260
  ],
@@ -3560,12 +3630,34 @@
3560
3630
  "../../../node_modules/@types/node/base.d.ts",
3561
3631
  "../../../node_modules/@types/node/index.d.ts"
3562
3632
  ],
3633
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts": [
3634
+ "../../core/lib-esm/libraryUtils.d.ts",
3635
+ "../../../node_modules/@types/node/base.d.ts",
3636
+ "../../../node_modules/@types/node/index.d.ts"
3637
+ ],
3638
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts": [
3639
+ "../../core/lib-esm/libraryUtils.d.ts",
3640
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts",
3641
+ "../../../node_modules/@types/node/base.d.ts",
3642
+ "../../../node_modules/@types/node/index.d.ts"
3643
+ ],
3563
3644
  "../../api-rest/lib-esm/types/index.d.ts": [
3564
3645
  "../../core/lib-esm/libraryUtils.d.ts",
3565
3646
  "../../../node_modules/@types/node/base.d.ts",
3566
3647
  "../../../node_modules/@types/node/index.d.ts"
3567
3648
  ],
3568
- "../../api-rest/lib-esm/common/internalPost.d.ts": [
3649
+ "../../api-rest/lib-esm/apis/index.d.ts": [
3650
+ "../../api-rest/lib-esm/types/index.d.ts",
3651
+ "../../../node_modules/@types/node/base.d.ts",
3652
+ "../../../node_modules/@types/node/index.d.ts"
3653
+ ],
3654
+ "../../api-rest/lib-esm/index.d.ts": [
3655
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts",
3656
+ "../../api-rest/lib-esm/apis/index.d.ts",
3657
+ "../../../node_modules/@types/node/base.d.ts",
3658
+ "../../../node_modules/@types/node/index.d.ts"
3659
+ ],
3660
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts": [
3569
3661
  "../../core/lib-esm/index.d.ts",
3570
3662
  "../../api-rest/lib-esm/types/index.d.ts",
3571
3663
  "../../../node_modules/@types/node/base.d.ts",
@@ -3573,7 +3665,7 @@
3573
3665
  ],
3574
3666
  "../../api-rest/lib-esm/internals/index.d.ts": [
3575
3667
  "../../api-rest/lib-esm/types/index.d.ts",
3576
- "../../api-rest/lib-esm/common/internalPost.d.ts",
3668
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts",
3577
3669
  "../../../node_modules/@types/node/base.d.ts",
3578
3670
  "../../../node_modules/@types/node/index.d.ts"
3579
3671
  ],
@@ -3620,6 +3712,7 @@
3620
3712
  "../../core/lib-esm/index.d.ts",
3621
3713
  "../../core/lib-esm/libraryUtils.d.ts",
3622
3714
  "../src/types/index.ts",
3715
+ "../../api-rest/lib-esm/index.d.ts",
3623
3716
  "../../api-rest/lib-esm/internals/index.d.ts",
3624
3717
  "../src/Providers/AWSAppSyncRealTimeProvider/index.ts",
3625
3718
  "../../../node_modules/@types/node/base.d.ts",
@@ -4656,16 +4749,38 @@
4656
4749
  ],
4657
4750
  "../../api-rest/lib-esm/internals/index.d.ts": [
4658
4751
  "../../api-rest/lib-esm/types/index.d.ts",
4659
- "../../api-rest/lib-esm/common/internalPost.d.ts",
4752
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts",
4660
4753
  "../../../node_modules/@types/node/base.d.ts",
4661
4754
  "../../../node_modules/@types/node/index.d.ts"
4662
4755
  ],
4663
- "../../api-rest/lib-esm/common/internalPost.d.ts": [
4756
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts": [
4664
4757
  "../../core/lib-esm/index.d.ts",
4665
4758
  "../../api-rest/lib-esm/types/index.d.ts",
4666
4759
  "../../../node_modules/@types/node/base.d.ts",
4667
4760
  "../../../node_modules/@types/node/index.d.ts"
4668
4761
  ],
4762
+ "../../api-rest/lib-esm/apis/index.d.ts": [
4763
+ "../../api-rest/lib-esm/types/index.d.ts",
4764
+ "../../../node_modules/@types/node/base.d.ts",
4765
+ "../../../node_modules/@types/node/index.d.ts"
4766
+ ],
4767
+ "../../api-rest/lib-esm/index.d.ts": [
4768
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts",
4769
+ "../../api-rest/lib-esm/apis/index.d.ts",
4770
+ "../../../node_modules/@types/node/base.d.ts",
4771
+ "../../../node_modules/@types/node/index.d.ts"
4772
+ ],
4773
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts": [
4774
+ "../../core/lib-esm/libraryUtils.d.ts",
4775
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts",
4776
+ "../../../node_modules/@types/node/base.d.ts",
4777
+ "../../../node_modules/@types/node/index.d.ts"
4778
+ ],
4779
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts": [
4780
+ "../../core/lib-esm/libraryUtils.d.ts",
4781
+ "../../../node_modules/@types/node/base.d.ts",
4782
+ "../../../node_modules/@types/node/index.d.ts"
4783
+ ],
4669
4784
  "../../core/lib-esm/utils/isBrowser.d.ts": [
4670
4785
  "../../../node_modules/@types/node/base.d.ts",
4671
4786
  "../../../node_modules/@types/node/index.d.ts"
@@ -4834,6 +4949,9 @@
4834
4949
  ],
4835
4950
  "../../core/lib-esm/singleton/Analytics/types.d.ts": [
4836
4951
  "../../core/lib-esm/providers/pinpoint/types/index.d.ts",
4952
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts",
4953
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts",
4954
+ "../../core/lib-esm/providers/personalize/types/index.d.ts",
4837
4955
  "../../../node_modules/@types/node/base.d.ts",
4838
4956
  "../../../node_modules/@types/node/index.d.ts"
4839
4957
  ],
@@ -5708,6 +5826,33 @@
5708
5826
  "../../../node_modules/@types/node/base.d.ts",
5709
5827
  "../../../node_modules/@types/node/index.d.ts"
5710
5828
  ],
5829
+ "../../core/lib-esm/providers/personalize/types/index.d.ts": [
5830
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts",
5831
+ "../../../node_modules/@types/node/base.d.ts",
5832
+ "../../../node_modules/@types/node/index.d.ts"
5833
+ ],
5834
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts": [
5835
+ "../../../node_modules/@types/node/base.d.ts",
5836
+ "../../../node_modules/@types/node/index.d.ts"
5837
+ ],
5838
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts": [
5839
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts",
5840
+ "../../../node_modules/@types/node/base.d.ts",
5841
+ "../../../node_modules/@types/node/index.d.ts"
5842
+ ],
5843
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts": [
5844
+ "../../../node_modules/@types/node/base.d.ts",
5845
+ "../../../node_modules/@types/node/index.d.ts"
5846
+ ],
5847
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts": [
5848
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts",
5849
+ "../../../node_modules/@types/node/base.d.ts",
5850
+ "../../../node_modules/@types/node/index.d.ts"
5851
+ ],
5852
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts": [
5853
+ "../../../node_modules/@types/node/base.d.ts",
5854
+ "../../../node_modules/@types/node/index.d.ts"
5855
+ ],
5711
5856
  "../../core/lib-esm/singleton/Auth/types.d.ts": [
5712
5857
  "../../../node_modules/@types/node/base.d.ts",
5713
5858
  "../../../node_modules/@types/node/index.d.ts"
@@ -6095,6 +6240,12 @@
6095
6240
  "../../core/lib-esm/singleton/Auth/types.d.ts",
6096
6241
  "../../core/lib-esm/providers/pinpoint/types/pinpoint.d.ts",
6097
6242
  "../../core/lib-esm/providers/pinpoint/types/index.d.ts",
6243
+ "../../core/lib-esm/providers/kinesis/types/kinesis.d.ts",
6244
+ "../../core/lib-esm/providers/kinesis/types/index.d.ts",
6245
+ "../../core/lib-esm/providers/kinesis-firehose/types/kinesis-firehose.d.ts",
6246
+ "../../core/lib-esm/providers/kinesis-firehose/types/index.d.ts",
6247
+ "../../core/lib-esm/providers/personalize/types/personalize.d.ts",
6248
+ "../../core/lib-esm/providers/personalize/types/index.d.ts",
6098
6249
  "../../core/lib-esm/singleton/Analytics/types.d.ts",
6099
6250
  "../../core/lib-esm/singleton/Geo/types.d.ts",
6100
6251
  "../../core/lib-esm/singleton/Storage/types.d.ts",
@@ -6162,8 +6313,12 @@
6162
6313
  "../../core/lib-esm/Cache/InMemoryCache.d.ts",
6163
6314
  "../../core/lib-esm/I18n/index.d.ts",
6164
6315
  "../../core/lib-esm/index.d.ts",
6316
+ "../../api-rest/lib-esm/errors/RestApiError.d.ts",
6317
+ "../../api-rest/lib-esm/errors/CancelledError.d.ts",
6165
6318
  "../../api-rest/lib-esm/types/index.d.ts",
6166
- "../../api-rest/lib-esm/common/internalPost.d.ts",
6319
+ "../../api-rest/lib-esm/apis/index.d.ts",
6320
+ "../../api-rest/lib-esm/index.d.ts",
6321
+ "../../api-rest/lib-esm/apis/common/internalPost.d.ts",
6167
6322
  "../../api-rest/lib-esm/internals/index.d.ts",
6168
6323
  "../../../node_modules/@types/uuid/index.d.ts",
6169
6324
  "../src/Providers/constants.ts",
@@ -9,7 +9,7 @@ export { CONTROL_MSG, ConnectionState } from './PubSub';
9
9
  export interface GraphQLOptions {
10
10
  query: string | DocumentNode;
11
11
  variables?: Record<string, DocumentType>;
12
- authMode?: string;
12
+ authMode?: APIAuthMode;
13
13
  authToken?: string;
14
14
  /**
15
15
  * @deprecated This property should not be used