@camstack/types 1.1.38 → 1.1.39
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.
|
@@ -40,6 +40,15 @@ import { type InferProvider } from './capability-definition.js';
|
|
|
40
40
|
* - `listPasskeys({userId})` — enumerate user's enrolled credentials.
|
|
41
41
|
* - `removePasskey({userId, credentialId})` — revoke one credential.
|
|
42
42
|
*
|
|
43
|
+
* 4. Second-factor preference (opt-in, default OFF):
|
|
44
|
+
* Enrolling a passkey only enables passkey-FIRST sign-in. It is
|
|
45
|
+
* demanded as a second factor after a password login ONLY when the
|
|
46
|
+
* user explicitly opts in via `setSecondFactorPreference`.
|
|
47
|
+
* - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
|
|
48
|
+
* row ⇒ `enabled: false`).
|
|
49
|
+
* - `setSecondFactorPreference({userId, enabled})` — persisted by
|
|
50
|
+
* the providing addon beside its credentials.
|
|
51
|
+
*
|
|
43
52
|
* Challenges are short-lived (5 min, in-memory). The cap is internal —
|
|
44
53
|
* the admin-ui composes the begin/finish round-trip and never exposes
|
|
45
54
|
* the cap to non-admins.
|
|
@@ -107,6 +116,17 @@ export declare const userPasskeysCapability: {
|
|
|
107
116
|
}, z.core.$strip>, z.ZodObject<{
|
|
108
117
|
success: z.ZodLiteral<true>;
|
|
109
118
|
}, z.core.$strip>, "mutation">;
|
|
119
|
+
readonly getSecondFactorPreference: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
120
|
+
userId: z.ZodString;
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
+
enabled: z.ZodBoolean;
|
|
123
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
124
|
+
readonly setSecondFactorPreference: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
125
|
+
userId: z.ZodString;
|
|
126
|
+
enabled: z.ZodBoolean;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
success: z.ZodLiteral<true>;
|
|
129
|
+
}, z.core.$strip>, "mutation">;
|
|
110
130
|
};
|
|
111
131
|
};
|
|
112
132
|
export type IUserPasskeysProvider = InferProvider<typeof userPasskeysCapability>;
|
|
@@ -848,6 +848,22 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
848
848
|
};
|
|
849
849
|
meta: object;
|
|
850
850
|
}>;
|
|
851
|
+
getOwnPasskeySecondFactorPreference: import("@trpc/server").TRPCQueryProcedure<{
|
|
852
|
+
input: void;
|
|
853
|
+
output: {
|
|
854
|
+
enabled: boolean;
|
|
855
|
+
};
|
|
856
|
+
meta: object;
|
|
857
|
+
}>;
|
|
858
|
+
setOwnPasskeySecondFactorPreference: import("@trpc/server").TRPCMutationProcedure<{
|
|
859
|
+
input: {
|
|
860
|
+
enabled: boolean;
|
|
861
|
+
};
|
|
862
|
+
output: {
|
|
863
|
+
success: true;
|
|
864
|
+
};
|
|
865
|
+
meta: object;
|
|
866
|
+
}>;
|
|
851
867
|
createShareToken: import("@trpc/server").TRPCMutationProcedure<{
|
|
852
868
|
input: {
|
|
853
869
|
scope: {
|
|
@@ -14234,6 +14250,27 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
14234
14250
|
};
|
|
14235
14251
|
meta: object;
|
|
14236
14252
|
}>;
|
|
14253
|
+
getSecondFactorPreference: import("@trpc/server").TRPCQueryProcedure<{
|
|
14254
|
+
input: {
|
|
14255
|
+
[x: string]: unknown;
|
|
14256
|
+
userId: string;
|
|
14257
|
+
};
|
|
14258
|
+
output: {
|
|
14259
|
+
enabled: boolean;
|
|
14260
|
+
};
|
|
14261
|
+
meta: object;
|
|
14262
|
+
}>;
|
|
14263
|
+
setSecondFactorPreference: import("@trpc/server").TRPCMutationProcedure<{
|
|
14264
|
+
input: {
|
|
14265
|
+
[x: string]: unknown;
|
|
14266
|
+
userId: string;
|
|
14267
|
+
enabled: boolean;
|
|
14268
|
+
};
|
|
14269
|
+
output: {
|
|
14270
|
+
success: true;
|
|
14271
|
+
};
|
|
14272
|
+
meta: object;
|
|
14273
|
+
}>;
|
|
14237
14274
|
}>>;
|
|
14238
14275
|
vacuumControl: import("@trpc/server").TRPCBuiltRouter<{
|
|
14239
14276
|
ctx: TrpcContext;
|
|
@@ -15714,6 +15751,22 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
15714
15751
|
};
|
|
15715
15752
|
meta: object;
|
|
15716
15753
|
}>;
|
|
15754
|
+
getOwnPasskeySecondFactorPreference: import("@trpc/server").TRPCQueryProcedure<{
|
|
15755
|
+
input: void;
|
|
15756
|
+
output: {
|
|
15757
|
+
enabled: boolean;
|
|
15758
|
+
};
|
|
15759
|
+
meta: object;
|
|
15760
|
+
}>;
|
|
15761
|
+
setOwnPasskeySecondFactorPreference: import("@trpc/server").TRPCMutationProcedure<{
|
|
15762
|
+
input: {
|
|
15763
|
+
enabled: boolean;
|
|
15764
|
+
};
|
|
15765
|
+
output: {
|
|
15766
|
+
success: true;
|
|
15767
|
+
};
|
|
15768
|
+
meta: object;
|
|
15769
|
+
}>;
|
|
15717
15770
|
createShareToken: import("@trpc/server").TRPCMutationProcedure<{
|
|
15718
15771
|
input: {
|
|
15719
15772
|
scope: {
|
|
@@ -29100,6 +29153,27 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
29100
29153
|
};
|
|
29101
29154
|
meta: object;
|
|
29102
29155
|
}>;
|
|
29156
|
+
getSecondFactorPreference: import("@trpc/server").TRPCQueryProcedure<{
|
|
29157
|
+
input: {
|
|
29158
|
+
[x: string]: unknown;
|
|
29159
|
+
userId: string;
|
|
29160
|
+
};
|
|
29161
|
+
output: {
|
|
29162
|
+
enabled: boolean;
|
|
29163
|
+
};
|
|
29164
|
+
meta: object;
|
|
29165
|
+
}>;
|
|
29166
|
+
setSecondFactorPreference: import("@trpc/server").TRPCMutationProcedure<{
|
|
29167
|
+
input: {
|
|
29168
|
+
[x: string]: unknown;
|
|
29169
|
+
userId: string;
|
|
29170
|
+
enabled: boolean;
|
|
29171
|
+
};
|
|
29172
|
+
output: {
|
|
29173
|
+
success: true;
|
|
29174
|
+
};
|
|
29175
|
+
meta: object;
|
|
29176
|
+
}>;
|
|
29103
29177
|
}>>;
|
|
29104
29178
|
vacuumControl: import("@trpc/server").TRPCBuiltRouter<{
|
|
29105
29179
|
ctx: TrpcContext;
|
|
@@ -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:
|
|
9
|
+
* Coverage: 734 method paths across 112 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
package/dist/index.js
CHANGED
|
@@ -19175,6 +19175,15 @@ getTurnServers: require_sleep.method(zod.z.void(), zod.z.array(TurnServerSchema)
|
|
|
19175
19175
|
* - `listPasskeys({userId})` — enumerate user's enrolled credentials.
|
|
19176
19176
|
* - `removePasskey({userId, credentialId})` — revoke one credential.
|
|
19177
19177
|
*
|
|
19178
|
+
* 4. Second-factor preference (opt-in, default OFF):
|
|
19179
|
+
* Enrolling a passkey only enables passkey-FIRST sign-in. It is
|
|
19180
|
+
* demanded as a second factor after a password login ONLY when the
|
|
19181
|
+
* user explicitly opts in via `setSecondFactorPreference`.
|
|
19182
|
+
* - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
|
|
19183
|
+
* row ⇒ `enabled: false`).
|
|
19184
|
+
* - `setSecondFactorPreference({userId, enabled})` — persisted by
|
|
19185
|
+
* the providing addon beside its credentials.
|
|
19186
|
+
*
|
|
19178
19187
|
* Challenges are short-lived (5 min, in-memory). The cap is internal —
|
|
19179
19188
|
* the admin-ui composes the begin/finish round-trip and never exposes
|
|
19180
19189
|
* the cap to non-admins.
|
|
@@ -19248,6 +19257,15 @@ response: zod.z.record(zod.z.string(), zod.z.unknown()) }), zod.z.object({
|
|
|
19248
19257
|
kind: "mutation",
|
|
19249
19258
|
auth: "admin",
|
|
19250
19259
|
access: "delete"
|
|
19260
|
+
}),
|
|
19261
|
+
getSecondFactorPreference: require_sleep.method(zod.z.object({ userId: zod.z.string() }), zod.z.object({ enabled: zod.z.boolean() }), { auth: "admin" }),
|
|
19262
|
+
setSecondFactorPreference: require_sleep.method(zod.z.object({
|
|
19263
|
+
userId: zod.z.string(),
|
|
19264
|
+
enabled: zod.z.boolean()
|
|
19265
|
+
}), zod.z.object({ success: zod.z.literal(true) }), {
|
|
19266
|
+
kind: "mutation",
|
|
19267
|
+
auth: "admin",
|
|
19268
|
+
access: "create"
|
|
19251
19269
|
})
|
|
19252
19270
|
}
|
|
19253
19271
|
};
|
|
@@ -27948,6 +27966,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
27948
27966
|
addonId: null,
|
|
27949
27967
|
access: "create"
|
|
27950
27968
|
},
|
|
27969
|
+
"userPasskeys.getSecondFactorPreference": {
|
|
27970
|
+
capName: "user-passkeys",
|
|
27971
|
+
capScope: "system",
|
|
27972
|
+
addonId: null,
|
|
27973
|
+
access: "view"
|
|
27974
|
+
},
|
|
27951
27975
|
"userPasskeys.listPasskeys": {
|
|
27952
27976
|
capName: "user-passkeys",
|
|
27953
27977
|
capScope: "system",
|
|
@@ -27960,6 +27984,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
27960
27984
|
addonId: null,
|
|
27961
27985
|
access: "delete"
|
|
27962
27986
|
},
|
|
27987
|
+
"userPasskeys.setSecondFactorPreference": {
|
|
27988
|
+
capName: "user-passkeys",
|
|
27989
|
+
capScope: "system",
|
|
27990
|
+
addonId: null,
|
|
27991
|
+
access: "create"
|
|
27992
|
+
},
|
|
27963
27993
|
"vacuumControl.locate": {
|
|
27964
27994
|
capName: "vacuum-control",
|
|
27965
27995
|
capScope: "device",
|
package/dist/index.mjs
CHANGED
|
@@ -19174,6 +19174,15 @@ getTurnServers: method(z.void(), z.array(TurnServerSchema).readonly()) }
|
|
|
19174
19174
|
* - `listPasskeys({userId})` — enumerate user's enrolled credentials.
|
|
19175
19175
|
* - `removePasskey({userId, credentialId})` — revoke one credential.
|
|
19176
19176
|
*
|
|
19177
|
+
* 4. Second-factor preference (opt-in, default OFF):
|
|
19178
|
+
* Enrolling a passkey only enables passkey-FIRST sign-in. It is
|
|
19179
|
+
* demanded as a second factor after a password login ONLY when the
|
|
19180
|
+
* user explicitly opts in via `setSecondFactorPreference`.
|
|
19181
|
+
* - `getSecondFactorPreference({userId})` → `{ enabled }` (missing
|
|
19182
|
+
* row ⇒ `enabled: false`).
|
|
19183
|
+
* - `setSecondFactorPreference({userId, enabled})` — persisted by
|
|
19184
|
+
* the providing addon beside its credentials.
|
|
19185
|
+
*
|
|
19177
19186
|
* Challenges are short-lived (5 min, in-memory). The cap is internal —
|
|
19178
19187
|
* the admin-ui composes the begin/finish round-trip and never exposes
|
|
19179
19188
|
* the cap to non-admins.
|
|
@@ -19247,6 +19256,15 @@ response: z.record(z.string(), z.unknown()) }), z.object({
|
|
|
19247
19256
|
kind: "mutation",
|
|
19248
19257
|
auth: "admin",
|
|
19249
19258
|
access: "delete"
|
|
19259
|
+
}),
|
|
19260
|
+
getSecondFactorPreference: method(z.object({ userId: z.string() }), z.object({ enabled: z.boolean() }), { auth: "admin" }),
|
|
19261
|
+
setSecondFactorPreference: method(z.object({
|
|
19262
|
+
userId: z.string(),
|
|
19263
|
+
enabled: z.boolean()
|
|
19264
|
+
}), z.object({ success: z.literal(true) }), {
|
|
19265
|
+
kind: "mutation",
|
|
19266
|
+
auth: "admin",
|
|
19267
|
+
access: "create"
|
|
19250
19268
|
})
|
|
19251
19269
|
}
|
|
19252
19270
|
};
|
|
@@ -27947,6 +27965,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
27947
27965
|
addonId: null,
|
|
27948
27966
|
access: "create"
|
|
27949
27967
|
},
|
|
27968
|
+
"userPasskeys.getSecondFactorPreference": {
|
|
27969
|
+
capName: "user-passkeys",
|
|
27970
|
+
capScope: "system",
|
|
27971
|
+
addonId: null,
|
|
27972
|
+
access: "view"
|
|
27973
|
+
},
|
|
27950
27974
|
"userPasskeys.listPasskeys": {
|
|
27951
27975
|
capName: "user-passkeys",
|
|
27952
27976
|
capScope: "system",
|
|
@@ -27959,6 +27983,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
27959
27983
|
addonId: null,
|
|
27960
27984
|
access: "delete"
|
|
27961
27985
|
},
|
|
27986
|
+
"userPasskeys.setSecondFactorPreference": {
|
|
27987
|
+
capName: "user-passkeys",
|
|
27988
|
+
capScope: "system",
|
|
27989
|
+
addonId: null,
|
|
27990
|
+
access: "create"
|
|
27991
|
+
},
|
|
27962
27992
|
"vacuumControl.locate": {
|
|
27963
27993
|
capName: "vacuum-control",
|
|
27964
27994
|
capScope: "device",
|