@timardex/cluemart-server-shared 1.0.177 → 1.0.179

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.
@@ -1851,9 +1851,7 @@ var GraphQLError = class _GraphQLError extends Error {
1851
1851
  *
1852
1852
  * Enumerable, and appears in the result of JSON.stringify().
1853
1853
  */
1854
- /**
1855
- * An array of GraphQL AST Nodes corresponding to this error.
1856
- */
1854
+ /** An array of GraphQL AST Nodes corresponding to this error. */
1857
1855
  /**
1858
1856
  * The source GraphQL document for the first location of this error.
1859
1857
  *
@@ -1864,13 +1862,89 @@ var GraphQLError = class _GraphQLError extends Error {
1864
1862
  * An array of character offsets within the source GraphQL document
1865
1863
  * which correspond to this error.
1866
1864
  */
1865
+ /** Original error that caused this GraphQLError, if one exists. */
1866
+ /** Extension fields to add to the formatted error. */
1867
1867
  /**
1868
- * The original error thrown from a field resolver during execution.
1869
- */
1870
- /**
1871
- * Extension fields to add to the formatted error.
1868
+ * Creates a GraphQLError instance.
1869
+ * @param message - Human-readable error message.
1870
+ * @param options - Error metadata such as source locations, response path, original error, and extensions.
1871
+ * This positional-arguments constructor overload is deprecated. Use the
1872
+ * `GraphQLError(message, options)` overload instead.
1873
+ * @example
1874
+ * ```ts
1875
+ * // Create an error from AST nodes and response metadata.
1876
+ * import { parse } from 'graphql/language';
1877
+ * import { GraphQLError } from 'graphql/error';
1878
+ *
1879
+ * const document = parse('{ greeting }');
1880
+ * const fieldNode = document.definitions[0].selectionSet.selections[0];
1881
+ * const error = new GraphQLError('Cannot query this field.', {
1882
+ * nodes: fieldNode,
1883
+ * path: ['greeting'],
1884
+ * extensions: { code: 'FORBIDDEN' },
1885
+ * });
1886
+ *
1887
+ * error.message; // => 'Cannot query this field.'
1888
+ * error.locations; // => [{ line: 1, column: 3 }]
1889
+ * error.path; // => ['greeting']
1890
+ * error.extensions; // => { code: 'FORBIDDEN' }
1891
+ * ```
1892
+ * @example
1893
+ * ```ts
1894
+ * // This variant derives locations from source positions and preserves the original error.
1895
+ * import { Source } from 'graphql/language';
1896
+ * import { GraphQLError } from 'graphql/error';
1897
+ *
1898
+ * const source = new Source('{ greeting }');
1899
+ * const originalError = new Error('Database unavailable.');
1900
+ * const error = new GraphQLError('Resolver failed.', {
1901
+ * source,
1902
+ * positions: [2],
1903
+ * path: ['greeting'],
1904
+ * originalError,
1905
+ * });
1906
+ *
1907
+ * error.locations; // => [{ line: 1, column: 3 }]
1908
+ * error.path; // => ['greeting']
1909
+ * error.originalError; // => originalError
1910
+ * ```
1872
1911
  */
1873
1912
  /**
1913
+ * Creates a GraphQLError instance using the legacy positional constructor.
1914
+ * This deprecated overload will be removed in v17. Prefer the
1915
+ * `GraphQLErrorOptions` object overload, which keeps optional error metadata
1916
+ * in a single options bag.
1917
+ * @param message - Human-readable error message.
1918
+ * @param nodes - AST node or nodes associated with this error.
1919
+ * @param source - Source document used to derive error locations.
1920
+ * @param positions - Character offsets in the source document associated with
1921
+ * this error.
1922
+ * @param path - Response path where this error occurred during execution.
1923
+ * @param originalError - Original error that caused this GraphQLError, if one
1924
+ * exists.
1925
+ * @param extensions - Extension fields to include in the formatted error.
1926
+ * @example
1927
+ * ```ts
1928
+ * import { Source } from 'graphql/language';
1929
+ * import { GraphQLError } from 'graphql/error';
1930
+ *
1931
+ * const source = new Source('{ greeting }');
1932
+ * const originalError = new Error('Database unavailable.');
1933
+ * const error = new GraphQLError(
1934
+ * 'Resolver failed.',
1935
+ * undefined,
1936
+ * source,
1937
+ * [2],
1938
+ * ['greeting'],
1939
+ * originalError,
1940
+ * { code: 'INTERNAL' },
1941
+ * );
1942
+ *
1943
+ * error.locations; // => [{ line: 1, column: 3 }]
1944
+ * error.path; // => ['greeting']
1945
+ * error.originalError; // => originalError
1946
+ * error.extensions; // => { code: 'INTERNAL' }
1947
+ * ```
1874
1948
  * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead.
1875
1949
  */
1876
1950
  constructor(message, ...rawArgs) {
@@ -1930,9 +2004,29 @@ var GraphQLError = class _GraphQLError extends Error {
1930
2004
  });
1931
2005
  }
1932
2006
  }
2007
+ /**
2008
+ * Returns the value used by `Object.prototype.toString`.
2009
+ * @returns The built-in string tag for this object.
2010
+ */
1933
2011
  get [Symbol.toStringTag]() {
1934
2012
  return "GraphQLError";
1935
2013
  }
