@jive-sh/server-client 0.4.0 → 0.6.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.
@@ -61,16 +61,67 @@ export declare const api: {
61
61
  null
62
62
  >;
63
63
  };
64
+ npmSessions: {
65
+ markPasskeyRegistered: FunctionReference<
66
+ "action",
67
+ "public",
68
+ { repositoryName: string; repositoryOwner: string; sessionToken: string },
69
+ null
70
+ >;
71
+ save: FunctionReference<
72
+ "action",
73
+ "public",
74
+ {
75
+ repositoryName: string;
76
+ repositoryOwner: string;
77
+ sessionToken: string;
78
+ token: string;
79
+ },
80
+ null
81
+ >;
82
+ status: FunctionReference<
83
+ "query",
84
+ "public",
85
+ { repositoryName: string; repositoryOwner: string; sessionToken: string },
86
+ { hasToken: boolean; passkeyRegistered: boolean }
87
+ >;
88
+ token: FunctionReference<
89
+ "action",
90
+ "public",
91
+ { repositoryName: string; repositoryOwner: string; sessionToken: string },
92
+ { token: string }
93
+ >;
94
+ };
64
95
  packages: {
65
96
  provision: FunctionReference<
66
97
  "action",
67
98
  "public",
68
- { packageName: string; registry: "npm" },
99
+ { packageName: string; registry: "npm"; sessionToken: string },
69
100
  | { status: "ready" }
70
101
  | { status: "inProgress" }
71
102
  | { reason: string; status: "refused" }
72
103
  >;
73
104
  };
