@lessly/sdk-app 52.0.0 → 52.2.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.
Files changed (93) hide show
  1. package/dist/_types/gen/analytics/index.d.ts +2 -0
  2. package/dist/_types/gen/analytics/queryOptions.gen.d.ts +46 -0
  3. package/dist/_types/gen/bindings.gen.d.ts +3 -0
  4. package/dist/_types/gen/brain/index.d.ts +2 -0
  5. package/dist/_types/gen/brain/queryOptions.gen.d.ts +162 -0
  6. package/dist/_types/gen/client.gen.d.ts +983 -0
  7. package/dist/_types/gen/consent/index.d.ts +2 -0
  8. package/dist/_types/gen/consent/queryOptions.gen.d.ts +62 -0
  9. package/dist/_types/gen/content/index.d.ts +2 -0
  10. package/dist/_types/gen/content/queryOptions.gen.d.ts +126 -0
  11. package/dist/_types/gen/deployment/index.d.ts +2 -0
  12. package/dist/_types/gen/deployment/queryOptions.gen.d.ts +438 -0
  13. package/dist/_types/gen/mail/index.d.ts +2 -0
  14. package/dist/_types/gen/mail/queryOptions.gen.d.ts +206 -0
  15. package/dist/_types/gen/manifest.gen.d.ts +1 -0
  16. package/dist/_types/gen/observe/index.d.ts +2 -0
  17. package/dist/_types/gen/observe/queryOptions.gen.d.ts +142 -0
  18. package/dist/_types/gen/organization/index.d.ts +2 -0
  19. package/dist/_types/gen/organization/queryOptions.gen.d.ts +286 -0
  20. package/dist/_types/gen/playground/connect.gen.d.ts +3 -0
  21. package/dist/_types/gen/playground/index.d.ts +3 -0
  22. package/dist/_types/gen/playground/queryOptions.gen.d.ts +50 -0
  23. package/dist/_types/gen/realtime/index.d.ts +2 -0
  24. package/dist/_types/gen/realtime/queryOptions.gen.d.ts +114 -0
  25. package/dist/_types/gen/support/index.d.ts +2 -0
  26. package/dist/_types/gen/support/queryOptions.gen.d.ts +178 -0
  27. package/dist/_types/gen/tracking/index.d.ts +2 -0
  28. package/dist/_types/gen/tracking/queryOptions.gen.d.ts +146 -0
  29. package/dist/_types/gen/types.gen.d.ts +97920 -0
  30. package/dist/_types/gen/users/index.d.ts +2 -0
  31. package/dist/_types/gen/users/queryOptions.gen.d.ts +178 -0
  32. package/dist/_types/gen/waitlist/index.d.ts +2 -0
  33. package/dist/_types/gen/waitlist/queryOptions.gen.d.ts +30 -0
  34. package/dist/_types/index.d.ts +7 -0
  35. package/dist/_types/package.json +1 -0
  36. package/dist/_types/runtime/connectStream.d.ts +15 -0
  37. package/dist/_types/runtime/createLesslyApp.d.ts +6 -0
  38. package/dist/_types/runtime/csrf.d.ts +1 -0
  39. package/dist/_types/runtime/errors.d.ts +7 -0
  40. package/dist/_types/runtime/name.d.ts +26 -0
  41. package/dist/_types/runtime/request.d.ts +9 -0
  42. package/dist/{types-gTIUAUsP.d.cts → _types/runtime/types.d.ts} +18 -20
  43. package/dist/analytics/index.cjs +50 -0
  44. package/dist/analytics/index.cjs.map +1 -1
  45. package/dist/analytics/index.d.cts +1 -8
  46. package/dist/analytics/index.d.ts +1 -8
  47. package/dist/analytics/index.js +41 -1
  48. package/dist/analytics/index.js.map +1 -1
  49. package/dist/brain/index.d.cts +1 -164
  50. package/dist/brain/index.d.ts +1 -164
  51. package/dist/{chunk-5IRH5DIK.js → chunk-4XZXPEXP.js} +264 -2
  52. package/dist/chunk-4XZXPEXP.js.map +1 -0
  53. package/dist/consent/index.d.cts +1 -64
  54. package/dist/consent/index.d.ts +1 -64
  55. package/dist/content/index.d.cts +1 -128
  56. package/dist/content/index.d.ts +1 -128
  57. package/dist/deployment/index.d.cts +1 -440
  58. package/dist/deployment/index.d.ts +1 -440
  59. package/dist/index.cjs +262 -0
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.d.cts +1 -32
  62. package/dist/index.d.ts +1 -32
  63. package/dist/index.js +1 -1
  64. package/dist/mail/index.d.cts +1 -209
  65. package/dist/mail/index.d.ts +1 -209
  66. package/dist/observe/index.d.cts +1 -144
  67. package/dist/observe/index.d.ts +1 -144
  68. package/dist/organization/index.d.cts +1 -288
  69. package/dist/organization/index.d.ts +1 -288
  70. package/dist/playground/index.cjs.map +1 -1
  71. package/dist/playground/index.d.cts +1 -55
  72. package/dist/playground/index.d.ts +1 -55
  73. package/dist/playground/index.js +1 -1
  74. package/dist/realtime/index.d.cts +1 -116
  75. package/dist/realtime/index.d.ts +1 -116
  76. package/dist/support/index.d.cts +1 -180
  77. package/dist/support/index.d.ts +1 -180
  78. package/dist/tracking/index.d.cts +1 -148
  79. package/dist/tracking/index.d.ts +1 -148
  80. package/dist/users/index.d.cts +1 -180
  81. package/dist/users/index.d.ts +1 -180
  82. package/dist/waitlist/index.d.cts +1 -32
  83. package/dist/waitlist/index.d.ts +1 -32
  84. package/package.json +123 -48
  85. package/src/gen/analytics/index.ts +1 -1
  86. package/src/gen/analytics/queryOptions.gen.ts +67 -0
  87. package/src/gen/bindings.gen.ts +262 -0
  88. package/src/gen/client.gen.ts +40 -0
  89. package/src/gen/types.gen.ts +47078 -0
  90. package/dist/chunk-5IRH5DIK.js.map +0 -1
  91. package/dist/client.gen-DlSflqUn.d.cts +0 -46965
  92. package/dist/client.gen-DlSflqUn.d.ts +0 -46965
  93. package/dist/types-gTIUAUsP.d.ts +0 -82
