@camstack/core 0.1.29 → 0.1.31
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/scoped-token-manager.d.ts +8 -1
- package/dist/auth/scoped-token-manager.d.ts.map +1 -1
- package/dist/auth/user-manager.d.ts +3 -2
- package/dist/auth/user-manager.d.ts.map +1 -1
- package/dist/builtins/local-auth/local-auth.addon.d.ts +6 -0
- package/dist/builtins/local-auth/local-auth.addon.d.ts.map +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +46 -5
- package/dist/builtins/local-auth/local-auth.addon.js.map +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +46 -5
- package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -1
- package/dist/index.js +116 -114
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +116 -114
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31,7 +31,7 @@ import { promisify } from "node:util";
|
|
|
31
31
|
import { errMsg, parseJsonObject } from "@camstack/types";
|
|
32
32
|
import * as vm from "node:vm";
|
|
33
33
|
import * as os from "node:os";
|
|
34
|
-
//#region ../types/dist/
|
|
34
|
+
//#region ../types/dist/index-DVKPWMwv.mjs
|
|
35
35
|
var MODEL_FORMATS = [
|
|
36
36
|
"onnx",
|
|
37
37
|
"coreml",
|
|
@@ -643,6 +643,7 @@ function method(input, output, options) {
|
|
|
643
643
|
output,
|
|
644
644
|
kind: options?.kind ?? "query",
|
|
645
645
|
auth: options?.auth ?? "protected",
|
|
646
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
646
647
|
timeoutMs: options?.timeoutMs
|
|
647
648
|
};
|
|
648
649
|
}
|
|
@@ -2139,14 +2140,14 @@ method(z.object({
|
|
|
2139
2140
|
updatedAt: true
|
|
2140
2141
|
}), StorageLocationSchema, {
|
|
2141
2142
|
kind: "mutation",
|
|
2142
|
-
auth: "
|
|
2143
|
+
auth: "admin"
|
|
2143
2144
|
}), method(z.object({ id: z.string() }), z.void(), {
|
|
2144
2145
|
kind: "mutation",
|
|
2145
|
-
auth: "
|
|
2146
|
+
auth: "admin"
|
|
2146
2147
|
}), method(z.object({ id: z.string() }), z.object({
|
|
2147
2148
|
ok: z.boolean(),
|
|
2148
2149
|
error: z.string().optional()
|
|
2149
|
-
}), { auth: "
|
|
2150
|
+
}), { auth: "admin" }), method(z.void(), z.array(z.object({
|
|
2150
2151
|
providerId: z.string(),
|
|
2151
2152
|
displayName: z.string(),
|
|
2152
2153
|
supportedLocationTypes: z.array(StorageLocationTypeSchema$1).readonly(),
|
|
@@ -2157,7 +2158,7 @@ method(z.object({
|
|
|
2157
2158
|
}), z.object({
|
|
2158
2159
|
ok: z.boolean(),
|
|
2159
2160
|
error: z.string().optional()
|
|
2160
|
-
}), { auth: "
|
|
2161
|
+
}), { auth: "admin" });
|
|
2161
2162
|
var ProviderInfoSchema = z.object({
|
|
2162
2163
|
providerId: z.string().min(1),
|
|
2163
2164
|
displayName: z.string().min(1),
|
|
@@ -2195,7 +2196,7 @@ var ReadChunkInputSchema = z.object({
|
|
|
2195
2196
|
length: z.number()
|
|
2196
2197
|
});
|
|
2197
2198
|
var EndDownloadInputSchema = z.object({ downloadId: z.string() });
|
|
2198
|
-
method(z.void(), ProviderInfoSchema), method(z.object({ config: z.record(z.string(), z.unknown()) }), TestLocationResultSchema, { auth: "
|
|
2199
|
+
method(z.void(), ProviderInfoSchema), method(z.object({ config: z.record(z.string(), z.unknown()) }), TestLocationResultSchema, { auth: "admin" }), method(z.object({
|
|
2199
2200
|
location: StorageLocationSchema,
|
|
2200
2201
|
relativePath: z.string()
|
|
2201
2202
|
}), z.string()), method(z.object({
|
|
@@ -2296,18 +2297,18 @@ var LocationStatSchema = z.object({
|
|
|
2296
2297
|
fileCount: z.number(),
|
|
2297
2298
|
present: z.boolean()
|
|
2298
2299
|
});
|
|
2299
|
-
method(z.void(), z.array(BackupDestinationInfoSchema).readonly(), { auth: "
|
|
2300
|
+
method(z.void(), z.array(BackupDestinationInfoSchema).readonly(), { auth: "admin" }), method(z.object({
|
|
2300
2301
|
/** Subset of registered `backup-destination` addon ids to write to. */
|
|
2301
2302
|
destinations: z.array(z.string()).optional(),
|
|
2302
2303
|
locations: z.array(z.string()).optional(),
|
|
2303
2304
|
label: z.string().optional()
|
|
2304
2305
|
}).optional(), z.array(BackupEntrySchema).readonly(), {
|
|
2305
2306
|
kind: "mutation",
|
|
2306
|
-
auth: "
|
|
2307
|
-
}), method(z.void(), z.array(BackupEntrySchema).readonly(), { auth: "
|
|
2307
|
+
auth: "admin"
|
|
2308
|
+
}), method(z.void(), z.array(BackupEntrySchema).readonly(), { auth: "admin" }), method(z.void(), z.array(LocationStatSchema).readonly(), { auth: "admin" }), method(z.object({
|
|
2308
2309
|
destinationId: z.string(),
|
|
2309
2310
|
backupId: z.string()
|
|
2310
|
-
}), ArchiveManifestSchema.nullable(), { auth: "
|
|
2311
|
+
}), ArchiveManifestSchema.nullable(), { auth: "admin" }), method(z.object({
|
|
2311
2312
|
destinationId: z.string(),
|
|
2312
2313
|
backupId: z.string(),
|
|
2313
2314
|
/**
|
|
@@ -2320,14 +2321,14 @@ method(z.void(), z.array(BackupDestinationInfoSchema).readonly(), { auth: "super
|
|
|
2320
2321
|
locations: z.array(z.string()).optional()
|
|
2321
2322
|
}), z.void(), {
|
|
2322
2323
|
kind: "mutation",
|
|
2323
|
-
auth: "
|
|
2324
|
+
auth: "admin"
|
|
2324
2325
|
}), method(z.object({
|
|
2325
2326
|
destinationId: z.string(),
|
|
2326
2327
|
backupId: z.string()
|
|
2327
2328
|
}), z.void(), {
|
|
2328
2329
|
kind: "mutation",
|
|
2329
|
-
auth: "
|
|
2330
|
-
}), method(z.object({ destinationId: z.string() }), z.array(BackupArchiveEntrySchema).readonly(), { auth: "
|
|
2330
|
+
auth: "admin"
|
|
2331
|
+
}), method(z.object({ destinationId: z.string() }), z.array(BackupArchiveEntrySchema).readonly(), { auth: "admin" }), method(z.object({
|
|
2331
2332
|
locationId: z.string(),
|
|
2332
2333
|
enabled: z.boolean(),
|
|
2333
2334
|
retentionCount: z.number().int().min(1).max(1e3),
|
|
@@ -2341,7 +2342,7 @@ method(z.void(), z.array(BackupDestinationInfoSchema).readonly(), { auth: "super
|
|
|
2341
2342
|
cron: z.string().optional()
|
|
2342
2343
|
}), z.void(), {
|
|
2343
2344
|
kind: "mutation",
|
|
2344
|
-
auth: "
|
|
2345
|
+
auth: "admin"
|
|
2345
2346
|
}), method(z.object({
|
|
2346
2347
|
cron: z.string(),
|
|
2347
2348
|
count: z.number().int().min(1).max(20).optional()
|
|
@@ -3321,7 +3322,7 @@ method(z.void(), z.array(AuthProviderInfoSchema).readonly()), method(z.object({
|
|
|
3321
3322
|
enabled: z.boolean()
|
|
3322
3323
|
}), z.object({ success: z.literal(true) }), {
|
|
3323
3324
|
kind: "mutation",
|
|
3324
|
-
auth: "
|
|
3325
|
+
auth: "admin"
|
|
3325
3326
|
});
|
|
3326
3327
|
var NetworkEndpointSchema = z.object({
|
|
3327
3328
|
url: z.string(),
|
|
@@ -3357,10 +3358,10 @@ var RemoteAccessProviderInfoSchema = z.object({
|
|
|
3357
3358
|
});
|
|
3358
3359
|
method(z.void(), z.array(RemoteAccessProviderInfoSchema).readonly()), method(z.object({ addonId: z.string() }), RemoteAccessEndpointSchema, {
|
|
3359
3360
|
kind: "mutation",
|
|
3360
|
-
auth: "
|
|
3361
|
+
auth: "admin"
|
|
3361
3362
|
}), method(z.object({ addonId: z.string() }), z.object({ success: z.literal(true) }), {
|
|
3362
3363
|
kind: "mutation",
|
|
3363
|
-
auth: "
|
|
3364
|
+
auth: "admin"
|
|
3364
3365
|
});
|
|
3365
3366
|
var TurnServerSchema = z.object({
|
|
3366
3367
|
/** Single URL or list of URLs (e.g. "turn:turn.example.com:3478?transport=udp"). */
|
|
@@ -3394,7 +3395,7 @@ method(z.void(), z.array(TurnProviderInfoSchema).readonly()), method(z.void(), z
|
|
|
3394
3395
|
enabled: z.boolean()
|
|
3395
3396
|
}), z.object({ success: z.literal(true) }), {
|
|
3396
3397
|
kind: "mutation",
|
|
3397
|
-
auth: "
|
|
3398
|
+
auth: "admin"
|
|
3398
3399
|
});
|
|
3399
3400
|
var SnapshotImageSchema = z.object({
|
|
3400
3401
|
base64: z.string(),
|
|
@@ -4493,39 +4494,91 @@ method(z.void(), z.array(MeshProviderInfoSchema).readonly()), method(z.object({
|
|
|
4493
4494
|
authKey: z.string().min(8),
|
|
4494
4495
|
hostname: z.string().optional()
|
|
4495
4496
|
}), z.object({ joined: z.literal(true) }), { kind: "mutation" }), method(z.object({ addonId: z.string() }), z.object({ success: z.literal(true) }), { kind: "mutation" });
|
|
4496
|
-
var UserRoleSchema
|
|
4497
|
-
"super_admin",
|
|
4497
|
+
var UserRoleSchema = z.enum([
|
|
4498
4498
|
"admin",
|
|
4499
4499
|
"viewer",
|
|
4500
4500
|
"agent",
|
|
4501
4501
|
"scoped"
|
|
4502
4502
|
]);
|
|
4503
|
+
var AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
|
|
4504
|
+
var AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
|
|
4505
|
+
var MethodAccessSchema = z.enum([
|
|
4506
|
+
"view",
|
|
4507
|
+
"create",
|
|
4508
|
+
"delete"
|
|
4509
|
+
]);
|
|
4510
|
+
var TokenScopeSchema = z.object({
|
|
4511
|
+
type: z.enum(["addon", "capability"]),
|
|
4512
|
+
target: z.string(),
|
|
4513
|
+
access: z.array(MethodAccessSchema).min(1)
|
|
4514
|
+
});
|
|
4515
|
+
z.object({
|
|
4516
|
+
id: z.string(),
|
|
4517
|
+
username: z.string(),
|
|
4518
|
+
passwordHash: z.string(),
|
|
4519
|
+
role: UserRoleSchema,
|
|
4520
|
+
allowedProviders: AllowedProviderSchema,
|
|
4521
|
+
allowedDevices: AllowedDevicesSchema,
|
|
4522
|
+
/**
|
|
4523
|
+
* Scopes granted to this user. Admins bypass; their `scopes` is ignored.
|
|
4524
|
+
* Non-admins (`viewer`, `agent`, `scoped`) without scopes are locked out
|
|
4525
|
+
* of every protected call.
|
|
4526
|
+
*/
|
|
4527
|
+
scopes: z.array(TokenScopeSchema).default([]),
|
|
4528
|
+
createdAt: z.number(),
|
|
4529
|
+
updatedAt: z.number()
|
|
4530
|
+
});
|
|
4531
|
+
z.object({
|
|
4532
|
+
id: z.string(),
|
|
4533
|
+
label: z.string(),
|
|
4534
|
+
role: UserRoleSchema,
|
|
4535
|
+
allowedProviders: AllowedProviderSchema,
|
|
4536
|
+
allowedDevices: AllowedDevicesSchema,
|
|
4537
|
+
tokenHash: z.string(),
|
|
4538
|
+
tokenPrefix: z.string(),
|
|
4539
|
+
createdAt: z.number(),
|
|
4540
|
+
lastUsedAt: z.number().optional()
|
|
4541
|
+
});
|
|
4542
|
+
z.object({
|
|
4543
|
+
id: z.string(),
|
|
4544
|
+
userId: z.string(),
|
|
4545
|
+
name: z.string(),
|
|
4546
|
+
tokenHash: z.string(),
|
|
4547
|
+
tokenPrefix: z.string(),
|
|
4548
|
+
scopes: z.array(TokenScopeSchema),
|
|
4549
|
+
expiresAt: z.number().nullish(),
|
|
4550
|
+
lastUsedAt: z.number().nullish(),
|
|
4551
|
+
createdAt: z.number()
|
|
4552
|
+
});
|
|
4503
4553
|
var UserSummarySchema = z.object({
|
|
4504
4554
|
id: z.string(),
|
|
4505
4555
|
username: z.string(),
|
|
4506
|
-
role: UserRoleSchema
|
|
4556
|
+
role: UserRoleSchema,
|
|
4507
4557
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]),
|
|
4508
4558
|
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])),
|
|
4559
|
+
scopes: z.array(TokenScopeSchema).default([]),
|
|
4509
4560
|
createdAt: z.number(),
|
|
4510
4561
|
updatedAt: z.number()
|
|
4511
4562
|
});
|
|
4512
4563
|
var CreateUserInputSchema = z.object({
|
|
4513
4564
|
username: z.string(),
|
|
4514
4565
|
password: z.string().min(6),
|
|
4515
|
-
role: UserRoleSchema
|
|
4566
|
+
role: UserRoleSchema,
|
|
4516
4567
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
|
|
4517
|
-
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional()
|
|
4568
|
+
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
|
|
4569
|
+
scopes: z.array(TokenScopeSchema).optional()
|
|
4518
4570
|
});
|
|
4519
4571
|
var UpdateUserInputSchema = z.object({
|
|
4520
4572
|
id: z.string(),
|
|
4521
|
-
role: UserRoleSchema
|
|
4573
|
+
role: UserRoleSchema.optional(),
|
|
4522
4574
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
|
|
4523
|
-
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional()
|
|
4575
|
+
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
|
|
4576
|
+
scopes: z.array(TokenScopeSchema).optional()
|
|
4524
4577
|
});
|
|
4525
4578
|
var ApiKeySummarySchema = z.object({
|
|
4526
4579
|
id: z.string(),
|
|
4527
4580
|
label: z.string(),
|
|
4528
|
-
role: UserRoleSchema
|
|
4581
|
+
role: UserRoleSchema,
|
|
4529
4582
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
|
|
4530
4583
|
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional(),
|
|
4531
4584
|
tokenPrefix: z.string(),
|
|
@@ -4534,7 +4587,7 @@ var ApiKeySummarySchema = z.object({
|
|
|
4534
4587
|
});
|
|
4535
4588
|
var CreateApiKeyInputSchema = z.object({
|
|
4536
4589
|
label: z.string(),
|
|
4537
|
-
role: UserRoleSchema
|
|
4590
|
+
role: UserRoleSchema,
|
|
4538
4591
|
allowedProviders: z.union([z.array(z.string()), z.literal("*")]).optional(),
|
|
4539
4592
|
allowedDevices: z.record(z.string(), z.union([z.array(z.string()), z.literal("*")])).optional()
|
|
4540
4593
|
});
|
|
@@ -4542,20 +4595,12 @@ var CreateApiKeyResultSchema = z.object({
|
|
|
4542
4595
|
token: z.string(),
|
|
4543
4596
|
record: ApiKeySummarySchema
|
|
4544
4597
|
});
|
|
4545
|
-
var TokenScopeSchema$1 = z.object({
|
|
4546
|
-
type: z.enum([
|
|
4547
|
-
"addon",
|
|
4548
|
-
"route-prefix",
|
|
4549
|
-
"capability"
|
|
4550
|
-
]),
|
|
4551
|
-
target: z.string()
|
|
4552
|
-
});
|
|
4553
4598
|
var ScopedTokenSummarySchema = z.object({
|
|
4554
4599
|
id: z.string(),
|
|
4555
4600
|
userId: z.string(),
|
|
4556
4601
|
name: z.string(),
|
|
4557
4602
|
tokenPrefix: z.string(),
|
|
4558
|
-
scopes: z.array(TokenScopeSchema
|
|
4603
|
+
scopes: z.array(TokenScopeSchema),
|
|
4559
4604
|
expiresAt: z.number().nullish(),
|
|
4560
4605
|
lastUsedAt: z.number().nullish(),
|
|
4561
4606
|
createdAt: z.number()
|
|
@@ -4563,7 +4608,7 @@ var ScopedTokenSummarySchema = z.object({
|
|
|
4563
4608
|
var CreateScopedTokenInputSchema = z.object({
|
|
4564
4609
|
userId: z.string(),
|
|
4565
4610
|
name: z.string(),
|
|
4566
|
-
scopes: z.array(TokenScopeSchema
|
|
4611
|
+
scopes: z.array(TokenScopeSchema),
|
|
4567
4612
|
expiresAt: z.number().optional()
|
|
4568
4613
|
});
|
|
4569
4614
|
var CreateScopedTokenResultSchema = z.object({
|
|
@@ -4572,19 +4617,25 @@ var CreateScopedTokenResultSchema = z.object({
|
|
|
4572
4617
|
});
|
|
4573
4618
|
method(z.void(), z.array(UserSummarySchema), { auth: "admin" }), method(CreateUserInputSchema, UserSummarySchema, {
|
|
4574
4619
|
kind: "mutation",
|
|
4575
|
-
auth: "
|
|
4620
|
+
auth: "admin"
|
|
4576
4621
|
}), method(UpdateUserInputSchema, z.object({ success: z.literal(true) }), {
|
|
4577
4622
|
kind: "mutation",
|
|
4578
|
-
auth: "
|
|
4623
|
+
auth: "admin"
|
|
4579
4624
|
}), method(z.object({ id: z.string() }), z.object({ success: z.literal(true) }), {
|
|
4580
4625
|
kind: "mutation",
|
|
4581
|
-
auth: "
|
|
4626
|
+
auth: "admin"
|
|
4582
4627
|
}), method(z.object({
|
|
4583
4628
|
id: z.string(),
|
|
4584
4629
|
newPassword: z.string().min(6)
|
|
4585
4630
|
}), z.object({ success: z.literal(true) }), {
|
|
4586
4631
|
kind: "mutation",
|
|
4587
|
-
auth: "
|
|
4632
|
+
auth: "admin"
|
|
4633
|
+
}), method(z.object({
|
|
4634
|
+
userId: z.string(),
|
|
4635
|
+
scopes: z.array(TokenScopeSchema)
|
|
4636
|
+
}), z.object({ success: z.literal(true) }), {
|
|
4637
|
+
kind: "mutation",
|
|
4638
|
+
auth: "admin"
|
|
4588
4639
|
}), method(z.object({
|
|
4589
4640
|
username: z.string(),
|
|
4590
4641
|
password: z.string()
|
|
@@ -4624,10 +4675,10 @@ var NetworkAddressSchema = z.object({
|
|
|
4624
4675
|
});
|
|
4625
4676
|
method(z.void(), FeatureManifestSchema), method(z.void(), HealthStatusSchema), method(z.void(), FeatureManifestSchema), method(z.void(), z.array(NetworkAddressSchema).readonly()), method(z.void(), z.unknown().nullable(), { auth: "admin" }), method(z.record(z.string(), z.unknown()), z.null(), {
|
|
4626
4677
|
kind: "mutation",
|
|
4627
|
-
auth: "
|
|
4678
|
+
auth: "admin"
|
|
4628
4679
|
}), method(z.void(), z.void(), {
|
|
4629
4680
|
kind: "mutation",
|
|
4630
|
-
auth: "
|
|
4681
|
+
auth: "admin"
|
|
4631
4682
|
});
|
|
4632
4683
|
var StreamNetworkStatsSchema = z.object({
|
|
4633
4684
|
nominalBitrateKbps: z.number(),
|
|
@@ -4737,37 +4788,37 @@ var RenameNodeResultSchema = z.object({
|
|
|
4737
4788
|
});
|
|
4738
4789
|
method(z.void(), z.array(TopologyNodeSchema).readonly(), { auth: "admin" }), method(NodeAddonInputSchema, SuccessSchema, {
|
|
4739
4790
|
kind: "mutation",
|
|
4740
|
-
auth: "
|
|
4791
|
+
auth: "admin"
|
|
4741
4792
|
}), method(NodeAddonInputSchema, SuccessSchema, {
|
|
4742
4793
|
kind: "mutation",
|
|
4743
|
-
auth: "
|
|
4794
|
+
auth: "admin"
|
|
4744
4795
|
}), method(NodeAddonInputSchema, SuccessSchema, {
|
|
4745
4796
|
kind: "mutation",
|
|
4746
|
-
auth: "
|
|
4797
|
+
auth: "admin"
|
|
4747
4798
|
}), method(z.object({
|
|
4748
4799
|
nodeId: z.string(),
|
|
4749
4800
|
processName: z.string()
|
|
4750
4801
|
}), RestartProcessResultSchema, {
|
|
4751
4802
|
kind: "mutation",
|
|
4752
|
-
auth: "
|
|
4803
|
+
auth: "admin"
|
|
4753
4804
|
}), method(z.object({ nodeId: z.string() }), RestartNodeResultSchema, {
|
|
4754
4805
|
kind: "mutation",
|
|
4755
|
-
auth: "
|
|
4806
|
+
auth: "admin"
|
|
4756
4807
|
}), method(z.object({ nodeId: z.string() }), SuccessSchema, {
|
|
4757
4808
|
kind: "mutation",
|
|
4758
|
-
auth: "
|
|
4809
|
+
auth: "admin"
|
|
4759
4810
|
}), method(z.object({
|
|
4760
4811
|
nodeId: z.string(),
|
|
4761
4812
|
name: z.string().min(1).max(64)
|
|
4762
4813
|
}), RenameNodeResultSchema, {
|
|
4763
4814
|
kind: "mutation",
|
|
4764
|
-
auth: "
|
|
4765
|
-
}), method(z.void(), z.record(z.string(), ClusterAddonStatusEntrySchema), { auth: "
|
|
4815
|
+
auth: "admin"
|
|
4816
|
+
}), method(z.void(), z.record(z.string(), ClusterAddonStatusEntrySchema), { auth: "admin" }), method(z.object({
|
|
4766
4817
|
nodeId: z.string(),
|
|
4767
4818
|
level: z.string()
|
|
4768
4819
|
}), SuccessSchema, {
|
|
4769
4820
|
kind: "mutation",
|
|
4770
|
-
auth: "
|
|
4821
|
+
auth: "admin"
|
|
4771
4822
|
}), method(z.object({
|
|
4772
4823
|
nodeId: z.string(),
|
|
4773
4824
|
addonId: z.string(),
|
|
@@ -4775,7 +4826,7 @@ method(z.void(), z.array(TopologyNodeSchema).readonly(), { auth: "admin" }), met
|
|
|
4775
4826
|
params: z.record(z.string(), z.unknown()).optional()
|
|
4776
4827
|
}), z.unknown(), {
|
|
4777
4828
|
kind: "mutation",
|
|
4778
|
-
auth: "
|
|
4829
|
+
auth: "admin"
|
|
4779
4830
|
});
|
|
4780
4831
|
var IntegrationWithStateSchema = z.object({
|
|
4781
4832
|
id: z.string(),
|
|
@@ -4837,16 +4888,16 @@ method(z.void(), z.array(IntegrationWithStateSchema)), method(z.object({ id: z.s
|
|
|
4837
4888
|
auth: "admin"
|
|
4838
4889
|
}), method(UpdateIntegrationInputSchema, IntegrationLiteSchema, {
|
|
4839
4890
|
kind: "mutation",
|
|
4840
|
-
auth: "
|
|
4891
|
+
auth: "admin"
|
|
4841
4892
|
}), method(z.object({ id: z.string() }), DeleteIntegrationResultSchema, {
|
|
4842
4893
|
kind: "mutation",
|
|
4843
|
-
auth: "
|
|
4894
|
+
auth: "admin"
|
|
4844
4895
|
}), method(z.object({ id: z.string() }), z.record(z.string(), z.unknown()), { auth: "admin" }), method(z.object({
|
|
4845
4896
|
id: z.string(),
|
|
4846
4897
|
settings: z.record(z.string(), z.unknown())
|
|
4847
4898
|
}), z.object({ success: z.boolean() }), {
|
|
4848
4899
|
kind: "mutation",
|
|
4849
|
-
auth: "
|
|
4900
|
+
auth: "admin"
|
|
4850
4901
|
}), method(z.void(), z.array(AvailableIntegrationTypeSchema), { auth: "admin" }), method(z.object({
|
|
4851
4902
|
addonId: z.string(),
|
|
4852
4903
|
settings: z.record(z.string(), z.unknown())
|
|
@@ -4993,13 +5044,13 @@ method(z.void(), z.array(AddonListItemSchema).readonly()), method(z.object({
|
|
|
4993
5044
|
version: z.string().optional()
|
|
4994
5045
|
}), InstallPackageResultSchema, {
|
|
4995
5046
|
kind: "mutation",
|
|
4996
|
-
auth: "
|
|
5047
|
+
auth: "admin"
|
|
4997
5048
|
}), method(z.object({ packageName: z.string() }), InstallPackageResultSchema, {
|
|
4998
5049
|
kind: "mutation",
|
|
4999
5050
|
auth: "admin"
|
|
5000
5051
|
}), method(z.void(), z.boolean()), method(z.void(), z.array(z.unknown()).readonly()), method(z.object({ packageName: z.string() }), z.unknown(), {
|
|
5001
5052
|
kind: "mutation",
|
|
5002
|
-
auth: "
|
|
5053
|
+
auth: "admin"
|
|
5003
5054
|
}), method(z.void(), ReloadPackagesResultSchema, {
|
|
5004
5055
|
kind: "mutation",
|
|
5005
5056
|
auth: "admin"
|
|
@@ -5008,28 +5059,28 @@ method(z.void(), z.array(AddonListItemSchema).readonly()), method(z.object({
|
|
|
5008
5059
|
version: z.string().optional()
|
|
5009
5060
|
}), z.unknown(), {
|
|
5010
5061
|
kind: "mutation",
|
|
5011
|
-
auth: "
|
|
5062
|
+
auth: "admin"
|
|
5012
5063
|
}), method(z.object({ name: z.string().min(1) }), z.object({ rolledBackTo: z.string().nullable() }), {
|
|
5013
5064
|
kind: "mutation",
|
|
5014
|
-
auth: "
|
|
5065
|
+
auth: "admin"
|
|
5015
5066
|
}), method(z.void(), z.unknown(), {
|
|
5016
5067
|
kind: "mutation",
|
|
5017
5068
|
auth: "admin"
|
|
5018
5069
|
}), method(z.object({ confirm: z.literal(true) }), z.unknown(), {
|
|
5019
5070
|
kind: "mutation",
|
|
5020
|
-
auth: "
|
|
5071
|
+
auth: "admin"
|
|
5021
5072
|
}), method(z.object({ name: z.string() }), z.array(PackageVersionInfoSchema).readonly()), method(z.object({ addonId: z.string() }), RestartAddonResultSchema, {
|
|
5022
5073
|
kind: "mutation",
|
|
5023
|
-
auth: "
|
|
5074
|
+
auth: "admin"
|
|
5024
5075
|
}), method(z.object({ packageName: z.string() }), z.object({ success: z.literal(true) }), {
|
|
5025
5076
|
kind: "mutation",
|
|
5026
|
-
auth: "
|
|
5077
|
+
auth: "admin"
|
|
5027
5078
|
}), method(z.void(), AutoUpdateSettingsSchema, { auth: "admin" }), method(z.object({
|
|
5028
5079
|
channel: ChannelSchema,
|
|
5029
5080
|
intervalSeconds: z.number().min(300).max(86400).optional()
|
|
5030
5081
|
}), z.unknown(), {
|
|
5031
5082
|
kind: "mutation",
|
|
5032
|
-
auth: "
|
|
5083
|
+
auth: "admin"
|
|
5033
5084
|
}), method(z.object({ addonId: z.string() }), AddonAutoUpdateSchema, { auth: "admin" }), method(z.object({
|
|
5034
5085
|
addonId: z.string(),
|
|
5035
5086
|
channel: ChannelWithInheritSchema
|
|
@@ -5038,60 +5089,11 @@ method(z.void(), z.array(AddonListItemSchema).readonly()), method(z.object({
|
|
|
5038
5089
|
auth: "admin"
|
|
5039
5090
|
}), method(z.object({ channel: ChannelSchema }), z.object({ success: z.literal(true) }), {
|
|
5040
5091
|
kind: "mutation",
|
|
5041
|
-
auth: "
|
|
5092
|
+
auth: "admin"
|
|
5042
5093
|
}), method(CustomActionInputSchema, z.unknown(), { kind: "mutation" }), method(z.object({
|
|
5043
5094
|
addonId: z.string(),
|
|
5044
5095
|
level: LogLevelSchema.optional()
|
|
5045
5096
|
}), LogStreamEntrySchema, { kind: "subscription" });
|
|
5046
|
-
var UserRoleSchema = z.enum([
|
|
5047
|
-
"super_admin",
|
|
5048
|
-
"admin",
|
|
5049
|
-
"viewer",
|
|
5050
|
-
"agent",
|
|
5051
|
-
"scoped"
|
|
5052
|
-
]);
|
|
5053
|
-
var AllowedProviderSchema = z.union([z.literal("*"), z.array(z.string())]);
|
|
5054
|
-
var AllowedDevicesSchema = z.record(z.string(), z.union([z.literal("*"), z.array(z.string())]));
|
|
5055
|
-
z.object({
|
|
5056
|
-
id: z.string(),
|
|
5057
|
-
username: z.string(),
|
|
5058
|
-
passwordHash: z.string(),
|
|
5059
|
-
role: UserRoleSchema,
|
|
5060
|
-
allowedProviders: AllowedProviderSchema,
|
|
5061
|
-
allowedDevices: AllowedDevicesSchema,
|
|
5062
|
-
createdAt: z.number(),
|
|
5063
|
-
updatedAt: z.number()
|
|
5064
|
-
});
|
|
5065
|
-
z.object({
|
|
5066
|
-
id: z.string(),
|
|
5067
|
-
label: z.string(),
|
|
5068
|
-
role: UserRoleSchema,
|
|
5069
|
-
allowedProviders: AllowedProviderSchema,
|
|
5070
|
-
allowedDevices: AllowedDevicesSchema,
|
|
5071
|
-
tokenHash: z.string(),
|
|
5072
|
-
tokenPrefix: z.string(),
|
|
5073
|
-
createdAt: z.number(),
|
|
5074
|
-
lastUsedAt: z.number().optional()
|
|
5075
|
-
});
|
|
5076
|
-
var TokenScopeSchema = z.object({
|
|
5077
|
-
type: z.enum([
|
|
5078
|
-
"addon",
|
|
5079
|
-
"route-prefix",
|
|
5080
|
-
"capability"
|
|
5081
|
-
]),
|
|
5082
|
-
target: z.string()
|
|
5083
|
-
});
|
|
5084
|
-
z.object({
|
|
5085
|
-
id: z.string(),
|
|
5086
|
-
userId: z.string(),
|
|
5087
|
-
name: z.string(),
|
|
5088
|
-
tokenHash: z.string(),
|
|
5089
|
-
tokenPrefix: z.string(),
|
|
5090
|
-
scopes: z.array(TokenScopeSchema),
|
|
5091
|
-
expiresAt: z.number().nullish(),
|
|
5092
|
-
lastUsedAt: z.number().nullish(),
|
|
5093
|
-
createdAt: z.number()
|
|
5094
|
-
});
|
|
5095
5097
|
//#endregion
|
|
5096
5098
|
//#region ../types/dist/node.mjs
|
|
5097
5099
|
function getPlatformInfo() {
|