@camstack/types 1.2.325 → 1.2.327

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/client.js CHANGED
@@ -5752,6 +5752,8 @@ function createDeviceProxy(api, binding, opts) {
5752
5752
  completeRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "completeRetrainTrack", "mutation", input),
5753
5753
  restageRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "restageRetrainTrack", "mutation", input),
5754
5754
  getRetrainExportUrl: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getRetrainExportUrl", "query", input),
5755
+ setRetrainFrameComplete: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "setRetrainFrameComplete", "mutation", input),
5756
+ writeRetrainArchive: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "writeRetrainArchive", "mutation", input),
5755
5757
  getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
5756
5758
  getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
5757
5759
  listTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listTrackMedia", "query", input),
@@ -7636,6 +7638,10 @@ function createSystemProxy(api) {
7636
7638
  oauthExchangeCode: (input) => dispatch("userManagement", "oauthExchangeCode", "mutation", input),
7637
7639
  oauthRefresh: (input) => dispatch("userManagement", "oauthRefresh", "mutation", input),
7638
7640
  oauthVerifyAccessToken: (input) => dispatch("userManagement", "oauthVerifyAccessToken", "query", input),
7641
+ listExternalIdentities: (input) => dispatch("userManagement", "listExternalIdentities", "query", input),
7642
+ findUserByExternalIdentity: (input) => dispatch("userManagement", "findUserByExternalIdentity", "query", input),
7643
+ linkExternalIdentity: (input) => dispatch("userManagement", "linkExternalIdentity", "mutation", input),
7644
+ unlinkExternalIdentity: (input) => dispatch("userManagement", "unlinkExternalIdentity", "mutation", input),
7639
7645
  listOauthSessions: (input) => dispatch("userManagement", "listOauthSessions", "query", input),
7640
7646
  revokeOauthSession: (input) => dispatch("userManagement", "revokeOauthSession", "mutation", input)
7641
7647
  }
package/dist/client.mjs CHANGED
@@ -5751,6 +5751,8 @@ function createDeviceProxy(api, binding, opts) {
5751
5751
  completeRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "completeRetrainTrack", "mutation", input),
5752
5752
  restageRetrainTrack: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "restageRetrainTrack", "mutation", input),
5753
5753
  getRetrainExportUrl: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getRetrainExportUrl", "query", input),
5754
+ setRetrainFrameComplete: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "setRetrainFrameComplete", "mutation", input),
5755
+ writeRetrainArchive: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "writeRetrainArchive", "mutation", input),
5754
5756
  getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
5755
5757
  getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
5756
5758
  listTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listTrackMedia", "query", input),
@@ -7635,6 +7637,10 @@ function createSystemProxy(api) {
7635
7637
  oauthExchangeCode: (input) => dispatch("userManagement", "oauthExchangeCode", "mutation", input),
7636
7638
  oauthRefresh: (input) => dispatch("userManagement", "oauthRefresh", "mutation", input),
7637
7639
  oauthVerifyAccessToken: (input) => dispatch("userManagement", "oauthVerifyAccessToken", "query", input),
7640
+ listExternalIdentities: (input) => dispatch("userManagement", "listExternalIdentities", "query", input),
7641
+ findUserByExternalIdentity: (input) => dispatch("userManagement", "findUserByExternalIdentity", "query", input),
7642
+ linkExternalIdentity: (input) => dispatch("userManagement", "linkExternalIdentity", "mutation", input),
7643
+ unlinkExternalIdentity: (input) => dispatch("userManagement", "unlinkExternalIdentity", "mutation", input),
7638
7644
  listOauthSessions: (input) => dispatch("userManagement", "listOauthSessions", "query", input),
7639
7645
  revokeOauthSession: (input) => dispatch("userManagement", "revokeOauthSession", "mutation", input)
7640
7646
  }
@@ -81,6 +81,13 @@ export declare const DISPLAY_ICON_KEYS: readonly string[];
81
81
  export declare const DISPLAY_ICON_OFFERED_KEYS: readonly string[];
