@nemphi/sdk 0.8.5953 → 0.8.6310

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 (196) hide show
  1. package/dist/generated/apps/client.d.ts +27 -1
  2. package/dist/generated/apps/client.d.ts.map +1 -1
  3. package/dist/generated/apps/client.js +9 -1
  4. package/dist/generated/apps/client.js.map +1 -1
  5. package/dist/generated/apps/index.d.ts +2 -2
  6. package/dist/generated/apps/index.d.ts.map +1 -1
  7. package/dist/generated/apps/models.d.ts +21 -0
  8. package/dist/generated/apps/models.d.ts.map +1 -1
  9. package/dist/generated/apps/models.js +13 -0
  10. package/dist/generated/apps/models.js.map +1 -1
  11. package/dist/generated/bank/client.d.ts +88 -10
  12. package/dist/generated/bank/client.d.ts.map +1 -1
  13. package/dist/generated/bank/client.js +20 -3
  14. package/dist/generated/bank/client.js.map +1 -1
  15. package/dist/generated/bank/index.d.ts +2 -2
  16. package/dist/generated/bank/index.d.ts.map +1 -1
  17. package/dist/generated/bank/models.d.ts +49 -0
  18. package/dist/generated/bank/models.d.ts.map +1 -1
  19. package/dist/generated/bank/models.js +31 -0
  20. package/dist/generated/bank/models.js.map +1 -1
  21. package/dist/generated/bills/client.d.ts +8 -4
  22. package/dist/generated/bills/client.d.ts.map +1 -1
  23. package/dist/generated/bills/client.js.map +1 -1
  24. package/dist/generated/callcenter/client.d.ts +27 -3
  25. package/dist/generated/callcenter/client.d.ts.map +1 -1
  26. package/dist/generated/callcenter/client.js +9 -0
  27. package/dist/generated/callcenter/client.js.map +1 -1
  28. package/dist/generated/callcenter/index.d.ts +1 -1
  29. package/dist/generated/callcenter/index.d.ts.map +1 -1
  30. package/dist/generated/callcenter/models.d.ts +1 -0
  31. package/dist/generated/callcenter/models.d.ts.map +1 -1
  32. package/dist/generated/callcenter/models.js +1 -0
  33. package/dist/generated/callcenter/models.js.map +1 -1
  34. package/dist/generated/connections/models.d.ts +2 -0
  35. package/dist/generated/connections/models.d.ts.map +1 -1
  36. package/dist/generated/connections/models.js +2 -0
  37. package/dist/generated/connections/models.js.map +1 -1
  38. package/dist/generated/documents/client.d.ts +20 -1
  39. package/dist/generated/documents/client.d.ts.map +1 -1
  40. package/dist/generated/documents/client.js +10 -1
  41. package/dist/generated/documents/client.js.map +1 -1
  42. package/dist/generated/documents/index.d.ts +2 -2
  43. package/dist/generated/documents/index.d.ts.map +1 -1
  44. package/dist/generated/documents/models.d.ts +6 -0
  45. package/dist/generated/documents/models.d.ts.map +1 -1
  46. package/dist/generated/documents/models.js +4 -0
  47. package/dist/generated/documents/models.js.map +1 -1
  48. package/dist/generated/email/client.d.ts +49 -9
  49. package/dist/generated/email/client.d.ts.map +1 -1
  50. package/dist/generated/email/client.js +11 -2
  51. package/dist/generated/email/client.js.map +1 -1
  52. package/dist/generated/email/index.d.ts +2 -2
  53. package/dist/generated/email/index.d.ts.map +1 -1
  54. package/dist/generated/email/models.d.ts +4 -0
  55. package/dist/generated/email/models.d.ts.map +1 -1
  56. package/dist/generated/email/models.js +1 -0
  57. package/dist/generated/email/models.js.map +1 -1
  58. package/dist/generated/inventory/client.d.ts +25 -1
  59. package/dist/generated/inventory/client.d.ts.map +1 -1
  60. package/dist/generated/inventory/client.js +10 -1
  61. package/dist/generated/inventory/client.js.map +1 -1
  62. package/dist/generated/inventory/index.d.ts +2 -2
  63. package/dist/generated/inventory/index.d.ts.map +1 -1
  64. package/dist/generated/inventory/models.d.ts +20 -0
  65. package/dist/generated/inventory/models.d.ts.map +1 -1
  66. package/dist/generated/inventory/models.js +10 -0
  67. package/dist/generated/inventory/models.js.map +1 -1
  68. package/dist/generated/invoices/client.d.ts +6 -3
  69. package/dist/generated/invoices/client.d.ts.map +1 -1
  70. package/dist/generated/invoices/client.js.map +1 -1
  71. package/dist/generated/invoices/models.d.ts +1 -0
  72. package/dist/generated/invoices/models.d.ts.map +1 -1
  73. package/dist/generated/invoices/models.js +1 -0
  74. package/dist/generated/invoices/models.js.map +1 -1
  75. package/dist/generated/items/client.d.ts +2 -1
  76. package/dist/generated/items/client.d.ts.map +1 -1
  77. package/dist/generated/items/client.js.map +1 -1
  78. package/dist/generated/knowledge/client.d.ts +5 -0
  79. package/dist/generated/knowledge/client.d.ts.map +1 -1
  80. package/dist/generated/knowledge/client.js.map +1 -1
  81. package/dist/generated/knowledge/models.d.ts +1 -0
  82. package/dist/generated/knowledge/models.d.ts.map +1 -1
  83. package/dist/generated/knowledge/models.js +1 -0
  84. package/dist/generated/knowledge/models.js.map +1 -1
  85. package/dist/generated/ledger/client.d.ts +4 -2
  86. package/dist/generated/ledger/client.d.ts.map +1 -1
  87. package/dist/generated/ledger/client.js.map +1 -1
  88. package/dist/generated/marketing/client.d.ts +2 -1
  89. package/dist/generated/marketing/client.d.ts.map +1 -1
  90. package/dist/generated/marketing/client.js.map +1 -1
  91. package/dist/generated/marketing/models.d.ts +12 -0
  92. package/dist/generated/marketing/models.d.ts.map +1 -1
  93. package/dist/generated/marketing/models.js +3 -0
  94. package/dist/generated/marketing/models.js.map +1 -1
  95. package/dist/generated/mcp/models.d.ts +2 -0
  96. package/dist/generated/mcp/models.d.ts.map +1 -1
  97. package/dist/generated/mcp/models.js +2 -0
  98. package/dist/generated/mcp/models.js.map +1 -1
  99. package/dist/generated/messages/client.d.ts +4 -2
  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/index.d.ts +1 -1
  103. package/dist/generated/messages/index.d.ts.map +1 -1
  104. package/dist/generated/messages/models.d.ts +16 -0
  105. package/dist/generated/messages/models.d.ts.map +1 -1
  106. package/dist/generated/messages/models.js +12 -0
  107. package/dist/generated/messages/models.js.map +1 -1
  108. package/dist/generated/models.d.ts +3 -0
  109. package/dist/generated/models.d.ts.map +1 -1
  110. package/dist/generated/models.js +3 -0
  111. package/dist/generated/models.js.map +1 -1
  112. package/dist/generated/parties/client.d.ts +7 -5
  113. package/dist/generated/parties/client.d.ts.map +1 -1
  114. package/dist/generated/parties/client.js.map +1 -1
  115. package/dist/generated/payments/client.d.ts +2 -1
  116. package/dist/generated/payments/client.d.ts.map +1 -1
  117. package/dist/generated/payments/client.js.map +1 -1
  118. package/dist/generated/policies/client.d.ts +10 -3
  119. package/dist/generated/policies/client.d.ts.map +1 -1
  120. package/dist/generated/policies/client.js +1 -1
  121. package/dist/generated/policies/client.js.map +1 -1
  122. package/dist/generated/policies/models.d.ts +1 -0
  123. package/dist/generated/policies/models.d.ts.map +1 -1
  124. package/dist/generated/policies/models.js.map +1 -1
  125. package/dist/generated/projects/client.d.ts +13 -8
  126. package/dist/generated/projects/client.d.ts.map +1 -1
  127. package/dist/generated/projects/client.js +1 -1
  128. package/dist/generated/projects/client.js.map +1 -1
  129. package/dist/generated/projects/models.d.ts +2 -0
  130. package/dist/generated/projects/models.d.ts.map +1 -1
  131. package/dist/generated/projects/models.js +2 -0
  132. package/dist/generated/projects/models.js.map +1 -1
  133. package/dist/generated/quotes/client.d.ts +32 -8
  134. package/dist/generated/quotes/client.d.ts.map +1 -1
  135. package/dist/generated/quotes/client.js +10 -1
  136. package/dist/generated/quotes/client.js.map +1 -1
  137. package/dist/generated/quotes/index.d.ts +2 -2
  138. package/dist/generated/quotes/index.d.ts.map +1 -1
  139. package/dist/generated/quotes/models.d.ts +9 -0
  140. package/dist/generated/quotes/models.d.ts.map +1 -1
  141. package/dist/generated/quotes/models.js +6 -0
  142. package/dist/generated/quotes/models.js.map +1 -1
  143. package/dist/generated/records/client.d.ts +19 -8
  144. package/dist/generated/records/client.d.ts.map +1 -1
  145. package/dist/generated/records/client.js.map +1 -1
  146. package/dist/generated/recurring/client.d.ts +6 -1
  147. package/dist/generated/recurring/client.d.ts.map +1 -1
  148. package/dist/generated/recurring/client.js +1 -1
  149. package/dist/generated/recurring/client.js.map +1 -1
  150. package/dist/generated/recurring/models.d.ts +1 -0
  151. package/dist/generated/recurring/models.d.ts.map +1 -1
  152. package/dist/generated/recurring/models.js +1 -0
  153. package/dist/generated/recurring/models.js.map +1 -1
  154. package/dist/generated/routines/client.d.ts +7 -1
  155. package/dist/generated/routines/client.d.ts.map +1 -1
  156. package/dist/generated/routines/client.js +1 -1
  157. package/dist/generated/routines/client.js.map +1 -1
  158. package/dist/generated/routines/models.d.ts +1 -0
  159. package/dist/generated/routines/models.d.ts.map +1 -1
  160. package/dist/generated/routines/models.js +1 -0
  161. package/dist/generated/routines/models.js.map +1 -1
  162. package/dist/generated/sessions/models.d.ts +6 -0
  163. package/dist/generated/sessions/models.d.ts.map +1 -1
  164. package/dist/generated/sessions/models.js +1 -0
  165. package/dist/generated/sessions/models.js.map +1 -1
  166. package/dist/generated/tenants/client.d.ts +55 -1
  167. package/dist/generated/tenants/client.d.ts.map +1 -1
  168. package/dist/generated/tenants/client.js +18 -1
  169. package/dist/generated/tenants/client.js.map +1 -1
  170. package/dist/generated/tenants/index.d.ts +2 -2
  171. package/dist/generated/tenants/index.d.ts.map +1 -1
  172. package/dist/generated/tenants/models.d.ts +9 -0
  173. package/dist/generated/tenants/models.d.ts.map +1 -1
  174. package/dist/generated/tenants/models.js +4 -0
  175. package/dist/generated/tenants/models.js.map +1 -1
  176. package/dist/generated/transfers/client.d.ts +7 -4
  177. package/dist/generated/transfers/client.d.ts.map +1 -1
  178. package/dist/generated/transfers/client.js +1 -1
  179. package/dist/generated/transfers/client.js.map +1 -1
  180. package/dist/generated/transfers/models.d.ts +1 -0
  181. package/dist/generated/transfers/models.d.ts.map +1 -1
  182. package/dist/generated/transfers/models.js +1 -0
  183. package/dist/generated/transfers/models.js.map +1 -1
  184. package/dist/generated/workflows/client.d.ts +1 -0
  185. package/dist/generated/workflows/client.d.ts.map +1 -1
  186. package/dist/generated/workflows/client.js +1 -1
  187. package/dist/generated/workflows/client.js.map +1 -1
  188. package/dist/generated/workflows/models.d.ts +1 -0
  189. package/dist/generated/workflows/models.d.ts.map +1 -1
  190. package/dist/generated/workflows/models.js +1 -0
  191. package/dist/generated/workflows/models.js.map +1 -1
  192. package/dist/index.d.ts +234 -3
  193. package/dist/index.d.ts.map +1 -1
  194. package/dist/index.js +40 -4
  195. package/dist/index.js.map +1 -1
  196. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -48,6 +48,8 @@ export interface User {
48
48
  avatar_source?: UserAvatarSource;
49
49
  /** Connected identity whose photo is showing, when avatar_source is identity. */
50
50
  avatar_identity_id?: string | null;
51
+ /** The newest «Novedades» entry the person has opened; "" before the first. */
52
+ changelog_seen?: string;
51
53
  }
