@vibes.diy/api-svc 2.5.11 → 2.5.12

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.
@@ -1,9 +1,10 @@
1
1
  import { Lazy, Evento, EventoResult, EventoType, Result } from "@adviser/cement";
2
2
  import { W3CWebSocketEventEventoEnDecoder } from "@vibes.diy/api-pkg";
3
- import { sharedHandlers, appHandlers, chatHandlers } from "./evento-handler-manifest.js";
3
+ import { sharedHandlers, chatHandlers } from "./evento-handler-manifest.js";
4
+ export const chatPlaneHandlers = [...sharedHandlers, ...chatHandlers];
4
5
  export const chatMsgEvento = Lazy(() => {
5
6
  const evento = new Evento(new W3CWebSocketEventEventoEnDecoder());
6
- evento.push(...sharedHandlers, ...appHandlers, ...chatHandlers, {
7
+ evento.push(...chatPlaneHandlers, {
7
8
  type: EventoType.WildCard,
8
9
  hash: "chat-not-msg-implemented-handler",
9
10
  handle: async (ctx) => {
@@ -1 +1 @@
1
- {"version":3,"file":"chat-msg-evento.js","sourceRoot":"","sources":["../jsr/chat-msg-evento.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAEtE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEzF,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,EAAE;IACrC,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,gCAAgC,EAAE,CAAC,CAAC;IAClE,MAAM,CAAC,IAAI,CACT,GAAG,cAAc,EACjB,GAAG,WAAW,EACd,GAAG,YAAY,EACf;QACE,IAAI,EAAE,UAAU,CAAC,QAAQ;QACzB,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,KAAK,EAAE,GAAG,EA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,CAAC,CAAC,CAAC"}
@@ -239,6 +239,68 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
239
239
  error?: string | undefined;
240
240
  settings: {
241
241
  entries: ({
242
+ type: "active.db-acl";
243
+ dbName: string;
244
+ acl: {
245
+ read?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
246
+ write?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
247
+ delete?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
248
+ };
249
+ } | {
250
+ type: "app.public.access";
251
+ enable: boolean;
252
+ tick?: {
253
+ count: number;
254
+ last: Date;
255
+ } | undefined;
256
+ } | {
257
+ type: "app.acl.active.request";
258
+ role: "viewer";
259
+ state: "pending";
260
+ request: {
261
+ key: string;
262
+ provider: "clerk" | "github" | "google";
263
+ msg?: string | undefined;
264
+ userId: string;
265
+ created: Date;
266
+ };
267
+ } | {
268
+ type: "app.acl.active.request";
269
+ role: "editor" | "submitter" | "viewer";
270
+ state: "approved";
271
+ request: {
272
+ key: string;
273
+ provider: "clerk" | "github" | "google";
274
+ msg?: string | undefined;
275
+ userId: string;
276
+ created: Date;
277
+ };
278
+ tick: {
279
+ count: number;
280
+ last: Date;
281
+ };
282
+ grant: {
283
+ ownerId: string;
284
+ key?: string | undefined;
285
+ on: Date;
286
+ };
287
+ } | {
288
+ type: "app.acl.active.request";
289
+ role: "editor" | "submitter" | "viewer";
290
+ state: "rejected";
291
+ request: {
292
+ key: string;
293
+ provider: "clerk" | "github" | "google";
294
+ msg?: string | undefined;
295
+ userId: string;
296
+ created: Date;
297
+ };
298
+ grant: {
299
+ ownerId: string;
300
+ key?: string | undefined;
301
+ on: Date;
302
+ };
303
+ } | {
242
304
  type: "app.acl.active.invite";
243
305
  role: "editor";
244
306
  state: "pending";
@@ -324,60 +386,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
324
386
  count: number;
325
387
  last: Date;
326
388
  };
327
- } | {
328
- type: "app.acl.active.request";
329
- role: "viewer";
330
- state: "pending";
331
- request: {
332
- key: string;
333
- provider: "clerk" | "github" | "google";
334
- msg?: string | undefined;
335
- userId: string;
336
- created: Date;
337
- };
338
- } | {
339
- type: "app.acl.active.request";
340
- role: "editor" | "submitter" | "viewer";
341
- state: "approved";
342
- request: {
343
- key: string;
344
- provider: "clerk" | "github" | "google";
345
- msg?: string | undefined;
346
- userId: string;
347
- created: Date;
348
- };
349
- tick: {
350
- count: number;
351
- last: Date;
352
- };
353
- grant: {
354
- ownerId: string;
355
- key?: string | undefined;
356
- on: Date;
357
- };
358
- } | {
359
- type: "app.acl.active.request";
360
- role: "editor" | "submitter" | "viewer";
361
- state: "rejected";
362
- request: {
363
- key: string;
364
- provider: "clerk" | "github" | "google";
365
- msg?: string | undefined;
366
- userId: string;
367
- created: Date;
368
- };
369
- grant: {
370
- ownerId: string;
371
- key?: string | undefined;
372
- on: Date;
373
- };
374
- } | {
375
- type: "app.public.access";
376
- enable: boolean;
377
- tick?: {
378
- count: number;
379
- last: Date;
380
- } | undefined;
381
389
  } | {
382
390
  type: "app.request";
383
391
  enable: boolean;
@@ -471,14 +479,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
471
479
  key: string;
472
480
  value: string;
473
481
  }[];
474
- } | {
475
- type: "active.db-acl";
476
- dbName: string;
477
- acl: {
478
- read?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
479
- write?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
480
- delete?: ("editors" | "members" | "readers" | "submitters")[] | undefined;
481
- };
482
482
  })[];
483
483
  entry: {
484
484
  settings: {
@@ -591,6 +591,13 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
591
591
  token: string;
592
592
  };
593
593
  settings: ({
594
+ type: "profile";
595
+ avatarCid?: string | undefined;
596
+ displayName?: string | undefined;
597
+ } | {
598
+ type: "defaultHandle";
599
+ ownerHandle: string;
600
+ } | {
594
601
  type: "sharing";
595
602
  grants: {
596
603
  grant: "allow" | "deny";
@@ -639,13 +646,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
639
646
  } | undefined;
640
647
  apiKey?: string | undefined;
641
648
  } | undefined;
642
- } | {
643
- type: "defaultHandle";
644
- ownerHandle: string;
645
- } | {
646
- type: "profile";
647
- avatarCid?: string | undefined;
648
- displayName?: string | undefined;
649
649
  } | {
650
650
  type: "notifications";
651
651
  buildComplete?: boolean | undefined;
@@ -662,6 +662,13 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
662
662
  type: "vibes.diy.res-ensure-user-settings";
663
663
  userId: string;
664
664
  settings: ({
665
+ type: "profile";
666
+ avatarCid?: string | undefined;
667
+ displayName?: string | undefined;
668
+ } | {
669
+ type: "defaultHandle";
670
+ ownerHandle: string;
671
+ } | {
665
672
  type: "sharing";
666
673
  grants: {
667
674
  grant: "allow" | "deny";
@@ -710,13 +717,6 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
710
717
  } | undefined;
711
718
  apiKey?: string | undefined;
712
719
  } | undefined;
713
- } | {
714
- type: "defaultHandle";
715
- ownerHandle: string;
716
- } | {
717
- type: "profile";
718
- avatarCid?: string | undefined;
719
- displayName?: string | undefined;
720
720
  } | {
721
721
  type: "notifications";
722
722
  buildComplete?: boolean | undefined;
@@ -1744,6 +1744,42 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
1744
1744
  colno?: number | undefined;
1745
1745
  error?: unknown;
1746
1746
  };
1747
+ }, import("@vibes.diy/api-types").MsgBase<{
1748
+ tid: string;
1749
+ type: "vibe.req.accessFnSource";
1750
+ appSlug: string;
1751
+ ownerHandle: string;
1752
+ cid: string;
1753
+ }>, {
1754
+ tid: string;
1755
+ type: "vibe.res.accessFnSource";
1756
+ cid: string;
1757
+ source: string | null;
1758
+ } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1759
+ type: "MessageEvent";
1760
+ event: {
1761
+ data?: unknown;
1762
+ origin?: string | null | undefined;
1763
+ lastEventId?: string | undefined;
1764
+ source?: unknown;
1765
+ ports?: unknown;
1766
+ };
1767
+ } | {
1768
+ type: "CloseEvent";
1769
+ event: {
1770
+ wasClean: boolean;
1771
+ code: number;
1772
+ reason: string;
1773
+ };
1774
+ } | {
1775
+ type: "ErrorEvent";
1776
+ event: {
1777
+ message?: string | undefined;
1778
+ filename?: string | undefined;
1779
+ lineno?: number | undefined;
1780
+ colno?: number | undefined;
1781
+ error?: unknown;
1782
+ };
1747
1783
  }, import("@vibes.diy/api-types").MsgBase<{
1748
1784
  type: "vibes.diy.req-subscribe-user-notifications";
1749
1785
  } & {
@@ -1751,8 +1787,7 @@ export declare const sharedHandlers: readonly [import("@adviser/cement").EventoH
1751
1787
  }>, {
1752
1788
  type: "vibes.diy.res-subscribe-user-notifications";
1753
1789
  status: "ok";
1754
- } | import("@vibes.diy/api-types").VibesDiyError>];
1755
- export declare const appHandlers: readonly [import("@adviser/cement").EventoHandler<{
1790
+ } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1756
1791
  type: "MessageEvent";
1757
1792
  event: {
1758
1793
  data?: unknown;
@@ -1778,20 +1813,29 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1778
1813
  error?: unknown;
1779
1814
  };
1780
1815
  }, import("@vibes.diy/api-types").MsgBase<{
1781
- type: "vibes.diy.req-put-doc";
1816
+ type: "vibes.diy.req-list-dm-threads";
1782
1817
  auth: {
1783
1818
  type: "clerk" | "device-id" | "ucan";
1784
1819
  token: string;
1785
1820
  };
1786
- ownerHandle: string;
1787
- appSlug: string;
1788
- dbName: string;
1789
- doc: Record<string, unknown>;
1790
- docId?: string | undefined;
1821
+ pager?: {
1822
+ limit?: number | undefined;
1823
+ cursor?: string | undefined;
1824
+ } | undefined;
1791
1825
  }>, {
1792
- type: "vibes.diy.res-put-doc";
1826
+ type: "vibes.diy.res-list-dm-threads";
1793
1827
  status: "ok";
1794
- id: string;
1828
+ items: {
1829
+ channelUserSlug: string;
1830
+ otherUserSlug: string;
1831
+ latestSeq: number;
1832
+ unreadCount: number;
1833
+ latestMessage?: {
1834
+ body: string;
1835
+ createdAt: string;
1836
+ authorHandle: string;
1837
+ } | undefined;
1838
+ }[];
1795
1839
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1796
1840
  type: "MessageEvent";
1797
1841
  event: {
@@ -1818,26 +1862,22 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1818
1862
  error?: unknown;
1819
1863
  };
1820
1864
  }, import("@vibes.diy/api-types").MsgBase<{
1821
- type: "vibes.diy.req-get-doc";
1822
- auth?: {
1865
+ type: "vibes.diy.req-asset-upload-grant";
1866
+ auth: {
1823
1867
  type: "clerk" | "device-id" | "ucan";
1824
1868
  token: string;
1825
- } | undefined;
1869
+ };
1826
1870
  ownerHandle: string;
1827
1871
  appSlug: string;
1828
- dbName: string;
1829
- docId: string;
1830
- adminMode?: boolean | undefined;
1872
+ mimeType?: string | undefined;
1831
1873
  }>, {
1832
- type: "vibes.diy.res-get-doc";
1833
- status: "ok";
1834
- id: string;
1835
- doc: Record<string, unknown>;
1836
- } | {
1837
- type: "vibes.diy.res-get-doc";
1838
- status: "not-found";
1839
- id: string;
1840
- } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1874
+ type: "vibes.diy.res-asset-upload-grant";
1875
+ uploadUrl: string;
1876
+ grant: string;
1877
+ expiresAt: string;
1878
+ uploadId: string;
1879
+ } | import("@vibes.diy/api-types").VibesDiyError>];
1880
+ export declare const appHandlers: readonly [import("@adviser/cement").EventoHandler<{
1841
1881
  type: "MessageEvent";
1842
1882
  event: {
1843
1883
  data?: unknown;
@@ -1863,28 +1903,20 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1863
1903
  error?: unknown;
1864
1904
  };
1865
1905
  }, import("@vibes.diy/api-types").MsgBase<{
1866
- type: "vibes.diy.req-query-docs";
1867
- auth?: {
1906
+ type: "vibes.diy.req-put-doc";
1907
+ auth: {
1868
1908
  type: "clerk" | "device-id" | "ucan";
1869
1909
  token: string;
1870
- } | undefined;
1910
+ };
1871
1911
  ownerHandle: string;
1872
1912
  appSlug: string;
1873
1913
  dbName: string;
1874
- filter?: {
1875
- field: string;
1876
- key?: unknown;
1877
- keys?: unknown[] | undefined;
1878
- range?: [unknown, unknown] | undefined;
1879
- } | undefined;
1880
- adminMode?: boolean | undefined;
1914
+ doc: Record<string, unknown>;
1915
+ docId?: string | undefined;
1881
1916
  }>, {
1882
- type: "vibes.diy.res-query-docs";
1917
+ type: "vibes.diy.res-put-doc";
1883
1918
  status: "ok";
1884
- docs: {
1885
- [x: string]: unknown;
1886
- _id: string;
1887
- }[];
1919
+ id: string;
1888
1920
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1889
1921
  type: "MessageEvent";
1890
1922
  event: {
@@ -1911,19 +1943,25 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1911
1943
  error?: unknown;
1912
1944
  };
1913
1945
  }, import("@vibes.diy/api-types").MsgBase<{
1914
- type: "vibes.diy.req-delete-doc";
1915
- auth: {
1946
+ type: "vibes.diy.req-get-doc";
1947
+ auth?: {
1916
1948
  type: "clerk" | "device-id" | "ucan";
1917
1949
  token: string;
1918
- };
1950
+ } | undefined;
1919
1951
  ownerHandle: string;
1920
1952
  appSlug: string;
1921
1953
  dbName: string;
1922
1954
  docId: string;
1955
+ adminMode?: boolean | undefined;
1923
1956
  }>, {
1924
- type: "vibes.diy.res-delete-doc";
1957
+ type: "vibes.diy.res-get-doc";
1925
1958
  status: "ok";
1926
1959
  id: string;
1960
+ doc: Record<string, unknown>;
1961
+ } | {
1962
+ type: "vibes.diy.res-get-doc";
1963
+ status: "not-found";
1964
+ id: string;
1927
1965
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1928
1966
  type: "MessageEvent";
1929
1967
  event: {
@@ -1950,7 +1988,7 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1950
1988
  error?: unknown;
1951
1989
  };
1952
1990
  }, import("@vibes.diy/api-types").MsgBase<{
1953
- type: "vibes.diy.req-subscribe-docs";
1991
+ type: "vibes.diy.req-query-docs";
1954
1992
  auth?: {
1955
1993
  type: "clerk" | "device-id" | "ucan";
1956
1994
  token: string;
@@ -1958,9 +1996,20 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1958
1996
  ownerHandle: string;
1959
1997
  appSlug: string;
1960
1998
  dbName: string;
1999
+ filter?: {
2000
+ field: string;
2001
+ key?: unknown;
2002
+ keys?: unknown[] | undefined;
2003
+ range?: [unknown, unknown] | undefined;
2004
+ } | undefined;
2005
+ adminMode?: boolean | undefined;
1961
2006
  }>, {
1962
- type: "vibes.diy.res-subscribe-docs";
2007
+ type: "vibes.diy.res-query-docs";
1963
2008
  status: "ok";
2009
+ docs: {
2010
+ [x: string]: unknown;
2011
+ _id: string;
2012
+ }[];
1964
2013
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
1965
2014
  type: "MessageEvent";
1966
2015
  event: {
@@ -1987,16 +2036,19 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
1987
2036
  error?: unknown;
1988
2037
  };
1989
2038
  }, import("@vibes.diy/api-types").MsgBase<{
1990
- type: "vibes.diy.req-subscribe-viewer-grants";
2039
+ type: "vibes.diy.req-delete-doc";
1991
2040
  auth: {
1992
2041
  type: "clerk" | "device-id" | "ucan";
1993
2042
  token: string;
1994
2043
  };
1995
2044
  ownerHandle: string;
1996
2045
  appSlug: string;
2046
+ dbName: string;
2047
+ docId: string;
1997
2048
  }>, {
1998
- type: "vibes.diy.res-subscribe-viewer-grants";
2049
+ type: "vibes.diy.res-delete-doc";
1999
2050
  status: "ok";
2051
+ id: string;
2000
2052
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2001
2053
  type: "MessageEvent";
2002
2054
  event: {
@@ -2023,17 +2075,17 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
2023
2075
  error?: unknown;
2024
2076
  };
2025
2077
  }, import("@vibes.diy/api-types").MsgBase<{
2026
- type: "vibes.diy.req-list-db-names";
2027
- auth: {
2078
+ type: "vibes.diy.req-subscribe-docs";
2079
+ auth?: {
2028
2080
  type: "clerk" | "device-id" | "ucan";
2029
2081
  token: string;
2030
- };
2082
+ } | undefined;
2031
2083
  ownerHandle: string;
2032
2084
  appSlug: string;
2085
+ dbName: string;
2033
2086
  }>, {
2034
- type: "vibes.diy.res-list-db-names";
2087
+ type: "vibes.diy.res-subscribe-docs";
2035
2088
  status: "ok";
2036
- dbNames: string[];
2037
2089
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2038
2090
  type: "MessageEvent";
2039
2091
  event: {
@@ -2060,29 +2112,16 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
2060
2112
  error?: unknown;
2061
2113
  };
2062
2114
  }, import("@vibes.diy/api-types").MsgBase<{
2063
- type: "vibes.diy.req-list-dm-threads";
2115
+ type: "vibes.diy.req-subscribe-viewer-grants";
2064
2116
  auth: {
2065
2117
  type: "clerk" | "device-id" | "ucan";
2066
2118
  token: string;
2067
2119
  };
2068
- pager?: {
2069
- limit?: number | undefined;
2070
- cursor?: string | undefined;
2071
- } | undefined;
2120
+ ownerHandle: string;
2121
+ appSlug: string;
2072
2122
  }>, {
2073
- type: "vibes.diy.res-list-dm-threads";
2123
+ type: "vibes.diy.res-subscribe-viewer-grants";
2074
2124
  status: "ok";
2075
- items: {
2076
- channelUserSlug: string;
2077
- otherUserSlug: string;
2078
- latestSeq: number;
2079
- unreadCount: number;
2080
- latestMessage?: {
2081
- body: string;
2082
- createdAt: string;
2083
- authorHandle: string;
2084
- } | undefined;
2085
- }[];
2086
2125
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2087
2126
  type: "MessageEvent";
2088
2127
  event: {
@@ -2109,16 +2148,17 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
2109
2148
  error?: unknown;
2110
2149
  };
2111
2150
  }, import("@vibes.diy/api-types").MsgBase<{
2112
- type: "vibes.diy.req-mark-dm-read";
2151
+ type: "vibes.diy.req-list-db-names";
2113
2152
  auth: {
2114
2153
  type: "clerk" | "device-id" | "ucan";
2115
2154
  token: string;
2116
2155
  };
2117
- channelUserSlug: string;
2118
- lastSeenSeq: number;
2156
+ ownerHandle: string;
2157
+ appSlug: string;
2119
2158
  }>, {
2120
- type: "vibes.diy.res-mark-dm-read";
2159
+ type: "vibes.diy.res-list-db-names";
2121
2160
  status: "ok";
2161
+ dbNames: string[];
2122
2162
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2123
2163
  type: "MessageEvent";
2124
2164
  event: {
@@ -2145,20 +2185,16 @@ export declare const appHandlers: readonly [import("@adviser/cement").EventoHand
2145
2185
  error?: unknown;
2146
2186
  };
2147
2187
  }, import("@vibes.diy/api-types").MsgBase<{
2148
- type: "vibes.diy.req-asset-upload-grant";
2188
+ type: "vibes.diy.req-mark-dm-read";
2149
2189
  auth: {
2150
2190
  type: "clerk" | "device-id" | "ucan";
2151
2191
  token: string;
2152
2192
  };
2153
- ownerHandle: string;
2154
- appSlug: string;
2155
- mimeType?: string | undefined;
2193
+ channelUserSlug: string;
2194
+ lastSeenSeq: number;
2156
2195
  }>, {
2157
- type: "vibes.diy.res-asset-upload-grant";
2158
- uploadUrl: string;
2159
- grant: string;
2160
- expiresAt: string;
2161
- uploadId: string;
2196
+ type: "vibes.diy.res-mark-dm-read";
2197
+ status: "ok";
2162
2198
  } | import("@vibes.diy/api-types").VibesDiyError>];
2163
2199
  export declare const chatHandlers: readonly [import("@adviser/cement").EventoHandler<{
2164
2200
  type: "MessageEvent";
@@ -2378,12 +2414,6 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
2378
2414
  refId: string;
2379
2415
  })[];
2380
2416
  }>, {
2381
- type: "vibes.diy.res-error";
2382
- error: {
2383
- message: string;
2384
- code: "max-app-slugs-reached";
2385
- };
2386
- } | {
2387
2417
  appSlug: string;
2388
2418
  ownerHandle: string;
2389
2419
  mode: "dev" | "production";
@@ -2430,6 +2460,12 @@ export declare const chatHandlers: readonly [import("@adviser/cement").EventoHan
2430
2460
  message: string;
2431
2461
  code: "app-slug-invalid";
2432
2462
  };
2463
+ } | {
2464
+ type: "vibes.diy.res-error";
2465
+ error: {
2466
+ message: string;
2467
+ code: "max-app-slugs-reached";
2468
+ };
2433
2469
  } | import("@vibes.diy/api-types").VibesDiyError>, import("@adviser/cement").EventoHandler<{
2434
2470
  type: "MessageEvent";
2435
2471
  event: {
@@ -21,6 +21,7 @@ import { putDocEvento, getDocEvento, queryDocsEvento, deleteDocEvento, subscribe
21
21
  import { listMembersEvento } from "./public/list-members.js";
22
22
  import { listMembershipsEvento } from "./public/list-memberships.js";
23
23
  import { whoAmIEvento } from "./public/who-am-i.js";
24
+ import { accessFnSourceEvento } from "./public/access-fn-source.js";
24
25
  import { assetUploadGrantEvento } from "./public/asset-upload-grant.js";
25
26
  import { subscribeUserNotificationsEvento } from "./public/subscribe-user-notifications.js";
26
27
  import { reportGrowthMembershipsEvento } from "./public/report-growth-memberships.js";
@@ -55,7 +56,10 @@ export const sharedHandlers = [
55
56
  listMembersEvento,
56
57
  listMembershipsEvento,
57
58
  whoAmIEvento,
59
+ accessFnSourceEvento,
58
60
  subscribeUserNotificationsEvento,
61
+ listDmThreadsEvento,
62
+ assetUploadGrantEvento,
59
63
  ];
60
64
  export const appHandlers = [
61
65
  putDocEvento,
@@ -65,9 +69,7 @@ export const appHandlers = [
65
69
  subscribeDocsEvento,
66
70
  subscribeViewerGrantsEvento,
67
71
  listDbNamesEvento,
68
- listDmThreadsEvento,
69
72
  markDmReadEvento,
70
- assetUploadGrantEvento,
71
73
  ];
72
74
  export const chatHandlers = [
73
75
  ensureAppSlugItemEvento,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AAQ,EAAE,iBAAiB,CAAU,CAAC"}
@@ -1,8 +1,16 @@
1
1
  import { HandleTriggerCtx, Result, EventoResultType } from "@adviser/cement";
2
2
  import { FileSystemItem } from "@vibes.diy/api-types";
3
3
  import { NpmUrlCapture } from "../public/serv-entry-point.js";
4
+ import { VibesApiSQLCtx } from "../types.js";
4
5
  import { ExtractedHostToBindings } from "../entry-point-utils.js";
5
6
  import { sqlite } from "@vibes.diy/api-sql";
7
+ export declare function buildAccessFnBindingsForRender(vctx: VibesApiSQLCtx, args: {
8
+ appSlug: string;
9
+ ownerUserSlug: string;
10
+ }): Promise<{
11
+ dbName: string;
12
+ accessFnCid: string;
13
+ }[] | undefined>;
6
14
  export interface RenderVibesOpts {
7
15
  ctx: HandleTriggerCtx<Request, ExtractedHostToBindings, unknown>;
8
16
  fs: typeof sqlite.sqlApps.$inferSelect;