@macro-inc/sdk 0.4.1 → 0.6.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 (228) hide show
  1. package/README.md +316 -21
  2. package/dist/{chunk-PTX2RV2N.js → chunk-4MI52GWV.js} +93 -1
  3. package/dist/{chunk-XFA7NCJ5.js → chunk-HO75UE4Z.js} +146 -15
  4. package/dist/{chunk-P4DTO6VD.js → chunk-MCSQNZ4E.js} +6 -0
  5. package/dist/{chunk-ZLBDES7U.js → chunk-SJ6S2GAT.js} +1271 -87
  6. package/dist/{chunk-AZJUIUIV.js → chunk-SK5CMXRV.js} +100 -14
  7. package/dist/{chunk-PZPTJI6F.js → chunk-TMTYN2UK.js} +229 -2
  8. package/dist/{chunk-PPR7IWZ7.js → chunk-ZYBAKW25.js} +2 -1
  9. package/dist/generated/agent-fold/index.d.ts +202 -14
  10. package/dist/generated/agent-harness/index.d.ts +1 -1
  11. package/dist/generated/agent-harness/index.js +1 -1
  12. package/dist/generated/agent-harness/sdk.gen.d.ts +49 -2
  13. package/dist/generated/agent-harness/types.gen.d.ts +527 -9
  14. package/dist/generated/agent-reviews/index.d.ts +11 -9
  15. package/dist/generated/auth/index.d.ts +1 -1
  16. package/dist/generated/auth/index.js +1 -1
  17. package/dist/generated/auth/sdk.gen.d.ts +82 -16
  18. package/dist/generated/auth/types.gen.d.ts +768 -18
  19. package/dist/generated/calendar/types.gen.d.ts +10 -3
  20. package/dist/generated/cognition/index.d.ts +1 -1
  21. package/dist/generated/cognition/index.js +1 -1
  22. package/dist/generated/cognition/sdk.gen.d.ts +60 -6
  23. package/dist/generated/cognition/types.gen.d.ts +663 -106
  24. package/dist/generated/connection/types.gen.d.ts +1 -1
  25. package/dist/generated/contacts/index.d.ts +1 -1
  26. package/dist/generated/contacts/index.js +1 -1
  27. package/dist/generated/contacts/sdk.gen.d.ts +5 -1
  28. package/dist/generated/contacts/types.gen.d.ts +56 -0
  29. package/dist/generated/email/types.gen.d.ts +8 -2
  30. package/dist/generated/notification/index.d.ts +1 -1
  31. package/dist/generated/notification/index.js +1 -1
  32. package/dist/generated/notification/sdk.gen.d.ts +2 -1
  33. package/dist/generated/notification/types.gen.d.ts +174 -1
  34. package/dist/generated/scheduled-action/index.d.ts +1 -1
  35. package/dist/generated/scheduled-action/index.js +1 -1
  36. package/dist/generated/scheduled-action/sdk.gen.d.ts +107 -2
  37. package/dist/generated/scheduled-action/types.gen.d.ts +2451 -479
  38. package/dist/generated/search/index.d.ts +1 -1
  39. package/dist/generated/search/types.gen.d.ts +50 -11
  40. package/dist/generated/storage/index.d.ts +1 -1
  41. package/dist/generated/storage/index.js +1 -1
  42. package/dist/generated/storage/sdk.gen.d.ts +511 -18
  43. package/dist/generated/storage/types.gen.d.ts +18528 -11395
  44. package/dist/src/entities/account-managers/grant.d.ts +28 -5
  45. package/dist/src/entities/account-managers/namespace.d.ts +15 -3
  46. package/dist/src/entities/activity/entity.d.ts +7 -0
  47. package/dist/src/entities/activity/namespace.d.ts +58 -0
  48. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  49. package/dist/src/entities/agent-sessions/activity.d.ts +12 -3
  50. package/dist/src/entities/agent-sessions/agent-session.d.ts +209 -22
  51. package/dist/src/entities/agent-sessions/code-execution.d.ts +15 -3
  52. package/dist/src/entities/agent-sessions/conversation.d.ts +46 -9
  53. package/dist/src/entities/agent-sessions/namespace.d.ts +72 -16
  54. package/dist/src/entities/agent-sessions/origin.d.ts +1 -1
  55. package/dist/src/entities/agent-sessions/queued-action.d.ts +17 -3
  56. package/dist/src/entities/agent-sessions/review.d.ts +56 -5
  57. package/dist/src/entities/agent-sessions/tool-approval.d.ts +5 -1
  58. package/dist/src/entities/agents/agent.d.ts +98 -3
  59. package/dist/src/entities/agents/namespace.d.ts +52 -8
  60. package/dist/src/entities/ai/namespace.d.ts +10 -2
  61. package/dist/src/entities/api-keys/api-key.d.ts +6 -1
  62. package/dist/src/entities/api-keys/namespace.d.ts +18 -3
  63. package/dist/src/entities/bots/bot.d.ts +44 -9
  64. package/dist/src/entities/bots/namespace.d.ts +13 -1
  65. package/dist/src/entities/bots/token.d.ts +6 -1
  66. package/dist/src/entities/calendar/booking-link.d.ts +7 -1
  67. package/dist/src/entities/calendar/booking-namespace.d.ts +14 -1
  68. package/dist/src/entities/calendar/booking.d.ts +15 -0
  69. package/dist/src/entities/calendar/calendar.d.ts +10 -3
  70. package/dist/src/entities/calendar/event.d.ts +68 -9
  71. package/dist/src/entities/calendar/namespace.d.ts +91 -12
  72. package/dist/src/entities/calendar/replacement.d.ts +19 -3
  73. package/dist/src/entities/calls/call-record.d.ts +107 -17
  74. package/dist/src/entities/calls/connection.d.ts +7 -1
  75. package/dist/src/entities/calls/message.d.ts +27 -5
  76. package/dist/src/entities/calls/namespace.d.ts +15 -3
  77. package/dist/src/entities/canvases/canvas.d.ts +329 -0
  78. package/dist/src/entities/channels/access-request.d.ts +10 -2
  79. package/dist/src/entities/channels/activity.d.ts +20 -4
  80. package/dist/src/entities/channels/channel.d.ts +154 -27
  81. package/dist/src/entities/channels/labels.d.ts +41 -7
  82. package/dist/src/entities/channels/message.d.ts +105 -8
  83. package/dist/src/entities/channels/message.test.d.ts +1 -0
  84. package/dist/src/entities/channels/namespace.d.ts +37 -7
  85. package/dist/src/entities/channels/post.d.ts +13 -7
  86. package/dist/src/entities/channels/post.test.d.ts +1 -0
  87. package/dist/src/entities/channels/share.d.ts +9 -0
  88. package/dist/src/entities/channels/share.test.d.ts +1 -0
  89. package/dist/src/entities/channels/thread.d.ts +24 -4
  90. package/dist/src/entities/chats/chat.d.ts +57 -7
  91. package/dist/src/entities/chats/generation.d.ts +11 -2
  92. package/dist/src/entities/chats/namespace.d.ts +10 -2
  93. package/dist/src/entities/connected-apps/connected-app.d.ts +16 -2
  94. package/dist/src/entities/connected-apps/connector.d.ts +3 -0
  95. package/dist/src/entities/connected-apps/namespace.d.ts +18 -0
  96. package/dist/src/entities/crm/company.d.ts +64 -16
  97. package/dist/src/entities/crm/contact.d.ts +102 -14
  98. package/dist/src/entities/crm/namespace.d.ts +113 -22
  99. package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
  100. package/dist/src/entities/crm/pipeline.d.ts +292 -29
  101. package/dist/src/entities/crm/pipelines.d.ts +69 -4
  102. package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
  103. package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
  104. package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
  105. package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
  106. package/dist/src/entities/databases/column.d.ts +54 -7
  107. package/dist/src/entities/databases/database.d.ts +160 -18
  108. package/dist/src/entities/databases/namespace.d.ts +40 -8
  109. package/dist/src/entities/databases/row.d.ts +2 -0
  110. package/dist/src/entities/databases/saved-query.d.ts +151 -0
  111. package/dist/src/entities/databases/table.d.ts +73 -10
  112. package/dist/src/entities/databases/view.d.ts +37 -5
  113. package/dist/src/entities/databases/webhook.d.ts +8 -1
  114. package/dist/src/entities/documents/ai-edit.d.ts +2 -0
  115. package/dist/src/entities/documents/anchor.d.ts +12 -2
  116. package/dist/src/entities/documents/comment.d.ts +29 -5
  117. package/dist/src/entities/documents/create.test.d.ts +1 -0
  118. package/dist/src/entities/documents/document.d.ts +284 -26
  119. package/dist/src/entities/documents/markdown.d.ts +25 -0
  120. package/dist/src/entities/documents/namespace.d.ts +146 -13
  121. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  122. package/dist/src/entities/documents/system-skill.d.ts +21 -1
  123. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  124. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  125. package/dist/src/entities/documents/version.d.ts +5 -1
  126. package/dist/src/entities/email/attachment.d.ts +3 -0
  127. package/dist/src/entities/email/draft.d.ts +61 -9
  128. package/dist/src/entities/email/filter.d.ts +12 -2
  129. package/dist/src/entities/email/label.d.ts +7 -1
  130. package/dist/src/entities/email/link.d.ts +5 -1
  131. package/dist/src/entities/email/message.d.ts +72 -14
  132. package/dist/src/entities/email/namespace.d.ts +134 -24
  133. package/dist/src/entities/email/thread.d.ts +124 -18
  134. package/dist/src/entities/entity-mentions/mention.d.ts +6 -1
  135. package/dist/src/entities/entity-mentions/namespace.d.ts +5 -1
  136. package/dist/src/entities/entity.d.ts +65 -6
  137. package/dist/src/entities/external-chat/chat.d.ts +80 -12
  138. package/dist/src/entities/external-chat/message.d.ts +1 -1
  139. package/dist/src/entities/external-chat/namespace.d.ts +5 -1
  140. package/dist/src/entities/external-chat/send.d.ts +10 -2
  141. package/dist/src/entities/favorites/namespace.d.ts +20 -3
  142. package/dist/src/entities/foreign/foreign-entity.d.ts +5 -1
  143. package/dist/src/entities/foreign/namespace.d.ts +5 -1
  144. package/dist/src/entities/forms/form.d.ts +91 -14
  145. package/dist/src/entities/forms/namespace.d.ts +10 -2
  146. package/dist/src/entities/forms/question.d.ts +35 -7
  147. package/dist/src/entities/forms/response.d.ts +25 -5
  148. package/dist/src/entities/forms/section.d.ts +15 -3
  149. package/dist/src/entities/github-pull-requests/namespace.d.ts +5 -1
  150. package/dist/src/entities/github-pull-requests/pull-request.d.ts +15 -3
  151. package/dist/src/entities/harnesses/harness.d.ts +51 -3
  152. package/dist/src/entities/harnesses/namespace.d.ts +54 -8
  153. package/dist/src/entities/harnesses/pairing.d.ts +13 -2
  154. package/dist/src/entities/images/image.d.ts +16 -5
  155. package/dist/src/entities/images/namespace.d.ts +8 -1
  156. package/dist/src/entities/imports/entry.d.ts +65 -0
  157. package/dist/src/entities/imports/namespace.d.ts +103 -0
  158. package/dist/src/entities/imports/namespace.test.d.ts +1 -0
  159. package/dist/src/entities/initiatives/initiative.d.ts +128 -4
  160. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  161. package/dist/src/entities/initiatives/namespace.d.ts +71 -7
  162. package/dist/src/entities/me/namespace.d.ts +28 -3
  163. package/dist/src/entities/meetings/meeting.d.ts +46 -8
  164. package/dist/src/entities/meetings/namespace.d.ts +20 -4
  165. package/dist/src/entities/memory/namespace.d.ts +49 -0
  166. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  167. package/dist/src/entities/messages/discussion.d.ts +84 -0
  168. package/dist/src/entities/messages/thread.d.ts +19 -5
  169. package/dist/src/entities/notifications/namespace.d.ts +41 -7
  170. package/dist/src/entities/notifications/notification.d.ts +31 -6
  171. package/dist/src/entities/passwords/item.d.ts +118 -0
  172. package/dist/src/entities/passwords/namespace.d.ts +45 -0
  173. package/dist/src/entities/pins/namespace.d.ts +23 -4
  174. package/dist/src/entities/projects/namespace.d.ts +29 -0
  175. package/dist/src/entities/projects/project.d.ts +58 -7
  176. package/dist/src/entities/properties/namespace.d.ts +67 -11
  177. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  178. package/dist/src/entities/properties/property-definition.d.ts +30 -5
  179. package/dist/src/entities/properties/property-option.d.ts +14 -2
  180. package/dist/src/entities/referrals/namespace.d.ts +8 -1
  181. package/dist/src/entities/routines/namespace.d.ts +198 -14
  182. package/dist/src/entities/routines/routine.d.ts +174 -27
  183. package/dist/src/entities/routines/suggestion.d.ts +38 -0
  184. package/dist/src/entities/saved-views/namespace.d.ts +58 -0
  185. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  186. package/dist/src/entities/search/exclusions.d.ts +6 -0
  187. package/dist/src/entities/search/namespace.d.ts +9 -3
  188. package/dist/src/entities/search/options.d.ts +3 -2
  189. package/dist/src/entities/sharing/access.d.ts +50 -9
  190. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  191. package/dist/src/entities/suggestions/namespace.d.ts +118 -0
  192. package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
  193. package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
  194. package/dist/src/entities/tasks/namespace.d.ts +18 -5
  195. package/dist/src/entities/tasks/task.d.ts +21 -3
  196. package/dist/src/entities/teams/invite.d.ts +3 -0
  197. package/dist/src/entities/teams/namespace.d.ts +10 -2
  198. package/dist/src/entities/teams/team.d.ts +22 -2
  199. package/dist/src/entities/ui/app-link.d.ts +24 -0
  200. package/dist/src/entities/ui/namespace.d.ts +75 -0
  201. package/dist/src/entities/unfurls/namespace.d.ts +12 -2
  202. package/dist/src/entities/users/namespace.d.ts +26 -4
  203. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  204. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  205. package/dist/src/entities/users/user.d.ts +52 -1
  206. package/dist/src/entities/web/namespace.d.ts +6 -0
  207. package/dist/src/entities/webhooks/namespace.d.ts +5 -0
  208. package/dist/src/entities/webhooks/webhook.d.ts +47 -7
  209. package/dist/src/entities/whatsapp/account.d.ts +5 -1
  210. package/dist/src/entities/whatsapp/chat.d.ts +9 -1
  211. package/dist/src/entities/whatsapp/namespace.d.ts +7 -1
  212. package/dist/src/entities/workspace/namespace.d.ts +12 -4
  213. package/dist/src/entities/workspace/query.d.ts +5 -1
  214. package/dist/src/entities/workspace/query.test.d.ts +1 -0
  215. package/dist/src/events/hydrate/document.d.ts +5 -0
  216. package/dist/src/events/hydrate/user.d.ts +14 -0
  217. package/dist/src/events/receiver.d.ts +2 -0
  218. package/dist/src/events/types.d.ts +2 -1
  219. package/dist/src/macro.d.ts +59 -6
  220. package/dist/src/macro.js +18710 -10355
  221. package/dist/src/utils/activity.d.ts +2 -0
  222. package/dist/src/utils/index.d.ts +1 -1
  223. package/dist/src/utils/lazy.d.ts +20 -1
  224. package/dist/src/utils/options.d.ts +7 -0
  225. package/dist/src/utils/pagination.d.ts +16 -0
  226. package/dist/src/utils/verbs.d.ts +3 -0
  227. package/package.json +1 -1
  228. package/dist/src/entities/crm/comment.d.ts +0 -64
