@lessly/sdk-app 11.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-BfMz1akk.d.cts → client.gen-CV5cWZ6q.d.cts} +114 -1
  6. package/dist/{client.gen-BfMz1akk.d.ts → client.gen-CV5cWZ6q.d.ts} +114 -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 +61 -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 +61 -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 +61 -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 +112 -0
@@ -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
  */
@@ -13613,6 +13695,12 @@ historyWindowSeconds?: number
13613
13695
  export interface RealtimeNamespaceCreateOutput {
13614
13696
  id: string
13615
13697
  name: string
13698
+ /**
13699
+ * History archive policy
13700
+ */
13701
+ archive: ("off" | {
13702
+ days: number
13703
+ })
13616
13704
  history: ("none" | "last-message" | "window")
13617
13705
  presence: boolean
13618
13706
  createdAt: string
@@ -13654,6 +13742,12 @@ name: string
13654
13742
  export interface RealtimeNamespaceGetOutput {
13655
13743
  id: string
13656
13744
  name: string
13745
+ /**
13746
+ * History archive policy
13747
+ */
13748
+ archive: ("off" | {
13749
+ days: number
13750
+ })
13657
13751
  history: ("none" | "last-message" | "window")
13658
13752
  presence: boolean
13659
13753
  createdAt: string
@@ -13682,6 +13776,12 @@ export interface RealtimeNamespaceListOutput {
13682
13776
  namespaces: {
13683
13777
  id: string
13684
13778
  name: string
13779
+ /**
13780
+ * History archive policy
13781
+ */
13782
+ archive: ("off" | {
13783
+ days: number
13784
+ })
13685
13785
  history: ("none" | "last-message" | "window")
13686
13786
  presence: boolean
13687
13787
  createdAt: string
@@ -13708,6 +13808,12 @@ export interface RealtimeNamespaceUpdateInput {
13708
13808
  * Namespace name to update
13709
13809
  */
13710
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
+ })
13711
13817
  /**
13712
13818
  * History retention policy for channels in this namespace
13713
13819
  */
@@ -13745,6 +13851,12 @@ historyWindowSeconds?: number
13745
13851
  export interface RealtimeNamespaceUpdateOutput {
13746
13852
  id: string
13747
13853
  name: string
13854
+ /**
13855
+ * History archive policy
13856
+ */
13857
+ archive: ("off" | {
13858
+ days: number
13859
+ })
13748
13860
  history: ("none" | "last-message" | "window")
13749
13861
  presence: boolean
13750
13862
  createdAt: string