@robelest/convex-auth 0.0.4-preview.32 → 0.0.4-preview.34
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/component/_generated/component.d.ts +1611 -2039
- package/dist/component/account.js +3 -0
- package/dist/component/convex.config.d.ts +2 -2
- package/dist/component/factor/device.js +3 -0
- package/dist/component/factor/passkey.js +3 -0
- package/dist/component/factor/totp.js +3 -0
- package/dist/component/group/invite.js +3 -0
- package/dist/component/group/member.js +3 -0
- package/dist/component/group.js +3 -0
- package/dist/component/model.d.ts +342 -30
- package/dist/component/model.js +22 -4
- package/dist/component/modules.js +24 -21
- package/dist/component/public/factors/devices.js +37 -106
- package/dist/component/public/factors/passkeys.js +29 -149
- package/dist/component/public/factors/totp.js +32 -159
- package/dist/component/public/groups/core.js +19 -82
- package/dist/component/public/groups/invites.js +15 -104
- package/dist/component/public/groups/members.js +26 -149
- package/dist/component/public/identity/accounts.js +12 -94
- package/dist/component/public/identity/codes.js +13 -73
- package/dist/component/public/identity/sessions.js +5 -107
- package/dist/component/public/identity/tokens.js +13 -103
- package/dist/component/public/identity/users.js +188 -185
- package/dist/component/public/identity/verifiers.js +17 -80
- package/dist/component/public/security/keys.js +13 -120
- package/dist/component/public/security/limits.js +0 -43
- package/dist/component/public/sso/audit.js +0 -28
- package/dist/component/public/sso/core.js +31 -104
- package/dist/component/public/sso/domains.js +0 -71
- package/dist/component/public/sso/scim.js +63 -239
- package/dist/component/public/sso/secrets.js +0 -30
- package/dist/component/public/sso/webhooks.js +23 -128
- package/dist/component/rateLimit.js +3 -0
- package/dist/component/schema.d.ts +378 -342
- package/dist/component/schema.js +11 -1
- package/dist/component/session.js +3 -0
- package/dist/component/sso/audit.js +3 -0
- package/dist/component/sso/connection/domain/verification.js +3 -0
- package/dist/component/sso/connection/domain.js +3 -0
- package/dist/component/sso/connection/scim/config.js +3 -0
- package/dist/component/sso/connection/scim/identity.js +3 -0
- package/dist/component/sso/connection/secret.js +3 -0
- package/dist/component/sso/connection.js +3 -0
- package/dist/component/sso/webhook/delivery.js +3 -0
- package/dist/component/sso/webhook/endpoint.js +3 -0
- package/dist/component/token/pkce.js +3 -0
- package/dist/component/token/refresh.js +3 -0
- package/dist/component/token/verification.js +3 -0
- package/dist/component/user/email.js +3 -0
- package/dist/component/user/key.js +3 -0
- package/dist/component/user.js +62 -0
- package/dist/core/index.d.ts +131 -28
- package/dist/core/index.js +2 -0
- package/dist/model.js +391 -0
- package/dist/providers/credentials.d.ts +1 -1
- package/dist/providers/github.js +6 -0
- package/dist/providers/password.js +1 -2
- package/dist/server/auth.d.ts +73 -7
- package/dist/server/auth.js +4 -1
- package/dist/server/context.js +30 -3
- package/dist/server/contract.js +42 -42
- package/dist/server/core.js +224 -86
- package/dist/server/db.js +45 -37
- package/dist/server/facade.d.ts +39 -0
- package/dist/server/facade.js +16 -0
- package/dist/server/index.d.ts +5 -3
- package/dist/server/index.js +3 -1
- package/dist/server/mounts.d.ts +101 -101
- package/dist/server/mutations/credentials/signin.js +3 -7
- package/dist/server/mutations/oauth.js +9 -6
- package/dist/server/runtime.d.ts +147 -46
- package/dist/server/runtime.js +10 -8
- package/dist/server/services/group.js +9 -9
- package/dist/server/sso/domain.d.ts +1 -1
- package/dist/server/sso/domain.js +40 -40
- package/dist/server/sso/http.js +18 -18
- package/dist/server/sso/oidc.js +1 -1
- package/dist/server/sso/policies.js +3 -3
- package/dist/server/sso/policy.js +12 -4
- package/dist/server/sso/provision.js +9 -9
- package/dist/server/sso/validators.js +2 -2
- package/dist/server/sso/webhook.js +8 -8
- package/dist/server/types.d.ts +185 -124
- package/dist/server/types.js +29 -24
- package/dist/server/users.js +49 -2
- package/dist/server/validators.d.ts +745 -0
- package/dist/server/validators.js +60 -0
- package/package.json +1 -1
- package/dist/component/public.js +0 -22
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as convex_values1267 from "convex/values";
|
|
2
|
+
import * as convex_server93 from "convex/server";
|
|
3
3
|
|
|
4
4
|
//#region src/component/schema.d.ts
|
|
5
5
|
/**
|
|
@@ -9,48 +9,84 @@ import * as convex_server80 from "convex/server";
|
|
|
9
9
|
* verification codes, PKCE verifiers, rate limits) and hierarchical group
|
|
10
10
|
* management (groups, members, invites).
|
|
11
11
|
*/
|
|
12
|
-
declare const _default:
|
|
12
|
+
declare const _default: convex_server93.SchemaDefinition<{
|
|
13
13
|
/**
|
|
14
14
|
* Authenticated users. A user may have multiple linked accounts
|
|
15
15
|
* and multiple concurrent sessions.
|
|
16
16
|
*/
|
|
17
|
-
User:
|
|
18
|
-
name?: string | undefined;
|
|
17
|
+
User: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
19
18
|
email?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
20
|
image?: string | undefined;
|
|
21
|
-
phone?: string | undefined;
|
|
22
21
|
extend?: any;
|
|
23
22
|
emailVerificationTime?: number | undefined;
|
|
23
|
+
phone?: string | undefined;
|
|
24
24
|
phoneVerificationTime?: number | undefined;
|
|
25
25
|
isAnonymous?: boolean | undefined;
|
|
26
|
-
|
|
26
|
+
lastActiveGroup?: convex_values1267.GenericId<"Group"> | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
name:
|
|
29
|
-
image:
|
|
30
|
-
email:
|
|
31
|
-
emailVerificationTime:
|
|
32
|
-
phone:
|
|
33
|
-
phoneVerificationTime:
|
|
34
|
-
isAnonymous:
|
|
35
|
-
|
|
36
|
-
extend:
|
|
37
|
-
}, "required", "
|
|
28
|
+
name: convex_values1267.VString<string | undefined, "optional">;
|
|
29
|
+
image: convex_values1267.VString<string | undefined, "optional">;
|
|
30
|
+
email: convex_values1267.VString<string | undefined, "optional">;
|
|
31
|
+
emailVerificationTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
32
|
+
phone: convex_values1267.VString<string | undefined, "optional">;
|
|
33
|
+
phoneVerificationTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
34
|
+
isAnonymous: convex_values1267.VBoolean<boolean | undefined, "optional">;
|
|
35
|
+
lastActiveGroup: convex_values1267.VId<convex_values1267.GenericId<"Group"> | undefined, "optional">;
|
|
36
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
37
|
+
}, "required", "email" | "name" | "image" | "extend" | "emailVerificationTime" | "phone" | "phoneVerificationTime" | "isAnonymous" | "lastActiveGroup" | `extend.${string}`>, {
|
|
38
38
|
email: ["email", "_creationTime"];
|
|
39
39
|
email_verified: ["email", "emailVerificationTime", "_creationTime"];
|
|
40
40
|
phone: ["phone", "_creationTime"];
|
|
41
41
|
phone_verified: ["phone", "phoneVerificationTime", "_creationTime"];
|
|
42
42
|
}, {}, {}>;
|
|
43
|
+
/**
|
|
44
|
+
* All emails a user owns, across providers/connections. `User.email`
|
|
45
|
+
* remains the single denormalized primary pointer (the row with
|
|
46
|
+
* `isPrimary: true`); this table is the source of truth for the full
|
|
47
|
+
* set and carries provenance so SSO linking can be connection-scoped.
|
|
48
|
+
*
|
|
49
|
+
* `verificationTime` present ⇔ the email is verified. `source` and
|
|
50
|
+
* `connectionId` record which provider/SSO connection asserted it —
|
|
51
|
+
* email-based account linking for SSO must stay scoped to the same
|
|
52
|
+
* `connectionId` (see server/users.ts) to avoid cross-IdP takeover.
|
|
53
|
+
*/
|
|
54
|
+
UserEmail: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
55
|
+
provider?: string | undefined;
|
|
56
|
+
connectionId?: convex_values1267.GenericId<"GroupConnection"> | undefined;
|
|
57
|
+
verificationTime?: number | undefined;
|
|
58
|
+
accountId?: convex_values1267.GenericId<"Account"> | undefined;
|
|
59
|
+
email: string;
|
|
60
|
+
source: "saml" | "oidc" | "scim" | "password" | "oauth";
|
|
61
|
+
userId: convex_values1267.GenericId<"User">;
|
|
62
|
+
isPrimary: boolean;
|
|
63
|
+
}, {
|
|
64
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">;
|
|
65
|
+
email: convex_values1267.VString<string, "required">;
|
|
66
|
+
verificationTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
67
|
+
isPrimary: convex_values1267.VBoolean<boolean, "required">;
|
|
68
|
+
source: convex_values1267.VUnion<"saml" | "oidc" | "scim" | "password" | "oauth", [convex_values1267.VLiteral<"password", "required">, convex_values1267.VLiteral<"oauth", "required">, convex_values1267.VLiteral<"oidc", "required">, convex_values1267.VLiteral<"saml", "required">, convex_values1267.VLiteral<"scim", "required">], "required", never>;
|
|
69
|
+
accountId: convex_values1267.VId<convex_values1267.GenericId<"Account"> | undefined, "optional">;
|
|
70
|
+
provider: convex_values1267.VString<string | undefined, "optional">;
|
|
71
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection"> | undefined, "optional">;
|
|
72
|
+
}, "required", "email" | "provider" | "connectionId" | "source" | "userId" | "verificationTime" | "isPrimary" | "accountId">, {
|
|
73
|
+
email: ["email", "_creationTime"];
|
|
74
|
+
email_verified: ["email", "verificationTime", "_creationTime"];
|
|
75
|
+
user_id: ["userId", "_creationTime"];
|
|
76
|
+
user_id_primary: ["userId", "isPrimary", "_creationTime"];
|
|
77
|
+
connection_id_email: ["connectionId", "email", "_creationTime"];
|
|
78
|
+
}, {}, {}>;
|
|
43
79
|
/**
|
|
44
80
|
* Active sessions. A single user can have multiple concurrent sessions
|
|
45
81
|
* across different devices or browsers. Sessions expire after a
|
|
46
82
|
* configurable duration.
|
|
47
83
|
*/
|
|
48
|
-
Session:
|
|
49
|
-
userId:
|
|
84
|
+
Session: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
85
|
+
userId: convex_values1267.GenericId<"User">;
|
|
50
86
|
expirationTime: number;
|
|
51
87
|
}, {
|
|
52
|
-
userId:
|
|
53
|
-
expirationTime:
|
|
88
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">;
|
|
89
|
+
expirationTime: convex_values1267.VFloat64<number, "required">;
|
|
54
90
|
}, "required", "userId" | "expirationTime">, {
|
|
55
91
|
user_id: ["userId", "_creationTime"];
|
|
56
92
|
}, {}, {}>;
|
|
@@ -59,23 +95,23 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
59
95
|
* authentication provider (e.g. Google OAuth, email/password).
|
|
60
96
|
* A user can have multiple accounts linked.
|
|
61
97
|
*/
|
|
62
|
-
Account:
|
|
98
|
+
Account: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
63
99
|
emailVerified?: string | undefined;
|
|
64
100
|
extend?: any;
|
|
65
101
|
secret?: string | undefined;
|
|
66
102
|
phoneVerified?: string | undefined;
|
|
67
|
-
userId: convex_values50.GenericId<"User">;
|
|
68
103
|
provider: string;
|
|
69
104
|
providerAccountId: string;
|
|
105
|
+
userId: convex_values1267.GenericId<"User">;
|
|
70
106
|
}, {
|
|
71
|
-
userId:
|
|
72
|
-
provider:
|
|
73
|
-
providerAccountId:
|
|
74
|
-
secret:
|
|
75
|
-
emailVerified:
|
|
76
|
-
phoneVerified:
|
|
77
|
-
extend:
|
|
78
|
-
}, "required", "emailVerified" | "
|
|
107
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">;
|
|
108
|
+
provider: convex_values1267.VString<string, "required">;
|
|
109
|
+
providerAccountId: convex_values1267.VString<string, "required">;
|
|
110
|
+
secret: convex_values1267.VString<string | undefined, "optional">;
|
|
111
|
+
emailVerified: convex_values1267.VString<string | undefined, "optional">;
|
|
112
|
+
phoneVerified: convex_values1267.VString<string | undefined, "optional">;
|
|
113
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
114
|
+
}, "required", "emailVerified" | "extend" | "provider" | "providerAccountId" | `extend.${string}` | "userId" | "secret" | "phoneVerified">, {
|
|
79
115
|
user_id_provider: ["userId", "provider", "_creationTime"];
|
|
80
116
|
provider_account_id: ["provider", "providerAccountId", "_creationTime"];
|
|
81
117
|
}, {}, {}>;
|
|
@@ -87,16 +123,16 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
87
123
|
* been used yet. A 10-second reuse window allows for concurrent requests.
|
|
88
124
|
* Any invalid use of a token invalidates the entire chain.
|
|
89
125
|
*/
|
|
90
|
-
RefreshToken:
|
|
126
|
+
RefreshToken: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
91
127
|
firstUsedTime?: number | undefined;
|
|
92
|
-
parentRefreshTokenId?:
|
|
128
|
+
parentRefreshTokenId?: convex_values1267.GenericId<"RefreshToken"> | undefined;
|
|
93
129
|
expirationTime: number;
|
|
94
|
-
sessionId:
|
|
130
|
+
sessionId: convex_values1267.GenericId<"Session">;
|
|
95
131
|
}, {
|
|
96
|
-
sessionId:
|
|
97
|
-
expirationTime:
|
|
98
|
-
firstUsedTime:
|
|
99
|
-
parentRefreshTokenId:
|
|
132
|
+
sessionId: convex_values1267.VId<convex_values1267.GenericId<"Session">, "required">;
|
|
133
|
+
expirationTime: convex_values1267.VFloat64<number, "required">;
|
|
134
|
+
firstUsedTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
135
|
+
parentRefreshTokenId: convex_values1267.VId<convex_values1267.GenericId<"RefreshToken"> | undefined, "optional">;
|
|
100
136
|
}, "required", "expirationTime" | "sessionId" | "firstUsedTime" | "parentRefreshTokenId">, {
|
|
101
137
|
session_id: ["sessionId", "_creationTime"];
|
|
102
138
|
session_id_first_used: ["sessionId", "firstUsedTime", "_creationTime"];
|
|
@@ -105,23 +141,23 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
105
141
|
/**
|
|
106
142
|
* Verification codes for OTP tokens, magic link tokens, and OAuth codes.
|
|
107
143
|
*/
|
|
108
|
-
VerificationCode:
|
|
144
|
+
VerificationCode: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
109
145
|
emailVerified?: string | undefined;
|
|
110
146
|
phoneVerified?: string | undefined;
|
|
111
147
|
verifier?: string | undefined;
|
|
112
|
-
expirationTime: number;
|
|
113
148
|
provider: string;
|
|
114
|
-
accountId:
|
|
149
|
+
accountId: convex_values1267.GenericId<"Account">;
|
|
150
|
+
expirationTime: number;
|
|
115
151
|
code: string;
|
|
116
152
|
}, {
|
|
117
|
-
accountId:
|
|
118
|
-
provider:
|
|
119
|
-
code:
|
|
120
|
-
expirationTime:
|
|
121
|
-
verifier:
|
|
122
|
-
emailVerified:
|
|
123
|
-
phoneVerified:
|
|
124
|
-
}, "required", "emailVerified" | "
|
|
153
|
+
accountId: convex_values1267.VId<convex_values1267.GenericId<"Account">, "required">;
|
|
154
|
+
provider: convex_values1267.VString<string, "required">;
|
|
155
|
+
code: convex_values1267.VString<string, "required">;
|
|
156
|
+
expirationTime: convex_values1267.VFloat64<number, "required">;
|
|
157
|
+
verifier: convex_values1267.VString<string | undefined, "optional">;
|
|
158
|
+
emailVerified: convex_values1267.VString<string | undefined, "optional">;
|
|
159
|
+
phoneVerified: convex_values1267.VString<string | undefined, "optional">;
|
|
160
|
+
}, "required", "emailVerified" | "provider" | "accountId" | "expirationTime" | "phoneVerified" | "code" | "verifier">, {
|
|
125
161
|
account_id: ["accountId", "_creationTime"];
|
|
126
162
|
code: ["code", "_creationTime"];
|
|
127
163
|
}, {}, {}>;
|
|
@@ -129,14 +165,14 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
129
165
|
* PKCE verifiers for OAuth flows. Stores the cryptographic verifier
|
|
130
166
|
* used to prove the authorization request originated from this client.
|
|
131
167
|
*/
|
|
132
|
-
AuthVerifier:
|
|
168
|
+
AuthVerifier: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
133
169
|
expirationTime?: number | undefined;
|
|
134
|
-
sessionId?:
|
|
170
|
+
sessionId?: convex_values1267.GenericId<"Session"> | undefined;
|
|
135
171
|
signature?: string | undefined;
|
|
136
172
|
}, {
|
|
137
|
-
sessionId:
|
|
138
|
-
signature:
|
|
139
|
-
expirationTime:
|
|
173
|
+
sessionId: convex_values1267.VId<convex_values1267.GenericId<"Session"> | undefined, "optional">;
|
|
174
|
+
signature: convex_values1267.VString<string | undefined, "optional">;
|
|
175
|
+
expirationTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
140
176
|
}, "required", "expirationTime" | "sessionId" | "signature">, {
|
|
141
177
|
signature: ["signature", "_creationTime"];
|
|
142
178
|
}, {}, {}>;
|
|
@@ -145,31 +181,31 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
145
181
|
* registered authenticator (Touch ID, Face ID, security key, etc.).
|
|
146
182
|
* A user can have multiple passkeys across different devices.
|
|
147
183
|
*/
|
|
148
|
-
Passkey:
|
|
184
|
+
Passkey: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
149
185
|
name?: string | undefined;
|
|
150
|
-
lastUsedAt?: number | undefined;
|
|
151
186
|
transports?: string[] | undefined;
|
|
152
|
-
|
|
153
|
-
|
|
187
|
+
lastUsedAt?: number | undefined;
|
|
188
|
+
userId: convex_values1267.GenericId<"User">;
|
|
154
189
|
credentialId: string;
|
|
155
190
|
publicKey: ArrayBuffer;
|
|
156
191
|
algorithm: number;
|
|
157
192
|
counter: number;
|
|
158
193
|
deviceType: string;
|
|
159
194
|
backedUp: boolean;
|
|
195
|
+
createdAt: number;
|
|
160
196
|
}, {
|
|
161
|
-
userId:
|
|
162
|
-
credentialId:
|
|
163
|
-
publicKey:
|
|
164
|
-
algorithm:
|
|
165
|
-
counter:
|
|
166
|
-
transports:
|
|
167
|
-
deviceType:
|
|
168
|
-
backedUp:
|
|
169
|
-
name:
|
|
170
|
-
createdAt:
|
|
171
|
-
lastUsedAt:
|
|
172
|
-
}, "required", "name" | "
|
|
197
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">; /** Base64url-encoded credential ID from the authenticator. */
|
|
198
|
+
credentialId: convex_values1267.VString<string, "required">; /** Public key bytes (SEC1 uncompressed for EC, SPKI for RSA). */
|
|
199
|
+
publicKey: convex_values1267.VBytes<ArrayBuffer, "required">; /** COSE algorithm identifier (-7 for ES256, -257 for RS256, -8 for EdDSA). */
|
|
200
|
+
algorithm: convex_values1267.VFloat64<number, "required">; /** Signature counter for clone detection. Many authenticators return 0. */
|
|
201
|
+
counter: convex_values1267.VFloat64<number, "required">; /** Authenticator transport hints (e.g. "internal", "hybrid", "usb", "ble", "nfc"). */
|
|
202
|
+
transports: convex_values1267.VArray<string[] | undefined, convex_values1267.VString<string, "required">, "optional">; /** Whether this is a single-device or multi-device (synced) credential. */
|
|
203
|
+
deviceType: convex_values1267.VString<string, "required">; /** Whether the credential is backed up (synced passkey). */
|
|
204
|
+
backedUp: convex_values1267.VBoolean<boolean, "required">; /** User-assigned friendly name (e.g. "MacBook Touch ID"). */
|
|
205
|
+
name: convex_values1267.VString<string | undefined, "optional">;
|
|
206
|
+
createdAt: convex_values1267.VFloat64<number, "required">;
|
|
207
|
+
lastUsedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
208
|
+
}, "required", "name" | "userId" | "credentialId" | "publicKey" | "algorithm" | "counter" | "transports" | "deviceType" | "backedUp" | "createdAt" | "lastUsedAt">, {
|
|
173
209
|
user_id: ["userId", "_creationTime"];
|
|
174
210
|
credential_id: ["credentialId", "_creationTime"];
|
|
175
211
|
}, {}, {}>;
|
|
@@ -182,25 +218,25 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
182
218
|
* by successfully entering a code from their authenticator app.
|
|
183
219
|
* Unverified enrollments are in-progress setup that can be discarded.
|
|
184
220
|
*/
|
|
185
|
-
TotpFactor:
|
|
221
|
+
TotpFactor: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
186
222
|
name?: string | undefined;
|
|
187
223
|
lastUsedAt?: number | undefined;
|
|
188
|
-
userId:
|
|
189
|
-
|
|
224
|
+
userId: convex_values1267.GenericId<"User">;
|
|
225
|
+
verified: boolean;
|
|
190
226
|
secret: ArrayBuffer;
|
|
227
|
+
createdAt: number;
|
|
191
228
|
digits: number;
|
|
192
229
|
period: number;
|
|
193
|
-
verified: boolean;
|
|
194
230
|
}, {
|
|
195
|
-
userId:
|
|
196
|
-
secret:
|
|
197
|
-
digits:
|
|
198
|
-
period:
|
|
199
|
-
verified:
|
|
200
|
-
name:
|
|
201
|
-
createdAt:
|
|
202
|
-
lastUsedAt:
|
|
203
|
-
}, "required", "name" | "
|
|
231
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">; /** Raw TOTP secret key bytes. */
|
|
232
|
+
secret: convex_values1267.VBytes<ArrayBuffer, "required">; /** Number of digits in each code (typically 6). */
|
|
233
|
+
digits: convex_values1267.VFloat64<number, "required">; /** Time period in seconds for code rotation (typically 30). */
|
|
234
|
+
period: convex_values1267.VFloat64<number, "required">; /** Whether setup has been confirmed with a valid code. */
|
|
235
|
+
verified: convex_values1267.VBoolean<boolean, "required">; /** User-assigned friendly name (e.g. "Google Authenticator"). */
|
|
236
|
+
name: convex_values1267.VString<string | undefined, "optional">;
|
|
237
|
+
createdAt: convex_values1267.VFloat64<number, "required">;
|
|
238
|
+
lastUsedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
239
|
+
}, "required", "name" | "userId" | "verified" | "secret" | "createdAt" | "lastUsedAt" | "digits" | "period">, {
|
|
204
240
|
user_id: ["userId", "_creationTime"];
|
|
205
241
|
user_id_verified: ["userId", "verified", "_creationTime"];
|
|
206
242
|
}, {}, {}>;
|
|
@@ -209,9 +245,9 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
209
245
|
* device auth session — the device polls with `deviceCode` while the
|
|
210
246
|
* user authorizes via `userCode` on a secondary device.
|
|
211
247
|
*/
|
|
212
|
-
DeviceCode:
|
|
213
|
-
userId?:
|
|
214
|
-
sessionId?:
|
|
248
|
+
DeviceCode: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
249
|
+
userId?: convex_values1267.GenericId<"User"> | undefined;
|
|
250
|
+
sessionId?: convex_values1267.GenericId<"Session"> | undefined;
|
|
215
251
|
lastPolledAt?: number | undefined;
|
|
216
252
|
status: "pending" | "authorized" | "denied";
|
|
217
253
|
expiresAt: number;
|
|
@@ -219,29 +255,29 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
219
255
|
userCode: string;
|
|
220
256
|
interval: number;
|
|
221
257
|
}, {
|
|
222
|
-
/** High-entropy code used by the device for polling. Stored as SHA-256 hash. */deviceCodeHash:
|
|
223
|
-
userCode:
|
|
224
|
-
expiresAt:
|
|
225
|
-
interval:
|
|
226
|
-
status:
|
|
227
|
-
userId:
|
|
228
|
-
sessionId:
|
|
229
|
-
lastPolledAt:
|
|
230
|
-
}, "required", "
|
|
258
|
+
/** High-entropy code used by the device for polling. Stored as SHA-256 hash. */deviceCodeHash: convex_values1267.VString<string, "required">; /** Short human-readable code the user enters (e.g. "WDJB-MJHT"). */
|
|
259
|
+
userCode: convex_values1267.VString<string, "required">; /** Expiration timestamp (ms since epoch). */
|
|
260
|
+
expiresAt: convex_values1267.VFloat64<number, "required">; /** Minimum polling interval in seconds. */
|
|
261
|
+
interval: convex_values1267.VFloat64<number, "required">; /** Current status of this device authorization session. */
|
|
262
|
+
status: convex_values1267.VUnion<"pending" | "authorized" | "denied", [convex_values1267.VLiteral<"pending", "required">, convex_values1267.VLiteral<"authorized", "required">, convex_values1267.VLiteral<"denied", "required">], "required", never>; /** Set when the user authorizes — links to the authorizing user. */
|
|
263
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User"> | undefined, "optional">; /** Set when the user authorizes — the session created for the device. */
|
|
264
|
+
sessionId: convex_values1267.VId<convex_values1267.GenericId<"Session"> | undefined, "optional">; /** Timestamp of the last poll request (for slow_down enforcement). */
|
|
265
|
+
lastPolledAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
266
|
+
}, "required", "userId" | "status" | "sessionId" | "expiresAt" | "deviceCodeHash" | "userCode" | "interval" | "lastPolledAt">, {
|
|
231
267
|
device_code_hash: ["deviceCodeHash", "_creationTime"];
|
|
232
268
|
user_code_status: ["userCode", "status", "_creationTime"];
|
|
233
269
|
}, {}, {}>;
|
|
234
270
|
/**
|
|
235
271
|
* Rate limit tracking for OTP and password sign-in attempts.
|
|
236
272
|
*/
|
|
237
|
-
RateLimit:
|
|
273
|
+
RateLimit: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
238
274
|
identifier: string;
|
|
239
275
|
last_attempt_time: number;
|
|
240
276
|
attempts_left: number;
|
|
241
277
|
}, {
|
|
242
|
-
identifier:
|
|
243
|
-
last_attempt_time:
|
|
244
|
-
attempts_left:
|
|
278
|
+
identifier: convex_values1267.VString<string, "required">;
|
|
279
|
+
last_attempt_time: convex_values1267.VFloat64<number, "required">;
|
|
280
|
+
attempts_left: convex_values1267.VFloat64<number, "required">;
|
|
245
281
|
}, "required", "identifier" | "last_attempt_time" | "attempts_left">, {
|
|
246
282
|
by_identifier: ["identifier", "_creationTime"];
|
|
247
283
|
}, {}, {}>;
|
|
@@ -250,26 +286,26 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
250
286
|
* Groups can nest arbitrarily deep via `parentGroupId` for modeling
|
|
251
287
|
* organizations, teams, departments, or any tree structure.
|
|
252
288
|
*/
|
|
253
|
-
Group:
|
|
254
|
-
slug?: string | undefined;
|
|
289
|
+
Group: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
255
290
|
type?: string | undefined;
|
|
256
291
|
extend?: any;
|
|
257
|
-
|
|
258
|
-
|
|
292
|
+
slug?: string | undefined;
|
|
293
|
+
parentGroupId?: convex_values1267.GenericId<"Group"> | undefined;
|
|
294
|
+
rootGroupId?: convex_values1267.GenericId<"Group"> | undefined;
|
|
259
295
|
isRoot?: boolean | undefined;
|
|
260
296
|
tags?: {
|
|
261
|
-
key: string;
|
|
262
297
|
value: string;
|
|
298
|
+
key: string;
|
|
263
299
|
}[] | undefined;
|
|
264
300
|
policy?: {
|
|
265
301
|
extend?: any;
|
|
266
|
-
version: 1;
|
|
267
302
|
identity: {
|
|
268
303
|
accountLinking: {
|
|
269
|
-
|
|
270
|
-
|
|
304
|
+
saml: "verifiedEmail" | "none" | "sameConnection";
|
|
305
|
+
oidc: "verifiedEmail" | "none" | "sameConnection";
|
|
271
306
|
};
|
|
272
307
|
};
|
|
308
|
+
version: 1;
|
|
273
309
|
provisioning: {
|
|
274
310
|
user: {
|
|
275
311
|
createOnSignIn: boolean;
|
|
@@ -302,31 +338,31 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
302
338
|
} | undefined;
|
|
303
339
|
name: string;
|
|
304
340
|
}, {
|
|
305
|
-
name:
|
|
306
|
-
slug:
|
|
307
|
-
type:
|
|
308
|
-
parentGroupId:
|
|
309
|
-
rootGroupId:
|
|
310
|
-
isRoot:
|
|
311
|
-
tags:
|
|
312
|
-
key: string;
|
|
341
|
+
name: convex_values1267.VString<string, "required">;
|
|
342
|
+
slug: convex_values1267.VString<string | undefined, "optional">;
|
|
343
|
+
type: convex_values1267.VString<string | undefined, "optional">;
|
|
344
|
+
parentGroupId: convex_values1267.VId<convex_values1267.GenericId<"Group"> | undefined, "optional">; /** Denormalized root group ID. Self-referencing for root groups. */
|
|
345
|
+
rootGroupId: convex_values1267.VId<convex_values1267.GenericId<"Group"> | undefined, "optional">; /** Denormalized flag: `true` when `parentGroupId` is absent. */
|
|
346
|
+
isRoot: convex_values1267.VBoolean<boolean | undefined, "optional">; /** Faceted classification tags. Normalized at write time (trimmed, lowercased). */
|
|
347
|
+
tags: convex_values1267.VArray<{
|
|
313
348
|
value: string;
|
|
314
|
-
}[] | undefined, convex_values50.VObject<{
|
|
315
349
|
key: string;
|
|
350
|
+
}[] | undefined, convex_values1267.VObject<{
|
|
316
351
|
value: string;
|
|
352
|
+
key: string;
|
|
317
353
|
}, {
|
|
318
|
-
key:
|
|
319
|
-
value:
|
|
320
|
-
}, "required", "
|
|
321
|
-
policy:
|
|
354
|
+
key: convex_values1267.VString<string, "required">;
|
|
355
|
+
value: convex_values1267.VString<string, "required">;
|
|
356
|
+
}, "required", "value" | "key">, "optional">;
|
|
357
|
+
policy: convex_values1267.VObject<{
|
|
322
358
|
extend?: any;
|
|
323
|
-
version: 1;
|
|
324
359
|
identity: {
|
|
325
360
|
accountLinking: {
|
|
326
|
-
|
|
327
|
-
|
|
361
|
+
saml: "verifiedEmail" | "none" | "sameConnection";
|
|
362
|
+
oidc: "verifiedEmail" | "none" | "sameConnection";
|
|
328
363
|
};
|
|
329
364
|
};
|
|
365
|
+
version: 1;
|
|
330
366
|
provisioning: {
|
|
331
367
|
user: {
|
|
332
368
|
createOnSignIn: boolean;
|
|
@@ -357,22 +393,22 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
357
393
|
};
|
|
358
394
|
};
|
|
359
395
|
} | undefined, {
|
|
360
|
-
version:
|
|
361
|
-
identity:
|
|
396
|
+
version: convex_values1267.VLiteral<1, "required">;
|
|
397
|
+
identity: convex_values1267.VObject<{
|
|
362
398
|
accountLinking: {
|
|
363
|
-
|
|
364
|
-
|
|
399
|
+
saml: "verifiedEmail" | "none" | "sameConnection";
|
|
400
|
+
oidc: "verifiedEmail" | "none" | "sameConnection";
|
|
365
401
|
};
|
|
366
402
|
}, {
|
|
367
|
-
accountLinking:
|
|
368
|
-
|
|
369
|
-
|
|
403
|
+
accountLinking: convex_values1267.VObject<{
|
|
404
|
+
saml: "verifiedEmail" | "none" | "sameConnection";
|
|
405
|
+
oidc: "verifiedEmail" | "none" | "sameConnection";
|
|
370
406
|
}, {
|
|
371
|
-
oidc:
|
|
372
|
-
saml:
|
|
373
|
-
}, "required", "
|
|
374
|
-
}, "required", "accountLinking" | "accountLinking.
|
|
375
|
-
provisioning:
|
|
407
|
+
oidc: convex_values1267.VUnion<"verifiedEmail" | "none" | "sameConnection", [convex_values1267.VLiteral<"verifiedEmail", "required">, convex_values1267.VLiteral<"none", "required">, convex_values1267.VLiteral<"sameConnection", "required">], "required", never>;
|
|
408
|
+
saml: convex_values1267.VUnion<"verifiedEmail" | "none" | "sameConnection", [convex_values1267.VLiteral<"verifiedEmail", "required">, convex_values1267.VLiteral<"none", "required">, convex_values1267.VLiteral<"sameConnection", "required">], "required", never>;
|
|
409
|
+
}, "required", "saml" | "oidc">;
|
|
410
|
+
}, "required", "accountLinking" | "accountLinking.saml" | "accountLinking.oidc">;
|
|
411
|
+
provisioning: convex_values1267.VObject<{
|
|
376
412
|
user: {
|
|
377
413
|
createOnSignIn: boolean;
|
|
378
414
|
updateProfileOnLogin: "never" | "missing" | "always";
|
|
@@ -401,59 +437,59 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
401
437
|
source: "protocol";
|
|
402
438
|
};
|
|
403
439
|
}, {
|
|
404
|
-
user:
|
|
440
|
+
user: convex_values1267.VObject<{
|
|
405
441
|
createOnSignIn: boolean;
|
|
406
442
|
updateProfileOnLogin: "never" | "missing" | "always";
|
|
407
443
|
updateProfileFromScim: "never" | "missing" | "always";
|
|
408
444
|
authority: "app" | "sso" | "scim";
|
|
409
445
|
}, {
|
|
410
|
-
createOnSignIn:
|
|
411
|
-
updateProfileOnLogin:
|
|
412
|
-
updateProfileFromScim:
|
|
413
|
-
authority:
|
|
446
|
+
createOnSignIn: convex_values1267.VBoolean<boolean, "required">;
|
|
447
|
+
updateProfileOnLogin: convex_values1267.VUnion<"never" | "missing" | "always", [convex_values1267.VLiteral<"never", "required">, convex_values1267.VLiteral<"missing", "required">, convex_values1267.VLiteral<"always", "required">], "required", never>;
|
|
448
|
+
updateProfileFromScim: convex_values1267.VUnion<"never" | "missing" | "always", [convex_values1267.VLiteral<"never", "required">, convex_values1267.VLiteral<"missing", "required">, convex_values1267.VLiteral<"always", "required">], "required", never>;
|
|
449
|
+
authority: convex_values1267.VUnion<"app" | "sso" | "scim", [convex_values1267.VLiteral<"app", "required">, convex_values1267.VLiteral<"sso", "required">, convex_values1267.VLiteral<"scim", "required">], "required", never>;
|
|
414
450
|
}, "required", "createOnSignIn" | "updateProfileOnLogin" | "updateProfileFromScim" | "authority">;
|
|
415
|
-
scimReuse:
|
|
451
|
+
scimReuse: convex_values1267.VObject<{
|
|
416
452
|
user: "none" | "externalId";
|
|
417
453
|
}, {
|
|
418
|
-
user:
|
|
454
|
+
user: convex_values1267.VUnion<"none" | "externalId", [convex_values1267.VLiteral<"externalId", "required">, convex_values1267.VLiteral<"none", "required">], "required", never>;
|
|
419
455
|
}, "required", "user">;
|
|
420
|
-
jit:
|
|
456
|
+
jit: convex_values1267.VObject<{
|
|
421
457
|
defaultRole?: string | undefined;
|
|
422
458
|
defaultRoleIds?: string[] | undefined;
|
|
423
459
|
mode: "off" | "createUser" | "createUserAndMembership";
|
|
424
460
|
}, {
|
|
425
|
-
mode:
|
|
426
|
-
defaultRole:
|
|
427
|
-
defaultRoleIds:
|
|
461
|
+
mode: convex_values1267.VUnion<"off" | "createUser" | "createUserAndMembership", [convex_values1267.VLiteral<"off", "required">, convex_values1267.VLiteral<"createUser", "required">, convex_values1267.VLiteral<"createUserAndMembership", "required">], "required", never>;
|
|
462
|
+
defaultRole: convex_values1267.VString<string | undefined, "optional">;
|
|
463
|
+
defaultRoleIds: convex_values1267.VArray<string[] | undefined, convex_values1267.VString<string, "required">, "optional">;
|
|
428
464
|
}, "required", "mode" | "defaultRole" | "defaultRoleIds">;
|
|
429
|
-
deprovision:
|
|
465
|
+
deprovision: convex_values1267.VObject<{
|
|
430
466
|
mode: "soft" | "hard";
|
|
431
467
|
}, {
|
|
432
|
-
mode:
|
|
468
|
+
mode: convex_values1267.VUnion<"soft" | "hard", [convex_values1267.VLiteral<"soft", "required">, convex_values1267.VLiteral<"hard", "required">], "required", never>;
|
|
433
469
|
}, "required", "mode">;
|
|
434
|
-
groups:
|
|
470
|
+
groups: convex_values1267.VObject<{
|
|
435
471
|
mapping?: Record<string, string[]> | undefined;
|
|
436
472
|
mode: "ignore" | "sync";
|
|
437
473
|
source: "protocol";
|
|
438
474
|
}, {
|
|
439
|
-
mode:
|
|
440
|
-
source:
|
|
441
|
-
mapping:
|
|
475
|
+
mode: convex_values1267.VUnion<"ignore" | "sync", [convex_values1267.VLiteral<"ignore", "required">, convex_values1267.VLiteral<"sync", "required">], "required", never>;
|
|
476
|
+
source: convex_values1267.VLiteral<"protocol", "required">;
|
|
477
|
+
mapping: convex_values1267.VRecord<Record<string, string[]> | undefined, convex_values1267.VString<string, "required">, convex_values1267.VArray<string[], convex_values1267.VString<string, "required">, "required">, "optional", string>;
|
|
442
478
|
}, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
|
|
443
|
-
roles:
|
|
479
|
+
roles: convex_values1267.VObject<{
|
|
444
480
|
mapping?: Record<string, string[]> | undefined;
|
|
445
481
|
mode: "map" | "ignore";
|
|
446
482
|
source: "protocol";
|
|
447
483
|
}, {
|
|
448
|
-
mode:
|
|
449
|
-
source:
|
|
450
|
-
mapping:
|
|
484
|
+
mode: convex_values1267.VUnion<"map" | "ignore", [convex_values1267.VLiteral<"ignore", "required">, convex_values1267.VLiteral<"map", "required">], "required", never>;
|
|
485
|
+
source: convex_values1267.VLiteral<"protocol", "required">;
|
|
486
|
+
mapping: convex_values1267.VRecord<Record<string, string[]> | undefined, convex_values1267.VString<string, "required">, convex_values1267.VArray<string[], convex_values1267.VString<string, "required">, "required">, "optional", string>;
|
|
451
487
|
}, "required", "mode" | "source" | "mapping" | `mapping.${string}`>;
|
|
452
488
|
}, "required", "user" | "scimReuse" | "jit" | "deprovision" | "groups" | "roles" | "user.createOnSignIn" | "user.updateProfileOnLogin" | "user.updateProfileFromScim" | "user.authority" | "scimReuse.user" | "jit.mode" | "jit.defaultRole" | "jit.defaultRoleIds" | "deprovision.mode" | "groups.mode" | "groups.source" | "groups.mapping" | `groups.mapping.${string}` | "roles.mode" | "roles.source" | "roles.mapping" | `roles.mapping.${string}`>;
|
|
453
|
-
extend:
|
|
454
|
-
}, "optional", "extend" | `extend.${string}` | "version" | "
|
|
455
|
-
extend:
|
|
456
|
-
}, "required", "name" | "
|
|
489
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
490
|
+
}, "optional", "identity" | "extend" | `extend.${string}` | "version" | "provisioning" | "identity.accountLinking" | "identity.accountLinking.saml" | "identity.accountLinking.oidc" | "provisioning.user" | "provisioning.scimReuse" | "provisioning.jit" | "provisioning.deprovision" | "provisioning.groups" | "provisioning.roles" | "provisioning.user.createOnSignIn" | "provisioning.user.updateProfileOnLogin" | "provisioning.user.updateProfileFromScim" | "provisioning.user.authority" | "provisioning.scimReuse.user" | "provisioning.jit.mode" | "provisioning.jit.defaultRole" | "provisioning.jit.defaultRoleIds" | "provisioning.deprovision.mode" | "provisioning.groups.mode" | "provisioning.groups.source" | "provisioning.groups.mapping" | `provisioning.groups.mapping.${string}` | "provisioning.roles.mode" | "provisioning.roles.source" | "provisioning.roles.mapping" | `provisioning.roles.mapping.${string}`>;
|
|
491
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
492
|
+
}, "required", "name" | "type" | "extend" | `extend.${string}` | "slug" | "parentGroupId" | "rootGroupId" | "isRoot" | "tags" | "policy" | "policy.identity" | "policy.extend" | `policy.extend.${string}` | "policy.version" | "policy.provisioning" | "policy.identity.accountLinking" | "policy.identity.accountLinking.saml" | "policy.identity.accountLinking.oidc" | "policy.provisioning.user" | "policy.provisioning.scimReuse" | "policy.provisioning.jit" | "policy.provisioning.deprovision" | "policy.provisioning.groups" | "policy.provisioning.roles" | "policy.provisioning.user.createOnSignIn" | "policy.provisioning.user.updateProfileOnLogin" | "policy.provisioning.user.updateProfileFromScim" | "policy.provisioning.user.authority" | "policy.provisioning.scimReuse.user" | "policy.provisioning.jit.mode" | "policy.provisioning.jit.defaultRole" | "policy.provisioning.jit.defaultRoleIds" | "policy.provisioning.deprovision.mode" | "policy.provisioning.groups.mode" | "policy.provisioning.groups.source" | "policy.provisioning.groups.mapping" | `policy.provisioning.groups.mapping.${string}` | "policy.provisioning.roles.mode" | "policy.provisioning.roles.source" | "policy.provisioning.roles.mapping" | `policy.provisioning.roles.mapping.${string}`>, {
|
|
457
493
|
slug: ["slug", "_creationTime"];
|
|
458
494
|
parent_group_id: ["parentGroupId", "_creationTime"];
|
|
459
495
|
root_group_id: ["rootGroupId", "_creationTime"];
|
|
@@ -466,15 +502,15 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
466
502
|
* Each row maps one `(key, value)` pair to a group. Kept in sync by
|
|
467
503
|
* `groupCreate`, `groupUpdate`, and `groupDelete`.
|
|
468
504
|
*/
|
|
469
|
-
GroupTag:
|
|
470
|
-
key: string;
|
|
505
|
+
GroupTag: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
471
506
|
value: string;
|
|
472
|
-
|
|
507
|
+
key: string;
|
|
508
|
+
group_id: convex_values1267.GenericId<"Group">;
|
|
473
509
|
}, {
|
|
474
|
-
group_id:
|
|
475
|
-
key:
|
|
476
|
-
value:
|
|
477
|
-
}, "required", "
|
|
510
|
+
group_id: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
511
|
+
key: convex_values1267.VString<string, "required">;
|
|
512
|
+
value: convex_values1267.VString<string, "required">;
|
|
513
|
+
}, "required", "value" | "key" | "group_id">, {
|
|
478
514
|
by_group: ["group_id", "_creationTime"];
|
|
479
515
|
by_key_value: ["key", "value", "_creationTime"];
|
|
480
516
|
by_key: ["key", "_creationTime"];
|
|
@@ -484,21 +520,21 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
484
520
|
* role (e.g. "owner", "admin", "member", "viewer"). A user can be a
|
|
485
521
|
* member of multiple groups with different roles in each.
|
|
486
522
|
*/
|
|
487
|
-
GroupMember:
|
|
488
|
-
status?: string | undefined;
|
|
523
|
+
GroupMember: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
489
524
|
extend?: any;
|
|
490
525
|
role?: string | undefined;
|
|
491
526
|
roleIds?: string[] | undefined;
|
|
492
|
-
|
|
493
|
-
groupId:
|
|
527
|
+
status?: string | undefined;
|
|
528
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
529
|
+
userId: convex_values1267.GenericId<"User">;
|
|
494
530
|
}, {
|
|
495
|
-
groupId:
|
|
496
|
-
userId:
|
|
497
|
-
role:
|
|
498
|
-
roleIds:
|
|
499
|
-
status:
|
|
500
|
-
extend:
|
|
501
|
-
}, "required", "
|
|
531
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
532
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">;
|
|
533
|
+
role: convex_values1267.VString<string | undefined, "optional">;
|
|
534
|
+
roleIds: convex_values1267.VArray<string[] | undefined, convex_values1267.VString<string, "required">, "optional">;
|
|
535
|
+
status: convex_values1267.VString<string | undefined, "optional">;
|
|
536
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
537
|
+
}, "required", "extend" | `extend.${string}` | "groupId" | "userId" | "role" | "roleIds" | "status">, {
|
|
502
538
|
group_id: ["groupId", "_creationTime"];
|
|
503
539
|
group_id_user_id: ["groupId", "userId", "_creationTime"];
|
|
504
540
|
group_id_status: ["groupId", "status", "_creationTime"];
|
|
@@ -512,31 +548,31 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
512
548
|
* `email` and `invitedByUserId` are optional to support CLI-generated
|
|
513
549
|
* invite links where neither is known upfront.
|
|
514
550
|
*/
|
|
515
|
-
GroupInvite:
|
|
551
|
+
GroupInvite: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
516
552
|
email?: string | undefined;
|
|
517
|
-
expiresTime?: number | undefined;
|
|
518
|
-
acceptedTime?: number | undefined;
|
|
519
553
|
extend?: any;
|
|
520
|
-
groupId?:
|
|
554
|
+
groupId?: convex_values1267.GenericId<"Group"> | undefined;
|
|
521
555
|
role?: string | undefined;
|
|
522
556
|
roleIds?: string[] | undefined;
|
|
523
|
-
invitedByUserId?:
|
|
524
|
-
|
|
557
|
+
invitedByUserId?: convex_values1267.GenericId<"User"> | undefined;
|
|
558
|
+
expiresTime?: number | undefined;
|
|
559
|
+
acceptedByUserId?: convex_values1267.GenericId<"User"> | undefined;
|
|
560
|
+
acceptedTime?: number | undefined;
|
|
525
561
|
status: "pending" | "accepted" | "revoked" | "expired";
|
|
526
562
|
tokenHash: string;
|
|
527
563
|
}, {
|
|
528
|
-
groupId:
|
|
529
|
-
invitedByUserId:
|
|
530
|
-
email:
|
|
531
|
-
tokenHash:
|
|
532
|
-
role:
|
|
533
|
-
roleIds:
|
|
534
|
-
status:
|
|
535
|
-
expiresTime:
|
|
536
|
-
acceptedByUserId:
|
|
537
|
-
acceptedTime:
|
|
538
|
-
extend:
|
|
539
|
-
}, "required", "email" | "
|
|
564
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group"> | undefined, "optional">;
|
|
565
|
+
invitedByUserId: convex_values1267.VId<convex_values1267.GenericId<"User"> | undefined, "optional">;
|
|
566
|
+
email: convex_values1267.VString<string | undefined, "optional">;
|
|
567
|
+
tokenHash: convex_values1267.VString<string, "required">;
|
|
568
|
+
role: convex_values1267.VString<string | undefined, "optional">;
|
|
569
|
+
roleIds: convex_values1267.VArray<string[] | undefined, convex_values1267.VString<string, "required">, "optional">;
|
|
570
|
+
status: convex_values1267.VUnion<"pending" | "accepted" | "revoked" | "expired", [convex_values1267.VLiteral<"pending", "required">, convex_values1267.VLiteral<"accepted", "required">, convex_values1267.VLiteral<"revoked", "required">, convex_values1267.VLiteral<"expired", "required">], "required", never>;
|
|
571
|
+
expiresTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
572
|
+
acceptedByUserId: convex_values1267.VId<convex_values1267.GenericId<"User"> | undefined, "optional">;
|
|
573
|
+
acceptedTime: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
574
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
575
|
+
}, "required", "email" | "extend" | `extend.${string}` | "groupId" | "role" | "roleIds" | "status" | "invitedByUserId" | "tokenHash" | "expiresTime" | "acceptedByUserId" | "acceptedTime">, {
|
|
540
576
|
token_hash: ["tokenHash", "_creationTime"];
|
|
541
577
|
status: ["status", "_creationTime"];
|
|
542
578
|
email_status: ["email", "status", "_creationTime"];
|
|
@@ -551,23 +587,23 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
551
587
|
* SDK can evolve without forcing schema churn for every protocol-specific
|
|
552
588
|
* field addition.
|
|
553
589
|
*/
|
|
554
|
-
GroupConnection:
|
|
590
|
+
GroupConnection: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
555
591
|
name?: string | undefined;
|
|
556
|
-
slug?: string | undefined;
|
|
557
592
|
extend?: any;
|
|
593
|
+
slug?: string | undefined;
|
|
558
594
|
config?: any;
|
|
595
|
+
protocol: "saml" | "oidc";
|
|
596
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
559
597
|
status: "draft" | "active" | "disabled";
|
|
560
|
-
protocol: "oidc" | "saml";
|
|
561
|
-
groupId: convex_values50.GenericId<"Group">;
|
|
562
598
|
}, {
|
|
563
|
-
groupId:
|
|
564
|
-
slug:
|
|
565
|
-
name:
|
|
566
|
-
protocol:
|
|
567
|
-
status:
|
|
568
|
-
config:
|
|
569
|
-
extend:
|
|
570
|
-
}, "required", "name" | "
|
|
599
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
600
|
+
slug: convex_values1267.VString<string | undefined, "optional">;
|
|
601
|
+
name: convex_values1267.VString<string | undefined, "optional">;
|
|
602
|
+
protocol: convex_values1267.VUnion<"saml" | "oidc", [convex_values1267.VLiteral<"oidc", "required">, convex_values1267.VLiteral<"saml", "required">], "required", never>;
|
|
603
|
+
status: convex_values1267.VUnion<"draft" | "active" | "disabled", [convex_values1267.VLiteral<"draft", "required">, convex_values1267.VLiteral<"active", "required">, convex_values1267.VLiteral<"disabled", "required">], "required", never>;
|
|
604
|
+
config: convex_values1267.VAny<any, "optional", string>;
|
|
605
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
606
|
+
}, "required", "name" | "extend" | "protocol" | `extend.${string}` | "slug" | "groupId" | "status" | "config" | `config.${string}`>, {
|
|
571
607
|
group_id: ["groupId", "_creationTime"];
|
|
572
608
|
slug: ["slug", "_creationTime"];
|
|
573
609
|
status: ["status", "_creationTime"];
|
|
@@ -577,19 +613,19 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
577
613
|
/**
|
|
578
614
|
* Verified or pending domains linked to an group connection record.
|
|
579
615
|
*/
|
|
580
|
-
GroupConnectionDomain:
|
|
616
|
+
GroupConnectionDomain: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
581
617
|
verifiedAt?: number | undefined;
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
domain: string;
|
|
618
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
619
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
585
620
|
isPrimary: boolean;
|
|
621
|
+
domain: string;
|
|
586
622
|
}, {
|
|
587
|
-
connectionId:
|
|
588
|
-
groupId:
|
|
589
|
-
domain:
|
|
590
|
-
isPrimary:
|
|
591
|
-
verifiedAt:
|
|
592
|
-
}, "required", "
|
|
623
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
624
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
625
|
+
domain: convex_values1267.VString<string, "required">;
|
|
626
|
+
isPrimary: convex_values1267.VBoolean<boolean, "required">;
|
|
627
|
+
verifiedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
628
|
+
}, "required", "connectionId" | "groupId" | "isPrimary" | "domain" | "verifiedAt">, {
|
|
593
629
|
connection_id: ["connectionId", "_creationTime"];
|
|
594
630
|
group_id: ["groupId", "_creationTime"];
|
|
595
631
|
domain: ["domain", "_creationTime"];
|
|
@@ -597,27 +633,27 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
597
633
|
/**
|
|
598
634
|
* Pending DNS TXT verification challenges for group connection domains.
|
|
599
635
|
*/
|
|
600
|
-
GroupConnectionDomainVerification:
|
|
601
|
-
|
|
602
|
-
groupId:
|
|
636
|
+
GroupConnectionDomainVerification: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
637
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
638
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
603
639
|
tokenHash: string;
|
|
604
|
-
|
|
640
|
+
expiresAt: number;
|
|
605
641
|
domain: string;
|
|
606
|
-
domainId:
|
|
642
|
+
domainId: convex_values1267.GenericId<"GroupConnectionDomain">;
|
|
607
643
|
recordName: string;
|
|
608
644
|
token: string;
|
|
609
645
|
requestedAt: number;
|
|
610
646
|
}, {
|
|
611
|
-
connectionId:
|
|
612
|
-
groupId:
|
|
613
|
-
domainId:
|
|
614
|
-
domain:
|
|
615
|
-
recordName:
|
|
616
|
-
token:
|
|
617
|
-
tokenHash:
|
|
618
|
-
requestedAt:
|
|
619
|
-
expiresAt:
|
|
620
|
-
}, "required", "
|
|
647
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
648
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
649
|
+
domainId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnectionDomain">, "required">;
|
|
650
|
+
domain: convex_values1267.VString<string, "required">;
|
|
651
|
+
recordName: convex_values1267.VString<string, "required">;
|
|
652
|
+
token: convex_values1267.VString<string, "required">;
|
|
653
|
+
tokenHash: convex_values1267.VString<string, "required">;
|
|
654
|
+
requestedAt: convex_values1267.VFloat64<number, "required">;
|
|
655
|
+
expiresAt: convex_values1267.VFloat64<number, "required">;
|
|
656
|
+
}, "required", "connectionId" | "groupId" | "tokenHash" | "expiresAt" | "domain" | "domainId" | "recordName" | "token" | "requestedAt">, {
|
|
621
657
|
connection_id: ["connectionId", "_creationTime"];
|
|
622
658
|
domain_id: ["domainId", "_creationTime"];
|
|
623
659
|
token_hash: ["tokenHash", "_creationTime"];
|
|
@@ -625,19 +661,19 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
625
661
|
/**
|
|
626
662
|
* Encrypted group connection secrets stored separately from protocol config.
|
|
627
663
|
*/
|
|
628
|
-
GroupConnectionSecret:
|
|
629
|
-
|
|
630
|
-
|
|
664
|
+
GroupConnectionSecret: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
665
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
666
|
+
kind: "oidc_client_secret";
|
|
667
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
631
668
|
ciphertext: string;
|
|
632
669
|
updatedAt: number;
|
|
633
|
-
kind: "oidc_client_secret";
|
|
634
670
|
}, {
|
|
635
|
-
connectionId:
|
|
636
|
-
groupId:
|
|
637
|
-
kind:
|
|
638
|
-
ciphertext:
|
|
639
|
-
updatedAt:
|
|
640
|
-
}, "required", "
|
|
671
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
672
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
673
|
+
kind: convex_values1267.VUnion<"oidc_client_secret", [convex_values1267.VLiteral<"oidc_client_secret", "required">], "required", never>;
|
|
674
|
+
ciphertext: convex_values1267.VString<string, "required">;
|
|
675
|
+
updatedAt: convex_values1267.VFloat64<number, "required">;
|
|
676
|
+
}, "required", "connectionId" | "kind" | "groupId" | "ciphertext" | "updatedAt">, {
|
|
641
677
|
connection_id: ["connectionId", "_creationTime"];
|
|
642
678
|
connection_id_kind: ["connectionId", "kind", "_creationTime"];
|
|
643
679
|
group_id: ["groupId", "_creationTime"];
|
|
@@ -645,23 +681,23 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
645
681
|
/**
|
|
646
682
|
* SCIM configuration for an group connection tenant.
|
|
647
683
|
*/
|
|
648
|
-
GroupConnectionScimConfig:
|
|
684
|
+
GroupConnectionScimConfig: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
649
685
|
extend?: any;
|
|
650
686
|
lastRotatedAt?: number | undefined;
|
|
687
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
688
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
651
689
|
status: "draft" | "active" | "disabled";
|
|
652
|
-
groupId: convex_values50.GenericId<"Group">;
|
|
653
690
|
tokenHash: string;
|
|
654
|
-
connectionId: convex_values50.GenericId<"GroupConnection">;
|
|
655
691
|
basePath: string;
|
|
656
692
|
}, {
|
|
657
|
-
connectionId:
|
|
658
|
-
groupId:
|
|
659
|
-
status:
|
|
660
|
-
basePath:
|
|
661
|
-
tokenHash:
|
|
662
|
-
lastRotatedAt:
|
|
663
|
-
extend:
|
|
664
|
-
}, "required", "
|
|
693
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
694
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
695
|
+
status: convex_values1267.VUnion<"draft" | "active" | "disabled", [convex_values1267.VLiteral<"draft", "required">, convex_values1267.VLiteral<"active", "required">, convex_values1267.VLiteral<"disabled", "required">], "required", never>;
|
|
696
|
+
basePath: convex_values1267.VString<string, "required">;
|
|
697
|
+
tokenHash: convex_values1267.VString<string, "required">;
|
|
698
|
+
lastRotatedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
699
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
700
|
+
}, "required", "extend" | "connectionId" | `extend.${string}` | "groupId" | "status" | "tokenHash" | "basePath" | "lastRotatedAt">, {
|
|
665
701
|
group_connection_id: ["connectionId", "_creationTime"];
|
|
666
702
|
group_id: ["groupId", "_creationTime"];
|
|
667
703
|
token_hash: ["tokenHash", "_creationTime"];
|
|
@@ -670,27 +706,27 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
670
706
|
/**
|
|
671
707
|
* External SCIM identities mapped into local users/groups.
|
|
672
708
|
*/
|
|
673
|
-
GroupConnectionScimIdentity:
|
|
674
|
-
userId?:
|
|
709
|
+
GroupConnectionScimIdentity: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
710
|
+
userId?: convex_values1267.GenericId<"User"> | undefined;
|
|
675
711
|
active?: boolean | undefined;
|
|
676
|
-
mappedGroupId?:
|
|
712
|
+
mappedGroupId?: convex_values1267.GenericId<"Group"> | undefined;
|
|
677
713
|
lastProvisionedAt?: number | undefined;
|
|
678
714
|
raw?: any;
|
|
715
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
679
716
|
externalId: string;
|
|
680
|
-
groupId:
|
|
681
|
-
connectionId: convex_values50.GenericId<"GroupConnection">;
|
|
717
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
682
718
|
resourceType: "user" | "group";
|
|
683
719
|
}, {
|
|
684
|
-
connectionId:
|
|
685
|
-
groupId:
|
|
686
|
-
resourceType:
|
|
687
|
-
externalId:
|
|
688
|
-
userId:
|
|
689
|
-
mappedGroupId:
|
|
690
|
-
lastProvisionedAt:
|
|
691
|
-
active:
|
|
692
|
-
raw:
|
|
693
|
-
}, "required", "
|
|
720
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
721
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
722
|
+
resourceType: convex_values1267.VUnion<"user" | "group", [convex_values1267.VLiteral<"user", "required">, convex_values1267.VLiteral<"group", "required">], "required", never>;
|
|
723
|
+
externalId: convex_values1267.VString<string, "required">;
|
|
724
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User"> | undefined, "optional">;
|
|
725
|
+
mappedGroupId: convex_values1267.VId<convex_values1267.GenericId<"Group"> | undefined, "optional">;
|
|
726
|
+
lastProvisionedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
727
|
+
active: convex_values1267.VBoolean<boolean | undefined, "optional">;
|
|
728
|
+
raw: convex_values1267.VAny<any, "optional", string>;
|
|
729
|
+
}, "required", "connectionId" | "externalId" | "groupId" | "userId" | "active" | "resourceType" | "mappedGroupId" | "lastProvisionedAt" | "raw" | `raw.${string}`>, {
|
|
694
730
|
group_connection_id: ["connectionId", "_creationTime"];
|
|
695
731
|
group_id: ["groupId", "_creationTime"];
|
|
696
732
|
group_connection_id_resource_type_external_id: ["connectionId", "resourceType", "externalId", "_creationTime"];
|
|
@@ -701,33 +737,33 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
701
737
|
/**
|
|
702
738
|
* Immutable audit trail for group connection operations.
|
|
703
739
|
*/
|
|
704
|
-
GroupAuditEvent:
|
|
740
|
+
GroupAuditEvent: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
741
|
+
connectionId?: convex_values1267.GenericId<"GroupConnection"> | undefined;
|
|
705
742
|
metadata?: any;
|
|
706
|
-
connectionId?: convex_values50.GenericId<"GroupConnection"> | undefined;
|
|
707
743
|
actorId?: string | undefined;
|
|
708
744
|
subjectId?: string | undefined;
|
|
709
745
|
requestId?: string | undefined;
|
|
710
746
|
ip?: string | undefined;
|
|
747
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
711
748
|
status: "success" | "failure";
|
|
712
|
-
groupId: convex_values50.GenericId<"Group">;
|
|
713
|
-
actorType: "user" | "scim" | "system" | "api_key" | "webhook";
|
|
714
749
|
eventType: string;
|
|
750
|
+
actorType: "user" | "scim" | "system" | "api_key" | "webhook";
|
|
715
751
|
subjectType: string;
|
|
716
752
|
occurredAt: number;
|
|
717
753
|
}, {
|
|
718
|
-
connectionId:
|
|
719
|
-
groupId:
|
|
720
|
-
eventType:
|
|
721
|
-
actorType:
|
|
722
|
-
actorId:
|
|
723
|
-
subjectType:
|
|
724
|
-
subjectId:
|
|
725
|
-
status:
|
|
726
|
-
occurredAt:
|
|
727
|
-
requestId:
|
|
728
|
-
ip:
|
|
729
|
-
metadata:
|
|
730
|
-
}, "required", "status" | "metadata" | `metadata.${string}` | "
|
|
754
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection"> | undefined, "optional">;
|
|
755
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
756
|
+
eventType: convex_values1267.VString<string, "required">;
|
|
757
|
+
actorType: convex_values1267.VUnion<"user" | "scim" | "system" | "api_key" | "webhook", [convex_values1267.VLiteral<"user", "required">, convex_values1267.VLiteral<"system", "required">, convex_values1267.VLiteral<"scim", "required">, convex_values1267.VLiteral<"api_key", "required">, convex_values1267.VLiteral<"webhook", "required">], "required", never>;
|
|
758
|
+
actorId: convex_values1267.VString<string | undefined, "optional">;
|
|
759
|
+
subjectType: convex_values1267.VString<string, "required">;
|
|
760
|
+
subjectId: convex_values1267.VString<string | undefined, "optional">;
|
|
761
|
+
status: convex_values1267.VUnion<"success" | "failure", [convex_values1267.VLiteral<"success", "required">, convex_values1267.VLiteral<"failure", "required">], "required", never>;
|
|
762
|
+
occurredAt: convex_values1267.VFloat64<number, "required">;
|
|
763
|
+
requestId: convex_values1267.VString<string | undefined, "optional">;
|
|
764
|
+
ip: convex_values1267.VString<string | undefined, "optional">;
|
|
765
|
+
metadata: convex_values1267.VAny<any, "optional", string>;
|
|
766
|
+
}, "required", "connectionId" | "groupId" | "status" | "metadata" | `metadata.${string}` | "eventType" | "actorType" | "actorId" | "subjectType" | "subjectId" | "occurredAt" | "requestId" | "ip">, {
|
|
731
767
|
group_connection_id_occurred_at: ["connectionId", "occurredAt", "_creationTime"];
|
|
732
768
|
group_id_occurred_at: ["groupId", "occurredAt", "_creationTime"];
|
|
733
769
|
event_type_occurred_at: ["eventType", "occurredAt", "_creationTime"];
|
|
@@ -735,31 +771,31 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
735
771
|
/**
|
|
736
772
|
* Webhook endpoints subscribed to group audit and lifecycle events.
|
|
737
773
|
*/
|
|
738
|
-
GroupWebhookEndpoint:
|
|
774
|
+
GroupWebhookEndpoint: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
739
775
|
extend?: any;
|
|
740
|
-
createdByUserId?:
|
|
776
|
+
createdByUserId?: convex_values1267.GenericId<"User"> | undefined;
|
|
741
777
|
lastSuccessAt?: number | undefined;
|
|
742
778
|
lastFailureAt?: number | undefined;
|
|
779
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
780
|
+
groupId: convex_values1267.GenericId<"Group">;
|
|
743
781
|
status: "active" | "disabled";
|
|
744
|
-
groupId: convex_values50.GenericId<"Group">;
|
|
745
|
-
connectionId: convex_values50.GenericId<"GroupConnection">;
|
|
746
782
|
url: string;
|
|
747
783
|
secretHash: string;
|
|
748
784
|
subscriptions: string[];
|
|
749
785
|
failureCount: number;
|
|
750
786
|
}, {
|
|
751
|
-
connectionId:
|
|
752
|
-
groupId:
|
|
753
|
-
url:
|
|
754
|
-
status:
|
|
755
|
-
secretHash:
|
|
756
|
-
subscriptions:
|
|
757
|
-
createdByUserId:
|
|
758
|
-
lastSuccessAt:
|
|
759
|
-
lastFailureAt:
|
|
760
|
-
failureCount:
|
|
761
|
-
extend:
|
|
762
|
-
}, "required", "
|
|
787
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
788
|
+
groupId: convex_values1267.VId<convex_values1267.GenericId<"Group">, "required">;
|
|
789
|
+
url: convex_values1267.VString<string, "required">;
|
|
790
|
+
status: convex_values1267.VUnion<"active" | "disabled", [convex_values1267.VLiteral<"active", "required">, convex_values1267.VLiteral<"disabled", "required">], "required", never>;
|
|
791
|
+
secretHash: convex_values1267.VString<string, "required">;
|
|
792
|
+
subscriptions: convex_values1267.VArray<string[], convex_values1267.VString<string, "required">, "required">;
|
|
793
|
+
createdByUserId: convex_values1267.VId<convex_values1267.GenericId<"User"> | undefined, "optional">;
|
|
794
|
+
lastSuccessAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
795
|
+
lastFailureAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
796
|
+
failureCount: convex_values1267.VFloat64<number, "required">;
|
|
797
|
+
extend: convex_values1267.VAny<any, "optional", string>;
|
|
798
|
+
}, "required", "extend" | "connectionId" | `extend.${string}` | "groupId" | "status" | "url" | "secretHash" | "subscriptions" | "createdByUserId" | "lastSuccessAt" | "lastFailureAt" | "failureCount">, {
|
|
763
799
|
group_connection_id: ["connectionId", "_creationTime"];
|
|
764
800
|
group_id: ["groupId", "_creationTime"];
|
|
765
801
|
status: ["status", "_creationTime"];
|
|
@@ -767,31 +803,31 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
767
803
|
/**
|
|
768
804
|
* Delivery queue for outbound group webhooks.
|
|
769
805
|
*/
|
|
770
|
-
GroupWebhookDelivery:
|
|
771
|
-
auditEventId?:
|
|
806
|
+
GroupWebhookDelivery: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
807
|
+
auditEventId?: convex_values1267.GenericId<"GroupAuditEvent"> | undefined;
|
|
772
808
|
lastAttemptAt?: number | undefined;
|
|
773
809
|
lastResponseStatus?: number | undefined;
|
|
774
810
|
lastError?: string | undefined;
|
|
811
|
+
connectionId: convex_values1267.GenericId<"GroupConnection">;
|
|
775
812
|
status: "pending" | "processing" | "delivered" | "failed";
|
|
776
|
-
connectionId: convex_values50.GenericId<"GroupConnection">;
|
|
777
813
|
eventType: string;
|
|
778
|
-
endpointId:
|
|
814
|
+
endpointId: convex_values1267.GenericId<"GroupWebhookEndpoint">;
|
|
779
815
|
attemptCount: number;
|
|
780
816
|
nextAttemptAt: number;
|
|
781
817
|
payload: any;
|
|
782
818
|
}, {
|
|
783
|
-
connectionId:
|
|
784
|
-
endpointId:
|
|
785
|
-
auditEventId:
|
|
786
|
-
eventType:
|
|
787
|
-
status:
|
|
788
|
-
attemptCount:
|
|
789
|
-
nextAttemptAt:
|
|
790
|
-
lastAttemptAt:
|
|
791
|
-
lastResponseStatus:
|
|
792
|
-
lastError:
|
|
793
|
-
payload:
|
|
794
|
-
}, "required", "
|
|
819
|
+
connectionId: convex_values1267.VId<convex_values1267.GenericId<"GroupConnection">, "required">;
|
|
820
|
+
endpointId: convex_values1267.VId<convex_values1267.GenericId<"GroupWebhookEndpoint">, "required">;
|
|
821
|
+
auditEventId: convex_values1267.VId<convex_values1267.GenericId<"GroupAuditEvent"> | undefined, "optional">;
|
|
822
|
+
eventType: convex_values1267.VString<string, "required">;
|
|
823
|
+
status: convex_values1267.VUnion<"pending" | "processing" | "delivered" | "failed", [convex_values1267.VLiteral<"pending", "required">, convex_values1267.VLiteral<"processing", "required">, convex_values1267.VLiteral<"delivered", "required">, convex_values1267.VLiteral<"failed", "required">], "required", never>;
|
|
824
|
+
attemptCount: convex_values1267.VFloat64<number, "required">;
|
|
825
|
+
nextAttemptAt: convex_values1267.VFloat64<number, "required">;
|
|
826
|
+
lastAttemptAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
827
|
+
lastResponseStatus: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
828
|
+
lastError: convex_values1267.VString<string | undefined, "optional">;
|
|
829
|
+
payload: convex_values1267.VAny<any, "required", string>;
|
|
830
|
+
}, "required", "connectionId" | "status" | "eventType" | "endpointId" | "auditEventId" | "attemptCount" | "nextAttemptAt" | "lastAttemptAt" | "lastResponseStatus" | "lastError" | "payload" | `payload.${string}`>, {
|
|
795
831
|
group_connection_id: ["connectionId", "_creationTime"];
|
|
796
832
|
status_next_attempt_at: ["status", "nextAttemptAt", "_creationTime"];
|
|
797
833
|
endpoint_id_status: ["endpointId", "status", "_creationTime"];
|
|
@@ -810,9 +846,8 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
810
846
|
* - **Expiration**: optional TTL
|
|
811
847
|
* - **Soft revocation**: `revoked` flag preserves audit trail
|
|
812
848
|
*/
|
|
813
|
-
ApiKey:
|
|
849
|
+
ApiKey: convex_server93.TableDefinition<convex_values1267.VObject<{
|
|
814
850
|
lastUsedAt?: number | undefined;
|
|
815
|
-
expiresAt?: number | undefined;
|
|
816
851
|
rateLimit?: {
|
|
817
852
|
maxRequests: number;
|
|
818
853
|
windowMs: number;
|
|
@@ -821,52 +856,53 @@ declare const _default: convex_server80.SchemaDefinition<{
|
|
|
821
856
|
attemptsLeft: number;
|
|
822
857
|
lastAttemptTime: number;
|
|
823
858
|
} | undefined;
|
|
859
|
+
expiresAt?: number | undefined;
|
|
824
860
|
metadata?: any;
|
|
825
861
|
name: string;
|
|
862
|
+
userId: convex_values1267.GenericId<"User">;
|
|
826
863
|
revoked: boolean;
|
|
827
|
-
|
|
864
|
+
createdAt: number;
|
|
828
865
|
prefix: string;
|
|
829
866
|
hashedKey: string;
|
|
830
867
|
scopes: {
|
|
831
868
|
resource: string;
|
|
832
869
|
actions: string[];
|
|
833
870
|
}[];
|
|
834
|
-
createdAt: number;
|
|
835
871
|
}, {
|
|
836
|
-
userId:
|
|
837
|
-
prefix:
|
|
838
|
-
hashedKey:
|
|
839
|
-
name:
|
|
840
|
-
scopes:
|
|
872
|
+
userId: convex_values1267.VId<convex_values1267.GenericId<"User">, "required">; /** First chars of the key for display (e.g. "sk_abc1..."). */
|
|
873
|
+
prefix: convex_values1267.VString<string, "required">; /** SHA-256 hex hash of the full raw key. */
|
|
874
|
+
hashedKey: convex_values1267.VString<string, "required">; /** User-assigned name (e.g. "CI Pipeline", "Production API"). */
|
|
875
|
+
name: convex_values1267.VString<string, "required">; /** Scoped permissions: [{ resource: "users", actions: ["read", "list"] }]. */
|
|
876
|
+
scopes: convex_values1267.VArray<{
|
|
841
877
|
resource: string;
|
|
842
878
|
actions: string[];
|
|
843
|
-
}[],
|
|
879
|
+
}[], convex_values1267.VObject<{
|
|
844
880
|
resource: string;
|
|
845
881
|
actions: string[];
|
|
846
882
|
}, {
|
|
847
|
-
resource:
|
|
848
|
-
actions:
|
|
883
|
+
resource: convex_values1267.VString<string, "required">;
|
|
884
|
+
actions: convex_values1267.VArray<string[], convex_values1267.VString<string, "required">, "required">;
|
|
849
885
|
}, "required", "resource" | "actions">, "required">; /** Optional per-key rate limit configuration. */
|
|
850
|
-
rateLimit:
|
|
886
|
+
rateLimit: convex_values1267.VObject<{
|
|
851
887
|
maxRequests: number;
|
|
852
888
|
windowMs: number;
|
|
853
889
|
} | undefined, {
|
|
854
|
-
maxRequests:
|
|
855
|
-
windowMs:
|
|
890
|
+
maxRequests: convex_values1267.VFloat64<number, "required">;
|
|
891
|
+
windowMs: convex_values1267.VFloat64<number, "required">;
|
|
856
892
|
}, "optional", "maxRequests" | "windowMs">; /** Rate limit state tracking (token-bucket). */
|
|
857
|
-
rateLimitState:
|
|
893
|
+
rateLimitState: convex_values1267.VObject<{
|
|
858
894
|
attemptsLeft: number;
|
|
859
895
|
lastAttemptTime: number;
|
|
860
896
|
} | undefined, {
|
|
861
|
-
attemptsLeft:
|
|
862
|
-
lastAttemptTime:
|
|
897
|
+
attemptsLeft: convex_values1267.VFloat64<number, "required">;
|
|
898
|
+
lastAttemptTime: convex_values1267.VFloat64<number, "required">;
|
|
863
899
|
}, "optional", "attemptsLeft" | "lastAttemptTime">; /** Expiration timestamp. Null/undefined = never expires. */
|
|
864
|
-
expiresAt:
|
|
865
|
-
lastUsedAt:
|
|
866
|
-
createdAt:
|
|
867
|
-
revoked:
|
|
868
|
-
metadata:
|
|
869
|
-
}, "required", "name" | "
|
|
900
|
+
expiresAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
901
|
+
lastUsedAt: convex_values1267.VFloat64<number | undefined, "optional">;
|
|
902
|
+
createdAt: convex_values1267.VFloat64<number, "required">; /** Soft-revoke flag. Revoked keys are kept for audit trail. */
|
|
903
|
+
revoked: convex_values1267.VBoolean<boolean, "required">; /** Arbitrary app-specific metadata attached to the key. */
|
|
904
|
+
metadata: convex_values1267.VAny<any, "optional", string>;
|
|
905
|
+
}, "required", "name" | "userId" | "revoked" | "createdAt" | "lastUsedAt" | "prefix" | "hashedKey" | "scopes" | "rateLimit" | "rateLimitState" | "expiresAt" | "metadata" | "rateLimit.maxRequests" | "rateLimit.windowMs" | "rateLimitState.attemptsLeft" | "rateLimitState.lastAttemptTime" | `metadata.${string}`>, {
|
|
870
906
|
user_id: ["userId", "_creationTime"];
|
|
871
907
|
hashed_key: ["hashedKey", "_creationTime"];
|
|
872
908
|
}, {}, {}>;
|