@@ -804,6 +804,15 @@ var Sdk = class _Sdk extends HeyApiClient {
804
804
  super(args);
805
805
  _Sdk.__registry.set(this, args?.key);
806
806
  }
807
+ /**
808
+ * Read the acting user's own activity in a time range, newest first.
809
+ *
810
+ * Includes actions agents performed on the user's behalf. Returns at most
811
+ * 100 events; `truncated` reports that more matched, so narrow the range.
812
+ */
813
+ readMyActivity(options) {
814
+ return (options.client ?? this.client).get({ url: "/activity", ...options });
815
+ }
807
816
  /**
808
817
  * Set the pricing for a model and recompute its recorded rows. Admin only.
809
818
  */
@@ -830,20 +839,6 @@ var Sdk = class _Sdk extends HeyApiClient {
830
839
  }
831
840
  });
832
841
  }
833
- /**
834
- * Gets or creates an ai projection and the requesting user's instance,
835
- * triggering (or awaiting) materialization when needed.
836
- */
837
- upsertAiProjection(options) {
838
- return (options.client ?? this.client).post({
839
- url: "/ai-projections",
840
- ...options,
841
- headers: {
842
- "Content-Type": "application/json",
843
- ...options.headers
844
- }
845
- });
846
- }
847
842
  getChatsForAttachmentHandler(options) {
848
843
  return (options.client ?? this.client).get({ url: "/attachments/{attachment_id}/chats", ...options });
849
844
  }
