@bcrumbs.net/bc-api 0.0.3 → 0.0.5

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/index.umd.js CHANGED
@@ -1,11 +1,12 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@apollo/client'), require('@apollo/client/link/error'), require('@apollo/client/link/context'), require('apollo-link-rest'), require('apollo-link-error'), require('next-with-apollo'), require('jwt-decode'), require('date-fns'), require('apollo-cache-inmemory'), require('apollo-link-http'), require('stream'), require('http'), require('url'), require('punycode'), require('https'), require('zlib'), require('i18next'), require('react-i18next'), require('i18next-http-backend'), require('i18next-browser-languagedetector')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@apollo/client', '@apollo/client/link/error', '@apollo/client/link/context', 'apollo-link-rest', 'apollo-link-error', 'next-with-apollo', 'jwt-decode', 'date-fns', 'apollo-cache-inmemory', 'apollo-link-http', 'stream', 'http', 'url', 'punycode', 'https', 'zlib', 'i18next', 'react-i18next', 'i18next-http-backend', 'i18next-browser-languagedetector'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BcApi = {}, global.client, global.error, global.context, global.apolloLinkRest, global.apolloLinkError, global.withApollo, global.decode, global.dateFns, global.apolloCacheInmemory, global.apolloLinkHttp, global.Stream, global.http, global.Url, global.require$$0$1, global.https, global.zlib, global.i18n, global.reactI18next, global.Backend, global.LanguageDetector));
5
- })(this, (function (exports, client, error, context, apolloLinkRest, apolloLinkError, withApollo, decode, dateFns, apolloCacheInmemory, apolloLinkHttp, Stream, http, Url, require$$0$1, https, zlib, i18n, reactI18next, Backend, LanguageDetector) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('graphql-tag'), require('@apollo/client'), require('@apollo/client/link/error'), require('@apollo/client/link/context'), require('apollo-link-rest'), require('next-with-apollo'), require('jwt-decode'), require('date-fns'), require('apollo-cache-inmemory'), require('apollo-link-http'), require('stream'), require('http'), require('url'), require('punycode'), require('https'), require('zlib'), require('i18next'), require('react-i18next'), require('i18next-http-backend'), require('i18next-browser-languagedetector')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'graphql-tag', '@apollo/client', '@apollo/client/link/error', '@apollo/client/link/context', 'apollo-link-rest', 'next-with-apollo', 'jwt-decode', 'date-fns', 'apollo-cache-inmemory', 'apollo-link-http', 'stream', 'http', 'url', 'punycode', 'https', 'zlib', 'i18next', 'react-i18next', 'i18next-http-backend', 'i18next-browser-languagedetector'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BcApi = {}, global.gql, global.client, global.error, global.context, global.apolloLinkRest, global.withApollo, global.decode, global.dateFns, global.apolloCacheInmemory, global.apolloLinkHttp, global.Stream, global.http, global.Url, global.require$$0$1, global.https, global.zlib, global.i18n, global.reactI18next, global.Backend, global.LanguageDetector));
5
+ })(this, (function (exports, gql, client, error, context, apolloLinkRest, withApollo, decode, dateFns, apolloCacheInmemory, apolloLinkHttp, Stream, http, Url, require$$0$1, https, zlib, i18n, reactI18next, Backend, LanguageDetector) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
+ var gql__default = /*#__PURE__*/_interopDefaultLegacy(gql);
9
10
  var withApollo__default = /*#__PURE__*/_interopDefaultLegacy(withApollo);
10
11
  var decode__default = /*#__PURE__*/_interopDefaultLegacy(decode);
11
12
  var Stream__default = /*#__PURE__*/_interopDefaultLegacy(Stream);
@@ -87,3217 +88,6 @@
87
88
  return cooked;
88
89
  }
89
90
 
90
- function _typeof$3(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$3 = function _typeof(obj) { return typeof obj; }; } else { _typeof$3 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$3(obj); }
91
-
92
- /**
93
- * Return true if `value` is object-like. A value is object-like if it's not
94
- * `null` and has a `typeof` result of "object".
95
- */
96
- function isObjectLike(value) {
97
- return _typeof$3(value) == 'object' && value !== null;
98
- }
99
-
100
- // In ES2015 (or a polyfilled) environment, this will be Symbol.iterator
101
-
102
- var SYMBOL_TO_STRING_TAG = typeof Symbol === 'function' && Symbol.toStringTag != null ? Symbol.toStringTag : '@@toStringTag';
103
-
104
- /**
105
- * Represents a location in a Source.
106
- */
107
-
108
- /**
109
- * Takes a Source and a UTF-8 character offset, and returns the corresponding
110
- * line and column as a SourceLocation.
111
- */
112
- function getLocation(source, position) {
113
- var lineRegexp = /\r\n|[\n\r]/g;
114
- var line = 1;
115
- var column = position + 1;
116
- var match;
117
-
118
- while ((match = lineRegexp.exec(source.body)) && match.index < position) {
119
- line += 1;
120
- column = position + 1 - (match.index + match[0].length);
121
- }
122
-
123
- return {
124
- line: line,
125
- column: column
126
- };
127
- }
128
-
129
- /**
130
- * Render a helpful description of the location in the GraphQL Source document.
131
- */
132
-
133
- function printLocation(location) {
134
- return printSourceLocation(location.source, getLocation(location.source, location.start));
135
- }
136
- /**
137
- * Render a helpful description of the location in the GraphQL Source document.
138
- */
139
-
140
- function printSourceLocation(source, sourceLocation) {
141
- var firstLineColumnOffset = source.locationOffset.column - 1;
142
- var body = whitespace(firstLineColumnOffset) + source.body;
143
- var lineIndex = sourceLocation.line - 1;
144
- var lineOffset = source.locationOffset.line - 1;
145
- var lineNum = sourceLocation.line + lineOffset;
146
- var columnOffset = sourceLocation.line === 1 ? firstLineColumnOffset : 0;
147
- var columnNum = sourceLocation.column + columnOffset;
148
- var locationStr = "".concat(source.name, ":").concat(lineNum, ":").concat(columnNum, "\n");
149
- var lines = body.split(/\r\n|[\n\r]/g);
150
- var locationLine = lines[lineIndex]; // Special case for minified documents
151
-
152
- if (locationLine.length > 120) {
153
- var subLineIndex = Math.floor(columnNum / 80);
154
- var subLineColumnNum = columnNum % 80;
155
- var subLines = [];
156
-
157
- for (var i = 0; i < locationLine.length; i += 80) {
158
- subLines.push(locationLine.slice(i, i + 80));
159
- }
160
-
161
- return locationStr + printPrefixedLines([["".concat(lineNum), subLines[0]]].concat(subLines.slice(1, subLineIndex + 1).map(function (subLine) {
162
- return ['', subLine];
163
- }), [[' ', whitespace(subLineColumnNum - 1) + '^'], ['', subLines[subLineIndex + 1]]]));
164
- }
165
-
166
- return locationStr + printPrefixedLines([// Lines specified like this: ["prefix", "string"],
167
- ["".concat(lineNum - 1), lines[lineIndex - 1]], ["".concat(lineNum), locationLine], ['', whitespace(columnNum - 1) + '^'], ["".concat(lineNum + 1), lines[lineIndex + 1]]]);
168
- }
169
-
170
- function printPrefixedLines(lines) {
171
- var existingLines = lines.filter(function (_ref) {
172
- _ref[0];
173
- var line = _ref[1];
174
- return line !== undefined;
175
- });
176
- var padLen = Math.max.apply(Math, existingLines.map(function (_ref2) {
177
- var prefix = _ref2[0];
178
- return prefix.length;
179
- }));
180
- return existingLines.map(function (_ref3) {
181
- var prefix = _ref3[0],
182
- line = _ref3[1];
183
- return leftPad(padLen, prefix) + (line ? ' | ' + line : ' |');
184
- }).join('\n');
185
- }
186
-
187
- function whitespace(len) {
188
- return Array(len + 1).join(' ');
189
- }
190
-
191
- function leftPad(len, str) {
192
- return whitespace(len - str.length) + str;
193
- }
194
-
195
- function _typeof$2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$2 = function _typeof(obj) { return typeof obj; }; } else { _typeof$2 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$2(obj); }
196
-
197
- function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
198
-
199
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
200
-
201
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
202
-
203
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
204
-
205
- function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
206
-
207
- function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
208
-
209
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
210
-
211
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
212
-
213
- function _possibleConstructorReturn(self, call) { if (call && (_typeof$2(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
214
-
215
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
216
-
217
- function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
218
-
219
- function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
220
-
221
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
222
-
223
- function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
224
-
225
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
226
-
227
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
228
- /**
229
- * A GraphQLError describes an Error found during the parse, validate, or
230
- * execute phases of performing a GraphQL operation. In addition to a message
231
- * and stack trace, it also includes information about the locations in a
232
- * GraphQL document and/or execution result that correspond to the Error.
233
- */
234
-
235
- var GraphQLError = /*#__PURE__*/function (_Error) {
236
- _inherits(GraphQLError, _Error);
237
-
238
- var _super = _createSuper(GraphQLError);
239
-
240
- /**
241
- * An array of { line, column } locations within the source GraphQL document
242
- * which correspond to this error.
243
- *
244
- * Errors during validation often contain multiple locations, for example to
245
- * point out two things with the same name. Errors during execution include a
246
- * single location, the field which produced the error.
247
- *
248
- * Enumerable, and appears in the result of JSON.stringify().
249
- */
250
-
251
- /**
252
- * An array describing the JSON-path into the execution response which
253
- * corresponds to this error. Only included for errors during execution.
254
- *
255
- * Enumerable, and appears in the result of JSON.stringify().
256
- */
257
-
258
- /**
259
- * An array of GraphQL AST Nodes corresponding to this error.
260
- */
261
-
262
- /**
263
- * The source GraphQL document for the first location of this error.
264
- *
265
- * Note that if this Error represents more than one node, the source may not
266
- * represent nodes after the first node.
267
- */
268
-
269
- /**
270
- * An array of character offsets within the source GraphQL document
271
- * which correspond to this error.
272
- */
273
-
274
- /**
275
- * The original error thrown from a field resolver during execution.
276
- */
277
-
278
- /**
279
- * Extension fields to add to the formatted error.
280
- */
281
- function GraphQLError(message, nodes, source, positions, path, originalError, extensions) {
282
- var _nodeLocations, _nodeLocations2, _nodeLocations3;
283
-
284
- var _this;
285
-
286
- _classCallCheck(this, GraphQLError);
287
-
288
- _this = _super.call(this, message);
289
- _this.name = 'GraphQLError';
290
- _this.originalError = originalError !== null && originalError !== void 0 ? originalError : undefined; // Compute list of blame nodes.
291
-
292
- _this.nodes = undefinedIfEmpty(Array.isArray(nodes) ? nodes : nodes ? [nodes] : undefined);
293
- var nodeLocations = [];
294
-
295
- for (var _i2 = 0, _ref3 = (_this$nodes = _this.nodes) !== null && _this$nodes !== void 0 ? _this$nodes : []; _i2 < _ref3.length; _i2++) {
296
- var _this$nodes;
297
-
298
- var _ref4 = _ref3[_i2];
299
- var loc = _ref4.loc;
300
-
301
- if (loc != null) {
302
- nodeLocations.push(loc);
303
- }
304
- }
305
-
306
- nodeLocations = undefinedIfEmpty(nodeLocations); // Compute locations in the source for the given nodes/positions.
307
-
308
- _this.source = source !== null && source !== void 0 ? source : (_nodeLocations = nodeLocations) === null || _nodeLocations === void 0 ? void 0 : _nodeLocations[0].source;
309
- _this.positions = positions !== null && positions !== void 0 ? positions : (_nodeLocations2 = nodeLocations) === null || _nodeLocations2 === void 0 ? void 0 : _nodeLocations2.map(function (loc) {
310
- return loc.start;
311
- });
312
- _this.locations = positions && source ? positions.map(function (pos) {
313
- return getLocation(source, pos);
314
- }) : (_nodeLocations3 = nodeLocations) === null || _nodeLocations3 === void 0 ? void 0 : _nodeLocations3.map(function (loc) {
315
- return getLocation(loc.source, loc.start);
316
- });
317
- _this.path = path !== null && path !== void 0 ? path : undefined;
318
- var originalExtensions = originalError === null || originalError === void 0 ? void 0 : originalError.extensions;
319
-
320
- if (extensions == null && isObjectLike(originalExtensions)) {
321
- _this.extensions = _objectSpread({}, originalExtensions);
322
- } else {
323
- _this.extensions = extensions !== null && extensions !== void 0 ? extensions : {};
324
- } // By being enumerable, JSON.stringify will include bellow properties in the resulting output.
325
- // This ensures that the simplest possible GraphQL service adheres to the spec.
326
-
327
-
328
- Object.defineProperties(_assertThisInitialized(_this), {
329
- message: {
330
- enumerable: true
331
- },
332
- locations: {
333
- enumerable: _this.locations != null
334
- },
335
- path: {
336
- enumerable: _this.path != null
337
- },
338
- extensions: {
339
- enumerable: _this.extensions != null && Object.keys(_this.extensions).length > 0
340
- },
341
- name: {
342
- enumerable: false
343
- },
344
- nodes: {
345
- enumerable: false
346
- },
347
- source: {
348
- enumerable: false
349
- },
350
- positions: {
351
- enumerable: false
352
- },
353
- originalError: {
354
- enumerable: false
355
- }
356
- }); // Include (non-enumerable) stack trace.
357
-
358
- if (originalError !== null && originalError !== void 0 && originalError.stack) {
359
- Object.defineProperty(_assertThisInitialized(_this), 'stack', {
360
- value: originalError.stack,
361
- writable: true,
362
- configurable: true
363
- });
364
- return _possibleConstructorReturn(_this);
365
- } // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
366
-
367
-
368
- if (Error.captureStackTrace) {
369
- Error.captureStackTrace(_assertThisInitialized(_this), GraphQLError);
370
- } else {
371
- Object.defineProperty(_assertThisInitialized(_this), 'stack', {
372
- value: Error().stack,
373
- writable: true,
374
- configurable: true
375
- });
376
- }
377
-
378
- return _this;
379
- }
380
-
381
- _createClass$1(GraphQLError, [{
382
- key: "toString",
383
- value: function toString() {
384
- return printError(this);
385
- } // FIXME: workaround to not break chai comparisons, should be remove in v16
386
- // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
387
-
388
- }, {
389
- key: SYMBOL_TO_STRING_TAG,
390
- get: function get() {
391
- return 'Object';
392
- }
393
- }]);
394
-
395
- return GraphQLError;
396
- }( /*#__PURE__*/_wrapNativeSuper(Error));
397
-
398
- function undefinedIfEmpty(array) {
399
- return array === undefined || array.length === 0 ? undefined : array;
400
- }
401
- /**
402
- * Prints a GraphQLError to a string, representing useful location information
403
- * about the error's position in the source.
404
- */
405
-
406
-
407
- function printError(error) {
408
- var output = error.message;
409
-
410
- if (error.nodes) {
411
- for (var _i4 = 0, _error$nodes2 = error.nodes; _i4 < _error$nodes2.length; _i4++) {
412
- var node = _error$nodes2[_i4];
413
-
414
- if (node.loc) {
415
- output += '\n\n' + printLocation(node.loc);
416
- }
417
- }
418
- } else if (error.source && error.locations) {
419
- for (var _i6 = 0, _error$locations2 = error.locations; _i6 < _error$locations2.length; _i6++) {
420
- var location = _error$locations2[_i6];
421
- output += '\n\n' + printSourceLocation(error.source, location);
422
- }
423
- }
424
-
425
- return output;
426
- }
427
-
428
- /**
429
- * Produces a GraphQLError representing a syntax error, containing useful
430
- * descriptive information about the syntax error's position in the source.
431
- */
432
-
433
- function syntaxError(source, position, description) {
434
- return new GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]);
435
- }
436
-
437
- /**
438
- * The set of allowed kind values for AST nodes.
439
- */
440
- var Kind = Object.freeze({
441
- // Name
442
- NAME: 'Name',
443
- // Document
444
- DOCUMENT: 'Document',
445
- OPERATION_DEFINITION: 'OperationDefinition',
446
- VARIABLE_DEFINITION: 'VariableDefinition',
447
- SELECTION_SET: 'SelectionSet',
448
- FIELD: 'Field',
449
- ARGUMENT: 'Argument',
450
- // Fragments
451
- FRAGMENT_SPREAD: 'FragmentSpread',
452
- INLINE_FRAGMENT: 'InlineFragment',
453
- FRAGMENT_DEFINITION: 'FragmentDefinition',
454
- // Values
455
- VARIABLE: 'Variable',
456
- INT: 'IntValue',
457
- FLOAT: 'FloatValue',
458
- STRING: 'StringValue',
459
- BOOLEAN: 'BooleanValue',
460
- NULL: 'NullValue',
461
- ENUM: 'EnumValue',
462
- LIST: 'ListValue',
463
- OBJECT: 'ObjectValue',
464
- OBJECT_FIELD: 'ObjectField',
465
- // Directives
466
- DIRECTIVE: 'Directive',
467
- // Types
468
- NAMED_TYPE: 'NamedType',
469
- LIST_TYPE: 'ListType',
470
- NON_NULL_TYPE: 'NonNullType',
471
- // Type System Definitions
472
- SCHEMA_DEFINITION: 'SchemaDefinition',
473
- OPERATION_TYPE_DEFINITION: 'OperationTypeDefinition',
474
- // Type Definitions
475
- SCALAR_TYPE_DEFINITION: 'ScalarTypeDefinition',
476
- OBJECT_TYPE_DEFINITION: 'ObjectTypeDefinition',
477
- FIELD_DEFINITION: 'FieldDefinition',
478
- INPUT_VALUE_DEFINITION: 'InputValueDefinition',
479
- INTERFACE_TYPE_DEFINITION: 'InterfaceTypeDefinition',
480
- UNION_TYPE_DEFINITION: 'UnionTypeDefinition',
481
- ENUM_TYPE_DEFINITION: 'EnumTypeDefinition',
482
- ENUM_VALUE_DEFINITION: 'EnumValueDefinition',
483
- INPUT_OBJECT_TYPE_DEFINITION: 'InputObjectTypeDefinition',
484
- // Directive Definitions
485
- DIRECTIVE_DEFINITION: 'DirectiveDefinition',
486
- // Type System Extensions
487
- SCHEMA_EXTENSION: 'SchemaExtension',
488
- // Type Extensions
489
- SCALAR_TYPE_EXTENSION: 'ScalarTypeExtension',
490
- OBJECT_TYPE_EXTENSION: 'ObjectTypeExtension',
491
- INTERFACE_TYPE_EXTENSION: 'InterfaceTypeExtension',
492
- UNION_TYPE_EXTENSION: 'UnionTypeExtension',
493
- ENUM_TYPE_EXTENSION: 'EnumTypeExtension',
494
- INPUT_OBJECT_TYPE_EXTENSION: 'InputObjectTypeExtension'
495
- });
496
- /**
497
- * The enum type representing the possible kind values of AST nodes.
498
- */
499
-
500
- function invariant(condition, message) {
501
- var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
502
-
503
- if (!booleanCondition) {
504
- throw new Error(message != null ? message : 'Unexpected invariant triggered.');
505
- }
506
- }
507
-
508
- // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
509
- var nodejsCustomInspectSymbol = typeof Symbol === 'function' && typeof Symbol.for === 'function' ? Symbol.for('nodejs.util.inspect.custom') : undefined;
510
- var nodejsCustomInspectSymbol$1 = nodejsCustomInspectSymbol;
511
-
512
- /**
513
- * The `defineInspect()` function defines `inspect()` prototype method as alias of `toJSON`
514
- */
515
-
516
- function defineInspect(classObject) {
517
- var fn = classObject.prototype.toJSON;
518
- typeof fn === 'function' || invariant(0);
519
- classObject.prototype.inspect = fn; // istanbul ignore else (See: 'https://github.com/graphql/graphql-js/issues/2317')
520
-
521
- if (nodejsCustomInspectSymbol$1) {
522
- classObject.prototype[nodejsCustomInspectSymbol$1] = fn;
523
- }
524
- }
525
-
526
- /**
527
- * Contains a range of UTF-8 character offsets and token references that
528
- * identify the region of the source from which the AST derived.
529
- */
530
- var Location = /*#__PURE__*/function () {
531
- /**
532
- * The character offset at which this Node begins.
533
- */
534
-
535
- /**
536
- * The character offset at which this Node ends.
537
- */
538
-
539
- /**
540
- * The Token at which this Node begins.
541
- */
542
-
543
- /**
544
- * The Token at which this Node ends.
545
- */
546
-
547
- /**
548
- * The Source document the AST represents.
549
- */
550
- function Location(startToken, endToken, source) {
551
- this.start = startToken.start;
552
- this.end = endToken.end;
553
- this.startToken = startToken;
554
- this.endToken = endToken;
555
- this.source = source;
556
- }
557
-
558
- var _proto = Location.prototype;
559
-
560
- _proto.toJSON = function toJSON() {
561
- return {
562
- start: this.start,
563
- end: this.end
564
- };
565
- };
566
-
567
- return Location;
568
- }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
569
-
570
- defineInspect(Location);
571
- /**
572
- * Represents a range of characters represented by a lexical token
573
- * within a Source.
574
- */
575
-
576
- var Token = /*#__PURE__*/function () {
577
- /**
578
- * The kind of Token.
579
- */
580
-
581
- /**
582
- * The character offset at which this Node begins.
583
- */
584
-
585
- /**
586
- * The character offset at which this Node ends.
587
- */
588
-
589
- /**
590
- * The 1-indexed line number on which this Token appears.
591
- */
592
-
593
- /**
594
- * The 1-indexed column number at which this Token begins.
595
- */
596
-
597
- /**
598
- * For non-punctuation tokens, represents the interpreted value of the token.
599
- */
600
-
601
- /**
602
- * Tokens exist as nodes in a double-linked-list amongst all tokens
603
- * including ignored tokens. <SOF> is always the first node and <EOF>
604
- * the last.
605
- */
606
- function Token(kind, start, end, line, column, prev, value) {
607
- this.kind = kind;
608
- this.start = start;
609
- this.end = end;
610
- this.line = line;
611
- this.column = column;
612
- this.value = value;
613
- this.prev = prev;
614
- this.next = null;
615
- }
616
-
617
- var _proto2 = Token.prototype;
618
-
619
- _proto2.toJSON = function toJSON() {
620
- return {
621
- kind: this.kind,
622
- value: this.value,
623
- line: this.line,
624
- column: this.column
625
- };
626
- };
627
-
628
- return Token;
629
- }(); // Print a simplified form when appearing in `inspect` and `util.inspect`.
630
-
631
- defineInspect(Token);
632
- /**
633
- * The list of all possible AST node types.
634
- */
635
-
636
- /**
637
- * An exported enum describing the different kinds of tokens that the
638
- * lexer emits.
639
- */
640
- var TokenKind = Object.freeze({
641
- SOF: '<SOF>',
642
- EOF: '<EOF>',
643
- BANG: '!',
644
- DOLLAR: '$',
645
- AMP: '&',
646
- PAREN_L: '(',
647
- PAREN_R: ')',
648
- SPREAD: '...',
649
- COLON: ':',
650
- EQUALS: '=',
651
- AT: '@',
652
- BRACKET_L: '[',
653
- BRACKET_R: ']',
654
- BRACE_L: '{',
655
- PIPE: '|',
656
- BRACE_R: '}',
657
- NAME: 'Name',
658
- INT: 'Int',
659
- FLOAT: 'Float',
660
- STRING: 'String',
661
- BLOCK_STRING: 'BlockString',
662
- COMMENT: 'Comment'
663
- });
664
- /**
665
- * The enum type representing the token kinds values.
666
- */
667
-
668
- function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
669
- var MAX_ARRAY_LENGTH = 10;
670
- var MAX_RECURSIVE_DEPTH = 2;
671
- /**
672
- * Used to print values in error messages.
673
- */
674
-
675
- function inspect(value) {
676
- return formatValue(value, []);
677
- }
678
-
679
- function formatValue(value, seenValues) {
680
- switch (_typeof$1(value)) {
681
- case 'string':
682
- return JSON.stringify(value);
683
-
684
- case 'function':
685
- return value.name ? "[function ".concat(value.name, "]") : '[function]';
686
-
687
- case 'object':
688
- if (value === null) {
689
- return 'null';
690
- }
691
-
692
- return formatObjectValue(value, seenValues);
693
-
694
- default:
695
- return String(value);
696
- }
697
- }
698
-
699
- function formatObjectValue(value, previouslySeenValues) {
700
- if (previouslySeenValues.indexOf(value) !== -1) {
701
- return '[Circular]';
702
- }
703
-
704
- var seenValues = [].concat(previouslySeenValues, [value]);
705
- var customInspectFn = getCustomFn(value);
706
-
707
- if (customInspectFn !== undefined) {
708
- var customValue = customInspectFn.call(value); // check for infinite recursion
709
-
710
- if (customValue !== value) {
711
- return typeof customValue === 'string' ? customValue : formatValue(customValue, seenValues);
712
- }
713
- } else if (Array.isArray(value)) {
714
- return formatArray(value, seenValues);
715
- }
716
-
717
- return formatObject(value, seenValues);
718
- }
719
-
720
- function formatObject(object, seenValues) {
721
- var keys = Object.keys(object);
722
-
723
- if (keys.length === 0) {
724
- return '{}';
725
- }
726
-
727
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
728
- return '[' + getObjectTag(object) + ']';
729
- }
730
-
731
- var properties = keys.map(function (key) {
732
- var value = formatValue(object[key], seenValues);
733
- return key + ': ' + value;
734
- });
735
- return '{ ' + properties.join(', ') + ' }';
736
- }
737
-
738
- function formatArray(array, seenValues) {
739
- if (array.length === 0) {
740
- return '[]';
741
- }
742
-
743
- if (seenValues.length > MAX_RECURSIVE_DEPTH) {
744
- return '[Array]';
745
- }
746
-
747
- var len = Math.min(MAX_ARRAY_LENGTH, array.length);
748
- var remaining = array.length - len;
749
- var items = [];
750
-
751
- for (var i = 0; i < len; ++i) {
752
- items.push(formatValue(array[i], seenValues));
753
- }
754
-
755
- if (remaining === 1) {
756
- items.push('... 1 more item');
757
- } else if (remaining > 1) {
758
- items.push("... ".concat(remaining, " more items"));
759
- }
760
-
761
- return '[' + items.join(', ') + ']';
762
- }
763
-
764
- function getCustomFn(object) {
765
- var customInspectFn = object[String(nodejsCustomInspectSymbol$1)];
766
-
767
- if (typeof customInspectFn === 'function') {
768
- return customInspectFn;
769
- }
770
-
771
- if (typeof object.inspect === 'function') {
772
- return object.inspect;
773
- }
774
- }
775
-
776
- function getObjectTag(object) {
777
- var tag = Object.prototype.toString.call(object).replace(/^\[object /, '').replace(/]$/, '');
778
-
779
- if (tag === 'Object' && typeof object.constructor === 'function') {
780
- var name = object.constructor.name;
781
-
782
- if (typeof name === 'string' && name !== '') {
783
- return name;
784
- }
785
- }
786
-
787
- return tag;
788
- }
789
-
790
- function devAssert(condition, message) {
791
- var booleanCondition = Boolean(condition); // istanbul ignore else (See transformation done in './resources/inlineInvariant.js')
792
-
793
- if (!booleanCondition) {
794
- throw new Error(message);
795
- }
796
- }
797
-
798
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
799
- /**
800
- * A replacement for instanceof which includes an error warning when multi-realm
801
- * constructors are detected.
802
- */
803
-
804
- // See: https://expressjs.com/en/advanced/best-practice-performance.html#set-node_env-to-production
805
- // See: https://webpack.js.org/guides/production/
806
- var instanceOf = process.env.NODE_ENV === 'production' ? // istanbul ignore next (See: 'https://github.com/graphql/graphql-js/issues/2317')
807
- // eslint-disable-next-line no-shadow
808
- function instanceOf(value, constructor) {
809
- return value instanceof constructor;
810
- } : // eslint-disable-next-line no-shadow
811
- function instanceOf(value, constructor) {
812
- if (value instanceof constructor) {
813
- return true;
814
- }
815
-
816
- if (_typeof(value) === 'object' && value !== null) {
817
- var _value$constructor;
818
-
819
- var className = constructor.prototype[Symbol.toStringTag];
820
- var valueClassName = // We still need to support constructor's name to detect conflicts with older versions of this library.
821
- Symbol.toStringTag in value ? value[Symbol.toStringTag] : (_value$constructor = value.constructor) === null || _value$constructor === void 0 ? void 0 : _value$constructor.name;
822
-
823
- if (className === valueClassName) {
824
- var stringifiedValue = inspect(value);
825
- throw new Error("Cannot use ".concat(className, " \"").concat(stringifiedValue, "\" from another module or realm.\n\nEnsure that there is only one instance of \"graphql\" in the node_modules\ndirectory. If different versions of \"graphql\" are the dependencies of other\nrelied on modules, use \"resolutions\" to ensure only one version is installed.\n\nhttps://yarnpkg.com/en/docs/selective-version-resolutions\n\nDuplicate \"graphql\" modules cannot be used at the same time since different\nversions may have different capabilities and behavior. The data from one\nversion used in the function from another could produce confusing and\nspurious results."));
826
- }
827
- }
828
-
829
- return false;
830
- };
831
-
832
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
833
-
834
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
835
-
836
- /**
837
- * A representation of source input to GraphQL. The `name` and `locationOffset` parameters are
838
- * optional, but they are useful for clients who store GraphQL documents in source files.
839
- * For example, if the GraphQL input starts at line 40 in a file named `Foo.graphql`, it might
840
- * be useful for `name` to be `"Foo.graphql"` and location to be `{ line: 40, column: 1 }`.
841
- * The `line` and `column` properties in `locationOffset` are 1-indexed.
842
- */
843
- var Source = /*#__PURE__*/function () {
844
- function Source(body) {
845
- var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GraphQL request';
846
- var locationOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
847
- line: 1,
848
- column: 1
849
- };
850
- typeof body === 'string' || devAssert(0, "Body must be a string. Received: ".concat(inspect(body), "."));
851
- this.body = body;
852
- this.name = name;
853
- this.locationOffset = locationOffset;
854
- this.locationOffset.line > 0 || devAssert(0, 'line in locationOffset is 1-indexed and must be positive.');
855
- this.locationOffset.column > 0 || devAssert(0, 'column in locationOffset is 1-indexed and must be positive.');
856
- } // $FlowFixMe[unsupported-syntax] Flow doesn't support computed properties yet
857
-
858
-
859
- _createClass(Source, [{
860
- key: SYMBOL_TO_STRING_TAG,
861
- get: function get() {
862
- return 'Source';
863
- }
864
- }]);
865
-
866
- return Source;
867
- }();
868
- /**
869
- * Test if the given value is a Source object.
870
- *
871
- * @internal
872
- */
873
-
874
- // eslint-disable-next-line no-redeclare
875
- function isSource(source) {
876
- return instanceOf(source, Source);
877
- }
878
-
879
- /**
880
- * The set of allowed directive location values.
881
- */
882
- var DirectiveLocation = Object.freeze({
883
- // Request Definitions
884
- QUERY: 'QUERY',
885
- MUTATION: 'MUTATION',
886
- SUBSCRIPTION: 'SUBSCRIPTION',
887
- FIELD: 'FIELD',
888
- FRAGMENT_DEFINITION: 'FRAGMENT_DEFINITION',
889
- FRAGMENT_SPREAD: 'FRAGMENT_SPREAD',
890
- INLINE_FRAGMENT: 'INLINE_FRAGMENT',
891
- VARIABLE_DEFINITION: 'VARIABLE_DEFINITION',
892
- // Type System Definitions
893
- SCHEMA: 'SCHEMA',
894
- SCALAR: 'SCALAR',
895
- OBJECT: 'OBJECT',
896
- FIELD_DEFINITION: 'FIELD_DEFINITION',
897
- ARGUMENT_DEFINITION: 'ARGUMENT_DEFINITION',
898
- INTERFACE: 'INTERFACE',
899
- UNION: 'UNION',
900
- ENUM: 'ENUM',
901
- ENUM_VALUE: 'ENUM_VALUE',
902
- INPUT_OBJECT: 'INPUT_OBJECT',
903
- INPUT_FIELD_DEFINITION: 'INPUT_FIELD_DEFINITION'
904
- });
905
- /**
906
- * The enum type representing the directive location values.
907
- */
908
-
909
- /**
910
- * Produces the value of a block string from its parsed raw value, similar to
911
- * CoffeeScript's block string, Python's docstring trim or Ruby's strip_heredoc.
912
- *
913
- * This implements the GraphQL spec's BlockStringValue() static algorithm.
914
- *
915
- * @internal
916
- */
917
- function dedentBlockStringValue(rawString) {
918
- // Expand a block string's raw value into independent lines.
919
- var lines = rawString.split(/\r\n|[\n\r]/g); // Remove common indentation from all lines but first.
920
-
921
- var commonIndent = getBlockStringIndentation(rawString);
922
-
923
- if (commonIndent !== 0) {
924
- for (var i = 1; i < lines.length; i++) {
925
- lines[i] = lines[i].slice(commonIndent);
926
- }
927
- } // Remove leading and trailing blank lines.
928
-
929
-
930
- var startLine = 0;
931
-
932
- while (startLine < lines.length && isBlank(lines[startLine])) {
933
- ++startLine;
934
- }
935
-
936
- var endLine = lines.length;
937
-
938
- while (endLine > startLine && isBlank(lines[endLine - 1])) {
939
- --endLine;
940
- } // Return a string of the lines joined with U+000A.
941
-
942
-
943
- return lines.slice(startLine, endLine).join('\n');
944
- }
945
-
946
- function isBlank(str) {
947
- for (var i = 0; i < str.length; ++i) {
948
- if (str[i] !== ' ' && str[i] !== '\t') {
949
- return false;
950
- }
951
- }
952
-
953
- return true;
954
- }
955
- /**
956
- * @internal
957
- */
958
-
959
-
960
- function getBlockStringIndentation(value) {
961
- var _commonIndent;
962
-
963
- var isFirstLine = true;
964
- var isEmptyLine = true;
965
- var indent = 0;
966
- var commonIndent = null;
967
-
968
- for (var i = 0; i < value.length; ++i) {
969
- switch (value.charCodeAt(i)) {
970
- case 13:
971
- // \r
972
- if (value.charCodeAt(i + 1) === 10) {
973
- ++i; // skip \r\n as one symbol
974
- }
975
-
976
- // falls through
977
-
978
- case 10:
979
- // \n
980
- isFirstLine = false;
981
- isEmptyLine = true;
982
- indent = 0;
983
- break;
984
-
985
- case 9: // \t
986
-
987
- case 32:
988
- // <space>
989
- ++indent;
990
- break;
991
-
992
- default:
993
- if (isEmptyLine && !isFirstLine && (commonIndent === null || indent < commonIndent)) {
994
- commonIndent = indent;
995
- }
996
-
997
- isEmptyLine = false;
998
- }
999
- }
1000
-
1001
- return (_commonIndent = commonIndent) !== null && _commonIndent !== void 0 ? _commonIndent : 0;
1002
- }
1003
-
1004
- /**
1005
- * Given a Source object, creates a Lexer for that source.
1006
- * A Lexer is a stateful stream generator in that every time
1007
- * it is advanced, it returns the next token in the Source. Assuming the
1008
- * source lexes, the final Token emitted by the lexer will be of kind
1009
- * EOF, after which the lexer will repeatedly return the same EOF token
1010
- * whenever called.
1011
- */
1012
-
1013
- var Lexer = /*#__PURE__*/function () {
1014
- /**
1015
- * The previously focused non-ignored token.
1016
- */
1017
-
1018
- /**
1019
- * The currently focused non-ignored token.
1020
- */
1021
-
1022
- /**
1023
- * The (1-indexed) line containing the current token.
1024
- */
1025
-
1026
- /**
1027
- * The character offset at which the current line begins.
1028
- */
1029
- function Lexer(source) {
1030
- var startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0, null);
1031
- this.source = source;
1032
- this.lastToken = startOfFileToken;
1033
- this.token = startOfFileToken;
1034
- this.line = 1;
1035
- this.lineStart = 0;
1036
- }
1037
- /**
1038
- * Advances the token stream to the next non-ignored token.
1039
- */
1040
-
1041
-
1042
- var _proto = Lexer.prototype;
1043
-
1044
- _proto.advance = function advance() {
1045
- this.lastToken = this.token;
1046
- var token = this.token = this.lookahead();
1047
- return token;
1048
- }
1049
- /**
1050
- * Looks ahead and returns the next non-ignored token, but does not change
1051
- * the state of Lexer.
1052
- */
1053
- ;
1054
-
1055
- _proto.lookahead = function lookahead() {
1056
- var token = this.token;
1057
-
1058
- if (token.kind !== TokenKind.EOF) {
1059
- do {
1060
- var _token$next;
1061
-
1062
- // Note: next is only mutable during parsing, so we cast to allow this.
1063
- token = (_token$next = token.next) !== null && _token$next !== void 0 ? _token$next : token.next = readToken(this, token);
1064
- } while (token.kind === TokenKind.COMMENT);
1065
- }
1066
-
1067
- return token;
1068
- };
1069
-
1070
- return Lexer;
1071
- }();
1072
- /**
1073
- * @internal
1074
- */
1075
-
1076
- function isPunctuatorTokenKind(kind) {
1077
- return kind === TokenKind.BANG || kind === TokenKind.DOLLAR || kind === TokenKind.AMP || kind === TokenKind.PAREN_L || kind === TokenKind.PAREN_R || kind === TokenKind.SPREAD || kind === TokenKind.COLON || kind === TokenKind.EQUALS || kind === TokenKind.AT || kind === TokenKind.BRACKET_L || kind === TokenKind.BRACKET_R || kind === TokenKind.BRACE_L || kind === TokenKind.PIPE || kind === TokenKind.BRACE_R;
1078
- }
1079
-
1080
- function printCharCode(code) {
1081
- return (// NaN/undefined represents access beyond the end of the file.
1082
- isNaN(code) ? TokenKind.EOF : // Trust JSON for ASCII.
1083
- code < 0x007f ? JSON.stringify(String.fromCharCode(code)) : // Otherwise print the escaped form.
1084
- "\"\\u".concat(('00' + code.toString(16).toUpperCase()).slice(-4), "\"")
1085
- );
1086
- }
1087
- /**
1088
- * Gets the next token from the source starting at the given position.
1089
- *
1090
- * This skips over whitespace until it finds the next lexable token, then lexes
1091
- * punctuators immediately or calls the appropriate helper function for more
1092
- * complicated tokens.
1093
- */
1094
-
1095
-
1096
- function readToken(lexer, prev) {
1097
- var source = lexer.source;
1098
- var body = source.body;
1099
- var bodyLength = body.length;
1100
- var pos = prev.end;
1101
-
1102
- while (pos < bodyLength) {
1103
- var code = body.charCodeAt(pos);
1104
- var _line = lexer.line;
1105
-
1106
- var _col = 1 + pos - lexer.lineStart; // SourceCharacter
1107
-
1108
-
1109
- switch (code) {
1110
- case 0xfeff: // <BOM>
1111
-
1112
- case 9: // \t
1113
-
1114
- case 32: // <space>
1115
-
1116
- case 44:
1117
- // ,
1118
- ++pos;
1119
- continue;
1120
-
1121
- case 10:
1122
- // \n
1123
- ++pos;
1124
- ++lexer.line;
1125
- lexer.lineStart = pos;
1126
- continue;
1127
-
1128
- case 13:
1129
- // \r
1130
- if (body.charCodeAt(pos + 1) === 10) {
1131
- pos += 2;
1132
- } else {
1133
- ++pos;
1134
- }
1135
-
1136
- ++lexer.line;
1137
- lexer.lineStart = pos;
1138
- continue;
1139
-
1140
- case 33:
1141
- // !
1142
- return new Token(TokenKind.BANG, pos, pos + 1, _line, _col, prev);
1143
-
1144
- case 35:
1145
- // #
1146
- return readComment(source, pos, _line, _col, prev);
1147
-
1148
- case 36:
1149
- // $
1150
- return new Token(TokenKind.DOLLAR, pos, pos + 1, _line, _col, prev);
1151
-
1152
- case 38:
1153
- // &
1154
- return new Token(TokenKind.AMP, pos, pos + 1, _line, _col, prev);
1155
-
1156
- case 40:
1157
- // (
1158
- return new Token(TokenKind.PAREN_L, pos, pos + 1, _line, _col, prev);
1159
-
1160
- case 41:
1161
- // )
1162
- return new Token(TokenKind.PAREN_R, pos, pos + 1, _line, _col, prev);
1163
-
1164
- case 46:
1165
- // .
1166
- if (body.charCodeAt(pos + 1) === 46 && body.charCodeAt(pos + 2) === 46) {
1167
- return new Token(TokenKind.SPREAD, pos, pos + 3, _line, _col, prev);
1168
- }
1169
-
1170
- break;
1171
-
1172
- case 58:
1173
- // :
1174
- return new Token(TokenKind.COLON, pos, pos + 1, _line, _col, prev);
1175
-
1176
- case 61:
1177
- // =
1178
- return new Token(TokenKind.EQUALS, pos, pos + 1, _line, _col, prev);
1179
-
1180
- case 64:
1181
- // @
1182
- return new Token(TokenKind.AT, pos, pos + 1, _line, _col, prev);
1183
-
1184
- case 91:
1185
- // [
1186
- return new Token(TokenKind.BRACKET_L, pos, pos + 1, _line, _col, prev);
1187
-
1188
- case 93:
1189
- // ]
1190
- return new Token(TokenKind.BRACKET_R, pos, pos + 1, _line, _col, prev);
1191
-
1192
- case 123:
1193
- // {
1194
- return new Token(TokenKind.BRACE_L, pos, pos + 1, _line, _col, prev);
1195
-
1196
- case 124:
1197
- // |
1198
- return new Token(TokenKind.PIPE, pos, pos + 1, _line, _col, prev);
1199
-
1200
- case 125:
1201
- // }
1202
- return new Token(TokenKind.BRACE_R, pos, pos + 1, _line, _col, prev);
1203
-
1204
- case 34:
1205
- // "
1206
- if (body.charCodeAt(pos + 1) === 34 && body.charCodeAt(pos + 2) === 34) {
1207
- return readBlockString(source, pos, _line, _col, prev, lexer);
1208
- }
1209
-
1210
- return readString(source, pos, _line, _col, prev);
1211
-
1212
- case 45: // -
1213
-
1214
- case 48: // 0
1215
-
1216
- case 49: // 1
1217
-
1218
- case 50: // 2
1219
-
1220
- case 51: // 3
1221
-
1222
- case 52: // 4
1223
-
1224
- case 53: // 5
1225
-
1226
- case 54: // 6
1227
-
1228
- case 55: // 7
1229
-
1230
- case 56: // 8
1231
-
1232
- case 57:
1233
- // 9
1234
- return readNumber(source, pos, code, _line, _col, prev);
1235
-
1236
- case 65: // A
1237
-
1238
- case 66: // B
1239
-
1240
- case 67: // C
1241
-
1242
- case 68: // D
1243
-
1244
- case 69: // E
1245
-
1246
- case 70: // F
1247
-
1248
- case 71: // G
1249
-
1250
- case 72: // H
1251
-
1252
- case 73: // I
1253
-
1254
- case 74: // J
1255
-
1256
- case 75: // K
1257
-
1258
- case 76: // L
1259
-
1260
- case 77: // M
1261
-
1262
- case 78: // N
1263
-
1264
- case 79: // O
1265
-
1266
- case 80: // P
1267
-
1268
- case 81: // Q
1269
-
1270
- case 82: // R
1271
-
1272
- case 83: // S
1273
-
1274
- case 84: // T
1275
-
1276
- case 85: // U
1277
-
1278
- case 86: // V
1279
-
1280
- case 87: // W
1281
-
1282
- case 88: // X
1283
-
1284
- case 89: // Y
1285
-
1286
- case 90: // Z
1287
-
1288
- case 95: // _
1289
-
1290
- case 97: // a
1291
-
1292
- case 98: // b
1293
-
1294
- case 99: // c
1295
-
1296
- case 100: // d
1297
-
1298
- case 101: // e
1299
-
1300
- case 102: // f
1301
-
1302
- case 103: // g
1303
-
1304
- case 104: // h
1305
-
1306
- case 105: // i
1307
-
1308
- case 106: // j
1309
-
1310
- case 107: // k
1311
-
1312
- case 108: // l
1313
-
1314
- case 109: // m
1315
-
1316
- case 110: // n
1317
-
1318
- case 111: // o
1319
-
1320
- case 112: // p
1321
-
1322
- case 113: // q
1323
-
1324
- case 114: // r
1325
-
1326
- case 115: // s
1327
-
1328
- case 116: // t
1329
-
1330
- case 117: // u
1331
-
1332
- case 118: // v
1333
-
1334
- case 119: // w
1335
-
1336
- case 120: // x
1337
-
1338
- case 121: // y
1339
-
1340
- case 122:
1341
- // z
1342
- return readName(source, pos, _line, _col, prev);
1343
- }
1344
-
1345
- throw syntaxError(source, pos, unexpectedCharacterMessage(code));
1346
- }
1347
-
1348
- var line = lexer.line;
1349
- var col = 1 + pos - lexer.lineStart;
1350
- return new Token(TokenKind.EOF, bodyLength, bodyLength, line, col, prev);
1351
- }
1352
- /**
1353
- * Report a message that an unexpected character was encountered.
1354
- */
1355
-
1356
-
1357
- function unexpectedCharacterMessage(code) {
1358
- if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
1359
- return "Cannot contain the invalid character ".concat(printCharCode(code), ".");
1360
- }
1361
-
1362
- if (code === 39) {
1363
- // '
1364
- return 'Unexpected single quote character (\'), did you mean to use a double quote (")?';
1365
- }
1366
-
1367
- return "Cannot parse the unexpected character ".concat(printCharCode(code), ".");
1368
- }
1369
- /**
1370
- * Reads a comment token from the source file.
1371
- *
1372
- * #[\u0009\u0020-\uFFFF]*
1373
- */
1374
-
1375
-
1376
- function readComment(source, start, line, col, prev) {
1377
- var body = source.body;
1378
- var code;
1379
- var position = start;
1380
-
1381
- do {
1382
- code = body.charCodeAt(++position);
1383
- } while (!isNaN(code) && ( // SourceCharacter but not LineTerminator
1384
- code > 0x001f || code === 0x0009));
1385
-
1386
- return new Token(TokenKind.COMMENT, start, position, line, col, prev, body.slice(start + 1, position));
1387
- }
1388
- /**
1389
- * Reads a number token from the source file, either a float
1390
- * or an int depending on whether a decimal point appears.
1391
- *
1392
- * Int: -?(0|[1-9][0-9]*)
1393
- * Float: -?(0|[1-9][0-9]*)(\.[0-9]+)?((E|e)(+|-)?[0-9]+)?
1394
- */
1395
-
1396
-
1397
- function readNumber(source, start, firstCode, line, col, prev) {
1398
- var body = source.body;
1399
- var code = firstCode;
1400
- var position = start;
1401
- var isFloat = false;
1402
-
1403
- if (code === 45) {
1404
- // -
1405
- code = body.charCodeAt(++position);
1406
- }
1407
-
1408
- if (code === 48) {
1409
- // 0
1410
- code = body.charCodeAt(++position);
1411
-
1412
- if (code >= 48 && code <= 57) {
1413
- throw syntaxError(source, position, "Invalid number, unexpected digit after 0: ".concat(printCharCode(code), "."));
1414
- }
1415
- } else {
1416
- position = readDigits(source, position, code);
1417
- code = body.charCodeAt(position);
1418
- }
1419
-
1420
- if (code === 46) {
1421
- // .
1422
- isFloat = true;
1423
- code = body.charCodeAt(++position);
1424
- position = readDigits(source, position, code);
1425
- code = body.charCodeAt(position);
1426
- }
1427
-
1428
- if (code === 69 || code === 101) {
1429
- // E e
1430
- isFloat = true;
1431
- code = body.charCodeAt(++position);
1432
-
1433
- if (code === 43 || code === 45) {
1434
- // + -
1435
- code = body.charCodeAt(++position);
1436
- }
1437
-
1438
- position = readDigits(source, position, code);
1439
- code = body.charCodeAt(position);
1440
- } // Numbers cannot be followed by . or NameStart
1441
-
1442
-
1443
- if (code === 46 || isNameStart(code)) {
1444
- throw syntaxError(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), "."));
1445
- }
1446
-
1447
- return new Token(isFloat ? TokenKind.FLOAT : TokenKind.INT, start, position, line, col, prev, body.slice(start, position));
1448
- }
1449
- /**
1450
- * Returns the new position in the source after reading digits.
1451
- */
1452
-
1453
-
1454
- function readDigits(source, start, firstCode) {
1455
- var body = source.body;
1456
- var position = start;
1457
- var code = firstCode;
1458
-
1459
- if (code >= 48 && code <= 57) {
1460
- // 0 - 9
1461
- do {
1462
- code = body.charCodeAt(++position);
1463
- } while (code >= 48 && code <= 57); // 0 - 9
1464
-
1465
-
1466
- return position;
1467
- }
1468
-
1469
- throw syntaxError(source, position, "Invalid number, expected digit but got: ".concat(printCharCode(code), "."));
1470
- }
1471
- /**
1472
- * Reads a string token from the source file.
1473
- *
1474
- * "([^"\\\u000A\u000D]|(\\(u[0-9a-fA-F]{4}|["\\/bfnrt])))*"
1475
- */
1476
-
1477
-
1478
- function readString(source, start, line, col, prev) {
1479
- var body = source.body;
1480
- var position = start + 1;
1481
- var chunkStart = position;
1482
- var code = 0;
1483
- var value = '';
1484
-
1485
- while (position < body.length && !isNaN(code = body.charCodeAt(position)) && // not LineTerminator
1486
- code !== 0x000a && code !== 0x000d) {
1487
- // Closing Quote (")
1488
- if (code === 34) {
1489
- value += body.slice(chunkStart, position);
1490
- return new Token(TokenKind.STRING, start, position + 1, line, col, prev, value);
1491
- } // SourceCharacter
1492
-
1493
-
1494
- if (code < 0x0020 && code !== 0x0009) {
1495
- throw syntaxError(source, position, "Invalid character within String: ".concat(printCharCode(code), "."));
1496
- }
1497
-
1498
- ++position;
1499
-
1500
- if (code === 92) {
1501
- // \
1502
- value += body.slice(chunkStart, position - 1);
1503
- code = body.charCodeAt(position);
1504
-
1505
- switch (code) {
1506
- case 34:
1507
- value += '"';
1508
- break;
1509
-
1510
- case 47:
1511
- value += '/';
1512
- break;
1513
-
1514
- case 92:
1515
- value += '\\';
1516
- break;
1517
-
1518
- case 98:
1519
- value += '\b';
1520
- break;
1521
-
1522
- case 102:
1523
- value += '\f';
1524
- break;
1525
-
1526
- case 110:
1527
- value += '\n';
1528
- break;
1529
-
1530
- case 114:
1531
- value += '\r';
1532
- break;
1533
-
1534
- case 116:
1535
- value += '\t';
1536
- break;
1537
-
1538
- case 117:
1539
- {
1540
- // uXXXX
1541
- var charCode = uniCharCode(body.charCodeAt(position + 1), body.charCodeAt(position + 2), body.charCodeAt(position + 3), body.charCodeAt(position + 4));
1542
-
1543
- if (charCode < 0) {
1544
- var invalidSequence = body.slice(position + 1, position + 5);
1545
- throw syntaxError(source, position, "Invalid character escape sequence: \\u".concat(invalidSequence, "."));
1546
- }
1547
-
1548
- value += String.fromCharCode(charCode);
1549
- position += 4;
1550
- break;
1551
- }
1552
-
1553
- default:
1554
- throw syntaxError(source, position, "Invalid character escape sequence: \\".concat(String.fromCharCode(code), "."));
1555
- }
1556
-
1557
- ++position;
1558
- chunkStart = position;
1559
- }
1560
- }
1561
-
1562
- throw syntaxError(source, position, 'Unterminated string.');
1563
- }
1564
- /**
1565
- * Reads a block string token from the source file.
1566
- *
1567
- * """("?"?(\\"""|\\(?!=""")|[^"\\]))*"""
1568
- */
1569
-
1570
-
1571
- function readBlockString(source, start, line, col, prev, lexer) {
1572
- var body = source.body;
1573
- var position = start + 3;
1574
- var chunkStart = position;
1575
- var code = 0;
1576
- var rawValue = '';
1577
-
1578
- while (position < body.length && !isNaN(code = body.charCodeAt(position))) {
1579
- // Closing Triple-Quote (""")
1580
- if (code === 34 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34) {
1581
- rawValue += body.slice(chunkStart, position);
1582
- return new Token(TokenKind.BLOCK_STRING, start, position + 3, line, col, prev, dedentBlockStringValue(rawValue));
1583
- } // SourceCharacter
1584
-
1585
-
1586
- if (code < 0x0020 && code !== 0x0009 && code !== 0x000a && code !== 0x000d) {
1587
- throw syntaxError(source, position, "Invalid character within String: ".concat(printCharCode(code), "."));
1588
- }
1589
-
1590
- if (code === 10) {
1591
- // new line
1592
- ++position;
1593
- ++lexer.line;
1594
- lexer.lineStart = position;
1595
- } else if (code === 13) {
1596
- // carriage return
1597
- if (body.charCodeAt(position + 1) === 10) {
1598
- position += 2;
1599
- } else {
1600
- ++position;
1601
- }
1602
-
1603
- ++lexer.line;
1604
- lexer.lineStart = position;
1605
- } else if ( // Escape Triple-Quote (\""")
1606
- code === 92 && body.charCodeAt(position + 1) === 34 && body.charCodeAt(position + 2) === 34 && body.charCodeAt(position + 3) === 34) {
1607
- rawValue += body.slice(chunkStart, position) + '"""';
1608
- position += 4;
1609
- chunkStart = position;
1610
- } else {
1611
- ++position;
1612
- }
1613
- }
1614
-
1615
- throw syntaxError(source, position, 'Unterminated string.');
1616
- }
1617
- /**
1618
- * Converts four hexadecimal chars to the integer that the
1619
- * string represents. For example, uniCharCode('0','0','0','f')
1620
- * will return 15, and uniCharCode('0','0','f','f') returns 255.
1621
- *
1622
- * Returns a negative number on error, if a char was invalid.
1623
- *
1624
- * This is implemented by noting that char2hex() returns -1 on error,
1625
- * which means the result of ORing the char2hex() will also be negative.
1626
- */
1627
-
1628
-
1629
- function uniCharCode(a, b, c, d) {
1630
- return char2hex(a) << 12 | char2hex(b) << 8 | char2hex(c) << 4 | char2hex(d);
1631
- }
1632
- /**
1633
- * Converts a hex character to its integer value.
1634
- * '0' becomes 0, '9' becomes 9
1635
- * 'A' becomes 10, 'F' becomes 15
1636
- * 'a' becomes 10, 'f' becomes 15
1637
- *
1638
- * Returns -1 on error.
1639
- */
1640
-
1641
-
1642
- function char2hex(a) {
1643
- return a >= 48 && a <= 57 ? a - 48 // 0-9
1644
- : a >= 65 && a <= 70 ? a - 55 // A-F
1645
- : a >= 97 && a <= 102 ? a - 87 // a-f
1646
- : -1;
1647
- }
1648
- /**
1649
- * Reads an alphanumeric + underscore name from the source.
1650
- *
1651
- * [_A-Za-z][_0-9A-Za-z]*
1652
- */
1653
-
1654
-
1655
- function readName(source, start, line, col, prev) {
1656
- var body = source.body;
1657
- var bodyLength = body.length;
1658
- var position = start + 1;
1659
- var code = 0;
1660
-
1661
- while (position !== bodyLength && !isNaN(code = body.charCodeAt(position)) && (code === 95 || // _
1662
- code >= 48 && code <= 57 || // 0-9
1663
- code >= 65 && code <= 90 || // A-Z
1664
- code >= 97 && code <= 122) // a-z
1665
- ) {
1666
- ++position;
1667
- }
1668
-
1669
- return new Token(TokenKind.NAME, start, position, line, col, prev, body.slice(start, position));
1670
- } // _ A-Z a-z
1671
-
1672
-
1673
- function isNameStart(code) {
1674
- return code === 95 || code >= 65 && code <= 90 || code >= 97 && code <= 122;
1675
- }
1676
-
1677
- /**
1678
- * Configuration options to control parser behavior
1679
- */
1680
-
1681
- /**
1682
- * Given a GraphQL source, parses it into a Document.
1683
- * Throws GraphQLError if a syntax error is encountered.
1684
- */
1685
- function parse$1(source, options) {
1686
- var parser = new Parser(source, options);
1687
- return parser.parseDocument();
1688
- }
1689
- /**
1690
- * This class is exported only to assist people in implementing their own parsers
1691
- * without duplicating too much code and should be used only as last resort for cases
1692
- * such as experimental syntax or if certain features could not be contributed upstream.
1693
- *
1694
- * It is still part of the internal API and is versioned, so any changes to it are never
1695
- * considered breaking changes. If you still need to support multiple versions of the
1696
- * library, please use the `versionInfo` variable for version detection.
1697
- *
1698
- * @internal
1699
- */
1700
-
1701
- var Parser = /*#__PURE__*/function () {
1702
- function Parser(source, options) {
1703
- var sourceObj = isSource(source) ? source : new Source(source);
1704
- this._lexer = new Lexer(sourceObj);
1705
- this._options = options;
1706
- }
1707
- /**
1708
- * Converts a name lex token into a name parse node.
1709
- */
1710
-
1711
-
1712
- var _proto = Parser.prototype;
1713
-
1714
- _proto.parseName = function parseName() {
1715
- var token = this.expectToken(TokenKind.NAME);
1716
- return {
1717
- kind: Kind.NAME,
1718
- value: token.value,
1719
- loc: this.loc(token)
1720
- };
1721
- } // Implements the parsing rules in the Document section.
1722
-
1723
- /**
1724
- * Document : Definition+
1725
- */
1726
- ;
1727
-
1728
- _proto.parseDocument = function parseDocument() {
1729
- var start = this._lexer.token;
1730
- return {
1731
- kind: Kind.DOCUMENT,
1732
- definitions: this.many(TokenKind.SOF, this.parseDefinition, TokenKind.EOF),
1733
- loc: this.loc(start)
1734
- };
1735
- }
1736
- /**
1737
- * Definition :
1738
- * - ExecutableDefinition
1739
- * - TypeSystemDefinition
1740
- * - TypeSystemExtension
1741
- *
1742
- * ExecutableDefinition :
1743
- * - OperationDefinition
1744
- * - FragmentDefinition
1745
- */
1746
- ;
1747
-
1748
- _proto.parseDefinition = function parseDefinition() {
1749
- if (this.peek(TokenKind.NAME)) {
1750
- switch (this._lexer.token.value) {
1751
- case 'query':
1752
- case 'mutation':
1753
- case 'subscription':
1754
- return this.parseOperationDefinition();
1755
-
1756
- case 'fragment':
1757
- return this.parseFragmentDefinition();
1758
-
1759
- case 'schema':
1760
- case 'scalar':
1761
- case 'type':
1762
- case 'interface':
1763
- case 'union':
1764
- case 'enum':
1765
- case 'input':
1766
- case 'directive':
1767
- return this.parseTypeSystemDefinition();
1768
-
1769
- case 'extend':
1770
- return this.parseTypeSystemExtension();
1771
- }
1772
- } else if (this.peek(TokenKind.BRACE_L)) {
1773
- return this.parseOperationDefinition();
1774
- } else if (this.peekDescription()) {
1775
- return this.parseTypeSystemDefinition();
1776
- }
1777
-
1778
- throw this.unexpected();
1779
- } // Implements the parsing rules in the Operations section.
1780
-
1781
- /**
1782
- * OperationDefinition :
1783
- * - SelectionSet
1784
- * - OperationType Name? VariableDefinitions? Directives? SelectionSet
1785
- */
1786
- ;
1787
-
1788
- _proto.parseOperationDefinition = function parseOperationDefinition() {
1789
- var start = this._lexer.token;
1790
-
1791
- if (this.peek(TokenKind.BRACE_L)) {
1792
- return {
1793
- kind: Kind.OPERATION_DEFINITION,
1794
- operation: 'query',
1795
- name: undefined,
1796
- variableDefinitions: [],
1797
- directives: [],
1798
- selectionSet: this.parseSelectionSet(),
1799
- loc: this.loc(start)
1800
- };
1801
- }
1802
-
1803
- var operation = this.parseOperationType();
1804
- var name;
1805
-
1806
- if (this.peek(TokenKind.NAME)) {
1807
- name = this.parseName();
1808
- }
1809
-
1810
- return {
1811
- kind: Kind.OPERATION_DEFINITION,
1812
- operation: operation,
1813
- name: name,
1814
- variableDefinitions: this.parseVariableDefinitions(),
1815
- directives: this.parseDirectives(false),
1816
- selectionSet: this.parseSelectionSet(),
1817
- loc: this.loc(start)
1818
- };
1819
- }
1820
- /**
1821
- * OperationType : one of query mutation subscription
1822
- */
1823
- ;
1824
-
1825
- _proto.parseOperationType = function parseOperationType() {
1826
- var operationToken = this.expectToken(TokenKind.NAME);
1827
-
1828
- switch (operationToken.value) {
1829
- case 'query':
1830
- return 'query';
1831
-
1832
- case 'mutation':
1833
- return 'mutation';
1834
-
1835
- case 'subscription':
1836
- return 'subscription';
1837
- }
1838
-
1839
- throw this.unexpected(operationToken);
1840
- }
1841
- /**
1842
- * VariableDefinitions : ( VariableDefinition+ )
1843
- */
1844
- ;
1845
-
1846
- _proto.parseVariableDefinitions = function parseVariableDefinitions() {
1847
- return this.optionalMany(TokenKind.PAREN_L, this.parseVariableDefinition, TokenKind.PAREN_R);
1848
- }
1849
- /**
1850
- * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
1851
- */
1852
- ;
1853
-
1854
- _proto.parseVariableDefinition = function parseVariableDefinition() {
1855
- var start = this._lexer.token;
1856
- return {
1857
- kind: Kind.VARIABLE_DEFINITION,
1858
- variable: this.parseVariable(),
1859
- type: (this.expectToken(TokenKind.COLON), this.parseTypeReference()),
1860
- defaultValue: this.expectOptionalToken(TokenKind.EQUALS) ? this.parseValueLiteral(true) : undefined,
1861
- directives: this.parseDirectives(true),
1862
- loc: this.loc(start)
1863
- };
1864
- }
1865
- /**
1866
- * Variable : $ Name
1867
- */
1868
- ;
1869
-
1870
- _proto.parseVariable = function parseVariable() {
1871
- var start = this._lexer.token;
1872
- this.expectToken(TokenKind.DOLLAR);
1873
- return {
1874
- kind: Kind.VARIABLE,
1875
- name: this.parseName(),
1876
- loc: this.loc(start)
1877
- };
1878
- }
1879
- /**
1880
- * SelectionSet : { Selection+ }
1881
- */
1882
- ;
1883
-
1884
- _proto.parseSelectionSet = function parseSelectionSet() {
1885
- var start = this._lexer.token;
1886
- return {
1887
- kind: Kind.SELECTION_SET,
1888
- selections: this.many(TokenKind.BRACE_L, this.parseSelection, TokenKind.BRACE_R),
1889
- loc: this.loc(start)
1890
- };
1891
- }
1892
- /**
1893
- * Selection :
1894
- * - Field
1895
- * - FragmentSpread
1896
- * - InlineFragment
1897
- */
1898
- ;
1899
-
1900
- _proto.parseSelection = function parseSelection() {
1901
- return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();
1902
- }
1903
- /**
1904
- * Field : Alias? Name Arguments? Directives? SelectionSet?
1905
- *
1906
- * Alias : Name :
1907
- */
1908
- ;
1909
-
1910
- _proto.parseField = function parseField() {
1911
- var start = this._lexer.token;
1912
- var nameOrAlias = this.parseName();
1913
- var alias;
1914
- var name;
1915
-
1916
- if (this.expectOptionalToken(TokenKind.COLON)) {
1917
- alias = nameOrAlias;
1918
- name = this.parseName();
1919
- } else {
1920
- name = nameOrAlias;
1921
- }
1922
-
1923
- return {
1924
- kind: Kind.FIELD,
1925
- alias: alias,
1926
- name: name,
1927
- arguments: this.parseArguments(false),
1928
- directives: this.parseDirectives(false),
1929
- selectionSet: this.peek(TokenKind.BRACE_L) ? this.parseSelectionSet() : undefined,
1930
- loc: this.loc(start)
1931
- };
1932
- }
1933
- /**
1934
- * Arguments[Const] : ( Argument[?Const]+ )
1935
- */
1936
- ;
1937
-
1938
- _proto.parseArguments = function parseArguments(isConst) {
1939
- var item = isConst ? this.parseConstArgument : this.parseArgument;
1940
- return this.optionalMany(TokenKind.PAREN_L, item, TokenKind.PAREN_R);
1941
- }
1942
- /**
1943
- * Argument[Const] : Name : Value[?Const]
1944
- */
1945
- ;
1946
-
1947
- _proto.parseArgument = function parseArgument() {
1948
- var start = this._lexer.token;
1949
- var name = this.parseName();
1950
- this.expectToken(TokenKind.COLON);
1951
- return {
1952
- kind: Kind.ARGUMENT,
1953
- name: name,
1954
- value: this.parseValueLiteral(false),
1955
- loc: this.loc(start)
1956
- };
1957
- };
1958
-
1959
- _proto.parseConstArgument = function parseConstArgument() {
1960
- var start = this._lexer.token;
1961
- return {
1962
- kind: Kind.ARGUMENT,
1963
- name: this.parseName(),
1964
- value: (this.expectToken(TokenKind.COLON), this.parseValueLiteral(true)),
1965
- loc: this.loc(start)
1966
- };
1967
- } // Implements the parsing rules in the Fragments section.
1968
-
1969
- /**
1970
- * Corresponds to both FragmentSpread and InlineFragment in the spec.
1971
- *
1972
- * FragmentSpread : ... FragmentName Directives?
1973
- *
1974
- * InlineFragment : ... TypeCondition? Directives? SelectionSet
1975
- */
1976
- ;
1977
-
1978
- _proto.parseFragment = function parseFragment() {
1979
- var start = this._lexer.token;
1980
- this.expectToken(TokenKind.SPREAD);
1981
- var hasTypeCondition = this.expectOptionalKeyword('on');
1982
-
1983
- if (!hasTypeCondition && this.peek(TokenKind.NAME)) {
1984
- return {
1985
- kind: Kind.FRAGMENT_SPREAD,
1986
- name: this.parseFragmentName(),
1987
- directives: this.parseDirectives(false),
1988
- loc: this.loc(start)
1989
- };
1990
- }
1991
-
1992
- return {
1993
- kind: Kind.INLINE_FRAGMENT,
1994
- typeCondition: hasTypeCondition ? this.parseNamedType() : undefined,
1995
- directives: this.parseDirectives(false),
1996
- selectionSet: this.parseSelectionSet(),
1997
- loc: this.loc(start)
1998
- };
1999
- }
2000
- /**
2001
- * FragmentDefinition :
2002
- * - fragment FragmentName on TypeCondition Directives? SelectionSet
2003
- *
2004
- * TypeCondition : NamedType
2005
- */
2006
- ;
2007
-
2008
- _proto.parseFragmentDefinition = function parseFragmentDefinition() {
2009
- var _this$_options;
2010
-
2011
- var start = this._lexer.token;
2012
- this.expectKeyword('fragment'); // Experimental support for defining variables within fragments changes
2013
- // the grammar of FragmentDefinition:
2014
- // - fragment FragmentName VariableDefinitions? on TypeCondition Directives? SelectionSet
2015
-
2016
- if (((_this$_options = this._options) === null || _this$_options === void 0 ? void 0 : _this$_options.experimentalFragmentVariables) === true) {
2017
- return {
2018
- kind: Kind.FRAGMENT_DEFINITION,
2019
- name: this.parseFragmentName(),
2020
- variableDefinitions: this.parseVariableDefinitions(),
2021
- typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
2022
- directives: this.parseDirectives(false),
2023
- selectionSet: this.parseSelectionSet(),
2024
- loc: this.loc(start)
2025
- };
2026
- }
2027
-
2028
- return {
2029
- kind: Kind.FRAGMENT_DEFINITION,
2030
- name: this.parseFragmentName(),
2031
- typeCondition: (this.expectKeyword('on'), this.parseNamedType()),
2032
- directives: this.parseDirectives(false),
2033
- selectionSet: this.parseSelectionSet(),
2034
- loc: this.loc(start)
2035
- };
2036
- }
2037
- /**
2038
- * FragmentName : Name but not `on`
2039
- */
2040
- ;
2041
-
2042
- _proto.parseFragmentName = function parseFragmentName() {
2043
- if (this._lexer.token.value === 'on') {
2044
- throw this.unexpected();
2045
- }
2046
-
2047
- return this.parseName();
2048
- } // Implements the parsing rules in the Values section.
2049
-
2050
- /**
2051
- * Value[Const] :
2052
- * - [~Const] Variable
2053
- * - IntValue
2054
- * - FloatValue
2055
- * - StringValue
2056
- * - BooleanValue
2057
- * - NullValue
2058
- * - EnumValue
2059
- * - ListValue[?Const]
2060
- * - ObjectValue[?Const]
2061
- *
2062
- * BooleanValue : one of `true` `false`
2063
- *
2064
- * NullValue : `null`
2065
- *
2066
- * EnumValue : Name but not `true`, `false` or `null`
2067
- */
2068
- ;
2069
-
2070
- _proto.parseValueLiteral = function parseValueLiteral(isConst) {
2071
- var token = this._lexer.token;
2072
-
2073
- switch (token.kind) {
2074
- case TokenKind.BRACKET_L:
2075
- return this.parseList(isConst);
2076
-
2077
- case TokenKind.BRACE_L:
2078
- return this.parseObject(isConst);
2079
-
2080
- case TokenKind.INT:
2081
- this._lexer.advance();
2082
-
2083
- return {
2084
- kind: Kind.INT,
2085
- value: token.value,
2086
- loc: this.loc(token)
2087
- };
2088
-
2089
- case TokenKind.FLOAT:
2090
- this._lexer.advance();
2091
-
2092
- return {
2093
- kind: Kind.FLOAT,
2094
- value: token.value,
2095
- loc: this.loc(token)
2096
- };
2097
-
2098
- case TokenKind.STRING:
2099
- case TokenKind.BLOCK_STRING:
2100
- return this.parseStringLiteral();
2101
-
2102
- case TokenKind.NAME:
2103
- this._lexer.advance();
2104
-
2105
- switch (token.value) {
2106
- case 'true':
2107
- return {
2108
- kind: Kind.BOOLEAN,
2109
- value: true,
2110
- loc: this.loc(token)
2111
- };
2112
-
2113
- case 'false':
2114
- return {
2115
- kind: Kind.BOOLEAN,
2116
- value: false,
2117
- loc: this.loc(token)
2118
- };
2119
-
2120
- case 'null':
2121
- return {
2122
- kind: Kind.NULL,
2123
- loc: this.loc(token)
2124
- };
2125
-
2126
- default:
2127
- return {
2128
- kind: Kind.ENUM,
2129
- value: token.value,
2130
- loc: this.loc(token)
2131
- };
2132
- }
2133
-
2134
- case TokenKind.DOLLAR:
2135
- if (!isConst) {
2136
- return this.parseVariable();
2137
- }
2138
-
2139
- break;
2140
- }
2141
-
2142
- throw this.unexpected();
2143
- };
2144
-
2145
- _proto.parseStringLiteral = function parseStringLiteral() {
2146
- var token = this._lexer.token;
2147
-
2148
- this._lexer.advance();
2149
-
2150
- return {
2151
- kind: Kind.STRING,
2152
- value: token.value,
2153
- block: token.kind === TokenKind.BLOCK_STRING,
2154
- loc: this.loc(token)
2155
- };
2156
- }
2157
- /**
2158
- * ListValue[Const] :
2159
- * - [ ]
2160
- * - [ Value[?Const]+ ]
2161
- */
2162
- ;
2163
-
2164
- _proto.parseList = function parseList(isConst) {
2165
- var _this = this;
2166
-
2167
- var start = this._lexer.token;
2168
-
2169
- var item = function item() {
2170
- return _this.parseValueLiteral(isConst);
2171
- };
2172
-
2173
- return {
2174
- kind: Kind.LIST,
2175
- values: this.any(TokenKind.BRACKET_L, item, TokenKind.BRACKET_R),
2176
- loc: this.loc(start)
2177
- };
2178
- }
2179
- /**
2180
- * ObjectValue[Const] :
2181
- * - { }
2182
- * - { ObjectField[?Const]+ }
2183
- */
2184
- ;
2185
-
2186
- _proto.parseObject = function parseObject(isConst) {
2187
- var _this2 = this;
2188
-
2189
- var start = this._lexer.token;
2190
-
2191
- var item = function item() {
2192
- return _this2.parseObjectField(isConst);
2193
- };
2194
-
2195
- return {
2196
- kind: Kind.OBJECT,
2197
- fields: this.any(TokenKind.BRACE_L, item, TokenKind.BRACE_R),
2198
- loc: this.loc(start)
2199
- };
2200
- }
2201
- /**
2202
- * ObjectField[Const] : Name : Value[?Const]
2203
- */
2204
- ;
2205
-
2206
- _proto.parseObjectField = function parseObjectField(isConst) {
2207
- var start = this._lexer.token;
2208
- var name = this.parseName();
2209
- this.expectToken(TokenKind.COLON);
2210
- return {
2211
- kind: Kind.OBJECT_FIELD,
2212
- name: name,
2213
- value: this.parseValueLiteral(isConst),
2214
- loc: this.loc(start)
2215
- };
2216
- } // Implements the parsing rules in the Directives section.
2217
-
2218
- /**
2219
- * Directives[Const] : Directive[?Const]+
2220
- */
2221
- ;
2222
-
2223
- _proto.parseDirectives = function parseDirectives(isConst) {
2224
- var directives = [];
2225
-
2226
- while (this.peek(TokenKind.AT)) {
2227
- directives.push(this.parseDirective(isConst));
2228
- }
2229
-
2230
- return directives;
2231
- }
2232
- /**
2233
- * Directive[Const] : @ Name Arguments[?Const]?
2234
- */
2235
- ;
2236
-
2237
- _proto.parseDirective = function parseDirective(isConst) {
2238
- var start = this._lexer.token;
2239
- this.expectToken(TokenKind.AT);
2240
- return {
2241
- kind: Kind.DIRECTIVE,
2242
- name: this.parseName(),
2243
- arguments: this.parseArguments(isConst),
2244
- loc: this.loc(start)
2245
- };
2246
- } // Implements the parsing rules in the Types section.
2247
-
2248
- /**
2249
- * Type :
2250
- * - NamedType
2251
- * - ListType
2252
- * - NonNullType
2253
- */
2254
- ;
2255
-
2256
- _proto.parseTypeReference = function parseTypeReference() {
2257
- var start = this._lexer.token;
2258
- var type;
2259
-
2260
- if (this.expectOptionalToken(TokenKind.BRACKET_L)) {
2261
- type = this.parseTypeReference();
2262
- this.expectToken(TokenKind.BRACKET_R);
2263
- type = {
2264
- kind: Kind.LIST_TYPE,
2265
- type: type,
2266
- loc: this.loc(start)
2267
- };
2268
- } else {
2269
- type = this.parseNamedType();
2270
- }
2271
-
2272
- if (this.expectOptionalToken(TokenKind.BANG)) {
2273
- return {
2274
- kind: Kind.NON_NULL_TYPE,
2275
- type: type,
2276
- loc: this.loc(start)
2277
- };
2278
- }
2279
-
2280
- return type;
2281
- }
2282
- /**
2283
- * NamedType : Name
2284
- */
2285
- ;
2286
-
2287
- _proto.parseNamedType = function parseNamedType() {
2288
- var start = this._lexer.token;
2289
- return {
2290
- kind: Kind.NAMED_TYPE,
2291
- name: this.parseName(),
2292
- loc: this.loc(start)
2293
- };
2294
- } // Implements the parsing rules in the Type Definition section.
2295
-
2296
- /**
2297
- * TypeSystemDefinition :
2298
- * - SchemaDefinition
2299
- * - TypeDefinition
2300
- * - DirectiveDefinition
2301
- *
2302
- * TypeDefinition :
2303
- * - ScalarTypeDefinition
2304
- * - ObjectTypeDefinition
2305
- * - InterfaceTypeDefinition
2306
- * - UnionTypeDefinition
2307
- * - EnumTypeDefinition
2308
- * - InputObjectTypeDefinition
2309
- */
2310
- ;
2311
-
2312
- _proto.parseTypeSystemDefinition = function parseTypeSystemDefinition() {
2313
- // Many definitions begin with a description and require a lookahead.
2314
- var keywordToken = this.peekDescription() ? this._lexer.lookahead() : this._lexer.token;
2315
-
2316
- if (keywordToken.kind === TokenKind.NAME) {
2317
- switch (keywordToken.value) {
2318
- case 'schema':
2319
- return this.parseSchemaDefinition();
2320
-
2321
- case 'scalar':
2322
- return this.parseScalarTypeDefinition();
2323
-
2324
- case 'type':
2325
- return this.parseObjectTypeDefinition();
2326
-
2327
- case 'interface':
2328
- return this.parseInterfaceTypeDefinition();
2329
-
2330
- case 'union':
2331
- return this.parseUnionTypeDefinition();
2332
-
2333
- case 'enum':
2334
- return this.parseEnumTypeDefinition();
2335
-
2336
- case 'input':
2337
- return this.parseInputObjectTypeDefinition();
2338
-
2339
- case 'directive':
2340
- return this.parseDirectiveDefinition();
2341
- }
2342
- }
2343
-
2344
- throw this.unexpected(keywordToken);
2345
- };
2346
-
2347
- _proto.peekDescription = function peekDescription() {
2348
- return this.peek(TokenKind.STRING) || this.peek(TokenKind.BLOCK_STRING);
2349
- }
2350
- /**
2351
- * Description : StringValue
2352
- */
2353
- ;
2354
-
2355
- _proto.parseDescription = function parseDescription() {
2356
- if (this.peekDescription()) {
2357
- return this.parseStringLiteral();
2358
- }
2359
- }
2360
- /**
2361
- * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
2362
- */
2363
- ;
2364
-
2365
- _proto.parseSchemaDefinition = function parseSchemaDefinition() {
2366
- var start = this._lexer.token;
2367
- var description = this.parseDescription();
2368
- this.expectKeyword('schema');
2369
- var directives = this.parseDirectives(true);
2370
- var operationTypes = this.many(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);
2371
- return {
2372
- kind: Kind.SCHEMA_DEFINITION,
2373
- description: description,
2374
- directives: directives,
2375
- operationTypes: operationTypes,
2376
- loc: this.loc(start)
2377
- };
2378
- }
2379
- /**
2380
- * OperationTypeDefinition : OperationType : NamedType
2381
- */
2382
- ;
2383
-
2384
- _proto.parseOperationTypeDefinition = function parseOperationTypeDefinition() {
2385
- var start = this._lexer.token;
2386
- var operation = this.parseOperationType();
2387
- this.expectToken(TokenKind.COLON);
2388
- var type = this.parseNamedType();
2389
- return {
2390
- kind: Kind.OPERATION_TYPE_DEFINITION,
2391
- operation: operation,
2392
- type: type,
2393
- loc: this.loc(start)
2394
- };
2395
- }
2396
- /**
2397
- * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
2398
- */
2399
- ;
2400
-
2401
- _proto.parseScalarTypeDefinition = function parseScalarTypeDefinition() {
2402
- var start = this._lexer.token;
2403
- var description = this.parseDescription();
2404
- this.expectKeyword('scalar');
2405
- var name = this.parseName();
2406
- var directives = this.parseDirectives(true);
2407
- return {
2408
- kind: Kind.SCALAR_TYPE_DEFINITION,
2409
- description: description,
2410
- name: name,
2411
- directives: directives,
2412
- loc: this.loc(start)
2413
- };
2414
- }
2415
- /**
2416
- * ObjectTypeDefinition :
2417
- * Description?
2418
- * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
2419
- */
2420
- ;
2421
-
2422
- _proto.parseObjectTypeDefinition = function parseObjectTypeDefinition() {
2423
- var start = this._lexer.token;
2424
- var description = this.parseDescription();
2425
- this.expectKeyword('type');
2426
- var name = this.parseName();
2427
- var interfaces = this.parseImplementsInterfaces();
2428
- var directives = this.parseDirectives(true);
2429
- var fields = this.parseFieldsDefinition();
2430
- return {
2431
- kind: Kind.OBJECT_TYPE_DEFINITION,
2432
- description: description,
2433
- name: name,
2434
- interfaces: interfaces,
2435
- directives: directives,
2436
- fields: fields,
2437
- loc: this.loc(start)
2438
- };
2439
- }
2440
- /**
2441
- * ImplementsInterfaces :
2442
- * - implements `&`? NamedType
2443
- * - ImplementsInterfaces & NamedType
2444
- */
2445
- ;
2446
-
2447
- _proto.parseImplementsInterfaces = function parseImplementsInterfaces() {
2448
- var _this$_options2;
2449
-
2450
- if (!this.expectOptionalKeyword('implements')) {
2451
- return [];
2452
- }
2453
-
2454
- if (((_this$_options2 = this._options) === null || _this$_options2 === void 0 ? void 0 : _this$_options2.allowLegacySDLImplementsInterfaces) === true) {
2455
- var types = []; // Optional leading ampersand
2456
-
2457
- this.expectOptionalToken(TokenKind.AMP);
2458
-
2459
- do {
2460
- types.push(this.parseNamedType());
2461
- } while (this.expectOptionalToken(TokenKind.AMP) || this.peek(TokenKind.NAME));
2462
-
2463
- return types;
2464
- }
2465
-
2466
- return this.delimitedMany(TokenKind.AMP, this.parseNamedType);
2467
- }
2468
- /**
2469
- * FieldsDefinition : { FieldDefinition+ }
2470
- */
2471
- ;
2472
-
2473
- _proto.parseFieldsDefinition = function parseFieldsDefinition() {
2474
- var _this$_options3;
2475
-
2476
- // Legacy support for the SDL?
2477
- if (((_this$_options3 = this._options) === null || _this$_options3 === void 0 ? void 0 : _this$_options3.allowLegacySDLEmptyFields) === true && this.peek(TokenKind.BRACE_L) && this._lexer.lookahead().kind === TokenKind.BRACE_R) {
2478
- this._lexer.advance();
2479
-
2480
- this._lexer.advance();
2481
-
2482
- return [];
2483
- }
2484
-
2485
- return this.optionalMany(TokenKind.BRACE_L, this.parseFieldDefinition, TokenKind.BRACE_R);
2486
- }
2487
- /**
2488
- * FieldDefinition :
2489
- * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
2490
- */
2491
- ;
2492
-
2493
- _proto.parseFieldDefinition = function parseFieldDefinition() {
2494
- var start = this._lexer.token;
2495
- var description = this.parseDescription();
2496
- var name = this.parseName();
2497
- var args = this.parseArgumentDefs();
2498
- this.expectToken(TokenKind.COLON);
2499
- var type = this.parseTypeReference();
2500
- var directives = this.parseDirectives(true);
2501
- return {
2502
- kind: Kind.FIELD_DEFINITION,
2503
- description: description,
2504
- name: name,
2505
- arguments: args,
2506
- type: type,
2507
- directives: directives,
2508
- loc: this.loc(start)
2509
- };
2510
- }
2511
- /**
2512
- * ArgumentsDefinition : ( InputValueDefinition+ )
2513
- */
2514
- ;
2515
-
2516
- _proto.parseArgumentDefs = function parseArgumentDefs() {
2517
- return this.optionalMany(TokenKind.PAREN_L, this.parseInputValueDef, TokenKind.PAREN_R);
2518
- }
2519
- /**
2520
- * InputValueDefinition :
2521
- * - Description? Name : Type DefaultValue? Directives[Const]?
2522
- */
2523
- ;
2524
-
2525
- _proto.parseInputValueDef = function parseInputValueDef() {
2526
- var start = this._lexer.token;
2527
- var description = this.parseDescription();
2528
- var name = this.parseName();
2529
- this.expectToken(TokenKind.COLON);
2530
- var type = this.parseTypeReference();
2531
- var defaultValue;
2532
-
2533
- if (this.expectOptionalToken(TokenKind.EQUALS)) {
2534
- defaultValue = this.parseValueLiteral(true);
2535
- }
2536
-
2537
- var directives = this.parseDirectives(true);
2538
- return {
2539
- kind: Kind.INPUT_VALUE_DEFINITION,
2540
- description: description,
2541
- name: name,
2542
- type: type,
2543
- defaultValue: defaultValue,
2544
- directives: directives,
2545
- loc: this.loc(start)
2546
- };
2547
- }
2548
- /**
2549
- * InterfaceTypeDefinition :
2550
- * - Description? interface Name Directives[Const]? FieldsDefinition?
2551
- */
2552
- ;
2553
-
2554
- _proto.parseInterfaceTypeDefinition = function parseInterfaceTypeDefinition() {
2555
- var start = this._lexer.token;
2556
- var description = this.parseDescription();
2557
- this.expectKeyword('interface');
2558
- var name = this.parseName();
2559
- var interfaces = this.parseImplementsInterfaces();
2560
- var directives = this.parseDirectives(true);
2561
- var fields = this.parseFieldsDefinition();
2562
- return {
2563
- kind: Kind.INTERFACE_TYPE_DEFINITION,
2564
- description: description,
2565
- name: name,
2566
- interfaces: interfaces,
2567
- directives: directives,
2568
- fields: fields,
2569
- loc: this.loc(start)
2570
- };
2571
- }
2572
- /**
2573
- * UnionTypeDefinition :
2574
- * - Description? union Name Directives[Const]? UnionMemberTypes?
2575
- */
2576
- ;
2577
-
2578
- _proto.parseUnionTypeDefinition = function parseUnionTypeDefinition() {
2579
- var start = this._lexer.token;
2580
- var description = this.parseDescription();
2581
- this.expectKeyword('union');
2582
- var name = this.parseName();
2583
- var directives = this.parseDirectives(true);
2584
- var types = this.parseUnionMemberTypes();
2585
- return {
2586
- kind: Kind.UNION_TYPE_DEFINITION,
2587
- description: description,
2588
- name: name,
2589
- directives: directives,
2590
- types: types,
2591
- loc: this.loc(start)
2592
- };
2593
- }
2594
- /**
2595
- * UnionMemberTypes :
2596
- * - = `|`? NamedType
2597
- * - UnionMemberTypes | NamedType
2598
- */
2599
- ;
2600
-
2601
- _proto.parseUnionMemberTypes = function parseUnionMemberTypes() {
2602
- return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];
2603
- }
2604
- /**
2605
- * EnumTypeDefinition :
2606
- * - Description? enum Name Directives[Const]? EnumValuesDefinition?
2607
- */
2608
- ;
2609
-
2610
- _proto.parseEnumTypeDefinition = function parseEnumTypeDefinition() {
2611
- var start = this._lexer.token;
2612
- var description = this.parseDescription();
2613
- this.expectKeyword('enum');
2614
- var name = this.parseName();
2615
- var directives = this.parseDirectives(true);
2616
- var values = this.parseEnumValuesDefinition();
2617
- return {
2618
- kind: Kind.ENUM_TYPE_DEFINITION,
2619
- description: description,
2620
- name: name,
2621
- directives: directives,
2622
- values: values,
2623
- loc: this.loc(start)
2624
- };
2625
- }
2626
- /**
2627
- * EnumValuesDefinition : { EnumValueDefinition+ }
2628
- */
2629
- ;
2630
-
2631
- _proto.parseEnumValuesDefinition = function parseEnumValuesDefinition() {
2632
- return this.optionalMany(TokenKind.BRACE_L, this.parseEnumValueDefinition, TokenKind.BRACE_R);
2633
- }
2634
- /**
2635
- * EnumValueDefinition : Description? EnumValue Directives[Const]?
2636
- *
2637
- * EnumValue : Name
2638
- */
2639
- ;
2640
-
2641
- _proto.parseEnumValueDefinition = function parseEnumValueDefinition() {
2642
- var start = this._lexer.token;
2643
- var description = this.parseDescription();
2644
- var name = this.parseName();
2645
- var directives = this.parseDirectives(true);
2646
- return {
2647
- kind: Kind.ENUM_VALUE_DEFINITION,
2648
- description: description,
2649
- name: name,
2650
- directives: directives,
2651
- loc: this.loc(start)
2652
- };
2653
- }
2654
- /**
2655
- * InputObjectTypeDefinition :
2656
- * - Description? input Name Directives[Const]? InputFieldsDefinition?
2657
- */
2658
- ;
2659
-
2660
- _proto.parseInputObjectTypeDefinition = function parseInputObjectTypeDefinition() {
2661
- var start = this._lexer.token;
2662
- var description = this.parseDescription();
2663
- this.expectKeyword('input');
2664
- var name = this.parseName();
2665
- var directives = this.parseDirectives(true);
2666
- var fields = this.parseInputFieldsDefinition();
2667
- return {
2668
- kind: Kind.INPUT_OBJECT_TYPE_DEFINITION,
2669
- description: description,
2670
- name: name,
2671
- directives: directives,
2672
- fields: fields,
2673
- loc: this.loc(start)
2674
- };
2675
- }
2676
- /**
2677
- * InputFieldsDefinition : { InputValueDefinition+ }
2678
- */
2679
- ;
2680
-
2681
- _proto.parseInputFieldsDefinition = function parseInputFieldsDefinition() {
2682
- return this.optionalMany(TokenKind.BRACE_L, this.parseInputValueDef, TokenKind.BRACE_R);
2683
- }
2684
- /**
2685
- * TypeSystemExtension :
2686
- * - SchemaExtension
2687
- * - TypeExtension
2688
- *
2689
- * TypeExtension :
2690
- * - ScalarTypeExtension
2691
- * - ObjectTypeExtension
2692
- * - InterfaceTypeExtension
2693
- * - UnionTypeExtension
2694
- * - EnumTypeExtension
2695
- * - InputObjectTypeDefinition
2696
- */
2697
- ;
2698
-
2699
- _proto.parseTypeSystemExtension = function parseTypeSystemExtension() {
2700
- var keywordToken = this._lexer.lookahead();
2701
-
2702
- if (keywordToken.kind === TokenKind.NAME) {
2703
- switch (keywordToken.value) {
2704
- case 'schema':
2705
- return this.parseSchemaExtension();
2706
-
2707
- case 'scalar':
2708
- return this.parseScalarTypeExtension();
2709
-
2710
- case 'type':
2711
- return this.parseObjectTypeExtension();
2712
-
2713
- case 'interface':
2714
- return this.parseInterfaceTypeExtension();
2715
-
2716
- case 'union':
2717
- return this.parseUnionTypeExtension();
2718
-
2719
- case 'enum':
2720
- return this.parseEnumTypeExtension();
2721
-
2722
- case 'input':
2723
- return this.parseInputObjectTypeExtension();
2724
- }
2725
- }
2726
-
2727
- throw this.unexpected(keywordToken);
2728
- }
2729
- /**
2730
- * SchemaExtension :
2731
- * - extend schema Directives[Const]? { OperationTypeDefinition+ }
2732
- * - extend schema Directives[Const]
2733
- */
2734
- ;
2735
-
2736
- _proto.parseSchemaExtension = function parseSchemaExtension() {
2737
- var start = this._lexer.token;
2738
- this.expectKeyword('extend');
2739
- this.expectKeyword('schema');
2740
- var directives = this.parseDirectives(true);
2741
- var operationTypes = this.optionalMany(TokenKind.BRACE_L, this.parseOperationTypeDefinition, TokenKind.BRACE_R);
2742
-
2743
- if (directives.length === 0 && operationTypes.length === 0) {
2744
- throw this.unexpected();
2745
- }
2746
-
2747
- return {
2748
- kind: Kind.SCHEMA_EXTENSION,
2749
- directives: directives,
2750
- operationTypes: operationTypes,
2751
- loc: this.loc(start)
2752
- };
2753
- }
2754
- /**
2755
- * ScalarTypeExtension :
2756
- * - extend scalar Name Directives[Const]
2757
- */
2758
- ;
2759
-
2760
- _proto.parseScalarTypeExtension = function parseScalarTypeExtension() {
2761
- var start = this._lexer.token;
2762
- this.expectKeyword('extend');
2763
- this.expectKeyword('scalar');
2764
- var name = this.parseName();
2765
- var directives = this.parseDirectives(true);
2766
-
2767
- if (directives.length === 0) {
2768
- throw this.unexpected();
2769
- }
2770
-
2771
- return {
2772
- kind: Kind.SCALAR_TYPE_EXTENSION,
2773
- name: name,
2774
- directives: directives,
2775
- loc: this.loc(start)
2776
- };
2777
- }
2778
- /**
2779
- * ObjectTypeExtension :
2780
- * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
2781
- * - extend type Name ImplementsInterfaces? Directives[Const]
2782
- * - extend type Name ImplementsInterfaces
2783
- */
2784
- ;
2785
-
2786
- _proto.parseObjectTypeExtension = function parseObjectTypeExtension() {
2787
- var start = this._lexer.token;
2788
- this.expectKeyword('extend');
2789
- this.expectKeyword('type');
2790
- var name = this.parseName();
2791
- var interfaces = this.parseImplementsInterfaces();
2792
- var directives = this.parseDirectives(true);
2793
- var fields = this.parseFieldsDefinition();
2794
-
2795
- if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
2796
- throw this.unexpected();
2797
- }
2798
-
2799
- return {
2800
- kind: Kind.OBJECT_TYPE_EXTENSION,
2801
- name: name,
2802
- interfaces: interfaces,
2803
- directives: directives,
2804
- fields: fields,
2805
- loc: this.loc(start)
2806
- };
2807
- }
2808
- /**
2809
- * InterfaceTypeExtension :
2810
- * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
2811
- * - extend interface Name ImplementsInterfaces? Directives[Const]
2812
- * - extend interface Name ImplementsInterfaces
2813
- */
2814
- ;
2815
-
2816
- _proto.parseInterfaceTypeExtension = function parseInterfaceTypeExtension() {
2817
- var start = this._lexer.token;
2818
- this.expectKeyword('extend');
2819
- this.expectKeyword('interface');
2820
- var name = this.parseName();
2821
- var interfaces = this.parseImplementsInterfaces();
2822
- var directives = this.parseDirectives(true);
2823
- var fields = this.parseFieldsDefinition();
2824
-
2825
- if (interfaces.length === 0 && directives.length === 0 && fields.length === 0) {
2826
- throw this.unexpected();
2827
- }
2828
-
2829
- return {
2830
- kind: Kind.INTERFACE_TYPE_EXTENSION,
2831
- name: name,
2832
- interfaces: interfaces,
2833
- directives: directives,
2834
- fields: fields,
2835
- loc: this.loc(start)
2836
- };
2837
- }
2838
- /**
2839
- * UnionTypeExtension :
2840
- * - extend union Name Directives[Const]? UnionMemberTypes
2841
- * - extend union Name Directives[Const]
2842
- */
2843
- ;
2844
-
2845
- _proto.parseUnionTypeExtension = function parseUnionTypeExtension() {
2846
- var start = this._lexer.token;
2847
- this.expectKeyword('extend');
2848
- this.expectKeyword('union');
2849
- var name = this.parseName();
2850
- var directives = this.parseDirectives(true);
2851
- var types = this.parseUnionMemberTypes();
2852
-
2853
- if (directives.length === 0 && types.length === 0) {
2854
- throw this.unexpected();
2855
- }
2856
-
2857
- return {
2858
- kind: Kind.UNION_TYPE_EXTENSION,
2859
- name: name,
2860
- directives: directives,
2861
- types: types,
2862
- loc: this.loc(start)
2863
- };
2864
- }
2865
- /**
2866
- * EnumTypeExtension :
2867
- * - extend enum Name Directives[Const]? EnumValuesDefinition
2868
- * - extend enum Name Directives[Const]
2869
- */
2870
- ;
2871
-
2872
- _proto.parseEnumTypeExtension = function parseEnumTypeExtension() {
2873
- var start = this._lexer.token;
2874
- this.expectKeyword('extend');
2875
- this.expectKeyword('enum');
2876
- var name = this.parseName();
2877
- var directives = this.parseDirectives(true);
2878
- var values = this.parseEnumValuesDefinition();
2879
-
2880
- if (directives.length === 0 && values.length === 0) {
2881
- throw this.unexpected();
2882
- }
2883
-
2884
- return {
2885
- kind: Kind.ENUM_TYPE_EXTENSION,
2886
- name: name,
2887
- directives: directives,
2888
- values: values,
2889
- loc: this.loc(start)
2890
- };
2891
- }
2892
- /**
2893
- * InputObjectTypeExtension :
2894
- * - extend input Name Directives[Const]? InputFieldsDefinition
2895
- * - extend input Name Directives[Const]
2896
- */
2897
- ;
2898
-
2899
- _proto.parseInputObjectTypeExtension = function parseInputObjectTypeExtension() {
2900
- var start = this._lexer.token;
2901
- this.expectKeyword('extend');
2902
- this.expectKeyword('input');
2903
- var name = this.parseName();
2904
- var directives = this.parseDirectives(true);
2905
- var fields = this.parseInputFieldsDefinition();
2906
-
2907
- if (directives.length === 0 && fields.length === 0) {
2908
- throw this.unexpected();
2909
- }
2910
-
2911
- return {
2912
- kind: Kind.INPUT_OBJECT_TYPE_EXTENSION,
2913
- name: name,
2914
- directives: directives,
2915
- fields: fields,
2916
- loc: this.loc(start)
2917
- };
2918
- }
2919
- /**
2920
- * DirectiveDefinition :
2921
- * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
2922
- */
2923
- ;
2924
-
2925
- _proto.parseDirectiveDefinition = function parseDirectiveDefinition() {
2926
- var start = this._lexer.token;
2927
- var description = this.parseDescription();
2928
- this.expectKeyword('directive');
2929
- this.expectToken(TokenKind.AT);
2930
- var name = this.parseName();
2931
- var args = this.parseArgumentDefs();
2932
- var repeatable = this.expectOptionalKeyword('repeatable');
2933
- this.expectKeyword('on');
2934
- var locations = this.parseDirectiveLocations();
2935
- return {
2936
- kind: Kind.DIRECTIVE_DEFINITION,
2937
- description: description,
2938
- name: name,
2939
- arguments: args,
2940
- repeatable: repeatable,
2941
- locations: locations,
2942
- loc: this.loc(start)
2943
- };
2944
- }
2945
- /**
2946
- * DirectiveLocations :
2947
- * - `|`? DirectiveLocation
2948
- * - DirectiveLocations | DirectiveLocation
2949
- */
2950
- ;
2951
-
2952
- _proto.parseDirectiveLocations = function parseDirectiveLocations() {
2953
- return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);
2954
- }
2955
- /*
2956
- * DirectiveLocation :
2957
- * - ExecutableDirectiveLocation
2958
- * - TypeSystemDirectiveLocation
2959
- *
2960
- * ExecutableDirectiveLocation : one of
2961
- * `QUERY`
2962
- * `MUTATION`
2963
- * `SUBSCRIPTION`
2964
- * `FIELD`
2965
- * `FRAGMENT_DEFINITION`
2966
- * `FRAGMENT_SPREAD`
2967
- * `INLINE_FRAGMENT`
2968
- *
2969
- * TypeSystemDirectiveLocation : one of
2970
- * `SCHEMA`
2971
- * `SCALAR`
2972
- * `OBJECT`
2973
- * `FIELD_DEFINITION`
2974
- * `ARGUMENT_DEFINITION`
2975
- * `INTERFACE`
2976
- * `UNION`
2977
- * `ENUM`
2978
- * `ENUM_VALUE`
2979
- * `INPUT_OBJECT`
2980
- * `INPUT_FIELD_DEFINITION`
2981
- */
2982
- ;
2983
-
2984
- _proto.parseDirectiveLocation = function parseDirectiveLocation() {
2985
- var start = this._lexer.token;
2986
- var name = this.parseName();
2987
-
2988
- if (DirectiveLocation[name.value] !== undefined) {
2989
- return name;
2990
- }
2991
-
2992
- throw this.unexpected(start);
2993
- } // Core parsing utility functions
2994
-
2995
- /**
2996
- * Returns a location object, used to identify the place in the source that created a given parsed object.
2997
- */
2998
- ;
2999
-
3000
- _proto.loc = function loc(startToken) {
3001
- var _this$_options4;
3002
-
3003
- if (((_this$_options4 = this._options) === null || _this$_options4 === void 0 ? void 0 : _this$_options4.noLocation) !== true) {
3004
- return new Location(startToken, this._lexer.lastToken, this._lexer.source);
3005
- }
3006
- }
3007
- /**
3008
- * Determines if the next token is of a given kind
3009
- */
3010
- ;
3011
-
3012
- _proto.peek = function peek(kind) {
3013
- return this._lexer.token.kind === kind;
3014
- }
3015
- /**
3016
- * If the next token is of the given kind, return that token after advancing the lexer.
3017
- * Otherwise, do not change the parser state and throw an error.
3018
- */
3019
- ;
3020
-
3021
- _proto.expectToken = function expectToken(kind) {
3022
- var token = this._lexer.token;
3023
-
3024
- if (token.kind === kind) {
3025
- this._lexer.advance();
3026
-
3027
- return token;
3028
- }
3029
-
3030
- throw syntaxError(this._lexer.source, token.start, "Expected ".concat(getTokenKindDesc(kind), ", found ").concat(getTokenDesc(token), "."));
3031
- }
3032
- /**
3033
- * If the next token is of the given kind, return that token after advancing the lexer.
3034
- * Otherwise, do not change the parser state and return undefined.
3035
- */
3036
- ;
3037
-
3038
- _proto.expectOptionalToken = function expectOptionalToken(kind) {
3039
- var token = this._lexer.token;
3040
-
3041
- if (token.kind === kind) {
3042
- this._lexer.advance();
3043
-
3044
- return token;
3045
- }
3046
-
3047
- return undefined;
3048
- }
3049
- /**
3050
- * If the next token is a given keyword, advance the lexer.
3051
- * Otherwise, do not change the parser state and throw an error.
3052
- */
3053
- ;
3054
-
3055
- _proto.expectKeyword = function expectKeyword(value) {
3056
- var token = this._lexer.token;
3057
-
3058
- if (token.kind === TokenKind.NAME && token.value === value) {
3059
- this._lexer.advance();
3060
- } else {
3061
- throw syntaxError(this._lexer.source, token.start, "Expected \"".concat(value, "\", found ").concat(getTokenDesc(token), "."));
3062
- }
3063
- }
3064
- /**
3065
- * If the next token is a given keyword, return "true" after advancing the lexer.
3066
- * Otherwise, do not change the parser state and return "false".
3067
- */
3068
- ;
3069
-
3070
- _proto.expectOptionalKeyword = function expectOptionalKeyword(value) {
3071
- var token = this._lexer.token;
3072
-
3073
- if (token.kind === TokenKind.NAME && token.value === value) {
3074
- this._lexer.advance();
3075
-
3076
- return true;
3077
- }
3078
-
3079
- return false;
3080
- }
3081
- /**
3082
- * Helper function for creating an error when an unexpected lexed token is encountered.
3083
- */
3084
- ;
3085
-
3086
- _proto.unexpected = function unexpected(atToken) {
3087
- var token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
3088
- return syntaxError(this._lexer.source, token.start, "Unexpected ".concat(getTokenDesc(token), "."));
3089
- }
3090
- /**
3091
- * Returns a possibly empty list of parse nodes, determined by the parseFn.
3092
- * This list begins with a lex token of openKind and ends with a lex token of closeKind.
3093
- * Advances the parser to the next lex token after the closing token.
3094
- */
3095
- ;
3096
-
3097
- _proto.any = function any(openKind, parseFn, closeKind) {
3098
- this.expectToken(openKind);
3099
- var nodes = [];
3100
-
3101
- while (!this.expectOptionalToken(closeKind)) {
3102
- nodes.push(parseFn.call(this));
3103
- }
3104
-
3105
- return nodes;
3106
- }
3107
- /**
3108
- * Returns a list of parse nodes, determined by the parseFn.
3109
- * It can be empty only if open token is missing otherwise it will always return non-empty list
3110
- * that begins with a lex token of openKind and ends with a lex token of closeKind.
3111
- * Advances the parser to the next lex token after the closing token.
3112
- */
3113
- ;
3114
-
3115
- _proto.optionalMany = function optionalMany(openKind, parseFn, closeKind) {
3116
- if (this.expectOptionalToken(openKind)) {
3117
- var nodes = [];
3118
-
3119
- do {
3120
- nodes.push(parseFn.call(this));
3121
- } while (!this.expectOptionalToken(closeKind));
3122
-
3123
- return nodes;
3124
- }
3125
-
3126
- return [];
3127
- }
3128
- /**
3129
- * Returns a non-empty list of parse nodes, determined by the parseFn.
3130
- * This list begins with a lex token of openKind and ends with a lex token of closeKind.
3131
- * Advances the parser to the next lex token after the closing token.
3132
- */
3133
- ;
3134
-
3135
- _proto.many = function many(openKind, parseFn, closeKind) {
3136
- this.expectToken(openKind);
3137
- var nodes = [];
3138
-
3139
- do {
3140
- nodes.push(parseFn.call(this));
3141
- } while (!this.expectOptionalToken(closeKind));
3142
-
3143
- return nodes;
3144
- }
3145
- /**
3146
- * Returns a non-empty list of parse nodes, determined by the parseFn.
3147
- * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
3148
- * Advances the parser to the next lex token after last item in the list.
3149
- */
3150
- ;
3151
-
3152
- _proto.delimitedMany = function delimitedMany(delimiterKind, parseFn) {
3153
- this.expectOptionalToken(delimiterKind);
3154
- var nodes = [];
3155
-
3156
- do {
3157
- nodes.push(parseFn.call(this));
3158
- } while (this.expectOptionalToken(delimiterKind));
3159
-
3160
- return nodes;
3161
- };
3162
-
3163
- return Parser;
3164
- }();
3165
- /**
3166
- * A helper function to describe a token as a string for debugging.
3167
- */
3168
-
3169
- function getTokenDesc(token) {
3170
- var value = token.value;
3171
- return getTokenKindDesc(token.kind) + (value != null ? " \"".concat(value, "\"") : '');
3172
- }
3173
- /**
3174
- * A helper function to describe a token kind as a string for debugging.
3175
- */
3176
-
3177
-
3178
- function getTokenKindDesc(kind) {
3179
- return isPunctuatorTokenKind(kind) ? "\"".concat(kind, "\"") : kind;
3180
- }
3181
-
3182
- var docCache = new Map();
3183
- var fragmentSourceMap = new Map();
3184
- var printFragmentWarnings = true;
3185
- var experimentalFragmentVariables = false;
3186
- function normalize$2(string) {
3187
- return string.replace(/[\s,]+/g, ' ').trim();
3188
- }
3189
- function cacheKeyFromLoc(loc) {
3190
- return normalize$2(loc.source.body.substring(loc.start, loc.end));
3191
- }
3192
- function processFragments(ast) {
3193
- var seenKeys = new Set();
3194
- var definitions = [];
3195
- ast.definitions.forEach(function (fragmentDefinition) {
3196
- if (fragmentDefinition.kind === 'FragmentDefinition') {
3197
- var fragmentName = fragmentDefinition.name.value;
3198
- var sourceKey = cacheKeyFromLoc(fragmentDefinition.loc);
3199
- var sourceKeySet = fragmentSourceMap.get(fragmentName);
3200
- if (sourceKeySet && !sourceKeySet.has(sourceKey)) {
3201
- if (printFragmentWarnings) {
3202
- console.warn("Warning: fragment with name " + fragmentName + " already exists.\n"
3203
- + "graphql-tag enforces all fragment names across your application to be unique; read more about\n"
3204
- + "this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names");
3205
- }
3206
- }
3207
- else if (!sourceKeySet) {
3208
- fragmentSourceMap.set(fragmentName, sourceKeySet = new Set);
3209
- }
3210
- sourceKeySet.add(sourceKey);
3211
- if (!seenKeys.has(sourceKey)) {
3212
- seenKeys.add(sourceKey);
3213
- definitions.push(fragmentDefinition);
3214
- }
3215
- }
3216
- else {
3217
- definitions.push(fragmentDefinition);
3218
- }
3219
- });
3220
- return __assign(__assign({}, ast), { definitions: definitions });
3221
- }
3222
- function stripLoc(doc) {
3223
- var workSet = new Set(doc.definitions);
3224
- workSet.forEach(function (node) {
3225
- if (node.loc)
3226
- delete node.loc;
3227
- Object.keys(node).forEach(function (key) {
3228
- var value = node[key];
3229
- if (value && typeof value === 'object') {
3230
- workSet.add(value);
3231
- }
3232
- });
3233
- });
3234
- var loc = doc.loc;
3235
- if (loc) {
3236
- delete loc.startToken;
3237
- delete loc.endToken;
3238
- }
3239
- return doc;
3240
- }
3241
- function parseDocument(source) {
3242
- var cacheKey = normalize$2(source);
3243
- if (!docCache.has(cacheKey)) {
3244
- var parsed = parse$1(source, {
3245
- experimentalFragmentVariables: experimentalFragmentVariables,
3246
- allowLegacyFragmentVariables: experimentalFragmentVariables
3247
- });
3248
- if (!parsed || parsed.kind !== 'Document') {
3249
- throw new Error('Not a valid GraphQL document.');
3250
- }
3251
- docCache.set(cacheKey, stripLoc(processFragments(parsed)));
3252
- }
3253
- return docCache.get(cacheKey);
3254
- }
3255
- function gql(literals) {
3256
- var args = [];
3257
- for (var _i = 1; _i < arguments.length; _i++) {
3258
- args[_i - 1] = arguments[_i];
3259
- }
3260
- if (typeof literals === 'string') {
3261
- literals = [literals];
3262
- }
3263
- var result = literals[0];
3264
- args.forEach(function (arg, i) {
3265
- if (arg && arg.kind === 'Document') {
3266
- result += arg.loc.source.body;
3267
- }
3268
- else {
3269
- result += arg;
3270
- }
3271
- result += literals[i + 1];
3272
- });
3273
- return parseDocument(result);
3274
- }
3275
- function resetCaches() {
3276
- docCache.clear();
3277
- fragmentSourceMap.clear();
3278
- }
3279
- function disableFragmentWarnings() {
3280
- printFragmentWarnings = false;
3281
- }
3282
- function enableExperimentalFragmentVariables() {
3283
- experimentalFragmentVariables = true;
3284
- }
3285
- function disableExperimentalFragmentVariables() {
3286
- experimentalFragmentVariables = false;
3287
- }
3288
- var extras = {
3289
- gql: gql,
3290
- resetCaches: resetCaches,
3291
- disableFragmentWarnings: disableFragmentWarnings,
3292
- enableExperimentalFragmentVariables: enableExperimentalFragmentVariables,
3293
- disableExperimentalFragmentVariables: disableExperimentalFragmentVariables
3294
- };
3295
- (function (gql_1) {
3296
- gql_1.gql = extras.gql, gql_1.resetCaches = extras.resetCaches, gql_1.disableFragmentWarnings = extras.disableFragmentWarnings, gql_1.enableExperimentalFragmentVariables = extras.enableExperimentalFragmentVariables, gql_1.disableExperimentalFragmentVariables = extras.disableExperimentalFragmentVariables;
3297
- })(gql || (gql = {}));
3298
- gql["default"] = gql;
3299
- var gql$1 = gql;
3300
-
3301
91
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3302
92
 
