@scalar/workspace-store 0.52.0 → 0.54.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.
- package/CHANGELOG.md +55 -0
- package/dist/channel-example/build-connection-url.d.ts.map +1 -1
- package/dist/channel-example/build-connection-url.js +11 -8
- package/dist/channel-example/get-all-channel-messages.d.ts +10 -0
- package/dist/channel-example/get-all-channel-messages.d.ts.map +1 -0
- package/dist/channel-example/get-all-channel-messages.js +16 -0
- package/dist/channel-example/get-asyncapi-security-requirements.d.ts +7 -0
- package/dist/channel-example/get-asyncapi-security-requirements.d.ts.map +1 -0
- package/dist/channel-example/get-asyncapi-security-requirements.js +76 -0
- package/dist/channel-example/get-channel-connection-context.d.ts +16 -0
- package/dist/channel-example/get-channel-connection-context.d.ts.map +1 -0
- package/dist/channel-example/get-channel-connection-context.js +120 -0
- package/dist/channel-example/get-channel-connection-security.d.ts +8 -0
- package/dist/channel-example/get-channel-connection-security.d.ts.map +1 -0
- package/dist/channel-example/get-channel-connection-security.js +20 -0
- package/dist/channel-example/get-channel-operations.d.ts +11 -0
- package/dist/channel-example/get-channel-operations.d.ts.map +1 -0
- package/dist/channel-example/get-channel-operations.js +20 -0
- package/dist/channel-example/get-channel-parameters.d.ts +14 -0
- package/dist/channel-example/get-channel-parameters.d.ts.map +1 -0
- package/dist/channel-example/get-channel-parameters.js +59 -0
- package/dist/channel-example/index.d.ts +15 -0
- package/dist/channel-example/index.d.ts.map +1 -1
- package/dist/channel-example/index.js +9 -0
- package/dist/channel-example/resolve-channel.d.ts +11 -0
- package/dist/channel-example/resolve-channel.d.ts.map +1 -0
- package/dist/channel-example/resolve-channel.js +13 -0
- package/dist/channel-example/resolve-operation-channel.d.ts +11 -0
- package/dist/channel-example/resolve-operation-channel.d.ts.map +1 -0
- package/dist/channel-example/resolve-operation-channel.js +39 -0
- package/dist/channel-example/resolve-operation-with-traits.d.ts +6 -0
- package/dist/channel-example/resolve-operation-with-traits.d.ts.map +1 -0
- package/dist/channel-example/resolve-operation-with-traits.js +41 -0
- package/dist/channel-example/servers.d.ts.map +1 -1
- package/dist/channel-example/servers.js +23 -0
- package/dist/channel-example/types.d.ts +41 -0
- package/dist/channel-example/types.d.ts.map +1 -0
- package/dist/channel-example/types.js +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +8 -8
- package/dist/entities/auth/schema.d.ts +1473 -88
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/events/definitions/meta.d.ts +5 -3
- package/dist/events/definitions/meta.d.ts.map +1 -1
- package/dist/events/definitions/server.d.ts +21 -0
- package/dist/events/definitions/server.d.ts.map +1 -1
- package/dist/events/definitions/workspace.d.ts +7 -3
- package/dist/events/definitions/workspace.d.ts.map +1 -1
- package/dist/helpers/get-name-from-ref.d.ts +15 -0
- package/dist/helpers/get-name-from-ref.d.ts.map +1 -0
- package/dist/helpers/get-name-from-ref.js +37 -0
- package/dist/mutators/index.d.ts +4 -0
- package/dist/mutators/index.d.ts.map +1 -1
- package/dist/mutators/server.d.ts +26 -0
- package/dist/mutators/server.d.ts.map +1 -1
- package/dist/mutators/server.js +44 -1
- package/dist/navigation/get-navigation-options.d.ts +2 -2
- package/dist/navigation/get-navigation-options.d.ts.map +1 -1
- package/dist/navigation/get-navigation-options.js +26 -3
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts +23 -0
- package/dist/navigation/helpers/traverse-asyncapi-document.d.ts.map +1 -0
- package/dist/navigation/helpers/traverse-asyncapi-document.js +479 -0
- package/dist/navigation/helpers/traverse-description.d.ts +4 -3
- package/dist/navigation/helpers/traverse-description.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-description.js +2 -2
- package/dist/navigation/helpers/traverse-document.d.ts.map +1 -1
- package/dist/navigation/helpers/traverse-document.js +3 -3
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +1 -0
- package/dist/navigation/types.d.ts +3 -0
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/request-example/builder/body/build-request-body.d.ts.map +1 -1
- package/dist/request-example/builder/body/build-request-body.js +32 -1
- package/dist/request-example/builder/body/serialize-form-property.d.ts +23 -0
- package/dist/request-example/builder/body/serialize-form-property.d.ts.map +1 -0
- package/dist/request-example/builder/body/serialize-form-property.js +101 -0
- package/dist/request-example/builder/header/de-serialize-parameter.d.ts +4 -1
- package/dist/request-example/builder/header/de-serialize-parameter.d.ts.map +1 -1
- package/dist/request-example/builder/header/de-serialize-parameter.js +19 -13
- package/dist/request-example/builder/index.d.ts +1 -0
- package/dist/request-example/builder/index.d.ts.map +1 -1
- package/dist/request-example/builder/index.js +1 -0
- package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts +1 -1
- package/dist/request-example/context/security/extract-security-scheme-secrets.d.ts.map +1 -1
- package/dist/request-example/context/security/extract-security-scheme-secrets.js +12 -8
- package/dist/request-example/context/security/merge-security.d.ts +1 -1
- package/dist/request-example/context/security/merge-security.d.ts.map +1 -1
- package/dist/request-example/context/security/merge-security.js +2 -2
- package/dist/request-example/index.d.ts +1 -1
- package/dist/request-example/index.d.ts.map +1 -1
- package/dist/request-example/index.js +1 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts +1 -3
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.d.ts.map +1 -1
- package/dist/schemas/extensions/document/x-scalar-sdk-installation.js +0 -2
- package/dist/schemas/extensions/operation/index.d.ts +1 -1
- package/dist/schemas/extensions/operation/index.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-code-samples.d.ts +71 -0
- package/dist/schemas/extensions/operation/x-code-samples.d.ts.map +1 -1
- package/dist/schemas/extensions/operation/x-code-samples.js +50 -7
- package/dist/schemas/navigation.d.ts +113 -4
- package/dist/schemas/navigation.d.ts.map +1 -1
- package/dist/schemas/navigation.js +22 -0
- package/dist/schemas/reference-config/index.d.ts +286 -9
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +286 -9
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/openapi/index.d.ts +0 -1
- package/dist/schemas/v3.1/openapi/index.d.ts.map +1 -1
- package/dist/schemas/v3.1/openapi/index.js +59 -17
- package/dist/schemas/v3.1/strict/info.d.ts +0 -1
- package/dist/schemas/v3.1/strict/info.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +11168 -1473
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.js +4 -1
- package/dist/schemas/v3.1/strict/operation.d.ts +25 -0
- package/dist/schemas/v3.1/strict/operation.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts +3 -0
- package/dist/schemas/v3.1/strict/ref-definitions.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/ref-definitions.js +3 -0
- package/dist/schemas/v3.1/strict/schema.d.ts +387 -26
- package/dist/schemas/v3.1/strict/schema.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/schema.js +53 -28
- package/dist/schemas/workspace-specification/index.d.ts +1 -1
- package/dist/schemas/workspace.d.ts +2 -3
- package/dist/schemas/workspace.d.ts.map +1 -1
- package/dist/schemas/workspace.js +5 -1
- package/package.json +7 -7
|
@@ -0,0 +1,479 @@
|
|
|
1
|
+
import { sortByOrder } from '@scalar/helpers/array/sort-by-order';
|
|
2
|
+
import { objectKeys } from '@scalar/helpers/object/object-keys';
|
|
3
|
+
import { getResolvedRef, mergeSiblingReferences } from '../../helpers/get-resolved-ref.js';
|
|
4
|
+
import { isHidden } from '../../helpers/is-hidden.js';
|
|
5
|
+
import { unpackProxyObject } from '../../helpers/unpack-proxy.js';
|
|
6
|
+
import { getNavigationOptions } from '../../navigation/get-navigation-options.js';
|
|
7
|
+
import { getTag } from '../../navigation/helpers/get-tag.js';
|
|
8
|
+
import { traverseDescription } from '../../navigation/helpers/traverse-description.js';
|
|
9
|
+
import { traverseSchemas } from '../../navigation/helpers/traverse-schemas.js';
|
|
10
|
+
/**
|
|
11
|
+
* Picks the first display candidate that is non-empty after trimming.
|
|
12
|
+
* Used by title helpers so we prefer `title`, then `summary`, then a fallback.
|
|
13
|
+
*/
|
|
14
|
+
const pickNonEmpty = (...candidates) => {
|
|
15
|
+
for (const candidate of candidates) {
|
|
16
|
+
const trimmed = candidate?.trim();
|
|
17
|
+
if (trimmed) {
|
|
18
|
+
return trimmed;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Returns the channel address shown in the sidebar and routing.
|
|
25
|
+
* Falls back to the channel map key when `channel.address` is missing or empty.
|
|
26
|
+
*/
|
|
27
|
+
const getChannelAddress = (channelName, channel) => typeof channel.address === 'string' && channel.address.length > 0 ? channel.address : channelName;
|
|
28
|
+
/**
|
|
29
|
+
* Sidebar label for a channel: `title`, then `summary`, then the resolved address.
|
|
30
|
+
*/
|
|
31
|
+
const getChannelTitle = (channel, channelName) => pickNonEmpty(channel.title, channel.summary) ?? getChannelAddress(channelName, channel);
|
|
32
|
+
/**
|
|
33
|
+
* Sidebar label for an operation: `title`, then `summary`, then the operation map key.
|
|
34
|
+
*/
|
|
35
|
+
const getOperationTitle = (operation, operationName) => pickNonEmpty(operation.title, operation.summary) ?? operationName;
|
|
36
|
+
/**
|
|
37
|
+
* Sidebar label for a message: `title`, then `summary`, then `name`, then the message map key.
|
|
38
|
+
*/
|
|
39
|
+
const getMessageTitle = (message, messageName) => pickNonEmpty(message.title, message.summary, message.name) ?? messageName;
|
|
40
|
+
/**
|
|
41
|
+
* Parses a channel JSON pointer (`#/channels/<name>`) into the key used in `document.channels`.
|
|
42
|
+
*/
|
|
43
|
+
const getChannelNameFromRef = (ref) => ref.match(/^#\/channels\/([^/]+)$/)?.[1];
|
|
44
|
+
/**
|
|
45
|
+
* Resolves the channel referenced by an operation.
|
|
46
|
+
*
|
|
47
|
+
* The AsyncAPI 3 spec requires `operation.channel` to be a Reference Object,
|
|
48
|
+
* so we read the channel key straight from the JSON pointer rather than trying
|
|
49
|
+
* to match against the resolved channel by identity.
|
|
50
|
+
*/
|
|
51
|
+
const resolveOperationChannel = (document, operation) => {
|
|
52
|
+
const channelRef = operation.channel;
|
|
53
|
+
if (!channelRef || !('$ref' in channelRef)) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
const channelName = getChannelNameFromRef(channelRef.$ref);
|
|
57
|
+
if (!channelName) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
const channelEntry = document.channels?.[channelName];
|
|
61
|
+
if (!channelEntry) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
channelName,
|
|
66
|
+
channel: getResolvedRef(channelEntry, mergeSiblingReferences),
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Resolves which channel message names an operation references.
|
|
71
|
+
*
|
|
72
|
+
* - `operation.messages === undefined` → every channel message is included.
|
|
73
|
+
* - `operation.messages === []` → no channel messages are included.
|
|
74
|
+
* - Otherwise → the channel messages that the operation explicitly references.
|
|
75
|
+
*/
|
|
76
|
+
const resolveOperationMessageNames = (operation, channel, channelName) => {
|
|
77
|
+
const channelMessages = channel.messages ?? {};
|
|
78
|
+
if (operation.messages === undefined) {
|
|
79
|
+
return objectKeys(channelMessages);
|
|
80
|
+
}
|
|
81
|
+
if (operation.messages.length === 0) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
const channelScopePrefix = `#/channels/${channelName}/messages/`;
|
|
85
|
+
const names = new Set();
|
|
86
|
+
for (const messageRef of operation.messages) {
|
|
87
|
+
if (!('$ref' in messageRef)) {
|
|
88
|
+
continue;
|
|
89
|
+
}
|
|
90
|
+
// Common case: a channel-scoped reference like `#/channels/<name>/messages/<id>`.
|
|
91
|
+
if (messageRef.$ref.startsWith(channelScopePrefix)) {
|
|
92
|
+
const candidate = messageRef.$ref.slice(channelScopePrefix.length);
|
|
93
|
+
if (channelMessages[candidate]) {
|
|
94
|
+
names.add(candidate);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// Fallback: a channel-level message that points to the same target.
|
|
99
|
+
for (const [name, entry] of Object.entries(channelMessages)) {
|
|
100
|
+
if (entry && '$ref' in entry && entry.$ref === messageRef.$ref) {
|
|
101
|
+
names.add(name);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return [...names];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Normalizes an AsyncAPI tag (inline object or `$ref`) into the OpenAPI-style `TagObject`
|
|
109
|
+
* used by the shared tag navigation helpers.
|
|
110
|
+
*/
|
|
111
|
+
const toTagObject = (tag) => {
|
|
112
|
+
const resolved = getResolvedRef(tag, mergeSiblingReferences);
|
|
113
|
+
return {
|
|
114
|
+
name: resolved.name,
|
|
115
|
+
description: resolved.description,
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Sorts operation navigation entries in place using the workspace `operationsSorter` option.
|
|
120
|
+
* Maps AsyncAPI `action` to the HTTP-style sorter fields so OpenAPI and AsyncAPI share the same API.
|
|
121
|
+
*/
|
|
122
|
+
const sortOperations = (entries, operationsSorter) => {
|
|
123
|
+
if (operationsSorter === 'alpha') {
|
|
124
|
+
entries.sort((a, b) => a.title.localeCompare(b.title));
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (operationsSorter === 'method') {
|
|
128
|
+
entries.sort((a, b) => a.action.localeCompare(b.action));
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (typeof operationsSorter === 'function') {
|
|
132
|
+
entries.sort((a, b) => operationsSorter({ method: a.action, path: a.operationName, ref: a.operationName, httpVerb: a.action }, { method: b.action, path: b.operationName, ref: b.operationName, httpVerb: b.action }));
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
/** Sorts message navigation entries alphabetically by display title. */
|
|
136
|
+
const sortMessages = (entries) => {
|
|
137
|
+
entries.sort((a, b) => a.title.localeCompare(b.title));
|
|
138
|
+
};
|
|
139
|
+
/**
|
|
140
|
+
* Builds nested message entries for one operation.
|
|
141
|
+
* Resolves each message ref, skips hidden messages, and sorts the result by title.
|
|
142
|
+
*/
|
|
143
|
+
const createMessageEntries = ({ channelName, channel, operationId, messageNames, generateId, }) => {
|
|
144
|
+
const messages = messageNames.flatMap((messageName) => {
|
|
145
|
+
const messageNode = channel.messages?.[messageName];
|
|
146
|
+
if (!messageNode) {
|
|
147
|
+
return [];
|
|
148
|
+
}
|
|
149
|
+
const message = getResolvedRef(messageNode, mergeSiblingReferences);
|
|
150
|
+
if (isHidden(message)) {
|
|
151
|
+
return [];
|
|
152
|
+
}
|
|
153
|
+
return [
|
|
154
|
+
{
|
|
155
|
+
type: 'asyncapi-message',
|
|
156
|
+
id: generateId({
|
|
157
|
+
type: 'asyncapi-message',
|
|
158
|
+
messageName,
|
|
159
|
+
channelName,
|
|
160
|
+
parentId: operationId,
|
|
161
|
+
}),
|
|
162
|
+
title: getMessageTitle(message, messageName),
|
|
163
|
+
messageName,
|
|
164
|
+
channelName,
|
|
165
|
+
},
|
|
166
|
+
];
|
|
167
|
+
});
|
|
168
|
+
sortMessages(messages);
|
|
169
|
+
return messages;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* Builds a single operation navigation entry under a channel.
|
|
173
|
+
* Includes nested messages when the operation references channel messages (or all of them by default).
|
|
174
|
+
* Returns `undefined` when the operation is hidden via `x-internal` or `x-scalar-ignore`.
|
|
175
|
+
*/
|
|
176
|
+
const createOperationEntry = ({ operationName, operation, channel, channelName, channelAddress, generateId, parentId, }) => {
|
|
177
|
+
if (isHidden(operation)) {
|
|
178
|
+
return undefined;
|
|
179
|
+
}
|
|
180
|
+
const operationId = generateId({
|
|
181
|
+
type: 'asyncapi-operation',
|
|
182
|
+
operationName,
|
|
183
|
+
parentId,
|
|
184
|
+
});
|
|
185
|
+
const messageEntries = createMessageEntries({
|
|
186
|
+
channelName,
|
|
187
|
+
channel,
|
|
188
|
+
operationId,
|
|
189
|
+
messageNames: resolveOperationMessageNames(operation, channel, channelName),
|
|
190
|
+
generateId,
|
|
191
|
+
});
|
|
192
|
+
return {
|
|
193
|
+
type: 'asyncapi-operation',
|
|
194
|
+
id: operationId,
|
|
195
|
+
title: getOperationTitle(operation, operationName),
|
|
196
|
+
operationName,
|
|
197
|
+
action: operation.action,
|
|
198
|
+
channelName,
|
|
199
|
+
channelAddress,
|
|
200
|
+
children: messageEntries.length > 0 ? messageEntries : undefined,
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* Builds a channel navigation entry from a bucket and the operations to render under it.
|
|
205
|
+
* The same channel may appear at the document root and under each of its channel-level tags.
|
|
206
|
+
* Writes `x-scalar-order` on the source channel (when it is not a bare `$ref`) so other code can reuse the order.
|
|
207
|
+
* Returns `undefined` when the channel is hidden or every requested operation was filtered out.
|
|
208
|
+
*/
|
|
209
|
+
const createChannelEntry = ({ bucket, operationEntries, generateId, parentId, parentTag, operationsSorter, document, }) => {
|
|
210
|
+
if (isHidden(bucket.channel)) {
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
const channelId = generateId({
|
|
214
|
+
type: 'asyncapi-channel',
|
|
215
|
+
channelName: bucket.channelName,
|
|
216
|
+
parentId,
|
|
217
|
+
parentTag,
|
|
218
|
+
});
|
|
219
|
+
const operations = operationEntries.flatMap(({ operationName, operation }) => {
|
|
220
|
+
const entry = createOperationEntry({
|
|
221
|
+
operationName,
|
|
222
|
+
operation,
|
|
223
|
+
channel: bucket.channel,
|
|
224
|
+
channelName: bucket.channelName,
|
|
225
|
+
channelAddress: bucket.channelAddress,
|
|
226
|
+
generateId,
|
|
227
|
+
parentId: channelId,
|
|
228
|
+
});
|
|
229
|
+
return entry ? [entry] : [];
|
|
230
|
+
});
|
|
231
|
+
sortOperations(operations, operationsSorter);
|
|
232
|
+
if (operations.length === 0) {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
// Persist the rendered order back onto the source channel for downstream consumers.
|
|
236
|
+
// We skip channels that are stored as references, since the order should live on the target.
|
|
237
|
+
const channelNode = document.channels?.[bucket.channelName];
|
|
238
|
+
if (channelNode && !('$ref' in channelNode)) {
|
|
239
|
+
;
|
|
240
|
+
channelNode['x-scalar-order'] = operations.map((child) => child.id);
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
type: 'asyncapi-channel',
|
|
244
|
+
id: channelId,
|
|
245
|
+
title: getChannelTitle(bucket.channel, bucket.channelName),
|
|
246
|
+
channelName: bucket.channelName,
|
|
247
|
+
channelAddress: bucket.channelAddress,
|
|
248
|
+
children: operations,
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
/**
|
|
252
|
+
* Wraps collected channel entries in a tag navigation node.
|
|
253
|
+
* Persists child order on the tag via `x-scalar-order` for later reordering in the UI.
|
|
254
|
+
*/
|
|
255
|
+
const createTagEntry = ({ tag, generateId, children, parentId, }) => {
|
|
256
|
+
const id = generateId({
|
|
257
|
+
type: 'tag',
|
|
258
|
+
tag,
|
|
259
|
+
parentId,
|
|
260
|
+
isGroup: false,
|
|
261
|
+
});
|
|
262
|
+
const title = tag['x-displayName'] ?? tag.name ?? 'Untitled Tag';
|
|
263
|
+
tag['x-scalar-order'] = children.map((child) => child.id);
|
|
264
|
+
return {
|
|
265
|
+
type: 'tag',
|
|
266
|
+
id,
|
|
267
|
+
title,
|
|
268
|
+
name: tag.name || title,
|
|
269
|
+
description: tag.description,
|
|
270
|
+
children,
|
|
271
|
+
isGroup: false,
|
|
272
|
+
isWebhooks: false,
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* Turns the in-memory `tagsMap` into top-level tag navigation entries.
|
|
277
|
+
* Respects per-tag `x-scalar-order`, document-level `x-scalar-order`, and `tagsSorter` (alpha or custom).
|
|
278
|
+
* Skips tags marked hidden.
|
|
279
|
+
*/
|
|
280
|
+
const getSortedTagEntries = ({ tagKeys, tagsMap, documentId, options: { tagsSorter, generateId }, sortOrder, }) => {
|
|
281
|
+
const entries = tagKeys.flatMap((key) => {
|
|
282
|
+
const { tag, entries: tagEntries } = getTag({ tagsMap, name: key, documentId, generateId });
|
|
283
|
+
if (isHidden(tag)) {
|
|
284
|
+
return [];
|
|
285
|
+
}
|
|
286
|
+
const tagOrder = tag['x-scalar-order'];
|
|
287
|
+
return createTagEntry({
|
|
288
|
+
tag,
|
|
289
|
+
generateId,
|
|
290
|
+
children: tagOrder ? sortByOrder(tagEntries, tagOrder, (item) => item.id) : tagEntries,
|
|
291
|
+
parentId: documentId,
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
if (sortOrder) {
|
|
295
|
+
return sortByOrder(entries, sortOrder, (item) => item.id);
|
|
296
|
+
}
|
|
297
|
+
if (tagsSorter === 'alpha') {
|
|
298
|
+
entries.sort((a, b) => a.title.localeCompare(b.title));
|
|
299
|
+
}
|
|
300
|
+
else if (typeof tagsSorter === 'function') {
|
|
301
|
+
entries.sort((a, b) => tagsSorter(getTag({ tagsMap, name: a.name, documentId, generateId }).tag, getTag({ tagsMap, name: b.name, documentId, generateId }).tag));
|
|
302
|
+
}
|
|
303
|
+
return entries;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* Returns the existing bucket for a channel name or creates one with address and channel-level tags.
|
|
307
|
+
* Buckets are shared across the traversal so operations on the same channel accumulate together.
|
|
308
|
+
*/
|
|
309
|
+
const getOrCreateChannelBucket = (channelBuckets, channelName, channel) => {
|
|
310
|
+
const existing = channelBuckets.get(channelName);
|
|
311
|
+
if (existing) {
|
|
312
|
+
return existing;
|
|
313
|
+
}
|
|
314
|
+
const bucket = {
|
|
315
|
+
channelName,
|
|
316
|
+
channel,
|
|
317
|
+
channelAddress: getChannelAddress(channelName, channel),
|
|
318
|
+
channelTags: channel.tags?.map(toTagObject) ?? [],
|
|
319
|
+
operations: [],
|
|
320
|
+
};
|
|
321
|
+
channelBuckets.set(channelName, bucket);
|
|
322
|
+
return bucket;
|
|
323
|
+
};
|
|
324
|
+
/**
|
|
325
|
+
* Builds the channel/operation registry used to drive the rest of the traversal.
|
|
326
|
+
*
|
|
327
|
+
* Channels are seeded first so that they can appear in the sidebar even when no
|
|
328
|
+
* operations reference them. Operations are then assigned to the bucket of the
|
|
329
|
+
* channel they reference; operations with no resolvable channel are skipped.
|
|
330
|
+
*/
|
|
331
|
+
const collectChannelBuckets = (document) => {
|
|
332
|
+
const channelBuckets = new Map();
|
|
333
|
+
for (const [channelName, channelNode] of Object.entries(document.channels ?? {})) {
|
|
334
|
+
if (!channelNode) {
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
const channel = getResolvedRef(channelNode, mergeSiblingReferences);
|
|
338
|
+
if (isHidden(channel)) {
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
getOrCreateChannelBucket(channelBuckets, channelName, channel);
|
|
342
|
+
}
|
|
343
|
+
for (const [operationName, operationNode] of Object.entries(document.operations ?? {})) {
|
|
344
|
+
if (!operationNode) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
const operation = getResolvedRef(operationNode, mergeSiblingReferences);
|
|
348
|
+
if (isHidden(operation)) {
|
|
349
|
+
continue;
|
|
350
|
+
}
|
|
351
|
+
const resolved = resolveOperationChannel(document, operation);
|
|
352
|
+
if (!resolved) {
|
|
353
|
+
continue;
|
|
354
|
+
}
|
|
355
|
+
const bucket = getOrCreateChannelBucket(channelBuckets, resolved.channelName, resolved.channel);
|
|
356
|
+
// Operation-level tags are deliberately ignored here. Tag grouping is driven by
|
|
357
|
+
// channel-level tags only until operation-tag grouping is reintroduced.
|
|
358
|
+
bucket.operations.push({
|
|
359
|
+
operationName,
|
|
360
|
+
operation,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
return channelBuckets;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Entry point: walks an AsyncAPI document and produces the sidebar tree.
|
|
367
|
+
*
|
|
368
|
+
* High-level flow:
|
|
369
|
+
* 1. `collectChannelBuckets` — resolve refs, group operations by channel, collect channel tags.
|
|
370
|
+
* 2. For each bucket — build the channel entry at the document root with all of its operations.
|
|
371
|
+
* 3. Apply channel-level tags so a channel can also appear under each of its tags.
|
|
372
|
+
* 4. Sort tags and top-level entries, then persist `x-scalar-order` on the document for stable ordering.
|
|
373
|
+
*
|
|
374
|
+
* Operation-level tags are intentionally not used to group channels yet; only channel-level
|
|
375
|
+
* tags drive tag grouping.
|
|
376
|
+
*/
|
|
377
|
+
export const traverseAsyncApiDocument = (documentName, document, options) => {
|
|
378
|
+
const { generateId, operationsSorter, tagsSorter, hideModels, modelsSectionLabel } = getNavigationOptions(documentName, options);
|
|
379
|
+
const documentId = generateId({
|
|
380
|
+
type: 'document',
|
|
381
|
+
info: document.info,
|
|
382
|
+
name: documentName,
|
|
383
|
+
});
|
|
384
|
+
const channelBuckets = collectChannelBuckets(document);
|
|
385
|
+
const tagsMap = new Map();
|
|
386
|
+
const untaggedChannels = [];
|
|
387
|
+
for (const bucket of channelBuckets.values()) {
|
|
388
|
+
// Operation-level tags are intentionally skipped for now: every operation is rendered
|
|
389
|
+
// under its channel, and only the channel's own tags drive tag grouping below.
|
|
390
|
+
if (bucket.channelTags.length === 0) {
|
|
391
|
+
const untaggedChannel = createChannelEntry({
|
|
392
|
+
bucket,
|
|
393
|
+
operationEntries: bucket.operations,
|
|
394
|
+
generateId,
|
|
395
|
+
parentId: documentId,
|
|
396
|
+
operationsSorter,
|
|
397
|
+
document,
|
|
398
|
+
});
|
|
399
|
+
if (untaggedChannel) {
|
|
400
|
+
untaggedChannels.push(untaggedChannel);
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
// Channels can declare their own tags independently of any operation tags.
|
|
404
|
+
for (const tag of bucket.channelTags) {
|
|
405
|
+
const tagName = tag.name ?? 'Untitled Tag';
|
|
406
|
+
const { id: tagId, entries } = getTag({ tagsMap, name: tagName, documentId, generateId });
|
|
407
|
+
const alreadyRegistered = entries.some((entry) => entry.type === 'asyncapi-channel' && entry.channelName === bucket.channelName);
|
|
408
|
+
if (alreadyRegistered) {
|
|
409
|
+
continue;
|
|
410
|
+
}
|
|
411
|
+
const taggedChannel = createChannelEntry({
|
|
412
|
+
bucket,
|
|
413
|
+
operationEntries: bucket.operations,
|
|
414
|
+
generateId,
|
|
415
|
+
parentId: tagId,
|
|
416
|
+
parentTag: { tag, id: tagId },
|
|
417
|
+
operationsSorter,
|
|
418
|
+
document,
|
|
419
|
+
});
|
|
420
|
+
if (taggedChannel) {
|
|
421
|
+
entries.push(taggedChannel);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
// AsyncAPI documents carry reusable schemas under `components.schemas`, just like OpenAPI.
|
|
426
|
+
// Reuse the OpenAPI schema traversal so they render as "Models" in the same way. Schemas
|
|
427
|
+
// tagged via `x-tags` are pushed into `tagsMap` here, so this must run before the tag
|
|
428
|
+
// entries below are built from that map.
|
|
429
|
+
//
|
|
430
|
+
// `traverseSchemas` only reads `components.schemas`, which both document shapes share, but it is
|
|
431
|
+
// typed against the OpenAPI document. We hand it the resolved `components` (so a `$ref`-only
|
|
432
|
+
// wrapper still exposes its schemas) wrapped in a minimal document; the cast bridges the single
|
|
433
|
+
// overlapping field, since AsyncAPI and OpenAPI documents are otherwise distinct types.
|
|
434
|
+
const components = document.components ? getResolvedRef(document.components, mergeSiblingReferences) : undefined;
|
|
435
|
+
const untaggedModels = !hideModels && components?.schemas
|
|
436
|
+
? traverseSchemas({ documentId, document: { components }, generateId, tagsMap })
|
|
437
|
+
: [];
|
|
438
|
+
// Surface the Introduction entry plus any headings extracted from `info.description`
|
|
439
|
+
// before the channel/tag entries, mirroring how OpenAPI documents are traversed.
|
|
440
|
+
const entries = traverseDescription({
|
|
441
|
+
generateId,
|
|
442
|
+
parentId: documentId,
|
|
443
|
+
info: document.info,
|
|
444
|
+
});
|
|
445
|
+
if (tagsMap.size > 0) {
|
|
446
|
+
entries.push(...getSortedTagEntries({
|
|
447
|
+
tagKeys: [...tagsMap.keys()],
|
|
448
|
+
tagsMap,
|
|
449
|
+
documentId,
|
|
450
|
+
options: { tagsSorter, generateId },
|
|
451
|
+
sortOrder: document['x-scalar-order'],
|
|
452
|
+
}));
|
|
453
|
+
}
|
|
454
|
+
if (operationsSorter === 'alpha') {
|
|
455
|
+
untaggedChannels.sort((a, b) => a.title.localeCompare(b.title));
|
|
456
|
+
}
|
|
457
|
+
entries.push(...untaggedChannels);
|
|
458
|
+
// Mirror OpenAPI: untagged schemas are grouped under a single top-level "Models" section.
|
|
459
|
+
if (untaggedModels.length) {
|
|
460
|
+
entries.push({
|
|
461
|
+
type: 'models',
|
|
462
|
+
id: generateId({ type: 'model', parentId: documentId }),
|
|
463
|
+
title: modelsSectionLabel,
|
|
464
|
+
name: modelsSectionLabel,
|
|
465
|
+
children: untaggedModels,
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
const sortOrder = document['x-scalar-order'];
|
|
469
|
+
const orderedEntries = sortOrder ? sortByOrder(entries, sortOrder, (entry) => entry.id) : entries;
|
|
470
|
+
document['x-scalar-order'] = unpackProxyObject(orderedEntries.map((entry) => entry.id));
|
|
471
|
+
return {
|
|
472
|
+
id: documentId,
|
|
473
|
+
type: 'document',
|
|
474
|
+
title: document.info?.title?.trim() || 'Untitled Document',
|
|
475
|
+
name: documentName,
|
|
476
|
+
children: orderedEntries,
|
|
477
|
+
icon: document['x-scalar-icon'],
|
|
478
|
+
};
|
|
479
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { AsyncApiInfoObject } from '@scalar/types/asyncapi/3.1';
|
|
1
2
|
import type { TraverseSpecOptions } from '../../navigation/types.js';
|
|
2
3
|
import type { TraversedDescription } from '../../schemas/navigation.js';
|
|
3
4
|
import type { InfoObject } from '../../schemas/v3.1/strict/info.js';
|
|
4
5
|
/**
|
|
5
|
-
* Creates a hierarchical navigation structure from markdown headings in an OpenAPI description.
|
|
6
|
+
* Creates a hierarchical navigation structure from markdown headings in an OpenAPI or AsyncAPI description.
|
|
6
7
|
*
|
|
7
8
|
* The function processes markdown headings to create a two-level navigation tree:
|
|
8
9
|
* - Level 1: Main sections (based on the lowest heading level found)
|
|
@@ -14,13 +15,13 @@ import type { InfoObject } from '../../schemas/v3.1/strict/info.js';
|
|
|
14
15
|
* @param description - The markdown description text to process
|
|
15
16
|
* @param generateId - Function to generate unique IDs for headings
|
|
16
17
|
* @param parentId - The ID of the parent entry
|
|
17
|
-
* @param info - OpenAPI Info Object
|
|
18
|
+
* @param info - OpenAPI or AsyncAPI Info Object
|
|
18
19
|
*
|
|
19
20
|
* @returns Array of TraversedDescription entries with their hierarchy
|
|
20
21
|
*/
|
|
21
22
|
export declare const traverseDescription: ({ generateId, parentId, info, }: {
|
|
22
23
|
generateId: TraverseSpecOptions["generateId"];
|
|
23
24
|
parentId: string;
|
|
24
|
-
info: InfoObject;
|
|
25
|
+
info: InfoObject | AsyncApiInfoObject;
|
|
25
26
|
}) => TraversedDescription[];
|
|
26
27
|
//# sourceMappingURL=traverse-description.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-description.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-description.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traverse-description.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-description.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAGpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AA8B5D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,GAAI,iCAIjC;IACD,UAAU,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAA;IAC7C,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,UAAU,GAAG,kBAAkB,CAAA;CACtC,KAAG,oBAAoB,EAiEvB,CAAA"}
|
|
@@ -20,7 +20,7 @@ const getDefaultDescriptionEntry = (generateId, parentId, info) => {
|
|
|
20
20
|
return entry;
|
|
21
21
|
};
|
|
22
22
|
/**
|
|
23
|
-
* Creates a hierarchical navigation structure from markdown headings in an OpenAPI description.
|
|
23
|
+
* Creates a hierarchical navigation structure from markdown headings in an OpenAPI or AsyncAPI description.
|
|
24
24
|
*
|
|
25
25
|
* The function processes markdown headings to create a two-level navigation tree:
|
|
26
26
|
* - Level 1: Main sections (based on the lowest heading level found)
|
|
@@ -32,7 +32,7 @@ const getDefaultDescriptionEntry = (generateId, parentId, info) => {
|
|
|
32
32
|
* @param description - The markdown description text to process
|
|
33
33
|
* @param generateId - Function to generate unique IDs for headings
|
|
34
34
|
* @param parentId - The ID of the parent entry
|
|
35
|
-
* @param info - OpenAPI Info Object
|
|
35
|
+
* @param info - OpenAPI or AsyncAPI Info Object
|
|
36
36
|
*
|
|
37
37
|
* @returns Array of TraversedDescription entries with their hierarchy
|
|
38
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,qCAAqC,CAAA;AAElG,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAQ7E;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,UAAU,eAAe,EAAE,UAAU,iBAAiB;;;;;;;
|
|
1
|
+
{"version":3,"file":"traverse-document.d.ts","sourceRoot":"","sources":["../../../src/navigation/helpers/traverse-document.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAwB,MAAM,qCAAqC,CAAA;AAElG,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAQ7E;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,cAAc,MAAM,EAAE,UAAU,eAAe,EAAE,UAAU,iBAAiB;;;;;;;CA2H5G,CAAA"}
|
|
@@ -15,7 +15,7 @@ import { traverseWebhooks } from './traverse-webhooks.js';
|
|
|
15
15
|
* - Optional schema/model documentation
|
|
16
16
|
*/
|
|
17
17
|
export const traverseDocument = (documentName, document, options) => {
|
|
18
|
-
const { hideModels, tagsSorter, operationsSorter, generateId, operationTitleSource } = getNavigationOptions(documentName, options);
|
|
18
|
+
const { hideModels, modelsSectionLabel, tagsSorter, operationsSorter, generateId, operationTitleSource } = getNavigationOptions(documentName, options);
|
|
19
19
|
const documentId = generateId({
|
|
20
20
|
type: 'document',
|
|
21
21
|
info: document.info,
|
|
@@ -89,8 +89,8 @@ export const traverseDocument = (documentName, document, options) => {
|
|
|
89
89
|
type: 'model',
|
|
90
90
|
parentId: documentId,
|
|
91
91
|
}),
|
|
92
|
-
title:
|
|
93
|
-
name:
|
|
92
|
+
title: modelsSectionLabel,
|
|
93
|
+
name: modelsSectionLabel,
|
|
94
94
|
children: untaggedModels,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
@@ -2,6 +2,7 @@ export { getOpenapiObject } from './helpers/get-openapi-object.js';
|
|
|
2
2
|
export { type OperationEntriesMap, getOperationEntries } from './helpers/get-operation-entries.js';
|
|
3
3
|
export { getParentEntry } from './helpers/get-parent-entry.js';
|
|
4
4
|
export { type TagEntriesMap, getTagEntries } from './helpers/get-tag-entries.js';
|
|
5
|
+
export { traverseAsyncApiDocument } from './helpers/traverse-asyncapi-document.js';
|
|
5
6
|
export { traverseDocument as createNavigation } from './helpers/traverse-document.js';
|
|
6
7
|
export type { TraverseSpecOptions as createNavigationOptions } from './types.js';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,KAAK,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAClF,YAAY,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAC/D,OAAO,EAAE,KAAK,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAA;AAC3D,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAA;AAC/E,OAAO,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAClF,YAAY,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,MAAM,SAAS,CAAA"}
|
package/dist/navigation/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { getOpenapiObject } from './helpers/get-openapi-object.js';
|
|
|
2
2
|
export { getOperationEntries } from './helpers/get-operation-entries.js';
|
|
3
3
|
export { getParentEntry } from './helpers/get-parent-entry.js';
|
|
4
4
|
export { getTagEntries } from './helpers/get-tag-entries.js';
|
|
5
|
+
export { traverseAsyncApiDocument } from './helpers/traverse-asyncapi-document.js';
|
|
5
6
|
export { traverseDocument as createNavigation } from './helpers/traverse-document.js';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ModelsSectionLabel } from '@scalar/types/api-reference';
|
|
1
2
|
import type { IdGenerator, TraversedEntry } from '../schemas/navigation.js';
|
|
2
3
|
import type { TagObject } from '../schemas/v3.1/strict/openapi-document.js';
|
|
3
4
|
/** Map of tagNames and their entries */
|
|
@@ -30,6 +31,8 @@ export type TraverseSpecOptions = {
|
|
|
30
31
|
operationsSorter?: 'alpha' | 'method' | ((a: OperationSortValue, b: OperationSortValue) => number);
|
|
31
32
|
/** Whether to hide model schemas from the navigation */
|
|
32
33
|
hideModels: boolean;
|
|
34
|
+
/** User-facing label for the components.schemas section */
|
|
35
|
+
modelsSectionLabel: ModelsSectionLabel;
|
|
33
36
|
/** Whether to derive operation titles from the operation summary or the path */
|
|
34
37
|
operationTitleSource?: OperationTitleSource;
|
|
35
38
|
generateId: IdGenerator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAEvE,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAE9G,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC,CAAA;IAE/D,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAA;IAElG,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAA;IAEnB,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAE3C,UAAU,EAAE,WAAW,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAEvE,wCAAwC;AACxC,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,SAAS,CAAC;IAAC,OAAO,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,CAAA;AAE9G,KAAK,kBAAkB,GAAG;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,+FAA+F;AAC/F,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,MAAM,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,KAAK,MAAM,CAAC,CAAA;IAE/D,sGAAsG;IACtG,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,EAAE,kBAAkB,KAAK,MAAM,CAAC,CAAA;IAElG,wDAAwD;IACxD,UAAU,EAAE,OAAO,CAAA;IAEnB,2DAA2D;IAC3D,kBAAkB,EAAE,kBAAkB,CAAA;IAEtC,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAE3C,UAAU,EAAE,WAAW,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;
|
|
1
|
+
{"version":3,"file":"build-request-body.d.ts","sourceRoot":"","sources":["../../../../src/request-example/builder/body/build-request-body.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0DAA0D,CAAA;AAOjG,KAAK,QAAQ,GAAG;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,CACH;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,GACD;QACE,IAAI,EAAE,MAAM,CAAA;QACZ,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,IAAI,CAAA;QACX,WAAW,CAAC,EAAE,MAAM,CAAA;KACrB,CACJ,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,UAAU,GAAG;IAChB,IAAI,EAAE,YAAY,CAAA;IAClB,KAAK,EAAE;QACL,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,CAAA;KACd,EAAE,CAAA;CACJ,CAAA;AAED,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,KAAK,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,UAAU,GAAG,GAAG,CAAA;AAiCrD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,aAAa,iBAAiB,GAAG,SAAS;AAC1C,qCAAqC;AACrC,oBAAuB;AACvB,sEAAsE;AACtE,kCAAkC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KACvD,WAAW,GAAG,IAkRhB,CAAA"}
|