@@ -1049,6 +1044,35 @@ var Sdk = class _Sdk extends HeyApiClient {
1049
1044
  }
1050
1045
  });
1051
1046
  }
1047
+ /**
1048
+ * List the caller's import ledger: staged candidates, running and finished
1049
+ * imports (with the team's imports), and declined items.
1050
+ */
1051
+ listImportEntities(options) {
1052
+ return (options?.client ?? this.client).get({ url: "/import/entities", ...options });
1053
+ }
1054
+ /**
1055
+ * Track an external item in the ledger: stage it as a candidate, or record a
1056
+ * Macro entity already created from it. Says when the item was already
1057
+ * imported, so callers do not create a duplicate.
1058
+ */
1059
+ trackImportEntity(options) {
1060
+ return (options.client ?? this.client).post({
1061
+ url: "/import/entities",
1062
+ ...options,
1063
+ headers: {
1064
+ "Content-Type": "application/json",
1065
+ ...options.headers
1066
+ }
1067
+ });
1068
+ }
1069
+ /**
1070
+ * Decline one of the caller's staged candidates; it is remembered as declined
1071
+ * and not proposed again.
1072
+ */
1073
+ declineImportEntity(options) {
1074
+ return (options.client ?? this.client).delete({ url: "/import/entities/{id}", ...options });
1075
+ }
1052
1076
  /**
1053
1077
  * Where the user's Notion workspace import stands.
1054
1078
  */
