@macro-inc/sdk 0.0.1 → 0.2.2

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 (165) hide show
  1. package/README.md +628 -21
  2. package/dist/{chunk-5HAKQN23.js → chunk-7LVVPVNT.js} +70 -57
  3. package/dist/{chunk-JXIQT5TH.js → chunk-7YJ6Y7HJ.js} +234 -16
  4. package/dist/chunk-LMJW65ML.js +836 -0
  5. package/dist/{chunk-SGAHIERJ.js → chunk-OGE7WXJE.js} +16 -0
  6. package/dist/chunk-PRUFPW3B.js +943 -0
  7. package/dist/{chunk-CTKR64MY.js → chunk-QVBNNMQS.js} +242 -367
  8. package/dist/{chunk-QNUS5BC5.js → chunk-SUINKDXF.js} +30 -84
  9. package/dist/{chunk-77EI4LSQ.js → chunk-ZQXOHNDB.js} +1518 -386
  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 +174 -4
  13. package/dist/generated/agent-harness/types.gen.d.ts +2511 -189
  14. package/dist/generated/auth/index.d.ts +1 -1
  15. package/dist/generated/auth/index.js +1 -1
  16. package/dist/generated/auth/sdk.gen.d.ts +106 -8
  17. package/dist/generated/auth/types.gen.d.ts +1473 -116
  18. package/dist/generated/calendar/client/client.gen.d.ts +2 -0
  19. package/dist/generated/calendar/client/index.d.ts +10 -0
  20. package/dist/generated/calendar/client/types.gen.d.ts +120 -0
  21. package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
  22. package/dist/generated/calendar/client.gen.d.ts +12 -0
  23. package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
  24. package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
  25. package/dist/generated/calendar/core/params.gen.d.ts +43 -0
  26. package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
  27. package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/generated/calendar/core/types.gen.d.ts +83 -0
  30. package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
  31. package/dist/generated/calendar/index.d.ts +2 -0
  32. package/dist/generated/calendar/index.js +6 -0
  33. package/dist/generated/calendar/sdk.gen.d.ts +95 -0
  34. package/dist/generated/calendar/types.gen.d.ts +1091 -0
  35. package/dist/generated/cognition/index.d.ts +1 -1
  36. package/dist/generated/cognition/index.js +1 -1
  37. package/dist/generated/cognition/sdk.gen.d.ts +6 -1
  38. package/dist/generated/cognition/types.gen.d.ts +304 -36
  39. package/dist/generated/connection/types.gen.d.ts +1 -1
  40. package/dist/generated/email/index.d.ts +1 -1
  41. package/dist/generated/email/index.js +1 -1
  42. package/dist/generated/email/sdk.gen.d.ts +32 -27
  43. package/dist/generated/email/types.gen.d.ts +586 -409
  44. package/dist/generated/notification/index.d.ts +1 -1
  45. package/dist/generated/notification/types.gen.d.ts +384 -19
  46. package/dist/generated/properties/types.gen.d.ts +8 -5
  47. package/dist/generated/scheduled-action/index.d.ts +1 -1
  48. package/dist/generated/scheduled-action/index.js +3 -842
  49. package/dist/generated/scheduled-action/sdk.gen.d.ts +3 -1
  50. package/dist/generated/scheduled-action/types.gen.d.ts +277 -41
  51. package/dist/generated/search/index.d.ts +1 -1
  52. package/dist/generated/search/types.gen.d.ts +262 -43
  53. package/dist/generated/storage/index.d.ts +1 -1
  54. package/dist/generated/storage/index.js +1 -1
  55. package/dist/generated/storage/sdk.gen.d.ts +678 -107
  56. package/dist/generated/storage/types.gen.d.ts +14827 -5995
  57. package/dist/generated/unfurl/index.d.ts +1 -1
  58. package/dist/generated/unfurl/index.js +3 -832
  59. package/dist/generated/unfurl/types.gen.d.ts +20 -0
  60. package/dist/src/config.d.ts +33 -13
  61. package/dist/src/entities/agent-sessions/agent-session.d.ts +150 -6
  62. package/dist/src/entities/agent-sessions/code-execution.d.ts +43 -0
  63. package/dist/src/entities/agent-sessions/conversation.d.ts +54 -0
  64. package/dist/src/entities/agent-sessions/namespace.d.ts +23 -5
  65. package/dist/src/entities/agent-sessions/queued-action.d.ts +46 -0
  66. package/dist/src/entities/agent-sessions/review.d.ts +107 -0
  67. package/dist/src/entities/agent-sessions/tool-approval.d.ts +21 -0
  68. package/dist/src/entities/agents/agent.d.ts +47 -0
  69. package/dist/src/entities/agents/namespace.d.ts +13 -0
  70. package/dist/src/entities/ai/namespace.d.ts +24 -0
  71. package/dist/src/entities/api-keys/api-key.d.ts +17 -0
  72. package/dist/src/entities/api-keys/namespace.d.ts +18 -0
  73. package/dist/src/entities/calendar/calendar.d.ts +35 -0
  74. package/dist/src/entities/calendar/event.d.ts +123 -0
  75. package/dist/src/entities/calendar/event.test.d.ts +1 -0
  76. package/dist/src/entities/calendar/namespace.d.ts +111 -0
  77. package/dist/src/entities/calendar/replacement.d.ts +15 -0
  78. package/dist/src/entities/calls/call-record.d.ts +62 -6
  79. package/dist/src/entities/calls/message.d.ts +33 -0
  80. package/dist/src/entities/channels/activity.d.ts +24 -0
  81. package/dist/src/entities/channels/channel.d.ts +44 -3
  82. package/dist/src/entities/channels/labels.d.ts +39 -0
  83. package/dist/src/entities/channels/message.d.ts +9 -17
  84. package/dist/src/entities/channels/namespace.d.ts +6 -0
  85. package/dist/src/entities/channels/picture.d.ts +11 -0
  86. package/dist/src/entities/channels/post.d.ts +1 -1
  87. package/dist/src/entities/channels/thread.d.ts +5 -0
  88. package/dist/src/entities/chats/chat.d.ts +11 -1
  89. package/dist/src/entities/chats/generation.d.ts +46 -0
  90. package/dist/src/entities/crm/comment.d.ts +55 -34
  91. package/dist/src/entities/crm/company.d.ts +42 -10
  92. package/dist/src/entities/crm/contact.d.ts +42 -10
  93. package/dist/src/entities/crm/namespace.d.ts +18 -1
  94. package/dist/src/entities/crm/pipeline.d.ts +122 -0
  95. package/dist/src/entities/crm/pipelines.d.ts +14 -0
  96. package/dist/src/entities/databases/column.d.ts +75 -0
  97. package/dist/src/entities/databases/database.d.ts +272 -0
  98. package/dist/src/entities/databases/namespace.d.ts +21 -0
  99. package/dist/src/entities/databases/query.d.ts +86 -0
  100. package/dist/src/entities/databases/row.d.ts +27 -0
  101. package/dist/src/entities/databases/table.d.ts +61 -0
  102. package/dist/src/entities/databases/view.d.ts +40 -0
  103. package/dist/src/entities/databases/webhook.d.ts +32 -0
  104. package/dist/src/entities/documents/anchor.d.ts +29 -0
  105. package/dist/src/entities/documents/comment.d.ts +25 -22
  106. package/dist/src/entities/documents/document.d.ts +60 -12
  107. package/dist/src/entities/documents/namespace.d.ts +30 -0
  108. package/dist/src/entities/documents/version.d.ts +22 -0
  109. package/dist/src/entities/email/draft.d.ts +79 -0
  110. package/dist/src/entities/email/filter.d.ts +34 -0
  111. package/dist/src/entities/email/link.d.ts +6 -4
  112. package/dist/src/entities/email/message.d.ts +12 -1
  113. package/dist/src/entities/email/namespace.d.ts +34 -1
  114. package/dist/src/entities/email/thread.d.ts +23 -1
  115. package/dist/src/entities/entity-mentions/mention.d.ts +16 -0
  116. package/dist/src/entities/entity-mentions/namespace.d.ts +12 -0
  117. package/dist/src/entities/entity.d.ts +7 -0
  118. package/dist/src/entities/favorites/namespace.d.ts +14 -2
  119. package/dist/src/entities/foreign/foreign-entity.d.ts +2 -0
  120. package/dist/src/entities/foreign/namespace.d.ts +40 -0
  121. package/dist/src/entities/forms/form.d.ts +227 -0
  122. package/dist/src/entities/forms/namespace.d.ts +18 -0
  123. package/dist/src/entities/forms/question.d.ts +37 -0
  124. package/dist/src/entities/forms/response.d.ts +32 -0
  125. package/dist/src/entities/forms/section.d.ts +19 -0
  126. package/dist/src/entities/github-pull-requests/namespace.d.ts +12 -0
  127. package/dist/src/entities/github-pull-requests/pull-request.d.ts +52 -0
  128. package/dist/src/entities/harnesses/harness.d.ts +19 -0
  129. package/dist/src/entities/harnesses/namespace.d.ts +33 -0
  130. package/dist/src/entities/harnesses/pairing.d.ts +39 -0
  131. package/dist/src/entities/initiatives/initiative.d.ts +50 -0
  132. package/dist/src/entities/initiatives/namespace.d.ts +13 -0
  133. package/dist/src/entities/meetings/meeting.d.ts +38 -0
  134. package/dist/src/entities/meetings/namespace.d.ts +18 -0
  135. package/dist/src/entities/messages/thread.d.ts +101 -0
  136. package/dist/src/entities/notifications/notification.d.ts +6 -3
  137. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  138. package/dist/src/entities/projects/project.d.ts +7 -0
  139. package/dist/src/entities/reference.d.ts +82 -0
  140. package/dist/src/entities/routines/namespace.d.ts +15 -0
  141. package/dist/src/entities/routines/routine.d.ts +115 -0
  142. package/dist/src/entities/sharing/access.d.ts +65 -0
  143. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  144. package/dist/src/entities/tasks/namespace.d.ts +4 -0
  145. package/dist/src/entities/tasks/task.d.ts +6 -0
  146. package/dist/src/entities/unfurls/namespace.d.ts +10 -0
  147. package/dist/src/entities/webhooks/webhook.d.ts +3 -1
  148. package/dist/src/entities/workspace/items.d.ts +7 -0
  149. package/dist/src/entities/workspace/namespace.d.ts +83 -0
  150. package/dist/src/entities/workspace/query.d.ts +12 -0
  151. package/dist/src/entities/workspace/types.d.ts +96 -0
  152. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  153. package/dist/src/events/hydrate/channel.d.ts +2 -39
  154. package/dist/src/events/hydrate/message.d.ts +70 -0
  155. package/dist/src/events/receiver.d.ts +57 -19
  156. package/dist/src/events/types.d.ts +3 -1
  157. package/dist/src/macro.d.ts +80 -3
  158. package/dist/src/macro.js +8832 -2784
  159. package/dist/src/utils/activity.d.ts +11 -0
  160. package/dist/src/utils/activity.test.d.ts +1 -0
  161. package/dist/src/utils/client.d.ts +10 -1
  162. package/dist/src/utils/concurrency.d.ts +5 -0
  163. package/dist/src/utils/index.d.ts +1 -0
  164. package/dist/src/utils/pagination.d.ts +9 -4
  165. package/package.json +11 -3