82
82
  /** Is this a key of the shared vocabulary? */
83
83
  export declare function isDisplayIconKey(value: unknown): boolean;
84
+ /**
85
+ * A stored icon value as a vocabulary key: `value` when it IS one, `fallback`
86
+ * otherwise. For an `icon` settings field (D780) whose stored value may
87
+ * predate the vocabulary (a free-text lucide name) — the field's default is
88
+ * drawn rather than nothing.
89
+ */
90
+ export declare function resolveDisplayIconKey(value: unknown, fallback: string): string;
84
91
  /** The entry for a key, or `undefined` — never a guessed one. */
85
92
  export declare function displayIconEntry(key: string): DisplayIconEntry | undefined;
86
93
  /** The entries of one group, in vocabulary order. */
@@ -30,5 +30,6 @@ export type { WireableField } from './schema-fields.js';
30
30
  export { enumerateItemArrayFields, enumerateSchemaFields, unwrapSchema } from './schema-fields.js';
31
31
  export type { DeviceConfigEntry } from './zod-to-config-ui.js';
32
32
  export { zodEntriesToConfigUI } from './zod-to-config-ui.js';
33
+ export { collectZodSecretPaths, isZodSecret, SECRET_META } from './zod-secret.js';
33
34
  export type { SiteZone } from './site-zone.js';
34
35
  export { SiteZoneSchema, siteZoneKey } from './site-zone.js';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Secret declaration on a Zod config schema (D783).
3
+ *
4
+ * A field is a secret because its schema SAYS so — `.meta({ secret: true })`,
5
+ * spelled {@link SECRET_META} — never because its key looks like a credential.
6
+ * It is the Zod twin of `secret: true` / `type: 'password'` on a config-UI
7
+ * field (`isSecretConfigField`), and every consumer that treats secrets
8
+ * specially reads it: the settings form (`zodEntriesToConfigUI`), the paths a
9
+ * device advertises at `registerDevice` (`secretConfigPaths`, which the
10
+ * non-admin redaction withholds at any depth), and the keychain later.
11
+ *
12
+ * Zod keeps `.meta()` in `z.globalRegistry`, which lives on `globalThis`, so a
13
+ * declaration made by an addon's own copy of zod is visible here.
14
+ */
15
+ import { z } from 'zod';
16
+ /**
17
+ * `{ secret: true }` — the one spelling of "this field holds a credential".
18
+ *
19
+ * Addons write the LITERAL `.meta({ secret: true })` rather than importing
20
+ * this constant: an addon running against an older `@camstack/types` would
21
+ * otherwise call `.meta(undefined)`, which in zod v4 is the metadata GETTER
22
+ * and returns no schema at all.
23
+ */
24
+ export declare const SECRET_META: {
25
+ readonly secret: true;
26
+ };
27
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
28
+ export declare function isZodSecret(schema: z.ZodType): boolean;
29
+ /**
30
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
31
+ * element of this array" (`connection.password`, `rows[].token`). A declared
32
+ * object or array is reported as one path and not descended into — everything
33
+ * under it is secret.
34
+ */
35
+ export declare function collectZodSecretPaths(schema: z.ZodType, prefix?: string): readonly string[];
@@ -5923,6 +5923,20 @@ export type AppRouter = TrpcCoreRouter<{
5923
5923
  output: z.infer<typeof pipelineAnalyticsCapability.methods.getRetrainExportUrl.output>;
5924
5924
  meta: object;
5925
5925
  }>;
