@camstack/types 0.1.19 → 0.1.21
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/{auth-records-BsSRou-O.js → auth-records-BPN2YvK2.js} +15 -7
- package/dist/{auth-records-BsSRou-O.js.map → auth-records-BPN2YvK2.js.map} +1 -1
- package/dist/{auth-records-Bq2XO-Mg.mjs → auth-records-Bsjs9Xri.mjs} +15 -7
- package/dist/{auth-records-Bq2XO-Mg.mjs.map → auth-records-Bsjs9Xri.mjs.map} +1 -1
- package/dist/capabilities/addons.cap.d.ts.map +1 -1
- package/dist/capabilities/user-management.cap.d.ts +27 -10
- package/dist/capabilities/user-management.cap.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +14 -12
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/schemas/auth-records.d.ts +3 -0
- package/dist/schemas/auth-records.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7209,7 +7209,7 @@ const meshOrchestratorCapability = {
|
|
|
7209
7209
|
)
|
|
7210
7210
|
}
|
|
7211
7211
|
};
|
|
7212
|
-
const UserRoleSchema$1 = z.enum(["super_admin", "admin", "viewer", "agent"]);
|
|
7212
|
+
const UserRoleSchema$1 = z.enum(["super_admin", "admin", "viewer", "agent", "scoped"]);
|
|
7213
7213
|
const UserSummarySchema = z.object({
|
|
7214
7214
|
id: z.string(),
|
|
7215
7215
|
username: z.string(),
|
|
@@ -7262,11 +7262,17 @@ const ScopedTokenSummarySchema = z.object({
|
|
|
7262
7262
|
name: z.string(),
|
|
7263
7263
|
tokenPrefix: z.string(),
|
|
7264
7264
|
scopes: z.array(TokenScopeSchema$1),
|
|
7265
|
-
|
|
7266
|
-
|
|
7265
|
+
// Mirror the storage schema: `.nullish()` accepts the SQLite-native
|
|
7266
|
+
// `null` for absent timestamps as well as in-memory `undefined`.
|
|
7267
|
+
expiresAt: z.number().nullish(),
|
|
7268
|
+
lastUsedAt: z.number().nullish(),
|
|
7267
7269
|
createdAt: z.number()
|
|
7268
7270
|
});
|
|
7269
7271
|
const CreateScopedTokenInputSchema = z.object({
|
|
7272
|
+
// The owner the token is issued on behalf of. `adminProcedure` gates
|
|
7273
|
+
// this call so an admin can mint tokens for any user; the CLI passes
|
|
7274
|
+
// its own logged-in `user.id` here.
|
|
7275
|
+
userId: z.string(),
|
|
7270
7276
|
name: z.string(),
|
|
7271
7277
|
scopes: z.array(TokenScopeSchema$1),
|
|
7272
7278
|
expiresAt: z.number().optional()
|
|
@@ -7771,14 +7777,16 @@ const addonsCapability = {
|
|
|
7771
7777
|
// ── Listing ──────────────────────────────────────────────────────
|
|
7772
7778
|
list: method(z.void(), z.array(AddonListItemSchema).readonly()),
|
|
7773
7779
|
// ── Logs (query) ────────────────────────────────────────────────
|
|
7780
|
+
// Default auth (`protected`): authenticated users — including scoped
|
|
7781
|
+
// tokens with the right route-prefix scope. Reading logs isn't an
|
|
7782
|
+
// administrative action; install/restart/uninstall stay admin-only.
|
|
7774
7783
|
getLogs: method(
|
|
7775
7784
|
z.object({
|
|
7776
7785
|
addonId: z.string(),
|
|
7777
7786
|
limit: z.number().min(1).max(500).default(100),
|
|
7778
7787
|
level: LogLevelSchema.optional()
|
|
7779
7788
|
}),
|
|
7780
|
-
z.array(LogQueryEntrySchema)
|
|
7781
|
-
{ auth: "admin" }
|
|
7789
|
+
z.array(LogQueryEntrySchema)
|
|
7782
7790
|
),
|
|
7783
7791
|
// ── Packages ────────────────────────────────────────────────────
|
|
7784
7792
|
listPackages: method(z.void(), z.array(InstalledPackageSchema).readonly()),
|
|
@@ -7923,7 +7931,7 @@ const PIPELINE_OWNER_CAPABILITY_NAMES = [
|
|
|
7923
7931
|
"pipeline-orchestrator",
|
|
7924
7932
|
"pipeline-runner"
|
|
7925
7933
|
];
|
|
7926
|
-
const UserRoleSchema = z.enum(["super_admin", "admin", "viewer", "agent"]);
|
|
7934
|
+
const UserRoleSchema = z.enum(["super_admin", "admin", "viewer", "agent", "scoped"]);
|
|
7927
7935
|
const AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
|
|
7928
7936
|
const AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
|
|
7929
7937
|
const UserRecordSchema = z.object({
|
|
@@ -8304,4 +8312,4 @@ export {
|
|
|
8304
8312
|
addonsCapability as y,
|
|
8305
8313
|
zonesCapability as z
|
|
8306
8314
|
};
|
|
8307
|
-
//# sourceMappingURL=auth-records-
|
|
8315
|
+
//# sourceMappingURL=auth-records-Bsjs9Xri.mjs.map
|