@@ -804,57 +804,6 @@ var Sdk = class _Sdk extends HeyApiClient {
804
804
  super(args);
805
805
  _Sdk.__registry.set(this, args?.key);
806
806
  }
807
- /**
808
- * List the requester's visible calendars for pickers and filters.
809
- */
810
- listCalendars(options) {
811
- return (options?.client ?? this.client).get({ url: "/calendar/calendars", ...options });
812
- }
813
- /**
814
- * Create a calendar event and return its synced entity.
815
- */
816
- createCalendarEvent(options) {
817
- return (options.client ?? this.client).post({
818
- url: "/calendar/events",
819
- ...options,
820
- headers: {
821
- "Content-Type": "application/json",
822
- ...options.headers
823
- }
824
- });
825
- }
826
- /**
827
- * Delete a calendar event at its provider.
828
- */
829
- deleteCalendarEvent(options) {
830
- return (options.client ?? this.client).delete({ url: "/calendar/events/{event_id}", ...options });
831
- }
832
- /**
833
- * Update fields of a calendar event and return its synced entity.
834
- */
835
- updateCalendarEvent(options) {
836
- return (options.client ?? this.client).patch({
837
- url: "/calendar/events/{event_id}",
838
- ...options,
839
- headers: {
840
- "Content-Type": "application/json",
841
- ...options.headers
842
- }
843
- });
844
- }
845
- /**
846
- * Set the requester's RSVP on a calendar event and return its synced entity.
847
- */
848
- rsvpCalendarEvent(options) {
849
- return (options.client ?? this.client).put({
850
- url: "/calendar/events/{event_id}/rsvp",
851
- ...options,
852
- headers: {
853
- "Content-Type": "application/json",
854
- ...options.headers
855
- }
856
- });
857
- }
858
807
  /**
859
808
  * Get an attachment by ID.
860
809
  */
