@jive-sh/server-client 0.8.0 → 0.10.0

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.
@@ -32,7 +32,39 @@ export declare const api: {
32
32
  }
33
33
  >;
34
34
  };
35
+ approvalDevices: {
36
+ disable: FunctionReference<
37
+ "mutation",
38
+ "public",
39
+ { expoPushToken: string; sessionToken: string },
40
+ null
41
+ >;
42
+ enable: FunctionReference<
43
+ "mutation",
44
+ "public",
45
+ { expoPushToken: string; label: string; sessionToken: string },
46
+ null
47
+ >;
48
+ list: FunctionReference<
49
+ "query",
50
+ "public",
51
+ { sessionToken: string },
52
+ null | Array<{ createdAt: number; expoPushToken: string; label: string }>
53
+ >;
54
+ };
35
55
  auth: {
56
+ addPasskey: FunctionReference<
57
+ "action",
58
+ "public",
59
+ { challenge: string; response: any; sessionToken: string },
60
+ null
61
+ >;
62
+ addPasskeyOptions: FunctionReference<
63
+ "action",
64
+ "public",
65
+ { sessionToken: string },
66
+ { options: any }
67
+ >;
36
68
  register: FunctionReference<
37
69
  "action",
38
70
  "public",
@@ -167,8 +199,9 @@ export declare const api: {
167
199
  open: FunctionReference<
168
200
  "action",
169
201
  "public",
170
- {},
202
+ { previousSessionToken?: string },
171
203
  {
204
+ approvalDevices: number;
172
205
  claimSecret: string;
173
206
  expiresAt: number;
174
207
  loginUrl: string;
@@ -207,7 +240,44 @@ export declare const api: {
207
240
  * ```
208
241
  */
209
242
  export declare const internal: {
243
+ approvalDevices: {
244
+ forgetUnregistered: FunctionReference<
245
+ "mutation",
246
+ "internal",
247
+ { expoPushTokens: Array<string> },
248
+ null
249
+ >;
250
+ pushSignInRequest: FunctionReference<
251
+ "action",
252
+ "internal",
253
+ { accountId: Id<"accounts">; expiresAt: number; requestId: string },
254
+ null
255
+ >;
256
+ pushTargets: FunctionReference<
257
+ "query",
258
+ "internal",
259
+ { accountId: Id<"accounts"> },
260
+ { expoPushTokens: Array<string>; username: string }
261
+ >;
262
+ };
210
263
  auth: {
264
+ accountOfSession: FunctionReference<
265
+ "query",
266
+ "internal",
267
+ { sessionToken: string },
268
+ null | {
269
+ accountId: Id<"accounts">;
270
+ credentialIds: Array<string>;
271
+ username: string;
272
+ webAuthnUserId: string;
273
+ }
274
+ >;
275
+ attachPasskey: FunctionReference<
276
+ "mutation",
277
+ "internal",
278
+ { accountId: Id<"accounts">; credentialId: string; publicKey: string },
279
+ null
280
+ >;
211
281
  createAccount: FunctionReference<
212
282
  "mutation",
213
283
  "internal",
@@ -250,15 +320,22 @@ export declare const internal: {
250
320
  spendChallenge: FunctionReference<
251
321
  "mutation",
252
322
  "internal",
253
- { challengeHash: string; purpose: "registration" | "signIn" },
254
- null | { registration?: { username: string; webAuthnUserId: string } }
323
+ {
324
+ challengeHash: string;
325
+ purpose: "registration" | "signIn" | "addPasskey";
326
+ },
327
+ null | {
328
+ accountId?: Id<"accounts">;
329
+ registration?: { username: string; webAuthnUserId: string };
330
+ }
255
331
  >;
256
332
  storeChallenge: FunctionReference<
257
333
  "mutation",
258
334
  "internal",
259
335
  {
336
+ accountId?: Id<"accounts">;
260
337
  challengeHash: string;
261
- purpose: "registration" | "signIn";
338
+ purpose: "registration" | "signIn" | "addPasskey";
262
339
  registration?: { username: string; webAuthnUserId: string };
263
340
  },
264
341
  null
@@ -401,8 +478,8 @@ export declare const internal: {
401
478
  store: FunctionReference<
402
479
  "mutation",
403
480
  "internal",
404
- { claimSecretHash: string },
405
- { expiresAt: number; requestId: string }
481
+ { claimSecretHash: string; previousSessionTokenHash?: string },
482
+ { approvalDevices: number; expiresAt: number; requestId: string }
406
483
  >;
407
484
  };
408
485
  ssh: {
@@ -45,6 +45,31 @@ export type DataModel = {
45
45
  searchIndexes: {};
46
46
  vectorIndexes: {};
47
47
  };
48
+ approvalDevices: {
49
+ document: {
50
+ accountId: Id<"accounts">;
51
+ createdAt: number;
52
+ expoPushToken: string;
53
+ label: string;
54
+ _id: Id<"approvalDevices">;
55
+ _creationTime: number;
56
+ };
57
+ fieldPaths:
58
+ | "_creationTime"
59
+ | "_id"
60
+ | "accountId"
61
+ | "createdAt"
62
+ | "expoPushToken"
63
+ | "label";
64
+ indexes: {
65
+ by_id: ["_id"];
66
+ by_creation_time: ["_creationTime"];
67
+ by_account: ["accountId", "_creationTime"];
68
+ by_expo_push_token: ["expoPushToken", "_creationTime"];
69
+ };
70
+ searchIndexes: {};
71
+ vectorIndexes: {};
72
+ };
48
73
  codeRepositories: {
49
74
  document: {
50
75
  name: string;
@@ -263,9 +288,10 @@ export type DataModel = {
263
288
  };
264
289
  webAuthnChallenges: {
265
290
  document: {
291
+ accountId?: Id<"accounts">;
266
292
  challengeHash: string;
267
293
  expiresAt: number;
268
- purpose: "registration" | "signIn";
294
+ purpose: "registration" | "signIn" | "addPasskey";
269
295
  registration?: { username: string; webAuthnUserId: string };
270
296
  _id: Id<"webAuthnChallenges">;
271
297
  _creationTime: number;
@@ -273,6 +299,7 @@ export type DataModel = {
273
299
  fieldPaths:
274
300
  | "_creationTime"
275
301
  | "_id"
302
+ | "accountId"
276
303
  | "challengeHash"
277
304
  | "expiresAt"
278
305
  | "purpose"
package/index.js CHANGED
@@ -4,4 +4,4 @@ export const convexUrl = "https://adventurous-viper-740.convex.cloud";
4
4
  /** Where this environment's HTTP actions are served. */
5
5
  export const convexSiteUrl = "https://adventurous-viper-740.convex.site";
6
6
  /** Which deploy these functions came from. */
7
- export const deployment = {"environment":"latest","sourceCommitSha":"70512450ada0853f580c8a3684aeb8a846e08585","version":"0.8.0"};
7
+ export const deployment = {"environment":"latest","sourceCommitSha":"fe34f975cbd4644aa737587c0a16e6fa50f95d63","version":"0.10.0"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jive-sh/server-client",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "license": "MIT",
5
5
  "description": "Jive's central server: the Convex backend that holds accounts, passkeys and sessions, organizations, code repositories, connections and packages; people sign in with jive.sh passkeys, programs through sign-in requests, and pipelines provision packages with their GitHub Actions ID token.",
6
6
  "type": "module",