@scalar/workspace-store 0.45.0 → 0.46.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.
Files changed (37) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/events/definitions/hooks.d.ts +2 -1
  3. package/dist/events/definitions/hooks.d.ts.map +1 -1
  4. package/dist/mutators/operation/helpers/fetch-request-to-har.d.ts +19 -29
  5. package/dist/mutators/operation/helpers/fetch-request-to-har.d.ts.map +1 -1
  6. package/dist/mutators/operation/helpers/fetch-request-to-har.js +74 -70
  7. package/dist/mutators/operation/history.js +1 -1
  8. package/dist/request-example/builder/build-request.d.ts +19 -4
  9. package/dist/request-example/builder/build-request.d.ts.map +1 -1
  10. package/dist/request-example/builder/build-request.js +46 -30
  11. package/dist/request-example/builder/index.d.ts +1 -1
  12. package/dist/request-example/builder/index.d.ts.map +1 -1
  13. package/dist/request-example/builder/resolve-request-factory-url.d.ts +1 -1
  14. package/dist/request-example/builder/resolve-request-factory-url.d.ts.map +1 -1
  15. package/dist/request-example/builder/resolve-request-factory-url.js +11 -6
  16. package/dist/request-example/context/get-request-example-context.d.ts +1 -2
  17. package/dist/request-example/context/get-request-example-context.d.ts.map +1 -1
  18. package/dist/request-example/context/get-request-example-context.js +1 -1
  19. package/dist/request-example/context/index.d.ts +1 -1
  20. package/dist/request-example/context/index.d.ts.map +1 -1
  21. package/dist/request-example/context/security/get-security-schemes.d.ts +1 -1
  22. package/dist/request-example/context/security/get-security-schemes.d.ts.map +1 -1
  23. package/dist/request-example/context/security/get-security-schemes.js +2 -2
  24. package/dist/request-example/functions.d.ts +486 -0
  25. package/dist/request-example/functions.d.ts.map +1 -0
  26. package/dist/request-example/functions.js +545 -0
  27. package/dist/request-example/index.d.ts +3 -2
  28. package/dist/request-example/index.d.ts.map +1 -1
  29. package/dist/request-example/index.js +1 -0
  30. package/dist/request-example/random-data.d.ts +99 -0
  31. package/dist/request-example/random-data.d.ts.map +1 -0
  32. package/dist/request-example/random-data.js +1181 -0
  33. package/dist/schemas/inmemory-workspace.d.ts +1 -1
  34. package/dist/schemas/reference-config/index.d.ts +1 -1
  35. package/dist/schemas/workspace-specification/index.d.ts +1 -1
  36. package/dist/schemas/workspace.d.ts +2 -2
  37. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"get-request-example-context.d.ts","sourceRoot":"","sources":["../../../src/request-example/context/get-request-example-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAIjG,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,iCAAiC,CAAA;AAIhF,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,mDAAmD,CAAA;AAE7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,KAAK,0BAA0B,GAAG;IAChC,SAAS,EAAE,eAAe,CAAA;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,WAAW,EAAE,kBAAkB,CAAA;KAChC,CAAA;IACD,OAAO,EAAE;QACP,SAAS,EAAE,aAAa,EAAE,CAAA;QAC1B,QAAQ,EAAE,aAAa,EAAE,CAAA;KAC1B,CAAA;IACD,OAAO,EAAE;QACP,IAAI,EAAE,YAAY,EAAE,CAAA;QACpB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAA;QAC7B,IAAI,EAAE,UAAU,CAAA;KACjB,CAAA;IACD,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;KACnB,CAAA;IACD,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAChC,CAAA;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,qBAAqB,CAAA;QAC9B,YAAY,EAAE,yBAAyB,EAAE,CAAA;QACzC,QAAQ,EAAE,gBAAgB,CAAA;QAC1B,eAAe,EAAE,0BAA0B,EAAE,CAAA;QAC7C,IAAI,EAAE,QAAQ,CAAA;KACf,CAAA;CACF,CAAA;AAED,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,cAAc,EAC9B,cAAc,MAAM,EACpB,oBAAoB,kBAAkB,EACtC,UAAS,OAAO,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,+CAA+C;IAC/C,cAAc,EAAE,2BAA2B,CAAA;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC3C,CAAM,KACN,MAAM,CAAC,0BAA0B,CAoInC,CAAA"}