105
+ pipelineSessions: {
106
+ signIn: FunctionReference<
107
+ "action",
108
+ "public",
109
+ {},
110
+ | { expiresAt: number; sessionToken: string; status: "signedIn" }
111
+ | { reason: string; status: "refused" }
112
+ >;
113
+ };
114
+ provision: {
115
+ default: FunctionReference<
116
+ "action",
117
+ "public",
118
+ { instance: any; kind: string; sessionToken: string },
119
+ | { instance: any; instanceId: string; status: "ready" }
120
+ | { retryAfterSeconds: number; status: "inProgress" }
121
+ | { reason: string; status: "personNeeded"; url: string }
122
+ | { reason: string; status: "refused" }
123
+ >;
124
+ };
74
125
  sessions: {
75
126
  signOut: FunctionReference<
76
127
  "mutation",
@@ -79,6 +130,25 @@ export declare const api: {
79
130
  null
80
131
  >;
81
132
  };
133
+ signingPasskey: {
134
+ ensure: FunctionReference<
135
+ "action",
136
+ "public",
137
+ { repositoryName: string; repositoryOwner: string; sessionToken: string },
138
+ { credentialId: string; publicKeySpki: string }
139
+ >;
140
+ sign: FunctionReference<
141
+ "action",
142
+ "public",
143
+ {
144
+ challenge: string;
145
+ repositoryName: string;
146
+ repositoryOwner: string;
147
+ sessionToken: string;
148
+ },
149
+ { signature: string }
150
+ >;
151
+ };
82
152
  signInRequests: {
83
153
  claim: FunctionReference<
84
154
  "action",
@@ -214,66 +284,68 @@ export declare const internal: {
214
284
  { requestHash: string },
215
285
  null | Id<"organizations">
216
286
  >;
217
- replaceNpmConnection: FunctionReference<
287
+ storeNpmConnectionRequest: FunctionReference<
218
288
  "mutation",
219
289
  "internal",
220
- {
221
- keyVersion: number;
222
- organizationId: Id<"organizations">;
223
- sealedCredential: string;
224
- },
290
+ { organizationName: string; requestHash: string },
225
291
  null
226
292
  >;
227
- sealedNpmConnection: FunctionReference<
293
+ };
294
+ npmSessions: {
295
+ organizationForRepository: FunctionReference<
228
296
  "query",
229
297
  "internal",
230
- { organizationId: Id<"organizations"> },
231
- null | { keyVersion: number; sealedCredential: string }
298
+ { repositoryName: string; repositoryOwner: string; sessionToken: string },
299
+ null | string
232
300
  >;
233
- storeNpmConnectionRequest: FunctionReference<
301
+ };
302
+ pipelineSessions: {
303
+ deleteSession: FunctionReference<
234
304
  "mutation",
235
305
  "internal",
236
- { organizationName: string; requestHash: string },
306
+ { id: Id<"pipelineSessions"> },
237
307
  null
238
308
  >;
239
- };
240
- packages: {
241
- claim: FunctionReference<
309
+ open: FunctionReference<
242
310
  "mutation",
243
311
  "internal",
244
- { holder: string; packageName: string },
245
- null | string
246
- >;
247
- codeRepositoryByGithubIds: FunctionReference<
248
- "query",
249
- "internal",
250
- { repositoryId: string; repositoryOwnerId: string },
251
- null | { id: string; organizationId: string }
312
+ {
313
+ caller: {
314
+ environment: string;
315
+ repository: { name: string; owner: string };
316
+ repositoryId: string;
317
+ repositoryOwnerId: string;
318
+ workflowFile: string;
319
+ };
320
+ tokenHash: string;
321
+ },
322
+ null | { expiresAt: number }
252
323
  >;
253
- packageByName: FunctionReference<
324
+ pipeline: FunctionReference<
254
325
  "query",
255
326
  "internal",
256
- { packageName: string },
327
+ { sessionToken: string },
257
328
  null | {
258
- codeRepositoryId: string;
259
- trustedPublishers: Array<{ environment: string; registeredAt: number }>;
329
+ codeRepositoryId: Id<"codeRepositories">;
330
+ environment: string;
331
+ organizationId: Id<"organizations">;
332
+ repository: { name: string; owner: string };
333
+ workflowFile: string;
260
334
  }
261
335
  >;
262
- recordProvisioned: FunctionReference<
263
- "mutation",
336
+ };
337
+ provision: {
338
+ configuredImplementation: FunctionReference<
339
+ "query",
264
340
  "internal",
265
- {
266
- codeRepositoryId: Id<"codeRepositories">;
267
- packageName: string;
268
- registeredPublisherFor?: string;
269
- },
270
- null
341
+ { kind: string; organizationId: Id<"organizations"> },
342
+ { implementation: null | string; organizationName: string }
271
343
  >;
272
- release: FunctionReference<
273
- "mutation",
344
+ isPersonSession: FunctionReference<
345
+ "query",
274
346
  "internal",
275
- { holder: string; packageName: string },
276
- null
347
+ { sessionToken: string },
348
+ boolean
277
349
  >;
278
350
  };
279
351
  seed: {
@@ -305,6 +377,12 @@ export declare const internal: {
305
377
  organizationId: Id<"organizations">;
306
378
  }
307
379
  >;
380
+ resourceImplementation: FunctionReference<
381
+ "mutation",
382
+ "internal",
383
+ { implementation: string; kind: string; organizationName: string },
384
+ null
385
+ >;
308
386
  };
309
387
  signInRequests: {
310
388
  claimWithToken: FunctionReference<
@@ -333,32 +411,53 @@ export declare const internal: {
333
411
  "query",
334
412
  "internal",
335
413
  { sessionToken: string },
336
- null | {
337
- accountId: Id<"accounts">;
338
- publicKey: null | string;
339
- username: string;
340
- }
341
- >;
342
- sealedKey: FunctionReference<
343
- "query",
344
- "internal",
345
- { sessionToken: string },
346
- null | { sealed: null | { keyVersion: number; sealedPrivateKey: string } }
414
+ null | { accountId: Id<"accounts">; username: string }
347
415
  >;
348
- storeKey: FunctionReference<
416
+ insertLegacy: FunctionReference<
349
417
  "mutation",
350
418
  "internal",
351
419
  {
352
420
  accountId: Id<"accounts">;
421
+ createdAt: number;
353
422
  keyVersion: number;
354
423
  publicKey: string;
355
424
  sealedPrivateKey: string;
356
425
  },
357
- string
426
+ null
427
+ >;
428
+ legacyKey: FunctionReference<
429
+ "query",
430
+ "internal",
431
+ { accountId: Id<"accounts"> },
432
+ null | {
433
+ createdAt: number;
434
+ keyVersion: number;
435
+ publicKey: string;
436
+ sealedPrivateKey: string;
437
+ }
438
+ >;
439
+ migrateToAccountKeys: FunctionReference<
440
+ "mutation",
441
+ "internal",
442
+ { environment: string; sourceCommitSha: string },
443
+ { alreadyPresent: number; copied: number }
444
+ >;
445
+ removeLegacy: FunctionReference<
446
+ "mutation",
447
+ "internal",
448
+ { accountId: Id<"accounts"> },
449
+ null
450
+ >;
451
+ sealedKey: FunctionReference<
452
+ "query",
453
+ "internal",
454
+ { sessionToken: string },
455
+ null | { sealed: null | { keyVersion: number; sealedPrivateKey: string } }
358
456
  >;
359
457
  };
360
458
  };
361
459
 
362
460
  export declare const components: {
363
461
  packageRegistryNpm: import("jive-resource-connector-package-registry-npm/_generated/component.js").ComponentApi<"packageRegistryNpm">;
462
+ accountKeys: import("../components/accountKeys/_generated/component.js").ComponentApi<"accountKeys">;
364
463
  };
@@ -95,36 +95,6 @@ export type DataModel = {
95
95
  searchIndexes: {};
96
96
  vectorIndexes: {};
97
97
  };
98
- connections: {
99
- document: {
100
- connector: "npm";
101
- createdAt: number;
102
- keyVersion: number;
103
- organizationId: Id<"organizations">;
104
- sealedCredential: string;
105
- _id: Id<"connections">;
106
- _creationTime: number;
107
- };
108
- fieldPaths:
109
- | "_creationTime"
110
- | "_id"
111
- | "connector"
112
- | "createdAt"
113
- | "keyVersion"
114
- | "organizationId"
115
- | "sealedCredential";
116
- indexes: {
117
- by_id: ["_id"];
118
- by_creation_time: ["_creationTime"];
119
- by_organization_and_connector: [
120
- "organizationId",
121
- "connector",
122
- "_creationTime",
123
- ];
124
- };
125
- searchIndexes: {};
126
- vectorIndexes: {};
127
- };
128
98
  organizations: {
129
99
  document: { name: string; _id: Id<"organizations">; _creationTime: number };
130
100
  fieldPaths: "_creationTime" | "_id" | "name";
@@ -136,32 +106,6 @@ export type DataModel = {
136
106
  searchIndexes: {};
137
107
  vectorIndexes: {};
138
108
  };
139
- packages: {
140
- document: {
141
- codeRepositoryId: Id<"codeRepositories">;
142
- lastProvisionedAt: number;
143
- name: string;
144
- registry: "npm";
145
- trustedPublishers: Array<{ environment: string; registeredAt: number }>;
146
- _id: Id<"packages">;
147
- _creationTime: number;
148
- };
149
- fieldPaths:
150
- | "_creationTime"
151
- | "_id"
152
- | "codeRepositoryId"
153
- | "lastProvisionedAt"
154
- | "name"
155
- | "registry"
156
- | "trustedPublishers";
157
- indexes: {
158
- by_id: ["_id"];
159
- by_creation_time: ["_creationTime"];
160
- by_registry_and_name: ["registry", "name", "_creationTime"];
161
- };
162
- searchIndexes: {};
163
- vectorIndexes: {};
164
- };
165
109
  passkeys: {
166
110
  document: {
167
111
  accountId: Id<"accounts">;
@@ -187,26 +131,52 @@ export type DataModel = {
187
131
  searchIndexes: {};
188
132
  vectorIndexes: {};
189
133
  };
190
- provisioningClaims: {
134
+ pipelineSessions: {
191
135
  document: {
136
+ codeRepositoryId: Id<"codeRepositories">;
137
+ createdAt: number;
138
+ environment: string;
192
139
  expiresAt: number;
193
- holder: string;
194
- packageName: string;
195
- registry: "npm";
196
- _id: Id<"provisioningClaims">;
140
+ repository: { name: string; owner: string };
141
+ tokenHash: string;
142
+ workflowFile: string;
143
+ _id: Id<"pipelineSessions">;
197
144
  _creationTime: number;
198
145
  };
199
146
  fieldPaths:
200
147
  | "_creationTime"
201
148
  | "_id"
149
+ | "codeRepositoryId"
150
+ | "createdAt"
151
+ | "environment"
202
152
  | "expiresAt"
203
- | "holder"
204
- | "packageName"
205
- | "registry";
153
+ | "repository"
154
+ | "repository.name"
155
+ | "repository.owner"
156
+ | "tokenHash"
157
+ | "workflowFile";
158
+ indexes: {
159
+ by_id: ["_id"];
160
+ by_creation_time: ["_creationTime"];
161
+ by_token_hash: ["tokenHash", "_creationTime"];
162
+ };
163
+ searchIndexes: {};
164
+ vectorIndexes: {};
165
+ };
166
+ resourceImplementations: {
167
+ document: {
168
+ implementation: string;
169
+ kind: string;
170
+ organizationId: Id<"organizations">;
171
+ _id: Id<"resourceImplementations">;
172
+ _creationTime: number;
173
+ };
174
+ fieldPaths:
175
+ "_creationTime" | "_id" | "implementation" | "kind" | "organizationId";
206
176
  indexes: {
207
177
  by_id: ["_id"];
208
178
  by_creation_time: ["_creationTime"];
209
- by_registry_and_package: ["registry", "packageName", "_creationTime"];
179
+ by_organization_and_kind: ["organizationId", "kind", "_creationTime"];
210
180
  };
211
181
  searchIndexes: {};
212
182
  vectorIndexes: {};
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":"52617a321d77c406e238e6066b8794b4150a193b","version":"0.4.0"};
7
+ export const deployment = {"environment":"latest","sourceCommitSha":"b031f59f1524121094655b4009015c6c59a6f16f","version":"0.6.0"};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jive-sh/server-client",
3
- "version": "0.4.0",
3
+ "version": "0.6.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",