@macro-inc/sdk 0.4.1 → 0.5.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 (185) hide show
  1. package/README.md +169 -7
  2. package/dist/{chunk-PTX2RV2N.js → chunk-3SW6QVDV.js} +33 -0
  3. package/dist/{chunk-XFA7NCJ5.js → chunk-GT5EUYOR.js} +13 -15
  4. package/dist/{chunk-ZLBDES7U.js → chunk-HIW6KU2I.js} +490 -4
  5. package/dist/{chunk-AZJUIUIV.js → chunk-J2VK3NOR.js} +56 -0
  6. package/dist/{chunk-PZPTJI6F.js → chunk-UVJLWLSJ.js} +41 -2
  7. package/dist/generated/agent-fold/index.d.ts +8 -6
  8. package/dist/generated/agent-harness/index.d.ts +1 -1
  9. package/dist/generated/agent-harness/index.js +1 -1
  10. package/dist/generated/agent-harness/sdk.gen.d.ts +17 -1
  11. package/dist/generated/agent-harness/types.gen.d.ts +188 -3
  12. package/dist/generated/auth/index.js +1 -1
  13. package/dist/generated/auth/sdk.gen.d.ts +13 -15
  14. package/dist/generated/auth/types.gen.d.ts +36 -17
  15. package/dist/generated/cognition/index.d.ts +1 -1
  16. package/dist/generated/cognition/index.js +1 -1
  17. package/dist/generated/cognition/sdk.gen.d.ts +38 -1
  18. package/dist/generated/cognition/types.gen.d.ts +473 -4
  19. package/dist/generated/connection/types.gen.d.ts +1 -1
  20. package/dist/generated/notification/index.d.ts +1 -1
  21. package/dist/generated/notification/types.gen.d.ts +36 -1
  22. package/dist/generated/scheduled-action/index.d.ts +1 -1
  23. package/dist/generated/scheduled-action/index.js +1 -1
  24. package/dist/generated/scheduled-action/sdk.gen.d.ts +17 -2
  25. package/dist/generated/scheduled-action/types.gen.d.ts +642 -104
  26. package/dist/generated/storage/index.d.ts +1 -1
  27. package/dist/generated/storage/index.js +1 -1
  28. package/dist/generated/storage/sdk.gen.d.ts +204 -5
  29. package/dist/generated/storage/types.gen.d.ts +3969 -374
  30. package/dist/src/entities/account-managers/grant.d.ts +28 -5
  31. package/dist/src/entities/account-managers/namespace.d.ts +15 -3
  32. package/dist/src/entities/activity/entity.d.ts +7 -0
  33. package/dist/src/entities/activity/namespace.d.ts +58 -0
  34. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  35. package/dist/src/entities/agent-sessions/activity.d.ts +10 -2
  36. package/dist/src/entities/agent-sessions/agent-session.d.ts +193 -18
  37. package/dist/src/entities/agent-sessions/code-execution.d.ts +15 -3
  38. package/dist/src/entities/agent-sessions/conversation.d.ts +46 -9
  39. package/dist/src/entities/agent-sessions/namespace.d.ts +71 -16
  40. package/dist/src/entities/agent-sessions/origin.d.ts +1 -1
  41. package/dist/src/entities/agent-sessions/queued-action.d.ts +17 -3
  42. package/dist/src/entities/agent-sessions/review.d.ts +55 -4
  43. package/dist/src/entities/agent-sessions/tool-approval.d.ts +5 -1
  44. package/dist/src/entities/agents/agent.d.ts +98 -3
  45. package/dist/src/entities/agents/namespace.d.ts +52 -8
  46. package/dist/src/entities/ai/namespace.d.ts +9 -1
  47. package/dist/src/entities/api-keys/api-key.d.ts +6 -1
  48. package/dist/src/entities/api-keys/namespace.d.ts +15 -3
  49. package/dist/src/entities/bots/bot.d.ts +38 -6
  50. package/dist/src/entities/bots/namespace.d.ts +13 -1
  51. package/dist/src/entities/bots/token.d.ts +6 -1
  52. package/dist/src/entities/calendar/booking-link.d.ts +7 -1
  53. package/dist/src/entities/calendar/booking-namespace.d.ts +13 -0
  54. package/dist/src/entities/calendar/booking.d.ts +15 -0
  55. package/dist/src/entities/calendar/calendar.d.ts +7 -1
  56. package/dist/src/entities/calendar/event.d.ts +59 -9
  57. package/dist/src/entities/calendar/namespace.d.ts +88 -10
  58. package/dist/src/entities/calendar/replacement.d.ts +19 -3
  59. package/dist/src/entities/calls/call-record.d.ts +90 -14
  60. package/dist/src/entities/calls/connection.d.ts +7 -1
  61. package/dist/src/entities/calls/message.d.ts +27 -5
  62. package/dist/src/entities/calls/namespace.d.ts +15 -3
  63. package/dist/src/entities/canvases/canvas.d.ts +324 -0
  64. package/dist/src/entities/channels/access-request.d.ts +10 -2
  65. package/dist/src/entities/channels/activity.d.ts +20 -4
  66. package/dist/src/entities/channels/channel.d.ts +130 -23
  67. package/dist/src/entities/channels/labels.d.ts +41 -7
  68. package/dist/src/entities/channels/message.d.ts +41 -7
  69. package/dist/src/entities/channels/namespace.d.ts +28 -3
  70. package/dist/src/entities/channels/post.test.d.ts +1 -0
  71. package/dist/src/entities/channels/thread.d.ts +19 -3
  72. package/dist/src/entities/chats/chat.d.ts +56 -6
  73. package/dist/src/entities/chats/generation.d.ts +11 -2
  74. package/dist/src/entities/chats/namespace.d.ts +10 -2
  75. package/dist/src/entities/connected-apps/connected-app.d.ts +14 -1
  76. package/dist/src/entities/connected-apps/connector.d.ts +3 -0
  77. package/dist/src/entities/connected-apps/namespace.d.ts +16 -0
  78. package/dist/src/entities/crm/company.d.ts +63 -15
  79. package/dist/src/entities/crm/contact.d.ts +60 -13
  80. package/dist/src/entities/crm/namespace.d.ts +85 -11
  81. package/dist/src/entities/crm/pipeline-entry.d.ts +102 -0
  82. package/dist/src/entities/crm/pipeline.d.ts +271 -27
  83. package/dist/src/entities/crm/pipelines.d.ts +39 -2
  84. package/dist/src/entities/databases/column.d.ts +54 -7
  85. package/dist/src/entities/databases/database.d.ts +126 -12
  86. package/dist/src/entities/databases/namespace.d.ts +16 -4
  87. package/dist/src/entities/databases/row.d.ts +2 -0
  88. package/dist/src/entities/databases/saved-query.d.ts +145 -0
  89. package/dist/src/entities/databases/table.d.ts +64 -10
  90. package/dist/src/entities/databases/view.d.ts +27 -5
  91. package/dist/src/entities/databases/webhook.d.ts +8 -1
  92. package/dist/src/entities/documents/ai-edit.d.ts +2 -0
  93. package/dist/src/entities/documents/anchor.d.ts +12 -2
  94. package/dist/src/entities/documents/comment.d.ts +29 -5
  95. package/dist/src/entities/documents/document.d.ts +243 -20
  96. package/dist/src/entities/documents/markdown.d.ts +25 -0
  97. package/dist/src/entities/documents/namespace.d.ts +132 -13
  98. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  99. package/dist/src/entities/documents/system-skill.d.ts +21 -1
  100. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  101. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  102. package/dist/src/entities/documents/version.d.ts +5 -1
  103. package/dist/src/entities/email/attachment.d.ts +3 -0
  104. package/dist/src/entities/email/draft.d.ts +61 -9
  105. package/dist/src/entities/email/filter.d.ts +12 -2
  106. package/dist/src/entities/email/label.d.ts +7 -1
  107. package/dist/src/entities/email/link.d.ts +5 -1
  108. package/dist/src/entities/email/message.d.ts +55 -8
  109. package/dist/src/entities/email/namespace.d.ts +127 -21
  110. package/dist/src/entities/email/thread.d.ts +99 -16
  111. package/dist/src/entities/entity-mentions/mention.d.ts +6 -1
  112. package/dist/src/entities/entity-mentions/namespace.d.ts +5 -1
  113. package/dist/src/entities/entity.d.ts +56 -6
  114. package/dist/src/entities/external-chat/chat.d.ts +62 -11
  115. package/dist/src/entities/external-chat/message.d.ts +1 -1
  116. package/dist/src/entities/external-chat/namespace.d.ts +5 -1
  117. package/dist/src/entities/external-chat/send.d.ts +10 -2
  118. package/dist/src/entities/favorites/namespace.d.ts +20 -3
  119. package/dist/src/entities/foreign/foreign-entity.d.ts +5 -1
  120. package/dist/src/entities/foreign/namespace.d.ts +4 -0
  121. package/dist/src/entities/forms/form.d.ts +71 -13
  122. package/dist/src/entities/forms/namespace.d.ts +10 -2
  123. package/dist/src/entities/forms/question.d.ts +35 -7
  124. package/dist/src/entities/forms/response.d.ts +25 -5
  125. package/dist/src/entities/forms/section.d.ts +15 -3
  126. package/dist/src/entities/github-pull-requests/namespace.d.ts +5 -1
  127. package/dist/src/entities/github-pull-requests/pull-request.d.ts +15 -3
  128. package/dist/src/entities/harnesses/harness.d.ts +51 -3
  129. package/dist/src/entities/harnesses/namespace.d.ts +53 -7
  130. package/dist/src/entities/harnesses/pairing.d.ts +12 -2
  131. package/dist/src/entities/images/image.d.ts +16 -5
  132. package/dist/src/entities/images/namespace.d.ts +8 -1
  133. package/dist/src/entities/initiatives/initiative.d.ts +117 -3
  134. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  135. package/dist/src/entities/initiatives/namespace.d.ts +69 -7
  136. package/dist/src/entities/me/namespace.d.ts +27 -2
  137. package/dist/src/entities/meetings/meeting.d.ts +45 -8
  138. package/dist/src/entities/meetings/namespace.d.ts +20 -4
  139. package/dist/src/entities/memory/namespace.d.ts +49 -0
  140. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  141. package/dist/src/entities/messages/discussion.d.ts +84 -0
  142. package/dist/src/entities/messages/thread.d.ts +19 -5
  143. package/dist/src/entities/notifications/namespace.d.ts +40 -7
  144. package/dist/src/entities/notifications/notification.d.ts +29 -5
  145. package/dist/src/entities/pins/namespace.d.ts +23 -4
  146. package/dist/src/entities/projects/namespace.d.ts +29 -0
  147. package/dist/src/entities/projects/project.d.ts +47 -6
  148. package/dist/src/entities/properties/namespace.d.ts +67 -11
  149. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  150. package/dist/src/entities/properties/property-definition.d.ts +30 -5
  151. package/dist/src/entities/properties/property-option.d.ts +14 -2
  152. package/dist/src/entities/referrals/namespace.d.ts +8 -1
  153. package/dist/src/entities/routines/namespace.d.ts +128 -7
  154. package/dist/src/entities/routines/routine.d.ts +111 -25
  155. package/dist/src/entities/saved-views/namespace.d.ts +57 -0
  156. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  157. package/dist/src/entities/search/namespace.d.ts +5 -1
  158. package/dist/src/entities/sharing/access.d.ts +50 -9
  159. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  160. package/dist/src/entities/tasks/namespace.d.ts +13 -1
  161. package/dist/src/entities/tasks/task.d.ts +7 -1
  162. package/dist/src/entities/teams/invite.d.ts +3 -0
  163. package/dist/src/entities/teams/namespace.d.ts +10 -2
  164. package/dist/src/entities/teams/team.d.ts +7 -0
  165. package/dist/src/entities/unfurls/namespace.d.ts +12 -2
  166. package/dist/src/entities/users/namespace.d.ts +19 -1
  167. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  168. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  169. package/dist/src/entities/users/user.d.ts +52 -1
  170. package/dist/src/entities/web/namespace.d.ts +6 -0
  171. package/dist/src/entities/webhooks/namespace.d.ts +5 -0
  172. package/dist/src/entities/webhooks/webhook.d.ts +47 -7
  173. package/dist/src/entities/whatsapp/account.d.ts +5 -1
  174. package/dist/src/entities/whatsapp/chat.d.ts +9 -1
  175. package/dist/src/entities/whatsapp/namespace.d.ts +7 -1
  176. package/dist/src/entities/workspace/namespace.d.ts +7 -1
  177. package/dist/src/entities/workspace/query.d.ts +5 -1
  178. package/dist/src/events/hydrate/user.d.ts +14 -0
  179. package/dist/src/events/receiver.d.ts +2 -0
  180. package/dist/src/events/types.d.ts +2 -1
  181. package/dist/src/macro.d.ts +33 -5
  182. package/dist/src/macro.js +15635 -10132
  183. package/dist/src/utils/lazy.d.ts +7 -1
  184. package/package.json +1 -1
  185. package/dist/src/entities/crm/comment.d.ts +0 -64