@@ -1062,6 +1086,21 @@ var Sdk = class _Sdk extends HeyApiClient {
1062
1086
  cancelNotionHandler(options) {
1063
1087
  return (options?.client ?? this.client).post({ url: "/import/notion/cancel", ...options });
1064
1088
  }
1089
+ /**
1090
+ * Import one Notion page as a Macro document through the caller's Notion
1091
+ * connection, deduplicated against the ledger. Notion databases are not
1092
+ * imported; a whole workspace goes through a reviewed import instead.
1093
+ */
1094
+ importNotionPage(options) {
1095
+ return (options.client ?? this.client).post({
1096
+ url: "/import/notion/pages",
1097
+ ...options,
1098
+ headers: {
1099
+ "Content-Type": "application/json",
1100
+ ...options.headers
1101
+ }
1102
+ });
1103
+ }
1065
1104
  /**
1066
1105
  * Accept staged imports (starts import jobs) and/or discard staged rows.
1067
1106
  */
@@ -1174,6 +1213,39 @@ var Sdk = class _Sdk extends HeyApiClient {
1174
1213
  getMemoryHandler(options) {
1175
1214
  return (options?.client ?? this.client).get({ url: "/memory", ...options });
1176
1215
  }
1216
+ /**
1217
+ * Read privacy-reviewed professional activity of the caller or a current teammate.
1218
+ *
1219
+ * Reports use UTC calendar days, Monday-start weeks and calendar months.
1220
+ * An empty list means no stored activity, not no work.
1221
+ */
1222
+ getUserActivity(options) {
1223
+ return (options.client ?? this.client).get({ url: "/memory/activity", ...options });
1224
+ }
1225
+ /**
1226
+ * Read the caller's private explicit memory and its revision.
1227
+ *
1228
+ * Content is newline-separated; edits address one-based lines.
1229
+ */
1230
+ readExplicitMemory(options) {
1231
+ return (options?.client ?? this.client).get({ url: "/memory/explicit", ...options });
1232
+ }
1233
+ /**
1234
+ * Apply one edit to the caller's private explicit memory.
1235
+ *
1236
+ * A stale revision changes nothing and answers 409; reread before retrying.
1237
+ * Additions that fail privacy review answer 422.
1238
+ */
1239
+ editExplicitMemory(options) {
1240
+ return (options.client ?? this.client).patch({
1241
+ url: "/memory/explicit",
1242
+ ...options,
1243
+ headers: {
1244
+ "Content-Type": "application/json",
1245
+ ...options.headers
1246
+ }
1247
+ });
1248
+ }
1177
1249
  /**
1178
1250
  * Get the authenticated user's onboarding state.
1179
1251
  */
@@ -1329,6 +1401,20 @@ var Sdk = class _Sdk extends HeyApiClient {
1329
1401
  }
1330
1402
  });
