@somewhere-cloud/cli 0.38.107 → 0.38.109

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.
@@ -1535,12 +1535,18 @@ interface SomewhereRuntimeAuthServer {
1535
1535
  setRoles(userId: string, changes: { add?: readonly string[]; remove?: readonly string[] }): Promise<SomewhereServerRoleChanges>;
1536
1536
  listUsers(options?: { ids: readonly string[]; emails?: never; limit?: never; cursor?: never } | { emails: readonly string[]; ids?: never; limit?: never; cursor?: never } | { ids?: never; emails?: never; limit?: number; cursor?: string }): Promise<{ users: SomewhereAuthDirectoryUser[]; next_cursor: string | null }>;
1537
1537
  }
1538
+ interface SomewhereAuthUserDeletion {
1539
+ deleted: true;
1540
+ removed: readonly string[];
1541
+ kept: readonly { readonly category: string; readonly reason: string }[];
1542
+ not_covered: readonly string[];
1543
+ }
1538
1544
  interface SomewhereRuntimeAuthModeration {
1539
1545
  ban(req: Request, userId: string, options?: { reason?: string | null } | null): Promise<SomewhereAuthModerationRevoked & {
1540
1546
  user: { id: string; email: string; banned: true; banned_reason: string | null };
1541
1547
  }>;
1542
1548
  unban(req: Request, userId: string): Promise<{ user: { id: string; email: string; banned: false } }>;
1543
- deleteUser(req: Request, userId: string): Promise<{ deleted: true; user_id: string }>;
1549
+ deleteUser(req: Request, userId: string): Promise<SomewhereAuthUserDeletion & { user_id: string }>;
1544
1550
  revokeSessions(req: Request, userId: string): Promise<SomewhereAuthModerationRevoked>;
1545
1551
  setRole(req: Request, userId: string, role: SomewhereAuthRole): Promise<SomewhereAuthModerationRevoked & {
1546
1552
  user: { id: string; email: string; role: SomewhereAuthRole };
@@ -1602,10 +1608,10 @@ interface SomewhereRuntimeAuth {
1602
1608
  // Email verification for the request's own session (cookie or Bearer); no token in app code.
1603
1609
  requestEmailVerificationWithCookie(req: Request): Promise<SomewhereAuthVerificationSent>;
1604
1610
  verifyEmailWithCookie(req: Request, options: { code: string }): Promise<{ verified: true }>;
1605
- deleteUser(token: string): Promise<{ deleted: true }>;
1611
+ deleteUser(token: string): Promise<SomewhereAuthUserDeletion>;
1606
1612
  // Password change and account deletion end every session of the account; these clear the cookies.
1607
1613
  updatePasswordWithCookie(req: Request, options: { new_password: string; current_password?: string }): Promise<{ updated: true }>;
1608
- deleteUserWithCookie(req: Request): Promise<{ deleted: true }>;
1614
+ deleteUserWithCookie(req: Request): Promise<SomewhereAuthUserDeletion>;
1609
1615
  // Start Google/GitHub/Discord sign-in from a server handler: stages this attempt's HttpOnly
1610
1616
  // verifier cookie on the response and resolves the provider start URL (only its challenge travels).
1611
1617
  oauthStart(provider: 'google' | 'github' | 'discord', options: { redirect_uri: string }): Promise<string>;
@@ -2331,13 +2337,13 @@ interface SomewhereFsView {
2331
2337
  interface SomewhereRuntimeFs extends SomewhereFsView { readonly server: SomewhereFsView }
2332
2338
 
2333
2339
  // ---- sw.search
2334
- interface SomewhereSearchManagedAddResult { path: string; version: number; chunks: number; searchable: true }
2340
+ interface SomewhereSearchManagedAddResult { path: string; version: number; chunks: number; searchable: "shortly" }
2335
2341
  interface SomewhereSearchManagedHit {
2336
2342
  content: string;
2337
2343
  score: number;
2338
2344
  source: { path: string; page: number | null; locator: string; url: string };
2339
2345
  }
2340
- interface SomewhereSearchManagedQueryResult { query: string; results: SomewhereSearchManagedHit[] }
2346
+ interface SomewhereSearchManagedQueryResult { query: string; results: SomewhereSearchManagedHit[]; status?: "preparing"; message?: string }
2341
2347
  interface SomewhereSearchIndexInfo { name: string; item_count: number; created_at: string }
2342
2348
  interface SomewhereSearchItem { id: string; content: string; metadata?: Readonly<Record<string, unknown>> | null }
2343
2349
  interface SomewhereSearchUpsertOptions { index: string; items: readonly SomewhereSearchItem[] }
@@ -2360,6 +2366,8 @@ interface SomewhereSearchHit {
2360
2366
  signals?: { semantic?: number; lexical?: number };
2361
2367
  }
2362
2368
  interface SomewhereSearchQueryResult {
2369
+ status?: "preparing";
2370
+ message?: string;
2363
2371
  results: SomewhereSearchHit[];
2364
2372
  page: { offset: number; limit: number; total: number; has_more: boolean };
2365
2373
  mode: SomewhereSearchMode;
@@ -4494,8 +4502,8 @@ var require_consumer_contract = __commonJS({
4494
4502
  "worker/containers/compile/consumer-contract.cjs"(exports2, module2) {
4495
4503
  "use strict";
4496
4504
  var CONSUMER_CONTRACT2 = Object.freeze({
4497
- version: 18,
4498
- digest: "45b503300f9407ee0ea0efcbc61f5459334c758ba446129f6decc8bdec5d5b79"
4505
+ version: 22,
4506
+ digest: "da61ee52a81d1b7cb5324c8b88bc0b7f1883d213f8ef7280eddbf8449207c22f"
4499
4507
  });
4500
4508
  var MEMBERSHIPS = "memberships: table({ id: id(), team_id: text(), member_id: text() }, { scope: owner(), client: { read: true } }),";
4501
4509
  var SHARES = "shares: table({ id: id(), grantee_id: text() }, { scope: owner(), client: { read: true, create: ['grantee_id'], delete: true }, unique: [['user_id', 'grantee_id']] }),";