@camstack/addon-auth 1.2.144 → 1.2.146
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/{dist-ChwITXNa.mjs → dist-BtJOajm3.mjs} +475 -12
- package/dist/{dist-0YTEFDYk.js → dist-DtqB-MTf.js} +498 -11
- package/dist/oidc/auth-oidc.addon.js +123 -15
- package/dist/oidc/auth-oidc.addon.mjs +123 -15
- package/dist/webauthn/_stub.js +1 -1
- package/dist/webauthn/{_virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-ZRpCO_gp.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_auth_webauthn_widgets-C3_j2tlC.mjs} +2 -2
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-C_j9tv24.mjs +26 -0
- package/dist/webauthn/auth-webauthn.addon.js +16 -4
- package/dist/webauthn/auth-webauthn.addon.mjs +16 -5
- package/dist/webauthn/{hostInit-YhJ9npQM.mjs → hostInit-H35G8h3o.mjs} +2 -2
- package/dist/webauthn/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/webauthn/_virtual_mf___mfe_internal__addon_auth_webauthn_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-xhY74yma.mjs +0 -26
|
@@ -5420,7 +5420,7 @@ var ZodIssueCode = {
|
|
|
5420
5420
|
var ZodFirstPartyTypeKind;
|
|
5421
5421
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5422
5422
|
//#endregion
|
|
5423
|
-
//#region ../types/dist/sleep-
|
|
5423
|
+
//#region ../types/dist/sleep-DAX0-2v9.mjs
|
|
5424
5424
|
/**
|
|
5425
5425
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5426
5426
|
* window to float samples (D455).
|
|
@@ -12313,6 +12313,123 @@ var ConvertResultSchema = object({
|
|
|
12313
12313
|
})).readonly()
|
|
12314
12314
|
});
|
|
12315
12315
|
/**
|
|
12316
|
+
* The viewer app's custom-scheme callback — the ONE list of URLs a hub flow
|
|
12317
|
+
* may hand a browser back to the native app at.
|
|
12318
|
+
*
|
|
12319
|
+
* Two readers, one answer: the admin-ui login page (`redirect=` for the
|
|
12320
|
+
* native sign-in handoff) and the hub itself (`auth.beginExternalLink`'s
|
|
12321
|
+
* `returnTo` for a native account link, D801). Both validate against this
|
|
12322
|
+
* list, so a scheme added for one flow can never be accepted by one side and
|
|
12323
|
+
* refused by the other.
|
|
12324
|
+
*
|
|
12325
|
+
* `camstack` is the production app; `camstack.dev` the dev client
|
|
12326
|
+
* (`APP_VARIANT=development`). Exact match after canonicalisation — no
|
|
12327
|
+
* query or fragment riders, no http(s).
|
|
12328
|
+
*/
|
|
12329
|
+
var APP_AUTH_CALLBACK_URLS = ["camstack://auth-callback", "camstack.dev://auth-callback"];
|
|
12330
|
+
/**
|
|
12331
|
+
* The variants the OS / linking layer produces for the same callback:
|
|
12332
|
+
* `scheme:///auth-callback` (expo-linking's empty-host standalone form — three
|
|
12333
|
+
* slashes) and a trailing `/` both mean `scheme://auth-callback`. Nothing else
|
|
12334
|
+
* is normalised: riders keep failing the exact match.
|
|
12335
|
+
*/
|
|
12336
|
+
function canonicalizeAppCallback(raw) {
|
|
12337
|
+
return raw.replace(/^([a-z][a-z0-9.+-]*):\/\/\/(?!\/)/i, "$1://").replace(/\/$/, "");
|
|
12338
|
+
}
|
|
12339
|
+
/** The canonical allowlisted callback `raw` names, or `null`. */
|
|
12340
|
+
function parseAppAuthCallback(raw) {
|
|
12341
|
+
if (typeof raw !== "string" || raw.length === 0 || raw.length > 512) return null;
|
|
12342
|
+
const canonical = canonicalizeAppCallback(raw);
|
|
12343
|
+
return APP_AUTH_CALLBACK_URLS.includes(canonical) ? canonical : null;
|
|
12344
|
+
}
|
|
12345
|
+
/**
|
|
12346
|
+
* The native-app browser sign-in flows the hub serves itself (D858).
|
|
12347
|
+
*
|
|
12348
|
+
* The viewer app opens the system browser at a hub START route (OIDC
|
|
12349
|
+
* `/addon/auth-oidc/<id>/start`, the passkey page `/auth/app/passkey`) and gets
|
|
12350
|
+
* a one-shot handoff code back at its custom scheme. These helpers are the one
|
|
12351
|
+
* reading of the request every leg shares - the OIDC addon, the finish leg and
|
|
12352
|
+
* the passkey page - so a rule tightened for one is tightened for all:
|
|
12353
|
+
*
|
|
12354
|
+
* - PKCE is mandatory and S256 only (`code_challenge` = base64url of a SHA-256);
|
|
12355
|
+
* - `state` is echoed back exactly;
|
|
12356
|
+
* - the return URL is one of {@link APP_AUTH_CALLBACK_URLS}, never a free URL;
|
|
12357
|
+
* - the purpose is `new-session` or `step-up` (the legacy `renew` has no browser flow).
|
|
12358
|
+
*
|
|
12359
|
+
* Pure and dependency-free (zod only) so an addon, the backend and a spec read
|
|
12360
|
+
* the same code.
|
|
12361
|
+
*/
|
|
12362
|
+
/** What the app redeems the code for. `step-up` yields a proof, never a session. */
|
|
12363
|
+
var AppFlowPurposeSchema = _enum(["new-session", "step-up"]);
|
|
12364
|
+
/** Where the app is sent when the request names no `redirect`. */
|
|
12365
|
+
var APP_FLOW_DEFAULT_REDIRECT = "camstack://auth-callback";
|
|
12366
|
+
/** S256 challenge: base64url of 32 bytes = 43 characters, no padding. */
|
|
12367
|
+
var CHALLENGE_PATTERN = /^[A-Za-z0-9_-]{43}$/;
|
|
12368
|
+
/** The app's own `state`: URL-safe characters only, bounded. */
|
|
12369
|
+
var STATE_PATTERN = /^[A-Za-z0-9._~-]{1,256}$/;
|
|
12370
|
+
/**
|
|
12371
|
+
* The hub page that says why an app sign-in start was refused. A leg that
|
|
12372
|
+
* cannot render the hub's styled page itself (an addon: it has no access to the
|
|
12373
|
+
* hub's theme) redirects here with `?reason=<AppStartRefusal>`. Only a CODE
|
|
12374
|
+
* travels - the words come from {@link APP_START_REFUSAL_MESSAGES}, so the app's
|
|
12375
|
+
* parameters are never echoed.
|
|
12376
|
+
*/
|
|
12377
|
+
var APP_REFUSED_PATH = "/auth/app/refused";
|
|
12378
|
+
/**
|
|
12379
|
+
* Read the app parameters off a start query: `code_challenge`,
|
|
12380
|
+
* `code_challenge_method`, `state`, `purpose`, `redirect`. Anything missing or
|
|
12381
|
+
* malformed is refused - there is no lenient default for PKCE or state.
|
|
12382
|
+
*/
|
|
12383
|
+
function parseAppFlowRequest(query) {
|
|
12384
|
+
const challenge = query["code_challenge"];
|
|
12385
|
+
if (challenge === void 0 || !CHALLENGE_PATTERN.test(challenge)) return {
|
|
12386
|
+
ok: false,
|
|
12387
|
+
reason: "bad-challenge"
|
|
12388
|
+
};
|
|
12389
|
+
if (query["code_challenge_method"] !== "S256") return {
|
|
12390
|
+
ok: false,
|
|
12391
|
+
reason: "bad-challenge-method"
|
|
12392
|
+
};
|
|
12393
|
+
const state = query["state"];
|
|
12394
|
+
if (state === void 0 || !STATE_PATTERN.test(state)) return {
|
|
12395
|
+
ok: false,
|
|
12396
|
+
reason: "bad-state"
|
|
12397
|
+
};
|
|
12398
|
+
const purpose = AppFlowPurposeSchema.safeParse(query["purpose"]);
|
|
12399
|
+
if (!purpose.success) return {
|
|
12400
|
+
ok: false,
|
|
12401
|
+
reason: "bad-purpose"
|
|
12402
|
+
};
|
|
12403
|
+
const redirectParam = query["redirect"];
|
|
12404
|
+
const redirect = redirectParam === void 0 ? APP_FLOW_DEFAULT_REDIRECT : parseAppAuthCallback(redirectParam);
|
|
12405
|
+
if (redirect === null) return {
|
|
12406
|
+
ok: false,
|
|
12407
|
+
reason: "bad-redirect"
|
|
12408
|
+
};
|
|
12409
|
+
return {
|
|
12410
|
+
ok: true,
|
|
12411
|
+
request: {
|
|
12412
|
+
codeChallenge: challenge,
|
|
12413
|
+
state,
|
|
12414
|
+
purpose: purpose.data,
|
|
12415
|
+
redirect
|
|
12416
|
+
}
|
|
12417
|
+
};
|
|
12418
|
+
}
|
|
12419
|
+
/** The app's callback with `code` (success) or `error` (refusal), and the echoed `state` when known. */
|
|
12420
|
+
function appFlowLocation(redirect, result, state) {
|
|
12421
|
+
const params = new URLSearchParams();
|
|
12422
|
+
if ("code" in result) params.set("code", result.code);
|
|
12423
|
+
else params.set("error", result.error);
|
|
12424
|
+
if (state !== void 0) params.set("state", state);
|
|
12425
|
+
return `${redirect}?${params.toString()}`;
|
|
12426
|
+
}
|
|
12427
|
+
/** How a native app starts one login method (D858), as `auth.listLoginMethods` reports it. */
|
|
12428
|
+
var AppLoginPathSchema = discriminatedUnion("kind", [object({ kind: literal("native") }), object({
|
|
12429
|
+
kind: literal("browser"),
|
|
12430
|
+
startPath: string().startsWith("/")
|
|
12431
|
+
})]);
|
|
12432
|
+
/**
|
|
12316
12433
|
* The cookie that binds an SSO sign-in to the browser that started it.
|
|
12317
12434
|
*
|
|
12318
12435
|
* An IdP `/start` sets it to a random value and keeps only its SHA-256 in the
|
|
@@ -12485,7 +12602,9 @@ object({
|
|
|
12485
12602
|
signature: literal(DEVICE_CERT_SIGNATURE),
|
|
12486
12603
|
messageVersion: literal(DEVICE_SIGNATURE_MESSAGE_VERSION),
|
|
12487
12604
|
/** Which clients can execute it: a native app silently, a browser with a non-extractable WebCrypto key. */
|
|
12488
|
-
clients: array(_enum(["native", "web"]))
|
|
12605
|
+
clients: array(_enum(["native", "web"])),
|
|
12606
|
+
/** The app executes it itself, silently (D858). */
|
|
12607
|
+
app: AppLoginPathSchema.nullable()
|
|
12489
12608
|
});
|
|
12490
12609
|
/** host[:port] — a DNS name, IPv4 or bracketed IPv6. No userinfo, path or spaces. */
|
|
12491
12610
|
var AUTHORITY_RE = /^(?:[a-z0-9.-]+|\[[0-9a-f:.]+\])(?::\d{1,5})?$/i;
|
|
@@ -16168,6 +16287,208 @@ method(object({
|
|
|
16168
16287
|
kind: "mutation",
|
|
16169
16288
|
auth: "admin"
|
|
16170
16289
|
}), method(object({}), array(KeychainSecretMetaSchema).readonly(), { auth: "admin" }), method(object({}), KeychainStateSchema, { auth: "admin" });
|
|
16290
|
+
/**
|
|
16291
|
+
* device-history — the ONE mechanism for numeric history (D850).
|
|
16292
|
+
*
|
|
16293
|
+
* A device value is recorded because its capability says so (the `history`
|
|
16294
|
+
* block of a `*.cap.ts`, captured hub-side from `DeviceStateChanged`); any
|
|
16295
|
+
* other series is DECLARED by the addon that produces it and fed with points
|
|
16296
|
+
* (`record`) or closed five-minute buckets (`recordBuckets`). Rollups 5m / 1h /
|
|
16297
|
+
* 1d are computed here and nowhere else. Storage is `history.db` (D851).
|
|
16298
|
+
*
|
|
16299
|
+
* Who the PRODUCER is: `declareSeries`, `record` and `recordBuckets` are owner
|
|
16300
|
+
* checked against the `callerAddonId` the transport stamps into a call that
|
|
16301
|
+
* crossed a process (never in an input schema, so a session cannot supply it).
|
|
16302
|
+
* A call with no stamp is refused `not-owner`. The methods are `admin` so a
|
|
16303
|
+
* non-admin session never reaches them; an addon's `ctx.api` call bypasses the
|
|
16304
|
+
* tier by design.
|
|
16305
|
+
*/
|
|
16306
|
+
/** Whose history: a real device, or a cluster node (load, memory). */
|
|
16307
|
+
var DeviceHistorySubjectSchema = discriminatedUnion("kind", [object({
|
|
16308
|
+
kind: literal("device"),
|
|
16309
|
+
deviceId: number().int()
|
|
16310
|
+
}), object({
|
|
16311
|
+
kind: literal("node"),
|
|
16312
|
+
nodeId: string().min(1)
|
|
16313
|
+
})]);
|
|
16314
|
+
var DeviceHistoryKindSchema = _enum([
|
|
16315
|
+
"gauge",
|
|
16316
|
+
"counter",
|
|
16317
|
+
"boolean"
|
|
16318
|
+
]);
|
|
16319
|
+
var DeviceHistoryResolutionSchema = _enum([
|
|
16320
|
+
"raw",
|
|
16321
|
+
"5m",
|
|
16322
|
+
"1h",
|
|
16323
|
+
"1d"
|
|
16324
|
+
]);
|
|
16325
|
+
/** Why a producer's point or bucket was not stored. Counted, never silent (D391). */
|
|
16326
|
+
var DeviceHistoryRefusalReasonSchema = _enum([
|
|
16327
|
+
"undeclared",
|
|
16328
|
+
"not-owner",
|
|
16329
|
+
"opted-out",
|
|
16330
|
+
"not-a-real-device",
|
|
16331
|
+
"rate",
|
|
16332
|
+
"ingest-mismatch",
|
|
16333
|
+
"out-of-range"
|
|
16334
|
+
]);
|
|
16335
|
+
var RefusalSchema = object({
|
|
16336
|
+
key: string(),
|
|
16337
|
+
reason: DeviceHistoryRefusalReasonSchema,
|
|
16338
|
+
count: number().int()
|
|
16339
|
+
});
|
|
16340
|
+
var IngestResultSchema = object({
|
|
16341
|
+
accepted: number().int(),
|
|
16342
|
+
refused: array(RefusalSchema).readonly()
|
|
16343
|
+
});
|
|
16344
|
+
var SeriesInfoSchema = object({
|
|
16345
|
+
key: string(),
|
|
16346
|
+
scope: string(),
|
|
16347
|
+
kind: DeviceHistoryKindSchema,
|
|
16348
|
+
/** `null` is unknown (a `unitFrom` series whose device does not state a unit right now), never a guess. */
|
|
16349
|
+
unit: string().nullable(),
|
|
16350
|
+
displayName: string(),
|
|
16351
|
+
source: _enum(["cap", "addon"]),
|
|
16352
|
+
firstTs: number(),
|
|
16353
|
+
lastTs: number()
|
|
16354
|
+
});
|
|
16355
|
+
var QueryPointSchema = object({
|
|
16356
|
+
/** Raw: the point's time. Rollup: the bucket start. */
|
|
16357
|
+
t: number(),
|
|
16358
|
+
samples: number().int(),
|
|
16359
|
+
/** `sum / samples`. */
|
|
16360
|
+
mean: number().nullable(),
|
|
16361
|
+
/** Time-weighted mean (`tw_sum / tw_ms`); `null` for bucket-ingested series. For a boolean: the fraction of time true. */
|
|
16362
|
+
twMean: number().nullable(),
|
|
16363
|
+
min: number(),
|
|
16364
|
+
max: number(),
|
|
16365
|
+
/** `null` is unknown, never zero (D393). */
|
|
16366
|
+
last: number().nullable()
|
|
16367
|
+
});
|
|
16368
|
+
var QuerySeriesSchema = object({
|
|
16369
|
+
scope: string(),
|
|
16370
|
+
/** The last point STRICTLY BEFORE `from` in the chosen tier, so a step chart can start at the held value. */
|
|
16371
|
+
before: object({
|
|
16372
|
+
t: number(),
|
|
16373
|
+
value: number().nullable()
|
|
16374
|
+
}).nullable(),
|
|
16375
|
+
points: array(QueryPointSchema).readonly()
|
|
16376
|
+
});
|
|
16377
|
+
/** The window part of a query, shared by the device and node forms. */
|
|
16378
|
+
var QueryWindowShape = {
|
|
16379
|
+
key: string(),
|
|
16380
|
+
scope: string().optional(),
|
|
16381
|
+
from: number(),
|
|
16382
|
+
to: number(),
|
|
16383
|
+
resolution: union([DeviceHistoryResolutionSchema, literal("auto")]).default("auto"),
|
|
16384
|
+
maxPoints: number().int().positive().max(5e3).default(1e3)
|
|
16385
|
+
};
|
|
16386
|
+
var QueryResultSchema = object({
|
|
16387
|
+
resolution: DeviceHistoryResolutionSchema,
|
|
16388
|
+
series: array(QuerySeriesSchema).readonly(),
|
|
16389
|
+
truncated: boolean()
|
|
16390
|
+
});
|
|
16391
|
+
var TierStatusSchema = object({
|
|
16392
|
+
tier: DeviceHistoryResolutionSchema,
|
|
16393
|
+
/** `null` until the first background count answered. */
|
|
16394
|
+
rows: number().int().nullable(),
|
|
16395
|
+
/** `rows` times a fixed per-row estimate — approximate, labelled so. */
|
|
16396
|
+
approxBytes: number().nullable(),
|
|
16397
|
+
countedAt: number().nullable()
|
|
16398
|
+
});
|
|
16399
|
+
/** Operator/diagnostic view: rows per tier, last runs, refusals and drops since boot. */
|
|
16400
|
+
var DeviceHistoryStatusSchema = object({
|
|
16401
|
+
startedAt: number(),
|
|
16402
|
+
/** The store is declared, series loaded and the first reconcile has answered. */
|
|
16403
|
+
ready: boolean(),
|
|
16404
|
+
series: number().int(),
|
|
16405
|
+
metrics: number().int(),
|
|
16406
|
+
optedOutDevices: number().int(),
|
|
16407
|
+
tiers: array(TierStatusSchema).readonly(),
|
|
16408
|
+
capture: object({
|
|
16409
|
+
eventsSeen: number().int(),
|
|
16410
|
+
pointsEmitted: number().int(),
|
|
16411
|
+
pointsWritten: number().int(),
|
|
16412
|
+
pointsDropped: number().int(),
|
|
16413
|
+
bufferDepth: number().int(),
|
|
16414
|
+
trailingEmitted: number().int(),
|
|
16415
|
+
reconciledPoints: number().int(),
|
|
16416
|
+
reconcileRuns: number().int(),
|
|
16417
|
+
reconcileFailures: number().int(),
|
|
16418
|
+
lastReconcileAt: number().nullable(),
|
|
16419
|
+
lastFlushAt: number().nullable(),
|
|
16420
|
+
flushFailures: number().int(),
|
|
16421
|
+
skipped: record(string(), number().int())
|
|
16422
|
+
}),
|
|
16423
|
+
ingest: object({
|
|
16424
|
+
accepted: number().int(),
|
|
16425
|
+
refused: record(string(), number().int())
|
|
16426
|
+
}),
|
|
16427
|
+
rollup: object({
|
|
16428
|
+
last5mAt: number().nullable(),
|
|
16429
|
+
last1hAt: number().nullable(),
|
|
16430
|
+
last1dAt: number().nullable(),
|
|
16431
|
+
errors: number().int(),
|
|
16432
|
+
dirty5m: number().int(),
|
|
16433
|
+
dirty1h: number().int(),
|
|
16434
|
+
dirty1d: number().int()
|
|
16435
|
+
}),
|
|
16436
|
+
retention: object({
|
|
16437
|
+
lastRunAt: number().nullable(),
|
|
16438
|
+
deleted: record(string(), number().int()),
|
|
16439
|
+
purgedSeries: number().int()
|
|
16440
|
+
}),
|
|
16441
|
+
directory: object({
|
|
16442
|
+
devices: number().int(),
|
|
16443
|
+
lastRefreshAt: number().nullable()
|
|
16444
|
+
})
|
|
16445
|
+
});
|
|
16446
|
+
method(object({ deviceId: number().int() }), array(SeriesInfoSchema).readonly()), method(object({ nodeId: string().min(1) }), array(SeriesInfoSchema).readonly(), { auth: "admin" }), method(object({
|
|
16447
|
+
deviceId: number().int(),
|
|
16448
|
+
...QueryWindowShape
|
|
16449
|
+
}), QueryResultSchema), method(object({
|
|
16450
|
+
nodeId: string().min(1),
|
|
16451
|
+
...QueryWindowShape
|
|
16452
|
+
}), QueryResultSchema, { auth: "admin" }), method(object({
|
|
16453
|
+
name: string().regex(/^[a-z0-9-]+$/),
|
|
16454
|
+
subjectKind: _enum(["device", "node"]),
|
|
16455
|
+
kind: DeviceHistoryKindSchema,
|
|
16456
|
+
unit: string().optional(),
|
|
16457
|
+
displayName: string().min(1),
|
|
16458
|
+
ingest: _enum(["points", "buckets"])
|
|
16459
|
+
}), object({ key: string() }), {
|
|
16460
|
+
kind: "mutation",
|
|
16461
|
+
auth: "admin"
|
|
16462
|
+
}), method(object({ points: array(object({
|
|
16463
|
+
key: string(),
|
|
16464
|
+
subject: DeviceHistorySubjectSchema,
|
|
16465
|
+
scope: string().default(""),
|
|
16466
|
+
ts: number(),
|
|
16467
|
+
value: number()
|
|
16468
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16469
|
+
kind: "mutation",
|
|
16470
|
+
auth: "admin"
|
|
16471
|
+
}), method(object({ buckets: array(object({
|
|
16472
|
+
key: string(),
|
|
16473
|
+
subject: DeviceHistorySubjectSchema,
|
|
16474
|
+
scope: string().default(""),
|
|
16475
|
+
bucketStart: number(),
|
|
16476
|
+
samples: number().int().positive(),
|
|
16477
|
+
sum: number(),
|
|
16478
|
+
min: number(),
|
|
16479
|
+
max: number(),
|
|
16480
|
+
last: number().nullable(),
|
|
16481
|
+
lastTs: number().nullable()
|
|
16482
|
+
})).max(5e3) }), IngestResultSchema, {
|
|
16483
|
+
kind: "mutation",
|
|
16484
|
+
auth: "admin"
|
|
16485
|
+
}), method(object({ deviceId: number().int() }), object({ enabled: boolean() })), method(object({
|
|
16486
|
+
deviceId: number().int(),
|
|
16487
|
+
enabled: boolean()
|
|
16488
|
+
}), object({ enabled: boolean() }), {
|
|
16489
|
+
kind: "mutation",
|
|
16490
|
+
auth: "admin"
|
|
16491
|
+
}), method(object({}), DeviceHistoryStatusSchema, { auth: "admin" });
|
|
16171
16492
|
var DeviceCaStatusSchema = discriminatedUnion("state", [
|
|
16172
16493
|
object({ state: literal("absent") }),
|
|
16173
16494
|
object({
|
|
@@ -16285,6 +16606,9 @@ method(object({}), object({
|
|
|
16285
16606
|
}), {
|
|
16286
16607
|
kind: "mutation",
|
|
16287
16608
|
auth: "admin"
|
|
16609
|
+
}), method(object({}), object({ ok: literal(true) }), {
|
|
16610
|
+
kind: "mutation",
|
|
16611
|
+
auth: "admin"
|
|
16288
16612
|
}), method(object({
|
|
16289
16613
|
certPem: string().min(1),
|
|
16290
16614
|
caCertPem: string().min(1),
|
|
@@ -39050,7 +39374,13 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
39050
39374
|
* `beginExternalLink` offer exactly the redirect methods that set this,
|
|
39051
39375
|
* whatever their id. Absent / false — a login button only.
|
|
39052
39376
|
*/
|
|
39053
|
-
linkable: boolean().optional()
|
|
39377
|
+
linkable: boolean().optional(),
|
|
39378
|
+
/**
|
|
39379
|
+
* How a NATIVE app starts this method (D858): `{ kind: 'browser', startPath }`
|
|
39380
|
+
* when the route understands the app flow query (`app=1&code_challenge=…`),
|
|
39381
|
+
* `null`/absent when there is no app path - the app hides the method.
|
|
39382
|
+
*/
|
|
39383
|
+
app: AppLoginPathSchema.nullable().optional()
|
|
39054
39384
|
}),
|
|
39055
39385
|
object({
|
|
39056
39386
|
kind: literal("widget"),
|
|
@@ -39062,7 +39392,9 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
39062
39392
|
bundle: string(),
|
|
39063
39393
|
/** MF remote descriptor — `{ remoteName, exposedModule, componentKey }`. */
|
|
39064
39394
|
remote: WidgetRemoteSchema,
|
|
39065
|
-
stage: LoginStageEnum
|
|
39395
|
+
stage: LoginStageEnum,
|
|
39396
|
+
/** Widgets are web ceremonies: no native app path (D858). Absent reads as `null`. */
|
|
39397
|
+
app: AppLoginPathSchema.nullable().optional()
|
|
39066
39398
|
}),
|
|
39067
39399
|
object({
|
|
39068
39400
|
kind: literal("passkey"),
|
|
@@ -39074,7 +39406,9 @@ var LoginMethodContributionSchema = discriminatedUnion("kind", [
|
|
|
39074
39406
|
/** Effective WebAuthn RP ID (`resolveRpID()`) — the shell gates visibility on it. */
|
|
39075
39407
|
rpId: string(),
|
|
39076
39408
|
/** Effective expected origin (`resolveOrigin()`), null when unconfigured. */
|
|
39077
|
-
origin: string().nullable()
|
|
39409
|
+
origin: string().nullable(),
|
|
39410
|
+
/** Set by the hub for the primary arm; a second-factor passkey has no app path (D858). */
|
|
39411
|
+
app: AppLoginPathSchema.nullable().optional()
|
|
39078
39412
|
})
|
|
39079
39413
|
]);
|
|
39080
39414
|
var loginMethodCapability = {
|
|
@@ -39592,7 +39926,21 @@ var NetworkEndpointSchema = object({
|
|
|
39592
39926
|
url: string(),
|
|
39593
39927
|
hostname: string(),
|
|
39594
39928
|
port: number(),
|
|
39595
|
-
protocol: _enum(["http", "https"])
|
|
39929
|
+
protocol: _enum(["http", "https"]),
|
|
39930
|
+
/**
|
|
39931
|
+
* Whether this address survives a restart of its provider. `false` = it is
|
|
39932
|
+
* re-issued every time (a Quick tunnel's random `*.trycloudflare.com`); the
|
|
39933
|
+
* hub never selects such an address AUTOMATICALLY for a role (D860), though
|
|
39934
|
+
* it stays visible and an operator may still flag it. Absent = stable: every
|
|
39935
|
+
* provider except a Quick tunnel owns a name that does not change.
|
|
39936
|
+
*/
|
|
39937
|
+
stable: boolean().optional()
|
|
39938
|
+
});
|
|
39939
|
+
object({
|
|
39940
|
+
url: string(),
|
|
39941
|
+
/** Mirrors {@link NetworkEndpointSchema} `stable`; absent = stable. */
|
|
39942
|
+
stable: boolean().optional(),
|
|
39943
|
+
updated: boolean().optional()
|
|
39596
39944
|
});
|
|
39597
39945
|
var NetworkAccessStatusSchema = object({
|
|
39598
39946
|
connected: boolean(),
|
|
@@ -49631,7 +49979,20 @@ var SsoBridgeClaimsSchema = object({
|
|
|
49631
49979
|
* request to present the matching cookie — a login bridge is useless in
|
|
49632
49980
|
* any other browser.
|
|
49633
49981
|
*/
|
|
49634
|
-
browserBinding: string().optional()
|
|
49982
|
+
browserBinding: string().optional(),
|
|
49983
|
+
/**
|
|
49984
|
+
* The native app that started this sign-in (D858): its PKCE challenge,
|
|
49985
|
+
* `state`, purpose and allow-listed return URL, copied from the server-side
|
|
49986
|
+
* pending OIDC state. A bridge carrying it is finished ONLY at
|
|
49987
|
+
* `/api/auth/sso/finish-app` (which mints a handoff code, never a web
|
|
49988
|
+
* session); `/api/auth/sso/finish` refuses it.
|
|
49989
|
+
*/
|
|
49990
|
+
app: object({
|
|
49991
|
+
codeChallenge: string(),
|
|
49992
|
+
state: string(),
|
|
49993
|
+
purpose: _enum(["new-session", "step-up"]),
|
|
49994
|
+
redirect: string()
|
|
49995
|
+
}).optional()
|
|
49635
49996
|
});
|
|
49636
49997
|
method(object({
|
|
49637
49998
|
claims: SsoBridgeClaimsSchema,
|
|
@@ -51872,7 +52233,12 @@ var SearchResultSchema = object({
|
|
|
51872
52233
|
publishedAt: string(),
|
|
51873
52234
|
author: string(),
|
|
51874
52235
|
installed: boolean(),
|
|
51875
|
-
installedVersion: string().optional()
|
|
52236
|
+
installedVersion: string().optional(),
|
|
52237
|
+
/**
|
|
52238
|
+
* Capability names the package's addons declare (from its published
|
|
52239
|
+
* manifest). `null` = the registry lookup failed — unknown, never `[]` (D393).
|
|
52240
|
+
*/
|
|
52241
|
+
capabilities: array(string()).readonly().nullable()
|
|
51876
52242
|
});
|
|
51877
52243
|
var AutoUpdateSettingsSchema = object({
|
|
51878
52244
|
channel: ChannelSchema,
|
|
@@ -52034,7 +52400,11 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
|
|
|
52034
52400
|
}), method(object({ packageName: string().optional() }), PackageInstallationsSchema, { auth: "admin" }), method(_void(), ReloadPackagesResultSchema, {
|
|
52035
52401
|
kind: "mutation",
|
|
52036
52402
|
auth: "admin"
|
|
52037
|
-
}), method(object({
|
|
52403
|
+
}), method(object({
|
|
52404
|
+
query: string().optional(),
|
|
52405
|
+
/** Only packages whose addons declare this capability (unknown ones excluded). */
|
|
52406
|
+
capability: string().optional()
|
|
52407
|
+
}), array(SearchResultSchema)), method(object({ nodeId: string().optional() }), array(PackageUpdateSchema).readonly(), { auth: "admin" }), method(object({
|
|
52038
52408
|
name: string().min(1),
|
|
52039
52409
|
version: string().optional(),
|
|
52040
52410
|
nodeId: string().optional()
|
|
@@ -54442,7 +54812,13 @@ var ConnectionEndpointSchema = object({
|
|
|
54442
54812
|
* calls so the client can sort even if the cap returns a new
|
|
54443
54813
|
* ordering between polls.
|
|
54444
54814
|
*/
|
|
54445
|
-
priority: number()
|
|
54815
|
+
priority: number(),
|
|
54816
|
+
/**
|
|
54817
|
+
* `false` = the address changes on its own (a Quick tunnel, re-issued on
|
|
54818
|
+
* every respawn). Automatic role resolution skips it (D860); an explicit
|
|
54819
|
+
* operator flag still honours it. Absent = stable.
|
|
54820
|
+
*/
|
|
54821
|
+
stable: boolean().optional()
|
|
54446
54822
|
});
|
|
54447
54823
|
/**
|
|
54448
54824
|
* Where the advertised local port came from. Ordered most → least
|
|
@@ -55071,7 +55447,7 @@ var MotionOnMotionChangedDataSchema = object({
|
|
|
55071
55447
|
/** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
|
|
55072
55448
|
triggeredBy: MotionTriggeredBySchema.optional()
|
|
55073
55449
|
});
|
|
55074
|
-
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
|
|
55450
|
+
DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean()), DeviceType.Camera;
|
|
55075
55451
|
object({
|
|
55076
55452
|
enabled: boolean(),
|
|
55077
55453
|
/** Ms epoch of the last operator-driven change. */
|
|
@@ -62428,6 +62804,66 @@ Object.freeze({
|
|
|
62428
62804
|
addonId: null,
|
|
62429
62805
|
access: "create"
|
|
62430
62806
|
},
|
|
62807
|
+
"deviceHistory.declareSeries": {
|
|
62808
|
+
capName: "device-history",
|
|
62809
|
+
capScope: "system",
|
|
62810
|
+
addonId: null,
|
|
62811
|
+
access: "create"
|
|
62812
|
+
},
|
|
62813
|
+
"deviceHistory.getDeviceEnabled": {
|
|
62814
|
+
capName: "device-history",
|
|
62815
|
+
capScope: "system",
|
|
62816
|
+
addonId: null,
|
|
62817
|
+
access: "view"
|
|
62818
|
+
},
|
|
62819
|
+
"deviceHistory.getStatus": {
|
|
62820
|
+
capName: "device-history",
|
|
62821
|
+
capScope: "system",
|
|
62822
|
+
addonId: null,
|
|
62823
|
+
access: "view"
|
|
62824
|
+
},
|
|
62825
|
+
"deviceHistory.listNodeSeries": {
|
|
62826
|
+
capName: "device-history",
|
|
62827
|
+
capScope: "system",
|
|
62828
|
+
addonId: null,
|
|
62829
|
+
access: "view"
|
|
62830
|
+
},
|
|
62831
|
+
"deviceHistory.listSeries": {
|
|
62832
|
+
capName: "device-history",
|
|
62833
|
+
capScope: "system",
|
|
62834
|
+
addonId: null,
|
|
62835
|
+
access: "view"
|
|
62836
|
+
},
|
|
62837
|
+
"deviceHistory.query": {
|
|
62838
|
+
capName: "device-history",
|
|
62839
|
+
capScope: "system",
|
|
62840
|
+
addonId: null,
|
|
62841
|
+
access: "view"
|
|
62842
|
+
},
|
|
62843
|
+
"deviceHistory.queryNode": {
|
|
62844
|
+
capName: "device-history",
|
|
62845
|
+
capScope: "system",
|
|
62846
|
+
addonId: null,
|
|
62847
|
+
access: "view"
|
|
62848
|
+
},
|
|
62849
|
+
"deviceHistory.record": {
|
|
62850
|
+
capName: "device-history",
|
|
62851
|
+
capScope: "system",
|
|
62852
|
+
addonId: null,
|
|
62853
|
+
access: "create"
|
|
62854
|
+
},
|
|
62855
|
+
"deviceHistory.recordBuckets": {
|
|
62856
|
+
capName: "device-history",
|
|
62857
|
+
capScope: "system",
|
|
62858
|
+
addonId: null,
|
|
62859
|
+
access: "create"
|
|
62860
|
+
},
|
|
62861
|
+
"deviceHistory.setDeviceEnabled": {
|
|
62862
|
+
capName: "device-history",
|
|
62863
|
+
capScope: "system",
|
|
62864
|
+
addonId: null,
|
|
62865
|
+
access: "create"
|
|
62866
|
+
},
|
|
62431
62867
|
"deviceManager.addLocation": {
|
|
62432
62868
|
capName: "device-manager",
|
|
62433
62869
|
capScope: "system",
|
|
@@ -64492,6 +64928,12 @@ Object.freeze({
|
|
|
64492
64928
|
addonId: null,
|
|
64493
64929
|
access: "create"
|
|
64494
64930
|
},
|
|
64931
|
+
"nodeCertificates.forgetHub": {
|
|
64932
|
+
capName: "node-certificates",
|
|
64933
|
+
capScope: "system",
|
|
64934
|
+
addonId: null,
|
|
64935
|
+
access: "delete"
|
|
64936
|
+
},
|
|
64495
64937
|
"nodeCertificates.getCertificates": {
|
|
64496
64938
|
capName: "node-certificates",
|
|
64497
64939
|
capScope: "system",
|
|
@@ -69219,6 +69661,26 @@ Object.freeze({
|
|
|
69219
69661
|
form: "single",
|
|
69220
69662
|
optional: false
|
|
69221
69663
|
}],
|
|
69664
|
+
"deviceHistory.getDeviceEnabled": [{
|
|
69665
|
+
name: "deviceId",
|
|
69666
|
+
form: "single",
|
|
69667
|
+
optional: false
|
|
69668
|
+
}],
|
|
69669
|
+
"deviceHistory.listSeries": [{
|
|
69670
|
+
name: "deviceId",
|
|
69671
|
+
form: "single",
|
|
69672
|
+
optional: false
|
|
69673
|
+
}],
|
|
69674
|
+
"deviceHistory.query": [{
|
|
69675
|
+
name: "deviceId",
|
|
69676
|
+
form: "single",
|
|
69677
|
+
optional: false
|
|
69678
|
+
}],
|
|
69679
|
+
"deviceHistory.setDeviceEnabled": [{
|
|
69680
|
+
name: "deviceId",
|
|
69681
|
+
form: "single",
|
|
69682
|
+
optional: false
|
|
69683
|
+
}],
|
|
69222
69684
|
"deviceManager.adoptionRelease": [{
|
|
69223
69685
|
name: "camDeviceId",
|
|
69224
69686
|
form: "single",
|
|
@@ -71397,6 +71859,7 @@ Object.freeze({
|
|
|
71397
71859
|
"network-access": "ingress",
|
|
71398
71860
|
"smtp-provider": "email"
|
|
71399
71861
|
});
|
|
71862
|
+
DeviceType.Camera;
|
|
71400
71863
|
var G711_SCALE_CORRECTION_DB = {
|
|
71401
71864
|
PCMU: 20 * Math.log10(4),
|
|
71402
71865
|
PCMA: 20 * Math.log10(8)
|
|
@@ -72463,6 +72926,18 @@ DEFAULT_NATIVE_LEASE_SETTINGS.admission;
|
|
|
72463
72926
|
var MB = 1024 * 1024;
|
|
72464
72927
|
1024 * MB, 3072 * MB;
|
|
72465
72928
|
//#endregion
|
|
72929
|
+
Object.defineProperty(exports, "APP_FLOW_DEFAULT_REDIRECT", {
|
|
72930
|
+
enumerable: true,
|
|
72931
|
+
get: function() {
|
|
72932
|
+
return APP_FLOW_DEFAULT_REDIRECT;
|
|
72933
|
+
}
|
|
72934
|
+
});
|
|
72935
|
+
Object.defineProperty(exports, "APP_REFUSED_PATH", {
|
|
72936
|
+
enumerable: true,
|
|
72937
|
+
get: function() {
|
|
72938
|
+
return APP_REFUSED_PATH;
|
|
72939
|
+
}
|
|
72940
|
+
});
|
|
72466
72941
|
Object.defineProperty(exports, "BaseAddon", {
|
|
72467
72942
|
enumerable: true,
|
|
72468
72943
|
get: function() {
|
|
@@ -72529,6 +73004,12 @@ Object.defineProperty(exports, "advertisedHubOrigins", {
|
|
|
72529
73004
|
return advertisedHubOrigins;
|
|
72530
73005
|
}
|
|
72531
73006
|
});
|
|
73007
|
+
Object.defineProperty(exports, "appFlowLocation", {
|
|
73008
|
+
enumerable: true,
|
|
73009
|
+
get: function() {
|
|
73010
|
+
return appFlowLocation;
|
|
73011
|
+
}
|
|
73012
|
+
});
|
|
72532
73013
|
Object.defineProperty(exports, "array", {
|
|
72533
73014
|
enumerable: true,
|
|
72534
73015
|
get: function() {
|
|
@@ -72619,6 +73100,12 @@ Object.defineProperty(exports, "oidcConnectionsCapability", {
|
|
|
72619
73100
|
return oidcConnectionsCapability;
|
|
72620
73101
|
}
|
|
72621
73102
|
});
|
|
73103
|
+
Object.defineProperty(exports, "parseAppFlowRequest", {
|
|
73104
|
+
enumerable: true,
|
|
73105
|
+
get: function() {
|
|
73106
|
+
return parseAppFlowRequest;
|
|
73107
|
+
}
|
|
73108
|
+
});
|
|
72622
73109
|
Object.defineProperty(exports, "pickRequestOrigin", {
|
|
72623
73110
|
enumerable: true,
|
|
72624
73111
|
get: function() {
|