52
54
  export interface Tenant {
53
55
  id: string;
@@ -55,6 +57,13 @@ export interface Tenant {
55
57
  slug: string;
56
58
  country: string;
57
59
  currency: string;
60
+ /**
61
+ * The IANA zone the workspace keeps its days in: the one it chose in
62
+ * Empresa, else its country's. Every "today" a person reads (a document
63
+ * dated today, what is due, the calendar's day) is this zone's. Absent
64
+ * from an older platform.
65
+ */
66
+ time_zone?: string;
58
67
  /** Local part of the workspace's document-forwarding address. */
59
68
  inbound_token?: string | null;
60
69
  created_at: string;
@@ -97,6 +106,12 @@ export interface Membership {
97
106
  * from it. Absent for built-in roles.
98
107
  */
99
108
  modules?: Record<string, RoleAccess>;
109
+ /**
110
+ * Custom roles only: the tools the role's grants let it call, sorted.
111
+ * A page offers an action (and a picker its «Crear…») only when its
112
+ * tool is here. Absent for built-in roles. The pipeline still decides.
113
+ */
114
+ tools?: string[];
100
115
  /**
101
116
  * When the workspace finished the profiling gate, or null while it
102
117
  * still owes it answers. The app redirects to onboarding on null:
@@ -300,6 +315,10 @@ export interface UserSession {
300
315
  id: string;
301
316
  ip: string;
302
317
  user_agent: string;
318
+ /** The city it signed in from, as the edge located it; "" when unknown or before it was recorded. */
319
+ city?: string;
320
+ /** The ISO country beside the city; "" when unknown. */
321
+ country?: string;
303
322
  created_at: string;
304
323
  last_seen_at: string | null;
305
324
  expires_at: string;
@@ -442,10 +461,18 @@ export interface Run {
442
461
  id: string;
443
462
  tenant_id: string;
444
463
  agent_id: string;
464
+ /**
465
+ * Set on the run detail endpoint: whether the caller may approve or deny
466
+ * the run's pending approval (`InboxApproval.can_decide`'s rule); false
467
+ * when nothing waits.
468
+ */
469
+ can_decide?: boolean;
445
470
  /** Set on the run detail endpoint: the agent's stored name and definition slug. */
446
471
  agent_name?: string;
447
472
  agent_definition?: string;
448
473
  trigger: string;
474
+ /** For a run an event started (`event:…`), the tool whose action fired it; listed and loaded runs only. */
475
+ trigger_tool?: string;
449
476
  /** The brief the model reads: instructions, ids and context, not for people. */
450
477
  goal: string;
451
478
  /**
@@ -590,7 +617,29 @@ export interface Notification {
590
617
  * a reader through the inbox.
591
618
  */
592
619
  seq?: number;
620
+ /**
621
+ * What the notice says, as a kind of notice and its values
622
+ * (`@nemphi/core/notices`), for a client that renders it in its reader's
623
+ * language; `title` and `body` are already said in the language the
624
+ * request asked for (`?locale=`, then Accept-Language, then the member's
625
+ * own). Absent on rows written as finished text.
626
+ */
627
+ copy?: {
628
+ key: string;
629
+ values: {
630
+ [name: string]: NoticeCopyValue;
631
+ };
632
+ };
593
633
  }
634
+ /**
635
+ * One value of a notice (`Notification.copy`): text or a number, or the
636
+ * fields of an agent (`agent`, `name`), a tool (`tool`), money (`cents`,
637
+ * `currency`), a day (`date`), a month (`month`), an instant (`at`, `zone`)
638
+ * or a fragment said in each language (`es`, `en`).
639
+ */
640
+ export type NoticeCopyValue = string | number | {
641
+ [field: string]: string | number;
642
+ };
594
643
  /**
595
644
  * One realtime event of the workspace (`openRealtimeSocket` and
596
645
  * `streamEvents`, the frames of `GET /v1/events/stream` and
@@ -713,6 +762,23 @@ export interface InboxApproval {
713
762
  agent_definition: string;
714
763
  trigger: string;
715
764
  created_at: string;
765
+ /**
766
+ * Whose call waits: a run's (decided by its run, `/v1/runs/{id}/approve`)
767
+ * or the outside assistant's that opened the workspace (`run_id` is "";
768
+ * decided with `approvals.decide` and `approval_id`, by an owner or admin).
769
+ * The inbox answers the assistant's only to `GET /v1/inbox?with=assistant`.
770
+ */
771
+ source?: "run" | "assistant";
772
+ /** For the assistant's call, the owner it works for ("" when unknown). */
773
+ owner_name?: string;
774
+ /**
775
+ * Whether the caller may approve or deny this call, by the rule the
776
+ * deciding routes refuse by: they could run its tool themselves, and,
777
+ * when a policy routed it to a role, they hold that role or are an owner
778
+ * or admin (an assistant's call: an owner or admin). Offer the buttons
779
+ * from this, not from the inbox's top-level `can_decide`.
780
+ */
781
+ can_decide: boolean;
716
782
  }
717
783
  export interface InboxQuestion {
718
784
  run_id: string;
@@ -740,6 +806,11 @@ export interface PolicySuggestion {
740
806
  rationale: string;
741
807
  }
742
808
  export interface Inbox {
809
+ /**
810
+ * Whether the caller decides approvals at all (any member but a viewer),
811
+ * kept for installed apps. Whether they may decide a given call is that
812
+ * row's own `can_decide`: follow the row.
813
+ */
743
814
  can_decide: boolean;
744
815
  pending_approvals: InboxApproval[];
745
816
  pending_questions: InboxQuestion[];
@@ -1502,6 +1573,8 @@ export interface RecurringDocument {
1502
1573
  template: JsonObject;
1503
1574
  due_days: number;
1504
1575
  cron: string;
1576
+ /** The IANA zone the cron is read in (the workspace's by default; UTC for older schedules). */
1577
+ time_zone: string;
1505
1578
  enabled: boolean;
1506
1579
  next_run_at: string;
1507
1580
  last_run_at?: string;
@@ -1541,6 +1614,12 @@ export interface PolicyList {
1541
1614
  * older platform.
1542
1615
  */
1543
1616
  risks?: Record<string, RiskClass>;
1617
+ /**
1618
+ * The financial tools that carry no amount, so a money ceiling never
1619
+ * covers them: under "up to an amount" they always ask. Absent from an
1620
+ * older platform.
1621
+ */
1622
+ amountless?: string[];
1544
1623
  }
1545
1624
  export interface ActionPreview {
1546
1625
  action: "approve" | "deny";
@@ -1569,6 +1648,8 @@ export interface LiveDocumentFile {
1569
1648
  kind?: string;
1570
1649
  /** How far reading it got; left out when the answer did not read it. */
1571
1650
  reading?: LiveDocumentReading;
1651
+ /** The bill filed from the file, on a list (`listLiveDocuments`). */
1652
+ bill_id?: string;
1572
1653
  }
1573
1654
  /**
1574
1655
  * How far reading a file got: `pending` (queued or being read), `read`
@@ -1642,7 +1723,11 @@ export interface LiveDocumentFilter {
1642
1723
  type?: string;
1643
1724
  /** Only the files whose reading got this far. */
1644
1725
  reading?: LiveDocumentReading;
1726
+ /** Only the documents last edited in this range, by the workspace's own calendar. */
1727
+ modified?: LiveDocumentModified;
1645
1728
  }
1729
+ /** The ranges `LiveDocumentFilter.modified` takes. */
1730
+ export type LiveDocumentModified = "today" | "last_7_days" | "last_30_days" | "this_year" | "last_year";
1646
1731
  /** A folder of documents; folders nest through `parent_id`. */
1647
1732
  export interface LiveDocumentFolder {
1648
1733
  id: string;
@@ -1882,6 +1967,11 @@ export interface UploadSession {
1882
1967
  parts: number;
1883
1968
  expires_at: string;
1884
1969
  }
1970
+ /** An upload session as it stands (`getUpload`): the part size and how many parts it holds. */
1971
+ export interface UploadStatus extends UploadSession {
1972
+ parts_received: number;
1973
+ status: "open" | "completed" | "aborted";
1974
+ }
1885
1975
  /** One part recorded, and the bytes the session holds so far. */
1886
1976
  export interface UploadPartResult {
1887
1977
  number: number;
@@ -2853,6 +2943,10 @@ export interface PublicCall {
2853
2943
  created_at: string;
2854
2944
  /** When a scheduled call starts; the guest waits for it to open. */
2855
2945
  scheduled_for: string | null;
2946
+ /** How long a scheduled call is booked for, in minutes. */
2947
+ scheduled_minutes?: number | null;
2948
+ /** Whether the workspace has a logo the lobby can show (getPublicCallLogo). */
2949
+ has_logo?: boolean;
2856
2950
  }
2857
2951
  /** A guest's claim on a call: the id and secret used to poll for the media token. */
2858
2952
  export interface PublicCallJoin {
@@ -2951,6 +3045,29 @@ export interface ThreadActionRow {
2951
3045
  amount_cents: number | null;
2952
3046
  currency: string;
2953
3047
  }
3048
+ /**
3049
+ * A look an agent took for a conversation (a call that changes nothing, so
3050
+ * it leaves no ledger row), filed under the answer it led to.
3051
+ */
3052
+ export interface ThreadReadRow {
3053
+ id: string;
3054
+ run_id: string;
3055
+ /** The tool's dotted name. */
3056
+ tool: string;
3057
+ created_at: string;
3058
+ /** The agent message it led to; "" while the run has not answered since. */
3059
+ message_id: string;
3060
+ }
3061
+ /**
3062
+ * A message someone sent while the conversation's agent was at work: it
3063
+ * waits until the run takes it at its next turn.
3064
+ */
3065
+ export interface ThreadQueuedRow {
3066
+ message_id: string;
3067
+ run_id: string;
3068
+ /** When the run took it; null while it still waits. */
3069
+ delivered_at: string | null;
3070
+ }
2954
3071
  /** An approval someone decided for a conversation's runs. */
2955
3072
  export interface ThreadDecisionRow {
2956
3073
  approval_id: string;
@@ -2970,6 +3087,10 @@ export interface MessageThreadActivity {
2970
3087
  delegates: ThreadDelegateRow[];
2971
3088
  /** What the thread's recent runs changed, oldest first. */
2972
3089
  actions?: ThreadActionRow[];
3090
+ /** What the thread's recent runs looked at, oldest first. */
3091
+ reads?: ThreadReadRow[];
3092
+ /** The messages sent while an agent was at work, the last day's, newest first. */
3093
+ queued?: ThreadQueuedRow[];
2973
3094
  /** The approvals decided for the thread's recent runs, newest first. */
2974
3095
  decisions?: ThreadDecisionRow[];
2975
3096
  }
@@ -3543,6 +3664,10 @@ export interface Connection {
3543
3664
  webhook_path: string;
3544
3665
  /** The full URL to register, when the deployment names its public origin (payment providers only). */
3545
3666
  webhook_url?: string;
3667
+ /** The person who connected it; absent for a connection made before that was recorded. */
3668
+ connected_by?: string;
3669
+ /** Their name (or address), when the directory still knows them. */
3670
+ connected_by_name?: string;
3546
3671
  created_at: string;
3547
3672
  updated_at: string;
3548
3673
  }
@@ -4340,6 +4465,8 @@ export interface InvoiceDetail {
4340
4465
  reason_label?: string;
4341
4466
  /** Where the customer pays the outstanding balance (a Wompi checkout); absent when nothing is owed or no payment provider is connected. */
4342
4467
  payment_url?: string;
4468
+ /** The customer's name. */
4469
+ party_name?: string;
4343
4470
  }
4344
4471
  export interface BillDetail {
4345
4472
  bill: Bill;
@@ -4663,7 +4790,7 @@ export interface CanvasStat {
4663
4790
  }
4664
4791
  /** Selects one live record source with optional filters (records blocks). */
4665
4792
  export interface RecordsQuery {
4666
- source: "invoices" | "bills" | "parties" | "items" | "quotes" | "sales_orders" | "rentals" | "purchase_orders" | "employees" | "assets" | "bank_transactions" | "warehouses" | "stock_levels" | "stock_movements" | "inventory_counts" | "payroll_runs" | "payslips" | "payroll_novelties" | "payroll_parameters" | "payment_runs" | "journal_entries" | "accounts" | "agent_runs" | "crm_deals" | "members" | "roles" | "policies" | "connections" | "email_accounts" | "email_templates" | "email_campaigns" | "categorization_rules" | "documents" | "calendar_events" | "connected_calendar_events" | "calendar_accounts" | "drive_accounts" | "connected_calendars" | "projects" | "project_tasks" | "project_columns" | "live_documents" | "agents" | "tags" | "tag_dimensions" | "crm_pipelines" | "crm_stages" | "crm_fields" | "payments" | "banks" | "payment_formats" | "apps" | "booking_types" | "bookings" | "ai_models";
4793
+ source: "invoices" | "bills" | "parties" | "items" | "quotes" | "sales_orders" | "rentals" | "purchase_orders" | "employees" | "assets" | "bank_transactions" | "warehouses" | "stock_levels" | "stock_movements" | "inventory_counts" | "payroll_runs" | "payslips" | "payroll_novelties" | "payroll_parameters" | "payment_runs" | "journal_entries" | "accounts" | "agent_runs" | "crm_deals" | "members" | "roles" | "policies" | "connections" | "email_accounts" | "email_templates" | "email_campaigns" | "categorization_rules" | "documents" | "calendar_events" | "connected_calendar_events" | "calendar_accounts" | "drive_accounts" | "connected_calendars" | "projects" | "project_tasks" | "project_columns" | "live_documents" | "agents" | "tags" | "tag_dimensions" | "crm_pipelines" | "crm_stages" | "crm_fields" | "payments" | "banks" | "bank_accounts" | "payment_formats" | "apps" | "booking_types" | "bookings" | "ai_models";
4667
4794
  /** Status filter in the source's own vocabulary (e.g. draft | posted; unmatched). */
4668
4795
  status?: string;
4669
4796
  /** Kind filter where the source has one (parties: customer | vendor | both). */
@@ -4679,6 +4806,13 @@ export interface RecordsQuery {
4679
4806
  search?: string;
4680
4807
  /** Row cap (default 8; max 100). */
4681
4808
  limit?: number;
4809
+ /** One record by its id: the answer holds that record alone, or no row. */
4810
+ id?: string;
4811
+ /**
4812
+ * pick: a form's picker naming one record, which the modules whose forms
4813
+ * pick from the source may read; list (default): a page or a report.
4814
+ */
4815
+ purpose?: "list" | "pick";
4682
4816
  }
4683
4817
  export interface RecordsColumn {
4684
4818
  key: string;
@@ -4988,8 +5122,10 @@ export interface WorkflowTrigger {
4988
5122
  tool_pattern?: string;
4989
5123
  /** event: top-level result values the action must carry (stage: won). */
4990
5124
  filter?: Record<string, string | number | boolean>;
4991
- /** schedule: standard 5-field cron in UTC. */
5125
+ /** schedule: standard 5-field cron, local time on `time_zone`'s clock. */
4992
5126
  cron?: string;
5127
+ /** schedule: the IANA zone the cron is read in; omitted on a save, a cron is read in UTC. */
5128
+ time_zone?: string;
4993
5129
  }
4994
5130
  /** How two values are compared in a step's condition. */
4995
5131
  export type WorkflowConditionOperator = "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty" | "is_true" | "is_false";
@@ -5295,6 +5431,11 @@ export interface EmailAccount {
5295
5431
  mark_read_in_provider: boolean;
5296
5432
  /** The owner's sign-off, added under what they write from this mailbox; absent until set. */
5297
5433
  signature?: string;
5434
+ /**
5435
+ * Owner opt-in: the AI labels this mailbox's new mail as it arrives. Off
5436
+ * (the default), the AI reads a message only when its owner asks.
5437
+ */
5438
+ ai_label_new?: boolean;
5298
5439
  last_synced_at: string | null;
5299
5440
  created_at: string;
5300
5441
  }
@@ -5417,6 +5558,12 @@ export interface MarketingConversation {
5417
5558
  created_at: string;
5418
5559
  updated_at: string;
5419
5560
  }
5561
+ /** `marketing.list_conversations`: one page of conversations, and how many are unread overall. */
5562
+ export interface MarketingConversationList {
5563
+ conversations: MarketingConversation[];
5564
+ /** Conversations with unread messages across every channel, whatever the filters and limit. */
5565
+ unread_total?: number;
5566
+ }
5420
5567
  /** One message in a marketing WhatsApp conversation. */
5421
5568
  export interface MarketingMessage {
5422
5569
  id: string;
@@ -5494,6 +5641,11 @@ export interface MarketingCall {
5494
5641
  summary?: string;
5495
5642
  /** How the customer felt on the call. */
5496
5643
  sentiment?: MarketingConversationSentiment;
5644
+ /** A web caller the team promised to call back: when that was promised. */
5645
+ callback_at?: string;
5646
+ /** When the promised call back was made, and by whom. */
5647
+ called_back_at?: string;
5648
+ called_back_by?: string;
5497
5649
  created_at: string;
5498
5650
  updated_at: string;
5499
5651
  }
@@ -5566,6 +5718,8 @@ export interface CallCenterDesk {
5566
5718
  /** The call the person holds. */
5567
5719
  current: MarketingCall | null;
5568
5720
  recent: MarketingCall[];
5721
+ /** Web callers waiting to be called back: from the person's queues, or every queue for an owner or admin. */
5722
+ callbacks?: MarketingCall[];
5569
5723
  }
5570
5724
  export interface CallCenterAgent {
5571
5725
  user_id: string;
@@ -6078,6 +6232,8 @@ export interface EmailTemplate {
6078
6232
  text?: string;
6079
6233
  created_at: string;
6080
6234
  updated_at: string;
6235
+ /** Created by the builder's autosave and never saved on purpose since. */
6236
+ unfinished?: boolean;
6081
6237
  }
6082
6238
  /**
6083
6239
  * One saved version of a template (marketing.list_email_template_revisions).
@@ -6442,6 +6598,15 @@ export interface EmailComposeInput {
6442
6598
  /** Plain text; the mailbox's signature is added under it unless `signature` is false. */
6443
6599
  body: string;
6444
6600
  signature?: boolean;
6601
+ /** Files uploaded with uploadEmailAttachment, at most 10 MB together. */
6602
+ attachment_ids?: string[];
6603
+ }
6604
+ /** POST /v1/email/attachments result: a file waiting in the composer. */
6605
+ export interface EmailAttachmentUpload {
6606
+ id: string;
6607
+ filename: string;
6608
+ content_type: string;
6609
+ size_bytes: number;
6445
6610
  }
6446
6611
  /** email.read_message result: metadata plus the stored (encrypted-at-rest) body. */
6447
6612
  export interface EmailMessageBody {
@@ -7110,6 +7275,8 @@ export interface AgentSessionDetail {
7110
7275
  tool: string;
7111
7276
  arguments: unknown;
7112
7277
  created_at: string;
7278
+ /** Whether the caller may approve or deny this call (`InboxApproval.can_decide`'s rule). */
7279
+ can_decide: boolean;
7113
7280
  }[];
7114
7281
  pending_questions: {
7115
7282
  run_id: string;
@@ -7827,6 +7994,10 @@ export interface NemphiClient {
7827
7994
  setMyLocale(locale: "es" | "en"): Promise<{
7828
7995
  locale: string;
7829
7996
  }>;
7997
+ /** Records the newest «Novedades» entry the person opened, so the Ayuda menu stops marking it. */
7998
+ setChangelogSeen(seen: string): Promise<{
7999
+ changelog_seen: string;
8000
+ }>;
7830
8001
  /**
7831
8002
  * The caller's persona and guidance for the selected workspace.
7832
8003
  * Self-service: changes how the platform talks to them, never what
@@ -7971,6 +8142,8 @@ export interface NemphiClient {
7971
8142
  mark_read_in_provider?: boolean;
7972
8143
  /** The sign-off added under what the owner writes from this mailbox; "" clears it. */
7973
8144
  signature?: string;
8145
+ /** Whether the AI labels this mailbox's new mail as it arrives. */
8146
+ ai_label_new?: boolean;
7974
8147
  }): Promise<{
7975
8148
  account: EmailAccount;
7976
8149
  }>;
@@ -7979,6 +8152,14 @@ export interface NemphiClient {
7979
8152
  queued: boolean;
7980
8153
  send: EmailSend;
7981
8154
  }>;
8155
+ /** Upload a file for the composer (10 MB at most); compose names it in attachment_ids. */
8156
+ uploadEmailAttachment(file: Blob, opts?: {
8157
+ filename?: string;
8158
+ }): Promise<EmailAttachmentUpload>;
8159
+ /** Ask the AI to label these inbox messages now (email.label_with_ai). */
8160
+ labelEmailWithAi(messageIds: string[]): Promise<{
8161
+ queued: number;
8162
+ }>;
7982
8163
  crmSettings(): Promise<CRMSettings>;
7983
8164
  configureCRM(input: {
7984
8165
  auto_create_contacts?: boolean;
@@ -8488,6 +8669,10 @@ export interface NemphiClient {
8488
8669
  linkCallCenterContact(callId: string, partyId: string): Promise<{
8489
8670
  call: MarketingCall;
8490
8671
  }>;
8672
+ /** Marks a web caller who waited to be called back as called back. */
8673
+ markCallCenterCalledBack(callId: string): Promise<{
8674
+ call: MarketingCall;
8675
+ }>;
8491
8676
  deleteCallCenterQueue(queueId: string): Promise<{
8492
8677
  deleted: string;
8493
8678
  }>;
@@ -8654,6 +8839,11 @@ export interface NemphiClient {
8654
8839
  updated: number;
8655
8840
  provider_sync_queued?: number;
8656
8841
  }>;
8842
+ /**
8843
+ * Creates a workspace the caller owns. With `idempotencyKey`, a repeat of
8844
+ * the same request by the same person answers the workspace the first one
8845
+ * made instead of creating another.
8846
+ */
8657
8847
  createTenant(input: {
8658
8848
  name: string;
8659
8849
  slug?: string;
@@ -8661,7 +8851,7 @@ export interface NemphiClient {
8661
8851
  currency?: string;
8662
8852
  /** `studio` opens a Studio-only workspace; omitted is a full one. */
8663
8853
  edition?: TenantEdition;
8664
- }): Promise<Tenant>;
8854
+ }, opts?: InvokeOpts): Promise<Tenant>;
8665
8855
  createApiKey(tenantId: string, input: {
8666
8856
  name: string;
8667
8857
  scopes?: string[];
@@ -8693,6 +8883,8 @@ export interface NemphiClient {
8693
8883
  */
8694
8884
  listTools(opts?: {
8695
8885
  names?: string[];
8886
+ /** Only the tools the caller's role may call: what a page offers as its actions. */
8887
+ callable?: boolean;
8696
8888
  }): Promise<ToolInfo[]>;
8697
8889
  /**
8698
8890
  * Calls any tool by name. `input` is the object the tool's own
@@ -8781,6 +8973,10 @@ export interface NemphiClient {
8781
8973
  markNotificationRead(id: string): Promise<{
8782
8974
  updated: number;
8783
8975
  }>;
8976
+ /** Marks read the caller's notifications about one comment thread (a mention's link). */
8977
+ markCommentThreadRead(thread: string): Promise<{
8978
+ updated: number;
8979
+ }>;
8784
8980
  markAllNotificationsRead(): Promise<{
8785
8981
  updated: number;
8786
8982
  }>;
@@ -9036,6 +9232,8 @@ export interface NemphiClient {
9036
9232
  * last part the rest. Sending the last recorded part again is answered
9037
9233
  * as the session stands. */
9038
9234
  uploadPart(id: string, number: number, body: Blob | Uint8Array): Promise<UploadPartResult>;
9235
+ /** An upload session as it stands, with the size each part must be. */
9236
+ getUpload(id: string): Promise<UploadStatus>;
9039
9237
  /** Assemble the parts and file the document, the same answer as
9040
9238
  * `uploadDocument` (with `duplicate` for bytes already filed). */
9041
9239
  completeUpload(id: string): Promise<Document>;
@@ -9075,6 +9273,14 @@ export interface NemphiClient {
9075
9273
  getDocument(id: string): Promise<Document>;
9076
9274
  /** The document with the whole text its extraction read, as Markdown. */
9077
9275
  readDocumentText(id: string): Promise<DocumentText>;
9276
+ /**
9277
+ * Reads a document again after its reading failed (`documents.reread`).
9278
+ * `queued` is false when it was not failed: nothing was queued twice.
9279
+ */
9280
+ rereadDocument(id: string): Promise<{
9281
+ document: Document;
9282
+ queued: boolean;
9283
+ }>;
9078
9284
  listLiveDocuments(filter?: LiveDocumentFilter): Promise<LiveDocument[]>;
9079
9285
  createLiveDocument(title: string, kind?: LiveDocumentKind, place?: LiveDocumentPlace): Promise<LiveDocument>;
9080
9286
  /** Files a document in a folder (empty: the top level) or moves it to another space. */
@@ -9172,6 +9378,8 @@ export interface NemphiClient {
9172
9378
  createTransfer(input: TransferInput): Promise<CreatedTransfer>;
9173
9379
  /** The caller's transfers (an owner or admin: the workspace's), newest first. */
9174
9380
  listTransfers(): Promise<Transfer[]>;
9381
+ /** How many of the caller's transfers still work (an owner's or admin's: the workspace's). */
9382
+ countActiveTransfers(): Promise<number>;
9175
9383
  /** Stops a transfer's link working, for everyone. */
9176
9384
  revokeTransfer(id: string): Promise<{
9177
9385
  id: string;
@@ -10127,6 +10335,8 @@ export interface NemphiClient {
10127
10335
  cancelManagedBooking(token: string, reason?: string): Promise<ManagedBooking>;
10128
10336
  /** The info behind a public call link. Unauthenticated. */
10129
10337
  getPublicCall(token: string): Promise<PublicCall>;
10338
+ /** The workspace's logo for a call's lobby, read with the call's token; the raw response. */
10339
+ getPublicCallLogo(token: string): Promise<Response>;
10130
10340
  /** The queue behind a call-center web call link. Unauthenticated. */
10131
10341
  getPublicCallCenterQueue(key: string): Promise<PublicCallCenterQueue>;
10132
10342
  /** Rings the queue; keep the returned `key`, it is the caller's hold on the call. */
@@ -10506,6 +10716,27 @@ export interface CustomAppFileContent {
10506
10716
  version?: number;
10507
10717
  updated_at?: string;
10508
10718
  }
10719
+ /**
10720
+ * One page of a custom app's export (`apps.export`): the app and its files
10721
+ * on the first page, then its records; `next_cursor` reads the next page
10722
+ * and is absent on the last.
10723
+ */
10724
+ export interface CustomAppExportPage {
10725
+ app: CustomApp;
10726
+ files: {
10727
+ path: string;
10728
+ content: string;
10729
+ updated_at: string;
10730
+ }[];
10731
+ records: {
10732
+ collection: string;
10733
+ id: string;
10734
+ data: unknown;
10735
+ created_at: string;
10736
+ updated_at: string;
10737
+ }[];
10738
+ next_cursor?: string;
10739
+ }
10509
10740
  /** One saved version of an app. */
10510
10741
  export interface CustomAppVersion {
10511
10742
  version: number;