1331
1403
  }
1404
+ /**
1405
+ * List the caller's skills, or search them by name when `query` is given.
1406
+ * Built-in skills are included.
1407
+ */
1408
+ listSkills(options) {
1409
+ return (options?.client ?? this.client).get({ url: "/skills", ...options });
1410
+ }
1411
+ /**
1412
+ * Read one skill's complete instructions: a skill document the caller can
1413
+ * view, or a built-in skill.
1414
+ */
1415
+ readSkill(options) {
1416
+ return (options.client ?? this.client).get({ url: "/skills/{id}", ...options });
1417
+ }
1332
1418
  /**
1333
1419
  * Send a new chat message and stream the AI response.
1334
1420
  *
@@ -810,6 +810,11 @@ var Sdk = class _Sdk extends HeyApiClient {
810
810
  listScheduledActions(options) {
811
811
  return (options?.client ?? this.client).get({ url: "/scheduled-actions", ...options });
812
812
  }
813
+ /**
814
+ * Create a routine. A create made by a routine's run, from its code step
815
+ * or its Ask AI step's session, makes that routine's sub-routine: the
816
+ * caller's credential says so, never the body.
817
+ */
813
818
  createScheduledAction(options) {
814
819
  return (options.client ?? this.client).post({
815
820
  url: "/scheduled-actions",
@@ -820,8 +825,42 @@ var Sdk = class _Sdk extends HeyApiClient {
820
825
  }
821
826
  });
822
827
  }