2014
+ /**
2015
+ * Returns this error as a human-readable message with source locations.
2016
+ * @returns The formatted error string.
2017
+ * @example
2018
+ * ```ts
2019
+ * import { Source } from 'graphql/language';
2020
+ * import { GraphQLError } from 'graphql/error';
2021
+ *
2022
+ * const error = new GraphQLError('Cannot query field "name".', {
2023
+ * source: new Source('{ name }'),
2024
+ * positions: [2],
2025
+ * });
2026
+ *
2027
+ * error.toString(); // => 'Cannot query field "name".\n\nGraphQL request:1:3\n1 | { name }\n | ^'
2028
+ * ```
2029
+ */
1936
2030
  toString() {
1937
2031
  let output = this.message;
1938
2032
  if (this.nodes) {
@@ -1948,6 +2042,21 @@ var GraphQLError = class _GraphQLError extends Error {
1948
2042
  }
1949
2043
  return output;
1950
2044
  }
2045
+ /**
2046
+ * Returns the JSON representation used when this object is serialized.
2047
+ * @returns The JSON-serializable representation.
2048
+ * @example
2049
+ * ```ts
2050
+ * import { GraphQLError } from 'graphql/error';
2051
+ *
2052
+ * const error = new GraphQLError('Resolver failed.', {
2053
+ * path: ['viewer', 'name'],
2054
+ * extensions: { code: 'INTERNAL' },
2055
+ * });
2056
+ *
2057
+ * error.toJSON(); // => { message: 'Resolver failed.', path: ['viewer', 'name'], extensions: { code: 'INTERNAL' } }
2058
+ * ```
2059
+ */
1951
2060
  toJSON() {
1952
2061
  const formattedError = {
1953
2062
  message: this.message
@@ -1978,20 +2087,29 @@ function syntaxError(source, position, description) {
1978
2087
 
1979
2088
  // node_modules/graphql/language/ast.mjs
1980
2089
  var Location = class {
2090
+ /** The character offset at which this Node begins. */
2091
+ /** The character offset at which this Node ends. */
2092
+ /** The Token at which this Node begins. */
2093
+ /** The Token at which this Node ends. */
2094
+ /** The Source document the AST represents. */
1981
2095
  /**
1982
- * The character offset at which this Node begins.
1983
- */
1984
- /**
1985
- * The character offset at which this Node ends.
1986
- */
1987
- /**
1988
- * The Token at which this Node begins.
1989
- */
1990
- /**
1991
- * The Token at which this Node ends.
1992
- */
1993
- /**
1994
- * The Source document the AST represents.
2096
+ * Creates a Location instance.
2097
+ * @param startToken - The start token.
2098
+ * @param endToken - The end token.
2099
+ * @param source - Source document used to derive error locations.
2100
+ * @example
2101
+ * ```ts
2102
+ * import { Location, Source, Token, TokenKind } from 'graphql/language';
2103
+ *
2104
+ * const source = new Source('{ hello }');
2105
+ * const startToken = new Token(TokenKind.BRACE_L, 0, 1, 1, 1);
2106
+ * const endToken = new Token(TokenKind.BRACE_R, 8, 9, 1, 9);
2107
+ * const location = new Location(startToken, endToken, source);
2108
+ *
2109
+ * location.start; // => 0
2110
+ * location.end; // => 9
2111
+ * location.source.body; // => '{ hello }'
2112
+ * ```
1995
2113
  */
1996
2114
  constructor(startToken, endToken, source) {
1997
2115
  this.start = startToken.start;
@@ -2000,9 +2118,26 @@ var Location = class {
2000
2118
  this.endToken = endToken;
2001
2119
  this.source = source;
2002
2120
  }
2121
+ /**
2122
+ * Returns the value used by `Object.prototype.toString`.
2123
+ * @returns The built-in string tag for this object.
2124
+ */
2003
2125
  get [Symbol.toStringTag]() {
2004
2126
  return "Location";
2005
2127
  }
2128
+ /**
2129
+ * Returns a JSON representation of this location.
2130
+ * @returns The JSON-serializable representation.
2131
+ * @example
2132
+ * ```ts
2133
+ * import { parse } from 'graphql/language';
2134
+ *
2135
+ * const document = parse('{ hello }');
2136
+ * const location = document.loc?.toJSON();
2137
+ *
2138
+ * location; // => { start: 0, end: 9 }
2139
+ * ```
2140
+ */
2006
2141
  toJSON() {
2007
2142
  return {
2008
2143
  start: this.start,
@@ -2011,21 +2146,11 @@ var Location = class {
2011
2146
  }
2012
2147
  };
2013
2148
  var Token = class {
2014
- /**
2015
- * The kind of Token.
2016
- */
2017
- /**
2018
- * The character offset at which this Node begins.
2019
- */
2020
- /**
2021
- * The character offset at which this Node ends.
2022
- */
2023
- /**
2024
- * The 1-indexed line number on which this Token appears.
2025
- */
2026
- /**
2027
- * The 1-indexed column number at which this Token begins.
2028
- */
2149
+ /** The kind of Token. */
2150
+ /** The character offset at which this Node begins. */
2151
+ /** The character offset at which this Node ends. */
2152
+ /** The 1-indexed line number on which this Token appears. */
2153
+ /** The 1-indexed column number at which this Token begins. */
2029
2154
  /**
2030
2155
  * For non-punctuation tokens, represents the interpreted value of the token.
2031
2156
  *
@@ -2037,6 +2162,26 @@ var Token = class {
2037
2162
  * including ignored tokens. <SOF> is always the first node and <EOF>
2038
2163
  * the last.
2039
2164
  */
2165
+ /** Next token in the token stream, including ignored tokens. */
2166
+ /**
2167
+ * Creates a Token instance.
2168
+ * @param kind - Token kind produced by lexical analysis.
2169
+ * @param start - Character offset where this token begins.
2170
+ * @param end - Character offset where this token ends.
2171
+ * @param line - One-indexed line number where this token begins.
2172
+ * @param column - One-indexed column number where this token begins.
2173
+ * @param value - Interpreted value for non-punctuation tokens.
2174
+ * @example
2175
+ * ```ts
2176
+ * import { Token, TokenKind } from 'graphql/language';
2177
+ *
2178
+ * const token = new Token(TokenKind.NAME, 2, 7, 1, 3, 'hello');
2179
+ *
2180
+ * token.kind; // => TokenKind.NAME
2181
+ * token.value; // => 'hello'
2182
+ * token.toJSON(); // => { kind: 'Name', value: 'hello', line: 1, column: 3 }
2183
+ * ```
2184
+ */
2040
2185
  constructor(kind, start, end, line, column, value) {
2041
2186
  this.kind = kind;
2042
2187
  this.start = start;
@@ -2047,9 +2192,26 @@ var Token = class {
2047
2192
  this.prev = null;
2048
2193
  this.next = null;
2049
2194
  }
2195
+ /**
2196
+ * Returns the value used by `Object.prototype.toString`.
2197
+ * @returns The built-in string tag for this object.
2198
+ */
2050
2199
  get [Symbol.toStringTag]() {
2051
2200
  return "Token";
2052
2201
  }
2202
+ /**
2203
+ * Returns a JSON representation of this token.
2204
+ * @returns The JSON-serializable representation.
2205
+ * @example
2206
+ * ```ts
2207
+ * import { Lexer, Source } from 'graphql/language';
2208
+ *
2209
+ * const lexer = new Lexer(new Source('{ hello }'));
2210
+ * const token = lexer.advance().toJSON();
2211
+ *
2212
+ * token; // => { kind: '{', value: undefined, line: 1, column: 1 }
2213
+ * ```
2214
+ */
2053
2215
  toJSON() {
2054
2216
  return {
2055
2217
  kind: this.kind,
@@ -2133,8 +2295,15 @@ var QueryDocumentKeys = {
2133
2295
  EnumTypeDefinition: ["description", "name", "directives", "values"],
2134
2296
  EnumValueDefinition: ["description", "name", "directives"],
2135
2297
  InputObjectTypeDefinition: ["description", "name", "directives", "fields"],
2136
- DirectiveDefinition: ["description", "name", "arguments", "locations"],
2298
+ DirectiveDefinition: [
2299
+ "description",
2300
+ "name",
2301
+ "arguments",
2302
+ "directives",
2303
+ "locations"
2304
+ ],
2137
2305
  SchemaExtension: ["directives", "operationTypes"],
2306
+ DirectiveExtension: ["name", "directives"],
2138
2307
  ScalarTypeExtension: ["name", "directives"],
2139
2308
  ObjectTypeExtension: ["name", "interfaces", "directives", "fields"],
2140
2309
  InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"],
@@ -2177,6 +2346,7 @@ var DirectiveLocation;
2177
2346
  DirectiveLocation2["ENUM_VALUE"] = "ENUM_VALUE";
2178
2347
  DirectiveLocation2["INPUT_OBJECT"] = "INPUT_OBJECT";
2179
2348
  DirectiveLocation2["INPUT_FIELD_DEFINITION"] = "INPUT_FIELD_DEFINITION";
2349
+ DirectiveLocation2["DIRECTIVE_DEFINITION"] = "DIRECTIVE_DEFINITION";
2180
2350
  })(DirectiveLocation || (DirectiveLocation = {}));
2181
2351
 
2182
2352
  // node_modules/graphql/language/kinds.mjs
@@ -2219,6 +2389,7 @@ var Kind;
2219
2389
  Kind2["INPUT_OBJECT_TYPE_DEFINITION"] = "InputObjectTypeDefinition";
2220
2390
  Kind2["DIRECTIVE_DEFINITION"] = "DirectiveDefinition";
2221
2391
  Kind2["SCHEMA_EXTENSION"] = "SchemaExtension";
2392
+ Kind2["DIRECTIVE_EXTENSION"] = "DirectiveExtension";
2222
2393
  Kind2["SCALAR_TYPE_EXTENSION"] = "ScalarTypeExtension";
2223
2394
  Kind2["OBJECT_TYPE_EXTENSION"] = "ObjectTypeExtension";
2224
2395
  Kind2["INTERFACE_TYPE_EXTENSION"] = "InterfaceTypeExtension";
@@ -2312,17 +2483,25 @@ var TokenKind;
2312
2483
 
2313
2484
  // node_modules/graphql/language/lexer.mjs
2314
2485
  var Lexer = class {
2486
+ /** Source document used to derive error locations. */
2487
+ /** Most recent non-ignored token returned by the lexer. */
2488
+ /** Current non-ignored token at the lexer cursor. */
2489
+ /** The (1-indexed) line containing the current token. */
2490
+ /** Character offset where the current line starts. */
2315
2491
  /**
2316
- * The previously focused non-ignored token.
2317
- */
2318
- /**
2319
- * The currently focused non-ignored token.
2320
- */
2321
- /**
2322
- * The (1-indexed) line containing the current token.
2323
- */
2324
- /**
2325
- * The character offset at which the current line begins.
2492
+ * Creates a Lexer instance.
2493
+ * @param source - Source document used to derive error locations.
2494
+ * @example
2495
+ * ```ts
2496
+ * import { Lexer, Source, TokenKind } from 'graphql/language';
2497
+ *
2498
+ * const lexer = new Lexer(new Source('{ hello }'));
2499
+ *
2500
+ * lexer.token.kind; // => TokenKind.SOF
2501
+ * lexer.advance().kind; // => TokenKind.BRACE_L
2502
+ * lexer.advance().value; // => 'hello'
2503
+ * lexer.advance().kind; // => TokenKind.BRACE_R
2504
+ * ```
2326
2505
  */
2327
2506
  constructor(source) {
2328
2507
  const startOfFileToken = new Token(TokenKind.SOF, 0, 0, 0, 0);
@@ -2332,11 +2511,26 @@ var Lexer = class {
2332
2511
  this.line = 1;
2333
2512
  this.lineStart = 0;
2334
2513
  }
2514
+ /**
2515
+ * Returns the value used by `Object.prototype.toString`.
2516
+ * @returns The built-in string tag for this object.
2517
+ */
2335
2518
  get [Symbol.toStringTag]() {
2336
2519
  return "Lexer";
2337
2520
  }
2338
2521
  /**
2339
2522
  * Advances the token stream to the next non-ignored token.
2523
+ * @returns The next non-ignored token.
2524
+ * @example
2525
+ * ```ts
2526
+ * import { Lexer, Source } from 'graphql/language';
2527
+ *
2528
+ * const lexer = new Lexer(new Source('{ hello }'));
2529
+ * const token = lexer.advance();
2530
+ *
2531
+ * token.kind; // => '{'
2532
+ * lexer.token; // => token
2533
+ * ```
2340
2534
  */
2341
2535
  advance() {
2342
2536
  this.lastToken = this.token;
@@ -2346,6 +2540,17 @@ var Lexer = class {
2346
2540
  /**
2347
2541
  * Looks ahead and returns the next non-ignored token, but does not change
2348
2542
  * the state of Lexer.
2543
+ * @returns The next non-ignored token without advancing the lexer.
2544
+ * @example
2545
+ * ```ts
2546
+ * import { Lexer, Source } from 'graphql/language';
2547
+ *
2548
+ * const lexer = new Lexer(new Source('{ hello }'));
2549
+ * const token = lexer.lookahead();
2550
+ *
2551
+ * token.kind; // => '{'
2552
+ * lexer.token.kind; // => '<SOF>'
2553
+ * ```
2349
2554
  */
2350
2555
  lookahead() {
2351
2556
  let token = this.token;
@@ -2966,6 +3171,29 @@ spurious results.`);
2966
3171
 
2967
3172
  // node_modules/graphql/language/source.mjs
2968
3173
  var Source = class {
3174
+ /** The GraphQL source text. */
3175
+ /** Name used in diagnostics for this source, such as a file path or request name. */
3176
+ /** One-indexed line and column where this source begins. */
3177
+ /**
3178
+ * Creates a Source instance.
3179
+ * @param body - The GraphQL source text.
3180
+ * @param name - Name used in diagnostics for this source.
3181
+ * @param locationOffset - One-indexed line and column where this source begins.
3182
+ * @example
3183
+ * ```ts
3184
+ * import { Source } from 'graphql/language';
3185
+ *
3186
+ * const source = new Source(
3187
+ * 'type Query { greeting: String }',
3188
+ * 'schema.graphql',
3189
+ * { line: 10, column: 1 },
3190
+ * );
3191
+ *
3192
+ * source.body; // => 'type Query { greeting: String }'
3193
+ * source.name; // => 'schema.graphql'
3194
+ * source.locationOffset; // => { line: 10, column: 1 }
3195
+ * ```
3196
+ */
2969
3197
  constructor(body, name = "GraphQL request", locationOffset = {
2970
3198
  line: 1,
2971
3199
  column: 1
@@ -2983,6 +3211,10 @@ var Source = class {
2983
3211
  "column in locationOffset is 1-indexed and must be positive."
2984
3212
  );
2985
3213
  }
3214
+ /**
3215
+ * Returns the value used by `Object.prototype.toString`.
3216
+ * @returns The built-in string tag for this object.
3217
+ */
2986
3218
  get [Symbol.toStringTag]() {
2987
3219
  return "Source";
2988
3220
  }
@@ -3018,6 +3250,8 @@ var Parser = class {
3018
3250
  }
3019
3251
  /**
3020
3252
  * Converts a name lex token into a name parse node.
3253
+ *
3254
+ * @internal
3021
3255
  */
3022
3256
  parseName() {
3023
3257
  const token = this.expectToken(TokenKind.NAME);
@@ -3029,6 +3263,8 @@ var Parser = class {
3029
3263
  // Implements the parsing rules in the Document section.
3030
3264
  /**
3031
3265
  * Document : Definition+
3266
+ *
3267
+ * @internal
3032
3268
  */
3033
3269
  parseDocument() {
3034
3270
  return this.node(this._lexer.token, {
@@ -3062,6 +3298,8 @@ var Parser = class {
3062
3298
  * - UnionTypeDefinition
3063
3299
  * - EnumTypeDefinition
3064
3300
  * - InputObjectTypeDefinition
3301
+ *
3302
+ * @internal
3065
3303
  */
3066
3304
  parseDefinition() {
3067
3305
  if (this.peek(TokenKind.BRACE_L)) {
@@ -3122,6 +3360,8 @@ var Parser = class {
3122
3360
  * OperationDefinition :
3123
3361
  * - SelectionSet
3124
3362
  * - OperationType Name? VariableDefinitions? Directives? SelectionSet
3363
+ *
3364
+ * @internal
3125
3365
  */
3126
3366
  parseOperationDefinition() {
3127
3367
  const start = this._lexer.token;
@@ -3154,6 +3394,8 @@ var Parser = class {
3154
3394
  }
3155
3395
  /**
3156
3396
  * OperationType : one of query mutation subscription
3397
+ *
3398
+ * @internal
3157
3399
  */
3158
3400
  parseOperationType() {
3159
3401
  const operationToken = this.expectToken(TokenKind.NAME);
@@ -3169,6 +3411,8 @@ var Parser = class {
3169
3411
  }
3170
3412
  /**
3171
3413
  * VariableDefinitions : ( VariableDefinition+ )
3414
+ *
3415
+ * @internal
3172
3416
  */
3173
3417
  parseVariableDefinitions() {
3174
3418
  return this.optionalMany(
@@ -3179,6 +3423,8 @@ var Parser = class {
3179
3423
  }
3180
3424
  /**
3181
3425
  * VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
3426
+ *
3427
+ * @internal
3182
3428
  */
3183
3429
  parseVariableDefinition() {
3184
3430
  return this.node(this._lexer.token, {
@@ -3192,6 +3438,8 @@ var Parser = class {
3192
3438
  }
3193
3439
  /**
3194
3440
  * Variable : $ Name
3441
+ *
3442
+ * @internal
3195
3443
  */
3196
3444
  parseVariable() {
3197
3445
  const start = this._lexer.token;
@@ -3205,6 +3453,8 @@ var Parser = class {
3205
3453
  * ```
3206
3454
  * SelectionSet : { Selection+ }
3207
3455
  * ```
3456
+ *
3457
+ * @internal
3208
3458
  */
3209
3459
  parseSelectionSet() {
3210
3460
  return this.node(this._lexer.token, {
@@ -3221,6 +3471,8 @@ var Parser = class {
3221
3471
  * - Field
3222
3472
  * - FragmentSpread
3223
3473
  * - InlineFragment
3474
+ *
3475
+ * @internal
3224
3476
  */
3225
3477
  parseSelection() {
3226
3478
  return this.peek(TokenKind.SPREAD) ? this.parseFragment() : this.parseField();
@@ -3229,6 +3481,8 @@ var Parser = class {
3229
3481
  * Field : Alias? Name Arguments? Directives? SelectionSet?
3230
3482
  *
3231
3483
  * Alias : Name :
3484
+ *
3485
+ * @internal
3232
3486
  */
3233
3487
  parseField() {
3234
3488
  const start = this._lexer.token;
@@ -3252,6 +3506,8 @@ var Parser = class {
3252
3506
  }
3253
3507
  /**
3254
3508
  * Arguments[Const] : ( Argument[?Const]+ )
3509
+ *
3510
+ * @internal
3255
3511
  */
3256
3512
  parseArguments(isConst) {
3257
3513
  const item = isConst ? this.parseConstArgument : this.parseArgument;
@@ -3259,6 +3515,8 @@ var Parser = class {
3259
3515
  }
3260
3516
  /**
3261
3517
  * Argument[Const] : Name : Value[?Const]
3518
+ *
3519
+ * @internal
3262
3520
  */
3263
3521
  parseArgument(isConst = false) {
3264
3522
  const start = this._lexer.token;
@@ -3280,6 +3538,8 @@ var Parser = class {
3280
3538
  * FragmentSpread : ... FragmentName Directives?
3281
3539
  *
3282
3540
  * InlineFragment : ... TypeCondition? Directives? SelectionSet
3541
+ *
3542
+ * @internal
3283
3543
  */
3284
3544
  parseFragment() {
3285
3545
  const start = this._lexer.token;
@@ -3304,6 +3564,8 @@ var Parser = class {
3304
3564
  * - fragment FragmentName on TypeCondition Directives? SelectionSet
3305
3565
  *
3306
3566
  * TypeCondition : NamedType
3567
+ *
3568
+ * @internal
3307
3569
  */
3308
3570
  parseFragmentDefinition() {
3309
3571
  const start = this._lexer.token;
@@ -3331,6 +3593,8 @@ var Parser = class {
3331
3593
  }
3332
3594
  /**
3333
3595
  * FragmentName : Name but not `on`
3596
+ *
3597
+ * @internal
3334
3598
  */
3335
3599
  parseFragmentName() {
3336
3600
  if (this._lexer.token.value === "on") {
@@ -3356,6 +3620,8 @@ var Parser = class {
3356
3620
  * NullValue : `null`
3357
3621
  *
3358
3622
  * EnumValue : Name but not `true`, `false` or `null`
3623
+ *
3624
+ * @internal
3359
3625
  */
3360
3626
  parseValueLiteral(isConst) {
3361
3627
  const token = this._lexer.token;
@@ -3437,6 +3703,8 @@ var Parser = class {
3437
3703
  * ListValue[Const] :
3438
3704
  * - [ ]
3439
3705
  * - [ Value[?Const]+ ]
3706
+ *
3707
+ * @internal
3440
3708
  */
3441
3709
  parseList(isConst) {
3442
3710
  const item = () => this.parseValueLiteral(isConst);
@@ -3451,6 +3719,8 @@ var Parser = class {
3451
3719
  * - { }
3452
3720
  * - { ObjectField[?Const]+ }
3453
3721
  * ```
3722
+ *
3723
+ * @internal
3454
3724
  */
3455
3725
  parseObject(isConst) {
3456
3726
  const item = () => this.parseObjectField(isConst);
@@ -3461,6 +3731,8 @@ var Parser = class {
3461
3731
  }
3462
3732
  /**
3463
3733
  * ObjectField[Const] : Name : Value[?Const]
3734
+ *
3735
+ * @internal
3464
3736
  */
3465
3737
  parseObjectField(isConst) {
3466
3738
  const start = this._lexer.token;
@@ -3475,6 +3747,8 @@ var Parser = class {
3475
3747
  // Implements the parsing rules in the Directives section.
3476
3748
  /**
3477
3749
  * Directives[Const] : Directive[?Const]+
3750
+ *
3751
+ * @internal
3478
3752
  */
3479
3753
  parseDirectives(isConst) {
3480
3754
  const directives = [];
@@ -3490,6 +3764,8 @@ var Parser = class {
3490
3764
  * ```
3491
3765
  * Directive[Const] : @ Name Arguments[?Const]?
3492
3766
  * ```
3767
+ *
3768
+ * @internal
3493
3769
  */
3494
3770
  parseDirective(isConst) {
3495
3771
  const start = this._lexer.token;
@@ -3506,6 +3782,8 @@ var Parser = class {
3506
3782
  * - NamedType
3507
3783
  * - ListType
3508
3784
  * - NonNullType
3785
+ *
3786
+ * @internal
3509
3787
  */
3510
3788
  parseTypeReference() {
3511
3789
  const start = this._lexer.token;
@@ -3530,6 +3808,8 @@ var Parser = class {
3530
3808
  }
3531
3809
  /**
3532
3810
  * NamedType : Name
3811
+ *
3812
+ * @internal
3533
3813
  */
3534
3814
  parseNamedType() {
3535
3815
  return this.node(this._lexer.token, {
@@ -3543,6 +3823,8 @@ var Parser = class {
3543
3823
  }
3544
3824
  /**
3545
3825
  * Description : StringValue
3826
+ *
3827
+ * @internal
3546
3828
  */
3547
3829
  parseDescription() {
3548
3830
  if (this.peekDescription()) {
@@ -3553,6 +3835,8 @@ var Parser = class {
3553
3835
  * ```
3554
3836
  * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ }
3555
3837
  * ```
3838
+ *
3839
+ * @internal
3556
3840
  */
3557
3841
  parseSchemaDefinition() {
3558
3842
  const start = this._lexer.token;
@@ -3573,6 +3857,8 @@ var Parser = class {
3573
3857
  }
3574
3858
  /**
3575
3859
  * OperationTypeDefinition : OperationType : NamedType
3860
+ *
3861
+ * @internal
3576
3862
  */
3577
3863
  parseOperationTypeDefinition() {
3578
3864
  const start = this._lexer.token;
@@ -3587,6 +3873,8 @@ var Parser = class {
3587
3873
  }
3588
3874
  /**
3589
3875
  * ScalarTypeDefinition : Description? scalar Name Directives[Const]?
3876
+ *
3877
+ * @internal
3590
3878
  */
3591
3879
  parseScalarTypeDefinition() {
3592
3880
  const start = this._lexer.token;
@@ -3605,6 +3893,8 @@ var Parser = class {
3605
3893
  * ObjectTypeDefinition :
3606
3894
  * Description?
3607
3895
  * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition?
3896
+ *
3897
+ * @internal
3608
3898
  */
3609
3899
  parseObjectTypeDefinition() {
3610
3900
  const start = this._lexer.token;
@@ -3627,6 +3917,8 @@ var Parser = class {
3627
3917
  * ImplementsInterfaces :
3628
3918
  * - implements `&`? NamedType
3629
3919
  * - ImplementsInterfaces & NamedType
3920
+ *
3921
+ * @internal
3630
3922
  */
3631
3923
  parseImplementsInterfaces() {
3632
3924
  return this.expectOptionalKeyword("implements") ? this.delimitedMany(TokenKind.AMP, this.parseNamedType) : [];
@@ -3635,6 +3927,8 @@ var Parser = class {
3635
3927
  * ```
3636
3928
  * FieldsDefinition : { FieldDefinition+ }
3637
3929
  * ```
3930
+ *
3931
+ * @internal
3638
3932
  */
3639
3933
  parseFieldsDefinition() {
3640
3934
  return this.optionalMany(
@@ -3646,6 +3940,8 @@ var Parser = class {
3646
3940
  /**
3647
3941
  * FieldDefinition :
3648
3942
  * - Description? Name ArgumentsDefinition? : Type Directives[Const]?
3943
+ *
3944
+ * @internal
3649
3945
  */
3650
3946
  parseFieldDefinition() {
3651
3947
  const start = this._lexer.token;
@@ -3666,6 +3962,8 @@ var Parser = class {
3666
3962
  }
3667
3963
  /**
3668
3964
  * ArgumentsDefinition : ( InputValueDefinition+ )
3965
+ *
3966
+ * @internal
3669
3967
  */
3670
3968
  parseArgumentDefs() {
3671
3969
  return this.optionalMany(
@@ -3677,6 +3975,8 @@ var Parser = class {
3677
3975
  /**
3678
3976
  * InputValueDefinition :
3679
3977
  * - Description? Name : Type DefaultValue? Directives[Const]?
3978
+ *
3979
+ * @internal
3680
3980
  */
3681
3981
  parseInputValueDef() {
3682
3982
  const start = this._lexer.token;
@@ -3701,6 +4001,8 @@ var Parser = class {
3701
4001
  /**
3702
4002
  * InterfaceTypeDefinition :
3703
4003
  * - Description? interface Name Directives[Const]? FieldsDefinition?
4004
+ *
4005
+ * @internal
3704
4006
  */
3705
4007
  parseInterfaceTypeDefinition() {
3706
4008
  const start = this._lexer.token;
@@ -3722,6 +4024,8 @@ var Parser = class {
3722
4024
  /**
3723
4025
  * UnionTypeDefinition :
3724
4026
  * - Description? union Name Directives[Const]? UnionMemberTypes?
4027
+ *
4028
+ * @internal
3725
4029
  */
3726
4030
  parseUnionTypeDefinition() {
3727
4031
  const start = this._lexer.token;
@@ -3742,6 +4046,8 @@ var Parser = class {
3742
4046
  * UnionMemberTypes :
3743
4047
  * - = `|`? NamedType
3744
4048
  * - UnionMemberTypes | NamedType
4049
+ *
4050
+ * @internal
3745
4051
  */
3746
4052
  parseUnionMemberTypes() {
3747
4053
  return this.expectOptionalToken(TokenKind.EQUALS) ? this.delimitedMany(TokenKind.PIPE, this.parseNamedType) : [];
@@ -3749,6 +4055,8 @@ var Parser = class {
3749
4055
  /**
3750
4056
  * EnumTypeDefinition :
3751
4057
  * - Description? enum Name Directives[Const]? EnumValuesDefinition?
4058
+ *
4059
+ * @internal
3752
4060
  */
3753
4061
  parseEnumTypeDefinition() {
3754
4062
  const start = this._lexer.token;
@@ -3769,6 +4077,8 @@ var Parser = class {
3769
4077
  * ```
3770
4078
  * EnumValuesDefinition : { EnumValueDefinition+ }
3771
4079
  * ```
4080
+ *
4081
+ * @internal
3772
4082
  */
3773
4083
  parseEnumValuesDefinition() {
3774
4084
  return this.optionalMany(
@@ -3779,6 +4089,8 @@ var Parser = class {
3779
4089
  }
3780
4090
  /**
3781
4091
  * EnumValueDefinition : Description? EnumValue Directives[Const]?
4092
+ *
4093
+ * @internal
3782
4094
  */
3783
4095
  parseEnumValueDefinition() {
3784
4096
  const start = this._lexer.token;
@@ -3794,6 +4106,8 @@ var Parser = class {
3794
4106
  }
3795
4107
  /**
3796
4108
  * EnumValue : Name but not `true`, `false` or `null`
4109
+ *
4110
+ * @internal
3797
4111
  */
3798
4112
  parseEnumValueName() {
3799
4113
  if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") {
@@ -3810,6 +4124,8 @@ var Parser = class {
3810
4124
  /**
3811
4125
  * InputObjectTypeDefinition :
3812
4126
  * - Description? input Name Directives[Const]? InputFieldsDefinition?
4127
+ *
4128
+ * @internal
3813
4129
  */
3814
4130
  parseInputObjectTypeDefinition() {
3815
4131
  const start = this._lexer.token;
@@ -3830,6 +4146,8 @@ var Parser = class {
3830
4146
  * ```
3831
4147
  * InputFieldsDefinition : { InputValueDefinition+ }
3832
4148
  * ```
4149
+ *
4150
+ * @internal
3833
4151
  */
3834
4152
  parseInputFieldsDefinition() {
3835
4153
  return this.optionalMany(
@@ -3850,6 +4168,9 @@ var Parser = class {
3850
4168
  * - UnionTypeExtension
3851
4169
  * - EnumTypeExtension
3852
4170
  * - InputObjectTypeDefinition
4171
+ * - DirectiveDefinitionExtension
4172
+ *
4173
+ * @internal
3853
4174
  */
3854
4175
  parseTypeSystemExtension() {
3855
4176
  const keywordToken = this._lexer.lookahead();
@@ -3869,6 +4190,11 @@ var Parser = class {
3869
4190
  return this.parseEnumTypeExtension();
3870
4191
  case "input":
3871
4192
  return this.parseInputObjectTypeExtension();
4193
+ case "directive":
4194
+ if (this._options.experimentalDirectivesOnDirectiveDefinitions) {
4195
+ return this.parseDirectiveDefinitionExtension();
4196
+ }
4197
+ break;
3872
4198
  }
3873
4199
  }
3874
4200
  throw this.unexpected(keywordToken);
@@ -3879,6 +4205,8 @@ var Parser = class {
3879
4205
  * - extend schema Directives[Const]? { OperationTypeDefinition+ }
3880
4206
  * - extend schema Directives[Const]
3881
4207
  * ```
4208
+ *
4209
+ * @internal
3882
4210
  */
3883
4211
  parseSchemaExtension() {
3884
4212
  const start = this._lexer.token;
@@ -3902,6 +4230,8 @@ var Parser = class {
3902
4230
  /**
3903
4231
  * ScalarTypeExtension :
3904
4232
  * - extend scalar Name Directives[Const]
4233
+ *
4234
+ * @internal
3905
4235
  */
3906
4236
  parseScalarTypeExtension() {
3907
4237
  const start = this._lexer.token;
@@ -3923,6 +4253,8 @@ var Parser = class {
3923
4253
  * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
3924
4254
  * - extend type Name ImplementsInterfaces? Directives[Const]
3925
4255
  * - extend type Name ImplementsInterfaces
4256
+ *
4257
+ * @internal
3926
4258
  */
3927
4259
  parseObjectTypeExtension() {
3928
4260
  const start = this._lexer.token;
@@ -3948,6 +4280,8 @@ var Parser = class {
3948
4280
  * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition
3949
4281
  * - extend interface Name ImplementsInterfaces? Directives[Const]
3950
4282
  * - extend interface Name ImplementsInterfaces
4283
+ *
4284
+ * @internal
3951
4285
  */
3952
4286
  parseInterfaceTypeExtension() {
3953
4287
  const start = this._lexer.token;
@@ -3972,6 +4306,8 @@ var Parser = class {
3972
4306
  * UnionTypeExtension :
3973
4307
  * - extend union Name Directives[Const]? UnionMemberTypes
3974
4308
  * - extend union Name Directives[Const]
4309
+ *
4310
+ * @internal
3975
4311
  */
3976
4312
  parseUnionTypeExtension() {
3977
4313
  const start = this._lexer.token;
@@ -3994,6 +4330,8 @@ var Parser = class {
3994
4330
  * EnumTypeExtension :
3995
4331
  * - extend enum Name Directives[Const]? EnumValuesDefinition
3996
4332
  * - extend enum Name Directives[Const]
4333
+ *
4334
+ * @internal
3997
4335
  */
3998
4336
  parseEnumTypeExtension() {
3999
4337
  const start = this._lexer.token;
@@ -4016,6 +4354,8 @@ var Parser = class {
4016
4354
  * InputObjectTypeExtension :
4017
4355
  * - extend input Name Directives[Const]? InputFieldsDefinition
4018
4356
  * - extend input Name Directives[Const]
4357
+ *
4358
+ * @internal
4019
4359
  */
4020
4360
  parseInputObjectTypeExtension() {
4021
4361
  const start = this._lexer.token;
@@ -4034,11 +4374,29 @@ var Parser = class {
4034
4374
  fields
4035
4375
  });
4036
4376
  }
4377
+ parseDirectiveDefinitionExtension() {
4378
+ const start = this._lexer.token;
4379
+ this.expectKeyword("extend");
4380
+ this.expectKeyword("directive");
4381
+ this.expectToken(TokenKind.AT);
4382
+ const name = this.parseName();
4383
+ const directives = this.parseConstDirectives();
4384
+ if (directives.length === 0) {
4385
+ throw this.unexpected();
4386
+ }
4387
+ return this.node(start, {
4388
+ kind: Kind.DIRECTIVE_EXTENSION,
4389
+ name,
4390
+ directives
4391
+ });
4392
+ }
4037
4393
  /**
4038
4394
  * ```
4039
4395
  * DirectiveDefinition :
4040
4396
  * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations
4041
4397
  * ```
4398
+ *
4399
+ * @internal
4042
4400
  */
4043
4401
  parseDirectiveDefinition() {
4044
4402
  const start = this._lexer.token;
@@ -4047,6 +4405,7 @@ var Parser = class {
4047
4405
  this.expectToken(TokenKind.AT);
4048
4406
  const name = this.parseName();
4049
4407
  const args = this.parseArgumentDefs();
4408
+ const directives = this._options.experimentalDirectivesOnDirectiveDefinitions ? this.parseConstDirectives() : [];
4050
4409
  const repeatable = this.expectOptionalKeyword("repeatable");
4051
4410
  this.expectKeyword("on");
4052
4411
  const locations = this.parseDirectiveLocations();
@@ -4055,6 +4414,7 @@ var Parser = class {
4055
4414
  description,
4056
4415
  name,
4057
4416
  arguments: args,
4417
+ directives,
4058
4418
  repeatable,
4059
4419
  locations
4060
4420
  });
@@ -4063,6 +4423,8 @@ var Parser = class {
4063
4423
  * DirectiveLocations :
4064
4424
  * - `|`? DirectiveLocation
4065
4425
  * - DirectiveLocations | DirectiveLocation
4426
+ *
4427
+ * @internal
4066
4428
  */
4067
4429
  parseDirectiveLocations() {
4068
4430
  return this.delimitedMany(TokenKind.PIPE, this.parseDirectiveLocation);
@@ -4093,6 +4455,7 @@ var Parser = class {
4093
4455
  * `ENUM_VALUE`
4094
4456
  * `INPUT_OBJECT`
4095
4457
  * `INPUT_FIELD_DEFINITION`
4458
+ * `DIRECTIVE_DEFINITION`
4096
4459
  */
4097
4460
  parseDirectiveLocation() {
4098
4461
  const start = this._lexer.token;
@@ -4110,6 +4473,19 @@ var Parser = class {
4110
4473
  * - Name . Name ( Name : )
4111
4474
  * - \@ Name
4112
4475
  * - \@ Name ( Name : )
4476
+ * @returns Parsed schema coordinate AST.
4477
+ * @example
4478
+ * ```ts
4479
+ * import { Parser, Source } from 'graphql/language';
4480
+ *
4481
+ * const typeCoordinate = new Parser(new Source('User.name')).parseSchemaCoordinate();
4482
+ * const directiveCoordinate = new Parser(new Source('@include(if:)')).parseSchemaCoordinate();
4483
+ *
4484
+ * typeCoordinate.name.value; // => 'User'
4485
+ * typeCoordinate.memberName?.value; // => 'name'
4486
+ * directiveCoordinate.name.value; // => 'deprecated'
4487
+ * directiveCoordinate.argumentName?.value; // => 'reason'
4488
+ * ```
4113
4489
  */
4114
4490
  parseSchemaCoordinate() {
4115
4491
  const start = this._lexer.token;
@@ -4162,6 +4538,8 @@ var Parser = class {
4162
4538
  * Returns a node that, if configured to do so, sets a "loc" field as a
4163
4539
  * location object, used to identify the place in the source that created a
4164
4540
  * given parsed object.
4541
+ *
4542
+ * @internal
4165
4543
  */
4166
4544
  node(startToken, node) {
4167
4545
  if (this._options.noLocation !== true) {
@@ -4175,6 +4553,8 @@ var Parser = class {
4175
4553
  }
4176
4554
  /**
4177
4555
  * Determines if the next token is of a given kind
4556
+ *
4557
+ * @internal
4178
4558
  */
4179
4559
  peek(kind) {
4180
4560
  return this._lexer.token.kind === kind;
@@ -4182,6 +4562,8 @@ var Parser = class {
4182
4562
  /**
4183
4563
  * If the next token is of the given kind, return that token after advancing the lexer.
4184
4564
  * Otherwise, do not change the parser state and throw an error.
4565
+ *
4566
+ * @internal
4185
4567
  */
4186
4568
  expectToken(kind) {
4187
4569
  const token = this._lexer.token;
@@ -4198,6 +4580,8 @@ var Parser = class {
4198
4580
  /**
4199
4581
  * If the next token is of the given kind, return "true" after advancing the lexer.
4200
4582
  * Otherwise, do not change the parser state and return "false".
4583
+ *
4584
+ * @internal
4201
4585
  */
4202
4586
  expectOptionalToken(kind) {
4203
4587
  const token = this._lexer.token;
@@ -4210,6 +4594,8 @@ var Parser = class {
4210
4594
  /**
4211
4595
  * If the next token is a given keyword, advance the lexer.
4212
4596
  * Otherwise, do not change the parser state and throw an error.
4597
+ *
4598
+ * @internal
4213
4599
  */
4214
4600
  expectKeyword(value) {
4215
4601
  const token = this._lexer.token;
@@ -4226,6 +4612,8 @@ var Parser = class {
4226
4612
  /**
4227
4613
  * If the next token is a given keyword, return "true" after advancing the lexer.
4228
4614
  * Otherwise, do not change the parser state and return "false".
4615
+ *
4616
+ * @internal
4229
4617
  */
4230
4618
  expectOptionalKeyword(value) {
4231
4619
  const token = this._lexer.token;
@@ -4237,6 +4625,8 @@ var Parser = class {
4237
4625
  }
4238
4626
  /**
4239
4627
  * Helper function for creating an error when an unexpected lexed token is encountered.
4628
+ *
4629
+ * @internal
4240
4630
  */
4241
4631
  unexpected(atToken) {
4242
4632
  const token = atToken !== null && atToken !== void 0 ? atToken : this._lexer.token;
@@ -4250,6 +4640,8 @@ var Parser = class {
4250
4640
  * Returns a possibly empty list of parse nodes, determined by the parseFn.
4251
4641
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
4252
4642
  * Advances the parser to the next lex token after the closing token.
4643
+ *
4644
+ * @internal
4253
4645
  */
4254
4646
  any(openKind, parseFn, closeKind) {
4255
4647
  this.expectToken(openKind);
@@ -4264,6 +4656,8 @@ var Parser = class {
4264
4656
  * It can be empty only if open token is missing otherwise it will always return non-empty list
4265
4657
  * that begins with a lex token of openKind and ends with a lex token of closeKind.
4266
4658
  * Advances the parser to the next lex token after the closing token.
4659
+ *
4660
+ * @internal
4267
4661
  */
4268
4662
  optionalMany(openKind, parseFn, closeKind) {
4269
4663
  if (this.expectOptionalToken(openKind)) {
@@ -4279,6 +4673,8 @@ var Parser = class {
4279
4673
  * Returns a non-empty list of parse nodes, determined by the parseFn.
4280
4674
  * This list begins with a lex token of openKind and ends with a lex token of closeKind.
4281
4675
  * Advances the parser to the next lex token after the closing token.
4676
+ *
4677
+ * @internal
4282
4678
  */
4283
4679
  many(openKind, parseFn, closeKind) {
4284
4680
  this.expectToken(openKind);
@@ -4292,6 +4688,8 @@ var Parser = class {
4292
4688
  * Returns a non-empty list of parse nodes, determined by the parseFn.
4293
4689
  * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind.
4294
4690
  * Advances the parser to the next lex token after last item in the list.
4691
+ *
4692
+ * @internal
4295
4693
  */
4296
4694
  delimitedMany(delimiterKind, parseFn) {
4297
4695
  this.expectOptionalToken(delimiterKind);
@@ -4385,7 +4783,8 @@ function parseDocument(source) {
4385
4783
  if (!docCache.has(cacheKey)) {
4386
4784
  var parsed = parse(source, {
4387
4785
  experimentalFragmentVariables,
4388
- allowLegacyFragmentVariables: experimentalFragmentVariables
4786
+ allowLegacyFragmentVariables: experimentalFragmentVariables,
4787
+ experimentalFragmentArguments: experimentalFragmentVariables
4389
4788
  });
4390
4789
  if (!parsed || parsed.kind !== "Document") {
4391
4790
  throw new Error("Not a valid GraphQL document.");
@@ -6720,6 +7119,8 @@ var EnumOSPlatform = /* @__PURE__ */ ((EnumOSPlatform22) => {
6720
7119
  })(EnumOSPlatform || {});
6721
7120
  var EnumRelationResource = /* @__PURE__ */ ((EnumRelationResource22) => {
6722
7121
  EnumRelationResource22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
7122
+ EnumRelationResource22["EVENT_UPDATE_RELATION_TO_VENDOR"] = "event_update_relation_to_vendor";
7123
+ EnumRelationResource22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
6723
7124
  EnumRelationResource22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
6724
7125
  return EnumRelationResource22;
6725
7126
  })(EnumRelationResource || {});
@@ -6745,6 +7146,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6745
7146
  EnumNotificationResourceType22["DOWNGRADED_VENDOR"] = "downgraded_vendor";
6746
7147
  EnumNotificationResourceType22["EVENT_INVITE_VENDOR"] = "event_invite_vendor";
6747
7148
  EnumNotificationResourceType22["EVENT_STARTING_SOON"] = "event_starting_soon";
7149
+ EnumNotificationResourceType22["EVENT_UPDATE_RELATION_TO_VENDOR"] = "event_update_relation_to_vendor";
6748
7150
  EnumNotificationResourceType22["EXPIRATION_REMINDER_EVENT"] = "expiration_reminder_event";
6749
7151
  EnumNotificationResourceType22["EXPIRATION_REMINDER_PARTNER"] = "expiration_reminder_partner";
6750
7152
  EnumNotificationResourceType22["EXPIRATION_REMINDER_VENDOR"] = "expiration_reminder_vendor";
@@ -6753,6 +7155,7 @@ var EnumNotificationResourceType = /* @__PURE__ */ ((EnumNotificationResourceTyp
6753
7155
  EnumNotificationResourceType22["REGISTERED_USER_BY_SCHOOL_CODE"] = "registered_user_by_school_code";
6754
7156
  EnumNotificationResourceType22["SYSTEM_ALERT"] = "system_alert";
6755
7157
  EnumNotificationResourceType22["VENDOR_APPLICATION_TO_EVENT"] = "vendor_application_to_event";
7158
+ EnumNotificationResourceType22["VENDOR_UPDATE_RELATION_TO_EVENT"] = "vendor_update_relation_to_event";
6756
7159
  return EnumNotificationResourceType22;
6757
7160
  })(EnumNotificationResourceType || {});
6758
7161
  var EnumNotificationType = /* @__PURE__ */ ((EnumNotificationType22) => {
@@ -10261,8 +10664,12 @@ var START_GAME_MUTATION = gql`
10261
10664
  ${GAME_DOC_FIELDS_FRAGMENT}
10262
10665
  `;
10263
10666
  var LEAVE_GAME_MUTATION = gql`
10264
- mutation leaveGame($_id: ID!, $gameType: GameTypeEnumType!) {
10265
- leaveGame(_id: $_id, gameType: $gameType)
10667
+ mutation leaveGame(
10668
+ $_id: ID!
10669
+ $gameType: GameTypeEnumType!
10670
+ $gameTypeId: ID!
10671
+ ) {
10672
+ leaveGame(_id: $_id, gameType: $gameType, gameTypeId: $gameTypeId)
10266
10673
  }
10267
10674
  `;
10268
10675
  var UPDATE_DAILY_CLUE_MUTATION = gql`
@@ -10423,6 +10830,20 @@ var noLeadingZeros = (fieldName, options = {}) => {
10423
10830
  return true;
10424
10831
  };
10425
10832
  };
10833
+ var toOptionalNumber = (originalValue) => {
10834
+ if (originalValue === "" || originalValue === null || originalValue === void 0) {
10835
+ return void 0;
10836
+ }
10837
+ let parsed;
10838
+ if (typeof originalValue === "number") {
10839
+ parsed = originalValue;
10840
+ } else if (typeof originalValue === "string") {
10841
+ parsed = Number(originalValue.replace(",", "."));
10842
+ } else {
10843
+ parsed = void 0;
10844
+ }
10845
+ return Number.isNaN(parsed) ? void 0 : parsed;
10846
+ };
10426
10847
  dayjs2.extend(isSameOrAfter2);
10427
10848
  dayjs2.extend(customParseFormat2);
10428
10849
  var emailRequiredSchema = create$6().email("Invalid email address").required("Email is required").label("Email").transform(
@@ -10517,12 +10938,12 @@ var dateTimeSchema = create$3().shape({
10517
10938
  });
10518
10939
  var stallTypesSchema = create$3({
10519
10940
  label: create$6().trim().label("Stall Type").required("Stall type is required"),
10520
- price: create$5().label("Stall Price").min(0.1, "Stall price must be at least 0.1").required("Stall price is required").test(
10941
+ price: create$5().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Stall Price").min(0.1, "Stall price must be at least 0.1").required("Stall price is required").test(
10521
10942
  "no-leading-zeros",
10522
10943
  "",
10523
10944
  noLeadingZeros("Stall price", { allowDecimal: true })
10524
10945
  ),
10525
- stallCapacity: create$5().label("Stall Capacity").typeError("Stall capacity must be a number").min(0, "Stall capacity cannot be negative").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
10946
+ stallCapacity: create$5().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Stall Capacity").typeError("Stall capacity must be a number").min(0, "Stall capacity cannot be negative").integer("Stall capacity must be a whole number").required("Stall capacity is required").test("no-leading-zeros", "", noLeadingZeros("Stall capacity"))
10526
10947
  });
10527
10948
  var dateTimeWithPriceSchema = dateTimeSchema.shape({
10528
10949
  stallTypes: create$2().of(stallTypesSchema).min(1, "At least one stall type is required").required("Stall types are required")
@@ -10646,8 +11067,8 @@ var eventInfoSchema = create$3().shape({
10646
11067
  applicationDeadlineHours: create$5().label("Application Deadline Hours").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Application deadline hours must be a number").min(1, "Application deadline hours must be at least 1").required("Application deadline hours is required").test("no-leading-zeros", "", noLeadingZeros("Application deadline hours")),
10647
11068
  dateTime: create$2().of(dateTimeWithPriceSchema).required("DateTime is required"),
10648
11069
  eventId: create$6().trim().required("Event ID is required"),
10649
- packInTime: create$5().label("Pack In Time").typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
10650
- paymentDueHours: create$5().label("Payment Due Hours").typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")).test(
11070
+ packInTime: create$5().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Pack In Time").typeError("Pack in time must be a number").min(1, "Pack in time must be at least 1").required("Pack in time is required").test("no-leading-zeros", "", noLeadingZeros("Pack in time")),
11071
+ paymentDueHours: create$5().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Payment Due Hours").typeError("Payment due hours must be a number").min(1, "Payment due hours must be at least 1").required("Payment due hours is required").test("no-leading-zeros", "", noLeadingZeros("Payment due hours")).test(
10651
11072
  "payment-before-deadline",
10652
11073
  "Payment due hours must be less than application deadline hours",
10653
11074
  function(value) {
@@ -11018,7 +11439,7 @@ var schoolSchema = create$3().shape({
11018
11439
  name: create$6().trim().required("Name is required"),
11019
11440
  region: create$6().trim().required("Region is required"),
11020
11441
  socialMedia: create$2().of(socialMediaSchema).nullable().default(null),
11021
- studentCount: create$5().label("Student Count").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Student count must be a number").min(
11442
+ studentCount: create$5().transform((_, originalValue) => toOptionalNumber(originalValue)).label("Student Count").nullable().typeError("Student count must be a number").min(
11022
11443
  SCHOOL_MIN_STUDENT_COUNT,
11023
11444
  `Student count must be at least ${SCHOOL_MIN_STUDENT_COUNT}`
11024
11445
  ).required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
@@ -11034,11 +11455,7 @@ var posterIds = [
11034
11455
  "poster1",
11035
11456
  "poster2",
11036
11457
  "poster3",
11037
- // New
11038
- "poster4",
11039
- "poster5",
11040
- "poster6",
11041
- "poster7"
11458
+ "poster4"
11042
11459
  ];
11043
11460
  var posterFiles = Object.fromEntries(
11044
11461
  posterIds.map((id) => [id, `${id}${IMAGE_EXTENSION}`])
@@ -11874,7 +12291,7 @@ schema4.index({ isRead: 1, userId: 1 });
11874
12291
  schema4.index({ createdAt: -1, userId: 1 });
11875
12292
  var NotificationModel = mongoose8.models.Notification || mongoose8.model("Notification", schema4);
11876
12293
 
11877
- // node_modules/@timardex/cluemart-shared/dist/chunk-ZR4TGWTS.mjs
12294
+ // node_modules/@timardex/cluemart-shared/dist/chunk-JMOGW4IX.mjs
11878
12295
  var EnumOSPlatform2 = /* @__PURE__ */ ((EnumOSPlatform22) => {
11879
12296
  EnumOSPlatform22["ANDROID"] = "android";
11880
12297
  EnumOSPlatform22["IOS"] = "ios";
@@ -12734,4 +13151,4 @@ react/cjs/react.development.js:
12734
13151
  * LICENSE file in the root directory of this source tree.
12735
13152
  *)
12736
13153
  */
12737
- //# sourceMappingURL=chunk-FSEMFTFQ.mjs.map
13154
+ //# sourceMappingURL=chunk-QHPLDTUG.mjs.map