@@ -907,8 +856,7 @@ var Sdk = class _Sdk extends HeyApiClient {
907
856
  return (options?.client ?? this.client).get({ url: "/email/contacts", ...options });
908
857
  }
909
858
  /**
910
- * Block a sender by creating a Gmail filter that sends their emails to trash.
911
- * The actual Gmail API call is performed asynchronously by the gmail_ops worker.
859
+ * Durably block a sender in the selected inbox.
912
860
  */
913
861
  blockSender(options) {
914
862
  return (options.client ?? this.client).post({
@@ -927,8 +875,7 @@ var Sdk = class _Sdk extends HeyApiClient {
927
875
  return (options?.client ?? this.client).get({ url: "/email/contacts/blocked", ...options });
928
876
  }
929
877
  /**
930
- * Unblock a sender by removing their block filter from Gmail.
931
- * The actual Gmail API call is performed asynchronously by the gmail_ops worker.
878
+ * Durably remove Macro-managed sender blocking in the selected inbox.
932
879
  */
933
880
  unblockSender(options) {
934
881
  return (options.client ?? this.client).post({
@@ -940,6 +887,9 @@ var Sdk = class _Sdk extends HeyApiClient {
940
887
  }
941
888
  });
942
889
  }
890
+ recoverDraftTransfer(options) {
891
+ return (options.client ?? this.client).post({ url: "/email/draft-transfers/{id}/recover", ...options });
892
+ }
943
893
  /**
944
894
  * Create a draft.
945
895
  */
@@ -973,7 +923,7 @@ var Sdk = class _Sdk extends HeyApiClient {
973
923
  });
974
924
  }
975
925
  /**
976
- * Remove the scheduled send from a draft.
926
+ * Remove the scheduled send from a draft, including immediate-send undo.
977
927
  */
978
928
  deleteScheduledDraft(options) {
979
929
  return (options.client ?? this.client).delete({ url: "/email/drafts/scheduled/{message_id}", ...options });
@@ -1003,6 +953,12 @@ var Sdk = class _Sdk extends HeyApiClient {
1003
953
  removeDraftAttachment(options) {
1004
954
  return (options.client ?? this.client).delete({ url: "/email/drafts/{id}/attachments/{attachment_id}", ...options });
1005
955
  }
956
+ /**
957
+ * Confirm an uploaded attachment before it becomes part of a sendable draft.
958
+ */
959
+ completeDraftAttachment(options) {
960
+ return (options.client ?? this.client).post({ url: "/email/drafts/{id}/attachments/{attachment_id}/complete", ...options });
961
+ }
1006
962
  /**
1007
963
  * Add a forwarded attachment to a draft.
1008
964
  */
@@ -1022,6 +978,35 @@ var Sdk = class _Sdk extends HeyApiClient {
1022
978
  removeForwardedAttachment(options) {
1023
979
  return (options.client ?? this.client).delete({ url: "/email/drafts/{id}/forwarded-attachments/{attachment_id}", ...options });
1024
980
  }
981
+ /**
982
+ * The same provider-neutral state returned on fully hydrated email messages.
983
+ */
984
+ messageOperationStatus(options) {
985
+ return (options.client ?? this.client).get({ url: "/email/drafts/{id}/operation", ...options });
986
+ }
987
+ /**
988
+ * Resolve an observed draft conflict or uncertain provider operation.
989
+ */
990
+ resolveMessageOperation(options) {
991
+ return (options.client ?? this.client).post({
992
+ url: "/email/drafts/{id}/resolve",
993
+ ...options,
994
+ headers: {
995
+ "Content-Type": "application/json",
996
+ ...options.headers
997
+ }
998
+ });
999
+ }
1000
+ transferDraft(options) {
1001
+ return (options.client ?? this.client).post({
1002
+ url: "/email/drafts/{id}/transfer",
1003
+ ...options,
1004
+ headers: {
1005
+ "Content-Type": "application/json",
1006
+ ...options.headers
1007
+ }
1008
+ });
1009
+ }
1025
1010
  /**
1026
1011
  * List all email filters for the current user.
1027
1012
  */
@@ -1091,7 +1076,7 @@ var Sdk = class _Sdk extends HeyApiClient {
1091
1076
  * the daily refresh sweep; the side effects (clearing or setting the reauth flag, and
1092
1077
  * the one-time reauth fan-out) are handled by the email service token source.
1093
1078
  *
1094
- * Probes run in the background and the response returns immediately to stay off the
1079
+ * Probes are durably queued and the response returns immediately to stay off the
1095
1080
  * load path; each persisted flag is picked up by the next links read. Probes are
1096
1081
  * throttled per link in Redis so frequent calls — and many sharers of a shared inbox —
1097
1082
  * collapse to one refresh per window.
@@ -1184,6 +1169,12 @@ var Sdk = class _Sdk extends HeyApiClient {
1184
1169
  }
1185
1170
  });
1186
1171
  }
1172
+ /**
1173
+ * Accepted label and sender-policy changes awaiting provider confirmation.
1174
+ */
1175
+ mailboxSettingsOperations(options) {
1176
+ return (options?.client ?? this.client).get({ url: "/email/settings/operations", ...options });
1177
+ }
1187
1178
  /**
1188
1179
  * Disables inbox syncing for user.
1189
1180
  */
@@ -1225,18 +1216,40 @@ var Sdk = class _Sdk extends HeyApiClient {
1225
1216
  getThreadMessagesHandler(options) {
1226
1217
  return (options.client ?? this.client).get({ url: "/email/threads/{id}/messages", ...options });
1227
1218
  }
1219
+ /**
1220
+ * Fetch the latest organization action outcomes without provider-specific status strings.
1221
+ */
1222
+ threadOperations(options) {
1223
+ return (options.client ?? this.client).get({ url: "/email/threads/{id}/operations", ...options });
1224
+ }
1228
1225
  /**
1229
1226
  * Called by FE when the user has seen a thread.
1230
1227
  */
1231
1228
  threadSeen(options) {
1232
1229
  return (options.client ?? this.client).post({ url: "/email/threads/{id}/seen", ...options });
1233
1230
  }
1231
+ /**
1232
+ * Set mailbox state without client-side provider label lookup.
1233
+ */
1234
+ updateThreadState(options) {
1235
+ return (options.client ?? this.client).patch({
1236
+ url: "/email/threads/{id}/state",
1237
+ ...options,
1238
+ headers: {
1239
+ "Content-Type": "application/json",
1240
+ ...options.headers
1241
+ }
1242
+ });
1243
+ }
1234
1244
  /**
1235
1245
  * Get a thread with paginated messages.
1236
1246
  */
1237
1247
  getThread(options) {
1238
1248
  return (options.client ?? this.client).get({ url: "/email/threads/{thread_id}", ...options });
1239
1249
  }
1250
+ getThreadCalendarInvitations(options) {
1251
+ return (options.client ?? this.client).get({ url: "/email/threads/{thread_id}/calendar-invitations", ...options });
1252
+ }
1240
1253
  /**
1241
1254
  * Update the project assignment for a thread.
1242
1255
  */
@@ -804,6 +804,91 @@ var Sdk = class _Sdk extends HeyApiClient {
804
804
  super(args);
805
805
  _Sdk.__registry.set(this, args?.key);
806
806
  }
807
+ /**
808
+ * Turn automatic credit reloads on with the given
809
+ * thresholds, or off. Payer only. Enabling settles right away, so a balance
810
+ * already under the minimum reloads immediately.
811
+ */
812
+ updateAiBillingAutoReload(options) {
813
+ return (options.client ?? this.client).patch({
814
+ url: "/ai-billing/auto-reload",
815
+ ...options,
816
+ headers: {
817
+ "Content-Type": "application/json",
818
+ ...options.headers
819
+ }
820
+ });
821
+ }
822
+ /**
823
+ * Start a Stripe Checkout for a credit pack. Payer only.
824
+ */
825
+ createAiCreditCheckout(options) {
826
+ return (options.client ?? this.client).post({
827
+ url: "/ai-billing/credits/checkout",
828
+ ...options,
829
+ headers: {
830
+ "Content-Type": "application/json",
831
+ ...options.headers
832
+ }
833
+ });
834
+ }
835
+ /**
836
+ * Retired direct-usage opt-in. Enabling is rejected; disabling remains supported.
837
+ */
838
+ updateAiBillingOverage(options) {
839
+ return (options.client ?? this.client).patch({
840
+ url: "/ai-billing/overage",
841
+ ...options,
842
+ headers: {
843
+ "Content-Type": "application/json",
844
+ ...options.headers
845
+ }
846
+ });
847
+ }
848
+ /**
849
+ * The plan catalog, credit packs, overage cap bounds, and automatic reload
850
+ * defaults and bounds.
851
+ */
852
+ getAiBillingPlans(options) {
853
+ return (options?.client ?? this.client).get({ url: "/ai-billing/plans", ...options });
854
+ }
855
+ /**
856
+ * The caller's current-period AI usage, credits, and overage settings.
857
+ *
858
+ * Runs a settlement first so the position reflects any credits or overage
859
+ * that were waiting to be booked.
860
+ */
861
+ getAiBillingSummary(options) {
862
+ return (options?.client ?? this.client).get({ url: "/ai-billing/summary", ...options });
863
+ }
864
+ disconnectCodex(options) {
865
+ return (options?.client ?? this.client).delete({ url: "/codex", ...options });
866
+ }
867
+ getCodexConnection(options) {
868
+ return (options?.client ?? this.client).get({ url: "/codex", ...options });
869
+ }
870
+ configureCodex(options) {
871
+ return (options.client ?? this.client).put({
872
+ url: "/codex/config",
873
+ ...options,
874
+ headers: {
875
+ "Content-Type": "application/json",
876
+ ...options.headers
877
+ }
878
+ });
879
+ }
880
+ listCodexEnvironments(options) {
881
+ return (options?.client ?? this.client).get({ url: "/codex/environments", ...options });
882
+ }
883
+ startCodexLogin(options) {
884
+ return (options?.client ?? this.client).post({ url: "/codex/login", ...options });
885
+ }
886
+ cancelCodexLogin(options) {
887
+ return (options.client ?? this.client).delete({ url: "/codex/login/{attempt_id}", ...options });
888
+ }
889
+ pollCodexLogin(options) {
890
+ return (options.client ?? this.client).get({ url: "/codex/login/{attempt_id}", ...options });
891
+ }
807
892
  /**
808
893
  * Forgets the caller's Cursor API key.
809
894
  *
@@ -913,6 +998,20 @@ var Sdk = class _Sdk extends HeyApiClient {
913
998
  verifyEmailLink(options) {
914
999
  return (options.client ?? this.client).get({ url: "/email/verify/{verification_id}", ...options });
915
1000
  }
1001
+ /**
1002
+ * Converts a GitHub pull request to a draft, or marks it ready for review,
1003
+ * as the authenticated user with their own GitHub grant.
1004
+ */
1005
+ setGithubPullRequestDraft(options) {
1006
+ return (options.client ?? this.client).post({
1007
+ url: "/github_pull_requests/draft",
1008
+ ...options,
1009
+ headers: {
1010
+ "Content-Type": "application/json",
1011
+ ...options.headers
1012
+ }
1013
+ });
1014
+ }
916
1015
  /**
917
1016
  * Enriches GitHub pull request references with live GitHub data for the authenticated user.
918
1017
  */
@@ -926,6 +1025,91 @@ var Sdk = class _Sdk extends HeyApiClient {
926
1025
  }
927
1026
  });
928
1027
  }
