@crowdedkingdoms/crowdy-dsh 0.5.3 → 0.5.4-test.1

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.
@@ -108,32 +108,57 @@ function isObjectLike(value) {
108
108
  return typeof value == "object" && value !== null;
109
109
  }
110
110
 
111
- function invariant(condition, message) {
112
- const booleanCondition = Boolean(condition);
113
- if (!booleanCondition) {
114
- throw new Error(
115
- message != null ? message : "Unexpected invariant triggered."
116
- );
117
- }
118
- }
119
-
120
- var LineRegExp = /\r\n|[\n\r]/g;
121
111
  function getLocation(source, position) {
122
- let lastLineStart = 0;
112
+ const lineRegexp = /\r\n|[\n\r]/g;
123
113
  let line = 1;
124
- for (const match of source.body.matchAll(LineRegExp)) {
125
- typeof match.index === "number" || invariant(false);
126
- if (match.index >= position) {
127
- break;
128
- }
129
- lastLineStart = match.index + match[0].length;
130
- line += 1;
114
+ let column = position + 1;
115
+ let match;
116
+ while ((match = lineRegexp.exec(source.body)) && match.index < position) {
117
+ line++;
118
+ column = position + 1 - (match.index + match[0].length);
131
119
  }
132
120
  return {
133
121
  line,
134
- column: position + 1 - lastLineStart
122
+ column
135
123
  };
136
124
  }
125
+ function getLocations(locations) {
126
+ if (locations.length < 2) {
127
+ return locations.map(({ source, start }) => getLocation(source, start));
128
+ }
129
+ const bySource = /* @__PURE__ */ new Map();
130
+ locations.forEach(({ source, start }, index) => {
131
+ let positions = bySource.get(source);
132
+ if (positions === void 0) {
133
+ positions = [];
134
+ bySource.set(source, positions);
135
+ }
136
+ positions.push({
137
+ position: start,
138
+ index
139
+ });
140
+ });
141
+ const result = new Array(locations.length);
142
+ for (const [source, positions] of bySource) {
143
+ const lineRegexp = /\r\n|[\n\r]/g;
144
+ let match = lineRegexp.exec(source.body);
145
+ let line = 1;
146
+ let lastLineStart = 0;
147
+ positions.sort((a, b) => a.position - b.position);
148
+ for (const { position, index } of positions) {
149
+ while (match !== null && match.index < position) {
150
+ lastLineStart = match.index + match[0].length;
151
+ line++;
152
+ match = lineRegexp.exec(source.body);
153
+ }
154
+ result[index] = {
155
+ line,
156
+ column: position + 1 - lastLineStart
157
+ };
158
+ }
159
+ }
160
+ return result;
161
+ }
137
162
 
138
163
  function printLocation(location) {
139
164
  return printSourceLocation(
@@ -233,12 +258,16 @@ var GraphQLError = class _GraphQLError extends Error {
233
258
  * `GraphQLError(message, options)` overload instead.
234
259
  * @example
235
260
  * ```ts
261
+ * import { Kind } from 'graphql/language';
262
+ * import assert from 'node:assert/strict';
236
263
  * // Create an error from AST nodes and response metadata.
237
264
  * import { parse } from 'graphql/language';
238
265
  * import { GraphQLError } from 'graphql/error';
239
266
  *
240
267
  * const document = parse('{ greeting }');
241
- * const fieldNode = document.definitions[0].selectionSet.selections[0];
268
+ * const operation = document.definitions[0];
269
+ * assert(operation.kind === Kind.OPERATION_DEFINITION);
270
+ * const fieldNode = operation.selectionSet.selections[0];
242
271
  * const error = new GraphQLError('Cannot query this field.', {
243
272
  * nodes: fieldNode,
244
273
  * path: ['greeting'],
@@ -323,7 +352,12 @@ var GraphQLError = class _GraphQLError extends Error {
323
352
  );
324
353
  this.source = source !== null && source !== void 0 ? source : nodeLocations === null || nodeLocations === void 0 ? void 0 : (_nodeLocations$ = nodeLocations[0]) === null || _nodeLocations$ === void 0 ? void 0 : _nodeLocations$.source;
325
354
  this.positions = positions !== null && positions !== void 0 ? positions : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => loc.start);
326
- this.locations = positions && source ? positions.map((pos) => getLocation(source, pos)) : nodeLocations === null || nodeLocations === void 0 ? void 0 : nodeLocations.map((loc) => getLocation(loc.source, loc.start));
355
+ this.locations = positions && source ? getLocations(
356
+ positions.map((start) => ({
357
+ source,
358
+ start
359
+ }))
360
+ ) : nodeLocations && getLocations(nodeLocations);
327
361
  const originalExtensions = isObjectLike(
328
362
  originalError === null || originalError === void 0 ? void 0 : originalError.extensions
329
363
  ) ? originalError === null || originalError === void 0 ? void 0 : originalError.extensions : void 0;
@@ -492,9 +526,7 @@ var Location = class {
492
526
  * import { parse } from 'graphql/language';
493
527
  *
494
528
  * const document = parse('{ hello }');
495
- * const location = document.loc?.toJSON();
496
- *
497
- * location; // => { start: 0, end: 9 }
529
+ * const location = document.loc?.toJSON(); // => { start: 0, end: 9 }
498
530
  * ```
499
531
  */
500
532
  toJSON() {
@@ -566,9 +598,7 @@ var Token = class {
566
598
  * import { Lexer, Source } from 'graphql/language';
567
599
  *
568
600
  * const lexer = new Lexer(new Source('{ hello }'));
569
- * const token = lexer.advance().toJSON();
570
- *
571
- * token; // => { kind: '{', value: undefined, line: 1, column: 1 }
601
+ * const token = lexer.advance().toJSON(); // => { kind: '{', value: undefined, line: 1, column: 1 }
572
602
  * ```
573
603
  */
574
604
  toJSON() {
@@ -676,10 +706,6 @@ var QueryDocumentKeys = {
676
706
  DirectiveArgumentCoordinate: ["name", "argumentName"]
677
707
  };
678
708
  var kindValues = new Set(Object.keys(QueryDocumentKeys));
679
- function isNode(maybeNode) {
680
- const maybeKind = maybeNode === null || maybeNode === void 0 ? void 0 : maybeNode.kind;
681
- return typeof maybeKind === "string" && kindValues.has(maybeKind);
682
- }
683
709
  var OperationTypeNode;
684
710
  (function(OperationTypeNode2) {
685
711
  OperationTypeNode2["QUERY"] = "query";
@@ -789,14 +815,14 @@ function dedentBlockStringLines(lines) {
789
815
  for (let i = 0; i < lines.length; ++i) {
790
816
  var _firstNonEmptyLine;
791
817
  const line = lines[i];
792
- const indent2 = leadingWhitespace(line);
793
- if (indent2 === line.length) {
818
+ const indent = leadingWhitespace(line);
819
+ if (indent === line.length) {
794
820
  continue;
795
821
  }
796
822
  firstNonEmptyLine = (_firstNonEmptyLine = firstNonEmptyLine) !== null && _firstNonEmptyLine !== void 0 ? _firstNonEmptyLine : i;
797
823
  lastNonEmptyLine = i;
798
- if (i !== 0 && indent2 < commonIndent) {
799
- commonIndent = indent2;
824
+ if (i !== 0 && indent < commonIndent) {
825
+ commonIndent = indent;
800
826
  }
801
827
  }
802
828
  return lines.map((line, i) => i === 0 ? line : line.slice(commonIndent)).slice(
@@ -867,6 +893,8 @@ var Lexer = class {
867
893
  /** Current non-ignored token at the lexer cursor. */
868
894
  /** The (1-indexed) line containing the current token. */
869
895
  /** Character offset where the current line starts. */
896
+ /** @internal */
897
+ /** @internal */
870
898
  /**
871
899
  * Creates a Lexer instance.
872
900
  * @param source - Source document used to derive error locations.
@@ -889,6 +917,8 @@ var Lexer = class {
889
917
  this.token = startOfFileToken;
890
918
  this.line = 1;
891
919
  this.lineStart = 0;
920
+ this._maxComments = void 0;
921
+ this._commentCount = 0;
892
922
  }
893
923
  /**
894
924
  * Returns the value used by `Object.prototype.toString`.
@@ -1090,6 +1120,18 @@ function readNextToken(lexer, start) {
1090
1120
  return createToken(lexer, TokenKind.EOF, bodyLength, bodyLength);
1091
1121
  }
1092
1122
  function readComment(lexer, start) {
1123
+ const maxComments = lexer._maxComments;
1124
+ if (maxComments !== void 0) {
1125
+ const nextCommentCount = lexer._commentCount + 1;
1126
+ if (nextCommentCount > maxComments) {
1127
+ throw syntaxError(
1128
+ lexer.source,
1129
+ start,
1130
+ `Document contains more than ${maxComments} comments. Parsing aborted.`
1131
+ );
1132
+ }
1133
+ lexer._commentCount = nextCommentCount;
1134
+ }
1093
1135
  const body = lexer.source.body;
1094
1136
  const bodyLength = body.length;
1095
1137
  let position = start + 1;
@@ -1559,11 +1601,10 @@ var Source = class {
1559
1601
  * ```ts
1560
1602
  * import { Source } from 'graphql/language';
1561
1603
  *
1562
- * const source = new Source(
1563
- * 'type Query { greeting: String }',
1564
- * 'schema.graphql',
1565
- * { line: 10, column: 1 },
1566
- * );
1604
+ * const source = new Source('type Query { greeting: String }', 'schema.graphql', {
1605
+ * line: 10,
1606
+ * column: 1,
1607
+ * });
1567
1608
  *
1568
1609
  * source.body; // => 'type Query { greeting: String }'
1569
1610
  * source.name; // => 'schema.graphql'
@@ -1619,6 +1660,16 @@ var Parser = class {
1619
1660
  }
1620
1661
  this._options = _options;
1621
1662
  this._tokenCounter = 0;
1663
+ this._lexer._maxComments = options === null || options === void 0 ? void 0 : options.maxComments;
1664
+ this._lexer._commentCount = 0;
1665
+ const maxSourceLength = options === null || options === void 0 ? void 0 : options.maxSourceLength;
1666
+ if (maxSourceLength !== void 0 && this._lexer.source.body.length > maxSourceLength) {
1667
+ throw syntaxError(
1668
+ this._lexer.source,
1669
+ maxSourceLength,
1670
+ `Source contains more than ${maxSourceLength} UTF-16 code units. Parsing aborted.`
1671
+ );
1672
+ }
1622
1673
  }
1623
1674
  get tokenCount() {
1624
1675
  return this._tokenCounter;
@@ -2851,15 +2902,18 @@ var Parser = class {
2851
2902
  * @returns Parsed schema coordinate AST.
2852
2903
  * @example
2853
2904
  * ```ts
2854
- * import { Parser, Source } from 'graphql/language';
2905
+ * import assert from 'node:assert/strict';
2906
+ * import { Kind, parseSchemaCoordinate } from 'graphql/language';
2855
2907
  *
2856
- * const typeCoordinate = new Parser(new Source('User.name')).parseSchemaCoordinate();
2857
- * const directiveCoordinate = new Parser(new Source('@include(if:)')).parseSchemaCoordinate();
2908
+ * const typeCoordinate = parseSchemaCoordinate('User.name');
2909
+ * const directiveCoordinate = parseSchemaCoordinate('@include(if:)');
2910
+ * assert(typeCoordinate.kind === Kind.MEMBER_COORDINATE);
2911
+ * assert(directiveCoordinate.kind === Kind.DIRECTIVE_ARGUMENT_COORDINATE);
2858
2912
  *
2859
2913
  * typeCoordinate.name.value; // => 'User'
2860
2914
  * typeCoordinate.memberName?.value; // => 'name'
2861
- * directiveCoordinate.name.value; // => 'deprecated'
2862
- * directiveCoordinate.argumentName?.value; // => 'reason'
2915
+ * directiveCoordinate.name.value; // => 'include'
2916
+ * directiveCoordinate.argumentName?.value; // => 'if'
2863
2917
  * ```
2864
2918
  */
2865
2919
  parseSchemaCoordinate() {
@@ -3075,15 +3129,15 @@ var Parser = class {
3075
3129
  return nodes;
3076
3130
  }
3077
3131
  advanceLexer() {
3078
- const { maxTokens } = this._options;
3132
+ const { maxLexicalTokens = this._options.maxTokens } = this._options;
3079
3133
  const token = this._lexer.advance();
3080
3134
  if (token.kind !== TokenKind.EOF) {
3081
3135
  ++this._tokenCounter;
3082
- if (maxTokens !== void 0 && this._tokenCounter > maxTokens) {
3136
+ if (maxLexicalTokens !== void 0 && this._tokenCounter > maxLexicalTokens) {
3083
3137
  throw syntaxError(
3084
3138
  this._lexer.source,
3085
3139
  token.start,
3086
- `Document contains more that ${maxTokens} tokens. Parsing aborted.`
3140
+ `Document contains more that ${maxLexicalTokens} tokens. Parsing aborted.`
3087
3141
  );
3088
3142
  }
3089
3143
  }
@@ -3272,263 +3326,256 @@ var escapeSequences = [
3272
3326
  "\\u009F"
3273
3327
  ];
3274
3328
 
3275
- var BREAK = Object.freeze({});
3276
- function visit(root, visitor, visitorKeys = QueryDocumentKeys) {
3277
- const enterLeaveMap = /* @__PURE__ */ new Map();
3278
- for (const kind of Object.values(Kind)) {
3279
- enterLeaveMap.set(kind, getEnterLeaveForKind(visitor, kind));
3280
- }
3281
- let stack = void 0;
3282
- let inArray = Array.isArray(root);
3283
- let keys = [root];
3284
- let index = -1;
3285
- let edits = [];
3286
- let node = root;
3287
- let key = void 0;
3288
- let parent = void 0;
3289
- const path = [];
3290
- const ancestors = [];
3329
+ function reduce(root, reducer) {
3330
+ const stack = [];
3331
+ let frame = {
3332
+ parent: [root],
3333
+ keys: void 0,
3334
+ results: [],
3335
+ index: -1
3336
+ };
3337
+ let node;
3291
3338
  do {
3292
- index++;
3293
- const isLeaving = index === keys.length;
3294
- const isEdited = isLeaving && edits.length !== 0;
3295
- if (isLeaving) {
3296
- key = ancestors.length === 0 ? void 0 : path[path.length - 1];
3297
- node = parent;
3298
- parent = ancestors.pop();
3299
- if (isEdited) {
3300
- if (inArray) {
3301
- node = node.slice();
3302
- let editOffset = 0;
3303
- for (const [editKey, editValue] of edits) {
3304
- const arrayKey = editKey - editOffset;
3305
- if (editValue === null) {
3306
- node.splice(arrayKey, 1);
3307
- editOffset++;
3308
- } else {
3309
- node[arrayKey] = editValue;
3310
- }
3311
- }
3312
- } else {
3313
- node = { ...node };
3314
- for (const [editKey, editValue] of edits) {
3315
- node[editKey] = editValue;
3316
- }
3317
- }
3318
- }
3319
- index = stack.index;
3320
- keys = stack.keys;
3321
- edits = stack.edits;
3322
- inArray = stack.inArray;
3323
- stack = stack.prev;
3324
- } else if (parent) {
3325
- key = inArray ? index : keys[index];
3326
- node = parent[key];
3327
- if (node === null || node === void 0) {
3339
+ let kind;
3340
+ frame.index++;
3341
+ const length = frame.keys === void 0 ? frame.parent.length : frame.keys.length;
3342
+ if (frame.index === length) {
3343
+ node = frame.results;
3344
+ kind = frame.keys === void 0 ? void 0 : frame.results.kind;
3345
+ frame = stack.pop();
3346
+ } else {
3347
+ node = frame.keys === void 0 ? frame.parent[frame.index] : frame.parent[frame.keys[frame.index]];
3348
+ if (node == null && stack.length !== 0) {
3328
3349
  continue;
3329
3350
  }
3330
- path.push(key);
3331
- }
3332
- let result;
3333
- if (!Array.isArray(node)) {
3334
- var _enterLeaveMap$get, _enterLeaveMap$get2;
3335
- isNode(node) || devAssert(false, `Invalid AST Node: ${inspect(node)}.`);
3336
- const visitFn = isLeaving ? (_enterLeaveMap$get = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get === void 0 ? void 0 : _enterLeaveMap$get.leave : (_enterLeaveMap$get2 = enterLeaveMap.get(node.kind)) === null || _enterLeaveMap$get2 === void 0 ? void 0 : _enterLeaveMap$get2.enter;
3337
- result = visitFn === null || visitFn === void 0 ? void 0 : visitFn.call(visitor, node, key, parent, path, ancestors);
3338
- if (result === BREAK) {
3339
- break;
3340
- }
3341
- if (result === false) {
3342
- if (!isLeaving) {
3343
- path.pop();
3351
+ if (Array.isArray(node)) {
3352
+ if (node.length !== 0) {
3353
+ stack.push(frame);
3354
+ frame = {
3355
+ parent: node,
3356
+ keys: void 0,
3357
+ results: [],
3358
+ index: -1
3359
+ };
3344
3360
  continue;
3345
3361
  }
3346
- } else if (result !== void 0) {
3347
- edits.push([key, result]);
3348
- if (!isLeaving) {
3349
- if (isNode(result)) {
3350
- node = result;
3351
- } else {
3352
- path.pop();
3353
- continue;
3354
- }
3362
+ } else {
3363
+ const parent = node;
3364
+ kind = parent === null || parent === void 0 ? void 0 : parent.kind;
3365
+ const keys = typeof kind === "string" ? QueryDocumentKeys[kind] : void 0;
3366
+ if (!Array.isArray(keys)) {
3367
+ throw new Error(`Invalid AST Node: ${inspect(node)}.`);
3368
+ }
3369
+ if (keys.length !== 0) {
3370
+ stack.push(frame);
3371
+ frame = {
3372
+ parent,
3373
+ keys,
3374
+ results: { ...parent },
3375
+ index: -1
3376
+ };
3377
+ continue;
3355
3378
  }
3356
3379
  }
3357
3380
  }
3358
- if (result === void 0 && isEdited) {
3359
- edits.push([key, node]);
3381
+ if (kind !== void 0) {
3382
+ const reduceNode = reducer[kind];
3383
+ node = reduceNode === null || reduceNode === void 0 ? void 0 : reduceNode(node);
3360
3384
  }
3361
- if (isLeaving) {
3362
- path.pop();
3385
+ if (frame.keys === void 0) {
3386
+ frame.results.push(node);
3363
3387
  } else {
3364
- var _node$kind;
3365
- stack = {
3366
- inArray,
3367
- index,
3368
- keys,
3369
- edits,
3370
- prev: stack
3371
- };
3372
- inArray = Array.isArray(node);
3373
- keys = inArray ? node : (_node$kind = visitorKeys[node.kind]) !== null && _node$kind !== void 0 ? _node$kind : [];
3374
- index = -1;
3375
- edits = [];
3376
- if (parent) {
3377
- ancestors.push(parent);
3378
- }
3379
- parent = node;
3388
+ frame.results[frame.keys[frame.index]] = node;
3380
3389
  }
3381
- } while (stack !== void 0);
3382
- if (edits.length !== 0) {
3383
- return edits[edits.length - 1][1];
3384
- }
3385
- return root;
3386
- }
3387
- function getEnterLeaveForKind(visitor, kind) {
3388
- const kindVisitor = visitor[kind];
3389
- if (typeof kindVisitor === "object") {
3390
- return kindVisitor;
3391
- } else if (typeof kindVisitor === "function") {
3392
- return {
3393
- enter: kindVisitor,
3394
- leave: void 0
3395
- };
3396
- }
3397
- return {
3398
- enter: visitor.enter,
3399
- leave: visitor.leave
3400
- };
3390
+ } while (stack.length !== 0);
3391
+ return node;
3401
3392
  }
3402
3393
 
3403
- function print(ast) {
3404
- return visit(ast, printDocASTReducer);
3394
+ function print(ast, options) {
3395
+ var _options$maxIndentDep;
3396
+ return render(
3397
+ reduce(ast, printDocASTReducer),
3398
+ (_options$maxIndentDep = options === null || options === void 0 ? void 0 : options.maxIndentDepth) !== null && _options$maxIndentDep !== void 0 ? _options$maxIndentDep : Infinity
3399
+ );
3405
3400
  }
3406
3401
  var MAX_LINE_LENGTH = 80;
3402
+ var PrintBuffer = class _PrintBuffer {
3403
+ next = void 0;
3404
+ tail = this;
3405
+ indentBefore = false;
3406
+ dedentAfter = false;
3407
+ constructor(value = "", isBlockString = false) {
3408
+ this.length = value.length;
3409
+ this.lines = value.includes("\n") ? value.split("\n") : value;
3410
+ this.newlines = typeof this.lines === "string" ? 0 : this.lines.length - 1;
3411
+ this.isBlockString = isBlockString;
3412
+ }
3413
+ append(result) {
3414
+ if (result.length === 0) {
3415
+ return this;
3416
+ }
3417
+ const next = typeof result === "string" ? new _PrintBuffer(result) : result;
3418
+ this.tail.next = next;
3419
+ this.tail = next.tail;
3420
+ this.length += next.length;
3421
+ this.newlines += next.newlines;
3422
+ return this;
3423
+ }
3424
+ indent() {
3425
+ if (this.length === 0) {
3426
+ return this;
3427
+ }
3428
+ this.indentBefore = true;
3429
+ this.tail.dedentAfter = true;
3430
+ this.length += 2 * (this.newlines + 1);
3431
+ return this;
3432
+ }
3433
+ };
3434
+ var EMPTY = new PrintBuffer();
3435
+ function render(buffer, maxDepth) {
3436
+ let output = "";
3437
+ let text = "";
3438
+ let depth = 0;
3439
+ let indentation = "";
3440
+ let part = buffer;
3441
+ while (part !== void 0) {
3442
+ const lines = part.lines;
3443
+ if (part.indentBefore) {
3444
+ if (depth < maxDepth) {
3445
+ indentation += " ";
3446
+ text += " ";
3447
+ }
3448
+ depth++;
3449
+ }
3450
+ if (typeof lines === "string") {
3451
+ text += lines;
3452
+ } else {
3453
+ text += lines[0];
3454
+ const newline = !part.isBlockString && depth >= maxDepth ? " " : "\n" + indentation;
3455
+ for (let i = 1; i < lines.length; i++) {
3456
+ output += text;
3457
+ text = newline + lines[i];
3458
+ }
3459
+ }
3460
+ if (part.dedentAfter) {
3461
+ depth--;
3462
+ indentation = indentation.slice(0, depth * 2);
3463
+ }
3464
+ part = part.next;
3465
+ }
3466
+ return output + text;
3467
+ }
3407
3468
  var printDocASTReducer = {
3408
- Name: {
3409
- leave: (node) => node.value
3410
- },
3411
- Variable: {
3412
- leave: (node) => "$" + node.name
3413
- },
3469
+ Name: (node) => new PrintBuffer(node.value),
3470
+ Variable: (node) => join(["$", node.name]),
3414
3471
  // Document
3415
- Document: {
3416
- leave: (node) => join(node.definitions, "\n\n")
3417
- },
3418
- OperationDefinition: {
3419
- leave(node) {
3420
- const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap("(", join(node.variableDefinitions, ", "), ")");
3421
- const prefix = wrap("", node.description, "\n") + join(
3472
+ Document: (node) => join(node.definitions, "\n\n"),
3473
+ OperationDefinition(node) {
3474
+ const varDefs = hasMultilineItems(node.variableDefinitions) ? wrap("(\n", join(node.variableDefinitions, "\n"), "\n)") : wrap("(", join(node.variableDefinitions, ", "), ")");
3475
+ const prefix = join([
3476
+ wrap("", node.description, "\n"),
3477
+ join(
3422
3478
  [
3423
3479
  node.operation,
3424
3480
  join([node.name, varDefs]),
3425
3481
  join(node.directives, " ")
3426
3482
  ],
3427
3483
  " "
3428
- );
3429
- return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
3430
- }
3431
- },
3432
- VariableDefinition: {
3433
- leave: ({ variable, type, defaultValue, directives, description }) => wrap("", description, "\n") + variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join(directives, " "))
3434
- },
3435
- SelectionSet: {
3436
- leave: ({ selections }) => block(selections)
3437
- },
3438
- Field: {
3439
- leave({ alias, name, arguments: args, directives, selectionSet }) {
3440
- const prefix = wrap("", alias, ": ") + name;
3441
- let argsLine = prefix + wrap("(", join(args, ", "), ")");
3442
- if (argsLine.length > MAX_LINE_LENGTH) {
3443
- argsLine = prefix + wrap("(\n", indent(join(args, "\n")), "\n)");
3444
- }
3445
- return join([argsLine, join(directives, " "), selectionSet], " ");
3446
- }
3484
+ )
3485
+ ]);
3486
+ return join([
3487
+ node.operation === "query" && prefix.length === node.operation.length ? "" : join([prefix, " "]),
3488
+ node.selectionSet
3489
+ ]);
3447
3490
  },
3448
- Argument: {
3449
- leave: ({ name, value }) => name + ": " + value
3491
+ VariableDefinition: ({
3492
+ variable,
3493
+ type,
3494
+ defaultValue,
3495
+ directives,
3496
+ description
3497
+ }) => join([
3498
+ wrap("", description, "\n"),
3499
+ variable,
3500
+ ": ",
3501
+ type,
3502
+ wrap(" = ", defaultValue),
3503
+ wrap(" ", join(directives, " "))
3504
+ ]),
3505
+ SelectionSet: ({ selections }) => block(selections),
3506
+ Field({ alias, name, arguments: args, directives, selectionSet }) {
3507
+ const prefix = join([wrap("", alias, ": "), name], "");
3508
+ return join([
3509
+ wrappedLineAndArgs(prefix, args),
3510
+ wrap(" ", join(directives, " ")),
3511
+ wrap(" ", selectionSet)
3512
+ ]);
3450
3513
  },
3514
+ Argument: ({ name, value }) => join([name, ": ", value]),
3451
3515
  // Fragments
3452
- FragmentSpread: {
3453
- leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
3454
- },
3455
- InlineFragment: {
3456
- leave: ({ typeCondition, directives, selectionSet }) => join(
3457
- [
3458
- "...",
3459
- wrap("on ", typeCondition),
3460
- join(directives, " "),
3461
- selectionSet
3462
- ],
3463
- " "
3464
- )
3465
- },
3466
- FragmentDefinition: {
3467
- leave: ({
3468
- name,
3469
- typeCondition,
3470
- variableDefinitions,
3471
- directives,
3472
- selectionSet,
3473
- description
3474
- }) => wrap("", description, "\n") + // Note: fragment variable definitions are experimental and may be changed
3516
+ FragmentSpread: ({ name, directives }) => join(["...", name, wrap(" ", join(directives, " "))]),
3517
+ InlineFragment: ({ typeCondition, directives, selectionSet }) => join(
3518
+ ["...", wrap("on ", typeCondition), join(directives, " "), selectionSet],
3519
+ " "
3520
+ ),
3521
+ FragmentDefinition: ({
3522
+ name,
3523
+ typeCondition,
3524
+ variableDefinitions,
3525
+ directives,
3526
+ selectionSet,
3527
+ description
3528
+ }) => join([
3529
+ wrap("", description, "\n"),
3530
+ // Note: fragment variable definitions are experimental and may be changed
3475
3531
  // or removed in the future.
3476
- `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
3477
- },
3532
+ "fragment ",
3533
+ name,
3534
+ wrap("(", join(variableDefinitions, ", "), ")"),
3535
+ " on ",
3536
+ typeCondition,
3537
+ " ",
3538
+ wrap("", join(directives, " "), " "),
3539
+ selectionSet
3540
+ ]),
3478
3541
  // Value
3479
- IntValue: {
3480
- leave: ({ value }) => value
3481
- },
3482
- FloatValue: {
3483
- leave: ({ value }) => value
3484
- },
3485
- StringValue: {
3486
- leave: ({ value, block: isBlockString }) => isBlockString ? printBlockString(value) : printString(value)
3487
- },
3488
- BooleanValue: {
3489
- leave: ({ value }) => value ? "true" : "false"
3490
- },
3491
- NullValue: {
3492
- leave: () => "null"
3493
- },
3494
- EnumValue: {
3495
- leave: ({ value }) => value
3496
- },
3497
- ListValue: {
3498
- leave: ({ values }) => "[" + join(values, ", ") + "]"
3499
- },
3500
- ObjectValue: {
3501
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
3502
- },
3503
- ObjectField: {
3504
- leave: ({ name, value }) => name + ": " + value
3505
- },
3542
+ IntValue: ({ value }) => new PrintBuffer(value),
3543
+ FloatValue: ({ value }) => new PrintBuffer(value),
3544
+ StringValue: ({ value, block: isBlockString }) => new PrintBuffer(
3545
+ isBlockString === true ? printBlockString(value) : printString(value),
3546
+ isBlockString === true
3547
+ ),
3548
+ BooleanValue: ({ value }) => new PrintBuffer(value ? "true" : "false"),
3549
+ NullValue: () => new PrintBuffer("null"),
3550
+ EnumValue: ({ value }) => new PrintBuffer(value),
3551
+ ListValue: ({ values }) => join(["[", join(values, ", "), "]"]),
3552
+ ObjectValue: ({ fields }) => join(["{", join(fields, ", "), "}"]),
3553
+ ObjectField: ({ name, value }) => join([name, ": ", value]),
3506
3554
  // Directive
3507
- Directive: {
3508
- leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
3509
- },
3555
+ Directive: ({ name, arguments: args }) => join(["@", name, wrap("(", join(args, ", "), ")")]),
3510
3556
  // Type
3511
- NamedType: {
3512
- leave: ({ name }) => name
3513
- },
3514
- ListType: {
3515
- leave: ({ type }) => "[" + type + "]"
3516
- },
3517
- NonNullType: {
3518
- leave: ({ type }) => type + "!"
3519
- },
3557
+ NamedType: ({ name }) => name,
3558
+ ListType: ({ type }) => join(["[", type, "]"]),
3559
+ NonNullType: ({ type }) => join([type, "!"]),
3520
3560
  // Type System Definitions
3521
- SchemaDefinition: {
3522
- leave: ({ description, directives, operationTypes }) => wrap("", description, "\n") + join(["schema", join(directives, " "), block(operationTypes)], " ")
3523
- },
3524
- OperationTypeDefinition: {
3525
- leave: ({ operation, type }) => operation + ": " + type
3526
- },
3527
- ScalarTypeDefinition: {
3528
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join(["scalar", name, join(directives, " ")], " ")
3529
- },
3530
- ObjectTypeDefinition: {
3531
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
3561
+ SchemaDefinition: ({ description, directives, operationTypes }) => join([
3562
+ wrap("", description, "\n"),
3563
+ join(["schema", join(directives, " "), block(operationTypes)], " ")
3564
+ ]),
3565
+ OperationTypeDefinition: ({ operation, type }) => join([operation, ": ", type]),
3566
+ ScalarTypeDefinition: ({ description, name, directives }) => join([
3567
+ wrap("", description, "\n"),
3568
+ join(["scalar", name, join(directives, " ")], " ")
3569
+ ]),
3570
+ ObjectTypeDefinition: ({
3571
+ description,
3572
+ name,
3573
+ interfaces,
3574
+ directives,
3575
+ fields
3576
+ }) => join([
3577
+ wrap("", description, "\n"),
3578
+ join(
3532
3579
  [
3533
3580
  "type",
3534
3581
  name,
@@ -3538,18 +3585,38 @@ var printDocASTReducer = {
3538
3585
  ],
3539
3586
  " "
3540
3587
  )
3541
- },
3542
- FieldDefinition: {
3543
- leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, "\n") + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + ": " + type + wrap(" ", join(directives, " "))
3544
- },
3545
- InputValueDefinition: {
3546
- leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, "\n") + join(
3547
- [name + ": " + type, wrap("= ", defaultValue), join(directives, " ")],
3548
- " "
3549
- )
3550
- },
3551
- InterfaceTypeDefinition: {
3552
- leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, "\n") + join(
3588
+ ]),
3589
+ FieldDefinition: ({ description, name, arguments: args, type, directives }) => join([
3590
+ wrap("", description, "\n"),
3591
+ name,
3592
+ hasMultilineItems(args) ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")"),
3593
+ ": ",
3594
+ type,
3595
+ wrap(" ", join(directives, " "))
3596
+ ]),
3597
+ InputValueDefinition: ({
3598
+ description,
3599
+ name,
3600
+ type,
3601
+ defaultValue,
3602
+ directives
3603
+ }) => join([
3604
+ wrap("", description, "\n"),
3605
+ name,
3606
+ ": ",
3607
+ type,
3608
+ wrap(" = ", defaultValue),
3609
+ wrap(" ", join(directives, " "))
3610
+ ]),
3611
+ InterfaceTypeDefinition: ({
3612
+ description,
3613
+ name,
3614
+ interfaces,
3615
+ directives,
3616
+ fields
3617
+ }) => join([
3618
+ wrap("", description, "\n"),
3619
+ join(
3553
3620
  [
3554
3621
  "interface",
3555
3622
  name,
@@ -3559,118 +3626,131 @@ var printDocASTReducer = {
3559
3626
  ],
3560
3627
  " "
3561
3628
  )
3562
- },
3563
- UnionTypeDefinition: {
3564
- leave: ({ description, name, directives, types }) => wrap("", description, "\n") + join(
3629
+ ]),
3630
+ UnionTypeDefinition: ({ description, name, directives, types }) => join([
3631
+ wrap("", description, "\n"),
3632
+ join(
3565
3633
  ["union", name, join(directives, " "), wrap("= ", join(types, " | "))],
3566
3634
  " "
3567
3635
  )
3568
- },
3569
- EnumTypeDefinition: {
3570
- leave: ({ description, name, directives, values }) => wrap("", description, "\n") + join(["enum", name, join(directives, " "), block(values)], " ")
3571
- },
3572
- EnumValueDefinition: {
3573
- leave: ({ description, name, directives }) => wrap("", description, "\n") + join([name, join(directives, " ")], " ")
3574
- },
3575
- InputObjectTypeDefinition: {
3576
- leave: ({ description, name, directives, fields }) => wrap("", description, "\n") + join(["input", name, join(directives, " "), block(fields)], " ")
3577
- },
3578
- DirectiveDefinition: {
3579
- leave: ({
3580
- description,
3636
+ ]),
3637
+ EnumTypeDefinition: ({ description, name, directives, values }) => join([
3638
+ wrap("", description, "\n"),
3639
+ join(["enum", name, join(directives, " "), block(values)], " ")
3640
+ ]),
3641
+ EnumValueDefinition: ({ description, name, directives }) => join([
3642
+ wrap("", description, "\n"),
3643
+ join([name, join(directives, " ")], " ")
3644
+ ]),
3645
+ InputObjectTypeDefinition: ({ description, name, directives, fields }) => join([
3646
+ wrap("", description, "\n"),
3647
+ join(["input", name, join(directives, " "), block(fields)], " ")
3648
+ ]),
3649
+ DirectiveDefinition: ({
3650
+ description,
3651
+ name,
3652
+ arguments: args,
3653
+ directives,
3654
+ repeatable,
3655
+ locations
3656
+ }) => join([
3657
+ wrap("", description, "\n"),
3658
+ "directive @",
3659
+ name,
3660
+ hasMultilineItems(args) ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")"),
3661
+ wrap(" ", join(directives, " ")),
3662
+ repeatable ? " repeatable" : "",
3663
+ " on ",
3664
+ join(locations, " | ")
3665
+ ]),
3666
+ SchemaExtension: ({ directives, operationTypes }) => join(["extend schema", join(directives, " "), block(operationTypes)], " "),
3667
+ ScalarTypeExtension: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " "),
3668
+ ObjectTypeExtension: ({ name, interfaces, directives, fields }) => join(
3669
+ [
3670
+ "extend type",
3581
3671
  name,
3582
- arguments: args,
3583
- directives,
3584
- repeatable,
3585
- locations
3586
- }) => wrap("", description, "\n") + "directive @" + name + (hasMultilineItems(args) ? wrap("(\n", indent(join(args, "\n")), "\n)") : wrap("(", join(args, ", "), ")")) + wrap(" ", join(directives, " ")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
3587
- },
3588
- SchemaExtension: {
3589
- leave: ({ directives, operationTypes }) => join(
3590
- ["extend schema", join(directives, " "), block(operationTypes)],
3591
- " "
3592
- )
3593
- },
3594
- ScalarTypeExtension: {
3595
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
3596
- },
3597
- ObjectTypeExtension: {
3598
- leave: ({ name, interfaces, directives, fields }) => join(
3599
- [
3600
- "extend type",
3601
- name,
3602
- wrap("implements ", join(interfaces, " & ")),
3603
- join(directives, " "),
3604
- block(fields)
3605
- ],
3606
- " "
3607
- )
3608
- },
3609
- InterfaceTypeExtension: {
3610
- leave: ({ name, interfaces, directives, fields }) => join(
3611
- [
3612
- "extend interface",
3613
- name,
3614
- wrap("implements ", join(interfaces, " & ")),
3615
- join(directives, " "),
3616
- block(fields)
3617
- ],
3618
- " "
3619
- )
3620
- },
3621
- UnionTypeExtension: {
3622
- leave: ({ name, directives, types }) => join(
3623
- [
3624
- "extend union",
3625
- name,
3626
- join(directives, " "),
3627
- wrap("= ", join(types, " | "))
3628
- ],
3629
- " "
3630
- )
3631
- },
3632
- EnumTypeExtension: {
3633
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
3634
- },
3635
- InputObjectTypeExtension: {
3636
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
3637
- },
3638
- DirectiveExtension: {
3639
- leave: ({ name, directives }) => join(["extend directive @" + name, join(directives, " ")], " ")
3640
- },
3672
+ wrap("implements ", join(interfaces, " & ")),
3673
+ join(directives, " "),
3674
+ block(fields)
3675
+ ],
3676
+ " "
3677
+ ),
3678
+ InterfaceTypeExtension: ({ name, interfaces, directives, fields }) => join(
3679
+ [
3680
+ "extend interface",
3681
+ name,
3682
+ wrap("implements ", join(interfaces, " & ")),
3683
+ join(directives, " "),
3684
+ block(fields)
3685
+ ],
3686
+ " "
3687
+ ),
3688
+ UnionTypeExtension: ({ name, directives, types }) => join(
3689
+ [
3690
+ "extend union",
3691
+ name,
3692
+ join(directives, " "),
3693
+ wrap("= ", join(types, " | "))
3694
+ ],
3695
+ " "
3696
+ ),
3697
+ EnumTypeExtension: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " "),
3698
+ InputObjectTypeExtension: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " "),
3699
+ DirectiveExtension: ({ name, directives }) => join([join(["extend directive @", name]), join(directives, " ")], " "),
3641
3700
  // Schema Coordinates
3642
- TypeCoordinate: {
3643
- leave: ({ name }) => name
3644
- },
3645
- MemberCoordinate: {
3646
- leave: ({ name, memberName }) => join([name, wrap(".", memberName)])
3647
- },
3648
- ArgumentCoordinate: {
3649
- leave: ({ name, fieldName, argumentName }) => join([name, wrap(".", fieldName), wrap("(", argumentName, ":)")])
3650
- },
3651
- DirectiveCoordinate: {
3652
- leave: ({ name }) => join(["@", name])
3653
- },
3654
- DirectiveArgumentCoordinate: {
3655
- leave: ({ name, argumentName }) => join(["@", name, wrap("(", argumentName, ":)")])
3656
- }
3701
+ TypeCoordinate: ({ name }) => name,
3702
+ MemberCoordinate: ({ name, memberName }) => join([name, wrap(".", memberName)]),
3703
+ ArgumentCoordinate: ({ name, fieldName, argumentName }) => join([name, wrap(".", fieldName), wrap("(", argumentName, ":)")]),
3704
+ DirectiveCoordinate: ({ name }) => join(["@", name]),
3705
+ DirectiveArgumentCoordinate: ({ name, argumentName }) => join(["@", name, wrap("(", argumentName, ":)")])
3657
3706
  };
3658
3707
  function join(maybeArray, separator = "") {
3659
- var _maybeArray$filter$jo;
3660
- return (_maybeArray$filter$jo = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== void 0 ? _maybeArray$filter$jo : "";
3708
+ if (maybeArray == null || maybeArray.length === 0) {
3709
+ return EMPTY;
3710
+ }
3711
+ let result = EMPTY;
3712
+ for (const item of maybeArray) {
3713
+ if (item === void 0 || item.length === 0) {
3714
+ continue;
3715
+ }
3716
+ if (result.length === 0) {
3717
+ result = typeof item === "string" ? new PrintBuffer(item) : item;
3718
+ } else {
3719
+ if (separator !== "") {
3720
+ result.append(separator);
3721
+ }
3722
+ result.append(item);
3723
+ }
3724
+ }
3725
+ return result;
3661
3726
  }
3662
- function block(array) {
3663
- return wrap("{\n", indent(join(array, "\n")), "\n}");
3727
+ function joinedLength(array, separator) {
3728
+ let length = 0;
3729
+ for (const item of array) {
3730
+ if (item.length !== 0) {
3731
+ length += (length === 0 ? 0 : separator.length) + item.length;
3732
+ }
3733
+ }
3734
+ return length;
3664
3735
  }
3665
- function wrap(start, maybeString, end = "") {
3666
- return maybeString != null && maybeString !== "" ? start + maybeString + end : "";
3736
+ function block(array) {
3737
+ return wrap("{\n", join(array, "\n").indent(), "\n}");
3667
3738
  }
3668
- function indent(str) {
3669
- return wrap(" ", str.replace(/\n/g, "\n "));
3739
+ function wrap(start, maybeBuffer, end = "") {
3740
+ return maybeBuffer != null && maybeBuffer.length !== 0 ? start === "" ? maybeBuffer.append(end) : new PrintBuffer(start).append(maybeBuffer).append(end) : EMPTY;
3670
3741
  }
3671
3742
  function hasMultilineItems(maybeArray) {
3672
3743
  var _maybeArray$some;
3673
- return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((str) => str.includes("\n"))) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
3744
+ return (_maybeArray$some = maybeArray === null || maybeArray === void 0 ? void 0 : maybeArray.some((result) => result.newlines !== 0)) !== null && _maybeArray$some !== void 0 ? _maybeArray$some : false;
3745
+ }
3746
+ function wrappedLineAndArgs(prefix, args) {
3747
+ if (args == null || args.length === 0) {
3748
+ return prefix;
3749
+ }
3750
+ return join([
3751
+ prefix,
3752
+ prefix.length + joinedLength(args, ", ") + 2 > MAX_LINE_LENGTH ? wrap("(\n", join(args, "\n").indent(), "\n)") : wrap("(", join(args, ", "), ")")
3753
+ ]);
3674
3754
  }
3675
3755
 
3676
3756
  var silentLogger = {};
@@ -5481,7 +5561,7 @@ var UnsuspendAppAccessDocument = { "kind": "Document", "definitions": [{ "kind":
5481
5561
  var ResyncTierGridPermissionsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "ResyncTierGridPermissions" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "resyncTierGridPermissions" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }] }] } }] };
5482
5562
  var TierFeaturesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "TierFeatures" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "gameModelTierFeatures" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "tierId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tierId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "featureKey" } }] } }] } }] };
5483
5563
  var UpdateAccessTierDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateAccessTier" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateAccessTierInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateAccessTier" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "tierId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "tierId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "tierId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "tierOrder" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isFree" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isDefault" } }, { "kind": "Field", "name": { "kind": "Name", "value": "priceCents" } }, { "kind": "Field", "name": { "kind": "Name", "value": "currency" } }, { "kind": "Field", "name": { "kind": "Name", "value": "billingPeriod" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "permissionKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
5484
- var AppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "App" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "app" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVoice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVideo" } }, { "kind": "Field", "name": { "kind": "Name", "value": "recording" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "video" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "minPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveMinPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hasSafetyModerator" } }, { "kind": "Field", "name": { "kind": "Name", "value": "claimOwnerKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deploymentTarget" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reservedUdpBytesPerSec" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reservedGraphqlOpsPerSec" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeStatus" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeDenialReason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "launchUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "redirectUris" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isTrusted" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
5564
+ var AppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "App" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "app" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVoice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVideo" } }, { "kind": "Field", "name": { "kind": "Name", "value": "recording" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "video" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "minPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveMinPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "idleTimeoutSeconds" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveIdleTimeoutSeconds" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hasSafetyModerator" } }, { "kind": "Field", "name": { "kind": "Name", "value": "claimOwnerKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "deploymentTarget" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reservedUdpBytesPerSec" } }, { "kind": "Field", "name": { "kind": "Name", "value": "reservedGraphqlOpsPerSec" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeStatus" } }, { "kind": "Field", "name": { "kind": "Name", "value": "runtimeDenialReason" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "launchUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "redirectUris" } }, { "kind": "Field", "name": { "kind": "Name", "value": "isTrusted" } }, { "kind": "Field", "name": { "kind": "Name", "value": "clientType" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
5485
5565
  var AppBySlugDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppBySlug" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appSlug" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appBySlug" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "orgSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "orgSlug" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "appSlug" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appSlug" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
5486
5566
  var AppDiscoveryDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppDiscovery" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appIds" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appDiscovery" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appIds" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appIds" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "datacenterCode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiWsUrl" } }] } }] } }] };
5487
5567
  var AppRecordingDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "AppRecording" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "app" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "recording" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "video" } }] } }] } }] } }] };
@@ -5498,7 +5578,7 @@ var AppsConnectionDocument = { "kind": "Document", "definitions": [{ "kind": "Op
5498
5578
  var MyAppsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "MyApps" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "myApps" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "splitMode" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "org" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }] } }] } }] } }] };
5499
5579
  var PlaceableDatacentersDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "PlaceableDatacenters" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "placeableDatacenters" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "placementEnforced" } }, { "kind": "Field", "name": { "kind": "Name", "value": "servedBy" } }, { "kind": "Field", "name": { "kind": "Name", "value": "datacenters" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "code" } }, { "kind": "Field", "name": { "kind": "Name", "value": "placeable" } }, { "kind": "Field", "name": { "kind": "Name", "value": "serving" } }, { "kind": "Field", "name": { "kind": "Name", "value": "appShardCount" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gameApiWsUrl" } }] } }] } }] } }] };
5500
5580
  var SetAppRequiredDocumentsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "SetAppRequiredDocuments" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "documents" } }, "type": { "kind": "NonNullType", "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "AppRequiredDocumentInput" } } } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "setAppRequiredDocuments" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "documents" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "documents" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "documentId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "version" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "url" } }, { "kind": "Field", "name": { "kind": "Name", "value": "appId" } }] } }] } }] };
5501
- var UpdateAppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateApp" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateAppInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateApp" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVoice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVideo" } }, { "kind": "Field", "name": { "kind": "Name", "value": "recording" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "video" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "minPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveMinPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hasSafetyModerator" } }, { "kind": "Field", "name": { "kind": "Name", "value": "claimOwnerKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
5581
+ var UpdateAppDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "UpdateApp" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "UpdateAppInput" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "updateApp" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "appId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "appId" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "input" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "input" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "appId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "orgId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "slug" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "visibility" } }, { "kind": "Field", "name": { "kind": "Name", "value": "status" } }, { "kind": "Field", "name": { "kind": "Name", "value": "metadata" } }, { "kind": "Field", "name": { "kind": "Name", "value": "wildernessWritesOpen" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingEnabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVoice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "replayLoggingRecordsVideo" } }, { "kind": "Field", "name": { "kind": "Name", "value": "recording" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "enabled" } }, { "kind": "Field", "name": { "kind": "Name", "value": "voice" } }, { "kind": "Field", "name": { "kind": "Name", "value": "video" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "minPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveMinPlayerAge" } }, { "kind": "Field", "name": { "kind": "Name", "value": "idleTimeoutSeconds" } }, { "kind": "Field", "name": { "kind": "Name", "value": "effectiveIdleTimeoutSeconds" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hasSafetyModerator" } }, { "kind": "Field", "name": { "kind": "Name", "value": "claimOwnerKeys" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
5502
5582
  var LogoutDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "Logout" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "logout" } }] } }] };
5503
5583
  var LogoutAllDevicesDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "mutation", "name": { "kind": "Name", "value": "LogoutAllDevices" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "logoutAllDevices" } }] } }] };
5504
5584
  var UserAvatarsDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "UserAvatars" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "BigInt" } } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "userAvatars" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "userId" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "userId" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "avatarId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "userId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicState" } }, { "kind": "Field", "name": { "kind": "Name", "value": "privateState" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }] } }] } }] };
@@ -6428,6 +6508,7 @@ function walkBundleMembers(bytes, end) {
6428
6508
 
6429
6509
  var RELAY_SUBPROTOCOL = "crowdy-relay-v1";
6430
6510
  var BEARER_PREFIX = "bearer.";
6511
+ var GAMEPLAY_IDLE_CLOSE_CODE = 4410;
6431
6512
  var UNAVAILABLE_AFTER_FAILURES = 2;
6432
6513
  var UNAVAILABLE_AFTER_RECONNECT_FAILURES = 3;
6433
6514
  function isSameEstate(current, candidate) {
@@ -6677,6 +6758,11 @@ var BinaryRelayTransport = class {
6677
6758
  this.callbacks.onStatus("disconnected");
6678
6759
  return;
6679
6760
  }
6761
+ if (event.code === GAMEPLAY_IDLE_CLOSE_CODE) {
6762
+ this.desired = false;
6763
+ this.callbacks.onStatus("inactive");
6764
+ return;
6765
+ }
6680
6766
  if (!hadReady) {
6681
6767
  this.preReadyFailures += 1;
6682
6768
  const limit = this.everReady ? UNAVAILABLE_AFTER_RECONNECT_FAILURES : UNAVAILABLE_AFTER_FAILURES;
@@ -6889,8 +6975,9 @@ var RealtimeClient = class {
6889
6975
  /**
6890
6976
  * Mark the connection as desired and open the subscription if it isn't
6891
6977
  * already open. You usually don't call this directly — {@link subscribe}
6892
- * calls it for you; use it (or `client.realtime.connect()`) only to pre-warm
6893
- * the socket.
6978
+ * calls it for you; use it (or `client.realtime.connect()`) to pre-warm the
6979
+ * socket, and to come back after the status is `inactive` (the session was
6980
+ * released for idleness) once the player acts again.
6894
6981
  *
6895
6982
  * @throws {CrowdyRealtimeError} `AUTH_REQUIRED` if there is no session token.
6896
6983
  */
@@ -7342,6 +7429,8 @@ var RealtimeClient = class {
7342
7429
  onNotification: (notification) => this.dispatch(notification),
7343
7430
  onError: (error) => this.dispatchError(error),
7344
7431
  onStatus: (status) => {
7432
+ if (status === "inactive")
7433
+ this.desired = false;
7345
7434
  if (status === "disconnected" && this.desired)
7346
7435
  return;
7347
7436
  this.setStatus(status);
@@ -7548,7 +7637,7 @@ var RealtimeClient = class {
7548
7637
  }
7549
7638
  if (notification.__typename === "RealtimeConnectionEvent" && notification.retryable === false) {
7550
7639
  this.desired = false;
7551
- this.setStatus("failed");
7640
+ this.setStatus(notification.code === IDLE_TIMEOUT_CODE ? "inactive" : "failed");
7552
7641
  }
7553
7642
  for (const handlers of [...this.subscribers.values()]) {
7554
7643
  try {
@@ -7687,6 +7776,7 @@ function notificationKind(typename) {
7687
7776
  return NOTIFICATION_KINDS[typename] ?? typename;
7688
7777
  }
7689
7778
  var SERVER_DRAINING_CODE = "SERVER_DRAINING";
7779
+ var IDLE_TIMEOUT_CODE = "IDLE_TIMEOUT";
7690
7780
  function httpToWebsocketUrl(httpUrl) {
7691
7781
  const trimmed = httpUrl?.trim();
7692
7782
  if (!trimmed)
@@ -13821,6 +13911,12 @@ var AppsAPI = class {
13821
13911
  * it to the platform's, and `effectiveMinPlayerAge` reads the result. Younger players
13822
13912
  * are refused `AGE_REQUIREMENT_NOT_MET` at their next mint or refresh.
13823
13913
  *
13914
+ * `idleTimeoutSeconds` (ck-api v2.64.0) is how long a realtime session may go without
13915
+ * gameplay input before the replication server releases it: 60 to 86400, `0` for never,
13916
+ * `null` for the platform default (900); `effectiveIdleTimeoutSeconds` reads the result. A
13917
+ * released player's realtime status becomes `inactive` and nothing reconnects until the
13918
+ * game calls `client.realtime.connect()`. Takes effect within about 15 seconds.
13919
+ *
13824
13920
  * App reads and this update also return `hasSafetyModerator` (ck-api v2.61.0): whether the
13825
13921
  * organization has appointed a safety moderator, a member whose own role grants
13826
13922
  * `moderate_safety` (an admin alone does not count). An app that admits players under 18
@@ -15591,12 +15687,6 @@ var SharedEnvironmentAPI = class {
15591
15687
  * byte is metered from the first one whether or not you hold a reservation:
15592
15688
  * reserving 5 MB/s does not make the first 5 MB/s free.
15593
15689
  *
15594
- * **It is not how you lift the free-tier cap.** Unfunded free apps are shaped
15595
- * at roughly 1 MB/s. That shaping is lifted by funding the org wallet or
15596
- * enabling auto-billing ({@link setAutoBilling}), not by reserving — before
15597
- * 2026-09-01 a reservation did double duty as a rate-limit bypass and no longer
15598
- * does.
15599
- *
15600
15690
  * Billed monthly whether or not the capacity is used; upgrades are prorated for
15601
15691
  * the current month, and lowering or clearing a reservation charges nothing.
15602
15692
  *