@nemphi/sdk 0.4.5386 → 0.6.5415

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 (172) hide show
  1. package/dist/generated/agents/client.d.ts +28 -29
  2. package/dist/generated/agents/client.d.ts.map +1 -1
  3. package/dist/generated/agents/client.js.map +1 -1
  4. package/dist/generated/analytics/client.d.ts +4 -4
  5. package/dist/generated/analytics/client.d.ts.map +1 -1
  6. package/dist/generated/analytics/client.js.map +1 -1
  7. package/dist/generated/analytics/index.d.ts +1 -1
  8. package/dist/generated/analytics/index.d.ts.map +1 -1
  9. package/dist/generated/analytics/models.d.ts +0 -3
  10. package/dist/generated/analytics/models.d.ts.map +1 -1
  11. package/dist/generated/analytics/models.js.map +1 -1
  12. package/dist/generated/apps/client.d.ts +4 -5
  13. package/dist/generated/apps/client.d.ts.map +1 -1
  14. package/dist/generated/apps/client.js.map +1 -1
  15. package/dist/generated/callcenter/client.d.ts +2 -24
  16. package/dist/generated/callcenter/client.d.ts.map +1 -1
  17. package/dist/generated/callcenter/client.js +0 -9
  18. package/dist/generated/callcenter/client.js.map +1 -1
  19. package/dist/generated/callcenter/index.d.ts +2 -2
  20. package/dist/generated/callcenter/index.d.ts.map +1 -1
  21. package/dist/generated/callcenter/models.d.ts +0 -3
  22. package/dist/generated/callcenter/models.d.ts.map +1 -1
  23. package/dist/generated/callcenter/models.js.map +1 -1
  24. package/dist/generated/categories/client.d.ts +2 -2
  25. package/dist/generated/categories/client.d.ts.map +1 -1
  26. package/dist/generated/categories/client.js.map +1 -1
  27. package/dist/generated/categories/index.d.ts +1 -1
  28. package/dist/generated/categories/index.d.ts.map +1 -1
  29. package/dist/generated/categories/models.d.ts +0 -1
  30. package/dist/generated/categories/models.d.ts.map +1 -1
  31. package/dist/generated/categories/models.js.map +1 -1
  32. package/dist/generated/client.d.ts +0 -4
  33. package/dist/generated/client.d.ts.map +1 -1
  34. package/dist/generated/client.js +0 -10
  35. package/dist/generated/client.js.map +1 -1
  36. package/dist/generated/crm/client.d.ts +2 -2
  37. package/dist/generated/crm/client.d.ts.map +1 -1
  38. package/dist/generated/crm/client.js.map +1 -1
  39. package/dist/generated/crm/index.d.ts +1 -1
  40. package/dist/generated/crm/index.d.ts.map +1 -1
  41. package/dist/generated/crm/models.d.ts +0 -1
  42. package/dist/generated/crm/models.d.ts.map +1 -1
  43. package/dist/generated/crm/models.js.map +1 -1
  44. package/dist/generated/dashboards/client.d.ts +3 -3
  45. package/dist/generated/dashboards/client.d.ts.map +1 -1
  46. package/dist/generated/dashboards/client.js +3 -3
  47. package/dist/generated/dashboards/client.js.map +1 -1
  48. package/dist/generated/dashboards/index.d.ts +1 -1
  49. package/dist/generated/dashboards/index.d.ts.map +1 -1
  50. package/dist/generated/dashboards/models.d.ts +444 -0
  51. package/dist/generated/dashboards/models.d.ts.map +1 -1
  52. package/dist/generated/dashboards/models.js +26 -0
  53. package/dist/generated/dashboards/models.js.map +1 -1
  54. package/dist/generated/einvoice/client.d.ts +2 -2
  55. package/dist/generated/einvoice/client.d.ts.map +1 -1
  56. package/dist/generated/einvoice/client.js.map +1 -1
  57. package/dist/generated/einvoice/index.d.ts +1 -1
  58. package/dist/generated/einvoice/index.d.ts.map +1 -1
  59. package/dist/generated/einvoice/models.d.ts +0 -1
  60. package/dist/generated/einvoice/models.d.ts.map +1 -1
  61. package/dist/generated/einvoice/models.js.map +1 -1
  62. package/dist/generated/email/models.d.ts +0 -2
  63. package/dist/generated/email/models.d.ts.map +1 -1
  64. package/dist/generated/email/models.js +0 -2
  65. package/dist/generated/email/models.js.map +1 -1
  66. package/dist/generated/imports/client.d.ts +5 -6
  67. package/dist/generated/imports/client.d.ts.map +1 -1
  68. package/dist/generated/imports/client.js.map +1 -1
  69. package/dist/generated/imports/index.d.ts +0 -1
  70. package/dist/generated/imports/index.d.ts.map +1 -1
  71. package/dist/generated/inventory/client.d.ts +1 -29
  72. package/dist/generated/inventory/client.d.ts.map +1 -1
  73. package/dist/generated/inventory/client.js +1 -9
  74. package/dist/generated/inventory/client.js.map +1 -1
  75. package/dist/generated/inventory/index.d.ts +2 -2
  76. package/dist/generated/inventory/index.d.ts.map +1 -1
  77. package/dist/generated/inventory/models.d.ts +0 -127
  78. package/dist/generated/inventory/models.d.ts.map +1 -1
  79. package/dist/generated/inventory/models.js +0 -91
  80. package/dist/generated/inventory/models.js.map +1 -1
  81. package/dist/generated/ledger/client.d.ts +7 -7
  82. package/dist/generated/ledger/client.d.ts.map +1 -1
  83. package/dist/generated/ledger/client.js.map +1 -1
  84. package/dist/generated/ledger/index.d.ts +1 -1
  85. package/dist/generated/ledger/index.d.ts.map +1 -1
  86. package/dist/generated/ledger/models.d.ts +0 -6
  87. package/dist/generated/ledger/models.d.ts.map +1 -1
  88. package/dist/generated/ledger/models.js.map +1 -1
  89. package/dist/generated/marketing/client.d.ts +1 -534
  90. package/dist/generated/marketing/client.d.ts.map +1 -1
  91. package/dist/generated/marketing/client.js +3 -176
  92. package/dist/generated/marketing/client.js.map +1 -1
  93. package/dist/generated/marketing/index.d.ts +2 -2
  94. package/dist/generated/marketing/index.d.ts.map +1 -1
  95. package/dist/generated/marketing/models.d.ts +0 -151
  96. package/dist/generated/marketing/models.d.ts.map +1 -1
  97. package/dist/generated/marketing/models.js +0 -88
  98. package/dist/generated/marketing/models.js.map +1 -1
  99. package/dist/generated/messages/client.d.ts +2 -6
  100. package/dist/generated/messages/client.d.ts.map +1 -1
  101. package/dist/generated/messages/client.js.map +1 -1
  102. package/dist/generated/messages/models.d.ts +0 -1
  103. package/dist/generated/messages/models.d.ts.map +1 -1
  104. package/dist/generated/messages/models.js +0 -1
  105. package/dist/generated/messages/models.js.map +1 -1
  106. package/dist/generated/onboarding/client.d.ts +2 -2
  107. package/dist/generated/onboarding/client.d.ts.map +1 -1
  108. package/dist/generated/onboarding/client.js.map +1 -1
  109. package/dist/generated/onboarding/index.d.ts +1 -1
  110. package/dist/generated/onboarding/index.d.ts.map +1 -1
  111. package/dist/generated/onboarding/models.d.ts +0 -1
  112. package/dist/generated/onboarding/models.d.ts.map +1 -1
  113. package/dist/generated/onboarding/models.js.map +1 -1
  114. package/dist/generated/payroll/client.d.ts +2 -2
  115. package/dist/generated/payroll/client.d.ts.map +1 -1
  116. package/dist/generated/payroll/client.js.map +1 -1
  117. package/dist/generated/payroll/index.d.ts +1 -1
  118. package/dist/generated/payroll/index.d.ts.map +1 -1
  119. package/dist/generated/payroll/models.d.ts +0 -1
  120. package/dist/generated/payroll/models.d.ts.map +1 -1
  121. package/dist/generated/payroll/models.js.map +1 -1
  122. package/dist/generated/tax/client.d.ts +3 -3
  123. package/dist/generated/tax/client.d.ts.map +1 -1
  124. package/dist/generated/tax/client.js.map +1 -1
  125. package/dist/generated/tax/index.d.ts +1 -1
  126. package/dist/generated/tax/index.d.ts.map +1 -1
  127. package/dist/generated/tax/models.d.ts +0 -2
  128. package/dist/generated/tax/models.d.ts.map +1 -1
  129. package/dist/generated/tax/models.js.map +1 -1
  130. package/dist/generated/tenants/client.d.ts +37 -70
  131. package/dist/generated/tenants/client.d.ts.map +1 -1
  132. package/dist/generated/tenants/client.js +10 -18
  133. package/dist/generated/tenants/client.js.map +1 -1
  134. package/dist/generated/tenants/index.d.ts +2 -2
  135. package/dist/generated/tenants/index.d.ts.map +1 -1
  136. package/dist/generated/tenants/models.d.ts +9 -40
  137. package/dist/generated/tenants/models.d.ts.map +1 -1
  138. package/dist/generated/tenants/models.js +8 -29
  139. package/dist/generated/tenants/models.js.map +1 -1
  140. package/dist/index.d.ts +17 -498
  141. package/dist/index.d.ts.map +1 -1
  142. package/dist/index.js +138 -236
  143. package/dist/index.js.map +1 -1
  144. package/package.json +1 -1
  145. package/dist/generated/browser/client.d.ts +0 -106
  146. package/dist/generated/browser/client.d.ts.map +0 -1
  147. package/dist/generated/browser/client.js +0 -38
  148. package/dist/generated/browser/client.js.map +0 -1
  149. package/dist/generated/browser/index.d.ts +0 -6
  150. package/dist/generated/browser/index.d.ts.map +0 -1
  151. package/dist/generated/browser/index.js +0 -5
  152. package/dist/generated/browser/index.js.map +0 -1
  153. package/dist/generated/browser/models.d.ts +0 -49
  154. package/dist/generated/browser/models.d.ts.map +0 -1
  155. package/dist/generated/browser/models.js +0 -28
  156. package/dist/generated/browser/models.js.map +0 -1
  157. package/dist/generated/filesync/client.d.ts +0 -220
  158. package/dist/generated/filesync/client.d.ts.map +0 -1
  159. package/dist/generated/filesync/client.js +0 -73
  160. package/dist/generated/filesync/client.js.map +0 -1
  161. package/dist/generated/filesync/index.d.ts +0 -6
  162. package/dist/generated/filesync/index.d.ts.map +0 -1
  163. package/dist/generated/filesync/index.js +0 -5
  164. package/dist/generated/filesync/index.js.map +0 -1
  165. package/dist/generated/filesync/models.d.ts +0 -32
  166. package/dist/generated/filesync/models.d.ts.map +0 -1
  167. package/dist/generated/filesync/models.js +0 -19
  168. package/dist/generated/filesync/models.js.map +0 -1
  169. package/dist/generated/imports/models.d.ts +0 -6
  170. package/dist/generated/imports/models.d.ts.map +0 -1
  171. package/dist/generated/imports/models.js +0 -4
  172. package/dist/generated/imports/models.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -577,9 +577,9 @@ export interface Notification {
577
577
  seq?: number;
578
578
  }