1028
+ /**
1029
+ * Merges a GitHub pull request as the authenticated user, with their own
1030
+ * GitHub grant. GitHub applies the user's permissions and the repository's
1031
+ * branch protections; a refusal is returned with GitHub's message.
1032
+ */
1033
+ mergeGithubPullRequest(options) {
1034
+ return (options.client ?? this.client).post({
1035
+ url: "/github_pull_requests/merge",
1036
+ ...options,
1037
+ headers: {
1038
+ "Content-Type": "application/json",
1039
+ ...options.headers
1040
+ }
1041
+ });
1042
+ }
1043
+ /**
1044
+ * Reads whether each GitHub pull request merges cleanly into its base, as
1045
+ * the authenticated user sees it. Pull requests the user cannot see are
1046
+ * left out.
1047
+ */
1048
+ getGithubPullRequestMergeability(options) {
1049
+ return (options.client ?? this.client).post({
1050
+ url: "/github_pull_requests/mergeability",
1051
+ ...options,
1052
+ headers: {
1053
+ "Content-Type": "application/json",
1054
+ ...options.headers
1055
+ }
1056
+ });
1057
+ }
1058
+ /**
1059
+ * Lists invite links, newest first. Macro staff only.
1060
+ */
1061
+ listGtmInviteLinks(options) {
1062
+ return (options?.client ?? this.client).get({ url: "/gtm-invite/links", ...options });
1063
+ }
1064
+ /**
1065
+ * Creates an invite link. Macro staff only.
1066
+ */
1067
+ createGtmInviteLink(options) {
1068
+ return (options.client ?? this.client).post({
1069
+ url: "/gtm-invite/links",
1070
+ ...options,
1071
+ headers: {
1072
+ "Content-Type": "application/json",
1073
+ ...options.headers
1074
+ }
1075
+ });
1076
+ }
1077
+ /**
1078
+ * Revokes an invite link nobody has signed up through. Macro staff only.
1079
+ */
1080
+ revokeGtmInviteLink(options) {
1081
+ return (options.client ?? this.client).delete({ url: "/gtm-invite/links/{id}", ...options });
1082
+ }
1083
+ /**
1084
+ * The promotion the signed-in user's account holds from an invite link, if
1085
+ * they redeemed one and have not started a paid subscription yet.
1086
+ */
1087
+ getGtmInviteOffer(options) {
1088
+ return (options?.client ?? this.client).get({ url: "/gtm-invite/offer", ...options });
1089
+ }
1090
+ /**
1091
+ * Resolves an invite link for the public welcome page and counts the open.
1092
+ *
1093
+ * Unauthenticated: the recipient has no account yet. Only the first name and
1094
+ * whether the link is still usable are exposed.
1095
+ */
1096
+ resolveGtmInviteLink(options) {
1097
+ return (options.client ?? this.client).get({ url: "/gtm-invite/public/{token}", ...options });
1098
+ }
1099
+ /**
1100
+ * Attributes the signed-in user's account to the invite link they opened and
1101
+ * grants them its offer. Idempotent for the same account.
1102
+ */
1103
+ redeemGtmInviteLink(options) {
1104
+ return (options.client ?? this.client).post({
1105
+ url: "/gtm-invite/redeem",
1106
+ ...options,
1107
+ headers: {
1108
+ "Content-Type": "application/json",
1109
+ ...options.headers
1110
+ }
1111
+ });
1112
+ }
929
1113
  /**
930
1114
  * Health check
931
1115
  */