@@ -35,24 +35,54 @@ export interface InboxOptions {
35
35
  */
36
36
  export declare class EmailNamespace {
37
37
  private readonly client;
38
- /** Create a draft without sending it; the inbox defaults to the caller's primary. */
38
+ /**
39
+ * Create a draft without sending it; the inbox defaults to the caller's primary.
40
+ *
41
+ * @write
42
+ * @openworld
43
+ */
39
44
  createDraft(options: DraftOptions, inbox?: Link): Promise<EmailDraft>;
40
- /** Construct a lazy draft handle. */
45
+ /**
46
+ * Construct a lazy draft handle.
47
+ *
48
+ * @readonly
49
+ */
41
50
  draftById(id: string): EmailDraft;
42
- /** Scheduled drafts, fetched lazily in bounded pages. */
51
+ /**
52
+ * Scheduled drafts, fetched lazily in bounded pages.
53
+ *
54
+ * @readonly
55
+ */
43
56
  scheduled(options?: {
44
57
  pageSize?: number;
45
58
  inbox?: Link;
46
59
  }): AsyncGenerator<EmailDraft>;
47
- /** Importance filters. */
60
+ /**
61
+ * Importance filters.
62
+ *
63
+ * @readonly
64
+ */
48
65
  filters(inbox?: Link): Promise<EmailFilter[]>;
49
- /** Create or replace a filter matching an address or domain. */
66
+ /**
67
+ * Create or replace a filter matching an address or domain.
68
+ *
69
+ * @write
70
+ * @idempotent
71
+ */
50
72
  upsertFilter(options: EmailFilterOptions, inbox?: Link): Promise<EmailFilter>;
51
- /** Address book contacts grouped by the service's interaction buckets. */
73
+ /**
74
+ * Address book contacts grouped by the service's interaction buckets.
75
+ *
76
+ * @readonly
77
+ */
52
78
  contacts(): Promise<{
53
79
  [key: string]: import("../../../generated/email").ContactInfoWithInteraction[];
54
80
  }>;
55
- /** Follow-up reminders with thread handles, automatically paginated. */
81
+ /**
82
+ * Follow-up reminders with thread handles, automatically paginated.
83
+ *
84
+ * @readonly
85
+ */
56
86
  reminders(options?: Omit<NonNullable<ListEmailRemindersData['query']>, 'inboxIds' | 'cursor'> & {
57
87
  inboxes?: Link[];
58
88
  }): AsyncGenerator<{
@@ -62,22 +92,50 @@ export declare class EmailNamespace {
62
92
  constructor(client: MacroClient);
63
93
  /** A handle to an email thread by id. */
64
94
  byId(id: string): EmailThread;
65
- /** A handle to an email message by id. */
95
+ /**
96
+ * A handle to an email message by id.
97
+ *
98
+ * @readonly
99
+ */
66
100
  message(id: string): EmailMessage;
67
- /** A handle to an email attachment by id. */
101
+ /**
102
+ * A handle to an email attachment by id.
103
+ *
104
+ * @readonly
105
+ */
68
106
  attachment(id: string): EmailAttachment;
69
- /** A handle to a connected inbox (email link) by id. */
107
+ /**
108
+ * A handle to a connected inbox (email link) by id.
109
+ *
110
+ * @readonly
111
+ */
70
112
  link(id: string): Link;
71
- /** The caller's connected inboxes (email links). */
113
+ /**
114
+ * The caller's connected inboxes (email links).
115
+ *
116
+ * @readonly
117
+ */
72
118
  links(): Promise<Link[]>;
73
- /** Providers the server currently permits this caller to connect. */
119
+ /**
120
+ * Providers the server currently permits this caller to connect.
121
+ *
122
+ * @readonly
123
+ */
74
124
  connectionProviders(): Promise<EmailConnectionProviders>;
75
125
  /** Recover a draft move using its original operation UUID; never starts a new move.
76
- * An empty committed result fences the old move so it cannot commit later. */
126
+ * An empty committed result fences the old move so it cannot commit later.
127
+ *
128
+ * @write
129
+ * @openworld
130
+ * @idempotent
131
+ */
77
132
  recoverDraftTransfer(operationId: string): Promise<TransferRecoveryResponse>;
78
133
  /**
79
134
  * Send a new plain-text email; an agent's program is refused (403) and
80
135
  * sends through a review or {@link sendConfirmed} instead.
136
+ *
137
+ * @destructive
138
+ * @openworld
81
139
  */
82
140
  send(opts: SendEmailOptions): Promise<EmailMessage | undefined>;
83
141
  /**
@@ -92,6 +150,9 @@ export declare class EmailNamespace {
92
150
  * thread) and Macro documents to attach. The send takes effect at once and
93
151
  * is never retried; on an error, look for the message in the thread before
94
152
  * sending again.
153
+ *
154
+ * @destructive
155
+ * @openworld
95
156
  */
96
157
  sendConfirmed(opts: ConfirmedEmailOptions): Promise<SentEmail>;
97
158
  /**
@@ -99,27 +160,72 @@ export declare class EmailNamespace {
99
160
  * search for their quoted email address, not their name: a name only
100
161
  * matches where that display name appears. Resolve the address first, for
101
162
  * example with `macro.users.search(name)`.
163
+ *
164
+ * @readonly
102
165
  */
103
166
  search(query: string, opts?: SearchOpts): AsyncGenerator<EmailThread>;
104
- /** The threads in the inbox, most recent first, auto-paginated. */
167
+ /**
168
+ * The threads in the inbox, most recent first, auto-paginated.
169
+ *
170
+ * @readonly
171
+ */
105
172
  inbox(opts?: InboxOptions): AsyncGenerator<EmailThread>;
106
- /** A handle to a label by id. */
173
+ /**
174
+ * A handle to a label by id.
175
+ *
176
+ * @readonly
177
+ */
107
178
  label(id: string): Label;
108
- /** All labels across the user's inboxes. */
179
+ /**
180
+ * All labels across the user's inboxes.
181
+ *
182
+ * @readonly
183
+ */
109
184
  labels(): Promise<Label[]>;
110
- /** Create a user label. Returns the created label. */
185
+ /**
186
+ * Create a user label. Returns the created label.
187
+ *
188
+ * @write
189
+ * @openworld
190
+ */
111
191
  createLabel(name: string): Promise<Label>;
112
192
  /**
113
193
  * Archive many threads (or unarchive with `false`). Resolves to the threads
114
194
  * whose state could not change.
195
+ *
196
+ * @write
197
+ * @openworld
198
+ * @idempotent
115
199
  */
116
200
  archive(threads: EmailThread[], archived?: boolean): Promise<EmailThread[]>;
117
- /** Delete a label. */
201
+ /**
202
+ * Delete a label.
203
+ *
204
+ * @destructive
205
+ * @openworld
206
+ * @idempotent
207
+ */
118
208
  deleteLabel(label: Label): Promise<void>;
119
- /** Block an email sender. */
209
+ /**
210
+ * Block an email sender.
211
+ *
212
+ * @write
213
+ * @openworld
214
+ * @idempotent
215
+ */
120
216
  blockSender(email: string): Promise<void>;
121
- /** Unblock a previously blocked sender. */
217
+ /**
218
+ * Unblock a previously blocked sender.
219
+ *
220
+ * @write
221
+ * @openworld
222
+ * @idempotent
223
+ */
122
224
  unblockSender(email: string): Promise<void>;
123
- /** The email addresses currently blocked. */
225
+ /**
226
+ * The email addresses currently blocked.
227
+ *
228
+ * @readonly
229
+ */
124
230
  blockedSenders(): Promise<string[]>;
125
231
  }
@@ -45,11 +45,24 @@ export interface EmailReadReceipt {
45
45
  export declare class EmailThread extends PropertiedEntity<ThreadDetail> {
46
46
  /** Access requests and direct user grants. */
47
47
  readonly access: EntityAccess;
48
- /** Read follow-up state for this thread. */
48
+ /**
49
+ * Read follow-up state for this thread.
50
+ *
51
+ * @readonly
52
+ */
49
53
  followup(): Promise<import("../../../generated/storage").EmailFollowupResponse>;
50
- /** Set or remove a follow-up using a persisted operation id and revision. */
54
+ /**
55
+ * Set or remove a follow-up using a persisted operation id and revision.
56
+ *
57
+ * @write
58
+ * @idempotent
59
+ */
51
60
  setFollowup(command: EmailFollowupCommand): Promise<import("../../../generated/storage").EmailFollowup>;
52
- /** Calendar invitations resolved from this thread's messages. */
61
+ /**
62
+ * Calendar invitations resolved from this thread's messages.
63
+ *
64
+ * @readonly
65
+ */
53
66
  calendarInvitations(): Promise<{
54
67
  [key: string]: import("../../../generated/email").InvitationResolution;
55
68
  }>;
@@ -64,7 +77,11 @@ export declare class EmailThread extends PropertiedEntity<ThreadDetail> {
64
77
  * instead, `already_on_calendar` when the meeting is already on one of
65
78
  * their calendars, whichever calendar is named (it cannot be added to
66
79
  * another of theirs either), and `copy_refused` when Google will not
67
- * import it. */
80
+ * import it.
81
+ *
82
+ * @write
83
+ * @openworld
84
+ */
68
85
  addEventToCalendar(message: EmailMessage, invitation: CalendarInvitation, options?: {
69
86
  calendar?: Calendar;
70
87
  }): Promise<CalendarEvent>;
@@ -72,9 +89,16 @@ export declare class EmailThread extends PropertiedEntity<ThreadDetail> {
72
89
  * Opens recorded for messages sent from the caller's own or delegated
73
90
  * inboxes with read receipts on, newest message first. Counts are
74
91
  * approximate: some mail apps prefetch images and others block them.
92
+ *
93
+ * @readonly
75
94
  */
76
95
  readReceipts(): Promise<EmailReadReceipt[]>;
77
- /** Change project membership or share permissions for this thread. */
96
+ /**
97
+ * Change project membership or share permissions for this thread.
98
+ *
99
+ * @write
100
+ * @idempotent
101
+ */
78
102
  update(options: {
79
103
  project?: Project | null;
80
104
  sharePermission?: SharePermissionOptions;
@@ -84,7 +108,11 @@ export declare class EmailThread extends PropertiedEntity<ThreadDetail> {
84
108
  /** The properties service identifies email threads as `THREAD`. */
85
109
  protected readonly propertyEntityType = "THREAD";
86
110
  protected fetch(): Promise<ThreadDetail>;
87
- /** The thread's URL in the Macro web app; hand it to users as the link. */
111
+ /**
112
+ * The thread's URL in the Macro web app; hand it to users as the link.
113
+ *
114
+ * @readonly
115
+ */
88
116
  webUrl(): string;
89
117
  /** Identity, loaded detail and {@link webUrl}, so serialized handles carry their link. */
90
118
  toJSON(): {
@@ -116,45 +144,100 @@ export declare class EmailThread extends PropertiedEntity<ThreadDetail> {
116
144
  readonly latestOutboundAt: () => Promise<string | undefined>;
117
145
  /** Timestamp of the latest non-spam message, if any. */
118
146
  readonly latestNonSpamAt: () => Promise<string | undefined>;
119
- /** The thread's subject, from its first message with one. */
147
+ /**
148
+ * The thread's subject, from its first message with one.
149
+ *
150
+ * @readonly
151
+ */
120
152
  subject(): Promise<string | undefined>;
121
153
  /**
122
154
  * Everyone on the thread (senders and recipients), deduped by email.
123
155
  * Derived from the thread's first 100 messages.
156
+ *
157
+ * @readonly
124
158
  */
125
159
  participants(): Promise<ApiContactInfo[]>;
126
- /** The messages in this thread, pre-seeded from the list endpoint. */
160
+ /**
161
+ * The messages in this thread, pre-seeded from the list endpoint.
162
+ *
163
+ * @readonly
164
+ */
127
165
  messages(opts?: {
128
166
  since?: string;
129
167
  limit?: number;
130
168
  }): Promise<EmailMessage[]>;
131
- /** The attachments across this thread's first 100 messages, pre-seeded from the thread detail. */
169
+ /**
170
+ * The attachments across this thread's first 100 messages, pre-seeded from the thread detail.
171
+ *
172
+ * @readonly
173
+ */
132
174
  attachments(): Promise<EmailAttachment[]>;
133
175
  /**
134
176
  * Send a plain-text reply in this thread; an agent's program is refused
135
177
  * (403) and replies through a review or `email.sendConfirmed` with
136
178
  * `replyingTo` instead. Returns a handle when the API reports the created
137
179
  * message's id.
180
+ *
181
+ * @destructive
182
+ * @openworld
138
183
  */
139
184
  reply(opts: ReplyEmailOptions): Promise<EmailMessage | undefined>;
140
- /** Archive the thread (or unarchive with `false`). */
185
+ /**
186
+ * Archive the thread (or unarchive with `false`).
187
+ *
188
+ * @write
189
+ * @openworld
190
+ * @idempotent
191
+ */
141
192
  archive(archived?: boolean): Promise<void>;
142
193
  /**
143
194
  * Archive many threads (or unarchive with `false`), sending one request per
144
195
  * 100 threads. Resolves to the threads whose state could not change.
145
196
  */
146
197
  static archiveMany(client: MacroClient, threads: EmailThread[], archived?: boolean): Promise<EmailThread[]>;
147
- /** Update provider-neutral read, trash, spam, or star state. */
198
+ /**
199
+ * Update provider-neutral read, trash, spam, or star state.
200
+ *
201
+ * @destructive
202
+ * @openworld
203
+ * @idempotent
204
+ */
148
205
  updateState(request: UpdateThreadStateRequest): Promise<void>;
149
- /** Read pending or failed mailbox changes without initiating a retry. */
206
+ /**
207
+ * Read pending or failed mailbox changes without initiating a retry.
208
+ *
209
+ * @readonly
210
+ */
150
211
  operations(): Promise<MailboxOperation[]>;
151
- /** Mark the thread as seen. */
212
+ /**
213
+ * Mark the thread as seen.
214
+ *
215
+ * @write
216
+ * @idempotent
217
+ */
152
218
  markSeen(): Promise<void>;
153
- /** Add a label to every message in the thread. */
219
+ /**
220
+ * Add a label to every message in the thread.
221
+ *
222
+ * @write
223
+ * @openworld
224
+ * @idempotent
225
+ */
154
226
  addLabel(label: Label): Promise<void>;
155
- /** Remove a label from every message in the thread. */
227
+ /**
228
+ * Remove a label from every message in the thread.
229
+ *
230
+ * @write
231
+ * @openworld
232
+ * @idempotent
233
+ */
156
234
  removeLabel(label: Label): Promise<void>;
157
- /** Attach the thread to a project, or clear the project with `null`. */
235
+ /**
236
+ * Attach the thread to a project, or clear the project with `null`.
237
+ *
238
+ * @write
239
+ * @idempotent
240
+ */
158
241
  moveToProject(project: Project | null): Promise<void>;
159
242
  /** Search email threads by subject and content, most relevant first, auto-paginated. */
160
243
  static search: (client: MacroClient, query: string, searchOpts?: import("../search/options").SearchOpts) => AsyncGenerator<EmailThread, any, any>;
@@ -7,7 +7,12 @@ export declare class EntityMention {
7
7
  private constructor();
8
8
  /** Construct a mention handle for removal. */
9
9
  static byId(client: MacroClient, id: string): EntityMention;
10
- /** Remove this mention. */
10
+ /**
11
+ * Remove this mention.
12
+ *
13
+ * @destructive
14
+ * @idempotent
15
+ */
11
16
  delete(): Promise<void>;
12
17
  /** Serialize identity only. */
13
18
  toJSON(): {
@@ -11,6 +11,10 @@ export declare class EntityMentionNamespace {
11
11
  constructor(client: MacroClient);
12
12
  /** Construct a stored mention handle. */
13
13
  byId(id: string): EntityMention;
14
- /** Create a mention from a source resource to a target resource. */
14
+ /**
15
+ * Create a mention from a source resource to a target resource.
16
+ *
17
+ * @write
18
+ */
15
19
  create(source: EntityReference, target: EntityReference): Promise<EntityMention>;
16
20
  }
@@ -66,7 +66,11 @@ export declare abstract class MacroEntity<Detail> {
66
66
  export declare abstract class FavoritableEntity<Detail> extends MacroEntity<Detail> implements Favoritable {
67
67
  /** How the entity-addressed APIs (favorites) identify this entity's type. */
68
68
  abstract readonly entityType: MacroEntityType;
69
- /** Read the caller's effective permission on this entity. */
69
+ /**
70
+ * Read the caller's effective permission on this entity.
71
+ *
72
+ * @readonly
73
+ */
70
74
  permission(): Promise<{
71
75
  permission: import("../../generated/storage").EntityPermission;
72
76
  status: "access";
@@ -77,9 +81,33 @@ export declare abstract class FavoritableEntity<Detail> extends MacroEntity<Deta
77
81
  * Add this entity to the user's favorites. Returns this handle for chaining.
78
82
  * Plain unwrap: favoriting alters the user's favorites collection, not this
79
83
  * entity's own detail, so there's nothing cached to invalidate.
84
+ *
85
+ * @write
86
+ * @idempotent
80
87
  */
81
88
  favorite(): Promise<this>;
82
- /** Remove this entity from the user's favorites. Returns this handle for chaining. */
89
+ /**
90
+ * Mute notifications about this item for the user only, as Mute in the app
91
+ * does; with `until`, a snooze that ends then. Nobody else's notifications
92
+ * change. Returns this handle for chaining.
93
+ *
94
+ * @write
95
+ */
96
+ muteNotifications(opts?: {
97
+ /** When notifications resume; must be in the future. Omit to mute until unmuted. */
98
+ until?: Date;
99
+ }): Promise<this>;
100
+ /** Resume notifications about this item, ending a mute or snooze. Returns this handle for chaining.
101
+ *
102
+ * @write
103
+ */
104
+ unmuteNotifications(): Promise<this>;
105
+ /**
106
+ * Remove this entity from the user's favorites. Returns this handle for chaining.
107
+ *
108
+ * @write
109
+ * @idempotent
110
+ */
83
111
  unfavorite(): Promise<this>;
84
112
  }
85
113
  /** A favoritable entity that also carries user-defined properties. */
@@ -89,20 +117,42 @@ export declare abstract class PropertiedEntity<Detail> extends FavoritableEntity
89
117
  * differently from {@link entityType} (e.g. `THREAD` for `email_thread`).
90
118
  */
91
119
  protected abstract readonly propertyEntityType: PropertyEntityType;
92
- /** This entity's reference for bulk property operations. */
120
+ /**
121
+ * This entity's reference for bulk property operations.
122
+ *
123
+ * @readonly
124
+ */
93
125
  propertyReference(): PropertyTargetReference;
94
- /** The properties set on this entity, each with its definition, value, and options. */
126
+ /**
127
+ * The properties set on this entity, each with its definition, value, and options.
128
+ *
129
+ * @readonly
130
+ */
95
131
  properties(opts?: {
96
132
  includeMetadata?: boolean;
97
133
  }): Promise<EntityPropertyWithDefinition[]>;
98
134
  /**
99
135
  * Set a property value on this entity, or attach the property without a
100
136
  * value when `value` is omitted.
137
+ *
138
+ * @write
139
+ * @idempotent
101
140
  */
102
141
  setProperty(property: PropertyDefinition, value?: SetPropertyValue): Promise<void>;
103
- /** Apply multi-select option deltas atomically across this entity's properties. */
142
+ /**
143
+ * Apply multi-select option deltas atomically across this entity's properties.
144
+ *
145
+ * @write
146
+ * @idempotent
147
+ * @mcp-exclude Takes a handle built from a listing record, which an MCP call can't reference.
148
+ */
104
149
  updatePropertyOptions(changes: PropertyOptionDelta[]): Promise<BulkUpdateEntityPropertyOptionsResponse>;
105
- /** Remove a property from this entity, given its {@link properties} entry. */
150
+ /**
151
+ * Remove a property from this entity, given its {@link properties} entry.
152
+ *
153
+ * @destructive
154
+ * @idempotent
155
+ */
106
156
  deleteProperty(assignment: EntityPropertyWithDefinition): Promise<void>;
107
157
  }
108
158
  export {};
@@ -59,35 +59,82 @@ export declare class ExternalChat extends FavoritableEntity<ExternalChatDetail>
59
59
  readonly disappearingSeconds: () => Promise<number | undefined>;
60
60
  /** Actual owner, independent of provider membership. */
61
61
  readonly owner: () => Promise<User>;
62
- /** The community a group belongs to, if any: the community's own provider chat, its name, and whether this is its announcement group. */
62
+ /**
63
+ * The community a group belongs to, if any: the community's own provider chat, its name, and whether this is its announcement group.
64
+ *
65
+ * @readonly
66
+ */
63
67
  community(): Promise<WhatsAppCommunity | undefined>;
64
- /** Iterate newest-first timeline pages lazily. */
68
+ /**
69
+ * Iterate newest-first timeline pages lazily.
70
+ *
71
+ * @readonly
72
+ */
65
73
  messages(options?: {
66
74
  limit?: number;
67
75
  }): AsyncGenerator<ExternalChatMessage>;
68
- /** Advance the caller's own read cursor. */
76
+ /**
77
+ * Advance the caller's own read cursor.
78
+ *
79
+ * @write
80
+ * @idempotent
81
+ */
69
82
  markRead(message: ExternalChatMessage): Promise<void>;
70
- /** Read standard link/team sharing settings. */
83
+ /**
84
+ * Read standard link/team sharing settings.
85
+ *
86
+ * @readonly
87
+ */
71
88
  permissions(): Promise<import("../../../generated/storage").SharePermissionV2>;
72
- /** Actual owner updates standard link/team sharing settings. */
89
+ /**
90
+ * Actual owner updates standard link/team sharing settings.
91
+ *
92
+ * @write
93
+ * @idempotent
94
+ */
73
95
  updatePermissions(update: UpdateSharePermissionRequestV2): Promise<void>;
74
- /** Owner stops syncing the chat; history and established sharing stay. */
96
+ /**
97
+ * Owner stops syncing the chat; history and established sharing stay.
98
+ *
99
+ * @destructive
100
+ * @idempotent
101
+ */
75
102
  remove(): Promise<void>;
76
- /** Stage a supported attachment for a deliberate send. */
103
+ /**
104
+ * Stage a supported attachment for a deliberate send.
105
+ *
106
+ * @write
107
+ * @mcp-exclude Takes file bytes; MCP calls carry JSON only.
108
+ */
77
109
  upload(file: Blob | File): Promise<ExternalChatUpload>;
78
110
  /** Personal sessions and owner API credentials can send. Bots never send.
79
111
  * Preserve the idempotency key; uncertain outcomes are never automatically resent.
80
112
  * The server enforces one request per second per user.
113
+ *
114
+ * @destructive
115
+ * @openworld
81
116
  */
82
117
  send(content: ExternalChatContent, options: {
83
118
  idempotencyKey: string;
84
119
  replyTo?: ExternalChatMessage;
85
120
  }): Promise<ExternalChatSend>;
86
- /** Read only the caller's pending, uncertain or failed sends. */
121
+ /**
122
+ * Read only the caller's pending, uncertain or failed sends.
123
+ *
124
+ * @readonly
125
+ */
87
126
  sends(): Promise<ExternalChatSend[]>;
88
- /** Read delivery for selected caller-owned intents or messages. */
127
+ /**
128
+ * Read delivery for selected caller-owned intents or messages.
129
+ *
130
+ * @readonly
131
+ */
89
132
  delivery(sends: Array<ExternalChatSend | ExternalChatMessage>): Promise<ExternalChatSend[]>;
90
- /** Read attachment states for selected messages. */
133
+ /**
134
+ * Read attachment states for selected messages.
135
+ *
136
+ * @readonly
137
+ */
91
138
  messageAttachments(messages: ExternalChatMessage[]): Promise<{
92
139
  message: ExternalChatMessage;
93
140
  attachments: {
@@ -99,7 +146,11 @@ export declare class ExternalChat extends FavoritableEntity<ExternalChatDetail>
99
146
  url: string | undefined;
100
147
  }[];
101
148
  }[]>;
102
- /** Reload detail, permissions and caller capabilities. */
149
+ /**
150
+ * Reload detail, permissions and caller capabilities.
151
+ *
152
+ * @readonly
153
+ */
103
154
  refresh(): Promise<this>;
104
155
  private assertChat;
105
156
  }
@@ -22,7 +22,7 @@ export declare class ExternalChatMessage extends MacroEntity<ExternalChatMessage
22
22
  readonly editedAt: () => Promise<string | undefined>;
23
23
  /** Deleted for everyone. */
24
24
  readonly deleted: () => Promise<boolean>;
25
- /** Grouped emoji counts and caller's own reaction. */
25
+ /** Reactions by emoji: who reacted, and whether the caller did. */
26
26
  readonly reactions: () => Promise<import("../../../generated/storage").ExternalChatReaction[]>;
27
27
  /** Caller-owned send's delivery state, when present. */
28
28
  readonly deliveryState: () => Promise<NonNullable<import("../../../generated/storage").ExternalChatDeliveryState | null | undefined> | undefined>;
@@ -11,7 +11,11 @@ export declare class ExternalChatsNamespace {
11
11
  private readonly client;
12
12
  /** Bind external chat operations to this authenticated client. */
13
13
  constructor(client: MacroClient);
14
- /** Added chats the caller can view, including without a provider account of their own. */
14
+ /**
15
+ * Added chats the caller can view, including without a provider account of their own.
16
+ *
17
+ * @readonly
18
+ */
15
19
  list(): Promise<ExternalChat[]>;
16
20
  /** Reference an added chat without fetching it. */
17
21
  byId(id: string): ExternalChat;
@@ -21,12 +21,20 @@ export declare class ExternalChatSend extends MacroEntity<ExternalChatSendProgre
21
21
  readonly createdAt: () => Promise<string>;
22
22
  /** Chat message once the provider accepted the send. */
23
23
  readonly message: () => Promise<ExternalChatMessage | undefined>;
24
- /** Inspect the original intent for reconciliation; never resubmit an unknown outcome automatically. */
24
+ /**
25
+ * Inspect the original intent for reconciliation; never resubmit an unknown outcome automatically.
26
+ *
27
+ * @readonly
28
+ */
25
29
  request(): Promise<{
26
30
  idempotencyKey: string;
27
31
  message: ExternalChatContent;
28
32
  replyTo?: ExternalChatMessage;
29
33
  }>;
30
- /** Fetch current delivery state without retrying or submitting the message. */
34
+ /**
35
+ * Fetch current delivery state without retrying or submitting the message.
36
+ *
37
+ * @readonly
38
+ */
31
39
  refresh(): Promise<this>;
32
40
  }