1
+ {"version":3,"file":"get-request-example-context.d.ts","sourceRoot":"","sources":["../../../src/request-example/context/get-request-example-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAA;AAE9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AACvD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAEpD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AAIjG,OAAO,EAAE,KAAK,MAAM,EAAqB,MAAM,iCAAiC,CAAA;AAIhF,OAAO,EAAE,KAAK,qBAAqB,EAAiB,MAAM,mDAAmD,CAAA;AAE7G,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAE5D,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,eAAe,CAAA;IAC1B,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,WAAW,EAAE,kBAAkB,CAAA;KAChC,CAAA;IACD,OAAO,EAAE;QACP,SAAS,EAAE,aAAa,EAAE,CAAA;QAC1B,QAAQ,EAAE,aAAa,EAAE,CAAA;KAC1B,CAAA;IACD,OAAO,EAAE;QACP,IAAI,EAAE,YAAY,EAAE,CAAA;QACpB,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAA;QAC7B,IAAI,EAAE,UAAU,CAAA;KACjB,CAAA;IACD,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;KACnB,CAAA;IACD,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAChC,CAAA;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,qBAAqB,CAAA;QAC9B,YAAY,EAAE,yBAAyB,EAAE,CAAA;QACzC,QAAQ,EAAE,gBAAgB,CAAA;QAC1B,eAAe,EAAE,0BAA0B,EAAE,CAAA;QAC7C,IAAI,EAAE,QAAQ,CAAA;KACf,CAAA;CACF,CAAA;AAED,eAAO,MAAM,wBAAwB,GACnC,gBAAgB,cAAc,EAC9B,cAAc,MAAM,EACpB,oBAAoB,kBAAkB,EACtC,UAAS,OAAO,CAAC;IACf,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;IACnB,+CAA+C;IAC/C,cAAc,EAAE,2BAA2B,CAAA;IAC3C;;;;OAIG;IACH,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAA;CAC3C,CAAM,KACN,MAAM,CAAC,0BAA0B,CAuInC,CAAA"}
@@ -67,7 +67,7 @@ export const getRequestExampleContext = (workspaceStore, documentName, requestEx
67
67
  const securityRequirements = getSecurityRequirements(document.security, operation.security);
68
68
  const selectedSecurity = getSelectedSecurity(documentSelectedSecurity, operationSelectedSecurity, securityRequirements, securitySchemes, options.authentication?.preferredSecurityScheme);
69
69
  /** The above selected requirements in scheme form */
70
- const selectedSecuritySchemes = getSecuritySchemes(securitySchemes, selectedSecurity.selectedSchemes);
70
+ const selectedSecuritySchemes = getSecuritySchemes(securitySchemes, selectedSecurity.selectedSchemes[selectedSecurity.selectedIndex] ?? {});
71
71
  const serverMeta = operation.servers != null ? { type: 'operation', path: path ?? '', method: method ?? 'get' } : { type: 'document' };
72
72
  const authMeta = operationSelectedSecurity !== undefined
73
73
  ? { type: 'operation', path: path ?? '', method: method ?? 'get' }
@@ -1,5 +1,5 @@
1
1
  export { getActiveEnvironment } from './environment.js';
2
- export { getRequestExampleContext } from './get-request-example-context.js';
2
+ export { type BuildRequestExampleContext, getRequestExampleContext } from './get-request-example-context.js';
3
3
  export { combineParams } from './helpers/combine-params.js';
4
4
  export { getActiveProxyUrl } from './proxy.js';
5
5
  export { getSecurityRequirements } from './security/get-security-requirements.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/request-example/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,YAAY,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/request-example/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,KAAK,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAA;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAA;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAA;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,YAAY,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA"}
@@ -5,5 +5,5 @@ import type { SecurityRequirementObject } from '../../../schemas/v3.1/strict/sec
5
5
  * Get the selected security schemes from security requirements.
6
6
  * Takes security requirement objects and resolves them to actual security scheme objects.
7
7
  */
8
- export declare const getSecuritySchemes: (securitySchemes: MergedSecuritySchemes, selectedSecurity: SecurityRequirementObject[]) => SecuritySchemeObjectSecret[];
8
+ export declare const getSecuritySchemes: (securitySchemes: MergedSecuritySchemes, selectedSecurity: SecurityRequirementObject) => SecuritySchemeObjectSecret[];
9
9
  //# sourceMappingURL=get-security-schemes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"get-security-schemes.d.ts","sourceRoot":"","sources":["../../../../src/request-example/context/security/get-security-schemes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AAC9F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAE3F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,iBAAiB,qBAAqB,EACtC,kBAAkB,yBAAyB,EAAE,KAC5C,0BAA0B,EAUpB,CAAA"}
1
+ {"version":3,"file":"get-security-schemes.d.ts","sourceRoot":"","sources":["../../../../src/request-example/context/security/get-security-schemes.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iDAAiD,CAAA;AACjG,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AAC9F,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAA;AAE3F;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAC7B,iBAAiB,qBAAqB,EACtC,kBAAkB,yBAAyB,KAC1C,0BAA0B,EAQzB,CAAA"}
@@ -4,10 +4,10 @@ import { getResolvedRef } from '../../../helpers/get-resolved-ref.js';
4
4
  * Get the selected security schemes from security requirements.
5
5
  * Takes security requirement objects and resolves them to actual security scheme objects.
6
6
  */
7
- export const getSecuritySchemes = (securitySchemes, selectedSecurity) => selectedSecurity.flatMap((scheme) => objectKeys(scheme).flatMap((key) => {
7
+ export const getSecuritySchemes = (securitySchemes, selectedSecurity) => objectKeys(selectedSecurity).flatMap((key) => {
8
8
  const scheme = getResolvedRef(securitySchemes?.[key]);
9
9
  if (scheme) {
10
10
  return scheme;
11
11
  }
12
12
  return [];
13
- })) ?? [];
13
+ });
@@ -0,0 +1,486 @@
1
+ export declare const contextFunctions: {
2
+ $guid: {
3
+ fn: () => string;
4
+ comment: string;
5
+ };
6
+ $timestamp: {
7
+ fn: () => string;
8
+ comment: string;
9
+ };
10
+ $isoTimestamp: {
11
+ fn: () => string;
12
+ comment: string;
13
+ };
14
+ $randomUUID: {
15
+ fn: () => string;
16
+ comment: string;
17
+ };
18
+ $randomAlphaNumeric: {
19
+ fn: () => string;
20
+ comment: string;
21
+ };
22
+ $randomBoolean: {
23
+ fn: () => "true" | "false";
24
+ comment: string;
25
+ };
26
+ $randomInt: {
27
+ fn: () => string;
28
+ comment: string;
29
+ };
30
+ $randomColor: {
31
+ fn: () => string;
32
+ comment: string;
33
+ };
34
+ $randomHexColor: {
35
+ fn: () => string;
36
+ comment: string;
37
+ };
38
+ $randomAbbreviation: {
39
+ fn: () => string;
40
+ comment: string;
41
+ };
42
+ $randomIP: {
43
+ fn: () => string;
44
+ comment: string;
45
+ };
46
+ $randomIPV6: {
47
+ fn: () => string;
48
+ comment: string;
49
+ };
50
+ $randomMACAddress: {
51
+ fn: () => string;
52
+ comment: string;
53
+ };
54
+ $randomPassword: {
55
+ fn: () => string;
56
+ comment: string;
57
+ };
58
+ $randomLocale: {
59
+ fn: () => string;
60
+ comment: string;
61
+ };
62
+ $randomUserAgent: {
63
+ fn: () => string;
64
+ comment: string;
65
+ };
66
+ $randomProtocol: {
67
+ fn: () => string;
68
+ comment: string;
69
+ };
70
+ $randomSemver: {
71
+ fn: () => string;
72
+ comment: string;
73
+ };
74
+ $randomFirstName: {
75
+ fn: () => string;
76
+ comment: string;
77
+ };
78
+ $randomLastName: {
79
+ fn: () => string;
80
+ comment: string;
81
+ };
82
+ $randomFullName: {
83
+ fn: () => string;
84
+ comment: string;
85
+ };
86
+ $randomNamePrefix: {
87
+ fn: () => string;
88
+ comment: string;
89
+ };
90
+ $randomNameSuffix: {
91
+ fn: () => string;
92
+ comment: string;
93
+ };
94
+ $randomJobArea: {
95
+ fn: () => string;
96
+ comment: string;
97
+ };
98
+ $randomJobDescriptor: {
99
+ fn: () => string;
100
+ comment: string;
101
+ };
102
+ $randomJobTitle: {
103
+ fn: () => string;
104
+ comment: string;
105
+ };
106
+ $randomJobType: {
107
+ fn: () => string;
108
+ comment: string;
109
+ };
110
+ $randomPhoneNumber: {
111
+ fn: () => string;
112
+ comment: string;
113
+ };
114
+ $randomPhoneNumberExt: {
115
+ fn: () => string;
116
+ comment: string;
117
+ };
118
+ $randomCity: {
119
+ fn: () => string;
120
+ comment: string;
121
+ };
122
+ $randomStreetName: {
123
+ fn: () => string;
124
+ comment: string;
125
+ };
126
+ $randomStreetAddress: {
127
+ fn: () => string;
128
+ comment: string;
129
+ };
130
+ $randomCountry: {
131
+ fn: () => string;
132
+ comment: string;
133
+ };
134
+ $randomCountryCode: {
135
+ fn: () => string;
136
+ comment: string;
137
+ };
138
+ $randomLatitude: {
139
+ fn: () => string;
140
+ comment: string;
141
+ };
142
+ $randomLongitude: {
143
+ fn: () => string;
144
+ comment: string;
145
+ };
146
+ $randomAvatarImage: {
147
+ fn: () => string;
148
+ comment: string;
149
+ };
150
+ $randomImageUrl: {
151
+ fn: () => string;
152
+ comment: string;
153
+ };
154
+ $randomAbstractImage: {
155
+ fn: () => string;
156
+ comment: string;
157
+ };
158
+ $randomAnimalsImage: {
159
+ fn: () => string;
160
+ comment: string;
161
+ };
162
+ $randomBusinessImage: {
163
+ fn: () => string;
164
+ comment: string;
165
+ };
166
+ $randomCatsImage: {
167
+ fn: () => string;
168
+ comment: string;
169
+ };
170
+ $randomCityImage: {
171
+ fn: () => string;
172
+ comment: string;
173
+ };
174
+ $randomFoodImage: {
175
+ fn: () => string;
176
+ comment: string;
177
+ };
178
+ $randomNightlifeImage: {
179
+ fn: () => string;
180
+ comment: string;
181
+ };
182
+ $randomFashionImage: {
183
+ fn: () => string;
184
+ comment: string;
185
+ };
186
+ $randomPeopleImage: {
187
+ fn: () => string;
188
+ comment: string;
189
+ };
190
+ $randomNatureImage: {
191
+ fn: () => string;
192
+ comment: string;
193
+ };
194
+ $randomSportsImage: {
195
+ fn: () => string;
196
+ comment: string;
197
+ };
198
+ $randomTransportImage: {
199
+ fn: () => string;
200
+ comment: string;
201
+ };
202
+ $randomImageDataUri: {
203
+ fn: () => string;
204
+ comment: string;
205
+ };
206
+ $randomBankAccount: {
207
+ fn: () => string;
208
+ comment: string;
209
+ };
210
+ $randomBankAccountName: {
211
+ fn: () => string;
212
+ comment: string;
213
+ };
214
+ $randomCreditCardMask: {
215
+ fn: () => string;
216
+ comment: string;
217
+ };
218
+ $randomBankAccountBic: {
219
+ fn: () => string;
220
+ comment: string;
221
+ };
222
+ $randomBankAccountIban: {
223
+ fn: () => string;
224
+ comment: string;
225
+ };
226
+ $randomTransactionType: {
227
+ fn: () => string;
228
+ comment: string;
229
+ };
230
+ $randomCurrencyCode: {
231
+ fn: () => string;
232
+ comment: string;
233
+ };
234
+ $randomCurrencyName: {
235
+ fn: () => string;
236
+ comment: string;
237
+ };
238
+ $randomCurrencySymbol: {
239
+ fn: () => string;
240
+ comment: string;
241
+ };
242
+ $randomBitcoin: {
243
+ fn: () => string;
244
+ comment: string;
245
+ };
246
+ $randomCompanyName: {
247
+ fn: () => string;
248
+ comment: string;
249
+ };
250
+ $randomCompanySuffix: {
251
+ fn: () => string;
252
+ comment: string;
253
+ };
254
+ $randomBs: {
255
+ fn: () => string;
256
+ comment: string;
257
+ };
258
+ $randomBsAdjective: {
259
+ fn: () => string;
260
+ comment: string;
261
+ };
262
+ $randomBsBuzz: {
263
+ fn: () => string;
264
+ comment: string;
265
+ };
266
+ $randomBsNoun: {
267
+ fn: () => string;
268
+ comment: string;
269
+ };
270
+ $randomCatchPhrase: {
271
+ fn: () => string;
272
+ comment: string;
273
+ };
274
+ $randomCatchPhraseAdjective: {
275
+ fn: () => string;
276
+ comment: string;
277
+ };
278
+ $randomCatchPhraseDescriptor: {
279
+ fn: () => string;
280
+ comment: string;
281
+ };
282
+ $randomCatchPhraseNoun: {
283
+ fn: () => string;
284
+ comment: string;
285
+ };
286
+ $randomDatabaseColumn: {
287
+ fn: () => string;
288
+ comment: string;
289
+ };
290
+ $randomDatabaseType: {
291
+ fn: () => string;
292
+ comment: string;
293
+ };
294
+ $randomDatabaseCollation: {
295
+ fn: () => string;
296
+ comment: string;
297
+ };
298
+ $randomDatabaseEngine: {
299
+ fn: () => string;
300
+ comment: string;
301
+ };
302
+ $randomDateFuture: {
303
+ fn: () => string;
304
+ comment: string;
305
+ };
306
+ $randomDatePast: {
307
+ fn: () => string;
308
+ comment: string;
309
+ };
310
+ $randomDateRecent: {
311
+ fn: () => string;
312
+ comment: string;
313
+ };
314
+ $randomWeekday: {
315
+ fn: () => string;
316
+ comment: string;
317
+ };
318
+ $randomMonth: {
319
+ fn: () => string;
320
+ comment: string;
321
+ };
322
+ $randomDomainName: {
323
+ fn: () => string;
324
+ comment: string;
325
+ };
326
+ $randomDomainSuffix: {
327
+ fn: () => string;
328
+ comment: string;
329
+ };
330
+ $randomDomainWord: {
331
+ fn: () => string;
332
+ comment: string;
333
+ };
334
+ $randomEmail: {
335
+ fn: () => string;
336
+ comment: string;
337
+ };
338
+ $randomExampleEmail: {
339
+ fn: () => string;
340
+ comment: string;
341
+ };
342
+ $randomUserName: {
343
+ fn: () => string;
344
+ comment: string;
345
+ };
346
+ $randomUrl: {
347
+ fn: () => string;
348
+ comment: string;
349
+ };
350
+ $randomFileName: {
351
+ fn: () => string;
352
+ comment: string;
353
+ };
354
+ $randomFileType: {
355
+ fn: () => string;
356
+ comment: string;
357
+ };
358
+ $randomFileExt: {
359
+ fn: () => string;
360
+ comment: string;
361
+ };
362
+ $randomCommonFileName: {
363
+ fn: () => string;
364
+ comment: string;
365
+ };
366
+ $randomCommonFileType: {
367
+ fn: () => string;
368
+ comment: string;
369
+ };
370
+ $randomCommonFileExt: {
371
+ fn: () => string;
372
+ comment: string;
373
+ };
374
+ $randomFilePath: {
375
+ fn: () => string;
376
+ comment: string;
377
+ };
378
+ $randomDirectoryPath: {
379
+ fn: () => string;
380
+ comment: string;
381
+ };
382
+ $randomMimeType: {
383
+ fn: () => string;
384
+ comment: string;
385
+ };
386
+ $randomPrice: {
387
+ fn: () => string;
388
+ comment: string;
389
+ };
390
+ $randomProduct: {
391
+ fn: () => string;
392
+ comment: string;
393
+ };
394
+ $randomProductAdjective: {
395
+ fn: () => string;
396
+ comment: string;
397
+ };
398
+ $randomProductMaterial: {
399
+ fn: () => string;
400
+ comment: string;
401
+ };
402
+ $randomProductName: {
403
+ fn: () => string;
404
+ comment: string;
405
+ };
406
+ $randomDepartment: {
407
+ fn: () => string;
408
+ comment: string;
409
+ };
410
+ $randomNoun: {
411
+ fn: () => string;
412
+ comment: string;
413
+ };
414
+ $randomVerb: {
415
+ fn: () => string;
416
+ comment: string;
417
+ };
418
+ $randomIngverb: {
419
+ fn: () => string;
420
+ comment: string;
421
+ };
422
+ $randomAdjective: {
423
+ fn: () => string;
424
+ comment: string;
425
+ };
426
+ $randomWord: {
427
+ fn: () => string;
428
+ comment: string;
429
+ };
430
+ $randomWords: {
431
+ fn: () => string;
432
+ comment: string;
433
+ };
434
+ $randomPhrase: {
435
+ fn: () => string;
436
+ comment: string;
437
+ };
438
+ $randomLoremWord: {
439
+ fn: () => string;
440
+ comment: string;
441
+ };
442
+ $randomLoremWords: {
443
+ fn: () => string;
444
+ comment: string;
445
+ };
446
+ $randomLoremSentence: {
447
+ fn: () => string;
448
+ comment: string;
449
+ };
450
+ $randomLoremSentences: {
451
+ fn: () => string;
452
+ comment: string;
453
+ };
454
+ $randomLoremParagraph: {
455
+ fn: () => string;
456
+ comment: string;
457
+ };
458
+ $randomLoremParagraphs: {
459
+ fn: () => string;
460
+ comment: string;
461
+ };
462
+ $randomLoremText: {
463
+ fn: () => string;
464
+ comment: string;
465
+ };
466
+ $randomLoremSlug: {
467
+ fn: () => string;
468
+ comment: string;
469
+ };
470
+ $randomLoremLines: {
471
+ fn: () => string;
472
+ comment: string;
473
+ };
474
+ };
475
+ /** Stable shape for each context function (the map is large; indexed access widens poorly for some consumers). */
476
+ export type ContextFunctionEntry = {
477
+ fn: () => string;
478
+ comment: string;
479
+ };
480
+ export type ContextFunctionName = keyof typeof contextFunctions;
481
+ export declare const getContextFunctionComment: (name: ContextFunctionName) => string;
482
+ /** Keys surfaced first in empty-query autocomplete (common request placeholders). */
483
+ export declare const POPULAR_CONTEXT_FUNCTION_KEYS: readonly ContextFunctionName[];
484
+ export declare const CONTEXT_FUNCTION_NAMES: ContextFunctionName[];
485
+ export declare const isContextFunctionName: (name: string) => name is ContextFunctionName;
486
+ //# sourceMappingURL=functions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/request-example/functions.ts"],"names":[],"mappings":"AAsJA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAnCN,MAAM;;;;kBAMR,MAAM;;;;kBAMJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAihBoC,CAAA;AAEjE,kHAAkH;AAClH,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,gBAAgB,CAAA;AAE/D,eAAO,MAAM,yBAAyB,GAAI,MAAM,mBAAmB,KAAG,MACiB,CAAA;AAEvF,qFAAqF;AACrF,eAAO,MAAM,6BAA6B,EAAE,SAAS,mBAAmB,EASvE,CAAA;AAED,eAAO,MAAM,sBAAsB,EAAoC,mBAAmB,EAAE,CAAA;AAC5F,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,IAAI,IAAI,mBACtB,CAAA"}