@sdk-it/spec 0.20.0 → 0.21.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/dist/lib/loaders/load-spec.d.ts.map +1 -1
- package/dist/lib/loaders/load-spec.js +5 -3
- package/dist/lib/loaders/load-spec.js.map +2 -2
- package/dist/lib/loaders/remote-loader.d.ts.map +1 -1
- package/dist/lib/loaders/remote-loader.js +3 -0
- package/dist/lib/loaders/remote-loader.js.map +2 -2
- package/dist/lib/operation.d.ts +20 -2
- package/dist/lib/operation.d.ts.map +1 -1
- package/dist/lib/operation.js +153 -14
- package/dist/lib/operation.js.map +2 -2
- package/dist/lib/pagination/pagination-result.d.ts +20 -0
- package/dist/lib/pagination/pagination-result.d.ts.map +1 -0
- package/dist/lib/pagination/pagination-result.js +237 -0
- package/dist/lib/pagination/pagination-result.js.map +7 -0
- package/dist/lib/pagination/pagination-result.test.d.ts +2 -0
- package/dist/lib/pagination/pagination-result.test.d.ts.map +1 -0
- package/dist/lib/pagination/pagination-result.test.js +548 -0
- package/dist/lib/pagination/pagination-result.test.js.map +7 -0
- package/dist/lib/pagination/pagination.d.ts +50 -0
- package/dist/lib/pagination/pagination.d.ts.map +1 -0
- package/dist/lib/pagination/pagination.js +199 -0
- package/dist/lib/pagination/pagination.js.map +7 -0
- package/dist/lib/pagination/pagination.test.d.ts +2 -0
- package/dist/lib/pagination/pagination.test.d.ts.map +1 -0
- package/dist/lib/pagination/pagination.test.js +380 -0
- package/dist/lib/pagination/pagination.test.js.map +7 -0
- package/dist/lib/sidebar.d.ts +3 -6
- package/dist/lib/sidebar.d.ts.map +1 -1
- package/dist/lib/sidebar.js +64 -16
- package/dist/lib/sidebar.js.map +2 -2
- package/package.json +3 -2
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import pluralize from "pluralize";
|
|
2
|
+
const PRIMARY_TOP_TIER_KEYWORDS = [
|
|
3
|
+
"data",
|
|
4
|
+
"items",
|
|
5
|
+
"results",
|
|
6
|
+
"value"
|
|
7
|
+
];
|
|
8
|
+
const PRIMARY_OTHER_KEYWORDS = [
|
|
9
|
+
"records",
|
|
10
|
+
"content",
|
|
11
|
+
"list",
|
|
12
|
+
"payload",
|
|
13
|
+
"entities",
|
|
14
|
+
"collection",
|
|
15
|
+
"users",
|
|
16
|
+
"products",
|
|
17
|
+
"orders",
|
|
18
|
+
"bookings",
|
|
19
|
+
"articles",
|
|
20
|
+
"posts",
|
|
21
|
+
"documents",
|
|
22
|
+
"events"
|
|
23
|
+
];
|
|
24
|
+
const SECONDARY_KEYWORDS = ["entries", "rows", "elements"];
|
|
25
|
+
const PLURAL_DEPRIORITIZE_LIST = [
|
|
26
|
+
"status",
|
|
27
|
+
"success",
|
|
28
|
+
"address",
|
|
29
|
+
"details",
|
|
30
|
+
"properties",
|
|
31
|
+
"params",
|
|
32
|
+
"headers",
|
|
33
|
+
"cookies",
|
|
34
|
+
"series",
|
|
35
|
+
"links",
|
|
36
|
+
"meta",
|
|
37
|
+
"metadata",
|
|
38
|
+
"statistics",
|
|
39
|
+
"settings",
|
|
40
|
+
"options",
|
|
41
|
+
"permissions",
|
|
42
|
+
"credentials",
|
|
43
|
+
"diagnostics",
|
|
44
|
+
"warnings",
|
|
45
|
+
"errors",
|
|
46
|
+
"actions",
|
|
47
|
+
"attributes",
|
|
48
|
+
"categories",
|
|
49
|
+
"features",
|
|
50
|
+
"includes",
|
|
51
|
+
"tags"
|
|
52
|
+
];
|
|
53
|
+
const HAS_MORE_PRIMARY_POSITIVE_EXACT = [
|
|
54
|
+
"hasmore",
|
|
55
|
+
"hasnext",
|
|
56
|
+
"hasnextpage",
|
|
57
|
+
"moreitems",
|
|
58
|
+
"moreitemsavailable",
|
|
59
|
+
"nextpage",
|
|
60
|
+
"nextpageexists",
|
|
61
|
+
"nextpageavailable",
|
|
62
|
+
"hasadditionalresults",
|
|
63
|
+
"moreresultsavailable",
|
|
64
|
+
"canloadmore",
|
|
65
|
+
"hasadditional",
|
|
66
|
+
"additionalitems",
|
|
67
|
+
"fetchmore"
|
|
68
|
+
];
|
|
69
|
+
const HAS_MORE_SECONDARY_POSITIVE_EXACT = ["more", "next"];
|
|
70
|
+
const HAS_MORE_PRIMARY_INVERTED_EXACT = [
|
|
71
|
+
"islast",
|
|
72
|
+
"lastpage",
|
|
73
|
+
"endofresults",
|
|
74
|
+
"endoflist",
|
|
75
|
+
"nomoreitems",
|
|
76
|
+
"nomoredata",
|
|
77
|
+
"allitemsloaded",
|
|
78
|
+
"iscomplete",
|
|
79
|
+
"completed"
|
|
80
|
+
];
|
|
81
|
+
const HAS_MORE_POSITIVE_REGEX_PATTERNS = [
|
|
82
|
+
"\\bhas_?more\\b",
|
|
83
|
+
"\\bhas_?next\\b",
|
|
84
|
+
// e.g., itemsHasNext, items_has_next
|
|
85
|
+
"\\bmore_?items\\b",
|
|
86
|
+
"\\bnext_?page\\b",
|
|
87
|
+
// e.g., userNextPageFlag
|
|
88
|
+
"\\badditional\\b",
|
|
89
|
+
// e.g., hasAdditionalData, additional_results_exist
|
|
90
|
+
"\\bcontinuation\\b",
|
|
91
|
+
// e.g., continuationAvailable, has_continuation_token
|
|
92
|
+
"\\bmore_?results\\b",
|
|
93
|
+
"\\bpage_?available\\b",
|
|
94
|
+
"\\bnext(?:_?(page))?\\b"
|
|
95
|
+
];
|
|
96
|
+
const COMPILED_HAS_MORE_POSITIVE_REGEXES = HAS_MORE_POSITIVE_REGEX_PATTERNS.map((p) => new RegExp(p, "i"));
|
|
97
|
+
const HAS_MORE_INVERTED_REGEX_PATTERNS = [
|
|
98
|
+
"\\bis_?last\\b",
|
|
99
|
+
// e.g., pageIsLast
|
|
100
|
+
"\\blast_?page\\b",
|
|
101
|
+
// e.g., resultsAreLastPage
|
|
102
|
+
"\\bend_?of_?(data|results|list|items|stream)\\b",
|
|
103
|
+
"\\bno_?more_?(items|data|results)?\\b",
|
|
104
|
+
"\\ball_?(items_?)?loaded\\b",
|
|
105
|
+
"\\bis_?complete\\b"
|
|
106
|
+
];
|
|
107
|
+
const COMPILED_HAS_MORE_INVERTED_REGEXES = HAS_MORE_INVERTED_REGEX_PATTERNS.map((p) => new RegExp(p, "i"));
|
|
108
|
+
function getItemsName(properties) {
|
|
109
|
+
const arrayPropertyNames = [];
|
|
110
|
+
for (const propName in properties) {
|
|
111
|
+
if (propName in properties) {
|
|
112
|
+
const propSchema = properties[propName];
|
|
113
|
+
if (propSchema && propSchema.type === "array") {
|
|
114
|
+
arrayPropertyNames.push(propName);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (arrayPropertyNames.length === 0) {
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
if (arrayPropertyNames.length === 1) {
|
|
122
|
+
return arrayPropertyNames[0];
|
|
123
|
+
}
|
|
124
|
+
let bestCandidate = null;
|
|
125
|
+
let candidateRank = Infinity;
|
|
126
|
+
const updateCandidate = (propName, rank) => {
|
|
127
|
+
if (rank < candidateRank) {
|
|
128
|
+
bestCandidate = propName;
|
|
129
|
+
candidateRank = rank;
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
for (const propName of arrayPropertyNames) {
|
|
133
|
+
const lowerPropName = propName.toLowerCase();
|
|
134
|
+
if (PRIMARY_TOP_TIER_KEYWORDS.includes(lowerPropName)) {
|
|
135
|
+
updateCandidate(propName, 2);
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
if (candidateRank > 3 && PRIMARY_OTHER_KEYWORDS.includes(lowerPropName)) {
|
|
139
|
+
updateCandidate(propName, 3);
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
if (candidateRank > 4 && SECONDARY_KEYWORDS.includes(lowerPropName)) {
|
|
143
|
+
updateCandidate(propName, 4);
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
if (candidateRank > 5 && pluralize.isPlural(propName) && !PLURAL_DEPRIORITIZE_LIST.includes(lowerPropName)) {
|
|
147
|
+
updateCandidate(propName, 5);
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
if (candidateRank > 6 && pluralize.isPlural(propName) && PLURAL_DEPRIORITIZE_LIST.includes(lowerPropName)) {
|
|
151
|
+
updateCandidate(propName, 6);
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
if (bestCandidate) {
|
|
156
|
+
return bestCandidate;
|
|
157
|
+
}
|
|
158
|
+
return arrayPropertyNames[0];
|
|
159
|
+
}
|
|
160
|
+
function guess(properties) {
|
|
161
|
+
const booleanPropertyNames = [];
|
|
162
|
+
for (const propName in properties) {
|
|
163
|
+
if (Object.prototype.hasOwnProperty.call(properties, propName)) {
|
|
164
|
+
const propSchema = properties[propName];
|
|
165
|
+
if (propSchema && propSchema.type === "boolean" || propSchema.type === "integer") {
|
|
166
|
+
booleanPropertyNames.push(propName);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
if (booleanPropertyNames.length === 0) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
if (booleanPropertyNames.length === 1) {
|
|
174
|
+
return booleanPropertyNames[0];
|
|
175
|
+
}
|
|
176
|
+
let bestCandidate = null;
|
|
177
|
+
let candidateRank = Infinity;
|
|
178
|
+
const updateCandidate = (propName, rank) => {
|
|
179
|
+
if (rank < candidateRank) {
|
|
180
|
+
bestCandidate = propName;
|
|
181
|
+
candidateRank = rank;
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
for (const propName of booleanPropertyNames) {
|
|
185
|
+
const normalizedForExactMatch = propName.toLowerCase().replace(/[-_]/g, "");
|
|
186
|
+
let currentPropRank = Infinity;
|
|
187
|
+
if (HAS_MORE_PRIMARY_POSITIVE_EXACT.includes(normalizedForExactMatch)) {
|
|
188
|
+
currentPropRank = 1;
|
|
189
|
+
} else if (HAS_MORE_SECONDARY_POSITIVE_EXACT.includes(normalizedForExactMatch)) {
|
|
190
|
+
currentPropRank = 2;
|
|
191
|
+
} else {
|
|
192
|
+
let foundPositiveRegex = false;
|
|
193
|
+
for (const regex of COMPILED_HAS_MORE_POSITIVE_REGEXES) {
|
|
194
|
+
if (regex.test(propName)) {
|
|
195
|
+
currentPropRank = 3;
|
|
196
|
+
foundPositiveRegex = true;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
if (!foundPositiveRegex) {
|
|
201
|
+
if (HAS_MORE_PRIMARY_INVERTED_EXACT.includes(normalizedForExactMatch)) {
|
|
202
|
+
currentPropRank = 4;
|
|
203
|
+
} else {
|
|
204
|
+
for (const regex of COMPILED_HAS_MORE_INVERTED_REGEXES) {
|
|
205
|
+
if (regex.test(propName)) {
|
|
206
|
+
currentPropRank = 5;
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
updateCandidate(propName, currentPropRank);
|
|
214
|
+
}
|
|
215
|
+
return bestCandidate;
|
|
216
|
+
}
|
|
217
|
+
function getHasMoreName(properties) {
|
|
218
|
+
const rootGuess = guess(properties);
|
|
219
|
+
if (rootGuess) {
|
|
220
|
+
return rootGuess;
|
|
221
|
+
}
|
|
222
|
+
for (const propName in properties) {
|
|
223
|
+
const propSchema = properties[propName];
|
|
224
|
+
if (propSchema.type === "object" && propSchema.properties) {
|
|
225
|
+
const nested = getHasMoreName(propSchema.properties);
|
|
226
|
+
if (nested) {
|
|
227
|
+
return propName + "." + nested;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
export {
|
|
234
|
+
getHasMoreName,
|
|
235
|
+
getItemsName
|
|
236
|
+
};
|
|
237
|
+
//# sourceMappingURL=pagination-result.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/lib/pagination/pagination-result.ts"],
|
|
4
|
+
"sourcesContent": ["import type { SchemaObject, SchemasObject } from 'openapi3-ts/oas31';\nimport pluralize from 'pluralize';\n\nconst PRIMARY_TOP_TIER_KEYWORDS: string[] = [\n 'data',\n 'items',\n 'results',\n 'value',\n];\nconst PRIMARY_OTHER_KEYWORDS: string[] = [\n 'records',\n 'content',\n 'list',\n 'payload',\n 'entities',\n 'collection',\n 'users',\n 'products',\n 'orders',\n 'bookings',\n 'articles',\n 'posts',\n 'documents',\n 'events',\n];\nconst SECONDARY_KEYWORDS: string[] = ['entries', 'rows', 'elements'];\n\nconst PLURAL_DEPRIORITIZE_LIST: string[] = [\n 'status',\n 'success',\n 'address',\n 'details',\n 'properties',\n 'params',\n 'headers',\n 'cookies',\n 'series',\n 'links',\n 'meta',\n 'metadata',\n 'statistics',\n 'settings',\n 'options',\n 'permissions',\n 'credentials',\n 'diagnostics',\n 'warnings',\n 'errors',\n 'actions',\n 'attributes',\n 'categories',\n 'features',\n 'includes',\n 'tags',\n];\n\n// For exact matches (normalized: lowercase, no underscores/hyphens)\nconst HAS_MORE_PRIMARY_POSITIVE_EXACT: string[] = [\n 'hasmore',\n 'hasnext',\n 'hasnextpage',\n 'moreitems',\n 'moreitemsavailable',\n 'nextpage',\n 'nextpageexists',\n 'nextpageavailable',\n 'hasadditionalresults',\n 'moreresultsavailable',\n 'canloadmore',\n 'hasadditional',\n 'additionalitems',\n 'fetchmore',\n];\n\nconst HAS_MORE_SECONDARY_POSITIVE_EXACT: string[] = ['more', 'next'];\n\nconst HAS_MORE_PRIMARY_INVERTED_EXACT: string[] = [\n 'islast',\n 'lastpage',\n 'endofresults',\n 'endoflist',\n 'nomoreitems',\n 'nomoredata',\n 'allitemsloaded',\n 'iscomplete',\n 'completed',\n];\n\n// For regex-based sub-phrase matching (tested against original propName, case-insensitive)\n// These regexes look for meaningful phrases, often using word boundaries (\\b)\n// and allowing for optional underscores.\nconst HAS_MORE_POSITIVE_REGEX_PATTERNS: string[] = [\n '\\\\bhas_?more\\\\b',\n '\\\\bhas_?next\\\\b', // e.g., itemsHasNext, items_has_next\n '\\\\bmore_?items\\\\b',\n '\\\\bnext_?page\\\\b', // e.g., userNextPageFlag\n '\\\\badditional\\\\b', // e.g., hasAdditionalData, additional_results_exist\n '\\\\bcontinuation\\\\b', // e.g., continuationAvailable, has_continuation_token\n '\\\\bmore_?results\\\\b',\n '\\\\bpage_?available\\\\b',\n '\\\\bnext(?:_?(page))?\\\\b',\n];\nconst COMPILED_HAS_MORE_POSITIVE_REGEXES: RegExp[] =\n HAS_MORE_POSITIVE_REGEX_PATTERNS.map((p) => new RegExp(p, 'i'));\n\nconst HAS_MORE_INVERTED_REGEX_PATTERNS: string[] = [\n '\\\\bis_?last\\\\b', // e.g., pageIsLast\n '\\\\blast_?page\\\\b', // e.g., resultsAreLastPage\n '\\\\bend_?of_?(data|results|list|items|stream)\\\\b',\n '\\\\bno_?more_?(items|data|results)?\\\\b',\n '\\\\ball_?(items_?)?loaded\\\\b',\n '\\\\bis_?complete\\\\b',\n];\nconst COMPILED_HAS_MORE_INVERTED_REGEXES: RegExp[] =\n HAS_MORE_INVERTED_REGEX_PATTERNS.map((p) => new RegExp(p, 'i'));\n\n/**\n * Tries to guess the name of the property that holds the main list of items\n * within an object schema using a series of heuristics.\n *\n * @param schema The OpenAPI SchemaObject, expected to be of type 'object'.\n * @returns The name of the most likely property containing the items array,\n * or null if no array properties are found in the schema.\n */\nexport function getItemsName(\n properties: Record<string, SchemaObject>,\n): string | null {\n const arrayPropertyNames: string[] = [];\n for (const propName in properties) {\n if (propName in properties) {\n const propSchema = properties[propName] as SchemaObject;\n if (propSchema && propSchema.type === 'array') {\n arrayPropertyNames.push(propName);\n }\n }\n }\n\n // Heuristic 0: No array properties at all.\n if (arrayPropertyNames.length === 0) {\n return null;\n }\n\n // Heuristic 1: Exactly one array property. This is the strongest signal.\n if (arrayPropertyNames.length === 1) {\n return arrayPropertyNames[0];\n }\n\n // Multiple array properties exist. Apply ranked heuristics:\n let bestCandidate: string | null = null;\n let candidateRank = Infinity; // Lower is better\n\n const updateCandidate = (propName: string, rank: number) => {\n if (rank < candidateRank) {\n bestCandidate = propName;\n candidateRank = rank;\n }\n };\n\n for (const propName of arrayPropertyNames) {\n const lowerPropName = propName.toLowerCase();\n\n // Heuristic 2: Top-tier primary keywords (e.g., \"data\", \"items\")\n if (PRIMARY_TOP_TIER_KEYWORDS.includes(lowerPropName)) {\n updateCandidate(propName, 2);\n continue; // Move to next property, this is a strong match for this prop\n }\n\n // Heuristic 3: Other primary keywords\n if (candidateRank > 3 && PRIMARY_OTHER_KEYWORDS.includes(lowerPropName)) {\n updateCandidate(propName, 3);\n continue;\n }\n\n // Heuristic 4: Secondary keywords\n if (candidateRank > 4 && SECONDARY_KEYWORDS.includes(lowerPropName)) {\n updateCandidate(propName, 4);\n continue;\n }\n\n // Heuristic 5: Pluralized name, not on the deprioritize list\n if (\n candidateRank > 5 &&\n pluralize.isPlural(propName) &&\n !PLURAL_DEPRIORITIZE_LIST.includes(lowerPropName)\n ) {\n updateCandidate(propName, 5);\n continue;\n }\n\n // Heuristic 6: Pluralized name, IS on the deprioritize list (less preferred plural)\n if (\n candidateRank > 6 &&\n pluralize.isPlural(propName) &&\n PLURAL_DEPRIORITIZE_LIST.includes(lowerPropName)\n ) {\n updateCandidate(propName, 6);\n continue;\n }\n }\n\n // If any of the above heuristics found a candidate, return it.\n if (bestCandidate) {\n return bestCandidate;\n }\n\n // Heuristic 7: Fallback - If no keywords or clear plurals,\n // and multiple arrays exist, return the first array property encountered.\n // This ensures we always return a name if arrays are present.\n return arrayPropertyNames[0];\n}\n\nfunction guess(properties: Record<string, SchemaObject>) {\n const booleanPropertyNames: string[] = [];\n for (const propName in properties) {\n if (Object.prototype.hasOwnProperty.call(properties, propName)) {\n const propSchema = properties[propName] as SchemaObject;\n if (\n (propSchema && propSchema.type === 'boolean') ||\n propSchema.type === 'integer'\n ) {\n booleanPropertyNames.push(propName);\n }\n }\n }\n\n if (booleanPropertyNames.length === 0) {\n return null;\n }\n\n if (booleanPropertyNames.length === 1) {\n return booleanPropertyNames[0];\n }\n\n let bestCandidate: string | null = null;\n let candidateRank = Infinity;\n\n const updateCandidate = (propName: string, rank: number) => {\n if (rank < candidateRank) {\n bestCandidate = propName;\n candidateRank = rank;\n }\n };\n\n for (const propName of booleanPropertyNames) {\n const normalizedForExactMatch = propName.toLowerCase().replace(/[-_]/g, '');\n let currentPropRank = Infinity;\n\n // Rank 1: Primary Exact Positive Match\n if (HAS_MORE_PRIMARY_POSITIVE_EXACT.includes(normalizedForExactMatch)) {\n currentPropRank = 1;\n }\n // Rank 2: Secondary Exact Positive Match\n else if (\n HAS_MORE_SECONDARY_POSITIVE_EXACT.includes(normalizedForExactMatch)\n ) {\n currentPropRank = 2;\n }\n // Rank 3: Positive Regex Match (sub-phrase)\n else {\n let foundPositiveRegex = false;\n for (const regex of COMPILED_HAS_MORE_POSITIVE_REGEXES) {\n if (regex.test(propName)) {\n // Test against original propName\n currentPropRank = 3;\n foundPositiveRegex = true;\n break;\n }\n }\n\n // Only proceed to inverted matches if no positive match of any kind (Rank 1, 2, or 3) was found\n if (!foundPositiveRegex) {\n // Rank 4: Primary Exact Inverted Match\n if (HAS_MORE_PRIMARY_INVERTED_EXACT.includes(normalizedForExactMatch)) {\n currentPropRank = 4;\n }\n // Rank 5: Inverted Regex Match (sub-phrase)\n else {\n for (const regex of COMPILED_HAS_MORE_INVERTED_REGEXES) {\n if (regex.test(propName)) {\n // Test against original propName\n currentPropRank = 5;\n break;\n }\n }\n }\n }\n }\n\n updateCandidate(propName, currentPropRank);\n }\n return bestCandidate;\n}\n\n/**\n * Tries to guess the name of a boolean property that indicates if there are more items\n * to fetch (e.g., for pagination).\n *\n * @param schema The OpenAPI SchemaObject, expected to be of type 'object'.\n * @returns The name of the most likely boolean property indicating \"has more\",\n * or null if no suitable boolean property is found.\n */\nexport function getHasMoreName(properties: SchemasObject): string | null {\n const rootGuess = guess(properties);\n if (rootGuess) {\n return rootGuess;\n }\n for (const propName in properties) {\n const propSchema = properties[propName];\n if (propSchema.type === 'object' && propSchema.properties) {\n const nested = getHasMoreName(propSchema.properties as SchemasObject);\n if (nested) {\n return propName + '.' + nested;\n }\n }\n }\n return null;\n}\n"],
|
|
5
|
+
"mappings": "AACA,OAAO,eAAe;AAEtB,MAAM,4BAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,yBAAmC;AAAA,EACvC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AACA,MAAM,qBAA+B,CAAC,WAAW,QAAQ,UAAU;AAEnE,MAAM,2BAAqC;AAAA,EACzC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGA,MAAM,kCAA4C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEA,MAAM,oCAA8C,CAAC,QAAQ,MAAM;AAEnE,MAAM,kCAA4C;AAAA,EAChD;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAKA,MAAM,mCAA6C;AAAA,EACjD;AAAA,EACA;AAAA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,E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AEvB,YAAI,gCAAgC,SAAS,uBAAuB,GAAG;AACrE,4BAAkB;AAAA,QACpB,OAEK;AACH,qBAAW,SAAS,oCAAoC;AACtD,gBAAI,MAAM,KAAK,QAAQ,GAAG;AAExB,gCAAkB;AAClB;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,oBAAgB,UAAU,eAAe;AAAA,EAC3C;AACA,SAAO;AACT;AAUO,SAAS,eAAe,YAA0C;AACvE,QAAM,YAAY,MAAM,UAAU;AAClC,MAAI,WAAW;AACb,WAAO;AAAA,EACT;AACA,aAAW,YAAY,YAAY;AACjC,UAAM,aAAa,WAAW,QAAQ;AACtC,QAAI,WAAW,SAAS,YAAY,WAAW,YAAY;AACzD,YAAM,SAAS,eAAe,WAAW,UAA2B;AACpE,UAAI,QAAQ;AACV,eAAO,WAAW,MAAM;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination-result.test.d.ts","sourceRoot":"","sources":["../../../src/lib/pagination/pagination-result.test.ts"],"names":[],"mappings":""}
|