@roxyapi/ui 0.52.0 → 0.53.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.
- package/components-catalog.json +153 -153
- package/dist/cdn/components/endpoint-form.js +4 -4
- package/dist/cdn/components/endpoint-form.js.map +3 -3
- package/dist/cdn/roxy-ui.js +63 -63
- package/dist/cdn/roxy-ui.js.map +3 -3
- package/dist/cdn/widgets.js +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +3 -3
- package/dist/forms.json +1 -1
- package/dist/index.cjs +75 -75
- package/dist/index.cjs.map +3 -3
- package/dist/index.js +78 -78
- package/dist/index.js.map +3 -3
- package/dist/schemas/post--angel-numbers-daily.json +1 -1
- package/dist/schemas/post--biorhythm-daily.json +1 -1
- package/dist/schemas/post--crystals-daily.json +1 -1
- package/dist/schemas/post--dreams-daily.json +1 -1
- package/dist/schemas/post--feng-shui-eight-mansions.json +1 -1
- package/dist/schemas/post--feng-shui-flying-stars-natal.json +1 -1
- package/dist/schemas/post--iching-daily-cast.json +1 -1
- package/dist/schemas/post--iching-daily.json +1 -1
- package/dist/schemas/post--kabbalah-compatibility.json +1 -1
- package/dist/schemas/post--kabbalah-gematria.json +1 -1
- package/dist/schemas/post--kabbalah-name-profile.json +1 -1
- package/dist/schemas/post--mesoamerican-astrology-mayan-long-count-convert.json +1 -1
- package/dist/schemas/post--numerology-compatibility.json +1 -1
- package/dist/schemas/post--numerology-daily.json +1 -1
- package/dist/schemas/post--numerology-maturity.json +1 -1
- package/dist/schemas/post--tarot-daily.json +1 -1
- package/dist/schemas/post--vastu-entrance.json +1 -1
- package/dist/schemas/post--vastu-mandala.json +1 -1
- package/dist/schemas/post--vastu-plot.json +1 -1
- package/dist/schemas/post--vastu-rooms.json +1 -1
- package/dist/styles/themes/practitioner.css +5 -5
- package/dist/types/types.gen.d.ts +9 -9
- package/dist/utils/field-schema.d.ts +4 -0
- package/dist/utils/field-schema.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/styles/themes/practitioner.css +5 -5
- package/src/types/types.gen.ts +9 -9
- package/src/utils/field-schema.ts +17 -3
- package/src/version.ts +1 -1
package/src/types/types.gen.ts
CHANGED
|
@@ -56216,7 +56216,7 @@ export type GetNumberMeaningResponse = GetNumberMeaningResponses[keyof GetNumber
|
|
|
56216
56216
|
export type GetDailyNumberData = {
|
|
56217
56217
|
body?: {
|
|
56218
56218
|
/**
|
|
56219
|
-
* Optional seed for reproducible readings. Same seed + same date = same number every time. Pass any unique identifier (userId, email hash, session token)
|
|
56219
|
+
* Optional seed for reproducible readings. Same seed + same date = same number every time. Pass any unique identifier (userId, email hash, session token) to give each user their own number for the day. Without a seed every caller receives the same shared number of the day.
|
|
56220
56220
|
*/
|
|
56221
56221
|
seed?: string;
|
|
56222
56222
|
/**
|
|
@@ -61301,7 +61301,7 @@ export type DrawCardsResponse = DrawCardsResponses[keyof DrawCardsResponses];
|
|
|
61301
61301
|
export type GetDailyCardData = {
|
|
61302
61302
|
body?: {
|
|
61303
61303
|
/**
|
|
61304
|
-
* Optional seed for reproducible readings. Same seed + same date = same card every time. Pass any unique identifier (userId, email hash, session token)
|
|
61304
|
+
* Optional seed for reproducible readings. Same seed + same date = same card every time. Pass any unique identifier (userId, email hash, session token) to give each user their own card for the day. Without a seed every caller receives the same shared card of the day.
|
|
61305
61305
|
*/
|
|
61306
61306
|
seed?: string;
|
|
61307
61307
|
/**
|
|
@@ -63787,7 +63787,7 @@ export type GetPhasesResponse = GetPhasesResponses[keyof GetPhasesResponses];
|
|
|
63787
63787
|
export type GetDailyBiorhythmData = {
|
|
63788
63788
|
body?: {
|
|
63789
63789
|
/**
|
|
63790
|
-
* Optional seed for reproducible readings. Same seed + same date = same reading every time. Pass any unique identifier (userId, email hash, session token)
|
|
63790
|
+
* Optional seed for reproducible readings. Same seed + same date = same reading every time. Pass any unique identifier (userId, email hash, session token) to give each user their own reading for the day. Without a seed every caller receives the same shared reading of the day.
|
|
63791
63791
|
*/
|
|
63792
63792
|
seed?: string;
|
|
63793
63793
|
/**
|
|
@@ -66998,7 +66998,7 @@ export type ListGunasResponse = ListGunasResponses[keyof ListGunasResponses];
|
|
|
66998
66998
|
export type GetDailyHexagramData = {
|
|
66999
66999
|
body?: {
|
|
67000
67000
|
/**
|
|
67001
|
-
* Optional seed for reproducible readings. Same seed + same date = same hexagram every time. Pass any unique identifier (userId, email hash, session token)
|
|
67001
|
+
* Optional seed for reproducible readings. Same seed + same date = same hexagram every time. Pass any unique identifier (userId, email hash, session token) to give each user their own hexagram for the day. Without a seed every caller receives the same shared hexagram of the day.
|
|
67002
67002
|
*/
|
|
67003
67003
|
seed?: string;
|
|
67004
67004
|
/**
|
|
@@ -67228,7 +67228,7 @@ export type GetDailyHexagramResponse = GetDailyHexagramResponses[keyof GetDailyH
|
|
|
67228
67228
|
export type CastDailyReadingData = {
|
|
67229
67229
|
body?: {
|
|
67230
67230
|
/**
|
|
67231
|
-
* Optional seed for reproducible readings. Same seed + same date = same hexagram every time. Pass any unique identifier (userId, email hash, session token)
|
|
67231
|
+
* Optional seed for reproducible readings. Same seed + same date = same hexagram every time. Pass any unique identifier (userId, email hash, session token) to give each user their own hexagram for the day. Without a seed every caller receives the same shared hexagram of the day.
|
|
67232
67232
|
*/
|
|
67233
67233
|
seed?: string;
|
|
67234
67234
|
/**
|
|
@@ -69866,7 +69866,7 @@ export type GetCrystalPairingsResponse = GetCrystalPairingsResponses[keyof GetCr
|
|
|
69866
69866
|
export type GetDailyCrystalData = {
|
|
69867
69867
|
body?: {
|
|
69868
69868
|
/**
|
|
69869
|
-
* Optional seed for reproducible readings. Same seed + same date = same crystal every time. Pass any unique identifier (userId, email hash, session token)
|
|
69869
|
+
* Optional seed for reproducible readings. Same seed + same date = same crystal every time. Pass any unique identifier (userId, email hash, session token) to give each user their own crystal for the day. Without a seed every caller receives the same shared crystal of the day.
|
|
69870
69870
|
*/
|
|
69871
69871
|
seed?: string;
|
|
69872
69872
|
/**
|
|
@@ -71629,7 +71629,7 @@ export type GetDreamSymbolResponse = GetDreamSymbolResponses[keyof GetDreamSymbo
|
|
|
71629
71629
|
export type GetDailyDreamSymbolData = {
|
|
71630
71630
|
body?: {
|
|
71631
71631
|
/**
|
|
71632
|
-
* Optional seed for reproducible readings. Same seed + same date = same symbol every time. Pass any unique identifier (userId, email hash, session token)
|
|
71632
|
+
* Optional seed for reproducible readings. Same seed + same date = same symbol every time. Pass any unique identifier (userId, email hash, session token) to give each user their own symbol for the day. Without a seed every caller receives the same shared symbol of the day.
|
|
71633
71633
|
*/
|
|
71634
71634
|
seed?: string;
|
|
71635
71635
|
/**
|
|
@@ -72544,7 +72544,7 @@ export type AnalyzeNumberSequenceResponse = AnalyzeNumberSequenceResponses[keyof
|
|
|
72544
72544
|
export type GetDailyAngelNumberData = {
|
|
72545
72545
|
body?: {
|
|
72546
72546
|
/**
|
|
72547
|
-
* Optional seed for reproducible readings. Same seed + same date = same angel number every time. Pass any unique identifier (userId, email hash, session token)
|
|
72547
|
+
* Optional seed for reproducible readings. Same seed + same date = same angel number every time. Pass any unique identifier (userId, email hash, session token) to give each user their own angel number for the day. Without a seed every caller receives the same shared angel number of the day.
|
|
72548
72548
|
*/
|
|
72549
72549
|
seed?: string;
|
|
72550
72550
|
/**
|
|
@@ -73518,7 +73518,7 @@ export type GetUsageStatsResponses = {
|
|
|
73518
73518
|
*/
|
|
73519
73519
|
plan: string;
|
|
73520
73520
|
/**
|
|
73521
|
-
* Billable requests counted against the current calendar month. The quota window is the UTC calendar month and resets on the 1st at 12:00 AM UTC, never on your renewal date, so an annual plan refills every month and a plan bought mid month still refills on the 1st. Read from the durable request ledger, which can trail the live limiter by up to 5 minutes; for the exact live position read the X-RateLimit-Used header on any response, including this one. Cached responses still count.
|
|
73521
|
+
* Billable requests counted against the current calendar month. The quota window is the UTC calendar month and resets on the 1st at 12:00 AM UTC, never on your renewal date, so an annual plan refills every month and a plan bought mid month still refills on the 1st. Read from the durable request ledger, which can trail the live limiter by up to 5 minutes; for the exact live position read the X-RateLimit-Used header on any response, including this one. Cached responses still count; a request that failed on our side with a 5xx never does.
|
|
73522
73522
|
*/
|
|
73523
73523
|
usedThisMonth: number;
|
|
73524
73524
|
/**
|
|
@@ -37,6 +37,8 @@ export interface OpenApiSchema extends OpenApiSchemaRef {
|
|
|
37
37
|
example?: unknown;
|
|
38
38
|
anyOf?: OpenApiSchema[];
|
|
39
39
|
oneOf?: OpenApiSchema[];
|
|
40
|
+
/** Input sets of an object whose fields are all optional yet need one complete set; the first is the one a form asks for. */
|
|
41
|
+
'x-required-any-of'?: string[][];
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
/** One operation's request shape, as read from `spec.paths[path][method]`. */
|
|
@@ -182,6 +184,8 @@ export interface FormModel {
|
|
|
182
184
|
opensOnLoad?: boolean;
|
|
183
185
|
/** The array-of-object properties, each already expanded into `min` groups inside `fields`. Absent when the request has none. */
|
|
184
186
|
repeats?: RepeatDef[];
|
|
187
|
+
/** Wire-key sets of an either-or request body: any ONE complete set is a valid request. The first set's fields are marked `required`, as are a nested object's first set. Absent when the body has none. */
|
|
188
|
+
requiredAnyOf?: string[][];
|
|
185
189
|
}
|
|
186
190
|
|
|
187
191
|
/** The group key of the `index`th record of a repeating property, and its inverse. */
|
|
@@ -398,6 +402,14 @@ function toField(
|
|
|
398
402
|
};
|
|
399
403
|
}
|
|
400
404
|
|
|
405
|
+
/** The fields a form asks for in one object: its required ones plus the first of its input sets. */
|
|
406
|
+
function requiredKeys(schema: OpenApiSchema): Set<string> {
|
|
407
|
+
return new Set([
|
|
408
|
+
...(schema.required ?? []),
|
|
409
|
+
...(schema['x-required-any-of']?.[0] ?? []),
|
|
410
|
+
]);
|
|
411
|
+
}
|
|
412
|
+
|
|
401
413
|
/**
|
|
402
414
|
* Digest one operation into the {@link FormModel} the form renders. This is the single construction path: body properties (nested objects expand to `group.sub` keys) and path+query parameters flow through {@link toField} identically, so a query integer keeps its min/max the same as a body integer. The `lang` query parameter is dropped from `fields` and surfaced as {@link FormModel.hasLang} instead.
|
|
403
415
|
*/
|
|
@@ -413,8 +425,9 @@ export function buildFormModel(
|
|
|
413
425
|
|
|
414
426
|
const bodyRef = op.requestBody?.content?.['application/json']?.schema;
|
|
415
427
|
const bodySchema = resolveSchema(bodyRef, schemas);
|
|
428
|
+
const anyOf = bodySchema?.['x-required-any-of'];
|
|
416
429
|
if (bodySchema?.properties) {
|
|
417
|
-
const required =
|
|
430
|
+
const required = requiredKeys(bodySchema);
|
|
418
431
|
for (const [name, sub] of Object.entries(bodySchema.properties)) {
|
|
419
432
|
const resolved = resolveSchema(sub, schemas) ?? {};
|
|
420
433
|
const item =
|
|
@@ -423,7 +436,7 @@ export function buildFormModel(
|
|
|
423
436
|
: undefined;
|
|
424
437
|
if (item?.type === 'object' && item.properties) {
|
|
425
438
|
const min = Math.max(1, resolved.minItems ?? 1);
|
|
426
|
-
const itemRequired =
|
|
439
|
+
const itemRequired = requiredKeys(item);
|
|
427
440
|
repeats.push({ key: name, min, max: resolved.maxItems ?? min });
|
|
428
441
|
for (let i = 0; i < min; i++) {
|
|
429
442
|
for (const [subName, subSchema] of Object.entries(item.properties)) {
|
|
@@ -438,7 +451,7 @@ export function buildFormModel(
|
|
|
438
451
|
}
|
|
439
452
|
}
|
|
440
453
|
} else if (resolved.type === 'object' && resolved.properties) {
|
|
441
|
-
const subRequired =
|
|
454
|
+
const subRequired = requiredKeys(resolved);
|
|
442
455
|
for (const [subName, subSchema] of Object.entries(
|
|
443
456
|
resolved.properties,
|
|
444
457
|
)) {
|
|
@@ -515,6 +528,7 @@ export function buildFormModel(
|
|
|
515
528
|
fields,
|
|
516
529
|
hasLang,
|
|
517
530
|
...(repeats.length > 0 ? { repeats } : {}),
|
|
531
|
+
...(anyOf ? { requiredAnyOf: anyOf } : {}),
|
|
518
532
|
},
|
|
519
533
|
method,
|
|
520
534
|
endpoint,
|
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by scripts/sync-version.ts. Do not edit.
|
|
2
|
-
export const ROXY_UI_VERSION = '0.
|
|
2
|
+
export const ROXY_UI_VERSION = '0.53.1';
|