@scalar/workspace-store 0.45.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,545 @@
1
+ import { abbreviations, abstractImageUrls, adjectives, alphanumericChars, animalsImageUrls, avatarUrls, bankAccountNames, bankAccountNumbers, bicCodes, bitcoinAddresses, businessImageUrls, buzzAdjectives, buzzNouns, buzzPhrases, buzzVerbs, catchPhraseAdjectives, catchPhraseDescriptors, catchPhraseNouns, catchPhrases, catsImageUrls, cities, cityImageUrls, commonFileExtensions, commonFileNames, commonFileTypes, companyNames, companySuffixes, countries, countryCodes, currencyCodes, currencyNames, currencySymbols, dataUris, databaseCollations, databaseColumns, databaseEngines, databaseTypes, departments, directoryPaths, domainNames, domainSuffixes, domainWords, emails, exampleEmails, fashionImageUrls, fileExtensions, fileNames, filePaths, fileTypes, firstNames, foodImageUrls, hexColors, ibanNumbers, imageUrls, ingVerbs, ipv4Addresses, ipv6Addresses, jobAreas, jobDescriptors, jobTitles, jobTypes, lastNames, latitudes, locales, longitudes, loremParagraphs, loremSentences, loremSlugs, loremWords, macAddresses, mimeTypes, months, namePrefixes, nameSuffixes, natureImageUrls, nightlifeImageUrls, nouns, peopleImageUrls, phoneNumbers, productAdjectives, productMaterials, productNames, products, protocols, semvers, sportsImageUrls, streetAddresses, streetNames, transactionTypes, transportImageUrls, urls, userAgents, usernames, uuids, verbs, weekdays, words, } from './random-data.js';
2
+ /** Pick a random element from a non-empty pre-generated pool. */
3
+ // All pools are hardcoded non-empty arrays, so the index is always valid.
4
+ const pick = (pool) => pool[Math.floor(Math.random() * pool.length)];
5
+ /** Generate a random integer in [min, max]. */
6
+ const randInt = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min;
7
+ /** Generate a random numeric string of the given length. */
8
+ const numericString = (length) => Array.from({ length }, () => Math.floor(Math.random() * 10)).join('');
9
+ /** Generate a random alphanumeric string of the given length. */
10
+ const alphanumeric = (length) => Array.from({ length }, () => alphanumericChars[Math.floor(Math.random() * alphanumericChars.length)]).join('');
11
+ /** Generate a future ISO timestamp (1–365 days from now). */
12
+ const futureDate = () => {
13
+ const ms = Date.now() + randInt(1, 365) * 86_400_000;
14
+ return new Date(ms).toISOString();
15
+ };
16
+ /** Generate a past ISO timestamp (1–365 days ago). */
17
+ const pastDate = () => {
18
+ const ms = Date.now() - randInt(1, 365) * 86_400_000;
19
+ return new Date(ms).toISOString();
20
+ };
21
+ /** Generate a recent ISO timestamp (1–3 days ago). */
22
+ const recentDate = () => {
23
+ const ms = Date.now() - randInt(1, 3) * 86_400_000;
24
+ return new Date(ms).toISOString();
25
+ };
26
+ /** Pick N random words from a pool and join them. */
27
+ const pickWords = (pool, min, max) => {
28
+ const count = randInt(min, max);
29
+ return Array.from({ length: count }, () => pick(pool)).join(' ');
30
+ };
31
+ /** Pick N random sentences and join them. */
32
+ const pickSentences = (pool, min, max) => {
33
+ const count = randInt(min, max);
34
+ return Array.from({ length: count }, () => pick(pool)).join(' ');
35
+ };
36
+ /** Pick N random lines (sentences) and join with newlines. */
37
+ const pickLines = (pool, min, max) => {
38
+ const count = randInt(min, max);
39
+ return Array.from({ length: count }, () => pick(pool)).join('\n');
40
+ };
41
+ export const contextFunctions = {
42
+ //---------------------------------- Common ----------------------------------
43
+ $guid: {
44
+ fn: () => pick(uuids),
45
+ comment: 'A uuid-v4 style guid',
46
+ },
47
+ $timestamp: {
48
+ fn: () => Math.floor(Date.now() / 1000).toString(),
49
+ comment: 'The current UNIX timestamp in seconds',
50
+ },
51
+ $isoTimestamp: {
52
+ fn: () => new Date().toISOString(),
53
+ comment: 'The current ISO timestamp at zero UTC',
54
+ },
55
+ $randomUUID: {
56
+ fn: () => pick(uuids),
57
+ comment: 'A random 36-character UUID',
58
+ },
59
+ // ---------------------------------- Text, numbers and colors ----------------------------------
60
+ $randomAlphaNumeric: {
61
+ fn: () => alphanumericChars[Math.floor(Math.random() * alphanumericChars.length)] ?? 'a',
62
+ comment: 'A random alpha-numeric character',
63
+ },
64
+ $randomBoolean: {
65
+ fn: () => (Math.random() < 0.5 ? 'true' : 'false'),
66
+ comment: 'A random boolean value',
67
+ },
68
+ $randomInt: {
69
+ fn: () => randInt(0, 1000).toString(),
70
+ comment: 'A random integer between 0 and 1000',
71
+ },
72
+ $randomColor: {
73
+ fn: () => pick(hexColors),
74
+ comment: 'A random color in hex format',
75
+ },
76
+ $randomHexColor: {
77
+ fn: () => pick(hexColors),
78
+ comment: 'A random hex value',
79
+ },
80
+ $randomAbbreviation: {
81
+ fn: () => pick(abbreviations),
82
+ comment: 'A random abbreviation',
83
+ },
84
+ // ---------------------------------- Internet and IP addresses ----------------------------------
85
+ $randomIP: {
86
+ fn: () => pick(ipv4Addresses),
87
+ comment: 'A random IPv4 address',
88
+ },
89
+ $randomIPV6: {
90
+ fn: () => pick(ipv6Addresses),
91
+ comment: 'A random IPv6 address',
92
+ },
93
+ $randomMACAddress: {
94
+ fn: () => pick(macAddresses),
95
+ comment: 'A random MAC address',
96
+ },
97
+ $randomPassword: {
98
+ fn: () => alphanumeric(15),
99
+ comment: 'A random 15-character alpha-numeric password',
100
+ },
101
+ $randomLocale: {
102
+ fn: () => pick(locales),
103
+ comment: 'A random two-letter language code (ISO 639-1)',
104
+ },
105
+ $randomUserAgent: {
106
+ fn: () => pick(userAgents),
107
+ comment: 'A random user agent',
108
+ },
109
+ $randomProtocol: {
110
+ fn: () => pick(protocols),
111
+ comment: 'A random internet protocol',
112
+ },
113
+ $randomSemver: {
114
+ fn: () => pick(semvers),
115
+ comment: 'A random semantic version number',
116
+ },
117
+ // ---------------------------------- Names ----------------------------------
118
+ $randomFirstName: {
119
+ fn: () => pick(firstNames),
120
+ comment: 'A random first name',
121
+ },
122
+ $randomLastName: {
123
+ fn: () => pick(lastNames),
124
+ comment: 'A random last name',
125
+ },
126
+ $randomFullName: {
127
+ fn: () => `${pick(firstNames)} ${pick(lastNames)}`,
128
+ comment: 'A random first and last name',
129
+ },
130
+ $randomNamePrefix: {
131
+ fn: () => pick(namePrefixes),
132
+ comment: 'A random name prefix',
133
+ },
134
+ $randomNameSuffix: {
135
+ fn: () => pick(nameSuffixes),
136
+ comment: 'A random name suffix',
137
+ },
138
+ // ---------------------------------- Profession ----------------------------------
139
+ $randomJobArea: {
140
+ fn: () => pick(jobAreas),
141
+ comment: 'A random job area',
142
+ },
143
+ $randomJobDescriptor: {
144
+ fn: () => pick(jobDescriptors),
145
+ comment: 'A random job descriptor',
146
+ },
147
+ $randomJobTitle: {
148
+ fn: () => pick(jobTitles),
149
+ comment: 'A random job title',
150
+ },
151
+ $randomJobType: {
152
+ fn: () => pick(jobTypes),
153
+ comment: 'A random job type',
154
+ },
155
+ // ---------------------------------- Phone, address, and location ----------------------------------
156
+ $randomPhoneNumber: {
157
+ fn: () => pick(phoneNumbers),
158
+ comment: 'A random ten-digit phone number',
159
+ },
160
+ $randomPhoneNumberExt: {
161
+ fn: () => `${randInt(10, 99)}-${pick(phoneNumbers)}`,
162
+ comment: 'A random phone number prefixed with a two-digit extension (10–99)',
163
+ },
164
+ $randomCity: {
165
+ fn: () => pick(cities),
166
+ comment: 'A random city name',
167
+ },
168
+ $randomStreetName: {
169
+ fn: () => pick(streetNames),
170
+ comment: 'A random street name',
171
+ },
172
+ $randomStreetAddress: {
173
+ fn: () => pick(streetAddresses),
174
+ comment: 'A random street address',
175
+ },
176
+ $randomCountry: {
177
+ fn: () => pick(countries),
178
+ comment: 'A random country',
179
+ },
180
+ $randomCountryCode: {
181
+ fn: () => pick(countryCodes),
182
+ comment: 'A random two-letter country code (ISO 3166-1 alpha-2)',
183
+ },
184
+ $randomLatitude: {
185
+ fn: () => pick(latitudes),
186
+ comment: 'A random latitude coordinate',
187
+ },
188
+ $randomLongitude: {
189
+ fn: () => pick(longitudes),
190
+ comment: 'A random longitude coordinate',
191
+ },
192
+ // ---------------------------------- Images ----------------------------------
193
+ $randomAvatarImage: {
194
+ fn: () => pick(avatarUrls),
195
+ comment: 'A random avatar image',
196
+ },
197
+ $randomImageUrl: {
198
+ fn: () => pick(imageUrls),
199
+ comment: 'A URL of a random image',
200
+ },
201
+ $randomAbstractImage: {
202
+ fn: () => pick(abstractImageUrls),
203
+ comment: 'A URL of a random abstract image',
204
+ },
205
+ $randomAnimalsImage: {
206
+ fn: () => pick(animalsImageUrls),
207
+ comment: 'A URL of a random animal image',
208
+ },
209
+ $randomBusinessImage: {
210
+ fn: () => pick(businessImageUrls),
211
+ comment: 'A URL of a random stock business image',
212
+ },
213
+ $randomCatsImage: {
214
+ fn: () => pick(catsImageUrls),
215
+ comment: 'A URL of a random cat image',
216
+ },
217
+ $randomCityImage: {
218
+ fn: () => pick(cityImageUrls),
219
+ comment: 'A URL of a random city image',
220
+ },
221
+ $randomFoodImage: {
222
+ fn: () => pick(foodImageUrls),
223
+ comment: 'A URL of a random food image',
224
+ },
225
+ $randomNightlifeImage: {
226
+ fn: () => pick(nightlifeImageUrls),
227
+ comment: 'A URL of a random nightlife image',
228
+ },
229
+ $randomFashionImage: {
230
+ fn: () => pick(fashionImageUrls),
231
+ comment: 'A URL of a random fashion image',
232
+ },
233
+ $randomPeopleImage: {
234
+ fn: () => pick(peopleImageUrls),
235
+ comment: 'A URL of a random image of a person',
236
+ },
237
+ $randomNatureImage: {
238
+ fn: () => pick(natureImageUrls),
239
+ comment: 'A URL of a random nature image',
240
+ },
241
+ $randomSportsImage: {
242
+ fn: () => pick(sportsImageUrls),
243
+ comment: 'A URL of a random sports image',
244
+ },
245
+ $randomTransportImage: {
246
+ fn: () => pick(transportImageUrls),
247
+ comment: 'A URL of a random transportation image',
248
+ },
249
+ $randomImageDataUri: {
250
+ fn: () => pick(dataUris),
251
+ comment: 'A random image data URI',
252
+ },
253
+ // ---------------------------------- Finance ----------------------------------
254
+ $randomBankAccount: {
255
+ fn: () => pick(bankAccountNumbers),
256
+ comment: 'A random 8-digit bank account number',
257
+ },
258
+ $randomBankAccountName: {
259
+ fn: () => pick(bankAccountNames),
260
+ comment: 'A random bank account name',
261
+ },
262
+ $randomCreditCardMask: {
263
+ fn: () => `**** **** **** ${numericString(4)}`,
264
+ comment: 'A random masked credit card number',
265
+ },
266
+ $randomBankAccountBic: {
267
+ fn: () => pick(bicCodes),
268
+ comment: 'A random BIC (Bank Identifier Code)',
269
+ },
270
+ $randomBankAccountIban: {
271
+ fn: () => pick(ibanNumbers),
272
+ comment: 'A random 15-31 character IBAN (International Bank Account Number)',
273
+ },
274
+ $randomTransactionType: {
275
+ fn: () => pick(transactionTypes),
276
+ comment: 'A random transaction type',
277
+ },
278
+ $randomCurrencyCode: {
279
+ fn: () => pick(currencyCodes),
280
+ comment: 'A random 3-letter currency code (ISO-4217)',
281
+ },
282
+ $randomCurrencyName: {
283
+ fn: () => pick(currencyNames),
284
+ comment: 'A random currency name',
285
+ },
286
+ $randomCurrencySymbol: {
287
+ fn: () => pick(currencySymbols),
288
+ comment: 'A random currency symbol',
289
+ },
290
+ $randomBitcoin: {
291
+ fn: () => pick(bitcoinAddresses),
292
+ comment: 'A random bitcoin address',
293
+ },
294
+ // ---------------------------------- Business ----------------------------------
295
+ $randomCompanyName: {
296
+ fn: () => pick(companyNames),
297
+ comment: 'A random company name',
298
+ },
299
+ $randomCompanySuffix: {
300
+ fn: () => pick(companySuffixes),
301
+ comment: 'A random company suffix',
302
+ },
303
+ $randomBs: {
304
+ fn: () => pick(buzzPhrases),
305
+ comment: 'A random phrase of business-speak',
306
+ },
307
+ $randomBsAdjective: {
308
+ fn: () => pick(buzzAdjectives),
309
+ comment: 'A random business-speak adjective',
310
+ },
311
+ $randomBsBuzz: {
312
+ fn: () => pick(buzzVerbs),
313
+ comment: 'A random business-speak buzzword',
314
+ },
315
+ $randomBsNoun: {
316
+ fn: () => pick(buzzNouns),
317
+ comment: 'A random business-speak noun',
318
+ },
319
+ // ---------------------------------- Catchphrases ----------------------------------
320
+ $randomCatchPhrase: {
321
+ fn: () => pick(catchPhrases),
322
+ comment: 'A random catchphrase',
323
+ },
324
+ $randomCatchPhraseAdjective: {
325
+ fn: () => pick(catchPhraseAdjectives),
326
+ comment: 'A random catchphrase adjective',
327
+ },
328
+ $randomCatchPhraseDescriptor: {
329
+ fn: () => pick(catchPhraseDescriptors),
330
+ comment: 'A random catchphrase descriptor',
331
+ },
332
+ $randomCatchPhraseNoun: {
333
+ fn: () => pick(catchPhraseNouns),
334
+ comment: 'Randomly generates a catchphrase noun',
335
+ },
336
+ // ---------------------------------- Databases ----------------------------------
337
+ $randomDatabaseColumn: {
338
+ fn: () => pick(databaseColumns),
339
+ comment: 'A random database column name',
340
+ },
341
+ $randomDatabaseType: {
342
+ fn: () => pick(databaseTypes),
343
+ comment: 'A random database type',
344
+ },
345
+ $randomDatabaseCollation: {
346
+ fn: () => pick(databaseCollations),
347
+ comment: 'A random database collation',
348
+ },
349
+ $randomDatabaseEngine: {
350
+ fn: () => pick(databaseEngines),
351
+ comment: 'A random database engine',
352
+ },
353
+ // ---------------------------------- Dates ----------------------------------
354
+ $randomDateFuture: {
355
+ fn: futureDate,
356
+ comment: 'A random future datetime',
357
+ },
358
+ $randomDatePast: {
359
+ fn: pastDate,
360
+ comment: 'A random past datetime',
361
+ },
362
+ $randomDateRecent: {
363
+ fn: recentDate,
364
+ comment: 'A random recent datetime',
365
+ },
366
+ $randomWeekday: {
367
+ fn: () => pick(weekdays),
368
+ comment: 'A random weekday',
369
+ },
370
+ $randomMonth: {
371
+ fn: () => pick(months),
372
+ comment: 'A random month',
373
+ },
374
+ // ---------------------------------- Domains, emails, and usernames ----------------------------------
375
+ $randomDomainName: {
376
+ fn: () => pick(domainNames),
377
+ comment: 'A random domain name',
378
+ },
379
+ $randomDomainSuffix: {
380
+ fn: () => pick(domainSuffixes),
381
+ comment: 'A random domain suffix',
382
+ },
383
+ $randomDomainWord: {
384
+ fn: () => pick(domainWords),
385
+ comment: 'A random unqualified domain name',
386
+ },
387
+ $randomEmail: {
388
+ fn: () => pick(emails),
389
+ comment: 'A random email address',
390
+ },
391
+ $randomExampleEmail: {
392
+ fn: () => pick(exampleEmails),
393
+ comment: 'A random email address from an example domain',
394
+ },
395
+ $randomUserName: {
396
+ fn: () => pick(usernames),
397
+ comment: 'A random username',
398
+ },
399
+ $randomUrl: {
400
+ fn: () => pick(urls),
401
+ comment: 'A random URL',
402
+ },
403
+ // ---------------------------------- Files and directories ----------------------------------
404
+ $randomFileName: {
405
+ fn: () => pick(fileNames),
406
+ comment: 'A random file name (includes uncommon extensions)',
407
+ },
408
+ $randomFileType: {
409
+ fn: () => pick(fileTypes),
410
+ comment: 'A random file type (includes uncommon file types)',
411
+ },
412
+ $randomFileExt: {
413
+ fn: () => pick(fileExtensions),
414
+ comment: 'A random file extension (includes uncommon extensions)',
415
+ },
416
+ $randomCommonFileName: {
417
+ fn: () => pick(commonFileNames),
418
+ comment: 'A random file name',
419
+ },
420
+ $randomCommonFileType: {
421
+ fn: () => pick(commonFileTypes),
422
+ comment: 'A random, common file type',
423
+ },
424
+ $randomCommonFileExt: {
425
+ fn: () => pick(commonFileExtensions),
426
+ comment: 'A random, common file extension',
427
+ },
428
+ $randomFilePath: {
429
+ fn: () => pick(filePaths),
430
+ comment: 'A random file path',
431
+ },
432
+ $randomDirectoryPath: {
433
+ fn: () => pick(directoryPaths),
434
+ comment: 'A random directory path',
435
+ },
436
+ $randomMimeType: {
437
+ fn: () => pick(mimeTypes),
438
+ comment: 'A random MIME type',
439
+ },
440
+ // ---------------------------------- Stores ----------------------------------
441
+ $randomPrice: {
442
+ fn: () => (Math.random() * 1000).toFixed(2),
443
+ comment: 'A random price between 0.00 and 1000.00',
444
+ },
445
+ $randomProduct: {
446
+ fn: () => pick(products),
447
+ comment: 'A random product',
448
+ },
449
+ $randomProductAdjective: {
450
+ fn: () => pick(productAdjectives),
451
+ comment: 'A random product adjective',
452
+ },
453
+ $randomProductMaterial: {
454
+ fn: () => pick(productMaterials),
455
+ comment: 'A random product material',
456
+ },
457
+ $randomProductName: {
458
+ fn: () => pick(productNames),
459
+ comment: 'A random product name',
460
+ },
461
+ $randomDepartment: {
462
+ fn: () => pick(departments),
463
+ comment: 'A random commerce department',
464
+ },
465
+ // ---------------------------------- Grammar ----------------------------------
466
+ $randomNoun: {
467
+ fn: () => pick(nouns),
468
+ comment: 'A random noun',
469
+ },
470
+ $randomVerb: {
471
+ fn: () => pick(verbs),
472
+ comment: 'A random verb',
473
+ },
474
+ $randomIngverb: {
475
+ fn: () => pick(ingVerbs),
476
+ comment: 'A random verb ending in `-ing`',
477
+ },
478
+ $randomAdjective: {
479
+ fn: () => pick(adjectives),
480
+ comment: 'A random adjective',
481
+ },
482
+ $randomWord: {
483
+ fn: () => pick(words),
484
+ comment: 'A random word',
485
+ },
486
+ $randomWords: {
487
+ fn: () => pickWords(words, 2, 5),
488
+ comment: 'Some random words',
489
+ },
490
+ $randomPhrase: {
491
+ fn: () => pick(buzzPhrases),
492
+ comment: 'A random phrase',
493
+ },
494
+ // ---------------------------------- Lorem ipsum ----------------------------------
495
+ $randomLoremWord: {
496
+ fn: () => pick(loremWords),
497
+ comment: 'A random word of lorem ipsum text',
498
+ },
499
+ $randomLoremWords: {
500
+ fn: () => pickWords(loremWords, 3, 3),
501
+ comment: 'Some random words of lorem ipsum text',
502
+ },
503
+ $randomLoremSentence: {
504
+ fn: () => pick(loremSentences),
505
+ comment: 'A random sentence of lorem ipsum text',
506
+ },
507
+ $randomLoremSentences: {
508
+ fn: () => pickSentences(loremSentences, 2, 6),
509
+ comment: 'A random 2 to 6 sentences of lorem ipsum text',
510
+ },
511
+ $randomLoremParagraph: {
512
+ fn: () => pick(loremParagraphs),
513
+ comment: 'A random paragraph of lorem ipsum text',
514
+ },
515
+ $randomLoremParagraphs: {
516
+ fn: () => pickSentences(loremParagraphs, 3, 3),
517
+ comment: '3 random paragraphs of lorem ipsum text',
518
+ },
519
+ $randomLoremText: {
520
+ fn: () => pickSentences(loremParagraphs, 1, 3),
521
+ comment: 'A random amount of lorem ipsum text',
522
+ },
523
+ $randomLoremSlug: {
524
+ fn: () => pick(loremSlugs),
525
+ comment: 'A random lorem ipsum URL slug',
526
+ },
527
+ $randomLoremLines: {
528
+ fn: () => pickLines(loremSentences, 1, 5),
529
+ comment: '1 to 5 random lines of lorem ipsum',
530
+ },
531
+ };
532
+ export const getContextFunctionComment = (name) => contextFunctions[name].comment;
533
+ /** Keys surfaced first in empty-query autocomplete (common request placeholders). */
534
+ export const POPULAR_CONTEXT_FUNCTION_KEYS = [
535
+ '$guid',
536
+ '$timestamp',
537
+ '$isoTimestamp',
538
+ '$randomUUID',
539
+ '$randomEmail',
540
+ '$randomInt',
541
+ '$randomFirstName',
542
+ '$randomLastName',
543
+ ];
544
+ export const CONTEXT_FUNCTION_NAMES = Object.keys(contextFunctions);
545
+ export const isContextFunctionName = (name) => Object.hasOwn(contextFunctions, name);
@@ -1,7 +1,8 @@
1
1
  export type { ApiKeyObjectSecret, HttpObjectSecret, OAuth2ObjectSecret, OAuthFlowAuthorizationCodeSecret, OAuthFlowClientCredentialsSecret, OAuthFlowImplicitSecret, OAuthFlowPasswordSecret, OAuthFlowsObjectSecret, OpenIdConnectObjectSecret, SecuritySchemeObjectSecret, } from './builder/index.js';