823
- routineCodeStarters(options) {
824
- return (options?.client ?? this.client).get({ url: "/scheduled-actions/code/starters", ...options });
828
+ routineCatalog(options) {
829
+ return (options.client ?? this.client).get({ url: "/scheduled-actions/catalog", ...options });
830
+ }
831
+ /**
832
+ * What saving this routine would find wrong, without saving it: the same
833
+ * checks as creating it. A routine draft's session hands its draft back
834
+ * this way.
835
+ */
836
+ checkScheduledAction(options) {
837
+ return (options.client ?? this.client).post({
838
+ url: "/scheduled-actions/check",
839
+ ...options,
840
+ headers: {
841
+ "Content-Type": "application/json",
842
+ ...options.headers
843
+ }
844
+ });
845
+ }
846
+ listRoutineDraftJobs(options) {
847
+ return (options?.client ?? this.client).get({ url: "/scheduled-actions/draft-jobs", ...options });
848
+ }
849
+ startRoutineDraftJob(options) {
850
+ return (options.client ?? this.client).post({
851
+ url: "/scheduled-actions/draft-jobs",
852
+ ...options,
853
+ headers: {
854
+ "Content-Type": "application/json",
855
+ ...options.headers
856
+ }
857
+ });
858
+ }
859
+ discardRoutineDraftJob(options) {
860
+ return (options.client ?? this.client).delete({ url: "/scheduled-actions/draft-jobs/{id}", ...options });
861
+ }
862
+ getRoutineDraftJob(options) {
863
+ return (options.client ?? this.client).get({ url: "/scheduled-actions/draft-jobs/{id}", ...options });
825
864
  }
826
865
  draftRoutine(options) {
827
866
  return (options.client ?? this.client).post({
@@ -833,6 +872,47 @@ var Sdk = class _Sdk extends HeyApiClient {
833
872
  }
834
873
  });
835
874
  }
875
+ listRoutineSuggestions(options) {
876
+ return (options?.client ?? this.client).get({ url: "/scheduled-actions/suggestions", ...options });
877
+ }
878
+ /**
879
+ * Hand back one routine suggestion from a routine suggestion session, the
880
+ * way a draft's session checks its routine: a catalog routine with knob
881
+ * values, or a drafted routine, checked as saving checks it.
882
+ */
883
+ suggestRoutine(options) {
884
+ return (options.client ?? this.client).post({
885
+ url: "/scheduled-actions/suggestions",
886
+ ...options,
887
+ headers: {
888
+ "Content-Type": "application/json",
889
+ ...options.headers
890
+ }
891
+ });
892
+ }
893
+ /**
894
+ * What a routines generation session reads before managing suggestions.
895
+ */
896
+ reviewRoutineSuggestions(options) {
897
+ return (options?.client ?? this.client).get({ url: "/scheduled-actions/suggestions/review", ...options });
898
+ }
899
+ dismissRoutineSuggestion(options) {
900
+ return (options.client ?? this.client).post({ url: "/scheduled-actions/suggestions/{id}/dismiss", ...options });
901
+ }
902
+ /**
903
+ * Retire an open suggestion that no longer fits, from a routines
904
+ * generation session.
905
+ */
906
+ retireRoutineSuggestion(options) {
907
+ return (options.client ?? this.client).post({
908
+ url: "/scheduled-actions/suggestions/{id}/retire",
909
+ ...options,
910
+ headers: {
911
+ "Content-Type": "application/json",
912
+ ...options.headers
913
+ }
914
+ });
915
+ }
836
916
  deleteScheduledAction(options) {
837
917
  return (options.client ?? this.client).delete({ url: "/scheduled-actions/{id}", ...options });
838
918
  }
@@ -849,9 +929,26 @@ var Sdk = class _Sdk extends HeyApiClient {
849
929
  }
850
930
  });