@@ -1,82 +0,0 @@
1
- type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
2
- type ParamIn = 'path' | 'query' | 'body';
3
- interface ParamSpec {
4
- name: string;
5
- in: ParamIn;
6
- }
7
- interface Binding {
8
- method: HttpMethod;
9
- path: string;
10
- readOnly: boolean;
11
- params?: ParamSpec[];
12
- }
13
- /**
14
- * The streaming counterpart of `Binding`: the upgrade route of a ws-bound tool. No method (an
15
- * upgrade is always a GET) and no `readOnly` (a socket is neither a read nor a write — the tool's
16
- * own description defines its framing).
17
- */
18
- interface WsBinding {
19
- path: string;
20
- params?: ParamSpec[];
21
- }
22
- type ActionBindings = Record<string, Binding>;
23
- type ResourceBindings = Record<string, ActionBindings>;
24
- type BindingsMap = Record<string, ResourceBindings>;
25
- type WsActionBindings = Record<string, WsBinding>;
26
- type WsResourceBindings = Record<string, WsActionBindings>;
27
- type WsBindingsMap = Record<string, WsResourceBindings>;
28
- /** Close information, as delivered to every `onClose` subscriber. */
29
- interface StreamCloseInfo {
30
- code: number;
31
- reason: string;
32
- wasClean: boolean;
33
- }
34
- /** Frame payload, exactly as the socket delivered it — never parsed by the SDK. */
35
- type StreamData = string | ArrayBufferLike | ArrayBufferView | Blob;
36
- /**
37
- * The handle returned by `connectStream`. Deliberately small: no reconnection, no backoff, no
38
- * heartbeat and no framing. A dropped connection surfaces once, through `onClose` with the close
39
- * code; deciding whether and how to reconnect is the App's business, not the SDK's.
40
- */
41
- interface LesslyStream {
42
- /** Queued until the socket is OPEN, then flushed in order. Ignored once the stream is closed. */
43
- send(data: StreamData): void;
44
- close(code?: number, reason?: string): void;
45
- /** Delivers `MessageEvent.data` as-is. Returns an unsubscribe function. */
46
- onMessage(cb: (data: StreamData) => void): () => void;
47
- /** Returns an unsubscribe function. */
48
- onClose(cb: (info: StreamCloseInfo) => void): () => void;
49
- /** The underlying socket's readyState (0 CONNECTING, 1 OPEN, 2 CLOSING, 3 CLOSED). */
50
- readonly readyState: number;
51
- }
52
- /**
53
- * What a generated `<tool>Connect` factory needs from the client: the ability to open a stream
54
- * for a binding. `createLesslyApp`'s client implements it (see `LesslyClientBase`).
55
- */
56
- interface LesslyStreamOpener {
57
- openStream(binding: WsBinding, input?: Record<string, unknown>): LesslyStream;
58
- }
59
- /** The shape of `globalThis.WebSocket` this SDK relies on — injectable, like `fetch`. */
60
- type WebSocketCtor = new (url: string) => WebSocketLike;
61
- interface WebSocketLike {
62
- readonly readyState: number;
63
- send(data: StreamData): void;
64
- close(code?: number, reason?: string): void;
65
- addEventListener(type: string, cb: (ev: never) => void): void;
66
- removeEventListener(type: string, cb: (ev: never) => void): void;
67
- }
68
- interface LesslyAppOptions {
69
- /**
70
- * Absolute origin ("https://api.lessly.dev") or a path relative to the page
71
- * ("/api", ""), which is resolved against globalThis.location and therefore
72
- * only works in a browser.
73
- */
74
- baseUrl: string;
75
- productId: string;
76
- getCsrfToken?: () => string | null | undefined;
77
- fetch?: typeof fetch;
78
- /** Injectable WebSocket constructor for `connectStream`; defaults to `globalThis.WebSocket`. */
79
- WebSocket?: WebSocketCtor;
80
- }
81
-
82
- export type { Binding as B, HttpMethod as H, LesslyStreamOpener as L, ParamIn as P, StreamCloseInfo as S, WsBinding as W, LesslyStream as a, LesslyAppOptions as b, BindingsMap as c, ParamSpec as d, StreamData as e, WebSocketCtor as f, WebSocketLike as g, WsBindingsMap as h };