@lessly/sdk-app 10.0.0 → 12.0.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 (38) hide show
  1. package/dist/analytics/index.d.cts +1 -1
  2. package/dist/analytics/index.d.ts +1 -1
  3. package/dist/brain/index.d.cts +1 -1
  4. package/dist/brain/index.d.ts +1 -1
  5. package/dist/{client.gen-XqieBmDz.d.cts → client.gen-CV5cWZ6q.d.cts} +158 -1
  6. package/dist/{client.gen-XqieBmDz.d.ts → client.gen-CV5cWZ6q.d.ts} +158 -1
  7. package/dist/consent/index.d.cts +1 -1
  8. package/dist/consent/index.d.ts +1 -1
  9. package/dist/deployment/index.d.cts +1 -1
  10. package/dist/deployment/index.d.ts +1 -1
  11. package/dist/index.cjs +69 -0
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +69 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/mail/index.d.cts +2 -2
  18. package/dist/mail/index.d.ts +2 -2
  19. package/dist/organization/index.d.cts +1 -1
  20. package/dist/organization/index.d.ts +1 -1
  21. package/dist/playground/index.d.cts +1 -1
  22. package/dist/playground/index.d.ts +1 -1
  23. package/dist/realtime/index.cjs +15 -0
  24. package/dist/realtime/index.cjs.map +1 -1
  25. package/dist/realtime/index.d.cts +14 -2
  26. package/dist/realtime/index.d.ts +14 -2
  27. package/dist/realtime/index.js +13 -1
  28. package/dist/realtime/index.js.map +1 -1
  29. package/dist/tracking/index.d.cts +1 -1
  30. package/dist/tracking/index.d.ts +1 -1
  31. package/dist/waitlist/index.d.cts +1 -1
  32. package/dist/waitlist/index.d.ts +1 -1
  33. package/package.json +2 -2
  34. package/src/gen/bindings.gen.ts +69 -0
  35. package/src/gen/client.gen.ts +13 -0
  36. package/src/gen/realtime/index.ts +1 -1
  37. package/src/gen/realtime/queryOptions.gen.ts +20 -0
  38. package/src/gen/types.gen.ts +156 -0
@@ -562,6 +562,12 @@ import type {
562
562
  PlaygroundLifecycleListEventsOutput,
563
563
  PlaygroundWebhookGetLastInput,
564
564
  PlaygroundWebhookGetLastOutput,
565
+ RealtimeArchiveExportInput,
566
+ RealtimeArchiveExportOutput,
567
+ RealtimeArchiveExportStatusInput,
568
+ RealtimeArchiveExportStatusOutput,
569
+ RealtimeArchiveGetInput,
570
+ RealtimeArchiveGetOutput,
565
571
  RealtimeGrantCreateInput,
566
572
  RealtimeGrantCreateOutput,
567
573
  RealtimeGrantListInput,
@@ -1215,6 +1221,13 @@ export interface GeneratedClient {
1215
1221
  };
1216
1222
  };