851
931
  }
932
+ setScheduledActionAppearance(options) {
933
+ return (options.client ?? this.client).put({
934
+ url: "/scheduled-actions/{id}/appearance",
935
+ ...options,
936
+ headers: {
937
+ "Content-Type": "application/json",
938
+ ...options.headers
939
+ }
940
+ });
941
+ }
852
942
  listScheduledActionCodeUpgrades(options) {
853
943
  return (options.client ?? this.client).get({ url: "/scheduled-actions/{id}/code-upgrades", ...options });
854
944
  }
945
+ /**
946
+ * Keep a sub-routine as the owner's own routine: it moves to the main list
947
+ * and no longer follows the routine whose run created it.
948
+ */
949
+ detachScheduledAction(options) {
950
+ return (options.client ?? this.client).post({ url: "/scheduled-actions/{id}/detach", ...options });
951
+ }
855
952
  setScheduledActionEnabled(options) {
856
953
  return (options.client ?? this.client).put({
857
954
  url: "/scheduled-actions/{id}/enabled",
@@ -894,6 +991,136 @@ var Sdk = class _Sdk extends HeyApiClient {
894
991
  }
895
992
  });
896
993
  }
994
+ /**
995
+ * The caller's feed, for them or their own agent.
996
+ */
997
+ listSuggestions(options) {
998
+ return (options?.client ?? this.client).get({ url: "/suggestions", ...options });
999
+ }
1000
+ /**
1001
+ * Add a suggestion from a suggestions generation session, or a new version of the
1002
+ * one with its dedup key.
1003
+ */
1004
+ addSuggestion(options) {
1005
+ return (options.client ?? this.client).post({
1006
+ url: "/suggestions",
1007
+ ...options,
1008
+ headers: {
1009
+ "Content-Type": "application/json",
1010
+ ...options.headers
1011
+ }
1012
+ });
1013
+ }
1014
+ /**
1015
+ * Start the caller's onboarding generation, once their inbox is connected.
1016
+ */
1017
+ startSuggestionGeneration(options) {
1018
+ return (options.client ?? this.client).post({ url: "/suggestions/generate", ...options });
1019
+ }
1020
+ /**
1021
+ * The caller's suggestion generations now.
1022
+ */
1023
+ getSuggestionGeneration(options) {
1024
+ return (options?.client ?? this.client).get({ url: "/suggestions/generation", ...options });
1025
+ }
1026
+ /**
1027
+ * Start fresh suggestions for the caller: at most once an hour, and not
1028
+ * while one of their generations runs.
1029
+ */
1030
+ regenerateSuggestions(options) {
1031
+ return (options.client ?? this.client).post({ url: "/suggestions/regenerate", ...options });
1032
+ }
1033
+ /**
1034
+ * What a suggestions generation session reads before managing suggestions.
1035
+ */
1036
+ reviewSuggestions(options) {
1037
+ return (options?.client ?? this.client).get({ url: "/suggestions/review", ...options });
1038
+ }
1039
+ /**
1040
+ * The caller loaded the app in their time zone.
1041
+ */
1042
+ recordSuggestionsSeen(options) {
1043
+ return (options.client ?? this.client).post({ url: "/suggestions/seen", ...options });
1044
+ }
1045
+ /**
1046
+ * The caller opened their feed: what it showed as new no longer is. The app
1047
+ * sends it once the feed is on screen.
1048
+ */
1049
+ recordSuggestionsViewed(options) {
1050
+ return (options?.client ?? this.client).post({ url: "/suggestions/viewed", ...options });
1051
+ }
1052
+ /**
1053
+ * Change an open suggestion from a suggestions generation session.
1054
+ */
1055
+ rewriteSuggestion(options) {
1056
+ return (options.client ?? this.client).patch({
1057
+ url: "/suggestions/{id}",
1058
+ ...options,
1059
+ headers: {
1060
+ "Content-Type": "application/json",
1061
+ ...options.headers
1062
+ }
1063
+ });
1064
+ }
1065
+ /**
1066
+ * The caller, or someone acting for them, acts on a suggestion: a background
1067
+ * prompt suggestion starts its run when the person accepts it in the app (anyone
1068
+ * else only takes it on); a reply suggestion is only taken on, and is done once
1069
+ * the person replies on its item; any other note or prompt is done once they act
1070
+ * on it (open its item or the composer), and shows in the feed's `done`. A
1071
+ * routine suggestion is refused: the person saves its routine in the app, which
1072
+ * makes it done.
1073
+ */
1074
+ acceptSuggestion(options) {
1075
+ return (options.client ?? this.client).post({
1076
+ url: "/suggestions/{id}/accept",
1077
+ ...options,
1078
+ headers: {
1079
+ "Content-Type": "application/json",
1080
+ ...options.headers
1081
+ }
1082
+ });
1083
+ }
1084
+ /**
1085
+ * The caller, or their own agent, isn't interested in an open suggestion.
1086
+ */
1087
+ dismissSuggestion(options) {
1088
+ return (options.client ?? this.client).post({ url: "/suggestions/{id}/dismiss", ...options });
1089
+ }
1090
+ /**
1091
+ * Make a reply draft a suggestions generation session wrote the draft of an
1092
+ * open reply suggestion. Nothing is sent.
1093
+ */
1094
+ attachSuggestionDraft(options) {
1095
+ return (options.client ?? this.client).put({
1096
+ url: "/suggestions/{id}/draft",
1097
+ ...options,
1098
+ headers: {
1099
+ "Content-Type": "application/json",
1100
+ ...options.headers
1101
+ }
1102
+ });
1103
+ }
1104
+ /**
1105
+ * The caller, or their own agent, takes back dismissing a suggestion, within
1106
+ * five minutes of it.
1107
+ */
1108
+ restoreSuggestion(options) {
1109
+ return (options.client ?? this.client).post({ url: "/suggestions/{id}/restore", ...options });
1110
+ }
1111
+ /**
1112
+ * Retire an open suggestion from a suggestions generation session.
1113
+ */
1114
+ retireSuggestion(options) {
1115
+ return (options.client ?? this.client).post({
1116
+ url: "/suggestions/{id}/retire",
1117
+ ...options,
1118
+ headers: {
1119
+ "Content-Type": "application/json",
1120
+ ...options.headers
1121
+ }
1122
+ });
1123
+ }
897
1124
  };
898
1125
 
899
1126
  export {
@@ -829,7 +829,8 @@ var Sdk = class _Sdk extends HeyApiClient {
829
829
  return (options.client ?? this.client).delete({ url: "/unsubscribe/item/{item_type}/{item_id}", ...options });
830
830
  }
831
831
  /**
832
- * Unsubscribes a user from a given item for notifications.
832
+ * Unsubscribes a user from a given item for notifications, or, with
833
+ * `mentions_only`, from everything on a channel but their direct mentions.
833
834
  */
834
835
  unsubscribeItem(options) {
835
836
  return (options.client ?? this.client).post({ url: "/unsubscribe/item/{item_type}/{item_id}", ...options });