2
2
  export { type RequestFactory, buildRequest, buildRequestSecurity, deSerializeParameter, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, requestFactory, serializeContentValue, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
3
3
  export type { MergedSecuritySchemes } from './context/index.js';
4
- export { combineParams, getActiveEnvironment, getActiveProxyUrl, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, } from './context/index.js';
4
+ export { type BuildRequestExampleContext, combineParams, getActiveEnvironment, getActiveProxyUrl, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, } from './context/index.js';
5
5
  export { createVariablesStoreForRequest } from './variable-store/index.js';
6
6
  export type { VariableEntry, VariablesStore } from './variable-store/types.js';
7
+ export { CONTEXT_FUNCTION_NAMES, type ContextFunctionEntry, type ContextFunctionName, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
7
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,cAAc,EACnB,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/request-example/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,GAC3B,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,cAAc,EACnB,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,UAAU,EACV,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,oBAAoB,EACpB,4BAA4B,GAC7B,MAAM,WAAW,CAAA;AAClB,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EACL,KAAK,0BAA0B,EAC/B,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,cAAc,EACd,aAAa,GACd,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAA;AACjE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,EACL,sBAAsB,EACtB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,6BAA6B,EAC7B,gBAAgB,EAChB,yBAAyB,EACzB,qBAAqB,GACtB,MAAM,aAAa,CAAA"}
@@ -1,3 +1,4 @@
1
1
  export { buildRequest, buildRequestSecurity, deSerializeParameter, filterGlobalCookie, getEnvironmentVariables, getExample, getExampleFromBody, getExampleFromSchema, getResolvedUrl, getSelectedBodyContentType, getServerVariables, requestFactory, serializeContentValue, serializeDeepObjectStyle, serializeFormStyle, serializeFormStyleForCookies, serializePipeDelimitedStyle, serializeSimpleStyle, serializeSpaceDelimitedStyle, } from './builder/index.js';
2
2
  export { combineParams, getActiveEnvironment, getActiveProxyUrl, getRequestExampleContext, getSecurityRequirements, getSecuritySchemes, getSelectedSecurity, getSelectedServer, getServers, isAuthOptional, mergeSecurity, } from './context/index.js';
3
3
  export { createVariablesStoreForRequest } from './variable-store/index.js';
4
+ export { CONTEXT_FUNCTION_NAMES, POPULAR_CONTEXT_FUNCTION_KEYS, contextFunctions, getContextFunctionComment, isContextFunctionName, } from './functions.js';
@@ -0,0 +1,99 @@
1
+ /** Pre-generated random data pools to avoid bundling faker.js (~800 KB). */
2
+ export declare const uuids: string[];
3
+ export declare const alphanumericChars = "abcdefghijklmnopqrstuvwxyz0123456789";
4
+ export declare const hexColors: string[];
5
+ export declare const abbreviations: string[];
6
+ export declare const ipv4Addresses: string[];
7
+ export declare const ipv6Addresses: string[];
8
+ export declare const macAddresses: string[];
9
+ export declare const locales: string[];
10
+ export declare const userAgents: string[];
11
+ export declare const protocols: string[];
12
+ export declare const semvers: string[];
13
+ export declare const firstNames: string[];
14
+ export declare const lastNames: string[];
15
+ export declare const namePrefixes: string[];
16
+ export declare const nameSuffixes: string[];
17
+ export declare const jobAreas: string[];
18
+ export declare const jobDescriptors: string[];
19
+ export declare const jobTitles: string[];
20
+ export declare const jobTypes: string[];
21
+ export declare const phoneNumbers: string[];
22
+ export declare const cities: string[];
23
+ export declare const streetNames: string[];
24
+ export declare const streetAddresses: string[];
25
+ export declare const countries: string[];
26
+ export declare const countryCodes: string[];
27
+ export declare const latitudes: string[];
28
+ export declare const longitudes: string[];
29
+ export declare const avatarUrls: string[];
30
+ export declare const imageUrls: string[];
31
+ export declare const abstractImageUrls: string[];
32
+ export declare const animalsImageUrls: string[];
33
+ export declare const businessImageUrls: string[];
34
+ export declare const catsImageUrls: string[];
35
+ export declare const cityImageUrls: string[];
36
+ export declare const foodImageUrls: string[];
37
+ export declare const nightlifeImageUrls: string[];
38
+ export declare const fashionImageUrls: string[];
39
+ export declare const peopleImageUrls: string[];
40
+ export declare const natureImageUrls: string[];
41
+ export declare const sportsImageUrls: string[];
42
+ export declare const transportImageUrls: string[];
43
+ export declare const dataUris: string[];
44
+ export declare const bankAccountNumbers: string[];
45
+ export declare const bankAccountNames: string[];
46
+ export declare const bicCodes: string[];
47
+ export declare const ibanNumbers: string[];
48
+ export declare const transactionTypes: string[];
49
+ export declare const currencyCodes: string[];
50
+ export declare const currencyNames: string[];
51
+ export declare const currencySymbols: string[];
52
+ export declare const bitcoinAddresses: string[];
53
+ export declare const companyNames: string[];
54
+ export declare const companySuffixes: string[];
55
+ export declare const buzzPhrases: string[];
56
+ export declare const buzzAdjectives: string[];
57
+ export declare const buzzVerbs: string[];
58
+ export declare const buzzNouns: string[];
59
+ export declare const catchPhrases: string[];
60
+ export declare const catchPhraseAdjectives: string[];
61
+ export declare const catchPhraseDescriptors: string[];
62
+ export declare const catchPhraseNouns: string[];
63
+ export declare const databaseColumns: string[];
64
+ export declare const databaseTypes: string[];
65
+ export declare const databaseCollations: string[];
66
+ export declare const databaseEngines: string[];
67
+ export declare const weekdays: string[];
68
+ export declare const months: string[];
69
+ export declare const domainNames: string[];
70
+ export declare const domainSuffixes: string[];
71
+ export declare const domainWords: string[];
72
+ export declare const emails: string[];
73
+ export declare const exampleEmails: string[];
74
+ export declare const usernames: string[];
75
+ export declare const urls: string[];
76
+ export declare const fileNames: string[];
77
+ export declare const fileTypes: string[];
78
+ export declare const fileExtensions: string[];
79
+ export declare const commonFileNames: string[];
80
+ export declare const commonFileTypes: string[];
81
+ export declare const commonFileExtensions: string[];
82
+ export declare const filePaths: string[];
83
+ export declare const directoryPaths: string[];
84
+ export declare const mimeTypes: string[];
85
+ export declare const products: string[];
86
+ export declare const productAdjectives: string[];
87
+ export declare const productMaterials: string[];
88
+ export declare const productNames: string[];
89
+ export declare const departments: string[];
90
+ export declare const nouns: string[];
91
+ export declare const verbs: string[];
92
+ export declare const ingVerbs: string[];
93
+ export declare const adjectives: string[];
94
+ export declare const words: string[];
95
+ export declare const loremWords: string[];
96
+ export declare const loremSentences: string[];
97
+ export declare const loremParagraphs: string[];
98
+ export declare const loremSlugs: string[];
99
+ //# sourceMappingURL=random-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"random-data.d.ts","sourceRoot":"","sources":["../../src/request-example/random-data.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,eAAO,MAAM,KAAK,UAgBjB,CAAA;AAED,eAAO,MAAM,iBAAiB,yCAAyC,CAAA;AAEvE,eAAO,MAAM,SAAS,UAgBrB,CAAA;AAED,eAAO,MAAM,aAAa,UAgBzB,CAAA;AAED,eAAO,MAAM,aAAa,UAgBzB,CAAA;AAED,eAAO,MAAM,aAAa,UAWzB,CAAA;AAED,eAAO,MAAM,YAAY,UAaxB,CAAA;AAED,eAAO,MAAM,OAAO,UAqBnB,CAAA;AAED,eAAO,MAAM,UAAU,UAWtB,CAAA;AAED,eAAO,MAAM,SAAS,UAAoB,CAAA;AAE1C,eAAO,MAAM,OAAO,UAgBnB,CAAA;AAED,eAAO,MAAM,UAAU,UAgBtB,CAAA;AAED,eAAO,MAAM,SAAS,UAgBrB,CAAA;AAED,eAAO,MAAM,YAAY,UAA+D,CAAA;AAExF,eAAO,MAAM,YAAY,UAAgE,CAAA;AAEzF,eAAO,MAAM,QAAQ,UAgBpB,CAAA;AAED,eAAO,MAAM,cAAc,UAgB1B,CAAA;AAED,eAAO,MAAM,SAAS,UAgBrB,CAAA;AAED,eAAO,MAAM,QAAQ,UAWpB,CAAA;AAED,eAAO,MAAM,YAAY,UAgBxB,CAAA;AAED,eAAO,MAAM,MAAM,UAgBlB,CAAA;AAED,eAAO,MAAM,WAAW,UAgBvB,CAAA;AAED,eAAO,MAAM,eAAe,UAgB3B,CAAA;AAED,eAAO,MAAM,SAAS,UAgBrB,CAAA;AAED,eAAO,MAAM,YAAY,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