1217
1223
  realtime: {
1224
+ archive: {
1225
+ export(input: RealtimeArchiveExportInput): Promise<RealtimeArchiveExportOutput>;
1226
+ get(input: RealtimeArchiveGetInput): Promise<RealtimeArchiveGetOutput>;
1227
+ };
1228
+ 'archive-export': {
1229
+ status(input: RealtimeArchiveExportStatusInput): Promise<RealtimeArchiveExportStatusOutput>;
1230
+ };
1218
1231
  grant: {
1219
1232
  create(input: RealtimeGrantCreateInput): Promise<RealtimeGrantCreateOutput>;
1220
1233
  list(input: RealtimeGrantListInput): Promise<RealtimeGrantListOutput>;
@@ -1,3 +1,3 @@
1
1
  // AUTOGENERATED by scripts/generate.ts — do not edit.
2
2
  export * from './queryOptions.gen';
3
- export type { RealtimeGrantCreateInput, RealtimeGrantCreateOutput, RealtimeGrantListInput, RealtimeGrantListOutput, RealtimeGrantRevokeInput, RealtimeGrantRevokeOutput, RealtimeHistoryGetInput, RealtimeHistoryGetOutput, RealtimeMessagesPublishInput, RealtimeMessagesPublishOutput, RealtimeNamespaceCreateInput, RealtimeNamespaceCreateOutput, RealtimeNamespaceDeleteInput, RealtimeNamespaceDeleteOutput, RealtimeNamespaceGetInput, RealtimeNamespaceGetOutput, RealtimeNamespaceListInput, RealtimeNamespaceListOutput, RealtimeNamespaceUpdateInput, RealtimeNamespaceUpdateOutput, RealtimePresenceEnterInput, RealtimePresenceEnterOutput, RealtimePresenceGetInput, RealtimePresenceGetOutput, RealtimePresenceLeaveInput, RealtimePresenceLeaveOutput, RealtimePresenceStatsInput, RealtimePresenceStatsOutput, RealtimePresenceUpdateInput, RealtimePresenceUpdateOutput, RealtimeStatusGetInput, RealtimeStatusGetOutput, RealtimeTokensCreateInput, RealtimeTokensCreateOutput, RealtimeWebhookCreateInput, RealtimeWebhookCreateOutput, RealtimeWebhookDeleteInput, RealtimeWebhookDeleteOutput, RealtimeWebhookDeliveriesListInput, RealtimeWebhookDeliveriesListOutput, RealtimeWebhookGetInput, RealtimeWebhookGetOutput, RealtimeWebhookListInput, RealtimeWebhookListOutput, RealtimeWebhookSecretRotateInput, RealtimeWebhookSecretRotateOutput, RealtimeWebhookUpdateInput, RealtimeWebhookUpdateOutput } from '../types.gen';
3
+ export type { RealtimeArchiveExportInput, RealtimeArchiveExportOutput, RealtimeArchiveExportStatusInput, RealtimeArchiveExportStatusOutput, RealtimeArchiveGetInput, RealtimeArchiveGetOutput, RealtimeGrantCreateInput, RealtimeGrantCreateOutput, RealtimeGrantListInput, RealtimeGrantListOutput, RealtimeGrantRevokeInput, RealtimeGrantRevokeOutput, RealtimeHistoryGetInput, RealtimeHistoryGetOutput, RealtimeMessagesPublishInput, RealtimeMessagesPublishOutput, RealtimeNamespaceCreateInput, RealtimeNamespaceCreateOutput, RealtimeNamespaceDeleteInput, RealtimeNamespaceDeleteOutput, RealtimeNamespaceGetInput, RealtimeNamespaceGetOutput, RealtimeNamespaceListInput, RealtimeNamespaceListOutput, RealtimeNamespaceUpdateInput, RealtimeNamespaceUpdateOutput, RealtimePresenceEnterInput, RealtimePresenceEnterOutput, RealtimePresenceGetInput, RealtimePresenceGetOutput, RealtimePresenceLeaveInput, RealtimePresenceLeaveOutput, RealtimePresenceStatsInput, RealtimePresenceStatsOutput, RealtimePresenceUpdateInput, RealtimePresenceUpdateOutput, RealtimeStatusGetInput, RealtimeStatusGetOutput, RealtimeTokensCreateInput, RealtimeTokensCreateOutput, RealtimeWebhookCreateInput, RealtimeWebhookCreateOutput, RealtimeWebhookDeleteInput, RealtimeWebhookDeleteOutput, RealtimeWebhookDeliveriesListInput, RealtimeWebhookDeliveriesListOutput, RealtimeWebhookGetInput, RealtimeWebhookGetOutput, RealtimeWebhookListInput, RealtimeWebhookListOutput, RealtimeWebhookSecretRotateInput, RealtimeWebhookSecretRotateOutput, RealtimeWebhookUpdateInput, RealtimeWebhookUpdateOutput } from '../types.gen';
@@ -1,6 +1,11 @@
1
1
  // AUTOGENERATED by scripts/generate.ts — do not edit.
2
2
  import type { GeneratedClient } from '../client.gen';
3
3
  import type {
4
+ RealtimeArchiveExportInput,
5
+ RealtimeArchiveExportStatusInput,
6
+ RealtimeArchiveExportStatusOutput,
7
+ RealtimeArchiveGetInput,
8
+ RealtimeArchiveGetOutput,
4
9
  RealtimeGrantCreateInput,
5
10
  RealtimeGrantListInput,
6
11
  RealtimeGrantListOutput,
@@ -37,6 +42,21 @@ import type {
37
42
  RealtimeWebhookUpdateInput,
38
43
  } from '../types.gen';
39
44
 
45
+ export const realtimeArchiveExportMutationOptions = (sdk: GeneratedClient) => ({
46
+ mutationKey: ['realtime', 'archive', 'export'],
47
+ mutationFn: (input: RealtimeArchiveExportInput) => sdk['realtime']['archive']['export'](input),
48
+ });
49
+
50
+ export const realtimeArchiveExportStatusQueryOptions = (sdk: GeneratedClient, input: RealtimeArchiveExportStatusInput) => ({
51
+ queryKey: ['realtime', 'archive-export', 'status', input] as const,
52
+ queryFn: () => sdk['realtime']['archive-export']['status'](input),
53
+ });
54
+
55
+ export const realtimeArchiveGetQueryOptions = (sdk: GeneratedClient, input: RealtimeArchiveGetInput) => ({
56
+ queryKey: ['realtime', 'archive', 'get', input] as const,
57
+ queryFn: () => sdk['realtime']['archive']['get'](input),
58
+ });
59
+
40
60
  export const realtimeGrantCreateMutationOptions = (sdk: GeneratedClient) => ({
41
61
  mutationKey: ['realtime', 'grant', 'create'],
42
62
  mutationFn: (input: RealtimeGrantCreateInput) => sdk['realtime']['grant']['create'](input),
@@ -13408,6 +13408,82 @@ delivery_count: number
13408
13408
  found: false
13409
13409
  })
13410
13410
 
13411
+ export interface RealtimeArchiveExportInput {
13412
+ /**
13413
+ * Only entries with ts <= to_ts (epoch ms)
13414
+ */
13415
+ to_ts?: number
13416
+ /**
13417
+ * Channel whose archive to export
13418
+ */
13419
+ channel: string
13420
+ /**
13421
+ * Only entries with ts >= from_ts (epoch ms)
13422
+ */
13423
+ from_ts?: number
13424
+ }
13425
+
13426
+ export interface RealtimeArchiveExportOutput {
13427
+ status: ("pending" | "done" | "failed")
13428
+ export_id: string
13429
+ }
13430
+
13431
+ export interface RealtimeArchiveExportStatusInput {
13432
+ /**
13433
+ * Export id returned by realtime_archive_export
13434
+ */
13435
+ export_id: string
13436
+ }
13437
+
13438
+ export interface RealtimeArchiveExportStatusOutput {
13439
+ /**
13440
+ * Blob reference of the NDJSON export once status is "done"
13441
+ */
13442
+ ref: ({
13443
+ size: number
13444
+ bucket_key: string
13445
+ content_type?: string
13446
+ } | null)
13447
+ error: (string | null)
13448
+ status: ("pending" | "done" | "failed")
13449
+ export_id: string
13450
+ entry_count: (number | null)
13451
+ }
13452
+
13453
+ export interface RealtimeArchiveGetInput {
13454
+ limit?: number
13455
+ /**
13456
+ * Channel whose archived history to read
13457
+ */
13458
+ channel: string
13459
+ /**
13460
+ * Return entries strictly after this offset (from a previous page)
13461
+ */
13462
+ after_offset?: string
13463
+ }
13464
+
13465
+ export interface RealtimeArchiveGetOutput {
13466
+ channel: string
13467
+ entries: {
13468
+ /**
13469
+ * Original publish timestamp (epoch ms)
13470
+ */
13471
+ ts: number
13472
+ epoch: string
13473
+ offset: string
13474
+ /**
13475
+ * The archived message envelope
13476
+ */
13477
+ envelope?: {
13478
+ [k: string]: unknown
13479
+ }
13480
+ }[]
13481
+ /**
13482
+ * Pass as after_offset to fetch the next page; null = no more entries
13483
+ */
13484
+ next_offset: (string | null)
13485
+ }
13486
+
13411
13487
  export interface RealtimeGrantCreateInput {
13412
13488
  /**
13413
13489
  * Operations granted on matching channels
@@ -13576,6 +13652,12 @@ export interface RealtimeNamespaceCreateInput {
13576
13652
  * Namespace name (the part of a channel name before the first colon)
13577
13653
  */
13578
13654
  name: string
13655
+ /**
13656
+ * History archive policy: off, or durably retain archived entries for N days (requires history != "none")
13657
+ */
13658
+ archive?: ("off" | {
13659
+ days: number
13660
+ })
13579
13661
  /**
13580
13662
  * History retention policy for channels in this namespace
13581
13663
  */
@@ -13596,6 +13678,10 @@ clientEvents?: boolean
13596
13678
  * Whether only identified (non-anonymous) identities get capabilities
13597
13679
  */
13598
13680
  identifiedOnly?: boolean
13681
+ /**
13682
+ * If set, token mint consults this URL per requested channel (fail-closed); null disables
13683
+ */
13684
+ subscribeProxyUrl?: (string | null)
13599
13685
  /**
13600
13686
  * Whether payloads must be end-to-end encrypted
13601
13687
  */
@@ -13609,6 +13695,12 @@ historyWindowSeconds?: number
13609
13695
  export interface RealtimeNamespaceCreateOutput {
13610
13696
  id: string
13611
13697
  name: string
13698
+ /**
13699
+ * History archive policy
13700
+ */
13701
+ archive: ("off" | {
13702
+ days: number
13703
+ })
13612
13704
  history: ("none" | "last-message" | "window")
13613
13705
  presence: boolean
13614
13706
  createdAt: string
@@ -13616,8 +13708,17 @@ updatedAt: string
13616
13708
  visibility: ("public" | "authorized")
13617
13709
  clientEvents: boolean
13618
13710
  identifiedOnly: boolean
13711
+ subscribeProxyUrl: (string | null)
13619
13712
  encryptionRequired: boolean
13620
13713
  historyWindowSeconds: (number | null)
13714
+ /**
13715
+ * Full proxy signing secret — returned ONLY when subscribeProxyUrl is set/changed
13716
+ */
13717
+ subscribeProxySecret?: string
13718
+ /**
13719
+ * Visible prefix of the proxy signing secret; null when no proxy url is set
13720
+ */
13721
+ subscribeProxySecretPrefix: (string | null)
13621
13722
  }
13622
13723
 
13623
13724
  export interface RealtimeNamespaceDeleteInput {
@@ -13641,6 +13742,12 @@ name: string
13641
13742
  export interface RealtimeNamespaceGetOutput {
13642
13743
  id: string
13643
13744
  name: string
13745
+ /**
13746
+ * History archive policy
13747
+ */
13748
+ archive: ("off" | {
13749
+ days: number
13750
+ })
13644
13751
  history: ("none" | "last-message" | "window")
13645
13752
  presence: boolean
13646
13753
  createdAt: string
@@ -13648,8 +13755,17 @@ updatedAt: string
13648
13755
  visibility: ("public" | "authorized")
13649
13756
  clientEvents: boolean
13650
13757
  identifiedOnly: boolean
13758
+ subscribeProxyUrl: (string | null)
13651
13759
  encryptionRequired: boolean
13652
13760
  historyWindowSeconds: (number | null)
13761
+ /**
13762
+ * Full proxy signing secret — returned ONLY when subscribeProxyUrl is set/changed
13763
+ */
13764
+ subscribeProxySecret?: string
13765
+ /**
13766
+ * Visible prefix of the proxy signing secret; null when no proxy url is set
13767
+ */
13768
+ subscribeProxySecretPrefix: (string | null)
13653
13769
  }
13654
13770
 
13655
13771
  export interface RealtimeNamespaceListInput {
@@ -13660,6 +13776,12 @@ export interface RealtimeNamespaceListOutput {
13660
13776
  namespaces: {
13661
13777
  id: string
13662
13778
  name: string
13779
+ /**
13780
+ * History archive policy
13781
+ */
13782
+ archive: ("off" | {
13783
+ days: number
13784
+ })
13663
13785
  history: ("none" | "last-message" | "window")
13664
13786
  presence: boolean
13665
13787
  createdAt: string
@@ -13667,8 +13789,17 @@ updatedAt: string
13667
13789
  visibility: ("public" | "authorized")
13668
13790
  clientEvents: boolean
13669
13791
  identifiedOnly: boolean
13792
+ subscribeProxyUrl: (string | null)
13670
13793
  encryptionRequired: boolean
13671
13794
  historyWindowSeconds: (number | null)
13795
+ /**
13796
+ * Full proxy signing secret — returned ONLY when subscribeProxyUrl is set/changed
13797
+ */
13798
+ subscribeProxySecret?: string
13799
+ /**
13800
+ * Visible prefix of the proxy signing secret; null when no proxy url is set
13801
+ */
13802
+ subscribeProxySecretPrefix: (string | null)
13672
13803
  }[]
13673
13804
  }
13674
13805
 
@@ -13677,6 +13808,12 @@ export interface RealtimeNamespaceUpdateInput {
13677
13808
  * Namespace name to update
13678
13809
  */
13679
13810
  name: string
13811
+ /**
13812
+ * History archive policy: off, or durably retain archived entries for N days (requires history != "none")
13813
+ */
13814
+ archive?: ("off" | {
13815
+ days: number
13816
+ })
13680
13817
  /**
13681
13818
  * History retention policy for channels in this namespace
13682
13819
  */
@@ -13697,6 +13834,10 @@ clientEvents?: boolean
13697
13834
  * Whether only identified (non-anonymous) identities get capabilities
13698
13835
  */
13699
13836
  identifiedOnly?: boolean
13837
+ /**
13838
+ * If set, token mint consults this URL per requested channel (fail-closed); null disables
13839
+ */
13840
+ subscribeProxyUrl?: (string | null)
13700
13841
  /**
13701
13842
  * Whether payloads must be end-to-end encrypted
13702
13843
  */
@@ -13710,6 +13851,12 @@ historyWindowSeconds?: number
13710
13851
  export interface RealtimeNamespaceUpdateOutput {
13711
13852
  id: string
13712
13853
  name: string
13854
+ /**
13855
+ * History archive policy
13856
+ */
13857
+ archive: ("off" | {
13858
+ days: number
13859
+ })
13713
13860
  history: ("none" | "last-message" | "window")
13714
13861
  presence: boolean
13715
13862
  createdAt: string
@@ -13717,8 +13864,17 @@ updatedAt: string
13717
13864
  visibility: ("public" | "authorized")
13718
13865
  clientEvents: boolean
13719
13866
  identifiedOnly: boolean
13867
+ subscribeProxyUrl: (string | null)
13720
13868
  encryptionRequired: boolean
13721
13869
  historyWindowSeconds: (number | null)
13870
+ /**
13871
+ * Full proxy signing secret — returned ONLY when subscribeProxyUrl is set/changed
13872
+ */
13873
+ subscribeProxySecret?: string
13874
+ /**
13875
+ * Visible prefix of the proxy signing secret; null when no proxy url is set
13876
+ */
13877
+ subscribeProxySecretPrefix: (string | null)
13722
13878
  }
13723
13879
 
13724
13880
  export interface RealtimePresenceEnterInput {