3303
93
  function getAugmentedNamespace(n) {
@@ -6227,37 +3017,44 @@
6227
3017
  switch (api) {
6228
3018
  case 'prod':
6229
3019
  dBackend = 'https://query.bcrumbs.net';
6230
- apiBackend = 'https://api.bcrumbs.net';
6231
- apiV2Backend = 'https://apiv2.bcrumbs.net';
3020
+ exports.frontend = 'https://app.bcrumbs.net';
3021
+ exports.apiBackend = 'https://api.bcrumbs.net';
3022
+ exports.apiV2Backend = 'https://apiv2.bcrumbs.net';
6232
3023
  break;
6233
3024
  case 'test':
6234
3025
  dBackend = 'https://query.bcrumbs.net';
6235
- apiBackend = 'https://api.bcrumbs.net';
6236
- apiV2Backend = 'https://apiv2.bcrumbs.net';
3026
+ exports.frontend = 'https://dev.bcrumbs.net';
3027
+ exports.apiBackend = 'https://api.bcrumbs.net';
3028
+ exports.apiV2Backend = 'apiv2-dev.bcrumbs.net';
6237
3029
  break;
6238
3030
  case 'local':
6239
3031
  dBackend = 'https://localhost:44322';
6240
- apiBackend = 'https://api.bcrumbs.net';
6241
- apiV2Backend = 'http://localhost:8000';
3032
+ exports.frontend = 'http://localhost:4200';
3033
+ exports.apiBackend = 'https://api.bcrumbs.net';
3034
+ exports.apiV2Backend = 'https://apiv2-dev.bcrumbs.net';
6242
3035
  break;
6243
3036
  default:
6244
3037
  if (currentUrl) {
6245
3038
  if (currentUrl.indexOf('localhost') > -1) {
6246
3039
  dBackend = 'https://query.bcrumbs.net';
6247
- apiBackend = 'https://api.bcrumbs.net';
6248
- apiV2Backend = 'http://localhost:8000';
3040
+ exports.frontend = 'http://localhost:4200';
3041
+ exports.apiBackend = 'https://api.bcrumbs.net';
3042
+ exports.apiV2Backend = 'https://apiv2-dev.bcrumbs.net';
6249
3043
  } else if (currentUrl.indexOf('dconfig.com') > -1) {
6250
3044
  dBackend = 'https://query.bcrumbs.net';
6251
- apiBackend = 'https://api.bcrumbs.net';
6252
- apiV2Backend = 'https://apiv2.bcrumbs.net';
3045
+ exports.frontend = 'https://app.bcrumbs.net';
3046
+ exports.apiBackend = 'https://api.bcrumbs.net';
3047
+ exports.apiV2Backend = 'https://apiv2.bcrumbs.net';
6253
3048
  } else if (currentUrl.indexOf('dev.bcrumbs.net') > -1) {
6254
3049
  dBackend = 'https://query.bcrumbs.net';
6255
- apiBackend = 'https://api.bcrumbs.net';
6256
- apiV2Backend = 'https://apiv2.bcrumbs.net';
3050
+ exports.frontend = 'https://dev.bcrumbs.net';
3051
+ exports.apiBackend = 'https://api.bcrumbs.net';
3052
+ exports.apiV2Backend = 'https://apiv2.bcrumbs.net';
6257
3053
  } else {
6258
3054
  dBackend = 'https://query.bcrumbs.net';
6259
- apiBackend = 'https://api.bcrumbs.net';
6260
- apiV2Backend = 'https://apiv2.bcrumbs.net';
3055
+ exports.frontend = 'https://app.bcrumbs.net';
3056
+ exports.apiBackend = 'https://api.bcrumbs.net';
3057
+ exports.apiV2Backend = 'https://apiv2.bcrumbs.net';
6261
3058
  }
6262
3059
  }
6263
3060
  break;
@@ -6266,20 +3063,21 @@
6266
3063
  }
6267
3064
  var params;
6268
3065
  var currentUrl;
3066
+ exports.frontend = void 0;
6269
3067
  var dBackend;
6270
- var apiBackend;
6271
- var apiV2Backend;
3068
+ exports.apiBackend = void 0;
3069
+ exports.apiV2Backend = void 0;
6272
3070
  var api;
6273
3071
  initBackendsLocations();
6274
3072
  var appConfig = {
6275
3073
  dconfig: {
6276
- networkInterface: apiBackend
3074
+ networkInterface: exports.apiBackend
6277
3075
  },
6278
3076
  dquery: {
6279
3077
  networkInterface: dBackend + '/graphql'
6280
3078
  },
6281
3079
  billing: {
6282
- networkInterface: apiV2Backend + '/billing'
3080
+ networkInterface: exports.apiV2Backend + '/billing'
6283
3081
  },
6284
3082
  // sw path
6285
3083
  sw: {
@@ -6328,7 +3126,7 @@
6328
3126
  headers: __assign(__assign({}, headers), {
6329
3127
  Accept: 'application/json',
6330
3128
  Ajax: true,
6331
- Authorization: "Bearer " + currentUsertoken,
3129
+ Authorization: "Bearer ".concat(currentUsertoken),
6332
3130
  ContextId: currentContext ? currentContext : 1132
6333
3131
  })
6334
3132
  } : {
@@ -6402,7 +3200,7 @@
6402
3200
  connectToDevTools: isDevEnv$1
6403
3201
  });
6404
3202
 
6405
- var viewTypesQuery = gql$1(templateObject_1$7 || (templateObject_1$7 = __makeTemplateObject(["\n query ($templateContextId: Int!) {\n viewTypes(templateContextId: $templateContextId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypes?templateContextId={args.templateContextId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"], ["\n query ($templateContextId: Int!) {\n viewTypes(templateContextId: $templateContextId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypes?templateContextId={args.templateContextId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"])));
3203
+ var viewTypesQuery = gql__default["default"](templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query ($templateContextId: Int!) {\n viewTypes(templateContextId: $templateContextId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypes?templateContextId={args.templateContextId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"], ["\n query ($templateContextId: Int!) {\n viewTypes(templateContextId: $templateContextId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypes?templateContextId={args.templateContextId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"])));
6406
3204
  var viewTypesQueryOptions = {
6407
3205
  options: function () {
6408
3206
  return {
@@ -6431,7 +3229,7 @@
6431
3229
  }
6432
3230
  });
6433
3231
  };
6434
- var viewTypeChildrenQuery = gql$1(templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n query ($parentId: Int!, $templateId: Int!) {\n viewTypes(parentId: $parentId, templateId: $templateId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypeChildren?Id={args.parentId}&templateContextId={args.templateId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"], ["\n query ($parentId: Int!, $templateId: Int!) {\n viewTypes(parentId: $parentId, templateId: $templateId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypeChildren?Id={args.parentId}&templateContextId={args.templateId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"])));
3232
+ var viewTypeChildrenQuery = gql__default["default"](templateObject_2$6 || (templateObject_2$6 = __makeTemplateObject(["\n query ($parentId: Int!, $templateId: Int!) {\n viewTypes(parentId: $parentId, templateId: $templateId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypeChildren?Id={args.parentId}&templateContextId={args.templateId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"], ["\n query ($parentId: Int!, $templateId: Int!) {\n viewTypes(parentId: $parentId, templateId: $templateId)\n @rest(\n type: \"Model\"\n path: \"/DConfig/WebsiteContentAPI/getViewTypeChildren?Id={args.parentId}&templateContextId={args.templateId}\"\n method: \"GET\"\n ) {\n Id\n Name\n ViewFields {\n Id\n Name\n Type\n EnumId\n }\n }\n }\n"])));
6435
3233
  var viewTypeChildrenQueryOptions = {
6436
3234
  options: function () {
6437
3235
  return {
@@ -6461,11 +3259,11 @@
6461
3259
  }
6462
3260
  });
6463
3261
  };
6464
- var templateObject_1$7, templateObject_2$6;
3262
+ var templateObject_1$6, templateObject_2$6;
6465
3263
 
6466
3264
  var uri = appConfig.dquery.networkInterface;
6467
3265
  var cache = new client.InMemoryCache();
6468
- var errorLink = apolloLinkError.onError(function (_a) {
3266
+ var errorLink = error.onError(function (_a) {
6469
3267
  var networkError = _a.networkError;
6470
3268
  if (networkError && networkError.statusCode === 401) {
6471
3269
  // redirect to login page
@@ -6484,7 +3282,6 @@
6484
3282
  }
6485
3283
  });
6486
3284
  var dqueryClient = new client.ApolloClient({
6487
- // @ts-expect-error TypeScript is complaining
6488
3285
  link: client.from([errorLink, link_dquery]),
6489
3286
  cache: cache,
6490
3287
  connectToDevTools: isDevEnv,
@@ -6507,22 +3304,22 @@
6507
3304
  var APP_PERSIST_STORES_TYPES = ['localStorage', 'sessionStorage'];
6508
3305
  var parse = JSON.parse;
6509
3306
  var stringify = JSON.stringify;
6510
- /*
6511
- auth object
6512
- -> store "TOKEN_KEY"
6513
- - default storage is "localStorage"
6514
- - default token key is 'token'
3307
+ /*
3308
+ auth object
3309
+ -> store "TOKEN_KEY"
3310
+ - default storage is "localStorage"
3311
+ - default token key is 'token'
6515
3312
  */
6516
3313
  var auth = {
6517
3314
  // /////////////////////////////////////////////////////////////
6518
3315
  // TOKEN
6519
3316
  // /////////////////////////////////////////////////////////////
6520
- /**
6521
- * get token from localstorage
6522
- *
6523
- * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
6524
- * @param {any} [tokenKey=TOKEN_KEY] optionnal parameter to specify a token key
6525
- * @returns {string} token value
3317
+ /**
3318
+ * get token from localstorage
3319
+ *
3320
+ * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
3321
+ * @param {any} [tokenKey=TOKEN_KEY] optionnal parameter to specify a token key
3322
+ * @returns {string} token value
6526
3323
  */
6527
3324
  getToken: function (fromStorage, tokenKey) {
6528
3325
  if (fromStorage === void 0) {
@@ -6542,13 +3339,13 @@
6542
3339
  // default:
6543
3340
  return null;
6544
3341
  },
6545
- /**
6546
- * set the token value into localstorage (managed by localforage)
6547
- *
6548
- * @param {string} [value=''] token value
6549
- * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
6550
- * @param {any} [tokenKey='token'] token key
6551
- * @returns {boolean} success/failure flag
3342
+ /**
3343
+ * set the token value into localstorage (managed by localforage)
3344
+ *
3345
+ * @param {string} [value=''] token value
3346
+ * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
3347
+ * @param {any} [tokenKey='token'] token key
3348
+ * @returns {boolean} success/failure flag
6552
3349
  */
6553
3350
  setToken: function (value, toStorage, tokenKey) {
6554
3351
  if (value === void 0) {
@@ -6576,26 +3373,26 @@
6576
3373
  }
6577
3374
  }
6578
3375
  },
6579
- /**
6580
- * check
6581
- * - if token key contains a valid token value (defined and not an empty value)
6582
- * - if the token expiration date is passed
6583
- *
6584
- *
6585
- * Note: 'isAuthenticated' just checks 'tokenKey' on store (localStorage by default or sessionStorage)
6586
- *
6587
- * You may think: 'ok I just put an empty token key and I have access to protected routes?''
6588
- * -> answer is: YES^^
6589
- * BUT
6590
- * -> : your backend will not recognize a wrong token so private data or safe and you protected view could be a bit ugly without any data.
6591
- *
6592
- * => ON CONCLUSION: this aim of 'isAuthenticated'
6593
- * -> is to help for a better "user experience" (= better than displaying a view with no data since server did not accept the user).
6594
- * -> it is not a security purpose (security comes from backend, since frontend is easily hackable => user has access to all your frontend)
6595
- *
6596
- * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
6597
- * @param {any} [tokenKey=TOKEN_KEY] token key
6598
- * @returns {bool} is authenticed response
3376
+ /**
3377
+ * check
3378
+ * - if token key contains a valid token value (defined and not an empty value)
3379
+ * - if the token expiration date is passed
3380
+ *
3381
+ *
3382
+ * Note: 'isAuthenticated' just checks 'tokenKey' on store (localStorage by default or sessionStorage)
3383
+ *
3384
+ * You may think: 'ok I just put an empty token key and I have access to protected routes?''
3385
+ * -> answer is: YES^^
3386
+ * BUT
3387
+ * -> : your backend will not recognize a wrong token so private data or safe and you protected view could be a bit ugly without any data.
3388
+ *
3389
+ * => ON CONCLUSION: this aim of 'isAuthenticated'
3390
+ * -> is to help for a better "user experience" (= better than displaying a view with no data since server did not accept the user).
3391
+ * -> it is not a security purpose (security comes from backend, since frontend is easily hackable => user has access to all your frontend)
3392
+ *
3393
+ * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
3394
+ * @param {any} [tokenKey=TOKEN_KEY] token key
3395
+ * @returns {bool} is authenticed response
6599
3396
  */
6600
3397
  isAuthenticated: function (fromStorage, tokenKey) {
6601
3398
  if (fromStorage === void 0) {
@@ -6623,11 +3420,11 @@
6623
3420
  // default:
6624
3421
  return false;
6625
3422
  },
6626
- /**
6627
- * delete token
6628
- *
6629
- * @param {any} [tokenKey='token'] token key
6630
- * @returns {bool} success/failure flag
3423
+ /**
3424
+ * delete token
3425
+ *
3426
+ * @param {any} [tokenKey='token'] token key
3427
+ * @returns {bool} success/failure flag
6631
3428
  */
6632
3429
  clearToken: function (storage, tokenKey) {
6633
3430
  if (tokenKey === void 0) {
@@ -6646,11 +3443,11 @@
6646
3443
  return false;
6647
3444
  },
6648
3445
  //TODO: Its not working for now while the token is not JWT token
6649
- /**
6650
- * return expiration date from token
6651
- *
6652
- * @param {string} encodedToken - base 64 token received from server and stored in local storage
6653
- * @returns {date | null} returns expiration date or null id expired props not found in decoded token
3446
+ /**
3447
+ * return expiration date from token
3448
+ *
3449
+ * @param {string} encodedToken - base 64 token received from server and stored in local storage
3450
+ * @returns {date | null} returns expiration date or null id expired props not found in decoded token
6654
3451
  */
6655
3452
  getTokenExpirationDate: function (encodedToken) {
6656
3453
  if (!encodedToken) {
@@ -6666,12 +3463,12 @@
6666
3463
  return expirationDate;
6667
3464
  },
6668
3465
  //TODO: Its not working for now while the token is not JWT token
6669
- /**
6670
- *
6671
- * tell is token is expired (compared to now)
6672
- *
6673
- * @param {string} encodedToken - base 64 token received from server and stored in local storage
6674
- * @returns {bool} returns true if expired else false
3466
+ /**
3467
+ *
3468
+ * tell is token is expired (compared to now)
3469
+ *
3470
+ * @param {string} encodedToken - base 64 token received from server and stored in local storage
3471
+ * @returns {bool} returns true if expired else false
6675
3472
  */
6676
3473
  isExpiredToken: function (encodedToken) {
6677
3474
  var expirationDate = this.getTokenExpirationDate(encodedToken);
@@ -6682,12 +3479,12 @@
6682
3479
  // /////////////////////////////////////////////////////////////
6683
3480
  // USER_INFO
6684
3481
  // /////////////////////////////////////////////////////////////
6685
- /**
6686
- * get user info from localstorage
6687
- *
6688
- * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
6689
- * @param {any} [userInfoKey='userInfo'] optionnal parameter to specify a token key
6690
- * @returns {string} token value
3482
+ /**
3483
+ * get user info from localstorage
3484
+ *
3485
+ * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
3486
+ * @param {any} [userInfoKey='userInfo'] optionnal parameter to specify a token key
3487
+ * @returns {string} token value
6691
3488
  */
6692
3489
  getUserInfo: function (fromStorage, userInfoKey) {
6693
3490
  if (fromStorage === void 0) {
@@ -6712,13 +3509,13 @@
6712
3509
  // default:
6713
3510
  return null;
6714
3511
  },
6715
- /**
6716
- * set the userInfo value into localstorage
6717
- *
6718
- * @param {object} [value=''] token value
6719
- * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
6720
- * @param {any} [userInfoKey='userInfo'] token key
6721
- * @returns {boolean} success/failure flag
3512
+ /**
3513
+ * set the userInfo value into localstorage
3514
+ *
3515
+ * @param {object} [value=''] token value
3516
+ * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
3517
+ * @param {any} [userInfoKey='userInfo'] token key
3518
+ * @returns {boolean} success/failure flag
6722
3519
  */
6723
3520
  setUserInfo: function (value, toStorage, userInfoKey) {
6724
3521
  if (toStorage === void 0) {
@@ -6749,11 +3546,11 @@
6749
3546
  user.surname = value.surname;
6750
3547
  this.setUserInfo(user);
6751
3548
  },
6752
- /**
6753
- * delete userInfo
6754
- *
6755
- * @param {string} [userInfoKey='userInfo'] token key
6756
- * @returns {bool} success/failure flag
3549
+ /**
3550
+ * delete userInfo
3551
+ *
3552
+ * @param {string} [userInfoKey='userInfo'] token key
3553
+ * @returns {bool} success/failure flag
6757
3554
  */
6758
3555
  clearUserInfo: function (userInfoKey) {
6759
3556
  if (userInfoKey === void 0) {
@@ -6771,9 +3568,9 @@
6771
3568
  // /////////////////////////////////////////////////////////////
6772
3569
  // COMMON
6773
3570
  // /////////////////////////////////////////////////////////////
6774
- /**
6775
- * forget me method: clear all
6776
- * @returns {bool} success/failure flag
3571
+ /**
3572
+ * forget me method: clear all
3573
+ * @returns {bool} success/failure flag
6777
3574
  */
6778
3575
  clearAllAppStorage: function () {
6779
3576
  if (window && window.localStorage) {
@@ -6787,13 +3584,13 @@
6787
3584
  // /////////////////////////////////////////////////////////////
6788
3585
  // Context
6789
3586
  // /////////////////////////////////////////////////////////////
6790
- /**
6791
- * set the context value into localstorage (managed by localforage)
6792
- *
6793
- * @param {string} [value=''] context value
6794
- * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
6795
- * @param {any} [tokenKey='token'] token key
6796
- * @returns {boolean} success/failure flag
3587
+ /**
3588
+ * set the context value into localstorage (managed by localforage)
3589
+ *
3590
+ * @param {string} [value=''] context value
3591
+ * @param {'localStorage' | 'sessionStorage'} [toStorage='localStorage'] specify storage
3592
+ * @param {any} [tokenKey='token'] token key
3593
+ * @returns {boolean} success/failure flag
6797
3594
  */
6798
3595
  setContext: function (value, toStorage, contextKey) {
6799
3596
  if (value === void 0) {
@@ -6821,12 +3618,12 @@
6821
3618
  }
6822
3619
  }
6823
3620
  },
6824
- /**
6825
- * get context from localstorage
6826
- *
6827
- * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
6828
- * @param {any} [tokenKey=TOKEN_KEY] optionnal parameter to specify a token key
6829
- * @returns {string} token value
3621
+ /**
3622
+ * get context from localstorage
3623
+ *
3624
+ * @param {'localStorage' | 'sessionStorage'} [fromStorage='localStorage'] specify storage
3625
+ * @param {any} [tokenKey=TOKEN_KEY] optionnal parameter to specify a token key
3626
+ * @returns {string} token value
6830
3627
  */
6831
3628
  getContext: function (fromStorage, contextKey) {
6832
3629
  if (fromStorage === void 0) {
@@ -6848,8 +3645,8 @@
6848
3645
  }
6849
3646
  };
6850
3647
 
6851
- var showcaseContentsQuery = gql$1(templateObject_1$6 || (templateObject_1$6 = __makeTemplateObject(["\n query ($rootId: Int!, $path: String) {\n contents(rootId: $rootId, deep: 4, path: $path) {\n name\n title\n metaDescription\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n }\n }\n }\n }\n }\n }\n"], ["\n query ($rootId: Int!, $path: String) {\n contents(rootId: $rootId, deep: 4, path: $path) {\n name\n title\n metaDescription\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n }\n }\n }\n }\n }\n }\n"])));
6852
- var showcaseTemplatesQuery = gql$1(templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n query {\n showcasetemplates {\n category\n id\n image\n name\n sourceCompanyId\n exampleUrl\n }\n }\n"], ["\n query {\n showcasetemplates {\n category\n id\n image\n name\n sourceCompanyId\n exampleUrl\n }\n }\n"])));
3648
+ var showcaseContentsQuery = gql__default["default"](templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n query ($rootId: Int!, $path: String) {\n contents(rootId: $rootId, deep: 4, path: $path) {\n name\n title\n metaDescription\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n }\n }\n }\n }\n }\n }\n"], ["\n query ($rootId: Int!, $path: String) {\n contents(rootId: $rootId, deep: 4, path: $path) {\n name\n title\n metaDescription\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n children {\n name\n data\n priority\n online\n modelId\n }\n }\n }\n }\n }\n }\n"])));
3649
+ var showcaseTemplatesQuery = gql__default["default"](templateObject_2$5 || (templateObject_2$5 = __makeTemplateObject(["\n query {\n showcasetemplates {\n category\n id\n image\n name\n sourceCompanyId\n exampleUrl\n }\n }\n"], ["\n query {\n showcasetemplates {\n category\n id\n image\n name\n sourceCompanyId\n exampleUrl\n }\n }\n"])));
6853
3650
  var showcaseTemplatesQueryOptions = {
6854
3651
  options: function () {
6855
3652
  return {
@@ -6869,7 +3666,7 @@
6869
3666
  };
6870
3667
  }
6871
3668
  };
6872
- var showcasePagesQuery = gql$1(templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n query ($companyId: Int!, $parentId: Int) {\n pages(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"], ["\n query ($companyId: Int!, $parentId: Int) {\n pages(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"])));
3669
+ var showcasePagesQuery = gql__default["default"](templateObject_3$5 || (templateObject_3$5 = __makeTemplateObject(["\n query ($companyId: Int!, $parentId: Int) {\n pages(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"], ["\n query ($companyId: Int!, $parentId: Int) {\n pages(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"])));
6873
3670
  var showcasePagesQueryOptions = {
6874
3671
  options: function (props) {
6875
3672
  return {
@@ -6894,8 +3691,8 @@
6894
3691
  };
6895
3692
  }
6896
3693
  };
6897
- var showcaseSectionQuery = gql$1(templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n query ($companyId: Int!, $parentId: Int!) {\n pageResoruces(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"], ["\n query ($companyId: Int!, $parentId: Int!) {\n pageResoruces(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"])));
6898
- var showcaseSectionQueryOptions = {
3694
+ var showcaseSectionsQuery = gql__default["default"](templateObject_4$5 || (templateObject_4$5 = __makeTemplateObject(["\n query ($companyId: Int!, $parentId: Int!) {\n pageResoruces(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"], ["\n query ($companyId: Int!, $parentId: Int!) {\n pageResoruces(companyId: $companyId, parentId: $parentId) {\n id\n name\n priority\n parentId\n createDate\n modelId\n online\n path\n }\n }\n"])));
3695
+ var showcaseSectionsQueryOptions = {
6899
3696
  options: function (props) {
6900
3697
  return {
6901
3698
  client: dqueryClient,
@@ -6919,7 +3716,8 @@
6919
3716
  };
6920
3717
  }
6921
3718
  };
6922
- var showcaseDomainsQuery = gql$1(templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n query ($companyId: Int!) {\n domains(companyId: $companyId) {\n id\n domainAliases\n }\n }\n"], ["\n query ($companyId: Int!) {\n domains(companyId: $companyId) {\n id\n domainAliases\n }\n }\n"])));
3719
+ var showcaseSectionQuery = gql__default["default"](templateObject_5$5 || (templateObject_5$5 = __makeTemplateObject(["\n query ($companyId: Int!, $id: Int!) {\n pageResoruce(companyId: $companyId, id: $id) {\n id\n name\n priority\n createDate\n modelId\n online\n path\n data\n contentType\n }\n }\n"], ["\n query ($companyId: Int!, $id: Int!) {\n pageResoruce(companyId: $companyId, id: $id) {\n id\n name\n priority\n createDate\n modelId\n online\n path\n data\n contentType\n }\n }\n"])));
3720
+ var showcaseDomainsQuery = gql__default["default"](templateObject_6$4 || (templateObject_6$4 = __makeTemplateObject(["\n query ($companyId: Int!) {\n domains(companyId: $companyId) {\n id\n domainAliases\n }\n }\n"], ["\n query ($companyId: Int!) {\n domains(companyId: $companyId) {\n id\n domainAliases\n }\n }\n"])));
6923
3721
  var showcaseDomainsQueryOptions = {
6924
3722
  options: function () {
6925
3723
  return {
@@ -6952,7 +3750,7 @@
6952
3750
  }
6953
3751
  });
6954
3752
  };
6955
- var showcaseConfig = gql$1(templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n query($domain: String!) {\n configuration(type: \"showcase\", domain: $domain)\n }\n"], ["\n query($domain: String!) {\n configuration(type: \"showcase\", domain: $domain)\n }\n"])));
3753
+ var showcaseConfig = gql__default["default"](templateObject_7$2 || (templateObject_7$2 = __makeTemplateObject(["\n query($domain: String!) {\n configuration(type: \"showcase\", domain: $domain)\n }\n"], ["\n query($domain: String!) {\n configuration(type: \"showcase\", domain: $domain)\n }\n"])));
6956
3754
  var useShowcaseConfig = function useShowcaseConfig(domain) {
6957
3755
  return client.useQuery(showcaseConfig, {
6958
3756
  fetchPolicy: 'cache-first',
@@ -6962,12 +3760,9 @@
6962
3760
  }
6963
3761
  });
6964
3762
  };
6965
- var templateObject_1$6, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$5, templateObject_6$3;
3763
+ var templateObject_1$5, templateObject_2$5, templateObject_3$5, templateObject_4$5, templateObject_5$5, templateObject_6$4, templateObject_7$2;
6966
3764
 
6967
- var usageQuery = gql$1(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n query($body: JSON!) {\n registerUsage(body: $body)\n @rest(type: \"RegisterUsage\", path: \"/PaymentsManager/recordShowcaseVisit\", method: \"POST\", bodyKey: \"body\"){\n result\n }\n }\n"], ["\n query($body: JSON!) {\n registerUsage(body: $body)\n @rest(type: \"RegisterUsage\", path: \"/PaymentsManager/recordShowcaseVisit\", method: \"POST\", bodyKey: \"body\"){\n result\n }\n }\n"])));
6968
- var templateObject_1$5;
6969
-
6970
- var login = gql$1(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n login(body: $body)\n @rest(\n type: \"LoginType\"\n path: \"/token\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n access_token\n username\n userId\n }\n }\n"], ["\n mutation ($body: JSON!) {\n login(body: $body)\n @rest(\n type: \"LoginType\"\n path: \"/token\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n access_token\n username\n userId\n }\n }\n"])));
3765
+ var login = gql__default["default"](templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n login(body: $body)\n @rest(\n type: \"LoginType\"\n path: \"/token\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n access_token\n username\n userId\n }\n }\n"], ["\n mutation ($body: JSON!) {\n login(body: $body)\n @rest(\n type: \"LoginType\"\n path: \"/token\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n access_token\n username\n userId\n }\n }\n"])));
6971
3766
  var loginOptions = {
6972
3767
  options: {
6973
3768
  client: tokenClient
@@ -6998,15 +3793,6 @@
6998
3793
  return [4 /*yield*/, mutate(payload)];
6999
3794
  case 1:
7000
3795
  result = _a.sent();
7001
- auth.clearAllAppStorage();
7002
- // @ts-expect-error will be fixed later
7003
- auth.setToken(result.data.login.access_token);
7004
- auth.setUserInfo({
7005
- // @ts-expect-error will be fixed later
7006
- username: result.data.login.username,
7007
- // @ts-expect-error will be fixed later
7008
- id: result.data.login.userId
7009
- });
7010
3796
  // @ts-expect-error will be fixed later
7011
3797
  return [2 /*return*/, Promise.resolve(result.data.login)];
7012
3798
  case 2:
@@ -7022,7 +3808,7 @@
7022
3808
  }
7023
3809
  };
7024
3810
 
7025
- var register = gql$1(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n register(body: $body)\n @rest(\n type: \"RegisterType\"\n path: \"/Membership/bcRegister\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n register(body: $body)\n @rest(\n type: \"RegisterType\"\n path: \"/Membership/bcRegister\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
3811
+ var register = gql__default["default"](templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n register(body: $body)\n @rest(\n type: \"RegisterType\"\n path: \"/Membership/bcRegister\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n register(body: $body)\n @rest(\n type: \"RegisterType\"\n path: \"/Membership/bcRegister\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7026
3812
  var registerOptions = {
7027
3813
  options: {
7028
3814
  client: dconfigClient
@@ -7069,7 +3855,7 @@
7069
3855
  }
7070
3856
  };
7071
3857
 
7072
- var forgetPassword = gql$1(templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n forgetPassword(body: $body)\n @rest(\n type: \"ForgetPasswordType\"\n path: \"/Membership/bcForgetPassword\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n forgetPassword(body: $body)\n @rest(\n type: \"ForgetPasswordType\"\n path: \"/Membership/bcForgetPassword\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
3858
+ var forgetPassword = gql__default["default"](templateObject_3$4 || (templateObject_3$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n forgetPassword(body: $body)\n @rest(\n type: \"ForgetPasswordType\"\n path: \"/Membership/bcForgetPassword\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n forgetPassword(body: $body)\n @rest(\n type: \"ForgetPasswordType\"\n path: \"/Membership/bcForgetPassword\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7073
3859
  var forgetPasswordOptions = {
7074
3860
  options: {
7075
3861
  client: dconfigClient
@@ -7111,7 +3897,7 @@
7111
3897
  }
7112
3898
  };
7113
3899
 
7114
- var resetPassword = gql$1(templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n resetPassword(body: $body)\n @rest(\n type: \"ResetPasswordType\"\n path: \"/Membership/resetPasswordThroughEmail\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n resetPassword(body: $body)\n @rest(\n type: \"ResetPasswordType\"\n path: \"/Membership/resetPasswordThroughEmail\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
3900
+ var resetPassword = gql__default["default"](templateObject_4$4 || (templateObject_4$4 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n resetPassword(body: $body)\n @rest(\n type: \"ResetPasswordType\"\n path: \"/Membership/resetPasswordThroughEmail\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n resetPassword(body: $body)\n @rest(\n type: \"ResetPasswordType\"\n path: \"/Membership/resetPasswordThroughEmail\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7115
3901
  var resetPasswordOptions = {
7116
3902
  options: {
7117
3903
  client: dconfigClient
@@ -7155,7 +3941,7 @@
7155
3941
  }
7156
3942
  };
7157
3943
 
7158
- var userInfoQuery = gql$1(templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n query {\n currentUser\n @rest(type: \"User\", path: \"/Membership/getUser\", method: \"GET\") {\n Id\n Email\n PhoneNumber\n AccessFailedCount\n UserName\n }\n }\n"], ["\n query {\n currentUser\n @rest(type: \"User\", path: \"/Membership/getUser\", method: \"GET\") {\n Id\n Email\n PhoneNumber\n AccessFailedCount\n UserName\n }\n }\n"])));
3944
+ var userInfoQuery = gql__default["default"](templateObject_5$4 || (templateObject_5$4 = __makeTemplateObject(["\n query {\n currentUser\n @rest(type: \"User\", path: \"/Membership/getUser\", method: \"GET\") {\n Id\n Email\n PhoneNumber\n AccessFailedCount\n UserName\n }\n }\n"], ["\n query {\n currentUser\n @rest(type: \"User\", path: \"/Membership/getUser\", method: \"GET\") {\n Id\n Email\n PhoneNumber\n AccessFailedCount\n UserName\n }\n }\n"])));
7159
3945
  var userInfoQueryOptions = {
7160
3946
  options: function () {
7161
3947
  return {
@@ -7176,7 +3962,7 @@
7176
3962
  };
7177
3963
  }
7178
3964
  };
7179
- var updateUserProfile = gql$1(templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateProfile(body: $body)\n @rest(\n type: \"UpdateUserType\"\n path: \"/Membership/UpdateUsersFieldsValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n id\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateProfile(body: $body)\n @rest(\n type: \"UpdateUserType\"\n path: \"/Membership/UpdateUsersFieldsValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n id\n }\n }\n"])));
3965
+ var updateUserProfile = gql__default["default"](templateObject_6$3 || (templateObject_6$3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateProfile(body: $body)\n @rest(\n type: \"UpdateUserType\"\n path: \"/Membership/UpdateUsersFieldsValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n id\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateProfile(body: $body)\n @rest(\n type: \"UpdateUserType\"\n path: \"/Membership/UpdateUsersFieldsValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n id\n }\n }\n"])));
7180
3966
  var updateUserProfileOptions = {
7181
3967
  options: {
7182
3968
  client: dconfigClient
@@ -7217,7 +4003,7 @@
7217
4003
  }
7218
4004
  };
7219
4005
 
7220
- var updateUserPassword = gql$1(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateUserPassword(body: $body)\n @rest(\n type: \"UpdateUserPasswordType\"\n path: \"/Membership/ResetPassword\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateUserPassword(body: $body)\n @rest(\n type: \"UpdateUserPasswordType\"\n path: \"/Membership/ResetPassword\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4006
+ var updateUserPassword = gql__default["default"](templateObject_7$1 || (templateObject_7$1 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateUserPassword(body: $body)\n @rest(\n type: \"UpdateUserPasswordType\"\n path: \"/Membership/ResetPassword\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateUserPassword(body: $body)\n @rest(\n type: \"UpdateUserPasswordType\"\n path: \"/Membership/ResetPassword\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7221
4007
  var updateUserPasswordOptions = {
7222
4008
  options: {
7223
4009
  client: dconfigClient
@@ -7259,7 +4045,7 @@
7259
4045
  }
7260
4046
  };
7261
4047
 
7262
- var inviteUser = gql$1(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n inviteUser(body: $body)\n @rest(\n type: \"InviteUserType\"\n path: \"/Membership/bcInvite\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n inviteUser(body: $body)\n @rest(\n type: \"InviteUserType\"\n path: \"/Membership/bcInvite\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4048
+ var inviteUser = gql__default["default"](templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n inviteUser(body: $body)\n @rest(\n type: \"InviteUserType\"\n path: \"/Membership/bcInvite\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n inviteUser(body: $body)\n @rest(\n type: \"InviteUserType\"\n path: \"/Membership/bcInvite\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7263
4049
  var inviteUserOptions = {
7264
4050
  options: {
7265
4051
  client: dconfigClient
@@ -7301,7 +4087,7 @@
7301
4087
  }
7302
4088
  };
7303
4089
 
7304
- var removeUserFromCompany = gql$1(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n mutation ($companyId: String!, $userId: String!) {\n removeUserFromCompany(companyId: $companyId, userId: $userId)\n @rest(\n type: \"DeleteCompanyUsersType\"\n path: \"/Membership/deleteCompanyUsers?Id={args.companyId}&UserId={args.userId}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($companyId: String!, $userId: String!) {\n removeUserFromCompany(companyId: $companyId, userId: $userId)\n @rest(\n type: \"DeleteCompanyUsersType\"\n path: \"/Membership/deleteCompanyUsers?Id={args.companyId}&UserId={args.userId}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
4090
+ var removeUserFromCompany = gql__default["default"](templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n mutation ($companyId: String!, $userId: String!) {\n removeUserFromCompany(companyId: $companyId, userId: $userId)\n @rest(\n type: \"DeleteCompanyUsersType\"\n path: \"/Membership/deleteCompanyUsers?Id={args.companyId}&UserId={args.userId}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($companyId: String!, $userId: String!) {\n removeUserFromCompany(companyId: $companyId, userId: $userId)\n @rest(\n type: \"DeleteCompanyUsersType\"\n path: \"/Membership/deleteCompanyUsers?Id={args.companyId}&UserId={args.userId}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
7305
4091
  var removeUserFromCompanyOptions = {
7306
4092
  options: {
7307
4093
  client: dconfigClient
@@ -7340,9 +4126,9 @@
7340
4126
  }
7341
4127
  };
7342
4128
 
7343
- var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4$4, templateObject_5$4, templateObject_6$2, templateObject_7, templateObject_8, templateObject_9;
4129
+ var templateObject_1$4, templateObject_2$4, templateObject_3$4, templateObject_4$4, templateObject_5$4, templateObject_6$3, templateObject_7$1, templateObject_8, templateObject_9;
7344
4130
 
7345
- var userCompaniesQuery = gql$1(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n query {\n userCompanies\n @rest(\n type: \"Company\"\n path: \"/Membership/getUserCompanies\"\n method: \"GET\"\n ) {\n Id\n Name\n AccountId\n CreateDate\n }\n }\n"], ["\n query {\n userCompanies\n @rest(\n type: \"Company\"\n path: \"/Membership/getUserCompanies\"\n method: \"GET\"\n ) {\n Id\n Name\n AccountId\n CreateDate\n }\n }\n"])));
4131
+ var userCompaniesQuery = gql__default["default"](templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n query {\n userCompanies\n @rest(\n type: \"Company\"\n path: \"/Membership/getUserCompanies\"\n method: \"GET\"\n ) {\n Id\n Name\n AccountId\n CreateDate\n SubscriptionType\n }\n }\n"], ["\n query {\n userCompanies\n @rest(\n type: \"Company\"\n path: \"/Membership/getUserCompanies\"\n method: \"GET\"\n ) {\n Id\n Name\n AccountId\n CreateDate\n SubscriptionType\n }\n }\n"])));
7346
4132
  var userCompaniesQueryOptions = {
7347
4133
  options: function () {
7348
4134
  return {
@@ -7368,8 +4154,8 @@
7368
4154
  client: dconfigClient
7369
4155
  });
7370
4156
  };
7371
- var companyUsersQuery = gql$1(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query ($CompanyId: String!) {\n companyUsers(CompanyId: $CompanyId)\n @rest(\n type: \"Company\"\n path: \"/Membership/getCompanyUsers?{args}\"\n method: \"GET\"\n ) {\n Id\n UserName\n Email\n IsEnabled\n }\n }\n"], ["\n query ($CompanyId: String!) {\n companyUsers(CompanyId: $CompanyId)\n @rest(\n type: \"Company\"\n path: \"/Membership/getCompanyUsers?{args}\"\n method: \"GET\"\n ) {\n Id\n UserName\n Email\n IsEnabled\n }\n }\n"])));
7372
- var subscriptionConfigurationQuery = gql$1(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n query {\n subscriptionConfiguration(Key: \"SubscriptionConfig\")\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"], ["\n query {\n subscriptionConfiguration(Key: \"SubscriptionConfig\")\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"])));
4157
+ var companyUsersQuery = gql__default["default"](templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n query ($CompanyId: String!) {\n companyUsers(CompanyId: $CompanyId)\n @rest(\n type: \"Company\"\n path: \"/Membership/getCompanyUsers?{args}\"\n method: \"GET\"\n ) {\n Id\n UserName\n Email\n IsEnabled\n }\n }\n"], ["\n query ($CompanyId: String!) {\n companyUsers(CompanyId: $CompanyId)\n @rest(\n type: \"Company\"\n path: \"/Membership/getCompanyUsers?{args}\"\n method: \"GET\"\n ) {\n Id\n UserName\n Email\n IsEnabled\n }\n }\n"])));
4158
+ var subscriptionConfigurationQuery = gql__default["default"](templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n query {\n subscriptionConfiguration(Key: \"SubscriptionConfig\")\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"], ["\n query {\n subscriptionConfiguration(Key: \"SubscriptionConfig\")\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"])));
7373
4159
  var subscriptionConfigurationQueryOptions = {
7374
4160
  options: function () {
7375
4161
  return {
@@ -7389,7 +4175,7 @@
7389
4175
  };
7390
4176
  }
7391
4177
  };
7392
- var createCompany = gql$1(templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createCompany(body: $body)\n @rest(\n type: \"CreateCompanyType\"\n path: \"/Membership/createCompany\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n obj\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createCompany(body: $body)\n @rest(\n type: \"CreateCompanyType\"\n path: \"/Membership/createCompany\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n obj\n message\n }\n }\n"])));
4178
+ var createCompany = gql__default["default"](templateObject_4$3 || (templateObject_4$3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createCompany(body: $body)\n @rest(\n type: \"CreateCompanyType\"\n path: \"/Membership/createCompany\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n obj\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createCompany(body: $body)\n @rest(\n type: \"CreateCompanyType\"\n path: \"/Membership/createCompany\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n obj\n message\n }\n }\n"])));
7393
4179
  var createCompanyOptions = {
7394
4180
  options: {
7395
4181
  client: dconfigClient
@@ -7410,7 +4196,7 @@
7410
4196
  body: {
7411
4197
  Name: Name,
7412
4198
  OwnerId: auth.getUserInfo()['id'],
7413
- SubscriptionType: 'Showcase'
4199
+ SubscriptionType: 'Showcase-free'
7414
4200
  }
7415
4201
  }
7416
4202
  };
@@ -7434,7 +4220,7 @@
7434
4220
  }
7435
4221
  };
7436
4222
 
7437
- var updateCompany = gql$1(templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateCompany(body: $body)\n @rest(\n type: \"UpdateCompanyType\"\n path: \"/Membership/updateCompany\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateCompany(body: $body)\n @rest(\n type: \"UpdateCompanyType\"\n path: \"/Membership/updateCompany\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4223
+ var updateCompany = gql__default["default"](templateObject_5$3 || (templateObject_5$3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateCompany(body: $body)\n @rest(\n type: \"UpdateCompanyType\"\n path: \"/Membership/updateCompany\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateCompany(body: $body)\n @rest(\n type: \"UpdateCompanyType\"\n path: \"/Membership/updateCompany\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7438
4224
  var updateCompanyOptions = {
7439
4225
  options: {
7440
4226
  client: dconfigClient
@@ -7478,10 +4264,10 @@
7478
4264
 
7479
4265
  var templateObject_1$3, templateObject_2$3, templateObject_3$3, templateObject_4$3, templateObject_5$3;
7480
4266
 
7481
- var CreateCheckoutSessionUri = appConfig.billing.networkInterface + "/create-checkout-session";
7482
- var CreatePortalSessionUri = appConfig.billing.networkInterface + "/create-portal-session";
4267
+ var CreateCheckoutSessionUri = "".concat(appConfig.billing.networkInterface, "/create-checkout-session");
4268
+ var CreatePortalSessionUri = "".concat(appConfig.billing.networkInterface, "/create-portal-session");
7483
4269
 
7484
- var contentInstancesQuery = gql$1(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query contentInstances($contentId: Int!) {\n contentInstances(contentId: $contentId)\n @rest(\n type: \"ContentInstance\"\n path: \"/DConfig/WebsiteContentAPI/GetContentInstances/{args.contentId}\"\n method: \"GET\"\n ) {\n Id\n Name\n MetaDescription\n MetaKeywords\n Title\n ViewTemplateId\n Online\n ContentId\n Language\n Version\n CreateDate\n FieldsValues\n RedirectUrl\n DownloadPath\n DownloadName\n CreatorId\n StageId\n Stage\n Comments\n ContextCompanyId\n Data\n DataDic\n }\n }\n"], ["\n query contentInstances($contentId: Int!) {\n contentInstances(contentId: $contentId)\n @rest(\n type: \"ContentInstance\"\n path: \"/DConfig/WebsiteContentAPI/GetContentInstances/{args.contentId}\"\n method: \"GET\"\n ) {\n Id\n Name\n MetaDescription\n MetaKeywords\n Title\n ViewTemplateId\n Online\n ContentId\n Language\n Version\n CreateDate\n FieldsValues\n RedirectUrl\n DownloadPath\n DownloadName\n CreatorId\n StageId\n Stage\n Comments\n ContextCompanyId\n Data\n DataDic\n }\n }\n"])));
4270
+ var contentInstancesQuery = gql__default["default"](templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n query contentInstances($contentId: Int!) {\n contentInstances(contentId: $contentId)\n @rest(\n type: \"ContentInstance\"\n path: \"/DConfig/WebsiteContentAPI/GetContentInstances/{args.contentId}\"\n method: \"GET\"\n ) {\n Id\n Name\n MetaDescription\n MetaKeywords\n Title\n ViewTemplateId\n Online\n ContentId\n Language\n Version\n CreateDate\n FieldsValues\n RedirectUrl\n DownloadPath\n DownloadName\n CreatorId\n StageId\n Stage\n Comments\n ContextCompanyId\n Data\n DataDic\n }\n }\n"], ["\n query contentInstances($contentId: Int!) {\n contentInstances(contentId: $contentId)\n @rest(\n type: \"ContentInstance\"\n path: \"/DConfig/WebsiteContentAPI/GetContentInstances/{args.contentId}\"\n method: \"GET\"\n ) {\n Id\n Name\n MetaDescription\n MetaKeywords\n Title\n ViewTemplateId\n Online\n ContentId\n Language\n Version\n CreateDate\n FieldsValues\n RedirectUrl\n DownloadPath\n DownloadName\n CreatorId\n StageId\n Stage\n Comments\n ContextCompanyId\n Data\n DataDic\n }\n }\n"])));
7485
4271
  var useContentInstancesQuery = function useContentInstancesQuery(contentId) {
7486
4272
  return client.useQuery(contentInstancesQuery, {
7487
4273
  fetchPolicy: 'no-cache',
@@ -7491,7 +4277,7 @@
7491
4277
  }
7492
4278
  });
7493
4279
  };
7494
- var updateContentInstanceFieldValuesMutation = gql$1(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateContentInstanceFieldValues(body: $body)\n @rest(\n type: \"UpdateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/UpdateContentInstanceFieldValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateContentInstanceFieldValues(body: $body)\n @rest(\n type: \"UpdateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/UpdateContentInstanceFieldValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4280
+ var updateContentInstanceFieldValuesMutation = gql__default["default"](templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateContentInstanceFieldValues(body: $body)\n @rest(\n type: \"UpdateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/UpdateContentInstanceFieldValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateContentInstanceFieldValues(body: $body)\n @rest(\n type: \"UpdateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/UpdateContentInstanceFieldValues\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7495
4281
  var updateContentInstanceFieldValuesMutationOptions = {
7496
4282
  options: {
7497
4283
  client: dconfigClient
@@ -7537,7 +4323,7 @@
7537
4323
  client: dconfigClient
7538
4324
  });
7539
4325
  };
7540
- var createContentMutation = gql$1(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContent\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContent\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"])));
4326
+ var createContentMutation = gql__default["default"](templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContent\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContent\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"])));
7541
4327
  var createContentMutationOptions = {
7542
4328
  options: {
7543
4329
  client: dconfigClient
@@ -7593,7 +4379,7 @@
7593
4379
  client: dconfigClient
7594
4380
  });
7595
4381
  };
7596
- var createContentInstanceMutation = gql$1(templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContentInstance\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContentInstance\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"])));
4382
+ var createContentInstanceMutation = gql__default["default"](templateObject_4$2 || (templateObject_4$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContentInstance\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createContent(body: $body)\n @rest(\n type: \"CreateContentInstanceType\"\n path: \"/DConfig/WebsiteContentAPI/CreateContentInstance\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n obj {\n Id\n }\n }\n }\n"])));
7597
4383
  var createContentInstanceMutationOptions = {
7598
4384
  options: {
7599
4385
  client: dconfigClient
@@ -7653,13 +4439,13 @@
7653
4439
  client: dconfigClient
7654
4440
  });
7655
4441
  };
7656
- var removeContentMutation = gql$1(templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n mutation ($Id: Int!, $Name: String!) {\n deleteContent(Id: $Id, Name: $Name)\n @rest(\n type: \"DeleteContentType\"\n path: \"/DConfig/WebsiteContentAPI/DeleteContent?{args}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($Id: Int!, $Name: String!) {\n deleteContent(Id: $Id, Name: $Name)\n @rest(\n type: \"DeleteContentType\"\n path: \"/DConfig/WebsiteContentAPI/DeleteContent?{args}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
4442
+ var removeContentMutation = gql__default["default"](templateObject_5$2 || (templateObject_5$2 = __makeTemplateObject(["\n mutation ($Id: Int!, $Name: String!) {\n deleteContent(Id: $Id, Name: $Name)\n @rest(\n type: \"DeleteContentType\"\n path: \"/DConfig/WebsiteContentAPI/DeleteContent?{args}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($Id: Int!, $Name: String!) {\n deleteContent(Id: $Id, Name: $Name)\n @rest(\n type: \"DeleteContentType\"\n path: \"/DConfig/WebsiteContentAPI/DeleteContent?{args}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
7657
4443
  var useDeleteContentMutation = function useDeleteContentMutation() {
7658
4444
  return client.useMutation(removeContentMutation, {
7659
4445
  client: dconfigClient
7660
4446
  });
7661
4447
  };
7662
- var updateContentsOrderingMutation = gql$1(templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateContentsOrdering(body: $body)\n @rest(\n type: \"UpdateContentOrderingType\"\n path: \"/DConfig/WebsiteContentAPI/updateContentsOrdering\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateContentsOrdering(body: $body)\n @rest(\n type: \"UpdateContentOrderingType\"\n path: \"/DConfig/WebsiteContentAPI/updateContentsOrdering\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4448
+ var updateContentsOrderingMutation = gql__default["default"](templateObject_6$2 || (templateObject_6$2 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n updateContentsOrdering(body: $body)\n @rest(\n type: \"UpdateContentOrderingType\"\n path: \"/DConfig/WebsiteContentAPI/updateContentsOrdering\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n updateContentsOrdering(body: $body)\n @rest(\n type: \"UpdateContentOrderingType\"\n path: \"/DConfig/WebsiteContentAPI/updateContentsOrdering\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7663
4449
  var updateContentsOrderingMutationOptions = {
7664
4450
  options: {
7665
4451
  client: dconfigClient
@@ -7704,9 +4490,9 @@
7704
4490
  client: dconfigClient
7705
4491
  });
7706
4492
  };
7707
- var templateObject_1$2, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$1;
4493
+ var templateObject_1$2, templateObject_2$2, templateObject_3$2, templateObject_4$2, templateObject_5$2, templateObject_6$2;
7708
4494
 
7709
- var showcaseConfigurationQuery = gql$1(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n query($ContextId: Int){\n showcaseConfiguration(Key: \"ShowcaseConfig\", ContextId: $ContextId)\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"], ["\n query($ContextId: Int){\n showcaseConfiguration(Key: \"ShowcaseConfig\", ContextId: $ContextId)\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"])));
4495
+ var showcaseConfigurationQuery = gql__default["default"](templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n query ($ContextId: Int) {\n showcaseConfiguration(Key: \"ShowcaseConfig\", ContextId: $ContextId)\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"], ["\n query ($ContextId: Int) {\n showcaseConfiguration(Key: \"ShowcaseConfig\", ContextId: $ContextId)\n @rest(\n type: \"ShowcaseConfig\"\n path: \"/DConfig/SettingsAPI/getCustomSettings?{args}\"\n method: \"GET\"\n )\n }\n"])));
7710
4496
  var useShowcaseConfigurationQuery = function useShowcaseConfigurationQuery() {
7711
4497
  return client.useQuery(showcaseConfigurationQuery, {
7712
4498
  fetchPolicy: 'cache-first',
@@ -7745,7 +4531,7 @@
7745
4531
  }
7746
4532
  }
7747
4533
  };
7748
- var addDomain = gql$1(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n mutation ($rootContent: String!, $body: JSON!) {\n addDomain(rootContent: $rootContent, body: $body)\n @rest(\n type: \"AddDomainType\"\n path: \"/DConfig/WebsiteContentAPI/addDomainToContent/{args.rootContent}\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($rootContent: String!, $body: JSON!) {\n addDomain(rootContent: $rootContent, body: $body)\n @rest(\n type: \"AddDomainType\"\n path: \"/DConfig/WebsiteContentAPI/addDomainToContent/{args.rootContent}\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4534
+ var addDomain = gql__default["default"](templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n mutation ($rootContent: String!, $body: JSON!) {\n addDomain(rootContent: $rootContent, body: $body)\n @rest(\n type: \"AddDomainType\"\n path: \"/DConfig/WebsiteContentAPI/addDomainToContent/{args.rootContent}\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($rootContent: String!, $body: JSON!) {\n addDomain(rootContent: $rootContent, body: $body)\n @rest(\n type: \"AddDomainType\"\n path: \"/DConfig/WebsiteContentAPI/addDomainToContent/{args.rootContent}\"\n method: \"PUT\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7749
4535
  var addDomainOptions = {
7750
4536
  options: {
7751
4537
  client: dconfigClient
@@ -7787,7 +4573,7 @@
7787
4573
  }
7788
4574
  };
7789
4575
 
7790
- var removeDomain = gql$1(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation ($rootContent: String!, $Domain: String!) {\n removeDomain(rootContent: $rootContent, Domain: $Domain)\n @rest(\n type: \"RemoveDomainType\"\n path: \"/DConfig/WebsiteContentAPI/removeDomainFromContent/{args.rootContent}?Domain={args.Domain}\"\n method: \"DELETE\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($rootContent: String!, $Domain: String!) {\n removeDomain(rootContent: $rootContent, Domain: $Domain)\n @rest(\n type: \"RemoveDomainType\"\n path: \"/DConfig/WebsiteContentAPI/removeDomainFromContent/{args.rootContent}?Domain={args.Domain}\"\n method: \"DELETE\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4576
+ var removeDomain = gql__default["default"](templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n mutation ($rootContent: String!, $Domain: String!) {\n removeDomain(rootContent: $rootContent, Domain: $Domain)\n @rest(\n type: \"RemoveDomainType\"\n path: \"/DConfig/WebsiteContentAPI/removeDomainFromContent/{args.rootContent}?Domain={args.Domain}\"\n method: \"DELETE\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($rootContent: String!, $Domain: String!) {\n removeDomain(rootContent: $rootContent, Domain: $Domain)\n @rest(\n type: \"RemoveDomainType\"\n path: \"/DConfig/WebsiteContentAPI/removeDomainFromContent/{args.rootContent}?Domain={args.Domain}\"\n method: \"DELETE\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7791
4577
  var removeDomainOptions = {
7792
4578
  options: {
7793
4579
  client: dconfigClient
@@ -7827,7 +4613,7 @@
7827
4613
  }
7828
4614
  };
7829
4615
 
7830
- var useShowcaseTemplate = gql$1(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n mutation ($templateId: Int!, $companyId: Int!, $parentContentId: Int, $path: String) {\n useShowcaseTemplate(templateId: $templateId, companyId: $companyId, parentContentId: $parentContentId, path: $path)\n @rest(\n type: \"UseShowcaseTemplateType\"\n path: \"/DConfig/DConfigModule/duplicateShowcaseInstance?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}&DestinationContentId={args.parentContentId}&path={args.path}\"\n method: \"GET\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($templateId: Int!, $companyId: Int!, $parentContentId: Int, $path: String) {\n useShowcaseTemplate(templateId: $templateId, companyId: $companyId, parentContentId: $parentContentId, path: $path)\n @rest(\n type: \"UseShowcaseTemplateType\"\n path: \"/DConfig/DConfigModule/duplicateShowcaseInstance?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}&DestinationContentId={args.parentContentId}&path={args.path}\"\n method: \"GET\"\n ) {\n result\n message\n }\n }\n"])));
4616
+ var useShowcaseTemplate = gql__default["default"](templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n mutation (\n $templateId: Int!\n $companyId: Int!\n $parentContentId: Int\n $path: String\n ) {\n useShowcaseTemplate(\n templateId: $templateId\n companyId: $companyId\n parentContentId: $parentContentId\n path: $path\n )\n @rest(\n type: \"UseShowcaseTemplateType\"\n path: \"/DConfig/DConfigModule/duplicateShowcaseInstance?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}&DestinationContentId={args.parentContentId}&path={args.path}\"\n method: \"GET\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation (\n $templateId: Int!\n $companyId: Int!\n $parentContentId: Int\n $path: String\n ) {\n useShowcaseTemplate(\n templateId: $templateId\n companyId: $companyId\n parentContentId: $parentContentId\n path: $path\n )\n @rest(\n type: \"UseShowcaseTemplateType\"\n path: \"/DConfig/DConfigModule/duplicateShowcaseInstance?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}&DestinationContentId={args.parentContentId}&path={args.path}\"\n method: \"GET\"\n ) {\n result\n message\n }\n }\n"])));
7831
4617
  var useShowcaseTemplateOptions = {
7832
4618
  options: {
7833
4619
  client: dconfigClient
@@ -7869,7 +4655,7 @@
7869
4655
  }
7870
4656
  };
7871
4657
 
7872
- var useShowcaseTemplateProgress = gql$1(templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n query($templateId: Int!, $companyId: Int!) {\n useShowcaseTemplateProgress(templateId: $templateId, companyId: $companyId)\n @rest(\n type: \"UseShowcaseTemplateProgressType\"\n path: \"/DConfig/DConfigModule/getShowcaseInstanceProgress?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}\"\n method: \"GET\"\n ) {\n result\n obj\n }\n }\n"], ["\n query($templateId: Int!, $companyId: Int!) {\n useShowcaseTemplateProgress(templateId: $templateId, companyId: $companyId)\n @rest(\n type: \"UseShowcaseTemplateProgressType\"\n path: \"/DConfig/DConfigModule/getShowcaseInstanceProgress?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}\"\n method: \"GET\"\n ) {\n result\n obj\n }\n }\n"])));
4658
+ var useShowcaseTemplateProgress = gql__default["default"](templateObject_5$1 || (templateObject_5$1 = __makeTemplateObject(["\n query ($templateId: Int!, $companyId: Int!) {\n useShowcaseTemplateProgress(templateId: $templateId, companyId: $companyId)\n @rest(\n type: \"UseShowcaseTemplateProgressType\"\n path: \"/DConfig/DConfigModule/getShowcaseInstanceProgress?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}\"\n method: \"GET\"\n ) {\n result\n obj\n }\n }\n"], ["\n query ($templateId: Int!, $companyId: Int!) {\n useShowcaseTemplateProgress(templateId: $templateId, companyId: $companyId)\n @rest(\n type: \"UseShowcaseTemplateProgressType\"\n path: \"/DConfig/DConfigModule/getShowcaseInstanceProgress?SourceCompanyContext={args.templateId}&DestinationCompanyContext={args.companyId}\"\n method: \"GET\"\n ) {\n result\n obj\n }\n }\n"])));
7873
4659
  var useShowcaseTemplateProgressQuery = function useShowcaseTemplateProgressQuery(templateId) {
7874
4660
  return client.useLazyQuery(useShowcaseTemplateProgress, {
7875
4661
  fetchPolicy: 'no-cache',
@@ -7880,9 +4666,28 @@
7880
4666
  }
7881
4667
  });
7882
4668
  };
7883
- var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1;
4669
+ var registeUsage = gql__default["default"](templateObject_6$1 || (templateObject_6$1 = __makeTemplateObject(["\n query ($body: JSON!) {\n registerUsage(body: $body)\n @rest(\n type: \"RegisterUsage\"\n path: \"/DConfig/PaymentsManager/recordShowcaseVisit\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n }\n }\n"], ["\n query ($body: JSON!) {\n registerUsage(body: $body)\n @rest(\n type: \"RegisterUsage\"\n path: \"/DConfig/PaymentsManager/recordShowcaseVisit\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n }\n }\n"])));
4670
+ var useRegisterUsage = function useRegisterUsage(body) {
4671
+ return client.useMutation(registeUsage, {
4672
+ client: dconfigClient,
4673
+ variables: {
4674
+ body: body
4675
+ }
4676
+ });
4677
+ };
4678
+ var queryUsage = gql__default["default"](templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n query ($AccountId: String!) {\n queryUsage(AccountId: $AccountId)\n @rest(\n type: \"Usage\"\n path: \"/DConfig/PaymentsManager/getShowcaseVisit?AccountId={args.AccountId}\"\n method: \"GET\"\n ) {\n result\n object\n data {\n id\n object\n invoice\n livemode\n period {\n end\n start\n }\n subscription_item\n total_usage\n }\n has_more\n url\n }\n }\n"], ["\n query ($AccountId: String!) {\n queryUsage(AccountId: $AccountId)\n @rest(\n type: \"Usage\"\n path: \"/DConfig/PaymentsManager/getShowcaseVisit?AccountId={args.AccountId}\"\n method: \"GET\"\n ) {\n result\n object\n data {\n id\n object\n invoice\n livemode\n period {\n end\n start\n }\n subscription_item\n total_usage\n }\n has_more\n url\n }\n }\n"])));
4679
+ var useQueryUsage = function useQueryUsage(AccountId) {
4680
+ return client.useQuery(queryUsage, {
4681
+ fetchPolicy: 'no-cache',
4682
+ client: dconfigClient,
4683
+ variables: {
4684
+ AccountId: AccountId
4685
+ }
4686
+ });
4687
+ };
4688
+ var templateObject_1$1, templateObject_2$1, templateObject_3$1, templateObject_4$1, templateObject_5$1, templateObject_6$1, templateObject_7;
7884
4689
 
7885
- var foldersTreeQuery = gql$1(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query foldersTree($rootPath: String) {\n foldersTree(rootPath: $rootPath)\n @rest(\n type: \"FoldersTree\"\n path: \"/DConfig/IOServicesAPI/getFoldersTree?RootPath={args.rootPath}\"\n method: \"GET\"\n ) {\n id,\n text,\n state,\n children,\n obj {\n Path\n }\n }\n }\n"], ["\n query foldersTree($rootPath: String) {\n foldersTree(rootPath: $rootPath)\n @rest(\n type: \"FoldersTree\"\n path: \"/DConfig/IOServicesAPI/getFoldersTree?RootPath={args.rootPath}\"\n method: \"GET\"\n ) {\n id,\n text,\n state,\n children,\n obj {\n Path\n }\n }\n }\n"])));
4690
+ var foldersTreeQuery = gql__default["default"](templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query foldersTree($rootPath: String) {\n foldersTree(rootPath: $rootPath)\n @rest(\n type: \"FoldersTree\"\n path: \"/DConfig/IOServicesAPI/getFoldersTree?RootPath={args.rootPath}\"\n method: \"GET\"\n ) {\n id,\n text,\n state,\n children,\n obj {\n Path\n }\n }\n }\n"], ["\n query foldersTree($rootPath: String) {\n foldersTree(rootPath: $rootPath)\n @rest(\n type: \"FoldersTree\"\n path: \"/DConfig/IOServicesAPI/getFoldersTree?RootPath={args.rootPath}\"\n method: \"GET\"\n ) {\n id,\n text,\n state,\n children,\n obj {\n Path\n }\n }\n }\n"])));
7886
4691
  var useFoldersTreeQuery = function useFoldersTreeQuery(rootPath) {
7887
4692
  return client.useQuery(foldersTreeQuery, {
7888
4693
  fetchPolicy: 'no-cache',
@@ -7892,32 +4697,32 @@
7892
4697
  }
7893
4698
  });
7894
4699
  };
7895
- var filesQuery = gql$1(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query files($path: String) {\n files(path: $path)\n @rest(\n type: \"Files\"\n path: \"/DConfig/IOServicesAPI/getFiles?Path={args.path}\"\n method: \"GET\"\n ) {\n Name,\n Id,\n Path,\n Type,\n Length,\n CreationDate,\n LastModifiedDate,\n }\n }\n"], ["\n query files($path: String) {\n files(path: $path)\n @rest(\n type: \"Files\"\n path: \"/DConfig/IOServicesAPI/getFiles?Path={args.path}\"\n method: \"GET\"\n ) {\n Name,\n Id,\n Path,\n Type,\n Length,\n CreationDate,\n LastModifiedDate,\n }\n }\n"])));
4700
+ var filesQuery = gql__default["default"](templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n query files($path: String) {\n files(path: $path)\n @rest(\n type: \"Files\"\n path: \"/DConfig/IOServicesAPI/getFiles?Path={args.path}\"\n method: \"GET\"\n ) {\n Name,\n Id,\n Path,\n Type,\n Length,\n CreationDate,\n LastModifiedDate,\n }\n }\n"], ["\n query files($path: String) {\n files(path: $path)\n @rest(\n type: \"Files\"\n path: \"/DConfig/IOServicesAPI/getFiles?Path={args.path}\"\n method: \"GET\"\n ) {\n Name,\n Id,\n Path,\n Type,\n Length,\n CreationDate,\n LastModifiedDate,\n }\n }\n"])));
7896
4701
  var useFilesQuery = function useFilesQuery() {
7897
4702
  return client.useLazyQuery(filesQuery, {
7898
4703
  fetchPolicy: 'no-cache',
7899
4704
  client: dconfigClient
7900
4705
  });
7901
4706
  };
7902
- var createFolderMutation = gql$1(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createFolder(body: $body)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFolder\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createFolder(body: $body)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFolder\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
4707
+ var createFolderMutation = gql__default["default"](templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n mutation ($body: JSON!) {\n createFolder(body: $body)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFolder\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($body: JSON!) {\n createFolder(body: $body)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFolder\"\n method: \"POST\"\n bodyKey: \"body\"\n ) {\n result\n message\n }\n }\n"])));
7903
4708
  var useCreateFolderMutation = function useCreateFolderMutation() {
7904
4709
  return client.useMutation(createFolderMutation, {
7905
4710
  client: dconfigClient
7906
4711
  });
7907
4712
  };
7908
- var deleteFolderMutation = gql$1(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation ($path: String) {\n deleteFolder(path: $path)\n @rest(\n type: \"DeleteFolderType\"\n path: \"/DConfig/IOServicesAPI/deleteFolder?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String) {\n deleteFolder(path: $path)\n @rest(\n type: \"DeleteFolderType\"\n path: \"/DConfig/IOServicesAPI/deleteFolder?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
4713
+ var deleteFolderMutation = gql__default["default"](templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n mutation ($path: String) {\n deleteFolder(path: $path)\n @rest(\n type: \"DeleteFolderType\"\n path: \"/DConfig/IOServicesAPI/deleteFolder?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String) {\n deleteFolder(path: $path)\n @rest(\n type: \"DeleteFolderType\"\n path: \"/DConfig/IOServicesAPI/deleteFolder?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
7909
4714
  var useDeleteFolderMutation = function useDeleteFolderMutation() {
7910
4715
  return client.useMutation(deleteFolderMutation, {
7911
4716
  client: dconfigClient
7912
4717
  });
7913
4718
  };
7914
- var createFileMutation = gql$1(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n mutation ($path: String!, $file: Upload!) {\n createFolder(path: $path, file: $file)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFile?Path={args.path}\"\n method: \"POST\"\n bodyKey: \"file\",\n bodySerializer: \"fileEncode\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String!, $file: Upload!) {\n createFolder(path: $path, file: $file)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFile?Path={args.path}\"\n method: \"POST\"\n bodyKey: \"file\",\n bodySerializer: \"fileEncode\"\n ) {\n result\n message\n }\n }\n"])));
4719
+ var createFileMutation = gql__default["default"](templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n mutation ($path: String!, $file: Upload!) {\n createFolder(path: $path, file: $file)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFile?Path={args.path}\"\n method: \"POST\"\n bodyKey: \"file\",\n bodySerializer: \"fileEncode\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String!, $file: Upload!) {\n createFolder(path: $path, file: $file)\n @rest(\n type: \"CreateFolderType\"\n path: \"/DConfig/IOServicesAPI/createFile?Path={args.path}\"\n method: \"POST\"\n bodyKey: \"file\",\n bodySerializer: \"fileEncode\"\n ) {\n result\n message\n }\n }\n"])));
7915
4720
  var useCreateFileMutation = function useCreateFileMutation() {
7916
4721
  return client.useMutation(createFileMutation, {
7917
4722
  client: dconfigClient
7918
4723
  });
7919
4724
  };
7920
- var deleteFileMutation = gql$1(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n mutation ($path: String) {\n deleteFile(path: $path)\n @rest(\n type: \"DeleteFileType\"\n path: \"/DConfig/IOServicesAPI/deleteFile?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String) {\n deleteFile(path: $path)\n @rest(\n type: \"DeleteFileType\"\n path: \"/DConfig/IOServicesAPI/deleteFile?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
4725
+ var deleteFileMutation = gql__default["default"](templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n mutation ($path: String) {\n deleteFile(path: $path)\n @rest(\n type: \"DeleteFileType\"\n path: \"/DConfig/IOServicesAPI/deleteFile?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"], ["\n mutation ($path: String) {\n deleteFile(path: $path)\n @rest(\n type: \"DeleteFileType\"\n path: \"/DConfig/IOServicesAPI/deleteFile?Path={args.path}\"\n method: \"DELETE\"\n ) {\n result\n message\n }\n }\n"])));
7921
4726
  var useDeleteFileMutation = function useDeleteFileMutation() {
7922
4727
  return client.useMutation(deleteFileMutation, {
7923
4728
  client: dconfigClient
@@ -89109,6 +85914,20 @@
89109
85914
  return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);
89110
85915
  };
89111
85916
 
85917
+ /**
85918
+ * isSameProtocol reports whether the two provided URLs use the same protocol.
85919
+ *
85920
+ * Both domains must already be in canonical form.
85921
+ * @param {string|URL} original
85922
+ * @param {string|URL} destination
85923
+ */
85924
+ const isSameProtocol = function isSameProtocol(destination, original) {
85925
+ const orig = new URL$1(original).protocol;
85926
+ const dest = new URL$1(destination).protocol;
85927
+
85928
+ return orig === dest;
85929
+ };
85930
+
89112
85931
  /**
89113
85932
  * Fetch function
89114
85933
  *
@@ -89140,7 +85959,7 @@
89140
85959
  let error = new AbortError('The user aborted a request.');
89141
85960
  reject(error);
89142
85961
  if (request.body && request.body instanceof Stream__default["default"].Readable) {
89143
- request.body.destroy(error);
85962
+ destroyStream(request.body, error);
89144
85963
  }
89145
85964
  if (!response || !response.body) return;
89146
85965
  response.body.emit('error', error);
@@ -89181,9 +86000,43 @@
89181
86000
 
89182
86001
  req.on('error', function (err) {
89183
86002
  reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
86003
+
86004
+ if (response && response.body) {
86005
+ destroyStream(response.body, err);
86006
+ }
86007
+
89184
86008
  finalize();
89185
86009
  });
89186
86010
 
86011
+ fixResponseChunkedTransferBadEnding(req, function (err) {
86012
+ if (signal && signal.aborted) {
86013
+ return;
86014
+ }
86015
+
86016
+ if (response && response.body) {
86017
+ destroyStream(response.body, err);
86018
+ }
86019
+ });
86020
+
86021
+ /* c8 ignore next 18 */
86022
+ if (parseInt(process.version.substring(1)) < 14) {
86023
+ // Before Node.js 14, pipeline() does not fully support async iterators and does not always
86024
+ // properly handle when the socket close/end events are out of order.
86025
+ req.on('socket', function (s) {
86026
+ s.addListener('close', function (hadError) {
86027
+ // if a data listener is still present we didn't end cleanly
86028
+ const hasDataListener = s.listenerCount('data') > 0;
86029
+
86030
+ // if end happened before close but the socket didn't emit an error, do it now
86031
+ if (response && hasDataListener && !hadError && !(signal && signal.aborted)) {
86032
+ const err = new Error('Premature close');
86033
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
86034
+ response.body.emit('error', err);
86035
+ }
86036
+ });
86037
+ });
86038
+ }
86039
+
89187
86040
  req.on('response', function (res) {
89188
86041
  clearTimeout(reqTimeout);
89189
86042
 
@@ -89255,7 +86108,7 @@
89255
86108
  size: request.size
89256
86109
  };
89257
86110
 
89258
- if (!isDomainOrSubdomain(request.url, locationURL)) {
86111
+ if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {
89259
86112
  for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {
89260
86113
  requestOpts.headers.delete(name);
89261
86114
  }
@@ -89348,6 +86201,13 @@
89348
86201
  response = new Response(body, response_options);
89349
86202
  resolve(response);
89350
86203
  });
86204
+ raw.on('end', function () {
86205
+ // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.
86206
+ if (!response) {
86207
+ response = new Response(body, response_options);
86208
+ resolve(response);
86209
+ }
86210
+ });
89351
86211
  return;
89352
86212
  }
89353
86213
 
@@ -89367,6 +86227,41 @@
89367
86227
  writeToStream(req, request);
89368
86228
  });
89369
86229
  }
86230
+ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
86231
+ let socket;
86232
+
86233
+ request.on('socket', function (s) {
86234
+ socket = s;
86235
+ });
86236
+
86237
+ request.on('response', function (response) {
86238
+ const headers = response.headers;
86239
+
86240
+ if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
86241
+ response.once('close', function (hadError) {
86242
+ // if a data listener is still present we didn't end cleanly
86243
+ const hasDataListener = socket.listenerCount('data') > 0;
86244
+
86245
+ if (hasDataListener && !hadError) {
86246
+ const err = new Error('Premature close');
86247
+ err.code = 'ERR_STREAM_PREMATURE_CLOSE';
86248
+ errorCallback(err);
86249
+ }
86250
+ });
86251
+ }
86252
+ });
86253
+ }
86254
+
86255
+ function destroyStream(stream, err) {
86256
+ if (stream.destroy) {
86257
+ stream.destroy(err);
86258
+ } else {
86259
+ // node < 8
86260
+ stream.emit('error', err);
86261
+ stream.end();
86262
+ }
86263
+ }
86264
+
89370
86265
  /**
89371
86266
  * Redirect code matching
89372
86267
  *
@@ -89817,322 +86712,322 @@
89817
86712
  ModelFieldsTypes["MultipleImages"] = "Multiple Images";
89818
86713
  })(exports.ModelFieldsTypes || (exports.ModelFieldsTypes = {}));
89819
86714
 
89820
- /**
89821
- * Hypertext Transfer Protocol (HTTP) response status codes.
89822
- * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
86715
+ /**
86716
+ * Hypertext Transfer Protocol (HTTP) response status codes.
86717
+ * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
89823
86718
  */
89824
86719
  exports.HttpStatusCode = void 0;
89825
86720
  (function (HttpStatusCode) {
89826
- /**
89827
- * The server has received the request headers and the client should proceed to send the request body
89828
- * (in the case of a request for which a body needs to be sent; for example, a POST request).
89829
- * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
89830
- * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
89831
- * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.
86721
+ /**
86722
+ * The server has received the request headers and the client should proceed to send the request body
86723
+ * (in the case of a request for which a body needs to be sent; for example, a POST request).
86724
+ * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.
86725
+ * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request
86726
+ * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.
89832
86727
  */
89833
86728
  HttpStatusCode[HttpStatusCode["CONTINUE"] = 100] = "CONTINUE";
89834
- /**
89835
- * The requester has asked the server to switch protocols and the server has agreed to do so.
86729
+ /**
86730
+ * The requester has asked the server to switch protocols and the server has agreed to do so.
89836
86731
  */
89837
86732
  HttpStatusCode[HttpStatusCode["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
89838
- /**
89839
- * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
89840
- * This code indicates that the server has received and is processing the request, but no response is available yet.
89841
- * This prevents the client from timing out and assuming the request was lost.
86733
+ /**
86734
+ * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.
86735
+ * This code indicates that the server has received and is processing the request, but no response is available yet.
86736
+ * This prevents the client from timing out and assuming the request was lost.
89842
86737
  */
89843
86738
  HttpStatusCode[HttpStatusCode["PROCESSING"] = 102] = "PROCESSING";
89844
- /**
89845
- * Standard response for successful HTTP requests.
89846
- * The actual response will depend on the request method used.
89847
- * In a GET request, the response will contain an entity corresponding to the requested resource.
89848
- * In a POST request, the response will contain an entity describing or containing the result of the action.
86739
+ /**
86740
+ * Standard response for successful HTTP requests.
86741
+ * The actual response will depend on the request method used.
86742
+ * In a GET request, the response will contain an entity corresponding to the requested resource.
86743
+ * In a POST request, the response will contain an entity describing or containing the result of the action.
89849
86744
  */
89850
86745
  HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
89851
- /**
89852
- * The request has been fulfilled, resulting in the creation of a new resource.
86746
+ /**
86747
+ * The request has been fulfilled, resulting in the creation of a new resource.
89853
86748
  */
89854
86749
  HttpStatusCode[HttpStatusCode["CREATED"] = 201] = "CREATED";
89855
- /**
89856
- * The request has been accepted for processing, but the processing has not been completed.
89857
- * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
86750
+ /**
86751
+ * The request has been accepted for processing, but the processing has not been completed.
86752
+ * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.
89858
86753
  */
89859
86754
  HttpStatusCode[HttpStatusCode["ACCEPTED"] = 202] = "ACCEPTED";
89860
- /**
89861
- * SINCE HTTP/1.1
89862
- * The server is a transforming proxy that received a 200 OK from its origin,
89863
- * but is returning a modified version of the origin's response.
86755
+ /**
86756
+ * SINCE HTTP/1.1
86757
+ * The server is a transforming proxy that received a 200 OK from its origin,
86758
+ * but is returning a modified version of the origin's response.
89864
86759
  */
89865
86760
  HttpStatusCode[HttpStatusCode["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
89866
- /**
89867
- * The server successfully processed the request and is not returning any content.
86761
+ /**
86762
+ * The server successfully processed the request and is not returning any content.
89868
86763
  */
89869
86764
  HttpStatusCode[HttpStatusCode["NO_CONTENT"] = 204] = "NO_CONTENT";
89870
- /**
89871
- * The server successfully processed the request, but is not returning any content.
89872
- * Unlike a 204 response, this response requires that the requester reset the document view.
86765
+ /**
86766
+ * The server successfully processed the request, but is not returning any content.
86767
+ * Unlike a 204 response, this response requires that the requester reset the document view.
89873
86768
  */
89874
86769
  HttpStatusCode[HttpStatusCode["RESET_CONTENT"] = 205] = "RESET_CONTENT";
89875
- /**
89876
- * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
89877
- * The range header is used by HTTP clients to enable resuming of interrupted downloads,
89878
- * or split a download into multiple simultaneous streams.
86770
+ /**
86771
+ * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.
86772
+ * The range header is used by HTTP clients to enable resuming of interrupted downloads,
86773
+ * or split a download into multiple simultaneous streams.
89879
86774
  */
89880
86775
  HttpStatusCode[HttpStatusCode["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
89881
- /**
89882
- * The message body that follows is an XML message and can contain a number of separate response codes,
89883
- * depending on how many sub-requests were made.
86776
+ /**
86777
+ * The message body that follows is an XML message and can contain a number of separate response codes,
86778
+ * depending on how many sub-requests were made.
89884
86779
  */
89885
86780
  HttpStatusCode[HttpStatusCode["MULTI_STATUS"] = 207] = "MULTI_STATUS";
89886
- /**
89887
- * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
89888
- * and are not being included again.
86781
+ /**
86782
+ * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,
86783
+ * and are not being included again.
89889
86784
  */
89890
86785
  HttpStatusCode[HttpStatusCode["ALREADY_REPORTED"] = 208] = "ALREADY_REPORTED";
89891
- /**
89892
- * The server has fulfilled a request for the resource,
89893
- * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
86786
+ /**
86787
+ * The server has fulfilled a request for the resource,
86788
+ * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.
89894
86789
  */
89895
86790
  HttpStatusCode[HttpStatusCode["IM_USED"] = 226] = "IM_USED";
89896
- /**
89897
- * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
89898
- * For example, this code could be used to present multiple video format options,
89899
- * to list files with different filename extensions, or to suggest word-sense disambiguation.
86791
+ /**
86792
+ * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).
86793
+ * For example, this code could be used to present multiple video format options,
86794
+ * to list files with different filename extensions, or to suggest word-sense disambiguation.
89900
86795
  */
89901
86796
  HttpStatusCode[HttpStatusCode["MULTIPLE_CHOICES"] = 300] = "MULTIPLE_CHOICES";
89902
- /**
89903
- * This and all future requests should be directed to the given URI.
86797
+ /**
86798
+ * This and all future requests should be directed to the given URI.
89904
86799
  */
89905
86800
  HttpStatusCode[HttpStatusCode["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
89906
- /**
89907
- * This is an example of industry practice contradicting the standard.
89908
- * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
89909
- * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
89910
- * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
89911
- * to distinguish between the two behaviours. However, some Web applications and frameworks
89912
- * use the 302 status code as if it were the 303.
86801
+ /**
86802
+ * This is an example of industry practice contradicting the standard.
86803
+ * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
86804
+ * (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
86805
+ * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
86806
+ * to distinguish between the two behaviours. However, some Web applications and frameworks
86807
+ * use the 302 status code as if it were the 303.
89913
86808
  */
89914
86809
  HttpStatusCode[HttpStatusCode["FOUND"] = 302] = "FOUND";
89915
- /**
89916
- * SINCE HTTP/1.1
89917
- * The response to the request can be found under another URI using a GET method.
89918
- * When received in response to a POST (or PUT/DELETE), the client should presume that
89919
- * the server has received the data and should issue a redirect with a separate GET message.
86810
+ /**
86811
+ * SINCE HTTP/1.1
86812
+ * The response to the request can be found under another URI using a GET method.
86813
+ * When received in response to a POST (or PUT/DELETE), the client should presume that
86814
+ * the server has received the data and should issue a redirect with a separate GET message.
89920
86815
  */
89921
86816
  HttpStatusCode[HttpStatusCode["SEE_OTHER"] = 303] = "SEE_OTHER";
89922
- /**
89923
- * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
89924
- * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
86817
+ /**
86818
+ * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.
86819
+ * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.
89925
86820
  */
89926
86821
  HttpStatusCode[HttpStatusCode["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
89927
- /**
89928
- * SINCE HTTP/1.1
89929
- * The requested resource is available only through a proxy, the address for which is provided in the response.
89930
- * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
86822
+ /**
86823
+ * SINCE HTTP/1.1
86824
+ * The requested resource is available only through a proxy, the address for which is provided in the response.
86825
+ * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.
89931
86826
  */
89932
86827
  HttpStatusCode[HttpStatusCode["USE_PROXY"] = 305] = "USE_PROXY";
89933
- /**
89934
- * No longer used. Originally meant "Subsequent requests should use the specified proxy."
86828
+ /**
86829
+ * No longer used. Originally meant "Subsequent requests should use the specified proxy."
89935
86830
  */
89936
86831
  HttpStatusCode[HttpStatusCode["SWITCH_PROXY"] = 306] = "SWITCH_PROXY";
89937
- /**
89938
- * SINCE HTTP/1.1
89939
- * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
89940
- * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
89941
- * For example, a POST request should be repeated using another POST request.
86832
+ /**
86833
+ * SINCE HTTP/1.1
86834
+ * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.
86835
+ * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.
86836
+ * For example, a POST request should be repeated using another POST request.
89942
86837
  */
89943
86838
  HttpStatusCode[HttpStatusCode["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
89944
- /**
89945
- * The request and all future requests should be repeated using another URI.
89946
- * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
89947
- * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
86839
+ /**
86840
+ * The request and all future requests should be repeated using another URI.
86841
+ * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.
86842
+ * So, for example, submitting a form to a permanently redirected resource may continue smoothly.
89948
86843
  */
89949
86844
  HttpStatusCode[HttpStatusCode["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
89950
- /**
89951
- * The server cannot or will not process the request due to an apparent client error
89952
- * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
86845
+ /**
86846
+ * The server cannot or will not process the request due to an apparent client error
86847
+ * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).
89953
86848
  */
89954
86849
  HttpStatusCode[HttpStatusCode["BAD_REQUEST"] = 400] = "BAD_REQUEST";
89955
- /**
89956
- * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
89957
- * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
89958
- * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
89959
- * "unauthenticated",i.e. the user does not have the necessary credentials.
86850
+ /**
86851
+ * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet
86852
+ * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the
86853
+ * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means
86854
+ * "unauthenticated",i.e. the user does not have the necessary credentials.
89960
86855
  */
89961
86856
  HttpStatusCode[HttpStatusCode["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
89962
- /**
89963
- * Reserved for future use. The original intention was that this code might be used as part of some form of digital
89964
- * cash or micro payment scheme, but that has not happened, and this code is not usually used.
89965
- * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
86857
+ /**
86858
+ * Reserved for future use. The original intention was that this code might be used as part of some form of digital
86859
+ * cash or micro payment scheme, but that has not happened, and this code is not usually used.
86860
+ * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.
89966
86861
  */
89967
86862
  HttpStatusCode[HttpStatusCode["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
89968
- /**
89969
- * The request was valid, but the server is refusing action.
89970
- * The user might not have the necessary permissions for a resource.
86863
+ /**
86864
+ * The request was valid, but the server is refusing action.
86865
+ * The user might not have the necessary permissions for a resource.
89971
86866
  */
89972
86867
  HttpStatusCode[HttpStatusCode["FORBIDDEN"] = 403] = "FORBIDDEN";
89973
- /**
89974
- * The requested resource could not be found but may be available in the future.
89975
- * Subsequent requests by the client are permissible.
86868
+ /**
86869
+ * The requested resource could not be found but may be available in the future.
86870
+ * Subsequent requests by the client are permissible.
89976
86871
  */
89977
86872
  HttpStatusCode[HttpStatusCode["NOT_FOUND"] = 404] = "NOT_FOUND";
89978
- /**
89979
- * A request method is not supported for the requested resource;
89980
- * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
86873
+ /**
86874
+ * A request method is not supported for the requested resource;
86875
+ * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.
89981
86876
  */
89982
86877
  HttpStatusCode[HttpStatusCode["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
89983
- /**
89984
- * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
86878
+ /**
86879
+ * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.
89985
86880
  */
89986
86881
  HttpStatusCode[HttpStatusCode["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
89987
- /**
89988
- * The client must first authenticate itself with the proxy.
86882
+ /**
86883
+ * The client must first authenticate itself with the proxy.
89989
86884
  */
89990
86885
  HttpStatusCode[HttpStatusCode["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
89991
- /**
89992
- * The server timed out waiting for the request.
89993
- * According to HTTP specifications:
89994
- * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
86886
+ /**
86887
+ * The server timed out waiting for the request.
86888
+ * According to HTTP specifications:
86889
+ * "The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time."
89995
86890
  */
89996
86891
  HttpStatusCode[HttpStatusCode["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
89997
- /**
89998
- * Indicates that the request could not be processed because of conflict in the request,
89999
- * such as an edit conflict between multiple simultaneous updates.
86892
+ /**
86893
+ * Indicates that the request could not be processed because of conflict in the request,
86894
+ * such as an edit conflict between multiple simultaneous updates.
90000
86895
  */
90001
86896
  HttpStatusCode[HttpStatusCode["CONFLICT"] = 409] = "CONFLICT";
90002
- /**
90003
- * Indicates that the resource requested is no longer available and will not be available again.
90004
- * This should be used when a resource has been intentionally removed and the resource should be purged.
90005
- * Upon receiving a 410 status code, the client should not request the resource in the future.
90006
- * Clients such as search engines should remove the resource from their indices.
90007
- * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
86897
+ /**
86898
+ * Indicates that the resource requested is no longer available and will not be available again.
86899
+ * This should be used when a resource has been intentionally removed and the resource should be purged.
86900
+ * Upon receiving a 410 status code, the client should not request the resource in the future.
86901
+ * Clients such as search engines should remove the resource from their indices.
86902
+ * Most use cases do not require clients and search engines to purge the resource, and a "404 Not Found" may be used instead.
90008
86903
  */
90009
86904
  HttpStatusCode[HttpStatusCode["GONE"] = 410] = "GONE";
90010
- /**
90011
- * The request did not specify the length of its content, which is required by the requested resource.
86905
+ /**
86906
+ * The request did not specify the length of its content, which is required by the requested resource.
90012
86907
  */
90013
86908
  HttpStatusCode[HttpStatusCode["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
90014
- /**
90015
- * The server does not meet one of the preconditions that the requester put on the request.
86909
+ /**
86910
+ * The server does not meet one of the preconditions that the requester put on the request.
90016
86911
  */
90017
86912
  HttpStatusCode[HttpStatusCode["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
90018
- /**
90019
- * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
86913
+ /**
86914
+ * The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".
90020
86915
  */
90021
86916
  HttpStatusCode[HttpStatusCode["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
90022
- /**
90023
- * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
90024
- * in which case it should be converted to a POST request.
90025
- * Called "Request-URI Too Long" previously.
86917
+ /**
86918
+ * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,
86919
+ * in which case it should be converted to a POST request.
86920
+ * Called "Request-URI Too Long" previously.
90026
86921
  */
90027
86922
  HttpStatusCode[HttpStatusCode["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
90028
- /**
90029
- * The request entity has a media type which the server or resource does not support.
90030
- * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
86923
+ /**
86924
+ * The request entity has a media type which the server or resource does not support.
86925
+ * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.
90031
86926
  */
90032
86927
  HttpStatusCode[HttpStatusCode["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
90033
- /**
90034
- * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
90035
- * For example, if the client asked for a part of the file that lies beyond the end of the file.
90036
- * Called "Requested Range Not Satisfiable" previously.
86928
+ /**
86929
+ * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.
86930
+ * For example, if the client asked for a part of the file that lies beyond the end of the file.
86931
+ * Called "Requested Range Not Satisfiable" previously.
90037
86932
  */
90038
86933
  HttpStatusCode[HttpStatusCode["RANGE_NOT_SATISFIABLE"] = 416] = "RANGE_NOT_SATISFIABLE";
90039
- /**
90040
- * The server cannot meet the requirements of the Expect request-header field.
86934
+ /**
86935
+ * The server cannot meet the requirements of the Expect request-header field.
90041
86936
  */
90042
86937
  HttpStatusCode[HttpStatusCode["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
90043
- /**
90044
- * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
90045
- * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
90046
- * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
86938
+ /**
86939
+ * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,
86940
+ * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by
86941
+ * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.
90047
86942
  */
90048
86943
  HttpStatusCode[HttpStatusCode["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
90049
- /**
90050
- * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
86944
+ /**
86945
+ * The request was directed at a server that is not able to produce a response (for example because a connection reuse).
90051
86946
  */
90052
86947
  HttpStatusCode[HttpStatusCode["MISDIRECTED_REQUEST"] = 421] = "MISDIRECTED_REQUEST";
90053
- /**
90054
- * The request was well-formed but was unable to be followed due to semantic errors.
86948
+ /**
86949
+ * The request was well-formed but was unable to be followed due to semantic errors.
90055
86950
  */
90056
86951
  HttpStatusCode[HttpStatusCode["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
90057
- /**
90058
- * The resource that is being accessed is locked.
86952
+ /**
86953
+ * The resource that is being accessed is locked.
90059
86954
  */
90060
86955
  HttpStatusCode[HttpStatusCode["LOCKED"] = 423] = "LOCKED";
90061
- /**
90062
- * The request failed due to failure of a previous request (e.g., a PROPPATCH).
86956
+ /**
86957
+ * The request failed due to failure of a previous request (e.g., a PROPPATCH).
90063
86958
  */
90064
86959
  HttpStatusCode[HttpStatusCode["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
90065
- /**
90066
- * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
86960
+ /**
86961
+ * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.
90067
86962
  */
90068
86963
  HttpStatusCode[HttpStatusCode["UPGRADE_REQUIRED"] = 426] = "UPGRADE_REQUIRED";
90069
- /**
90070
- * The origin server requires the request to be conditional.
90071
- * Intended to prevent "the 'lost update' problem, where a client
90072
- * GETs a resource's state, modifies it, and PUTs it back to the server,
90073
- * when meanwhile a third party has modified the state on the server, leading to a conflict."
86964
+ /**
86965
+ * The origin server requires the request to be conditional.
86966
+ * Intended to prevent "the 'lost update' problem, where a client
86967
+ * GETs a resource's state, modifies it, and PUTs it back to the server,
86968
+ * when meanwhile a third party has modified the state on the server, leading to a conflict."
90074
86969
  */
90075
86970
  HttpStatusCode[HttpStatusCode["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
90076
- /**
90077
- * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
86971
+ /**
86972
+ * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.
90078
86973
  */
90079
86974
  HttpStatusCode[HttpStatusCode["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
90080
- /**
90081
- * The server is unwilling to process the request because either an individual header field,
90082
- * or all the header fields collectively, are too large.
86975
+ /**
86976
+ * The server is unwilling to process the request because either an individual header field,
86977
+ * or all the header fields collectively, are too large.
90083
86978
  */
90084
86979
  HttpStatusCode[HttpStatusCode["REQUEST_HEADER_FIELDS_TOO_LARGE"] = 431] = "REQUEST_HEADER_FIELDS_TOO_LARGE";
90085
- /**
90086
- * A server operator has received a legal demand to deny access to a resource or to a set of resources
90087
- * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
86980
+ /**
86981
+ * A server operator has received a legal demand to deny access to a resource or to a set of resources
86982
+ * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.
90088
86983
  */
90089
86984
  HttpStatusCode[HttpStatusCode["UNAVAILABLE_FOR_LEGAL_REASONS"] = 451] = "UNAVAILABLE_FOR_LEGAL_REASONS";
90090
- /**
90091
- * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
86985
+ /**
86986
+ * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.
90092
86987
  */
90093
86988
  HttpStatusCode[HttpStatusCode["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
90094
- /**
90095
- * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
90096
- * Usually this implies future availability (e.g., a new feature of a web-service API).
86989
+ /**
86990
+ * The server either does not recognize the request method, or it lacks the ability to fulfill the request.
86991
+ * Usually this implies future availability (e.g., a new feature of a web-service API).
90097
86992
  */
90098
86993
  HttpStatusCode[HttpStatusCode["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
90099
- /**
90100
- * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
86994
+ /**
86995
+ * The server was acting as a gateway or proxy and received an invalid response from the upstream server.
90101
86996
  */
90102
86997
  HttpStatusCode[HttpStatusCode["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
90103
- /**
90104
- * The server is currently unavailable (because it is overloaded or down for maintenance).
90105
- * Generally, this is a temporary state.
86998
+ /**
86999
+ * The server is currently unavailable (because it is overloaded or down for maintenance).
87000
+ * Generally, this is a temporary state.
90106
87001
  */
90107
87002
  HttpStatusCode[HttpStatusCode["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
90108
- /**
90109
- * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
87003
+ /**
87004
+ * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.
90110
87005
  */
90111
87006
  HttpStatusCode[HttpStatusCode["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
90112
- /**
90113
- * The server does not support the HTTP protocol version used in the request
87007
+ /**
87008
+ * The server does not support the HTTP protocol version used in the request
90114
87009
  */
90115
87010
  HttpStatusCode[HttpStatusCode["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
90116
- /**
90117
- * Transparent content negotiation for the request results in a circular reference.
87011
+ /**
87012
+ * Transparent content negotiation for the request results in a circular reference.
90118
87013
  */
90119
87014
  HttpStatusCode[HttpStatusCode["VARIANT_ALSO_NEGOTIATES"] = 506] = "VARIANT_ALSO_NEGOTIATES";
90120
- /**
90121
- * The server is unable to store the representation needed to complete the request.
87015
+ /**
87016
+ * The server is unable to store the representation needed to complete the request.
90122
87017
  */
90123
87018
  HttpStatusCode[HttpStatusCode["INSUFFICIENT_STORAGE"] = 507] = "INSUFFICIENT_STORAGE";
90124
- /**
90125
- * The server detected an infinite loop while processing the request.
87019
+ /**
87020
+ * The server detected an infinite loop while processing the request.
90126
87021
  */
90127
87022
  HttpStatusCode[HttpStatusCode["LOOP_DETECTED"] = 508] = "LOOP_DETECTED";
90128
- /**
90129
- * Further extensions to the request are required for the server to fulfill it.
87023
+ /**
87024
+ * Further extensions to the request are required for the server to fulfill it.
90130
87025
  */
90131
87026
  HttpStatusCode[HttpStatusCode["NOT_EXTENDED"] = 510] = "NOT_EXTENDED";
90132
- /**
90133
- * The client needs to authenticate to gain network access.
90134
- * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
90135
- * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
87027
+ /**
87028
+ * The client needs to authenticate to gain network access.
87029
+ * Intended for use by intercepting proxies used to control access to the network (e.g., "captive portals" used
87030
+ * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).
90136
87031
  */
90137
87032
  HttpStatusCode[HttpStatusCode["NETWORK_AUTHENTICATION_REQUIRED"] = 511] = "NETWORK_AUTHENTICATION_REQUIRED";
90138
87033
  })(exports.HttpStatusCode || (exports.HttpStatusCode = {}));
@@ -90351,6 +87246,7 @@
90351
87246
  exports.StringsUtils = StringsUtils;
90352
87247
  exports.addDomain = addDomain;
90353
87248
  exports.addDomainOptions = addDomainOptions;
87249
+ exports.appConfig = appConfig;
90354
87250
  exports.auth = auth;
90355
87251
  exports.companyUsersQuery = companyUsersQuery;
90356
87252
  exports.contentInstancesQuery = contentInstancesQuery;
@@ -90374,6 +87270,8 @@
90374
87270
  exports.inviteUserOptions = inviteUserOptions;
90375
87271
  exports.login = login;
90376
87272
  exports.loginOptions = loginOptions;
87273
+ exports.queryUsage = queryUsage;
87274
+ exports.registeUsage = registeUsage;
90377
87275
  exports.register = register;
90378
87276
  exports.registerOptions = registerOptions;
90379
87277
  exports.removeContentMutation = removeContentMutation;
@@ -90393,7 +87291,8 @@
90393
87291
  exports.showcasePagesQuery = showcasePagesQuery;
90394
87292
  exports.showcasePagesQueryOptions = showcasePagesQueryOptions;
90395
87293
  exports.showcaseSectionQuery = showcaseSectionQuery;
90396
- exports.showcaseSectionQueryOptions = showcaseSectionQueryOptions;
87294
+ exports.showcaseSectionsQuery = showcaseSectionsQuery;
87295
+ exports.showcaseSectionsQueryOptions = showcaseSectionsQueryOptions;
90397
87296
  exports.showcaseTemplatesQuery = showcaseTemplatesQuery;
90398
87297
  exports.showcaseTemplatesQueryOptions = showcaseTemplatesQueryOptions;
90399
87298
  exports.subscriptionConfigurationQuery = subscriptionConfigurationQuery;
@@ -90409,7 +87308,6 @@
90409
87308
  exports.updateUserPasswordOptions = updateUserPasswordOptions;
90410
87309
  exports.updateUserProfile = updateUserProfile;
90411
87310
  exports.updateUserProfileOptions = updateUserProfileOptions;
90412
- exports.usageQuery = usageQuery;
90413
87311
  exports.useContentInstancesQuery = useContentInstancesQuery;
90414
87312
  exports.useCreateContentInstanceMutation = useCreateContentInstanceMutation;
90415
87313
  exports.useCreateContentMutation = useCreateContentMutation;
@@ -90423,6 +87321,8 @@
90423
87321
  exports.useFoldersTreeQuery = useFoldersTreeQuery;
90424
87322
  exports.useModelChildrenQuery = useModelChildrenQuery;
90425
87323
  exports.useModelsQuery = useModelsQuery;
87324
+ exports.useQueryUsage = useQueryUsage;
87325
+ exports.useRegisterUsage = useRegisterUsage;
90426
87326
  exports.useShowcaseConfig = useShowcaseConfig;
90427
87327
  exports.useShowcaseConfigurationQuery = useShowcaseConfigurationQuery;
90428
87328
  exports.useShowcaseTemplate = useShowcaseTemplate;