@aws-amplify/api 4.0.20-unstable.4 → 4.0.21-in-app-messaging.35
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 +15 -321
- package/dist/aws-amplify-api.js +75 -445
- package/dist/aws-amplify-api.js.map +1 -1
- package/dist/aws-amplify-api.min.js +3 -3
- package/dist/aws-amplify-api.min.js.map +1 -1
- package/index.v37.d.ts +12 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js.map +1 -1
- package/lib/types/index.js +1 -1
- package/lib-esm/index.d.ts +2 -1
- package/lib-esm/index.js.map +1 -1
- package/lib-esm/types/index.js +1 -1
- package/package.json +11 -4
- package/src/index.ts +1 -1
- package/src/types/index.ts +24 -24
package/dist/aws-amplify-api.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
2
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
-
module.exports = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql")
|
|
3
|
+
module.exports = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql"));
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
|
5
|
-
define("aws_amplify_api", ["aws_amplify_auth", "aws_amplify_cache", "aws_amplify_core", "graphql"
|
|
5
|
+
define("aws_amplify_api", ["aws_amplify_auth", "aws_amplify_cache", "aws_amplify_core", "graphql"], factory);
|
|
6
6
|
else if(typeof exports === 'object')
|
|
7
|
-
exports["aws_amplify_api"] = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql")
|
|
7
|
+
exports["aws_amplify_api"] = factory(require("aws_amplify_auth"), require("aws_amplify_cache"), require("aws_amplify_core"), require("graphql"));
|
|
8
8
|
else
|
|
9
|
-
root["aws_amplify_api"] = factory(root["aws_amplify_auth"], root["aws_amplify_cache"], root["aws_amplify_core"], root["graphql"]
|
|
10
|
-
})(this, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_auth__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_cache__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__, __WEBPACK_EXTERNAL_MODULE_graphql__
|
|
9
|
+
root["aws_amplify_api"] = factory(root["aws_amplify_auth"], root["aws_amplify_cache"], root["aws_amplify_core"], root["graphql"]);
|
|
10
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE__aws_amplify_auth__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_cache__, __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__, __WEBPACK_EXTERNAL_MODULE_graphql__) {
|
|
11
11
|
return /******/ (function(modules) { // webpackBootstrap
|
|
12
12
|
/******/ // The module cache
|
|
13
13
|
/******/ var installedModules = {};
|
|
@@ -4152,371 +4152,6 @@ function isnan (val) {
|
|
|
4152
4152
|
|
|
4153
4153
|
/***/ }),
|
|
4154
4154
|
|
|
4155
|
-
/***/ "../../node_modules/graphql/error/GraphQLError.js":
|
|
4156
|
-
/*!*******************************************************************!*\
|
|
4157
|
-
!*** /root/amplify-js/node_modules/graphql/error/GraphQLError.js ***!
|
|
4158
|
-
\*******************************************************************/
|
|
4159
|
-
/*! no static exports found */
|
|
4160
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4161
|
-
|
|
4162
|
-
"use strict";
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4166
|
-
value: true
|
|
4167
|
-
});
|
|
4168
|
-
exports.GraphQLError = GraphQLError;
|
|
4169
|
-
|
|
4170
|
-
var _printError = __webpack_require__(/*! ./printError */ "../../node_modules/graphql/error/printError.js");
|
|
4171
|
-
|
|
4172
|
-
var _location = __webpack_require__(/*! ../language/location */ "../../node_modules/graphql/language/location.js");
|
|
4173
|
-
|
|
4174
|
-
/**
|
|
4175
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4176
|
-
*
|
|
4177
|
-
* This source code is licensed under the MIT license found in the
|
|
4178
|
-
* LICENSE file in the root directory of this source tree.
|
|
4179
|
-
*
|
|
4180
|
-
* strict
|
|
4181
|
-
*/
|
|
4182
|
-
function GraphQLError( // eslint-disable-line no-redeclare
|
|
4183
|
-
message, nodes, source, positions, path, originalError, extensions) {
|
|
4184
|
-
// Compute list of blame nodes.
|
|
4185
|
-
var _nodes = Array.isArray(nodes) ? nodes.length !== 0 ? nodes : undefined : nodes ? [nodes] : undefined; // Compute locations in the source for the given nodes/positions.
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
var _source = source;
|
|
4189
|
-
|
|
4190
|
-
if (!_source && _nodes) {
|
|
4191
|
-
var node = _nodes[0];
|
|
4192
|
-
_source = node && node.loc && node.loc.source;
|
|
4193
|
-
}
|
|
4194
|
-
|
|
4195
|
-
var _positions = positions;
|
|
4196
|
-
|
|
4197
|
-
if (!_positions && _nodes) {
|
|
4198
|
-
_positions = _nodes.reduce(function (list, node) {
|
|
4199
|
-
if (node.loc) {
|
|
4200
|
-
list.push(node.loc.start);
|
|
4201
|
-
}
|
|
4202
|
-
|
|
4203
|
-
return list;
|
|
4204
|
-
}, []);
|
|
4205
|
-
}
|
|
4206
|
-
|
|
4207
|
-
if (_positions && _positions.length === 0) {
|
|
4208
|
-
_positions = undefined;
|
|
4209
|
-
}
|
|
4210
|
-
|
|
4211
|
-
var _locations;
|
|
4212
|
-
|
|
4213
|
-
if (positions && source) {
|
|
4214
|
-
_locations = positions.map(function (pos) {
|
|
4215
|
-
return (0, _location.getLocation)(source, pos);
|
|
4216
|
-
});
|
|
4217
|
-
} else if (_nodes) {
|
|
4218
|
-
_locations = _nodes.reduce(function (list, node) {
|
|
4219
|
-
if (node.loc) {
|
|
4220
|
-
list.push((0, _location.getLocation)(node.loc.source, node.loc.start));
|
|
4221
|
-
}
|
|
4222
|
-
|
|
4223
|
-
return list;
|
|
4224
|
-
}, []);
|
|
4225
|
-
}
|
|
4226
|
-
|
|
4227
|
-
var _extensions = extensions || originalError && originalError.extensions;
|
|
4228
|
-
|
|
4229
|
-
Object.defineProperties(this, {
|
|
4230
|
-
message: {
|
|
4231
|
-
value: message,
|
|
4232
|
-
// By being enumerable, JSON.stringify will include `message` in the
|
|
4233
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4234
|
-
// service adheres to the spec.
|
|
4235
|
-
enumerable: true,
|
|
4236
|
-
writable: true
|
|
4237
|
-
},
|
|
4238
|
-
locations: {
|
|
4239
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4240
|
-
// in JSON.stringify() when not provided.
|
|
4241
|
-
value: _locations || undefined,
|
|
4242
|
-
// By being enumerable, JSON.stringify will include `locations` in the
|
|
4243
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4244
|
-
// service adheres to the spec.
|
|
4245
|
-
enumerable: Boolean(_locations)
|
|
4246
|
-
},
|
|
4247
|
-
path: {
|
|
4248
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4249
|
-
// in JSON.stringify() when not provided.
|
|
4250
|
-
value: path || undefined,
|
|
4251
|
-
// By being enumerable, JSON.stringify will include `path` in the
|
|
4252
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4253
|
-
// service adheres to the spec.
|
|
4254
|
-
enumerable: Boolean(path)
|
|
4255
|
-
},
|
|
4256
|
-
nodes: {
|
|
4257
|
-
value: _nodes || undefined
|
|
4258
|
-
},
|
|
4259
|
-
source: {
|
|
4260
|
-
value: _source || undefined
|
|
4261
|
-
},
|
|
4262
|
-
positions: {
|
|
4263
|
-
value: _positions || undefined
|
|
4264
|
-
},
|
|
4265
|
-
originalError: {
|
|
4266
|
-
value: originalError
|
|
4267
|
-
},
|
|
4268
|
-
extensions: {
|
|
4269
|
-
// Coercing falsey values to undefined ensures they will not be included
|
|
4270
|
-
// in JSON.stringify() when not provided.
|
|
4271
|
-
value: _extensions || undefined,
|
|
4272
|
-
// By being enumerable, JSON.stringify will include `path` in the
|
|
4273
|
-
// resulting output. This ensures that the simplest possible GraphQL
|
|
4274
|
-
// service adheres to the spec.
|
|
4275
|
-
enumerable: Boolean(_extensions)
|
|
4276
|
-
}
|
|
4277
|
-
}); // Include (non-enumerable) stack trace.
|
|
4278
|
-
|
|
4279
|
-
if (originalError && originalError.stack) {
|
|
4280
|
-
Object.defineProperty(this, 'stack', {
|
|
4281
|
-
value: originalError.stack,
|
|
4282
|
-
writable: true,
|
|
4283
|
-
configurable: true
|
|
4284
|
-
});
|
|
4285
|
-
} else if (Error.captureStackTrace) {
|
|
4286
|
-
Error.captureStackTrace(this, GraphQLError);
|
|
4287
|
-
} else {
|
|
4288
|
-
Object.defineProperty(this, 'stack', {
|
|
4289
|
-
value: Error().stack,
|
|
4290
|
-
writable: true,
|
|
4291
|
-
configurable: true
|
|
4292
|
-
});
|
|
4293
|
-
}
|
|
4294
|
-
}
|
|
4295
|
-
|
|
4296
|
-
GraphQLError.prototype = Object.create(Error.prototype, {
|
|
4297
|
-
constructor: {
|
|
4298
|
-
value: GraphQLError
|
|
4299
|
-
},
|
|
4300
|
-
name: {
|
|
4301
|
-
value: 'GraphQLError'
|
|
4302
|
-
},
|
|
4303
|
-
toString: {
|
|
4304
|
-
value: function toString() {
|
|
4305
|
-
return (0, _printError.printError)(this);
|
|
4306
|
-
}
|
|
4307
|
-
}
|
|
4308
|
-
});
|
|
4309
|
-
|
|
4310
|
-
/***/ }),
|
|
4311
|
-
|
|
4312
|
-
/***/ "../../node_modules/graphql/error/printError.js":
|
|
4313
|
-
/*!*****************************************************************!*\
|
|
4314
|
-
!*** /root/amplify-js/node_modules/graphql/error/printError.js ***!
|
|
4315
|
-
\*****************************************************************/
|
|
4316
|
-
/*! no static exports found */
|
|
4317
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4318
|
-
|
|
4319
|
-
"use strict";
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4323
|
-
value: true
|
|
4324
|
-
});
|
|
4325
|
-
exports.printError = printError;
|
|
4326
|
-
|
|
4327
|
-
var _location = __webpack_require__(/*! ../language/location */ "../../node_modules/graphql/language/location.js");
|
|
4328
|
-
|
|
4329
|
-
/**
|
|
4330
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4331
|
-
*
|
|
4332
|
-
* This source code is licensed under the MIT license found in the
|
|
4333
|
-
* LICENSE file in the root directory of this source tree.
|
|
4334
|
-
*
|
|
4335
|
-
* strict
|
|
4336
|
-
*/
|
|
4337
|
-
|
|
4338
|
-
/**
|
|
4339
|
-
* Prints a GraphQLError to a string, representing useful location information
|
|
4340
|
-
* about the error's position in the source.
|
|
4341
|
-
*/
|
|
4342
|
-
function printError(error) {
|
|
4343
|
-
var printedLocations = [];
|
|
4344
|
-
|
|
4345
|
-
if (error.nodes) {
|
|
4346
|
-
var _iteratorNormalCompletion = true;
|
|
4347
|
-
var _didIteratorError = false;
|
|
4348
|
-
var _iteratorError = undefined;
|
|
4349
|
-
|
|
4350
|
-
try {
|
|
4351
|
-
for (var _iterator = error.nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
4352
|
-
var node = _step.value;
|
|
4353
|
-
|
|
4354
|
-
if (node.loc) {
|
|
4355
|
-
printedLocations.push(highlightSourceAtLocation(node.loc.source, (0, _location.getLocation)(node.loc.source, node.loc.start)));
|
|
4356
|
-
}
|
|
4357
|
-
}
|
|
4358
|
-
} catch (err) {
|
|
4359
|
-
_didIteratorError = true;
|
|
4360
|
-
_iteratorError = err;
|
|
4361
|
-
} finally {
|
|
4362
|
-
try {
|
|
4363
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
4364
|
-
_iterator.return();
|
|
4365
|
-
}
|
|
4366
|
-
} finally {
|
|
4367
|
-
if (_didIteratorError) {
|
|
4368
|
-
throw _iteratorError;
|
|
4369
|
-
}
|
|
4370
|
-
}
|
|
4371
|
-
}
|
|
4372
|
-
} else if (error.source && error.locations) {
|
|
4373
|
-
var source = error.source;
|
|
4374
|
-
var _iteratorNormalCompletion2 = true;
|
|
4375
|
-
var _didIteratorError2 = false;
|
|
4376
|
-
var _iteratorError2 = undefined;
|
|
4377
|
-
|
|
4378
|
-
try {
|
|
4379
|
-
for (var _iterator2 = error.locations[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
4380
|
-
var location = _step2.value;
|
|
4381
|
-
printedLocations.push(highlightSourceAtLocation(source, location));
|
|
4382
|
-
}
|
|
4383
|
-
} catch (err) {
|
|
4384
|
-
_didIteratorError2 = true;
|
|
4385
|
-
_iteratorError2 = err;
|
|
4386
|
-
} finally {
|
|
4387
|
-
try {
|
|
4388
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
4389
|
-
_iterator2.return();
|
|
4390
|
-
}
|
|
4391
|
-
} finally {
|
|
4392
|
-
if (_didIteratorError2) {
|
|
4393
|
-
throw _iteratorError2;
|
|
4394
|
-
}
|
|
4395
|
-
}
|
|
4396
|
-
}
|
|
4397
|
-
}
|
|
4398
|
-
|
|
4399
|
-
return printedLocations.length === 0 ? error.message : [error.message].concat(printedLocations).join('\n\n') + '\n';
|
|
4400
|
-
}
|
|
4401
|
-
/**
|
|
4402
|
-
* Render a helpful description of the location of the error in the GraphQL
|
|
4403
|
-
* Source document.
|
|
4404
|
-
*/
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
function highlightSourceAtLocation(source, location) {
|
|
4408
|
-
var firstLineColumnOffset = source.locationOffset.column - 1;
|
|
4409
|
-
var body = whitespace(firstLineColumnOffset) + source.body;
|
|
4410
|
-
var lineIndex = location.line - 1;
|
|
4411
|
-
var lineOffset = source.locationOffset.line - 1;
|
|
4412
|
-
var lineNum = location.line + lineOffset;
|
|
4413
|
-
var columnOffset = location.line === 1 ? firstLineColumnOffset : 0;
|
|
4414
|
-
var columnNum = location.column + columnOffset;
|
|
4415
|
-
var lines = body.split(/\r\n|[\n\r]/g);
|
|
4416
|
-
return "".concat(source.name, " (").concat(lineNum, ":").concat(columnNum, ")\n") + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
|
|
4417
|
-
["".concat(lineNum - 1, ": "), lines[lineIndex - 1]], ["".concat(lineNum, ": "), lines[lineIndex]], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1, ": "), lines[lineIndex + 1]]]);
|
|
4418
|
-
}
|
|
4419
|
-
|
|
4420
|
-
function printPrefixedLines(lines) {
|
|
4421
|
-
var existingLines = lines.filter(function (_ref) {
|
|
4422
|
-
var _ = _ref[0],
|
|
4423
|
-
line = _ref[1];
|
|
4424
|
-
return line !== undefined;
|
|
4425
|
-
});
|
|
4426
|
-
var padLen = 0;
|
|
4427
|
-
var _iteratorNormalCompletion3 = true;
|
|
4428
|
-
var _didIteratorError3 = false;
|
|
4429
|
-
var _iteratorError3 = undefined;
|
|
4430
|
-
|
|
4431
|
-
try {
|
|
4432
|
-
for (var _iterator3 = existingLines[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
|
|
4433
|
-
var _ref4 = _step3.value;
|
|
4434
|
-
var prefix = _ref4[0];
|
|
4435
|
-
padLen = Math.max(padLen, prefix.length);
|
|
4436
|
-
}
|
|
4437
|
-
} catch (err) {
|
|
4438
|
-
_didIteratorError3 = true;
|
|
4439
|
-
_iteratorError3 = err;
|
|
4440
|
-
} finally {
|
|
4441
|
-
try {
|
|
4442
|
-
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
|
|
4443
|
-
_iterator3.return();
|
|
4444
|
-
}
|
|
4445
|
-
} finally {
|
|
4446
|
-
if (_didIteratorError3) {
|
|
4447
|
-
throw _iteratorError3;
|
|
4448
|
-
}
|
|
4449
|
-
}
|
|
4450
|
-
}
|
|
4451
|
-
|
|
4452
|
-
return existingLines.map(function (_ref3) {
|
|
4453
|
-
var prefix = _ref3[0],
|
|
4454
|
-
line = _ref3[1];
|
|
4455
|
-
return lpad(padLen, prefix) + line;
|
|
4456
|
-
}).join('\n');
|
|
4457
|
-
}
|
|
4458
|
-
|
|
4459
|
-
function whitespace(len) {
|
|
4460
|
-
return Array(len + 1).join(' ');
|
|
4461
|
-
}
|
|
4462
|
-
|
|
4463
|
-
function lpad(len, str) {
|
|
4464
|
-
return whitespace(len - str.length) + str;
|
|
4465
|
-
}
|
|
4466
|
-
|
|
4467
|
-
/***/ }),
|
|
4468
|
-
|
|
4469
|
-
/***/ "../../node_modules/graphql/language/location.js":
|
|
4470
|
-
/*!******************************************************************!*\
|
|
4471
|
-
!*** /root/amplify-js/node_modules/graphql/language/location.js ***!
|
|
4472
|
-
\******************************************************************/
|
|
4473
|
-
/*! no static exports found */
|
|
4474
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
4475
|
-
|
|
4476
|
-
"use strict";
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4480
|
-
value: true
|
|
4481
|
-
});
|
|
4482
|
-
exports.getLocation = getLocation;
|
|
4483
|
-
|
|
4484
|
-
/**
|
|
4485
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
4486
|
-
*
|
|
4487
|
-
* This source code is licensed under the MIT license found in the
|
|
4488
|
-
* LICENSE file in the root directory of this source tree.
|
|
4489
|
-
*
|
|
4490
|
-
* strict
|
|
4491
|
-
*/
|
|
4492
|
-
|
|
4493
|
-
/**
|
|
4494
|
-
* Represents a location in a Source.
|
|
4495
|
-
*/
|
|
4496
|
-
|
|
4497
|
-
/**
|
|
4498
|
-
* Takes a Source and a UTF-8 character offset, and returns the corresponding
|
|
4499
|
-
* line and column as a SourceLocation.
|
|
4500
|
-
*/
|
|
4501
|
-
function getLocation(source, position) {
|
|
4502
|
-
var lineRegexp = /\r\n|[\n\r]/g;
|
|
4503
|
-
var line = 1;
|
|
4504
|
-
var column = position + 1;
|
|
4505
|
-
var match;
|
|
4506
|
-
|
|
4507
|
-
while ((match = lineRegexp.exec(source.body)) && match.index < position) {
|
|
4508
|
-
line += 1;
|
|
4509
|
-
column = position + 1 - (match.index + match[0].length);
|
|
4510
|
-
}
|
|
4511
|
-
|
|
4512
|
-
return {
|
|
4513
|
-
line: line,
|
|
4514
|
-
column: column
|
|
4515
|
-
};
|
|
4516
|
-
}
|
|
4517
|
-
|
|
4518
|
-
/***/ }),
|
|
4519
|
-
|
|
4520
4155
|
/***/ "../../node_modules/ieee754/index.js":
|
|
4521
4156
|
/*!******************************************************!*\
|
|
4522
4157
|
!*** /root/amplify-js/node_modules/ieee754/index.js ***!
|
|
@@ -9734,21 +9369,17 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
9734
9369
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "graphqlOperation", function() { return graphqlOperation; });
|
|
9735
9370
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphQLAPIClass", function() { return GraphQLAPIClass; });
|
|
9736
9371
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphQLAPI", function() { return GraphQLAPI; });
|
|
9737
|
-
/* harmony import */ var
|
|
9738
|
-
/* harmony import */ var
|
|
9739
|
-
/* harmony import */ var
|
|
9740
|
-
/* harmony import */ var
|
|
9741
|
-
/* harmony import */ var
|
|
9742
|
-
/* harmony import */ var
|
|
9743
|
-
/* harmony import */ var
|
|
9744
|
-
/* harmony import */ var
|
|
9745
|
-
/* harmony import */ var
|
|
9746
|
-
/* harmony import */ var
|
|
9747
|
-
/* harmony import */ var
|
|
9748
|
-
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
|
|
9749
|
-
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_6__);
|
|
9750
|
-
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "../api-graphql/lib-esm/types/index.js");
|
|
9751
|
-
/* harmony import */ var _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @aws-amplify/api-rest */ "../api-rest/lib-esm/index.js");
|
|
9372
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! graphql */ "graphql");
|
|
9373
|
+
/* harmony import */ var graphql__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(graphql__WEBPACK_IMPORTED_MODULE_0__);
|
|
9374
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
|
|
9375
|
+
/* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
9376
|
+
/* harmony import */ var _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/pubsub */ "../pubsub/lib-esm/index.js");
|
|
9377
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
|
|
9378
|
+
/* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__);
|
|
9379
|
+
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @aws-amplify/cache */ "@aws-amplify/cache");
|
|
9380
|
+
/* harmony import */ var _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4__);
|
|
9381
|
+
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./types */ "../api-graphql/lib-esm/types/index.js");
|
|
9382
|
+
/* harmony import */ var _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @aws-amplify/api-rest */ "../api-rest/lib-esm/index.js");
|
|
9752
9383
|
var __assign = undefined && undefined.__assign || function () {
|
|
9753
9384
|
__assign = Object.assign || function (t) {
|
|
9754
9385
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9968,10 +9599,8 @@ var __read = undefined && undefined.__read || function (o, n) {
|
|
|
9968
9599
|
|
|
9969
9600
|
|
|
9970
9601
|
|
|
9971
|
-
|
|
9972
|
-
|
|
9973
9602
|
var USER_AGENT_HEADER = 'x-amz-user-agent';
|
|
9974
|
-
var logger = new
|
|
9603
|
+
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('GraphQLAPI');
|
|
9975
9604
|
var graphqlOperation = function graphqlOperation(query, variables, authToken) {
|
|
9976
9605
|
if (variables === void 0) {
|
|
9977
9606
|
variables = {};
|
|
@@ -9987,16 +9616,18 @@ var graphqlOperation = function graphqlOperation(query, variables, authToken) {
|
|
|
9987
9616
|
* Export Cloud Logic APIs
|
|
9988
9617
|
*/
|
|
9989
9618
|
|
|
9990
|
-
var GraphQLAPIClass =
|
|
9619
|
+
var GraphQLAPIClass =
|
|
9620
|
+
/** @class */
|
|
9621
|
+
function () {
|
|
9991
9622
|
/**
|
|
9992
9623
|
* Initialize GraphQL API with AWS configuration
|
|
9993
9624
|
* @param {Object} options - Configuration object for API
|
|
9994
9625
|
*/
|
|
9995
9626
|
function GraphQLAPIClass(options) {
|
|
9996
9627
|
this._api = null;
|
|
9997
|
-
this.Auth =
|
|
9998
|
-
this.Cache =
|
|
9999
|
-
this.Credentials =
|
|
9628
|
+
this.Auth = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default.a;
|
|
9629
|
+
this.Cache = _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default.a;
|
|
9630
|
+
this.Credentials = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Credentials"];
|
|
10000
9631
|
this._options = options;
|
|
10001
9632
|
logger.debug('API Options', this._options);
|
|
10002
9633
|
}
|
|
@@ -10049,7 +9680,7 @@ var GraphQLAPIClass = function () {
|
|
|
10049
9680
|
logger.debug('create Rest instance');
|
|
10050
9681
|
|
|
10051
9682
|
if (this._options) {
|
|
10052
|
-
this._api = new
|
|
9683
|
+
this._api = new _aws_amplify_api_rest__WEBPACK_IMPORTED_MODULE_6__["RestClient"](this._options); // Share instance Credentials with client for SSR
|
|
10053
9684
|
|
|
10054
9685
|
this._api.Credentials = this.Credentials;
|
|
10055
9686
|
return true;
|
|
@@ -10107,7 +9738,7 @@ var GraphQLAPIClass = function () {
|
|
|
10107
9738
|
|
|
10108
9739
|
case 1:
|
|
10109
9740
|
if (!apiKey) {
|
|
10110
|
-
throw new Error(
|
|
9741
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_API_KEY);
|
|
10111
9742
|
}
|
|
10112
9743
|
|
|
10113
9744
|
headers = {
|
|
@@ -10127,7 +9758,7 @@ var GraphQLAPIClass = function () {
|
|
|
10127
9758
|
credentialsOK = _c.sent();
|
|
10128
9759
|
|
|
10129
9760
|
if (!credentialsOK) {
|
|
10130
|
-
throw new Error(
|
|
9761
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CREDENTIALS);
|
|
10131
9762
|
}
|
|
10132
9763
|
|
|
10133
9764
|
return [3
|
|
@@ -10140,7 +9771,7 @@ var GraphQLAPIClass = function () {
|
|
|
10140
9771
|
token = void 0;
|
|
10141
9772
|
return [4
|
|
10142
9773
|
/*yield*/
|
|
10143
|
-
,
|
|
9774
|
+
, _aws_amplify_cache__WEBPACK_IMPORTED_MODULE_4___default.a.getItem('federatedInfo')];
|
|
10144
9775
|
|
|
10145
9776
|
case 5:
|
|
10146
9777
|
federatedInfo = _c.sent();
|
|
@@ -10155,7 +9786,7 @@ var GraphQLAPIClass = function () {
|
|
|
10155
9786
|
case 6:
|
|
10156
9787
|
return [4
|
|
10157
9788
|
/*yield*/
|
|
10158
|
-
,
|
|
9789
|
+
, _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default.a.currentAuthenticatedUser()];
|
|
10159
9790
|
|
|
10160
9791
|
case 7:
|
|
10161
9792
|
currentUser = _c.sent();
|
|
@@ -10168,7 +9799,7 @@ var GraphQLAPIClass = function () {
|
|
|
10168
9799
|
|
|
10169
9800
|
case 8:
|
|
10170
9801
|
if (!token) {
|
|
10171
|
-
throw new Error(
|
|
9802
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_FEDERATED_JWT);
|
|
10172
9803
|
}
|
|
10173
9804
|
|
|
10174
9805
|
headers = {
|
|
@@ -10180,7 +9811,7 @@ var GraphQLAPIClass = function () {
|
|
|
10180
9811
|
|
|
10181
9812
|
case 9:
|
|
10182
9813
|
e_1 = _c.sent();
|
|
10183
|
-
throw new Error(
|
|
9814
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CURRENT_USER);
|
|
10184
9815
|
|
|
10185
9816
|
case 10:
|
|
10186
9817
|
return [3
|
|
@@ -10205,7 +9836,7 @@ var GraphQLAPIClass = function () {
|
|
|
10205
9836
|
|
|
10206
9837
|
case 13:
|
|
10207
9838
|
e_2 = _c.sent();
|
|
10208
|
-
throw new Error(
|
|
9839
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_CURRENT_USER);
|
|
10209
9840
|
|
|
10210
9841
|
case 14:
|
|
10211
9842
|
return [3
|
|
@@ -10214,7 +9845,7 @@ var GraphQLAPIClass = function () {
|
|
|
10214
9845
|
|
|
10215
9846
|
case 15:
|
|
10216
9847
|
if (!additionalHeaders.Authorization) {
|
|
10217
|
-
throw new Error(
|
|
9848
|
+
throw new Error(_types__WEBPACK_IMPORTED_MODULE_5__["GraphQLAuthError"].NO_AUTH_TOKEN);
|
|
10218
9849
|
}
|
|
10219
9850
|
|
|
10220
9851
|
headers = {
|
|
@@ -10247,9 +9878,10 @@ var GraphQLAPIClass = function () {
|
|
|
10247
9878
|
|
|
10248
9879
|
|
|
10249
9880
|
GraphQLAPIClass.prototype.getGraphqlOperationType = function (operation) {
|
|
10250
|
-
var doc = Object(
|
|
9881
|
+
var doc = Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(operation);
|
|
9882
|
+
var definitions = doc.definitions;
|
|
10251
9883
|
|
|
10252
|
-
var _a = __read(
|
|
9884
|
+
var _a = __read(definitions, 1),
|
|
10253
9885
|
operationType = _a[0].operation;
|
|
10254
9886
|
|
|
10255
9887
|
return operationType;
|
|
@@ -10269,7 +9901,7 @@ var GraphQLAPIClass = function () {
|
|
|
10269
9901
|
variables = _b === void 0 ? {} : _b,
|
|
10270
9902
|
authMode = _a.authMode,
|
|
10271
9903
|
authToken = _a.authToken;
|
|
10272
|
-
var query = typeof paramQuery === 'string' ? Object(
|
|
9904
|
+
var query = typeof paramQuery === 'string' ? Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(paramQuery) : Object(graphql__WEBPACK_IMPORTED_MODULE_0__["parse"])(Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(paramQuery));
|
|
10273
9905
|
|
|
10274
9906
|
var _c = __read(query.definitions.filter(function (def) {
|
|
10275
9907
|
return def.kind === 'OperationDefinition';
|
|
@@ -10403,9 +10035,9 @@ var GraphQLAPIClass = function () {
|
|
|
10403
10035
|
})];
|
|
10404
10036
|
|
|
10405
10037
|
case 9:
|
|
10406
|
-
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] =
|
|
10038
|
+
headers = __assign.apply(void 0, [__assign.apply(void 0, [__assign.apply(void 0, _j.concat([_l.sent()])), additionalHeaders]), !customGraphqlEndpoint && (_k = {}, _k[USER_AGENT_HEADER] = _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Constants"].userAgent, _k)]);
|
|
10407
10039
|
body = {
|
|
10408
|
-
query: Object(
|
|
10040
|
+
query: Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(query),
|
|
10409
10041
|
variables: variables
|
|
10410
10042
|
};
|
|
10411
10043
|
init = Object.assign({
|
|
@@ -10419,7 +10051,7 @@ var GraphQLAPIClass = function () {
|
|
|
10419
10051
|
endpoint = customGraphqlEndpoint || appSyncGraphqlEndpoint;
|
|
10420
10052
|
|
|
10421
10053
|
if (!endpoint) {
|
|
10422
|
-
error = new
|
|
10054
|
+
error = new graphql__WEBPACK_IMPORTED_MODULE_0__["GraphQLError"]('No graphql endpoint provided.');
|
|
10423
10055
|
throw {
|
|
10424
10056
|
data: {},
|
|
10425
10057
|
errors: [error]
|
|
@@ -10452,7 +10084,7 @@ var GraphQLAPIClass = function () {
|
|
|
10452
10084
|
|
|
10453
10085
|
response = {
|
|
10454
10086
|
data: {},
|
|
10455
|
-
errors: [new
|
|
10087
|
+
errors: [new graphql__WEBPACK_IMPORTED_MODULE_0__["GraphQLError"](err_1.message, null, null, null, null, err_1)]
|
|
10456
10088
|
};
|
|
10457
10089
|
return [3
|
|
10458
10090
|
/*break*/
|
|
@@ -10514,13 +10146,13 @@ var GraphQLAPIClass = function () {
|
|
|
10514
10146
|
} : _c;
|
|
10515
10147
|
var authenticationType = defaultAuthenticationType || aws_appsync_authenticationType || 'AWS_IAM';
|
|
10516
10148
|
|
|
10517
|
-
if (
|
|
10518
|
-
return
|
|
10519
|
-
provider:
|
|
10149
|
+
if (_aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"] && typeof _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe === 'function') {
|
|
10150
|
+
return _aws_amplify_pubsub__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe('', {
|
|
10151
|
+
provider: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["INTERNAL_AWS_APPSYNC_REALTIME_PUBSUB_PROVIDER"],
|
|
10520
10152
|
appSyncGraphqlEndpoint: appSyncGraphqlEndpoint,
|
|
10521
10153
|
authenticationType: authenticationType,
|
|
10522
10154
|
apiKey: apiKey,
|
|
10523
|
-
query: Object(
|
|
10155
|
+
query: Object(graphql__WEBPACK_IMPORTED_MODULE_0__["print"])(query),
|
|
10524
10156
|
region: region,
|
|
10525
10157
|
variables: variables,
|
|
10526
10158
|
graphql_headers: graphql_headers,
|
|
@@ -10558,7 +10190,7 @@ var GraphQLAPIClass = function () {
|
|
|
10558
10190
|
|
|
10559
10191
|
|
|
10560
10192
|
var GraphQLAPI = new GraphQLAPIClass(null);
|
|
10561
|
-
|
|
10193
|
+
_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Amplify"].register(GraphQLAPI);
|
|
10562
10194
|
|
|
10563
10195
|
/***/ }),
|
|
10564
10196
|
|
|
@@ -10842,7 +10474,9 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]
|
|
|
10842
10474
|
* Export Cloud Logic APIs
|
|
10843
10475
|
*/
|
|
10844
10476
|
|
|
10845
|
-
var RestAPIClass =
|
|
10477
|
+
var RestAPIClass =
|
|
10478
|
+
/** @class */
|
|
10479
|
+
function () {
|
|
10846
10480
|
/**
|
|
10847
10481
|
* Initialize Rest API with AWS configuration
|
|
10848
10482
|
* @param {Object} options - Configuration object for API
|
|
@@ -11392,7 +11026,9 @@ restClient.get('...')
|
|
|
11392
11026
|
</pre>
|
|
11393
11027
|
*/
|
|
11394
11028
|
|
|
11395
|
-
var RestClient =
|
|
11029
|
+
var RestClient =
|
|
11030
|
+
/** @class */
|
|
11031
|
+
function () {
|
|
11396
11032
|
/**
|
|
11397
11033
|
* @param {RestClientOptions} [options] - Instance options
|
|
11398
11034
|
*/
|
|
@@ -12077,7 +11713,9 @@ var __spread = undefined && undefined.__spread || function () {
|
|
|
12077
11713
|
|
|
12078
11714
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('AWSAppSyncProvider');
|
|
12079
11715
|
|
|
12080
|
-
var AWSAppSyncProvider =
|
|
11716
|
+
var AWSAppSyncProvider =
|
|
11717
|
+
/** @class */
|
|
11718
|
+
function (_super) {
|
|
12081
11719
|
__extends(AWSAppSyncProvider, _super);
|
|
12082
11720
|
|
|
12083
11721
|
function AWSAppSyncProvider() {
|
|
@@ -12756,7 +12394,9 @@ var START_ACK_TIMEOUT = 15000;
|
|
|
12756
12394
|
|
|
12757
12395
|
var DEFAULT_KEEP_ALIVE_TIMEOUT = 5 * 60 * 1000;
|
|
12758
12396
|
|
|
12759
|
-
var AWSAppSyncRealTimeProvider =
|
|
12397
|
+
var AWSAppSyncRealTimeProvider =
|
|
12398
|
+
/** @class */
|
|
12399
|
+
function (_super) {
|
|
12760
12400
|
__extends(AWSAppSyncRealTimeProvider, _super);
|
|
12761
12401
|
|
|
12762
12402
|
function AWSAppSyncRealTimeProvider() {
|
|
@@ -13962,7 +13602,9 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
13962
13602
|
|
|
13963
13603
|
var SERVICE_NAME = 'iotdevicegateway';
|
|
13964
13604
|
|
|
13965
|
-
var AWSIoTProvider =
|
|
13605
|
+
var AWSIoTProvider =
|
|
13606
|
+
/** @class */
|
|
13607
|
+
function (_super) {
|
|
13966
13608
|
__extends(AWSIoTProvider, _super);
|
|
13967
13609
|
|
|
13968
13610
|
function AWSIoTProvider() {
|
|
@@ -14293,7 +13935,9 @@ function mqttTopicMatch(filter, topic) {
|
|
|
14293
13935
|
return length === topicArray.length;
|
|
14294
13936
|
}
|
|
14295
13937
|
|
|
14296
|
-
var ClientsQueue =
|
|
13938
|
+
var ClientsQueue =
|
|
13939
|
+
/** @class */
|
|
13940
|
+
function () {
|
|
14297
13941
|
function ClientsQueue() {
|
|
14298
13942
|
this.promises = new Map();
|
|
14299
13943
|
}
|
|
@@ -14336,7 +13980,9 @@ var ClientsQueue = function () {
|
|
|
14336
13980
|
|
|
14337
13981
|
var topicSymbol = typeof Symbol !== 'undefined' ? Symbol('topic') : '@@topic';
|
|
14338
13982
|
|
|
14339
|
-
var MqttOverWSProvider =
|
|
13983
|
+
var MqttOverWSProvider =
|
|
13984
|
+
/** @class */
|
|
13985
|
+
function (_super) {
|
|
14340
13986
|
__extends(MqttOverWSProvider, _super);
|
|
14341
13987
|
|
|
14342
13988
|
function MqttOverWSProvider(options) {
|
|
@@ -14772,7 +14418,9 @@ var __assign = undefined && undefined.__assign || function () {
|
|
|
14772
14418
|
|
|
14773
14419
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_0__["ConsoleLogger"]('AbstractPubSubProvider');
|
|
14774
14420
|
|
|
14775
|
-
var AbstractPubSubProvider =
|
|
14421
|
+
var AbstractPubSubProvider =
|
|
14422
|
+
/** @class */
|
|
14423
|
+
function () {
|
|
14776
14424
|
function AbstractPubSubProvider(options) {
|
|
14777
14425
|
if (options === void 0) {
|
|
14778
14426
|
options = {};
|
|
@@ -15033,7 +14681,9 @@ var __generator = undefined && undefined.__generator || function (thisArg, body)
|
|
|
15033
14681
|
var isNode = Object(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["browserOrNode"])().isNode;
|
|
15034
14682
|
var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('PubSub');
|
|
15035
14683
|
|
|
15036
|
-
var PubSubClass =
|
|
14684
|
+
var PubSubClass =
|
|
14685
|
+
/** @class */
|
|
14686
|
+
function () {
|
|
15037
14687
|
/**
|
|
15038
14688
|
* Initialize PubSub with AWS configurations
|
|
15039
14689
|
*
|
|
@@ -15496,7 +15146,9 @@ var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_4__["ConsoleLogger"]
|
|
|
15496
15146
|
* Export Cloud Logic APIs
|
|
15497
15147
|
*/
|
|
15498
15148
|
|
|
15499
|
-
var APIClass =
|
|
15149
|
+
var APIClass =
|
|
15150
|
+
/** @class */
|
|
15151
|
+
function () {
|
|
15500
15152
|
/**
|
|
15501
15153
|
* Initialize API with AWS configuration
|
|
15502
15154
|
* @param {Object} options - Configuration object for API
|
|
@@ -15760,28 +15412,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__aws_amplify_core__;
|
|
|
15760
15412
|
|
|
15761
15413
|
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql__;
|
|
15762
15414
|
|
|
15763
|
-
/***/ }),
|
|
15764
|
-
|
|
15765
|
-
/***/ "graphql/language/parser":
|
|
15766
|
-
/*!******************************************!*\
|
|
15767
|
-
!*** external "graphql/language/parser" ***!
|
|
15768
|
-
\******************************************/
|
|
15769
|
-
/*! no static exports found */
|
|
15770
|
-
/***/ (function(module, exports) {
|
|
15771
|
-
|
|
15772
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql_language_parser__;
|
|
15773
|
-
|
|
15774
|
-
/***/ }),
|
|
15775
|
-
|
|
15776
|
-
/***/ "graphql/language/printer":
|
|
15777
|
-
/*!*******************************************!*\
|
|
15778
|
-
!*** external "graphql/language/printer" ***!
|
|
15779
|
-
\*******************************************/
|
|
15780
|
-
/*! no static exports found */
|
|
15781
|
-
/***/ (function(module, exports) {
|
|
15782
|
-
|
|
15783
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_graphql_language_printer__;
|
|
15784
|
-
|
|
15785
15415
|
/***/ })
|
|
15786
15416
|
|
|
15787
15417
|
/******/ });
|