@scalar/cli 2.7.1 → 2.10.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/README.md +475 -80
- package/chunks/action-4GZI2M5B.js +62 -0
- package/chunks/action-4W5GUGEG.js +63 -0
- package/chunks/{action-HJYZCPUN.js → action-5LF4XYHX.js} +10 -7
- package/chunks/{action-SRBN7N3R.js → action-5N3P43MD.js} +17 -12
- package/chunks/{action-RBOLLIGX.js → action-5RL4NWUZ.js} +17 -17
- package/chunks/{action-SNPOOW6S.js → action-657A4K2D.js} +16 -16
- package/chunks/{action-EOAVVL52.js → action-7XOHYWYM.js} +11 -14
- package/chunks/{action-AQRPFQKI.js → action-CABLS46Q.js} +9 -7
- package/chunks/{action-F7A2K74G.js → action-CB55NWAU.js} +9 -13
- package/chunks/{action-5SK5NE7E.js → action-DKDRAIKV.js} +11 -14
- package/chunks/{action-7PEQXDWT.js → action-DTEO4YNX.js} +127 -20
- package/chunks/{action-BAQYJ6UE.js → action-EAUTQ77U.js} +27 -23
- package/chunks/{action-QYGOPSTY.js → action-FBRY5JKU.js} +16 -16
- package/chunks/{action-VOFDW3U2.js → action-GFLRD7LO.js} +6 -5
- package/chunks/{action-LPVITMWA.js → action-GWYYTUTM.js} +4 -3
- package/chunks/{action-4NGK5XMD.js → action-HT42NUUX.js} +29 -24
- package/chunks/action-JEYDBB3P.js +147 -0
- package/chunks/{action-E4YSRFGT.js → action-KDUFU7TZ.js} +11 -13
- package/chunks/{action-BRSSC2SR.js → action-LYCNT3KA.js} +29 -10
- package/chunks/{action-CA4QYPI6.js → action-OJ2NK25F.js} +4 -8
- package/chunks/{action-NVI5DWFP.js → action-PAM2EZ22.js} +4 -8
- package/chunks/action-PPTFYZWD.js +1552 -0
- package/chunks/{action-OX2566BE.js → action-R4PGILN4.js} +30 -26
- package/chunks/{action-CPLH2CQ5.js → action-TOBU74JH.js} +23 -19
- package/chunks/action-U2L5DCFG.js +91 -0
- package/chunks/{action-H6OUJWWM.js → action-UUL6SWV4.js} +11 -14
- package/chunks/{action-T5XMJXPO.js → action-X7BA7PQQ.js} +10 -8
- package/chunks/{action-LVDU6YOI.js → action-XLE37MZL.js} +16 -16
- package/chunks/{action-BOZNBCNZ.js → action-XOADBXSX.js} +16 -12
- package/chunks/{action-SCOXTCPR.js → action-YSVTZVKV.js} +38 -19
- package/chunks/{action-YRX6SN5F.js → action-ZFI77WA5.js} +8 -6
- package/chunks/{action-ATGZOWSH.js → action-ZKA3RR3S.js} +15 -11
- package/chunks/actions-3SAMH7A5.js +182 -0
- package/chunks/{agent-ASPV3R5U.js → agent-2ESZI7NO.js} +7 -5
- package/chunks/{asyncapi-H4FU6GPC.js → asyncapi-4HGVM3PR.js} +14 -10
- package/chunks/{build.action-6V6GXI3X.js → build.action-VBGFGACM.js} +21 -19
- package/chunks/chunk-35Z7VTJT.js +453 -0
- package/chunks/chunk-36LXIJIZ.js +52 -0
- package/chunks/{chunk-BIKOD3SG.js → chunk-43WALAW3.js} +251 -103
- package/chunks/{chunk-C2KAWRIX.js → chunk-5ENKYZA4.js} +1 -1
- package/chunks/{chunk-ZJVYOZFB.js → chunk-5SMP756H.js} +2 -2
- package/chunks/{chunk-5JLVQVKO.js → chunk-6M7TL2G2.js} +146 -148
- package/chunks/chunk-6PSYZO3U.js +24 -0
- package/chunks/{chunk-ISXH6Q7I.js → chunk-ATNTXKMS.js} +45 -274
- package/chunks/{chunk-BDEPNGTO.js → chunk-BIMLCGKS.js} +1 -1
- package/chunks/{chunk-HGOD6THU.js → chunk-CWVYOXXM.js} +2 -19
- package/chunks/chunk-DFOZG7ZV.js +15 -0
- package/chunks/chunk-DHZW7Q7U.js +133 -0
- package/chunks/{chunk-R5LK6VPY.js → chunk-G4HRW2FZ.js} +13 -20
- package/chunks/{chunk-KCCFN4F7.js → chunk-GLWTVLKM.js} +29 -29
- package/chunks/{chunk-5UHLAJQD.js → chunk-GYRQPDTK.js} +24 -10
- package/chunks/chunk-H467HDVV.js +24 -0
- package/chunks/chunk-IPZP3VRA.js +327 -0
- package/chunks/{chunk-LG7IFACX.js → chunk-JXGF5EHC.js} +152 -18
- package/chunks/chunk-K2HIB5BA.js +92 -0
- package/chunks/{chunk-FDC2IESH.js → chunk-KHF2QXBG.js} +1352 -8327
- package/chunks/{chunk-IMG35UXX.js → chunk-KZNRQVMY.js} +1 -1
- package/chunks/{chunk-OJ2EWIJH.js → chunk-MC4EMNOR.js} +5 -1
- package/chunks/{chunk-YILQODZF.js → chunk-MMWSCTDB.js} +7 -4
- package/chunks/{chunk-6XWCMJDB.js → chunk-MNNGUUKJ.js} +12 -11
- package/chunks/chunk-NAC63XJF.js +10 -0
- package/chunks/{chunk-XXSQUBXS.js → chunk-UDBSV3CK.js} +107 -453
- package/chunks/{chunk-IKT5F47M.js → chunk-VVRUSQCY.js} +11 -11
- package/chunks/{chunk-2PPRO2QB.js → chunk-VYFGRLVQ.js} +1 -1
- package/chunks/{chunk-GPNB7ISG.js → chunk-WB6PWTMU.js} +5 -13
- package/chunks/{chunk-4X47MN6Q.js → chunk-WDIWLXLV.js} +3 -15
- package/chunks/{chunk-6YPQGVF4.js → chunk-WIEXQUTD.js} +1 -1
- package/chunks/{chunk-W24BETFG.js → chunk-XAGJJNQW.js} +3 -3
- package/chunks/{chunk-2DSVF5AD.js → chunk-ZGNDXPLU.js} +3 -3
- package/chunks/{chunk-XEDGMZJD.js → chunk-ZGVZU6L2.js} +81 -25
- package/chunks/{chunk-QXQZVEDC.js → chunk-ZKJPLWRJ.js} +2 -2
- package/chunks/{chunk-MLSZVVTT.js → chunk-ZYBLQ5CT.js} +13 -7
- package/chunks/{create.action-P6DLCK4W.js → create.action-DBNIS665.js} +21 -19
- package/chunks/{delete.action-HJKRRHE2.js → delete.action-GBOZC45K.js} +21 -19
- package/chunks/{delete.action-Z3GAA4ZN.js → delete.action-K7BLK7DK.js} +21 -19
- package/chunks/{get.action-IT4EHAV4.js → get.action-N3JOY3OU.js} +17 -12
- package/chunks/get.action-QHKMYZBK.js +91 -0
- package/chunks/{list.action-WLIAO5UW.js → list.action-6SSO3JVN.js} +45 -15
- package/chunks/{list.action-2FU5UZNH.js → list.action-TJCS6UEY.js} +41 -21
- package/chunks/{publish.action-T4J4DRXR.js → publish.action-T24VHRMR.js} +29 -24
- package/chunks/query-WKATAJJ6.js +129 -0
- package/chunks/scripts-VIBLGKYG.js +102 -0
- package/chunks/{update.action-3OVS3HWC.js → update.action-OGYNBXRU.js} +24 -19
- package/chunks/{update.action-MY7QPSSU.js → update.action-VOE6PH5F.js} +24 -19
- package/docs.html +1363 -320
- package/index.js +417 -174
- package/package.json +14 -13
- package/skills/scalar-cli/SKILL.md +13 -1
- package/template.md +157 -15
- package/chunks/action-JAHFRYWZ.js +0 -423
- package/chunks/action-N7BA5I3E.js +0 -229
- package/chunks/chunk-CWCETP6H.js +0 -610
- package/chunks/chunk-K74E42RV.js +0 -7311
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
RegistryResourceTypes,
|
|
4
4
|
baseRegistrySchema,
|
|
5
5
|
contentShaSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MNNGUUKJ.js";
|
|
7
7
|
import {
|
|
8
8
|
brandedUid,
|
|
9
9
|
docVersionSchema,
|
|
@@ -19,23 +19,171 @@ import {
|
|
|
19
19
|
slugSchema,
|
|
20
20
|
timestampSchema,
|
|
21
21
|
unixTimestamp
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VVRUSQCY.js";
|
|
23
23
|
|
|
24
24
|
// ../../packages/entities/dist/access-group/schema.js
|
|
25
25
|
var emailDomainRegex = /^([A-Za-z0-9]+(-[A-Za-z0-9]+)*\.)+[A-Za-z]{2,}$/i;
|
|
26
|
-
var emailDomainSchema = external_exports.string().regex(emailDomainRegex, "Invalid domain").max(253).meta({ id: "email-domain" });
|
|
26
|
+
var emailDomainSchema = external_exports.string().regex(emailDomainRegex, "Invalid domain").max(253).meta({ id: "email-domain", examples: ["example.com"] });
|
|
27
27
|
var accessGroupEmails = scalarSet(external_exports.set(emailSchema).max(1e3, "You can only add up to 1000 emails"));
|
|
28
28
|
var accessGroupDomains = scalarSet(external_exports.set(emailDomainSchema).max(1e3, "You can only add up to 1000 domains"));
|
|
29
|
-
var accessGroupNameSchema = external_exports.string().max(40).meta({ id: "access-group-name" });
|
|
29
|
+
var accessGroupNameSchema = external_exports.string().max(40).meta({ id: "access-group-name", examples: ["Engineering"] });
|
|
30
30
|
var accessGroupSchema = entitySchema.extend({
|
|
31
|
-
name: accessGroupNameSchema.default(""),
|
|
32
|
-
slug: slugSchema.default(randomAccessGroupSlug).meta({ default: "
|
|
31
|
+
name: accessGroupNameSchema.default("").meta({ examples: ["Engineering"] }),
|
|
32
|
+
slug: slugSchema.default(randomAccessGroupSlug).meta({ default: void 0, examples: ["engineering"] }),
|
|
33
33
|
/** Set of allowed external email addresses */
|
|
34
|
-
allowedEmails: accessGroupEmails.default([]),
|
|
34
|
+
allowedEmails: accessGroupEmails.default([]).meta({ examples: [["alex@example.com"]] }),
|
|
35
35
|
/** List of allowed email domains */
|
|
36
|
-
allowedDomains: accessGroupDomains.default([])
|
|
36
|
+
allowedDomains: accessGroupDomains.default([]).meta({ examples: [["example.com"]] })
|
|
37
37
|
}).meta({ id: "access-group" });
|
|
38
38
|
|
|
39
|
+
// ../../packages/entities/dist/auth/auth-store.js
|
|
40
|
+
var recordSchema = entitySchema.extend({ expiresAt: external_exports.date() });
|
|
41
|
+
var scopesSchema = external_exports.array(external_exports.custom((value) => typeof value === "string"));
|
|
42
|
+
var CONSUMER_METHODS = ["email", "google", "microsoft", "sso"];
|
|
43
|
+
var PLATFORM_METHODS = ["password", "google", "github", "sso"];
|
|
44
|
+
var authIdentitySchema = external_exports.discriminatedUnion("kind", [
|
|
45
|
+
external_exports.object({
|
|
46
|
+
kind: external_exports.literal("consumer"),
|
|
47
|
+
email: external_exports.string(),
|
|
48
|
+
/** `scalar` is a team member's own account: always offered, so no team switch turns it off */
|
|
49
|
+
via: external_exports.enum([...CONSUMER_METHODS, "scalar"]),
|
|
50
|
+
idpUid: external_exports.string().nullish(),
|
|
51
|
+
/** Unix seconds */
|
|
52
|
+
authTime: external_exports.number()
|
|
53
|
+
}),
|
|
54
|
+
external_exports.object({
|
|
55
|
+
kind: external_exports.literal("platform"),
|
|
56
|
+
userUid: external_exports.string(),
|
|
57
|
+
email: external_exports.string(),
|
|
58
|
+
/** `token` is a personal token: not a sign-in, so a team's sign-in policy does not apply to it */
|
|
59
|
+
via: external_exports.enum([...PLATFORM_METHODS, "token"]),
|
|
60
|
+
idpUid: external_exports.string().nullish(),
|
|
61
|
+
authTime: external_exports.number()
|
|
62
|
+
})
|
|
63
|
+
]);
|
|
64
|
+
var authReaderResourceSchema = external_exports.discriminatedUnion("kind", [
|
|
65
|
+
external_exports.object({ kind: external_exports.literal("project"), uid: external_exports.string() }),
|
|
66
|
+
external_exports.object({ kind: external_exports.literal("registry"), uid: external_exports.string() }),
|
|
67
|
+
/** An MCP installation, by its uuid */
|
|
68
|
+
external_exports.object({ kind: external_exports.literal("mcp"), uid: external_exports.string() }),
|
|
69
|
+
/** A namespace's own pages, which list what the reader may see */
|
|
70
|
+
external_exports.object({ kind: external_exports.literal("namespace") })
|
|
71
|
+
]);
|
|
72
|
+
var consumerTargetSchema = external_exports.object({
|
|
73
|
+
kind: external_exports.literal("consumer"),
|
|
74
|
+
/** The namespace a reader's subject is derived in */
|
|
75
|
+
namespace: external_exports.string(),
|
|
76
|
+
teamUid: external_exports.string(),
|
|
77
|
+
resource: authReaderResourceSchema
|
|
78
|
+
});
|
|
79
|
+
var authTargetSchema = external_exports.discriminatedUnion("kind", [
|
|
80
|
+
consumerTargetSchema,
|
|
81
|
+
external_exports.object({ kind: external_exports.literal("platform"), teamUid: external_exports.string() })
|
|
82
|
+
]);
|
|
83
|
+
var authTargetRequestSchema = external_exports.discriminatedUnion("kind", [
|
|
84
|
+
consumerTargetSchema,
|
|
85
|
+
external_exports.object({ kind: external_exports.literal("platform"), teamUid: external_exports.string().nullish() })
|
|
86
|
+
]);
|
|
87
|
+
var authClientSnapshotSchema = external_exports.object({
|
|
88
|
+
id: external_exports.string(),
|
|
89
|
+
name: external_exports.string(),
|
|
90
|
+
kind: external_exports.enum([
|
|
91
|
+
/** A constant of ours: `scalar-dashboard`, `scalar-cli`, `scalar-docs` */
|
|
92
|
+
"first-party",
|
|
93
|
+
/** `scalar-local`: a person's own script, loopback redirects only */
|
|
94
|
+
"local",
|
|
95
|
+
/** A Client ID Metadata Document, fetched from the `client_id` URL */
|
|
96
|
+
"metadata",
|
|
97
|
+
/** A stateless registration: the `client_id` is a signed blob */
|
|
98
|
+
"registered"
|
|
99
|
+
]),
|
|
100
|
+
/** The fact the client did not choose: its metadata or redirect host. Absent for loopback */
|
|
101
|
+
host: external_exports.string().nullish()
|
|
102
|
+
});
|
|
103
|
+
var authGrantSchema = external_exports.object({
|
|
104
|
+
client: authClientSnapshotSchema,
|
|
105
|
+
identity: authIdentitySchema,
|
|
106
|
+
target: authTargetSchema,
|
|
107
|
+
scope: scopesSchema,
|
|
108
|
+
audience: external_exports.array(external_exports.string()),
|
|
109
|
+
issuer: external_exports.string()
|
|
110
|
+
});
|
|
111
|
+
var attemptRequestSchema = external_exports.object({
|
|
112
|
+
client: authClientSnapshotSchema,
|
|
113
|
+
redirectUri: external_exports.string(),
|
|
114
|
+
state: external_exports.string().nullish(),
|
|
115
|
+
codeChallenge: external_exports.string(),
|
|
116
|
+
scope: scopesSchema,
|
|
117
|
+
resource: external_exports.string(),
|
|
118
|
+
issuer: external_exports.string(),
|
|
119
|
+
audience: external_exports.array(external_exports.string()),
|
|
120
|
+
target: authTargetRequestSchema,
|
|
121
|
+
/** The name of what is being signed in to, as resolved from the resource: `@acme`, `docs.acme.com` */
|
|
122
|
+
entity: external_exports.string(),
|
|
123
|
+
/** The login portal that brands a reader's sign-in to the resource */
|
|
124
|
+
portalUid: external_exports.string().nullish(),
|
|
125
|
+
/**
|
|
126
|
+
* What the request's `prompt` asks of the sign-in: `none` answers the
|
|
127
|
+
* client with an error where a page would be shown, `consent` asks even
|
|
128
|
+
* when the approval is remembered
|
|
129
|
+
*/
|
|
130
|
+
prompt: external_exports.enum(["none", "consent"]).nullish(),
|
|
131
|
+
/** Set by `prompt=login`: the person must have signed in at or after this time, in Unix seconds */
|
|
132
|
+
authAfter: external_exports.number().nullish()
|
|
133
|
+
});
|
|
134
|
+
var authAttemptSchema = recordSchema.extend({
|
|
135
|
+
...attemptRequestSchema.shape,
|
|
136
|
+
/** Hash of the secret in the browser's attempt cookie */
|
|
137
|
+
browserHash: external_exports.string()
|
|
138
|
+
});
|
|
139
|
+
var authChallengeSchema = recordSchema.extend({
|
|
140
|
+
/** What the secret proves once presented: an address, a user */
|
|
141
|
+
subject: external_exports.string(),
|
|
142
|
+
consumedAt: external_exports.date().nullable(),
|
|
143
|
+
/**
|
|
144
|
+
* An emailed sign-in link proves the address alone, so it carries the
|
|
145
|
+
* request its attempt was made with: any browser that opens it can sign in
|
|
146
|
+
* to that. The link is refused after `signsInUntil` and kept a while
|
|
147
|
+
* longer, to say that it expired.
|
|
148
|
+
*/
|
|
149
|
+
link: external_exports.object({
|
|
150
|
+
attemptId: external_exports.string(),
|
|
151
|
+
request: attemptRequestSchema,
|
|
152
|
+
signsInUntil: external_exports.date()
|
|
153
|
+
}).nullish()
|
|
154
|
+
});
|
|
155
|
+
var authCodeSchema = recordSchema.extend({
|
|
156
|
+
/** Whose it is, as on a family, so a password reset also ends the codes still out */
|
|
157
|
+
subject: external_exports.string(),
|
|
158
|
+
redirectUri: external_exports.string(),
|
|
159
|
+
codeChallenge: external_exports.string(),
|
|
160
|
+
grant: authGrantSchema,
|
|
161
|
+
consumedAt: external_exports.date().nullable(),
|
|
162
|
+
/** The family the code was redeemed into, so a replayed code can end it */
|
|
163
|
+
familyId: external_exports.string().nullish()
|
|
164
|
+
});
|
|
165
|
+
var authFamilySchema = recordSchema.extend({
|
|
166
|
+
grant: authGrantSchema,
|
|
167
|
+
/** Whose it is, for ending all of a person's sessions at once: the user uid of a team member */
|
|
168
|
+
subject: external_exports.string(),
|
|
169
|
+
revokedAt: external_exports.date().nullable()
|
|
170
|
+
});
|
|
171
|
+
var authRefreshTokenSchema = recordSchema.extend({
|
|
172
|
+
familyId: external_exports.string(),
|
|
173
|
+
rotatedAt: external_exports.date().nullable()
|
|
174
|
+
});
|
|
175
|
+
var authSessionSchema = recordSchema.extend({
|
|
176
|
+
platform: authIdentitySchema.nullish(),
|
|
177
|
+
/** The team member's user uid, so a password reset can end the session */
|
|
178
|
+
subject: external_exports.string().nullish(),
|
|
179
|
+
/** By namespace */
|
|
180
|
+
consumers: external_exports.record(external_exports.string(), authIdentitySchema)
|
|
181
|
+
});
|
|
182
|
+
var authConsentSchema = recordSchema.extend({ scope: scopesSchema });
|
|
183
|
+
var authCounterSchema = recordSchema.extend({
|
|
184
|
+
count: external_exports.number().int()
|
|
185
|
+
});
|
|
186
|
+
|
|
39
187
|
// ../../packages/entities/dist/auth/identity-provider.js
|
|
40
188
|
var identityProviders = [
|
|
41
189
|
"local",
|
|
@@ -94,12 +242,6 @@ var googleProfileSchema = external_exports.object({
|
|
|
94
242
|
picture: external_exports.string().optional(),
|
|
95
243
|
email_verified: external_exports.boolean()
|
|
96
244
|
}).meta({ id: "google-profile" });
|
|
97
|
-
var githubProfileSchema = external_exports.object({
|
|
98
|
-
login: external_exports.string(),
|
|
99
|
-
name: external_exports.string().optional().nullable().default(null),
|
|
100
|
-
email: emailSchema.optional().nullable().default(null),
|
|
101
|
-
avatar_url: external_exports.string().optional().nullable().default(null)
|
|
102
|
-
}).meta({ id: "github-profile" });
|
|
103
245
|
var oauthStateSchema = external_exports.object({
|
|
104
246
|
uid: external_exports.string(),
|
|
105
247
|
redirect: external_exports.string(),
|
|
@@ -107,36 +249,6 @@ var oauthStateSchema = external_exports.object({
|
|
|
107
249
|
teamInvite: external_exports.string().optional(),
|
|
108
250
|
flow: external_exports.enum(OnboardingFlow).optional()
|
|
109
251
|
}).meta({ id: "oauth-state" });
|
|
110
|
-
var microsoftProfileSchema = external_exports.object({
|
|
111
|
-
email: emailSchema,
|
|
112
|
-
name: external_exports.string().optional(),
|
|
113
|
-
/** Entra tenant id; the consumer tenant means a personal account */
|
|
114
|
-
tid: external_exports.string(),
|
|
115
|
-
/**
|
|
116
|
-
* "Email domain owner verified" optional claim. Entra tenant admins can
|
|
117
|
-
* put arbitrary emails on their users (nOAuth), so without this claim a
|
|
118
|
-
* work-account email cannot be trusted for allowlist checks.
|
|
119
|
-
*/
|
|
120
|
-
xms_edov: external_exports.union([external_exports.boolean(), external_exports.string()]).optional()
|
|
121
|
-
}).meta({ id: "microsoft-profile" });
|
|
122
|
-
var hostingOauthResourceSchema = external_exports.enum([
|
|
123
|
-
...RegistryResourceTypes,
|
|
124
|
-
"sync-project",
|
|
125
|
-
"project",
|
|
126
|
-
"publish",
|
|
127
|
-
"namespace"
|
|
128
|
-
]).meta({ id: "hosting-oauth-resource" });
|
|
129
|
-
var hostingOauthStateSchema = external_exports.object({
|
|
130
|
-
uid: nanoidSchema,
|
|
131
|
-
resource: external_exports.object({
|
|
132
|
-
uid: nanoidSchema,
|
|
133
|
-
type: hostingOauthResourceSchema
|
|
134
|
-
}),
|
|
135
|
-
teamUid: nanoidSchema,
|
|
136
|
-
redirect: external_exports.string().optional(),
|
|
137
|
-
/** Stamped on the stored record so abandoned states can be vacuumed */
|
|
138
|
-
createdAt: external_exports.number().optional()
|
|
139
|
-
}).meta({ id: "hosting-oauth-state" });
|
|
140
252
|
|
|
141
253
|
// ../../packages/entities/dist/auth/personal-token.js
|
|
142
254
|
var personalTokenRecordSchema = external_exports.object({
|
|
@@ -153,20 +265,39 @@ var personalTokenRecordSchema = external_exports.object({
|
|
|
153
265
|
revoked: external_exports.boolean()
|
|
154
266
|
}).meta({ id: "personal-token-record" });
|
|
155
267
|
|
|
268
|
+
// ../../packages/entities/dist/auth/revocation.js
|
|
269
|
+
var REVOCATION_KINDS = ["fid", "member", "team"];
|
|
270
|
+
var authRevocationSchema = entitySchema.extend({
|
|
271
|
+
kind: external_exports.enum(REVOCATION_KINDS),
|
|
272
|
+
/** fid: the claim itself. member: `<teamUid>:<userUid>`. team: the team uid */
|
|
273
|
+
key: external_exports.string().min(1),
|
|
274
|
+
/** Epoch seconds, compared as `iat <= revokedBefore`. Null for `fid`, where presence revokes */
|
|
275
|
+
revokedBefore: external_exports.number().int().nullable(),
|
|
276
|
+
/** When the last credential this row can refuse has expired, as a Date for the TTL index */
|
|
277
|
+
expiresAt: external_exports.date()
|
|
278
|
+
});
|
|
279
|
+
var epochSchema = external_exports.strictObject({
|
|
280
|
+
key: external_exports.string(),
|
|
281
|
+
revokedBefore: external_exports.number().int()
|
|
282
|
+
});
|
|
283
|
+
var limitsSnapshotSchema = external_exports.strictObject({
|
|
284
|
+
/** Epoch ms on the clock of whoever read the rows, sampled before the read */
|
|
285
|
+
syncedAt: external_exports.number().int().min(0),
|
|
286
|
+
fids: external_exports.array(external_exports.string()),
|
|
287
|
+
members: external_exports.array(epochSchema),
|
|
288
|
+
teams: external_exports.array(epochSchema)
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
// ../../packages/entities/dist/auth/domains.js
|
|
292
|
+
var AuthDomains;
|
|
293
|
+
(function(AuthDomains2) {
|
|
294
|
+
AuthDomains2["Client"] = "client";
|
|
295
|
+
AuthDomains2["Local"] = "local";
|
|
296
|
+
AuthDomains2["Dashboard"] = "dashboard";
|
|
297
|
+
AuthDomains2["Agent"] = "agent";
|
|
298
|
+
})(AuthDomains || (AuthDomains = {}));
|
|
299
|
+
|
|
156
300
|
// ../../packages/entities/dist/auth/saml-state.js
|
|
157
|
-
var samlStateSchema = external_exports.object({
|
|
158
|
-
uid: nanoidSchema,
|
|
159
|
-
// AuthN request identifier
|
|
160
|
-
requestId: external_exports.string(),
|
|
161
|
-
// IDP configuration identifier
|
|
162
|
-
idpUid: nanoidSchema,
|
|
163
|
-
// Random state
|
|
164
|
-
relayState: external_exports.string().min(20),
|
|
165
|
-
// Redirect after sign in
|
|
166
|
-
redirect: external_exports.string().optional(),
|
|
167
|
-
// Expiry
|
|
168
|
-
expiresAt: external_exports.number()
|
|
169
|
-
}).meta({ id: "saml-state" });
|
|
170
301
|
var ssoResourceSchema = external_exports.enum([
|
|
171
302
|
...RegistryResourceTypes,
|
|
172
303
|
"sync-project",
|
|
@@ -199,17 +330,6 @@ var relayStateSchema = external_exports.object({
|
|
|
199
330
|
}).optional()
|
|
200
331
|
}).meta({ id: "relay-state", default: "nanoid()" });
|
|
201
332
|
|
|
202
|
-
// ../../packages/entities/dist/auth/domains.js
|
|
203
|
-
var AuthDomains;
|
|
204
|
-
(function(AuthDomains2) {
|
|
205
|
-
AuthDomains2["Cli"] = "cli";
|
|
206
|
-
AuthDomains2["Client"] = "client";
|
|
207
|
-
AuthDomains2["Local"] = "local";
|
|
208
|
-
AuthDomains2["Dashboard"] = "dashboard";
|
|
209
|
-
AuthDomains2["Agent"] = "agent";
|
|
210
|
-
AuthDomains2["Mcp"] = "mcp";
|
|
211
|
-
})(AuthDomains || (AuthDomains = {}));
|
|
212
|
-
|
|
213
333
|
// ../../packages/entities/dist/publish/publish.js
|
|
214
334
|
var headingRecordSchema = external_exports.object({
|
|
215
335
|
slug: external_exports.string(),
|
|
@@ -217,7 +337,11 @@ var headingRecordSchema = external_exports.object({
|
|
|
217
337
|
level: external_exports.coerce.number().int(),
|
|
218
338
|
uid: nanoidSchema,
|
|
219
339
|
parent: external_exports.string().optional(),
|
|
220
|
-
isPageTitle: external_exports.boolean().optional()
|
|
340
|
+
isPageTitle: external_exports.boolean().optional(),
|
|
341
|
+
/** `timeline-item` for a changelog entry (`scalar-timeline-item`). Absent for headings. */
|
|
342
|
+
kind: external_exports.enum(["timeline-item"]).optional(),
|
|
343
|
+
/** Secondary TOC line for a changelog entry, usually its date */
|
|
344
|
+
description: external_exports.string().optional()
|
|
221
345
|
}).meta({ id: "heading-record" });
|
|
222
346
|
var publishAssetSchema = external_exports.object({
|
|
223
347
|
path: external_exports.string(),
|
|
@@ -294,53 +418,67 @@ var searchConfigResponseSchema = external_exports.object({
|
|
|
294
418
|
// ../../packages/entities/dist/login-portals/customization.js
|
|
295
419
|
var loginPortalEmailSchema = external_exports.object({
|
|
296
420
|
/** @deprecated No longer rendered in the email template */
|
|
297
|
-
logo: external_exports.string().default("")
|
|
421
|
+
logo: external_exports.string().default("").meta({
|
|
422
|
+
examples: ['<img src="https://example.com/logo.svg" alt="Acme" />']
|
|
423
|
+
}),
|
|
298
424
|
/** @deprecated No longer rendered in the email template */
|
|
299
|
-
logoSize: external_exports.string().default("100"),
|
|
300
|
-
buttonText: external_exports.string().max(50).default("Login"),
|
|
301
|
-
message: external_exports.string().max(1e3).default("Click to access private documentation hosted by scalar.com"),
|
|
302
|
-
title: external_exports.string().max(100).default("Private Docs"),
|
|
303
|
-
mainColor: external_exports.string().max(100).default("#2a2f45"),
|
|
304
|
-
mainBackground: external_exports.string().max(100).default("#f6f6f6"),
|
|
305
|
-
cardColor: external_exports.string().max(100).default("#2a2f45"),
|
|
306
|
-
cardBackground: external_exports.string().max(100).default("#fff"),
|
|
307
|
-
buttonColor: external_exports.string().max(100).default("#fff"),
|
|
308
|
-
buttonBackground: external_exports.string().max(100).default("#0f0f0f")
|
|
425
|
+
logoSize: external_exports.string().default("100").meta({ examples: ["100"] }),
|
|
426
|
+
buttonText: external_exports.string().max(50).default("Login").meta({ examples: ["Access documentation"] }),
|
|
427
|
+
message: external_exports.string().max(1e3).default("Click to access private documentation hosted by scalar.com").meta({ examples: ["Click to access Acme private API documentation."] }),
|
|
428
|
+
title: external_exports.string().max(100).default("Private Docs").meta({ examples: ["Acme API"] }),
|
|
429
|
+
mainColor: external_exports.string().max(100).default("#2a2f45").meta({ examples: ["#1f2937"] }),
|
|
430
|
+
mainBackground: external_exports.string().max(100).default("#f6f6f6").meta({ examples: ["#f9fafb"] }),
|
|
431
|
+
cardColor: external_exports.string().max(100).default("#2a2f45").meta({ examples: ["#1f2937"] }),
|
|
432
|
+
cardBackground: external_exports.string().max(100).default("#fff").meta({ examples: ["#ffffff"] }),
|
|
433
|
+
buttonColor: external_exports.string().max(100).default("#fff").meta({ examples: ["#ffffff"] }),
|
|
434
|
+
buttonBackground: external_exports.string().max(100).default("#0f0f0f").meta({ examples: ["#2563eb"] })
|
|
309
435
|
}).meta({ id: "login-portal-email" });
|
|
310
436
|
var loginPortalPageSchema = external_exports.object({
|
|
311
437
|
/** Title of the page for the HTML Head */
|
|
312
|
-
title: external_exports.string().max(100).default("Scalar Private Docs"),
|
|
438
|
+
title: external_exports.string().max(100).default("Scalar Private Docs").meta({ examples: ["Acme API"] }),
|
|
313
439
|
/** Description of the page for the HTML Head */
|
|
314
|
-
description: external_exports.string().max(500).default("Login to access your documentation")
|
|
440
|
+
description: external_exports.string().max(500).default("Login to access your documentation").meta({
|
|
441
|
+
examples: [
|
|
442
|
+
"Sign in with your work email to access Acme documentation."
|
|
443
|
+
]
|
|
444
|
+
}),
|
|
315
445
|
/** Custom HTML for the head of the page */
|
|
316
|
-
head: external_exports.string().default(""),
|
|
446
|
+
head: external_exports.string().default("").meta({ examples: ['<meta name="robots" content="noindex" />'] }),
|
|
317
447
|
/** Script to include in the head of the page */
|
|
318
|
-
script: external_exports.string().default("")
|
|
448
|
+
script: external_exports.string().default("").meta({
|
|
449
|
+
examples: ['document.documentElement.dataset.company = "acme";']
|
|
450
|
+
}),
|
|
319
451
|
/** UID of the team theme to apply to the page */
|
|
320
|
-
theme: external_exports.string().default(""),
|
|
452
|
+
theme: external_exports.string().default("").meta({ examples: ["TakgbKJ5m9gl0JDMbcJqL"] }),
|
|
321
453
|
/** Company name used in the header */
|
|
322
|
-
companyName: external_exports.string().max(100).default(""),
|
|
454
|
+
companyName: external_exports.string().max(100).default("").meta({ examples: ["Acme"] }),
|
|
323
455
|
/** Logo of the company used in the header as raw SVG/HTML */
|
|
324
|
-
logo: external_exports.string().default("")
|
|
456
|
+
logo: external_exports.string().default("").meta({
|
|
457
|
+
examples: ['<img src="https://example.com/logo.svg" alt="Acme" />']
|
|
458
|
+
}),
|
|
325
459
|
/** Link that the logo redirects to when clicking */
|
|
326
|
-
logoURL: external_exports.string().default(""),
|
|
460
|
+
logoURL: external_exports.string().default("").meta({ examples: ["https://example.com"] }),
|
|
327
461
|
/** Favicon URL or dataURI */
|
|
328
|
-
favicon: external_exports.string().default(""),
|
|
462
|
+
favicon: external_exports.string().default("").meta({ examples: ["https://example.com/favicon.ico"] }),
|
|
329
463
|
/** Terms link */
|
|
330
|
-
termsLink: external_exports.string().default(""),
|
|
464
|
+
termsLink: external_exports.string().default("").meta({ examples: ["https://example.com/terms"] }),
|
|
331
465
|
/** Privacy link */
|
|
332
|
-
privacyLink: external_exports.string().default(""),
|
|
466
|
+
privacyLink: external_exports.string().default("").meta({ examples: ["https://example.com/privacy"] }),
|
|
333
467
|
/** Title of the form */
|
|
334
|
-
formTitle: external_exports.string().max(100).default("Scalar Private Docs"),
|
|
468
|
+
formTitle: external_exports.string().max(100).default("Scalar Private Docs").meta({ examples: ["Sign in to Acme Documentation"] }),
|
|
335
469
|
/** Description of the form */
|
|
336
|
-
formDescription: external_exports.string().max(500).default("Login to access your documentation")
|
|
470
|
+
formDescription: external_exports.string().max(500).default("Login to access your documentation").meta({
|
|
471
|
+
examples: [
|
|
472
|
+
"Sign in with your work email to access Acme documentation."
|
|
473
|
+
]
|
|
474
|
+
}),
|
|
337
475
|
/** Image of the form */
|
|
338
|
-
formImage: external_exports.string().default("")
|
|
476
|
+
formImage: external_exports.string().default("").meta({ examples: ["https://example.com/login-banner.png"] })
|
|
339
477
|
}).meta({ id: "login-portal-page" });
|
|
340
478
|
var loginPortalSchema = external_exports.object({
|
|
341
|
-
uid: nanoidSchema,
|
|
342
|
-
title: external_exports.string().max(200),
|
|
343
|
-
slug: slugSchema,
|
|
479
|
+
uid: nanoidSchema.meta({ examples: ["UakgbKJ5m9gl0JDMbcJqL"] }),
|
|
480
|
+
title: external_exports.string().max(200).meta({ examples: ["Acme API"] }),
|
|
481
|
+
slug: slugSchema.meta({ examples: ["acme-api"] }),
|
|
344
482
|
email: loginPortalEmailSchema,
|
|
345
483
|
page: loginPortalPageSchema
|
|
346
484
|
}).meta({ id: "login-portal" });
|
|
@@ -348,26 +486,34 @@ var loginPortalSchema = external_exports.object({
|
|
|
348
486
|
// ../../packages/entities/dist/managed-schema/schema.js
|
|
349
487
|
var managedSchemaVersion = entitySchema.extend({
|
|
350
488
|
/** Version identifier (e.g. 0.0.1) for schema */
|
|
351
|
-
version: docVersionSchema.default("0.0.1"),
|
|
489
|
+
version: docVersionSchema.default("0.0.1").meta({ examples: ["1.2.0"] }),
|
|
352
490
|
/**
|
|
353
491
|
* SHA-256 hex digest of the YAML content the version serves, from its
|
|
354
492
|
* chain head. Integrity metadata for the YAML serialization, never a
|
|
355
493
|
* storage key.
|
|
356
494
|
*/
|
|
357
|
-
yamlSha: contentShaSchema.optional()
|
|
495
|
+
yamlSha: contentShaSchema.optional().meta({
|
|
496
|
+
examples: [
|
|
497
|
+
"abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789"
|
|
498
|
+
]
|
|
499
|
+
}),
|
|
358
500
|
/**
|
|
359
501
|
* SHA-256 hex digest of the JSON content the version serves, from its
|
|
360
502
|
* chain head. This is the blob key for both formats, matching the API
|
|
361
503
|
* document entity.
|
|
362
504
|
*/
|
|
363
|
-
jsonSha: contentShaSchema.optional()
|
|
505
|
+
jsonSha: contentShaSchema.optional().meta({
|
|
506
|
+
examples: [
|
|
507
|
+
"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
|
|
508
|
+
]
|
|
509
|
+
})
|
|
364
510
|
}).meta({ id: "managed-schema-version" });
|
|
365
511
|
var managedSchemaFormat = external_exports.enum(["json", "yaml"]).meta({ id: "managed-schema-format" });
|
|
366
512
|
var managedSchema = baseRegistrySchema.extend({
|
|
367
513
|
/** Own uid, branded so it cannot be confused with another entity's uid */
|
|
368
|
-
uid: brandedUid().default(mintUid).meta({ default:
|
|
514
|
+
uid: brandedUid().default(mintUid).meta({ default: void 0 }),
|
|
369
515
|
/** The current version served to consumers by default */
|
|
370
|
-
version: docVersionSchema.default("0.0.1"),
|
|
516
|
+
version: docVersionSchema.default("0.0.1").meta({ examples: ["1.2.0"] }),
|
|
371
517
|
/** Default schema format for edit/view */
|
|
372
518
|
format: managedSchemaFormat.default("json")
|
|
373
519
|
}).meta({ id: "managed-schema" });
|
|
@@ -751,8 +897,10 @@ var workspaceSchema = baseRegistrySchema.extend({
|
|
|
751
897
|
}).meta({ id: "workspace" });
|
|
752
898
|
|
|
753
899
|
export {
|
|
900
|
+
emailDomainSchema,
|
|
901
|
+
accessGroupDomains,
|
|
902
|
+
accessGroupNameSchema,
|
|
754
903
|
accessGroupSchema,
|
|
755
|
-
identityProviders,
|
|
756
904
|
identityProviderRecordSchema,
|
|
757
905
|
siteDeploySchema,
|
|
758
906
|
loginPortalSchema,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// ../../node_modules/.pnpm/@scalar+helpers@0.
|
|
3
|
+
// ../../node_modules/.pnpm/@scalar+helpers@0.16.1/node_modules/@scalar/helpers/dist/types/result.js
|
|
4
4
|
var ok = (data) => ({ ok: true, data });
|
|
5
5
|
var err = (error, message) => ({
|
|
6
6
|
ok: false,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRequire as $$cR } from "node:module"; const require = $$cR(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
config
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WB6PWTMU.js";
|
|
5
5
|
import {
|
|
6
6
|
RegistryAsset
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GLWTVLKM.js";
|
|
8
8
|
|
|
9
9
|
// src/domains/registry/helpers/links.ts
|
|
10
10
|
function registryUrl(path) {
|