5926
+ setRetrainFrameComplete: TRPCMutationProcedure<{
5927
+ input: {
5928
+ [x: string]: unknown;
5929
+ } & z.input<typeof pipelineAnalyticsCapability.methods.setRetrainFrameComplete.input>;
5930
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.setRetrainFrameComplete.output>;
5931
+ meta: object;
5932
+ }>;
5933
+ writeRetrainArchive: TRPCMutationProcedure<{
5934
+ input: {
5935
+ [x: string]: unknown;
5936
+ } & z.input<typeof pipelineAnalyticsCapability.methods.writeRetrainArchive.input>;
5937
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.writeRetrainArchive.output>;
5938
+ meta: object;
5939
+ }>;
5926
5940
  getEventMedia: TRPCQueryProcedure<{
5927
5941
  input: {
5928
5942
  [x: string]: unknown;
@@ -9149,6 +9163,34 @@ export type AppRouter = TrpcCoreRouter<{
9149
9163
  output: z.infer<typeof userManagementCapability.methods.oauthVerifyAccessToken.output>;
9150
9164
  meta: object;
9151
9165
  }>;
9166
+ listExternalIdentities: TRPCQueryProcedure<{
9167
+ input: {
9168
+ [x: string]: unknown;
9169
+ } & z.input<typeof userManagementCapability.methods.listExternalIdentities.input>;
9170
+ output: z.infer<typeof userManagementCapability.methods.listExternalIdentities.output>;
9171
+ meta: object;
9172
+ }>;
9173
+ findUserByExternalIdentity: TRPCQueryProcedure<{
9174
+ input: {
9175
+ [x: string]: unknown;
9176
+ } & z.input<typeof userManagementCapability.methods.findUserByExternalIdentity.input>;
9177
+ output: z.infer<typeof userManagementCapability.methods.findUserByExternalIdentity.output>;
9178
+ meta: object;
9179
+ }>;
9180
+ linkExternalIdentity: TRPCMutationProcedure<{
9181
+ input: {
9182
+ [x: string]: unknown;
9183
+ } & z.input<typeof userManagementCapability.methods.linkExternalIdentity.input>;
9184
+ output: z.infer<typeof userManagementCapability.methods.linkExternalIdentity.output>;
9185
+ meta: object;
9186
+ }>;
9187
+ unlinkExternalIdentity: TRPCMutationProcedure<{
9188
+ input: {
9189
+ [x: string]: unknown;
9190
+ } & z.input<typeof userManagementCapability.methods.unlinkExternalIdentity.input>;
9191
+ output: z.infer<typeof userManagementCapability.methods.unlinkExternalIdentity.output>;
9192
+ meta: object;
9193
+ }>;
9152
9194
  listOauthSessions: TRPCQueryProcedure<{
9153
9195
  input: {
9154
9196
  nodeId?: string | undefined;
@@ -10953,6 +10995,45 @@ export type AppRouter = TrpcCoreRouter<{
10953
10995
  };
10954
10996
  meta: object;
10955
10997
  }>;
10998
+ listLinkableProviders: import("@trpc/server").TRPCQueryProcedure<{
10999
+ input: void;
11000
+ output: {
11001
+ provider: string;
11002
+ label: string;
11003
+ }[];
11004
+ meta: object;
11005
+ }>;
11006
+ beginExternalLink: import("@trpc/server").TRPCMutationProcedure<{
11007
+ input: {
11008
+ provider: string;
11009
+ };
11010
+ output: {
11011
+ url: string;
11012
+ };
11013
+ meta: object;
11014
+ }>;
11015
+ listOwnExternalIdentities: import("@trpc/server").TRPCQueryProcedure<{
11016
+ input: void;
11017
+ output: {
11018
+ provider: string;
11019
+ subject: string;
11020
+ linkedAt: number;
11021
+ providerLabel: string | null;
11022
+ available: boolean;
11023
+ label?: string | undefined;
11024
+ }[];
11025
+ meta: object;
11026
+ }>;
11027
+ unlinkOwnExternalIdentity: import("@trpc/server").TRPCMutationProcedure<{
11028
+ input: {
11029
+ provider: string;
11030
+ subject: string;
11031
+ };
11032
+ output: {
11033
+ success: boolean;
11034
+ };
11035
+ meta: object;
11036
+ }>;
10956
11037
  listLoginMethods: import("@trpc/server").TRPCQueryProcedure<{
10957
11038
  input: void;
10958
11039
  output: readonly ({
@@ -10962,6 +11043,7 @@ export type AppRouter = TrpcCoreRouter<{
10962
11043
  startUrl: string;
10963
11044
  stage: "primary" | "second-factor";
10964
11045
  icon?: string | undefined;
11046
+ linkable?: boolean | undefined;
10965
11047
  } | {
10966
11048
  kind: "widget";
10967
11049
  id: string;
@@ -11331,6 +11413,45 @@ export type AppRouter = TrpcCoreRouter<{
11331
11413
  };
11332
11414
  meta: object;
11333
11415
  }>;
11416
+ listLinkableProviders: import("@trpc/server").TRPCQueryProcedure<{
11417
+ input: void;
11418
+ output: {
11419
+ provider: string;
11420
+ label: string;
11421
+ }[];
11422
+ meta: object;
11423
+ }>;
11424
+ beginExternalLink: import("@trpc/server").TRPCMutationProcedure<{
11425
+ input: {
11426
+ provider: string;
11427
+ };
11428
+ output: {
11429
+ url: string;
11430
+ };
11431
+ meta: object;
11432
+ }>;
11433
+ listOwnExternalIdentities: import("@trpc/server").TRPCQueryProcedure<{
11434
+ input: void;
11435
+ output: {
11436
+ provider: string;
11437
+ subject: string;
11438
+ linkedAt: number;
11439
+ providerLabel: string | null;
11440
+ available: boolean;
11441
+ label?: string | undefined;
11442
+ }[];
11443
+ meta: object;
11444
+ }>;
11445
+ unlinkOwnExternalIdentity: import("@trpc/server").TRPCMutationProcedure<{
11446
+ input: {
11447
+ provider: string;
11448
+ subject: string;
11449
+ };
11450
+ output: {
11451
+ success: boolean;
11452
+ };
11453
+ meta: object;
11454
+ }>;
11334
11455
  listLoginMethods: import("@trpc/server").TRPCQueryProcedure<{
11335
11456
  input: void;
11336
11457
  output: readonly ({
@@ -11340,6 +11461,7 @@ export type AppRouter = TrpcCoreRouter<{
11340
11461
  startUrl: string;
11341
11462
  stage: "primary" | "second-factor";
11342
11463
  icon?: string | undefined;
11464
+ linkable?: boolean | undefined;
11343
11465
  } | {
11344
11466
  kind: "widget";
11345
11467
  id: string;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1213 method paths across 165 capabilities.
9
+ * Coverage: 1219 method paths across 165 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,7 +6,7 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 511 methods carry a device reference, of which
9
+ * Coverage: 512 methods carry a device reference, of which
10
10
  * 161 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
@@ -102,7 +102,7 @@ export interface SystemProxy {
102
102
  readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listInstances' | 'createInstance' | 'updateInstance' | 'deleteInstance' | 'setInstanceEnabled' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
103
103
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
104
104
  readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
105
- readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'createApiKey' | 'revokeApiKey' | 'validateApiKey' | 'createScopedToken' | 'revokeScopedToken' | 'validateScopedToken' | 'listScopedTokens' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listOauthSessions' | 'revokeOauthSession'>;
105
+ readonly userManagement: Pick<InferProvider<typeof userManagementCapability>, 'listUsers' | 'createUser' | 'updateUser' | 'deleteUser' | 'resetPassword' | 'setUserScopes' | 'validateCredentials' | 'listApiKeys' | 'createApiKey' | 'revokeApiKey' | 'validateApiKey' | 'createScopedToken' | 'revokeScopedToken' | 'validateScopedToken' | 'listScopedTokens' | 'setupTotp' | 'confirmTotp' | 'disableTotp' | 'getTotpStatus' | 'verifyTotp' | 'oauthIssueCode' | 'oauthExchangeCode' | 'oauthRefresh' | 'oauthVerifyAccessToken' | 'listExternalIdentities' | 'findUserByExternalIdentity' | 'linkExternalIdentity' | 'unlinkExternalIdentity' | 'listOauthSessions' | 'revokeOauthSession'>;
106
106
  }
107
107
  /**
108
108
  * Build a `SystemProxy` that dispatches every namespace method through
package/dist/index.d.ts CHANGED
@@ -195,7 +195,7 @@ export type { IBatteryOperated, IDoorbellButton, INativeSnapshot, IPanTiltZoom,
195
195
  export type { LocationDescriptionAssignment, LocationIconAssignment, LocationIconId, } from './device/location-icon.js';
196
196
  export { LOCATION_ICON_FALLBACK, LOCATION_ICON_IDS, LOCATION_DESCRIPTION_MAX, LocationDescriptionAssignmentSchema, LocationIconAssignmentSchema, LocationIconIdSchema, locationIconKey, resolveLocationIcon, } from './device/location-icon.js';
197
197
  export type { DisplayIconEntry, DisplayIconGroup, DisplayIconHit, } from './device/display-icon-vocabulary.js';
198
- export { DISPLAY_ICON_GROUPS, DISPLAY_ICON_KEYS, DISPLAY_ICON_OFFERED_KEYS, DISPLAY_ICON_VOCABULARY, displayIconEntry, displayIconsInGroup, isDisplayIconKey, searchDisplayIcons, } from './device/display-icon-vocabulary.js';
198
+ export { DISPLAY_ICON_GROUPS, DISPLAY_ICON_KEYS, DISPLAY_ICON_OFFERED_KEYS, DISPLAY_ICON_VOCABULARY, displayIconEntry, displayIconsInGroup, isDisplayIconKey, resolveDisplayIconKey, searchDisplayIcons, } from './device/display-icon-vocabulary.js';
199
199
  export { getByPath, setByPath } from './device/path-util.js';
200
200
  export type { ReachabilityPollHandle, ReachabilityPollLogger, ReachabilityPollOptions, } from './device/reachability-poll.js';
201
201
  export { REACHABILITY_FAILURES_TO_OFFLINE, REACHABILITY_POLL_INTERVAL_MS, REACHABILITY_PROBE_TIMEOUT_MS, startReachabilityPoll, } from './device/reachability-poll.js';
@@ -209,6 +209,7 @@ export type { DeviceCapListener, DeviceLifecycleListener, DeviceQueryFilters, St
209
209
  export { SystemMirror } from './device/system-mirror.js';
210
210
  export type { DeviceConfigEntry } from './device/zod-to-config-ui.js';
211
211
  export { zodEntriesToConfigUI } from './device/zod-to-config-ui.js';
212
+ export { collectZodSecretPaths, isZodSecret, SECRET_META } from './device/zod-secret.js';
212
213
  export { EventCategory, isOwnerOnlyEventCategory, OWNER_ONLY_EVENT_CATEGORIES, publicEventCategories, } from './enums/event-category.js';
213
214
  export * from './enums/index.js';
214
215
  export type { CompileResult, EvaluateExpressionSourceResult, ExpressionBinaryOperator, ExpressionBindingSource, ExpressionBuiltin, ExpressionEvalHooks, ExpressionEvalOptions, ExpressionFieldBinding, ExpressionGlobalBinding, ExpressionLiteralBinding, ExpressionLogicalOperator, ExpressionNode, ExpressionNodePath, ExpressionSource, ExpressionSourceInput, ExpressionUnaryOperator, ExpressionValue, CountCallState, RoseCallState, StatefulCallState, StatefulCallInvocation, StatefulExpressionEnvironment, StatefulExpressionMemory, StatefulExpressionBuiltin, Keyword, ParsedExpression, Punctuator, Token, } from './expression/index.js';