579
579
  /**
580
- * One realtime event of the workspace (`openRealtimeSocket` and
581
- * `streamEvents`, the frames of `GET /v1/events/stream` and
582
- * `GET /v1/events/socket`), or of one chat thread (`streamThread`).
580
+ * One realtime event of the workspace (`openRealtimeSocket`, which polls
581
+ * `GET /v1/events/poll`; the frames of `GET /v1/events/stream` and
582
+ * `GET /v1/events/socket`).
583
583
  * `action` and `notification` are wakeups — re-read the surface, the row
584
584
  * itself comes by cursor; the rest is state that only matters while
585
585
  * someone is watching.
@@ -653,13 +653,6 @@ export type RealtimeEvent = {
653
653
  /** ISO instant after which a reader drops them unless the signal repeats. */
654
654
  until: string;
655
655
  };
656
- /**
657
- * One frame of a chat thread's own stream (`streamThread`): a piece of the
658
- * answer a run is writing (`run_delta`), or a run step's end (`run`).
659
- */
660
- export type ThreadStreamEvent = Extract<RealtimeEvent, {
661
- type: "run" | "run_delta";
662
- }>;
663
656
  /** Where a person is typing: a chat thread or a marketing inbox conversation. */
664
657
  export type TypingScope = Extract<RealtimeEvent, {
665
658
  type: "typing";
@@ -678,7 +671,7 @@ export interface RealtimeSocketOptions {
678
671
  /** Called when a poll fails after one answered. */
679
672
  onClose?: () => void;
680
673
  /**
681
- * Ignored: the subscription reads `GET /v1/events/stream` over `fetch`
674
+ * Ignored: the subscription polls `GET /v1/events/poll` over `fetch`
682
675
  * rather than holding a WebSocket. Kept so existing callers compile.
683
676
  */
684
677
  webSocket?: (url: string, headers: Record<string, string>) => WebSocket;
@@ -1601,46 +1594,6 @@ export interface LiveDocumentFolder {
1601
1594
  name: string;
1602
1595
  created_at: string;
1603
1596
  }
1604
- /**
1605
- * One item of the desktop folder sync's feed (`filesync.changes`,
1606
- * docs/file-sync.md). A deleted item carries only `id` and `deleted: true`.
1607
- * `size` is null for a live document (its Office export is rendered on demand).
1608
- */
1609
- export interface FileSyncItem {
1610
- id: string;
1611
- type?: "folder" | "file" | "doc" | "sheet" | "slides";
1612
- /** `personal`, `team`, `shared`, `root` or a folder id. */
1613
- parent_id?: string;
1614
- name?: string;
1615
- size?: number | null;
1616
- content_type?: string;
1617
- /** Changes when the content or the metadata change; a write names it as `base_version`. */
1618
- version?: string;
1619
- /** Changes only when the bytes would; the content routes' ETag and If-Match. */
1620
- content_version?: string;
1621
- modified_at?: string;
1622
- writable?: boolean;
1623
- deleted: boolean;
1624
- }
1625
- /** `filesync.changes`' input: no cursor starts a full listing. */
1626
- export interface FileSyncChangesInput {
1627
- cursor?: string;
1628
- limit?: number;
1629
- }
1630
- /** `filesync.move`'s input: a new parent, a new name, or both. */
1631
- export interface FileSyncMoveInput {
1632
- id: string;
1633
- base_version: string;
1634
- parent_id?: string;
1635
- name?: string;
1636
- }
1637
- /** A page of `filesync.changes`: keep calling with `cursor` while `has_more`; `reset` means list again. */
1638
- export interface FileSyncPage {
1639
- items: FileSyncItem[];
1640
- cursor: string;
1641
- has_more: boolean;
1642
- reset: boolean;
1643
- }
1644
1597
  /** Who a personal document is shared with (`knowledge.list_doc_shares`). */
1645
1598
  export interface LiveDocumentShares {
1646
1599
  live_document_id: string;
@@ -2274,13 +2227,9 @@ export interface MessageThreadFile {
2274
2227
  shared_by_id: string | null;
2275
2228
  shared_by_name: string;
2276
2229
  }
2277
- /**
2278
- * Result of messages.list_files. `total` is the thread's whole tally,
2279
- * independent of page_size; `next_cursor` asks for the shares after this page.
2280
- */
2230
+ /** Result of messages.list_files. `total` is the thread's whole tally, independent of page_size. */
2281
2231
  export interface MessageThreadFileList {
2282
2232
  files: MessageThreadFile[];
2283
- next_cursor: string | null;
2284
2233
  total: number;
2285
2234
  }
2286
2235
  export interface MessageMention {
@@ -3197,114 +3146,6 @@ export interface InventoryValuation {
3197
3146
  difference_cents?: number;
3198
3147
  in_agreement?: boolean;
3199
3148
  }
3200
- /** One item × warehouse on the inventory page (`inventory.overview`). */
3201
- export interface InventoryOverviewLevel extends StockLevel {
3202
- quantity_on_rent: number;
3203
- quantity_reserved: number;
3204
- quantity_available: number;
3205
- rentable: boolean;
3206
- /** Units in and out (both positive) in the month asked for. */
3207
- month_in: number;
3208
- month_out: number;
3209
- /** The owned quantity at each of the last twelve week ends, oldest first; the last is today. */
3210
- trend: number[];
3211
- }
3212
- /** A month's movements of one type in one warehouse, summed. */
3213
- export interface InventoryOverviewFlow {
3214
- warehouse_id: string;
3215
- /** A StockMovementType, or a rental custody move (rental_out, rental_return, rental_loss). */
3216
- movement_type: string;
3217
- /** Signed: positive in, negative out. */
3218
- quantity: number;
3219
- value_cents: number;
3220
- movements: number;
3221
- }
3222
- /** One movement of the month on the inventory page. */
3223
- export interface InventoryOverviewMovement {
3224
- id: string;
3225
- item_id: string;
3226
- item_code: string | null;
3227
- item_name: string;
3228
- unit_code: string;
3229
- warehouse_id: string;
3230
- /** A StockMovementType, or a rental custody move (rental_out, rental_return, rental_loss). */
3231
- movement_type: string;
3232
- quantity: number;
3233
- unit_cost_cents: number;
3234
- total_cost_cents: number;
3235
- occurred_at: string;
3236
- reference: string | null;
3237
- notes: string | null;
3238
- source_type: string | null;
3239
- }
3240
- /** An open physical count with what has been found so far. */
3241
- export interface InventoryOverviewCount {
3242
- id: string;
3243
- warehouse_id: string;
3244
- counted_on: string;
3245
- reference: string | null;
3246
- lines: {
3247
- item_id: string;
3248
- expected_quantity: number;
3249
- counted_quantity: number | null;
3250
- }[];
3251
- }
3252
- /** The inventory page in one read (`inventory.overview`). Values in cents. */
3253
- export interface InventoryOverview {
3254
- today: string;
3255
- /** YYYY-MM whose movements and flows these are. */
3256
- month: string;
3257
- currency: string;
3258
- warehouses: {
3259
- id: string;
3260
- code: string;
3261
- name: string;
3262
- is_default: boolean;
3263
- active: boolean;
3264
- }[];
3265
- /** The active items that keep stock. */
3266
- items: {
3267
- id: string;
3268
- code: string | null;
3269
- name: string;
3270
- unit_code: string;
3271
- reorder_point: number | null;
3272
- }[];
3273
- levels: InventoryOverviewLevel[];
3274
- flows: InventoryOverviewFlow[];
3275
- movements: InventoryOverviewMovement[];
3276
- /** Twelve months per warehouse ending with `month`: value in, out and at close. */
3277
- history: {
3278
- warehouse_id: string;
3279
- months: {
3280
- month: string;
3281
- in_cents: number;
3282
- out_cents: number;
3283
- closing_cents: number;
3284
- }[];
3285
- }[];
3286
- stock_value_cents: number;
3287
- ledger_balance_cents: number;
3288
- difference_cents: number;
3289
- low_stock_count: number;
3290
- reorder: {
3291
- estimated_total_cost_cents: number;
3292
- suggestions: ReorderSuggestion[];
3293
- };
3294
- open_counts: InventoryOverviewCount[];
3295
- /** Whether there were more levels or movements than the page carries. */
3296
- truncated: boolean;
3297
- /** Which of the page's writes the caller's role reaches. */
3298
- can: {
3299
- adjust: boolean;
3300
- transfer: boolean;
3301
- count_start: boolean;
3302
- count_record: boolean;
3303
- count_post: boolean;
3304
- opening_balance: boolean;
3305
- warehouses_create: boolean;
3306
- };
3307
- }
3308
3149
  export interface ReorderSuggestion {
3309
3150
  item_id: string;
3310
3151
  item_code: string | null;
@@ -5116,55 +4957,6 @@ export interface MarketingInboxTopic {
5116
4957
  description?: string;
5117
4958
  }
5118
4959
  /** An inbox conversation on a connected marketing channel (WhatsApp Business threads today). */
5119
- /** A public comment under an Instagram or Facebook post, or a reply sent from the inbox. */
5120
- export interface MarketingComment {
5121
- id: string;
5122
- channel_id: string;
5123
- post_id: string | null;
5124
- external_id: string;
5125
- parent_external_id: string;
5126
- author_name: string;
5127
- body: string;
5128
- direction: "in" | "out";
5129
- status: "received" | "pending" | "sent" | "failed";
5130
- hidden: boolean;
5131
- error: string;
5132
- commented_at: string;
5133
- post_caption: string | null;
5134
- post_url: string | null;
5135
- }
5136
- /** A private note teammates left on an inbox thread. */
5137
- export interface MarketingConversationNote {
5138
- id: string;
5139
- author_user_id: string | null;
5140
- author_name: string;
5141
- body: string;
5142
- created_at: string;
5143
- }
5144
- /** An internal comment a teammate left on a post. */
5145
- export interface MarketingPostNote {
5146
- id: string;
5147
- author_user_id: string | null;
5148
- author_name: string;
5149
- body: string;
5150
- created_at: string;
5151
- }
5152
- /** A post idea in the workspace's backlog. */
5153
- export interface MarketingIdea {
5154
- id: string;
5155
- title: string;
5156
- notes: string;
5157
- created_at: string;
5158
- updated_at: string;
5159
- }
5160
- /** A saved caption or hashtag group the composer inserts. */
5161
- export interface MarketingSnippet {
5162
- id: string;
5163
- kind: "caption" | "hashtags";
5164
- name: string;
5165
- body: string;
5166
- updated_at: string;
5167
- }
5168
4960
  export interface MarketingConversation {
5169
4961
  id: string;
5170
4962
  channel_id: string;
@@ -5175,8 +4967,6 @@ export interface MarketingConversation {
5175
4967
  peer_phone: string;
5176
4968
  peer_name: string;
5177
4969
  party_id?: string | null;
5178
- /** The teammate who owns the thread. */
5179
- assignee_user_id?: string;
5180
4970
  last_message_at: string | null;
5181
4971
  last_direction?: "inbound" | "outbound";
5182
4972
  last_snippet: string;
@@ -5611,75 +5401,6 @@ export interface MarketingPost {
5611
5401
  channel_name?: string;
5612
5402
  /** The TikTok direct-post choices a TikTok post carries, as TikTok's `post_info` names them. */
5613
5403
  tiktok?: MarketingPostTikTokSettings | null;
5614
- /** The Instagram and Facebook extras: first comment, alt text, collaborators. */
5615
- details?: MarketingPostDetails | null;
5616
- /** The workspace's own labels for the post; never published. */
5617
- tags?: string[];
5618
- }
5619
- /** What an Instagram or Facebook post carries beside its caption. */
5620
- export interface MarketingPostDetails {
5621
- first_comment?: string;
5622
- alt_text?: string;
5623
- collaborators?: string[];
5624
- }
5625
- /** The extras `marketing.create_post` and `marketing.save_post_draft` take. */
5626
- export interface MarketingPostDetailChoices {
5627
- first_comment?: string;
5628
- alt_text?: string;
5629
- collaborators?: string[];
5630
- }
5631
- /** A caption the AI wrote for one network. */
5632
- export interface MarketingCaptionSuggestion {
5633
- provider: string;
5634
- caption: string;
5635
- }
5636
- /** A request for AI captions and, once done, one suggestion per network. */
5637
- export interface MarketingCaptionDraft {
5638
- id: string;
5639
- status: "queued" | "done" | "failed";
5640
- brief: string;
5641
- tone: string;
5642
- providers: string[];
5643
- suggestions: MarketingCaptionSuggestion[];
5644
- /** Starts with a code: allowance_used, not_configured or failed. */
5645
- error: string;
5646
- created_at: string;
5647
- finished_at: string | null;
5648
- }
5649
- /** A generated picture or video request; url is set once it is done. */
5650
- export interface MarketingGeneration {
5651
- id: string;
5652
- kind: "image" | "video";
5653
- status: "queued" | "rendering" | "done" | "failed";
5654
- prompt: string;
5655
- url: string | null;
5656
- error: string;
5657
- created_at: string;
5658
- }
5659
- /** One weekly posting time: 0 Sunday … 6 Saturday, and a local "HH:MM". */
5660
- export interface MarketingPostScheduleSlot {
5661
- weekday: number;
5662
- time: string;
5663
- }
5664
- /** An account's weekly posting times and the next one no post has taken. */
5665
- export interface MarketingPostSchedule {
5666
- channel_id: string;
5667
- time_zone: string | null;
5668
- slots: MarketingPostScheduleSlot[];
5669
- next_slot: string | null;
5670
- }
5671
- /** A weekday and hour an account's published posts drew the most interactions at. */
5672
- export interface MarketingBestTime {
5673
- weekday: number;
5674
- hour: number;
5675
- posts: number;
5676
- average_interactions: number;
5677
- }
5678
- /** The best times to post, best first, with how many posts they were read from. */
5679
- export interface MarketingBestTimes {
5680
- time_zone: string;
5681
- sample: number;
5682
- times: MarketingBestTime[];
5683
5404
  }
5684
5405
  /** Who can view a TikTok video, as TikTok's creator info offers the levels. */
5685
5406
  export type TikTokPrivacyLevel = "PUBLIC_TO_EVERYONE" | "MUTUAL_FOLLOW_FRIENDS" | "FOLLOWER_OF_CREATOR" | "SELF_ONLY";
@@ -6108,10 +5829,7 @@ export interface EmailMessage {
6108
5829
  provider: "gmail" | "outlook";
6109
5830
  thread_id?: string;
6110
5831
  direction: "inbound" | "outbound";
6111
- /** The sender's address. */
6112
5832
  from: string;
6113
- /** The From header's display name ("Anthropic"); absent when it names no one, or on mail synced before it was kept. */
6114
- from_name?: string;
6115
5833
  to: string[];
6116
5834
  cc?: string[];
6117
5835
  subject: string;
@@ -6170,8 +5888,6 @@ export interface EmailMessageBody {
6170
5888
  account_id: string;
6171
5889
  direction: "inbound" | "outbound";
6172
5890
  from: string;
6173
- /** The From header's display name; empty when it names no one. */
6174
- from_name: string;
6175
5891
  to: string[];
6176
5892
  cc?: string[];
6177
5893
  subject: string;
@@ -6705,48 +6421,6 @@ export interface OverviewChatResponse {
6705
6421
  /** True when this turn created, appended, edited, or deleted a dashboard. */
6706
6422
  dashboard_changed: boolean;
6707
6423
  }
6708
- /** How a `askSession` stood when its wait ended. */
6709
- export type SessionAskState = "answered" | "awaiting_approval" | "awaiting_input" | "working" | "failed";
6710
- /**
6711
- * What `askSession` answers: the question as a message in a session thread,
6712
- * and how that session's run stood when the wait ended.
6713
- */
6714
- export interface SessionAsk {
6715
- thread_id: string;
6716
- /** The session the ask opened; absent when it went to a thread already open. */
6717
- session_id?: string;
6718
- /** The message sent; "" for a wait that sent none. */
6719
- message_id: string;
6720
- /** The session run the message reached; "" when none did yet. */
6721
- run_id: string;
6722
- state: SessionAskState;
6723
- /** The answer's prose, markdown, when `state` is `answered`. */
6724
- reply: string;
6725
- /** The answer's json-render spec, when it drew one. */
6726
- ui?: UISpec;
6727
- /** The answer's Block Kit blocks, when it laid some out. */
6728
- blocks?: MessageBlock[];
6729
- /**
6730
- * The action that waits for a person: decide it with `approveRun` /
6731
- * `denyRun` on `run_id`, the run that holds it (the session's own, or a
6732
- * specialist's it called).
6733
- */
6734
- approval?: {
6735
- id: string;
6736
- run_id: string;
6737
- tool: string;
6738
- input: Json;
6739
- };
6740
- /** The questions the run asked: answer with `answerRun`, or by writing in the thread. */
6741
- questions?: RunQuestion[];
6742
- /** What the run waits on was pending before this message: the message waits behind it. */
6743
- queued: boolean;
6744
- /** Why the run failed: `ai_allowance_used` when the plan refused the model. */
6745
- error?: {
6746
- code: string;
6747
- message: string;
6748
- };
6749
- }
6750
6424
  /** How far a tool call got during a streaming chat turn. */
6751
6425
  export type OverviewChatToolPhase = "start" | "ok" | "error" | "approval" | "questions";
6752
6426
  /**
@@ -7950,68 +7624,12 @@ export interface NemphiClient {
7950
7624
  media_urls?: string[];
7951
7625
  media_type?: MarketingPost["media_type"];
7952
7626
  scheduled_at?: string;
7953
- /** Per-account captions keyed by channel id; an account named here gets its own text. */
7954
- captions?: Record<string, string>;
7955
- /** Schedule each account's post for its next free posting time instead of scheduled_at. */
7956
- queue?: boolean;
7957
- } & TikTokPostChoices & MarketingPostDetailChoices): Promise<{
7627
+ } & TikTokPostChoices): Promise<{
7958
7628
  batch_id: string;
7959
7629
  posts: MarketingPost[];
7960
7630
  note?: string;
7961
7631
  }>;
7962
7632
  getTikTokCreatorInfo(channelId: string): Promise<TikTokCreatorInfo>;
7963
- writeMarketingCaptions(input: {
7964
- brief: string;
7965
- providers: string[];
7966
- tone?: "friendly" | "professional" | "playful" | "bold";
7967
- language?: string;
7968
- current_caption?: string;
7969
- }): Promise<MarketingCaptionDraft>;
7970
- getMarketingCaptionDraft(draftId: string): Promise<MarketingCaptionDraft>;
7971
- generateMarketingImage(input: {
7972
- prompt: string;
7973
- orientation?: "square" | "portrait" | "landscape";
7974
- }): Promise<MarketingGeneration>;
7975
- listMarketingGenerations(input?: {
7976
- kind?: "image" | "video";
7977
- status?: MarketingGeneration["status"];
7978
- }): Promise<MarketingGeneration[]>;
7979
- listMarketingPostSchedules(): Promise<MarketingPostSchedule[]>;
7980
- setMarketingPostSchedule(input: {
7981
- channel_id: string;
7982
- time_zone: string;
7983
- slots: MarketingPostScheduleSlot[];
7984
- }): Promise<MarketingPostSchedule>;
7985
- getMarketingBestPostTimes(input: {
7986
- channel_id: string;
7987
- time_zone?: string;
7988
- }): Promise<MarketingBestTimes>;
7989
- setMarketingPostTags(input: {
7990
- post_id: string;
7991
- tags: string[];
7992
- }): Promise<MarketingPost>;
7993
- listMarketingPostNotes(postId: string): Promise<MarketingPostNote[]>;
7994
- addMarketingPostNote(input: {
7995
- post_id: string;
7996
- body: string;
7997
- }): Promise<MarketingPostNote>;
7998
- listMarketingSnippets(input?: {
7999
- kind?: MarketingSnippet["kind"];
8000
- }): Promise<MarketingSnippet[]>;
8001
- saveMarketingSnippet(input: {
8002
- id?: string;
8003
- kind: MarketingSnippet["kind"];
8004
- name: string;
8005
- body: string;
8006
- }): Promise<MarketingSnippet>;
8007
- deleteMarketingSnippet(id: string): Promise<MarketingSnippet>;
8008
- listMarketingIdeas(): Promise<MarketingIdea[]>;
8009
- saveMarketingIdea(input: {
8010
- id?: string;
8011
- title: string;
8012
- notes?: string;
8013
- }): Promise<MarketingIdea>;
8014
- deleteMarketingIdea(id: string): Promise<MarketingIdea>;
8015
7633
  listMarketingPostRevisions(input: {
8016
7634
  post_id: string;
8017
7635
  before_version?: number;
@@ -8039,7 +7657,7 @@ export interface NemphiClient {
8039
7657
  caption?: string;
8040
7658
  media_type?: MarketingPost["media_type"];
8041
7659
  media_urls?: string[];
8042
- } & TikTokPostChoices & MarketingPostDetailChoices): Promise<{
7660
+ } & TikTokPostChoices): Promise<{
8043
7661
  post: MarketingPost;
8044
7662
  }>;
8045
7663
  submitMarketingPost(postId: string): Promise<{
@@ -8120,28 +7738,6 @@ export interface NemphiClient {
8120
7738
  conversation_id: string;
8121
7739
  body: string;
8122
7740
  }): Promise<MarketingMessage>;
8123
- listMarketingComments(input?: {
8124
- channel_id?: string;
8125
- post_id?: string;
8126
- limit?: number;
8127
- }): Promise<MarketingComment[]>;
8128
- replyToMarketingComment(input: {
8129
- comment_id: string;
8130
- body: string;
8131
- }): Promise<MarketingComment>;
8132
- hideMarketingComment(input: {
8133
- comment_id: string;
8134
- hidden: boolean;
8135
- }): Promise<MarketingComment>;
8136
- assignMarketingConversation(input: {
8137
- conversation_id: string;
8138
- assignee_user_id?: string;
8139
- }): Promise<MarketingConversation>;
8140
- listMarketingConversationNotes(conversationId: string): Promise<MarketingConversationNote[]>;
8141
- addMarketingConversationNote(input: {
8142
- conversation_id: string;
8143
- body: string;
8144
- }): Promise<MarketingConversationNote>;
8145
7741
  linkMarketingConversationParty(input: {
8146
7742
  conversation_id: string;
8147
7743
  party_id: string;
@@ -8870,25 +8466,6 @@ export interface NemphiClient {
8870
8466
  * content type — for showing what was shared, not only its name.
8871
8467
  */
8872
8468
  downloadDocument(id: string): Promise<Response>;
8873
- /** The desktop folder sync's feed: no cursor lists everything, a cursor answers what changed. */
8874
- fileSyncChanges(cursor?: string, limit?: number): Promise<FileSyncPage>;
8875
- /** A synced entry's bytes (a live document exported to Word, Excel or PowerPoint); ETag is its content_version. */
8876
- downloadFileSyncContent(id: string): Promise<Response>;
8877
- /** Replaces an entry's bytes when it still holds `contentVersion`; a stale one throws ApiError 409. */
8878
- replaceFileSyncContent(id: string, contentVersion: string, body: Blob | Uint8Array): Promise<FileSyncItem>;
8879
- /** Files new bytes as a file entry under `parentId` (personal, team or a folder id). */
8880
- createFileSyncFile(parentId: string, name: string, body: Blob | Uint8Array): Promise<FileSyncItem>;
8881
- createFileSyncFolder(parentId: string, name: string): Promise<FileSyncItem>;
8882
- /** Renames or moves an item; a stale `baseVersion` throws ApiError 409. */
8883
- moveFileSyncItem(id: string, change: {
8884
- parentId?: string;
8885
- name?: string;
8886
- }, baseVersion: string): Promise<FileSyncItem>;
8887
- /** Trashes an entry, or a folder with everything in it; a stale `baseVersion` throws ApiError 409. */
8888
- deleteFileSyncItem(id: string, baseVersion: string): Promise<{
8889
- id: string;
8890
- deleted: boolean;
8891
- }>;
8892
8469
  /** Sends documents through a public link, mailed to any recipients. */
8893
8470
  createTransfer(input: TransferInput): Promise<CreatedTransfer>;
8894
8471
  /** The caller's transfers (an owner or admin: the workspace's), newest first. */
@@ -8941,48 +8518,22 @@ export interface NemphiClient {
8941
8518
  next_before?: number;
8942
8519
  }>;
8943
8520
  /**
8944
- * One connection to the workspace's realtime stream
8945
- * (`GET /v1/events/stream`, server-sent events): every frame it carries,
8946
- * checked by its `type`, until the connection ends (the server closes a
8947
- * stream after 15 minutes) or `signal` aborts. `action` and
8948
- * `notification` are wake-ups naming a row; read the row back. The
8949
- * stream keeps no position, so a reader that connects again re-reads
8950
- * what it shows. `openRealtimeSocket` reconnects for you.
8521
+ * Live tail of the action ledger (`GET /v1/events/stream`, SSE).
8522
+ * Resumes from `cursor` (last seen action id); abort via `signal`.
8951
8523
  */
8952
8524
  streamEvents(opts?: {
8953
- /** @deprecated Ignored: the stream keeps no position. */
8954
8525
  cursor?: number;
8955
8526
  signal?: AbortSignal;
8956
- }): AsyncGenerator<RealtimeEvent, void, void>;
8527
+ }): AsyncGenerator<Action, void, void>;
8957
8528
  /**
8958
- * The workspace's realtime events from `GET /v1/events/stream`, opened
8959
- * again with backoff whenever it drops, until `close()`: the ledger and
8960
- * the caller's notifications as wake-ups, the workspace's frames as they
8961
- * are, and who is online. The connection keeps the caller online.
8529
+ * The workspace's realtime events, polled from `GET /v1/events/poll`
8530
+ * every two seconds (at once while the server has more), with retries
8531
+ * until `close()`: the ledger and the caller's notifications as
8532
+ * wake-ups, the workspace's frames as they are, and who is online when
8533
+ * that changed. Each poll keeps the caller online. The web app polls the
8534
+ * same route through its own server route.
8962
8535
  */
8963
8536
  openRealtimeSocket(options: RealtimeSocketOptions): RealtimeSocket;
8964
- /**
8965
- * One chat thread's own stream (`GET /v1/threads/{id}/stream`), for a
8966
- * member who sits in it: the answers its agent runs are writing
8967
- * (`run_delta`) and each run step's end (`run`). It opens the stream
8968
- * again with backoff whenever it drops or the server ends it, until
8969
- * `signal` aborts; a refusal that will not change (401, 403, the thread
8970
- * not found as 404) throws an `ApiError`.
8971
- *
8972
- * Every connection first replays the turn being written, so a reader
8973
- * that reconnects mid-answer has all of it. Fold the pieces by
8974
- * `(seq, n)`: a later `seq` starts the run's text over, a piece already
8975
- * held (the same `seq`, an `n` at or below the last) changes nothing.
8976
- * The answer itself always lands as a message; a `run` frame whose
8977
- * outcome is `continue` or `parked` means the text so far was preamble.
8978
- * A step that ended while the stream was down is not replayed, so
8979
- * `onOpen` after the first is the moment to re-read the thread.
8980
- */
8981
- streamThread(threadId: string, opts?: {
8982
- signal?: AbortSignal;
8983
- /** Called each time the stream answers. */
8984
- onOpen?: () => void;
8985
- }): AsyncGenerator<ThreadStreamEvent, void, void>;
8986
8537
  /** Say the caller is writing in a thread or an inbox conversation (`POST /v1/events/typing`); nothing is stored. */
8987
8538
  sendTyping(input: {
8988
8539
  scope: TypingScope;
@@ -9146,8 +8697,6 @@ export interface NemphiClient {
9146
8697
  warehouse_id?: string;
9147
8698
  limit?: number;
9148
8699
  }): Promise<ReorderSuggestion[]>;
9149
- /** The inventory page in one read; `month` is YYYY-MM, this month when omitted. */
9150
- inventoryOverview(month?: string): Promise<InventoryOverview>;
9151
8700
  adjustStock(input: {
9152
8701
  item_id: string;
9153
8702
  warehouse_id?: string;
@@ -9536,28 +9085,6 @@ export interface NemphiClient {
9536
9085
  kind?: FeatureKind;
9537
9086
  only_unused?: boolean;
9538
9087
  }): Promise<FeatureUsageResponse>;
9539
- /**
9540
- * Asks the orchestrator one question as a message in a session thread
9541
- * (a new session, or `thread_id` to carry one on) and waits for that
9542
- * session's run: its whole answer, the approval or questions it parked
9543
- * on, or `working` once `wait_ms` (at most 55 000; 25 000 by default)
9544
- * runs out, when the reply lands in the thread. With `thread_id` and no
9545
- * `text` it sends nothing and waits on the thread as it stands: the
9546
- * answer once an approval is decided. Follow the thread live with
9547
- * `streamThread`.
9548
- */
9549
- askSession(input: {
9550
- text?: string;
9551
- thread_id?: string;
9552
- context?: string;
9553
- document_ids?: string[];
9554
- wait_ms?: number;
9555
- }): Promise<SessionAsk>;
9556
- /**
9557
- * @deprecated Use `askSession`: the overview chat now asks the member's
9558
- * DM with the orchestrator through the same session path, and the route
9559
- * goes once installed app builds age out.
9560
- */
9561
9088
  overviewChat(input: {
9562
9089
  messages: ChatMessage[];
9563
9090
  }): Promise<OverviewChatResponse>;
@@ -9565,9 +9092,6 @@ export interface NemphiClient {
9565
9092
  * The same round-trip as `overviewChat`, reported as it happens. Render
9566
9093
  * the deltas for immediate feedback and take the final answer from the
9567
9094
  * `done` event — it is what `overviewChat` would have returned.
9568
- *
9569
- * @deprecated Use `askSession`, and `streamThread` to follow the answer
9570
- * as it forms.
9571
9095
  */
9572
9096
  overviewChatStream(input: {
9573
9097
  messages: ChatMessage[];
@@ -9597,12 +9121,7 @@ export interface NemphiClient {
9597
9121
  mirrorOverviewThread(turns: ConversationTurn[]): Promise<{
9598
9122
  thread_id: string;
9599
9123
  }>;
9600
- /**
9601
- * Decides an in-chat authorization request; approving executes the parked call.
9602
- *
9603
- * @deprecated Approvals are the run's now: decide `SessionAsk.approval`
9604
- * with `approveRun` / `denyRun` on its `run_id`.
9605
- */
9124
+ /** Decides an in-chat authorization request; approving executes the parked call. */
9606
9125
  decideChatApproval(id: string, approve: boolean): Promise<ChatApprovalDecision>;
9607
9126
  listDashboards(): Promise<DashboardSummary[]>;
9608
9127
  /**