@camstack/core 0.1.28 → 0.1.30

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/index.js CHANGED
@@ -37,7 +37,7 @@ let node_vm = require("node:vm");
37
37
  node_vm = require_chunk.__toESM(node_vm);
38
38
  let node_os = require("node:os");
39
39
  node_os = require_chunk.__toESM(node_os);
40
- //#region ../types/dist/auth-records-wKlyGWdW.mjs
40
+ //#region ../types/dist/index-DVKPWMwv.mjs
41
41
  var MODEL_FORMATS = [
42
42
  "onnx",
43
43
  "coreml",
@@ -649,6 +649,7 @@ function method(input, output, options) {
649
649
  output,
650
650
  kind: options?.kind ?? "query",
651
651
  auth: options?.auth ?? "protected",
652
+ ...options?.access !== void 0 ? { access: options.access } : {},
652
653
  timeoutMs: options?.timeoutMs
653
654
  };
654
655
  }
@@ -2145,14 +2146,14 @@ method(zod.z.object({
2145
2146
  updatedAt: true
2146
2147
  }), StorageLocationSchema, {
2147
2148
  kind: "mutation",
2148
- auth: "superAdmin"
2149
+ auth: "admin"
2149
2150
  }), method(zod.z.object({ id: zod.z.string() }), zod.z.void(), {
2150
2151
  kind: "mutation",
2151
- auth: "superAdmin"
2152
+ auth: "admin"
2152
2153
  }), method(zod.z.object({ id: zod.z.string() }), zod.z.object({
2153
2154
  ok: zod.z.boolean(),
2154
2155
  error: zod.z.string().optional()
2155
- }), { auth: "superAdmin" }), method(zod.z.void(), zod.z.array(zod.z.object({
2156
+ }), { auth: "admin" }), method(zod.z.void(), zod.z.array(zod.z.object({
2156
2157
  providerId: zod.z.string(),
2157
2158
  displayName: zod.z.string(),
2158
2159
  supportedLocationTypes: zod.z.array(StorageLocationTypeSchema).readonly(),
@@ -2163,7 +2164,7 @@ method(zod.z.object({
2163
2164
  }), zod.z.object({
2164
2165
  ok: zod.z.boolean(),
2165
2166
  error: zod.z.string().optional()
2166
- }), { auth: "superAdmin" });
2167
+ }), { auth: "admin" });
2167
2168
  var ProviderInfoSchema = zod.z.object({
2168
2169
  providerId: zod.z.string().min(1),
2169
2170
  displayName: zod.z.string().min(1),
@@ -2201,7 +2202,7 @@ var ReadChunkInputSchema = zod.z.object({
2201
2202
  length: zod.z.number()
2202
2203
  });
2203
2204
  var EndDownloadInputSchema = zod.z.object({ downloadId: zod.z.string() });
2204
- method(zod.z.void(), ProviderInfoSchema), method(zod.z.object({ config: zod.z.record(zod.z.string(), zod.z.unknown()) }), TestLocationResultSchema, { auth: "superAdmin" }), method(zod.z.object({
2205
+ method(zod.z.void(), ProviderInfoSchema), method(zod.z.object({ config: zod.z.record(zod.z.string(), zod.z.unknown()) }), TestLocationResultSchema, { auth: "admin" }), method(zod.z.object({
2205
2206
  location: StorageLocationSchema,
2206
2207
  relativePath: zod.z.string()
2207
2208
  }), zod.z.string()), method(zod.z.object({
@@ -2302,18 +2303,18 @@ var LocationStatSchema = zod.z.object({
2302
2303
  fileCount: zod.z.number(),
2303
2304
  present: zod.z.boolean()
2304
2305
  });
2305
- method(zod.z.void(), zod.z.array(BackupDestinationInfoSchema).readonly(), { auth: "superAdmin" }), method(zod.z.object({
2306
+ method(zod.z.void(), zod.z.array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }), method(zod.z.object({
2306
2307
  /** Subset of registered `backup-destination` addon ids to write to. */
2307
2308
  destinations: zod.z.array(zod.z.string()).optional(),
2308
2309
  locations: zod.z.array(zod.z.string()).optional(),
2309
2310
  label: zod.z.string().optional()
2310
2311
  }).optional(), zod.z.array(BackupEntrySchema).readonly(), {
2311
2312
  kind: "mutation",
2312
- auth: "superAdmin"
2313
- }), method(zod.z.void(), zod.z.array(BackupEntrySchema).readonly(), { auth: "superAdmin" }), method(zod.z.void(), zod.z.array(LocationStatSchema).readonly(), { auth: "superAdmin" }), method(zod.z.object({
2313
+ auth: "admin"
2314
+ }), method(zod.z.void(), zod.z.array(BackupEntrySchema).readonly(), { auth: "admin" }), method(zod.z.void(), zod.z.array(LocationStatSchema).readonly(), { auth: "admin" }), method(zod.z.object({
2314
2315
  destinationId: zod.z.string(),
2315
2316
  backupId: zod.z.string()
2316
- }), ArchiveManifestSchema.nullable(), { auth: "superAdmin" }), method(zod.z.object({
2317
+ }), ArchiveManifestSchema.nullable(), { auth: "admin" }), method(zod.z.object({
2317
2318
  destinationId: zod.z.string(),
2318
2319
  backupId: zod.z.string(),
2319
2320
  /**
@@ -2326,14 +2327,14 @@ method(zod.z.void(), zod.z.array(BackupDestinationInfoSchema).readonly(), { auth
2326
2327
  locations: zod.z.array(zod.z.string()).optional()
2327
2328
  }), zod.z.void(), {
2328
2329
  kind: "mutation",
2329
- auth: "superAdmin"
2330
+ auth: "admin"
2330
2331
  }), method(zod.z.object({
2331
2332
  destinationId: zod.z.string(),
2332
2333
  backupId: zod.z.string()
2333
2334
  }), zod.z.void(), {
2334
2335
  kind: "mutation",
2335
- auth: "superAdmin"
2336
- }), method(zod.z.object({ destinationId: zod.z.string() }), zod.z.array(BackupArchiveEntrySchema).readonly(), { auth: "superAdmin" }), method(zod.z.object({
2336
+ auth: "admin"
2337
+ }), method(zod.z.object({ destinationId: zod.z.string() }), zod.z.array(BackupArchiveEntrySchema).readonly(), { auth: "admin" }), method(zod.z.object({
2337
2338
  locationId: zod.z.string(),
2338
2339
  enabled: zod.z.boolean(),
2339
2340
  retentionCount: zod.z.number().int().min(1).max(1e3),
@@ -2347,7 +2348,7 @@ method(zod.z.void(), zod.z.array(BackupDestinationInfoSchema).readonly(), { auth
2347
2348
  cron: zod.z.string().optional()
2348
2349
  }), zod.z.void(), {
2349
2350
  kind: "mutation",
2350
- auth: "superAdmin"
2351
+ auth: "admin"
2351
2352
  }), method(zod.z.object({
2352
2353
  cron: zod.z.string(),
2353
2354
  count: zod.z.number().int().min(1).max(20).optional()
@@ -3327,7 +3328,7 @@ method(zod.z.void(), zod.z.array(AuthProviderInfoSchema).readonly()), method(zod
3327
3328
  enabled: zod.z.boolean()
3328
3329
  }), zod.z.object({ success: zod.z.literal(true) }), {
3329
3330
  kind: "mutation",
3330
- auth: "superAdmin"
3331
+ auth: "admin"
3331
3332
  });
3332
3333
  var NetworkEndpointSchema = zod.z.object({
3333
3334
  url: zod.z.string(),
@@ -3363,10 +3364,10 @@ var RemoteAccessProviderInfoSchema = zod.z.object({
3363
3364
  });
3364
3365
  method(zod.z.void(), zod.z.array(RemoteAccessProviderInfoSchema).readonly()), method(zod.z.object({ addonId: zod.z.string() }), RemoteAccessEndpointSchema, {
3365
3366
  kind: "mutation",
3366
- auth: "superAdmin"
3367
+ auth: "admin"
3367
3368
  }), method(zod.z.object({ addonId: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), {
3368
3369
  kind: "mutation",
3369
- auth: "superAdmin"
3370
+ auth: "admin"
3370
3371
  });
3371
3372
  var TurnServerSchema = zod.z.object({
3372
3373
  /** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
@@ -3400,7 +3401,7 @@ method(zod.z.void(), zod.z.array(TurnProviderInfoSchema).readonly()), method(zod
3400
3401
  enabled: zod.z.boolean()
3401
3402
  }), zod.z.object({ success: zod.z.literal(true) }), {
3402
3403
  kind: "mutation",
3403
- auth: "superAdmin"
3404
+ auth: "admin"
3404
3405
  });
3405
3406
  var SnapshotImageSchema = zod.z.object({
3406
3407
  base64: zod.z.string(),
@@ -4499,39 +4500,91 @@ method(zod.z.void(), zod.z.array(MeshProviderInfoSchema).readonly()), method(zod
4499
4500
  authKey: zod.z.string().min(8),
4500
4501
  hostname: zod.z.string().optional()
4501
4502
  }), zod.z.object({ joined: zod.z.literal(true) }), { kind: "mutation" }), method(zod.z.object({ addonId: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), { kind: "mutation" });
4502
- var UserRoleSchema$1 = zod.z.enum([
4503
- "super_admin",
4503
+ var UserRoleSchema = zod.z.enum([
4504
4504
  "admin",
4505
4505
  "viewer",
4506
4506
  "agent",
4507
4507
  "scoped"
4508
4508
  ]);
4509
+ var AllowedProviderSchema = zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]);
4510
+ var AllowedDevicesSchema = zod.z.record(zod.z.string(), zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]));
4511
+ var MethodAccessSchema = zod.z.enum([
4512
+ "view",
4513
+ "create",
4514
+ "delete"
4515
+ ]);
4516
+ var TokenScopeSchema = zod.z.object({
4517
+ type: zod.z.enum(["addon", "capability"]),
4518
+ target: zod.z.string(),
4519
+ access: zod.z.array(MethodAccessSchema).min(1)
4520
+ });
4521
+ zod.z.object({
4522
+ id: zod.z.string(),
4523
+ username: zod.z.string(),
4524
+ passwordHash: zod.z.string(),
4525
+ role: UserRoleSchema,
4526
+ allowedProviders: AllowedProviderSchema,
4527
+ allowedDevices: AllowedDevicesSchema,
4528
+ /**
4529
+ * Scopes granted to this user. Admins bypass; their `scopes` is ignored.
4530
+ * Non-admins (`viewer`, `agent`, `scoped`) without scopes are locked out
4531
+ * of every protected call.
4532
+ */
4533
+ scopes: zod.z.array(TokenScopeSchema).default([]),
4534
+ createdAt: zod.z.number(),
4535
+ updatedAt: zod.z.number()
4536
+ });
4537
+ zod.z.object({
4538
+ id: zod.z.string(),
4539
+ label: zod.z.string(),
4540
+ role: UserRoleSchema,
4541
+ allowedProviders: AllowedProviderSchema,
4542
+ allowedDevices: AllowedDevicesSchema,
4543
+ tokenHash: zod.z.string(),
4544
+ tokenPrefix: zod.z.string(),
4545
+ createdAt: zod.z.number(),
4546
+ lastUsedAt: zod.z.number().optional()
4547
+ });
4548
+ zod.z.object({
4549
+ id: zod.z.string(),
4550
+ userId: zod.z.string(),
4551
+ name: zod.z.string(),
4552
+ tokenHash: zod.z.string(),
4553
+ tokenPrefix: zod.z.string(),
4554
+ scopes: zod.z.array(TokenScopeSchema),
4555
+ expiresAt: zod.z.number().nullish(),
4556
+ lastUsedAt: zod.z.number().nullish(),
4557
+ createdAt: zod.z.number()
4558
+ });
4509
4559
  var UserSummarySchema = zod.z.object({
4510
4560
  id: zod.z.string(),
4511
4561
  username: zod.z.string(),
4512
- role: UserRoleSchema$1,
4562
+ role: UserRoleSchema,
4513
4563
  allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]),
4514
4564
  allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])),
4565
+ scopes: zod.z.array(TokenScopeSchema).default([]),
4515
4566
  createdAt: zod.z.number(),
4516
4567
  updatedAt: zod.z.number()
4517
4568
  });
4518
4569
  var CreateUserInputSchema = zod.z.object({
4519
4570
  username: zod.z.string(),
4520
4571
  password: zod.z.string().min(6),
4521
- role: UserRoleSchema$1,
4572
+ role: UserRoleSchema,
4522
4573
  allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]).optional(),
4523
- allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional()
4574
+ allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional(),
4575
+ scopes: zod.z.array(TokenScopeSchema).optional()
4524
4576
  });
4525
4577
  var UpdateUserInputSchema = zod.z.object({
4526
4578
  id: zod.z.string(),
4527
- role: UserRoleSchema$1.optional(),
4579
+ role: UserRoleSchema.optional(),
4528
4580
  allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]).optional(),
4529
- allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional()
4581
+ allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional(),
4582
+ scopes: zod.z.array(TokenScopeSchema).optional()
4530
4583
  });
4531
4584
  var ApiKeySummarySchema = zod.z.object({
4532
4585
  id: zod.z.string(),
4533
4586
  label: zod.z.string(),
4534
- role: UserRoleSchema$1,
4587
+ role: UserRoleSchema,
4535
4588
  allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]).optional(),
4536
4589
  allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional(),
4537
4590
  tokenPrefix: zod.z.string(),
@@ -4540,7 +4593,7 @@ var ApiKeySummarySchema = zod.z.object({
4540
4593
  });
4541
4594
  var CreateApiKeyInputSchema = zod.z.object({
4542
4595
  label: zod.z.string(),
4543
- role: UserRoleSchema$1,
4596
+ role: UserRoleSchema,
4544
4597
  allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]).optional(),
4545
4598
  allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional()
4546
4599
  });
@@ -4548,20 +4601,12 @@ var CreateApiKeyResultSchema = zod.z.object({
4548
4601
  token: zod.z.string(),
4549
4602
  record: ApiKeySummarySchema
4550
4603
  });
4551
- var TokenScopeSchema$1 = zod.z.object({
4552
- type: zod.z.enum([
4553
- "addon",
4554
- "route-prefix",
4555
- "capability"
4556
- ]),
4557
- target: zod.z.string()
4558
- });
4559
4604
  var ScopedTokenSummarySchema = zod.z.object({
4560
4605
  id: zod.z.string(),
4561
4606
  userId: zod.z.string(),
4562
4607
  name: zod.z.string(),
4563
4608
  tokenPrefix: zod.z.string(),
4564
- scopes: zod.z.array(TokenScopeSchema$1),
4609
+ scopes: zod.z.array(TokenScopeSchema),
4565
4610
  expiresAt: zod.z.number().nullish(),
4566
4611
  lastUsedAt: zod.z.number().nullish(),
4567
4612
  createdAt: zod.z.number()
@@ -4569,7 +4614,7 @@ var ScopedTokenSummarySchema = zod.z.object({
4569
4614
  var CreateScopedTokenInputSchema = zod.z.object({
4570
4615
  userId: zod.z.string(),
4571
4616
  name: zod.z.string(),
4572
- scopes: zod.z.array(TokenScopeSchema$1),
4617
+ scopes: zod.z.array(TokenScopeSchema),
4573
4618
  expiresAt: zod.z.number().optional()
4574
4619
  });
4575
4620
  var CreateScopedTokenResultSchema = zod.z.object({
@@ -4578,19 +4623,25 @@ var CreateScopedTokenResultSchema = zod.z.object({
4578
4623
  });
4579
4624
  method(zod.z.void(), zod.z.array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
4580
4625
  kind: "mutation",
4581
- auth: "superAdmin"
4626
+ auth: "admin"
4582
4627
  }), method(UpdateUserInputSchema, zod.z.object({ success: zod.z.literal(true) }), {
4583
4628
  kind: "mutation",
4584
- auth: "superAdmin"
4629
+ auth: "admin"
4585
4630
  }), method(zod.z.object({ id: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), {
4586
4631
  kind: "mutation",
4587
- auth: "superAdmin"
4632
+ auth: "admin"
4588
4633
  }), method(zod.z.object({
4589
4634
  id: zod.z.string(),
4590
4635
  newPassword: zod.z.string().min(6)
4591
4636
  }), zod.z.object({ success: zod.z.literal(true) }), {
4592
4637
  kind: "mutation",
4593
- auth: "superAdmin"
4638
+ auth: "admin"
4639
+ }), method(zod.z.object({
4640
+ userId: zod.z.string(),
4641
+ scopes: zod.z.array(TokenScopeSchema)
4642
+ }), zod.z.object({ success: zod.z.literal(true) }), {
4643
+ kind: "mutation",
4644
+ auth: "admin"
4594
4645
  }), method(zod.z.object({
4595
4646
  username: zod.z.string(),
4596
4647
  password: zod.z.string()
@@ -4630,10 +4681,10 @@ var NetworkAddressSchema = zod.z.object({
4630
4681
  });
4631
4682
  method(zod.z.void(), FeatureManifestSchema), method(zod.z.void(), HealthStatusSchema), method(zod.z.void(), FeatureManifestSchema), method(zod.z.void(), zod.z.array(NetworkAddressSchema).readonly()), method(zod.z.void(), zod.z.unknown().nullable(), { auth: "admin" }), method(zod.z.record(zod.z.string(), zod.z.unknown()), zod.z.null(), {
4632
4683
  kind: "mutation",
4633
- auth: "superAdmin"
4684
+ auth: "admin"
4634
4685
  }), method(zod.z.void(), zod.z.void(), {
4635
4686
  kind: "mutation",
4636
- auth: "superAdmin"
4687
+ auth: "admin"
4637
4688
  });
4638
4689
  var StreamNetworkStatsSchema = zod.z.object({
4639
4690
  nominalBitrateKbps: zod.z.number(),
@@ -4743,37 +4794,37 @@ var RenameNodeResultSchema = zod.z.object({
4743
4794
  });
4744
4795
  method(zod.z.void(), zod.z.array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
4745
4796
  kind: "mutation",
4746
- auth: "superAdmin"
4797
+ auth: "admin"
4747
4798
  }), method(NodeAddonInputSchema, SuccessSchema, {
4748
4799
  kind: "mutation",
4749
- auth: "superAdmin"
4800
+ auth: "admin"
4750
4801
  }), method(NodeAddonInputSchema, SuccessSchema, {
4751
4802
  kind: "mutation",
4752
- auth: "superAdmin"
4803
+ auth: "admin"
4753
4804
  }), method(zod.z.object({
4754
4805
  nodeId: zod.z.string(),
4755
4806
  processName: zod.z.string()
4756
4807
  }), RestartProcessResultSchema, {
4757
4808
  kind: "mutation",
4758
- auth: "superAdmin"
4809
+ auth: "admin"
4759
4810
  }), method(zod.z.object({ nodeId: zod.z.string() }), RestartNodeResultSchema, {
4760
4811
  kind: "mutation",
4761
- auth: "superAdmin"
4812
+ auth: "admin"
4762
4813
  }), method(zod.z.object({ nodeId: zod.z.string() }), SuccessSchema, {
4763
4814
  kind: "mutation",
4764
- auth: "superAdmin"
4815
+ auth: "admin"
4765
4816
  }), method(zod.z.object({
4766
4817
  nodeId: zod.z.string(),
4767
4818
  name: zod.z.string().min(1).max(64)
4768
4819
  }), RenameNodeResultSchema, {
4769
4820
  kind: "mutation",
4770
- auth: "superAdmin"
4771
- }), method(zod.z.void(), zod.z.record(zod.z.string(), ClusterAddonStatusEntrySchema), { auth: "superAdmin" }), method(zod.z.object({
4821
+ auth: "admin"
4822
+ }), method(zod.z.void(), zod.z.record(zod.z.string(), ClusterAddonStatusEntrySchema), { auth: "admin" }), method(zod.z.object({
4772
4823
  nodeId: zod.z.string(),
4773
4824
  level: zod.z.string()
4774
4825
  }), SuccessSchema, {
4775
4826
  kind: "mutation",
4776
- auth: "superAdmin"
4827
+ auth: "admin"
4777
4828
  }), method(zod.z.object({
4778
4829
  nodeId: zod.z.string(),
4779
4830
  addonId: zod.z.string(),
@@ -4781,7 +4832,7 @@ method(zod.z.void(), zod.z.array(TopologyNodeSchema).readonly(), { auth: "admin"
4781
4832
  params: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
4782
4833
  }), zod.z.unknown(), {
4783
4834
  kind: "mutation",
4784
- auth: "superAdmin"
4835
+ auth: "admin"
4785
4836
  });
4786
4837
  var IntegrationWithStateSchema = zod.z.object({
4787
4838
  id: zod.z.string(),
@@ -4843,16 +4894,16 @@ method(zod.z.void(), zod.z.array(IntegrationWithStateSchema)), method(zod.z.obje
4843
4894
  auth: "admin"
4844
4895
  }), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
4845
4896
  kind: "mutation",
4846
- auth: "superAdmin"
4897
+ auth: "admin"
4847
4898
  }), method(zod.z.object({ id: zod.z.string() }), DeleteIntegrationResultSchema, {
4848
4899
  kind: "mutation",
4849
- auth: "superAdmin"
4900
+ auth: "admin"
4850
4901
  }), method(zod.z.object({ id: zod.z.string() }), zod.z.record(zod.z.string(), zod.z.unknown()), { auth: "admin" }), method(zod.z.object({
4851
4902
  id: zod.z.string(),
4852
4903
  settings: zod.z.record(zod.z.string(), zod.z.unknown())
4853
4904
  }), zod.z.object({ success: zod.z.boolean() }), {
4854
4905
  kind: "mutation",
4855
- auth: "superAdmin"
4906
+ auth: "admin"
4856
4907
  }), method(zod.z.void(), zod.z.array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(zod.z.object({
4857
4908
  addonId: zod.z.string(),
4858
4909
  settings: zod.z.record(zod.z.string(), zod.z.unknown())
@@ -4999,13 +5050,13 @@ method(zod.z.void(), zod.z.array(AddonListItemSchema).readonly()), method(zod.z.
4999
5050
  version: zod.z.string().optional()
5000
5051
  }), InstallPackageResultSchema, {
5001
5052
  kind: "mutation",
5002
- auth: "superAdmin"
5053
+ auth: "admin"
5003
5054
  }), method(zod.z.object({ packageName: zod.z.string() }), InstallPackageResultSchema, {
5004
5055
  kind: "mutation",
5005
5056
  auth: "admin"
5006
5057
  }), method(zod.z.void(), zod.z.boolean()), method(zod.z.void(), zod.z.array(zod.z.unknown()).readonly()), method(zod.z.object({ packageName: zod.z.string() }), zod.z.unknown(), {
5007
5058
  kind: "mutation",
5008
- auth: "superAdmin"
5059
+ auth: "admin"
5009
5060
  }), method(zod.z.void(), ReloadPackagesResultSchema, {
5010
5061
  kind: "mutation",
5011
5062
  auth: "admin"
@@ -5014,28 +5065,28 @@ method(zod.z.void(), zod.z.array(AddonListItemSchema).readonly()), method(zod.z.
5014
5065
  version: zod.z.string().optional()
5015
5066
  }), zod.z.unknown(), {
5016
5067
  kind: "mutation",
5017
- auth: "superAdmin"
5068
+ auth: "admin"
5018
5069
  }), method(zod.z.object({ name: zod.z.string().min(1) }), zod.z.object({ rolledBackTo: zod.z.string().nullable() }), {
5019
5070
  kind: "mutation",
5020
- auth: "superAdmin"
5071
+ auth: "admin"
5021
5072
  }), method(zod.z.void(), zod.z.unknown(), {
5022
5073
  kind: "mutation",
5023
5074
  auth: "admin"
5024
5075
  }), method(zod.z.object({ confirm: zod.z.literal(true) }), zod.z.unknown(), {
5025
5076
  kind: "mutation",
5026
- auth: "superAdmin"
5077
+ auth: "admin"
5027
5078
  }), method(zod.z.object({ name: zod.z.string() }), zod.z.array(PackageVersionInfoSchema).readonly()), method(zod.z.object({ addonId: zod.z.string() }), RestartAddonResultSchema, {
5028
5079
  kind: "mutation",
5029
- auth: "superAdmin"
5080
+ auth: "admin"
5030
5081
  }), method(zod.z.object({ packageName: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), {
5031
5082
  kind: "mutation",
5032
- auth: "superAdmin"
5083
+ auth: "admin"
5033
5084
  }), method(zod.z.void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(zod.z.object({
5034
5085
  channel: ChannelSchema,
5035
5086
  intervalSeconds: zod.z.number().min(300).max(86400).optional()
5036
5087
  }), zod.z.unknown(), {
5037
5088
  kind: "mutation",
5038
- auth: "superAdmin"
5089
+ auth: "admin"
5039
5090
  }), method(zod.z.object({ addonId: zod.z.string() }), AddonAutoUpdateSchema, { auth: "admin" }), method(zod.z.object({
5040
5091
  addonId: zod.z.string(),
5041
5092
  channel: ChannelWithInheritSchema
@@ -5044,60 +5095,11 @@ method(zod.z.void(), zod.z.array(AddonListItemSchema).readonly()), method(zod.z.
5044
5095
  auth: "admin"
5045
5096
  }), method(zod.z.object({ channel: ChannelSchema }), zod.z.object({ success: zod.z.literal(true) }), {
5046
5097
  kind: "mutation",
5047
- auth: "superAdmin"
5098
+ auth: "admin"
5048
5099
  }), method(CustomActionInputSchema, zod.z.unknown(), { kind: "mutation" }), method(zod.z.object({
5049
5100
  addonId: zod.z.string(),
5050
5101
  level: LogLevelSchema.optional()
5051
5102
  }), LogStreamEntrySchema, { kind: "subscription" });
5052
- var UserRoleSchema = zod.z.enum([
5053
- "super_admin",
5054
- "admin",
5055
- "viewer",
5056
- "agent",
5057
- "scoped"
5058
- ]);
5059
- var AllowedProviderSchema = zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]);
5060
- var AllowedDevicesSchema = zod.z.record(zod.z.string(), zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]));
5061
- zod.z.object({
5062
- id: zod.z.string(),
5063
- username: zod.z.string(),
5064
- passwordHash: zod.z.string(),
5065
- role: UserRoleSchema,
5066
- allowedProviders: AllowedProviderSchema,
5067
- allowedDevices: AllowedDevicesSchema,
5068
- createdAt: zod.z.number(),
5069
- updatedAt: zod.z.number()
5070
- });
5071
- zod.z.object({
5072
- id: zod.z.string(),
5073
- label: zod.z.string(),
5074
- role: UserRoleSchema,
5075
- allowedProviders: AllowedProviderSchema,
5076
- allowedDevices: AllowedDevicesSchema,
5077
- tokenHash: zod.z.string(),
5078
- tokenPrefix: zod.z.string(),
5079
- createdAt: zod.z.number(),
5080
- lastUsedAt: zod.z.number().optional()
5081
- });
5082
- var TokenScopeSchema = zod.z.object({
5083
- type: zod.z.enum([
5084
- "addon",
5085
- "route-prefix",
5086
- "capability"
5087
- ]),
5088
- target: zod.z.string()
5089
- });
5090
- zod.z.object({
5091
- id: zod.z.string(),
5092
- userId: zod.z.string(),
5093
- name: zod.z.string(),
5094
- tokenHash: zod.z.string(),
5095
- tokenPrefix: zod.z.string(),
5096
- scopes: zod.z.array(TokenScopeSchema),
5097
- expiresAt: zod.z.number().nullish(),
5098
- lastUsedAt: zod.z.number().nullish(),
5099
- createdAt: zod.z.number()
5100
- });
5101
5103
  //#endregion
5102
5104
  //#region ../types/dist/node.mjs
5103
5105
  function getPlatformInfo() {