@@ -959,6 +1143,9 @@ var Sdk = class _Sdk extends HeyApiClient {
959
1143
  createInProgressLink(options) {
960
1144
  return (options?.client ?? this.client).post({ url: "/link", ...options });
961
1145
  }
1146
+ emailConnectionProviders(options) {
1147
+ return (options?.client ?? this.client).get({ url: "/link/email/providers", ...options });
1148
+ }
962
1149
  /**
963
1150
  * Deletes a github link for a user
964
1151
  */
@@ -1069,9 +1256,9 @@ var Sdk = class _Sdk extends HeyApiClient {
1069
1256
  return (options.client ?? this.client).get({ url: "/merge/verify/{code}", ...options });
1070
1257
  }
1071
1258
  /**
1072
- * Enrolls a mobile lead in the Loops nurture sequence, which sends the welcome
1073
- * email inviting them to register on desktop. No-ops if the address was already
1074
- * enrolled, and rejects blocked addresses.
1259
+ * Emails a mobile lead a link to continue onboarding on desktop and enrolls
1260
+ * them in the Loops welcome sequence. No-ops if the address was already
1261
+ * captured, and rejects blocked addresses.
1075
1262
  */
1076
1263
  sendMobileWelcomeEmail(options) {
1077
1264
  return (options.client ?? this.client).post({
@@ -1257,6 +1444,23 @@ var Sdk = class _Sdk extends HeyApiClient {
1257
1444
  joinTeam(options) {
1258
1445
  return (options.client ?? this.client).get({ url: "/team/join/{team_invite_id}", ...options });
1259
1446
  }
1447
+ /**
1448
+ * Moves one team member's seat between paid plans.
1449
+ *
1450
+ * Team admins and owners only. The team's subscription is re-billed for
1451
+ * the seat at once (prorated); the member's tier role and individual AI
1452
+ * allowance follow immediately.
1453
+ */
1454
+ patchTeamMemberPlan(options) {
1455
+ return (options.client ?? this.client).patch({
1456
+ url: "/team/members/{member_user_id}/plan",
1457
+ ...options,
1458
+ headers: {
1459
+ "Content-Type": "application/json",
1460
+ ...options.headers
1461
+ }
1462
+ });
1463
+ }
1260
1464
  /**
1261
1465
  * Toggles whether non-admin members may invite users to the team. Teams
1262
1466
  * start with this on (any member can invite); turning it off restricts
@@ -1284,19 +1488,6 @@ var Sdk = class _Sdk extends HeyApiClient {
1284
1488
  getUserInvites(options) {
1285
1489
  return (options?.client ?? this.client).get({ url: "/team/user/invites", ...options });
1286
1490
  }
1287
- /**
1288
- * Creates a new user.
1289
- */
1290
- createUser(options) {
1291
- return (options.client ?? this.client).post({
1292
- url: "/user",
1293
- ...options,
1294
- headers: {
1295
- "Content-Type": "application/json",
1296
- ...options.headers
1297
- }
1298
- });
1299
- }
1300
1491
  /**
1301
1492
  * Retrieves user names in bulk
1302
1493
  */
@@ -1434,6 +1625,27 @@ var Sdk = class _Sdk extends HeyApiClient {
1434
1625
  }
1435
1626
  });
1436
1627
  }
1628
+ /**
1629
+ * Read subscription state for the authenticated user's seat.
1630
+ */
1631
+ getSubscriptionStatus(options) {
1632
+ return (options?.client ?? this.client).get({ url: "/user/stripe/plan", ...options });
1633
+ }
1634
+ /**
1635
+ * Changes the caller's paid plan. Upgrades are prorated immediately;
1636
+ * downgrades retain the active plan until renewal. Selecting the active plan
1637
+ * cancels a pending downgrade without charging or resetting usage.
1638
+ */
1639
+ changePlan(options) {
1640
+ return (options.client ?? this.client).post({
1641
+ url: "/user/stripe/plan",
1642
+ ...options,
1643
+ headers: {
1644
+ "Content-Type": "application/json",
1645
+ ...options.headers
1646
+ }
1647
+ });
1648
+ }
1437
1649
  /**
1438
1650
  * Creates a Stripe billing portal session.
1439
1651
  */
@@ -1447,6 +1659,12 @@ var Sdk = class _Sdk extends HeyApiClient {
1447
1659
  }
1448
1660
  });
1449
1661
  }
1662
+ /**
1663
+ * Read the caller's eligibility; checkout revalidates before granting a trial.
1664
+ */
1665
+ getTrialEligibility(options) {
1666
+ return (options?.client ?? this.client).get({ url: "/user/stripe/trial_eligibility", ...options });
1667
+ }
1450
1668
  /**
1451
1669
  * Updates the user's tutorialComplete flag.
1452
1670
  */