@jive-sh/server-client 0.1.0 → 0.3.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.
- package/_generated/api.d.ts +167 -2
- package/_generated/dataModel.d.ts +123 -0
- package/index.js +1 -1
- package/package.json +2 -2
package/_generated/api.d.ts
CHANGED
|
@@ -20,11 +20,44 @@ import type { GenericId as Id } from "convex/values";
|
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
22
|
export declare const api: {
|
|
23
|
+
accounts: {
|
|
24
|
+
me: FunctionReference<
|
|
25
|
+
"query",
|
|
26
|
+
"public",
|
|
27
|
+
{ sessionToken: string },
|
|
28
|
+
null | {
|
|
29
|
+
createdAt: number;
|
|
30
|
+
passkeys: Array<{ createdAt: number; credentialId: string }>;
|
|
31
|
+
username: string;
|
|
32
|
+
}
|
|
33
|
+
>;
|
|
34
|
+
};
|
|
35
|
+
auth: {
|
|
36
|
+
register: FunctionReference<
|
|
37
|
+
"action",
|
|
38
|
+
"public",
|
|
39
|
+
{ challenge: string; response: any; signInRequestId?: string },
|
|
40
|
+
{ expiresAt: number; sessionToken: string; username: string }
|
|
41
|
+
>;
|
|
42
|
+
registrationOptions: FunctionReference<
|
|
43
|
+
"action",
|
|
44
|
+
"public",
|
|
45
|
+
{},
|
|
46
|
+
{ options: any }
|
|
47
|
+
>;
|
|
48
|
+
signIn: FunctionReference<
|
|
49
|
+
"action",
|
|
50
|
+
"public",
|
|
51
|
+
{ challenge: string; response: any; signInRequestId?: string },
|
|
52
|
+
{ expiresAt: number; sessionToken: string; username: string }
|
|
53
|
+
>;
|
|
54
|
+
signInOptions: FunctionReference<"action", "public", {}, { options: any }>;
|
|
55
|
+
};
|
|
23
56
|
connections: {
|
|
24
57
|
completeNpmConnection: FunctionReference<
|
|
25
58
|
"action",
|
|
26
59
|
"public",
|
|
27
|
-
{ requestId: string; token: string
|
|
60
|
+
{ requestId: string; token: string },
|
|
28
61
|
null
|
|
29
62
|
>;
|
|
30
63
|
};
|
|
@@ -38,6 +71,42 @@ export declare const api: {
|
|
|
38
71
|
| { reason: string; status: "refused" }
|
|
39
72
|
>;
|
|
40
73
|
};
|
|
74
|
+
sessions: {
|
|
75
|
+
signOut: FunctionReference<
|
|
76
|
+
"mutation",
|
|
77
|
+
"public",
|
|
78
|
+
{ sessionToken: string },
|
|
79
|
+
null
|
|
80
|
+
>;
|
|
81
|
+
};
|
|
82
|
+
signInRequests: {
|
|
83
|
+
claim: FunctionReference<
|
|
84
|
+
"action",
|
|
85
|
+
"public",
|
|
86
|
+
{ claimSecret: string; requestId: string },
|
|
87
|
+
| { status: "pending" }
|
|
88
|
+
| { expiresAt: number; sessionToken: string; status: "approved" }
|
|
89
|
+
| { status: "gone" }
|
|
90
|
+
>;
|
|
91
|
+
describe: FunctionReference<
|
|
92
|
+
"query",
|
|
93
|
+
"public",
|
|
94
|
+
{ requestId: string },
|
|
95
|
+
null | { confirmationCode: string; status: "pending" | "approved" }
|
|
96
|
+
>;
|
|
97
|
+
open: FunctionReference<
|
|
98
|
+
"action",
|
|
99
|
+
"public",
|
|
100
|
+
{},
|
|
101
|
+
{
|
|
102
|
+
claimSecret: string;
|
|
103
|
+
confirmationCode: string;
|
|
104
|
+
expiresAt: number;
|
|
105
|
+
loginUrl: string;
|
|
106
|
+
requestId: string;
|
|
107
|
+
}
|
|
108
|
+
>;
|
|
109
|
+
};
|
|
41
110
|
};
|
|
42
111
|
|
|
43
112
|
/**
|
|
@@ -49,6 +118,69 @@ export declare const api: {
|
|
|
49
118
|
* ```
|
|
50
119
|
*/
|
|
51
120
|
export declare const internal: {
|
|
121
|
+
auth: {
|
|
122
|
+
createAccount: FunctionReference<
|
|
123
|
+
"mutation",
|
|
124
|
+
"internal",
|
|
125
|
+
{
|
|
126
|
+
credentialId: string;
|
|
127
|
+
publicKey: string;
|
|
128
|
+
signInRequestId?: string;
|
|
129
|
+
tokenHash: string;
|
|
130
|
+
username: string;
|
|
131
|
+
webAuthnUserId: string;
|
|
132
|
+
},
|
|
133
|
+
{ expiresAt: number }
|
|
134
|
+
>;
|
|
135
|
+
deleteChallenge: FunctionReference<
|
|
136
|
+
"mutation",
|
|
137
|
+
"internal",
|
|
138
|
+
{ id: Id<"webAuthnChallenges"> },
|
|
139
|
+
null
|
|
140
|
+
>;
|
|
141
|
+
openSession: FunctionReference<
|
|
142
|
+
"mutation",
|
|
143
|
+
"internal",
|
|
144
|
+
{
|
|
145
|
+
accountId: Id<"accounts">;
|
|
146
|
+
signInRequestId?: string;
|
|
147
|
+
tokenHash: string;
|
|
148
|
+
},
|
|
149
|
+
{ expiresAt: number; username: string }
|
|
150
|
+
>;
|
|
151
|
+
passkeyByCredentialId: FunctionReference<
|
|
152
|
+
"query",
|
|
153
|
+
"internal",
|
|
154
|
+
{ credentialId: string },
|
|
155
|
+
null | {
|
|
156
|
+
accountId: Id<"accounts">;
|
|
157
|
+
credentialId: string;
|
|
158
|
+
publicKey: string;
|
|
159
|
+
}
|
|
160
|
+
>;
|
|
161
|
+
spendChallenge: FunctionReference<
|
|
162
|
+
"mutation",
|
|
163
|
+
"internal",
|
|
164
|
+
{ challengeHash: string; purpose: "registration" | "signIn" },
|
|
165
|
+
null | { registration?: { username: string; webAuthnUserId: string } }
|
|
166
|
+
>;
|
|
167
|
+
storeChallenge: FunctionReference<
|
|
168
|
+
"mutation",
|
|
169
|
+
"internal",
|
|
170
|
+
{
|
|
171
|
+
challengeHash: string;
|
|
172
|
+
purpose: "registration" | "signIn";
|
|
173
|
+
registration?: { username: string; webAuthnUserId: string };
|
|
174
|
+
},
|
|
175
|
+
null
|
|
176
|
+
>;
|
|
177
|
+
usernameTaken: FunctionReference<
|
|
178
|
+
"query",
|
|
179
|
+
"internal",
|
|
180
|
+
{ username: string },
|
|
181
|
+
boolean
|
|
182
|
+
>;
|
|
183
|
+
};
|
|
52
184
|
connections: {
|
|
53
185
|
openNpmConnectionRequest: FunctionReference<
|
|
54
186
|
"action",
|
|
@@ -125,6 +257,17 @@ export declare const internal: {
|
|
|
125
257
|
>;
|
|
126
258
|
};
|
|
127
259
|
seed: {
|
|
260
|
+
accountWithPasskey: FunctionReference<
|
|
261
|
+
"mutation",
|
|
262
|
+
"internal",
|
|
263
|
+
{
|
|
264
|
+
credentialId: string;
|
|
265
|
+
passkeyCreatedAt: number;
|
|
266
|
+
publicKey: string;
|
|
267
|
+
webAuthnUserId: string;
|
|
268
|
+
},
|
|
269
|
+
{ created: boolean; username: string }
|
|
270
|
+
>;
|
|
128
271
|
organizationWithRepository: FunctionReference<
|
|
129
272
|
"mutation",
|
|
130
273
|
"internal",
|
|
@@ -143,8 +286,30 @@ export declare const internal: {
|
|
|
143
286
|
}
|
|
144
287
|
>;
|
|
145
288
|
};
|
|
289
|
+
signInRequests: {
|
|
290
|
+
claimWithToken: FunctionReference<
|
|
291
|
+
"mutation",
|
|
292
|
+
"internal",
|
|
293
|
+
{ claimSecretHash: string; requestId: string; tokenHash: string },
|
|
294
|
+
| { status: "pending" }
|
|
295
|
+
| { expiresAt: number; status: "approved" }
|
|
296
|
+
| { status: "gone" }
|
|
297
|
+
>;
|
|
298
|
+
deleteRequest: FunctionReference<
|
|
299
|
+
"mutation",
|
|
300
|
+
"internal",
|
|
301
|
+
{ id: Id<"signInRequests"> },
|
|
302
|
+
null
|
|
303
|
+
>;
|
|
304
|
+
store: FunctionReference<
|
|
305
|
+
"mutation",
|
|
306
|
+
"internal",
|
|
307
|
+
{ claimSecretHash: string; confirmationCode: string },
|
|
308
|
+
{ expiresAt: number; requestId: string }
|
|
309
|
+
>;
|
|
310
|
+
};
|
|
146
311
|
};
|
|
147
312
|
|
|
148
313
|
export declare const components: {
|
|
149
|
-
packageRegistryNpm: import("jive-connector-package-registry-npm/_generated/component.js").ComponentApi<"packageRegistryNpm">;
|
|
314
|
+
packageRegistryNpm: import("jive-resource-connector-package-registry-npm/_generated/component.js").ComponentApi<"packageRegistryNpm">;
|
|
150
315
|
};
|
|
@@ -27,6 +27,24 @@ import type { GenericId } from "convex/values";
|
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
export type DataModel = {
|
|
30
|
+
accounts: {
|
|
31
|
+
document: {
|
|
32
|
+
createdAt: number;
|
|
33
|
+
username: string;
|
|
34
|
+
webAuthnUserId: string;
|
|
35
|
+
_id: Id<"accounts">;
|
|
36
|
+
_creationTime: number;
|
|
37
|
+
};
|
|
38
|
+
fieldPaths:
|
|
39
|
+
"_creationTime" | "_id" | "createdAt" | "username" | "webAuthnUserId";
|
|
40
|
+
indexes: {
|
|
41
|
+
by_id: ["_id"];
|
|
42
|
+
by_creation_time: ["_creationTime"];
|
|
43
|
+
by_username: ["username", "_creationTime"];
|
|
44
|
+
};
|
|
45
|
+
searchIndexes: {};
|
|
46
|
+
vectorIndexes: {};
|
|
47
|
+
};
|
|
30
48
|
codeRepositories: {
|
|
31
49
|
document: {
|
|
32
50
|
name: string;
|
|
@@ -144,6 +162,31 @@ export type DataModel = {
|
|
|
144
162
|
searchIndexes: {};
|
|
145
163
|
vectorIndexes: {};
|
|
146
164
|
};
|
|
165
|
+
passkeys: {
|
|
166
|
+
document: {
|
|
167
|
+
accountId: Id<"accounts">;
|
|
168
|
+
createdAt: number;
|
|
169
|
+
credentialId: string;
|
|
170
|
+
publicKey: string;
|
|
171
|
+
_id: Id<"passkeys">;
|
|
172
|
+
_creationTime: number;
|
|
173
|
+
};
|
|
174
|
+
fieldPaths:
|
|
175
|
+
| "_creationTime"
|
|
176
|
+
| "_id"
|
|
177
|
+
| "accountId"
|
|
178
|
+
| "createdAt"
|
|
179
|
+
| "credentialId"
|
|
180
|
+
| "publicKey";
|
|
181
|
+
indexes: {
|
|
182
|
+
by_id: ["_id"];
|
|
183
|
+
by_creation_time: ["_creationTime"];
|
|
184
|
+
by_account: ["accountId", "_creationTime"];
|
|
185
|
+
by_credential_id: ["credentialId", "_creationTime"];
|
|
186
|
+
};
|
|
187
|
+
searchIndexes: {};
|
|
188
|
+
vectorIndexes: {};
|
|
189
|
+
};
|
|
147
190
|
provisioningClaims: {
|
|
148
191
|
document: {
|
|
149
192
|
expiresAt: number;
|
|
@@ -168,6 +211,86 @@ export type DataModel = {
|
|
|
168
211
|
searchIndexes: {};
|
|
169
212
|
vectorIndexes: {};
|
|
170
213
|
};
|
|
214
|
+
sessions: {
|
|
215
|
+
document: {
|
|
216
|
+
accountId: Id<"accounts">;
|
|
217
|
+
createdAt: number;
|
|
218
|
+
expiresAt: number;
|
|
219
|
+
origin: "browser" | "signInRequest";
|
|
220
|
+
revokedAt?: number;
|
|
221
|
+
tokenHash: string;
|
|
222
|
+
_id: Id<"sessions">;
|
|
223
|
+
_creationTime: number;
|
|
224
|
+
};
|
|
225
|
+
fieldPaths:
|
|
226
|
+
| "_creationTime"
|
|
227
|
+
| "_id"
|
|
228
|
+
| "accountId"
|
|
229
|
+
| "createdAt"
|
|
230
|
+
| "expiresAt"
|
|
231
|
+
| "origin"
|
|
232
|
+
| "revokedAt"
|
|
233
|
+
| "tokenHash";
|
|
234
|
+
indexes: {
|
|
235
|
+
by_id: ["_id"];
|
|
236
|
+
by_creation_time: ["_creationTime"];
|
|
237
|
+
by_account: ["accountId", "_creationTime"];
|
|
238
|
+
by_token_hash: ["tokenHash", "_creationTime"];
|
|
239
|
+
};
|
|
240
|
+
searchIndexes: {};
|
|
241
|
+
vectorIndexes: {};
|
|
242
|
+
};
|
|
243
|
+
signInRequests: {
|
|
244
|
+
document: {
|
|
245
|
+
approvedAccountId?: Id<"accounts">;
|
|
246
|
+
claimSecretHash: string;
|
|
247
|
+
claimedAt?: number;
|
|
248
|
+
confirmationCode: string;
|
|
249
|
+
expiresAt: number;
|
|
250
|
+
_id: Id<"signInRequests">;
|
|
251
|
+
_creationTime: number;
|
|
252
|
+
};
|
|
253
|
+
fieldPaths:
|
|
254
|
+
| "_creationTime"
|
|
255
|
+
| "_id"
|
|
256
|
+
| "approvedAccountId"
|
|
257
|
+
| "claimedAt"
|
|
258
|
+
| "claimSecretHash"
|
|
259
|
+
| "confirmationCode"
|
|
260
|
+
| "expiresAt";
|
|
261
|
+
indexes: {
|
|
262
|
+
by_id: ["_id"];
|
|
263
|
+
by_creation_time: ["_creationTime"];
|
|
264
|
+
};
|
|
265
|
+
searchIndexes: {};
|
|
266
|
+
vectorIndexes: {};
|
|
267
|
+
};
|
|
268
|
+
webAuthnChallenges: {
|
|
269
|
+
document: {
|
|
270
|
+
challengeHash: string;
|
|
271
|
+
expiresAt: number;
|
|
272
|
+
purpose: "registration" | "signIn";
|
|
273
|
+
registration?: { username: string; webAuthnUserId: string };
|
|
274
|
+
_id: Id<"webAuthnChallenges">;
|
|
275
|
+
_creationTime: number;
|
|
276
|
+
};
|
|
277
|
+
fieldPaths:
|
|
278
|
+
| "_creationTime"
|
|
279
|
+
| "_id"
|
|
280
|
+
| "challengeHash"
|
|
281
|
+
| "expiresAt"
|
|
282
|
+
| "purpose"
|
|
283
|
+
| "registration"
|
|
284
|
+
| "registration.username"
|
|
285
|
+
| "registration.webAuthnUserId";
|
|
286
|
+
indexes: {
|
|
287
|
+
by_id: ["_id"];
|
|
288
|
+
by_creation_time: ["_creationTime"];
|
|
289
|
+
by_challenge_hash: ["challengeHash", "_creationTime"];
|
|
290
|
+
};
|
|
291
|
+
searchIndexes: {};
|
|
292
|
+
vectorIndexes: {};
|
|
293
|
+
};
|
|
171
294
|
};
|
|
172
295
|
|
|
173
296
|
/**
|
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":"
|
|
7
|
+
export const deployment = {"environment":"latest","sourceCommitSha":"a9f0affae3714a5eeed3019c65c6cd5189523e42","version":"0.3.0"};
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jive-sh/server-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "Jive's central server: the Convex backend that holds organizations, code repositories, connections and packages,
|
|
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",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|