@macro-inc/sdk 0.4.0 → 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 (193) hide show
  1. package/CALLS.md +82 -0
  2. package/README.md +176 -7
  3. package/dist/chunk-2IVGAIGQ.js +80 -0
  4. package/dist/{chunk-PTX2RV2N.js → chunk-3SW6QVDV.js} +33 -0
  5. package/dist/{chunk-XFA7NCJ5.js → chunk-GT5EUYOR.js} +13 -15
  6. package/dist/{chunk-ZLBDES7U.js → chunk-HIW6KU2I.js} +490 -4
  7. package/dist/{chunk-AZJUIUIV.js → chunk-J2VK3NOR.js} +56 -0
  8. package/dist/{chunk-PZPTJI6F.js → chunk-UVJLWLSJ.js} +41 -2
  9. package/dist/generated/agent-fold/index.d.ts +8 -6
  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 +17 -1
  13. package/dist/generated/agent-harness/types.gen.d.ts +188 -3
  14. package/dist/generated/auth/index.js +1 -1
  15. package/dist/generated/auth/sdk.gen.d.ts +13 -15
  16. package/dist/generated/auth/types.gen.d.ts +36 -17
  17. package/dist/generated/cognition/index.d.ts +1 -1
  18. package/dist/generated/cognition/index.js +1 -1
  19. package/dist/generated/cognition/sdk.gen.d.ts +38 -1
  20. package/dist/generated/cognition/types.gen.d.ts +473 -4
  21. package/dist/generated/connection/types.gen.d.ts +1 -1
  22. package/dist/generated/notification/index.d.ts +1 -1
  23. package/dist/generated/notification/types.gen.d.ts +36 -1
  24. package/dist/generated/scheduled-action/index.d.ts +1 -1
  25. package/dist/generated/scheduled-action/index.js +1 -1
  26. package/dist/generated/scheduled-action/sdk.gen.d.ts +17 -2
  27. package/dist/generated/scheduled-action/types.gen.d.ts +642 -104
  28. package/dist/generated/storage/index.d.ts +1 -1
  29. package/dist/generated/storage/index.js +1 -1
  30. package/dist/generated/storage/sdk.gen.d.ts +204 -5
  31. package/dist/generated/storage/types.gen.d.ts +3969 -374
  32. package/dist/src/calls/browser.d.ts +14 -0
  33. package/dist/src/calls/browser.js +102 -0
  34. package/dist/src/calls/common.d.ts +18 -0
  35. package/dist/src/calls/node.d.ts +24 -0
  36. package/dist/src/calls/node.js +145 -0
  37. package/dist/src/calls/telemetry.d.ts +5 -0
  38. package/dist/src/entities/account-managers/grant.d.ts +28 -5
  39. package/dist/src/entities/account-managers/namespace.d.ts +15 -3
  40. package/dist/src/entities/activity/entity.d.ts +7 -0
  41. package/dist/src/entities/activity/namespace.d.ts +58 -0
  42. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  43. package/dist/src/entities/agent-sessions/activity.d.ts +10 -2
  44. package/dist/src/entities/agent-sessions/agent-session.d.ts +193 -18
  45. package/dist/src/entities/agent-sessions/code-execution.d.ts +15 -3
  46. package/dist/src/entities/agent-sessions/conversation.d.ts +46 -9
  47. package/dist/src/entities/agent-sessions/namespace.d.ts +71 -16
  48. package/dist/src/entities/agent-sessions/origin.d.ts +1 -1
  49. package/dist/src/entities/agent-sessions/queued-action.d.ts +17 -3
  50. package/dist/src/entities/agent-sessions/review.d.ts +55 -4
  51. package/dist/src/entities/agent-sessions/tool-approval.d.ts +5 -1
  52. package/dist/src/entities/agents/agent.d.ts +98 -3
  53. package/dist/src/entities/agents/namespace.d.ts +52 -8
  54. package/dist/src/entities/ai/namespace.d.ts +9 -1
  55. package/dist/src/entities/api-keys/api-key.d.ts +6 -1
  56. package/dist/src/entities/api-keys/namespace.d.ts +15 -3
  57. package/dist/src/entities/bots/bot.d.ts +38 -6
  58. package/dist/src/entities/bots/namespace.d.ts +13 -1
  59. package/dist/src/entities/bots/token.d.ts +6 -1
  60. package/dist/src/entities/calendar/booking-link.d.ts +7 -1
  61. package/dist/src/entities/calendar/booking-namespace.d.ts +13 -0
  62. package/dist/src/entities/calendar/booking.d.ts +15 -0
  63. package/dist/src/entities/calendar/calendar.d.ts +7 -1
  64. package/dist/src/entities/calendar/event.d.ts +59 -9
  65. package/dist/src/entities/calendar/namespace.d.ts +88 -10
  66. package/dist/src/entities/calendar/replacement.d.ts +19 -3
  67. package/dist/src/entities/calls/call-record.d.ts +90 -14
  68. package/dist/src/entities/calls/connection.d.ts +7 -1
  69. package/dist/src/entities/calls/message.d.ts +27 -5
  70. package/dist/src/entities/calls/namespace.d.ts +15 -3
  71. package/dist/src/entities/canvases/canvas.d.ts +324 -0
  72. package/dist/src/entities/channels/access-request.d.ts +10 -2
  73. package/dist/src/entities/channels/activity.d.ts +20 -4
  74. package/dist/src/entities/channels/channel.d.ts +130 -23
  75. package/dist/src/entities/channels/labels.d.ts +41 -7
  76. package/dist/src/entities/channels/message.d.ts +41 -7
  77. package/dist/src/entities/channels/namespace.d.ts +28 -3
  78. package/dist/src/entities/channels/post.test.d.ts +1 -0
  79. package/dist/src/entities/channels/thread.d.ts +19 -3
  80. package/dist/src/entities/chats/chat.d.ts +56 -6
  81. package/dist/src/entities/chats/generation.d.ts +11 -2
  82. package/dist/src/entities/chats/namespace.d.ts +10 -2
  83. package/dist/src/entities/connected-apps/connected-app.d.ts +14 -1
  84. package/dist/src/entities/connected-apps/connector.d.ts +3 -0
  85. package/dist/src/entities/connected-apps/namespace.d.ts +16 -0
  86. package/dist/src/entities/crm/company.d.ts +63 -15
  87. package/dist/src/entities/crm/contact.d.ts +60 -13
  88. package/dist/src/entities/crm/namespace.d.ts +85 -11
  89. package/dist/src/entities/crm/pipeline-entry.d.ts +102 -0
  90. package/dist/src/entities/crm/pipeline.d.ts +271 -27
  91. package/dist/src/entities/crm/pipelines.d.ts +39 -2
  92. package/dist/src/entities/databases/column.d.ts +54 -7
  93. package/dist/src/entities/databases/database.d.ts +126 -12
  94. package/dist/src/entities/databases/namespace.d.ts +16 -4
  95. package/dist/src/entities/databases/row.d.ts +2 -0
  96. package/dist/src/entities/databases/saved-query.d.ts +145 -0
  97. package/dist/src/entities/databases/table.d.ts +64 -10
  98. package/dist/src/entities/databases/view.d.ts +27 -5
  99. package/dist/src/entities/databases/webhook.d.ts +8 -1
  100. package/dist/src/entities/documents/ai-edit.d.ts +2 -0
  101. package/dist/src/entities/documents/anchor.d.ts +12 -2
  102. package/dist/src/entities/documents/comment.d.ts +29 -5
  103. package/dist/src/entities/documents/document.d.ts +243 -20
  104. package/dist/src/entities/documents/markdown.d.ts +25 -0
  105. package/dist/src/entities/documents/namespace.d.ts +132 -13
  106. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  107. package/dist/src/entities/documents/system-skill.d.ts +21 -1
  108. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  109. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  110. package/dist/src/entities/documents/version.d.ts +5 -1
  111. package/dist/src/entities/email/attachment.d.ts +3 -0
  112. package/dist/src/entities/email/draft.d.ts +61 -9
  113. package/dist/src/entities/email/filter.d.ts +12 -2
  114. package/dist/src/entities/email/label.d.ts +7 -1
  115. package/dist/src/entities/email/link.d.ts +5 -1
  116. package/dist/src/entities/email/message.d.ts +55 -8
  117. package/dist/src/entities/email/namespace.d.ts +127 -21
  118. package/dist/src/entities/email/thread.d.ts +99 -16
  119. package/dist/src/entities/entity-mentions/mention.d.ts +6 -1
  120. package/dist/src/entities/entity-mentions/namespace.d.ts +5 -1
  121. package/dist/src/entities/entity.d.ts +56 -6
  122. package/dist/src/entities/external-chat/chat.d.ts +62 -11
  123. package/dist/src/entities/external-chat/message.d.ts +1 -1
  124. package/dist/src/entities/external-chat/namespace.d.ts +5 -1
  125. package/dist/src/entities/external-chat/send.d.ts +10 -2
  126. package/dist/src/entities/favorites/namespace.d.ts +20 -3
  127. package/dist/src/entities/foreign/foreign-entity.d.ts +5 -1
  128. package/dist/src/entities/foreign/namespace.d.ts +4 -0
  129. package/dist/src/entities/forms/form.d.ts +71 -13
  130. package/dist/src/entities/forms/namespace.d.ts +10 -2
  131. package/dist/src/entities/forms/question.d.ts +35 -7
  132. package/dist/src/entities/forms/response.d.ts +25 -5
  133. package/dist/src/entities/forms/section.d.ts +15 -3
  134. package/dist/src/entities/github-pull-requests/namespace.d.ts +5 -1
  135. package/dist/src/entities/github-pull-requests/pull-request.d.ts +15 -3
  136. package/dist/src/entities/harnesses/harness.d.ts +51 -3
  137. package/dist/src/entities/harnesses/namespace.d.ts +53 -7
  138. package/dist/src/entities/harnesses/pairing.d.ts +12 -2
  139. package/dist/src/entities/images/image.d.ts +16 -5
  140. package/dist/src/entities/images/namespace.d.ts +8 -1
  141. package/dist/src/entities/initiatives/initiative.d.ts +117 -3
  142. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  143. package/dist/src/entities/initiatives/namespace.d.ts +69 -7
  144. package/dist/src/entities/me/namespace.d.ts +27 -2
  145. package/dist/src/entities/meetings/meeting.d.ts +45 -8
  146. package/dist/src/entities/meetings/namespace.d.ts +20 -4
  147. package/dist/src/entities/memory/namespace.d.ts +49 -0
  148. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  149. package/dist/src/entities/messages/discussion.d.ts +84 -0
  150. package/dist/src/entities/messages/thread.d.ts +19 -5
  151. package/dist/src/entities/notifications/namespace.d.ts +40 -7
  152. package/dist/src/entities/notifications/notification.d.ts +29 -5
  153. package/dist/src/entities/pins/namespace.d.ts +23 -4
  154. package/dist/src/entities/projects/namespace.d.ts +29 -0
  155. package/dist/src/entities/projects/project.d.ts +47 -6
  156. package/dist/src/entities/properties/namespace.d.ts +67 -11
  157. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  158. package/dist/src/entities/properties/property-definition.d.ts +30 -5
  159. package/dist/src/entities/properties/property-option.d.ts +14 -2
  160. package/dist/src/entities/referrals/namespace.d.ts +8 -1
  161. package/dist/src/entities/routines/namespace.d.ts +128 -7
  162. package/dist/src/entities/routines/routine.d.ts +111 -25
  163. package/dist/src/entities/saved-views/namespace.d.ts +57 -0
  164. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  165. package/dist/src/entities/search/namespace.d.ts +5 -1
  166. package/dist/src/entities/sharing/access.d.ts +50 -9
  167. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  168. package/dist/src/entities/tasks/namespace.d.ts +13 -1
  169. package/dist/src/entities/tasks/task.d.ts +7 -1
  170. package/dist/src/entities/teams/invite.d.ts +3 -0
  171. package/dist/src/entities/teams/namespace.d.ts +10 -2
  172. package/dist/src/entities/teams/team.d.ts +7 -0
  173. package/dist/src/entities/unfurls/namespace.d.ts +12 -2
  174. package/dist/src/entities/users/namespace.d.ts +19 -1
  175. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  176. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  177. package/dist/src/entities/users/user.d.ts +52 -1
  178. package/dist/src/entities/web/namespace.d.ts +6 -0
  179. package/dist/src/entities/webhooks/namespace.d.ts +5 -0
  180. package/dist/src/entities/webhooks/webhook.d.ts +47 -7
  181. package/dist/src/entities/whatsapp/account.d.ts +5 -1
  182. package/dist/src/entities/whatsapp/chat.d.ts +9 -1
  183. package/dist/src/entities/whatsapp/namespace.d.ts +7 -1
  184. package/dist/src/entities/workspace/namespace.d.ts +7 -1
  185. package/dist/src/entities/workspace/query.d.ts +5 -1
  186. package/dist/src/events/hydrate/user.d.ts +14 -0
  187. package/dist/src/events/receiver.d.ts +2 -0
  188. package/dist/src/events/types.d.ts +2 -1
  189. package/dist/src/macro.d.ts +33 -5
  190. package/dist/src/macro.js +15635 -10132
  191. package/dist/src/utils/lazy.d.ts +7 -1
  192. package/package.json +32 -5
  193. package/dist/src/entities/crm/comment.d.ts +0 -64
@@ -1,5 +1,6 @@
1
1
  import type { AttendeeResponseStatus, CalendarAttendeeInputBody, CalendarDeletionScopeParam, CalendarEvent as CalendarEventRecord, CalendarGuestInputBody, CalendarRsvpScopeParam, CalendarUpdateScopeParam, ConferenceChange, EventReminders, EventTime, EventTransparency, EventVisibility, GuestPolicy, OutOfOfficeProperties } from '../../../generated/calendar/types.gen';
2
2
  import type { MacroClient } from '../../utils/client';
3
+ import type { Channel } from '../channels/channel';
3
4
  import { MacroEntity } from '../entity';
4
5
  import { Calendar } from './calendar';
5
6
  import { CalendarReplacement } from './replacement';
@@ -140,7 +141,10 @@ export declare class CalendarEvent extends MacroEntity<CalendarEventRecord> {
140
141
  /** The calendar the canonical source belongs to, when known. */
141
142
  readonly calendar: () => Promise<Calendar | undefined>;
142
143
  /** The full synced event record. Available on a seeded handle (from create /
143
- * update / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint). */
144
+ * update / rsvp); a bare `byId` handle throws (no fetch-by-id endpoint).
145
+ *
146
+ * @readonly
147
+ */
144
148
  record(): Promise<CalendarEventRecord>;
145
149
  /** Update the event and return a handle to its synced record.
146
150
  *
@@ -155,7 +159,12 @@ export declare class CalendarEvent extends MacroEntity<CalendarEventRecord> {
155
159
  * to a meeting the user organizes from one of the inboxes (add them from
156
160
  * that copy and say why). Reminders belong to one copy, so set them on one
157
161
  * copy and say which inbox you used. Without `inbox` the call is refused
158
- * with `copy_choice_required`, listing each copy and the question to ask. */
162
+ * with `copy_choice_required`, listing each copy and the question to ask.
163
+ *
164
+ * @destructive
165
+ * @openworld
166
+ * @idempotent
167
+ */
159
168
  update(options: UpdateEventOptions): Promise<CalendarEvent>;
160
169
  /** Delete the event (or a scoped part of a recurring series) at its provider.
161
170
  *
@@ -172,16 +181,28 @@ export declare class CalendarEvent extends MacroEntity<CalendarEventRecord> {
172
181
  * Deleting a copy where they are a guest takes the meeting off that inbox's
173
182
  * calendar: on Google it also declines the invitation and tells the
174
183
  * organizer, while on Outlook the organizer is not told and still sees the
175
- * invitation unanswered. */
184
+ * invitation unanswered.
185
+ *
186
+ * @destructive
187
+ * @openworld
188
+ * @idempotent
189
+ */
176
190
  delete(options?: DeleteEventOptions): Promise<void>;
177
191
  /** Preview an organizer replacement without cancelling or sending invitations.
178
- * Review replacement.status() before explicitly calling replacement.confirm(). */
192
+ * Review replacement.status() before explicitly calling replacement.confirm().
193
+ *
194
+ * @write
195
+ */
179
196
  prepareReplacement(options: {
180
197
  removeConference: boolean;
181
198
  recurrenceId?: string;
182
199
  calendar?: Calendar;
183
200
  }): Promise<CalendarReplacement>;
184
- /** Open this calendar copy in its provider for actions unavailable through its API. */
201
+ /**
202
+ * Open this calendar copy in its provider for actions unavailable through its API.
203
+ *
204
+ * @readonly
205
+ */
185
206
  providerUrl(options?: {
186
207
  recurrenceId?: string;
187
208
  calendar?: Calendar;
@@ -199,7 +220,12 @@ export declare class CalendarEvent extends MacroEntity<CalendarEventRecord> {
199
220
  *
200
221
  * The organizer may add guests, and so may a guest the organizer lets
201
222
  * invite others (see {@link CalendarEvent.viewerCan}); Google emails the
202
- * new guests. */
223
+ * new guests.
224
+ *
225
+ * @destructive
226
+ * @openworld
227
+ * @idempotent
228
+ */
203
229
  inviteGuests(options: InviteGuestsOptions): Promise<CalendarEvent>;
204
230
  /** Add a snapshot of an event shared with one of the requester's
205
231
  * channels to one of their Google calendars, and return a handle to the
@@ -210,15 +236,39 @@ export declare class CalendarEvent extends MacroEntity<CalendarEventRecord> {
210
236
  * their calendars, whichever calendar is named, so it cannot be added to
211
237
  * another of their calendars either; with `join_request_open` while their
212
238
  * request to join it is pending or accepted (the meeting then arrives as an
213
- * invitation); and with `copy_refused` when Google will not import it. */
239
+ * invitation); and with `copy_refused` when Google will not import it.
240
+ *
241
+ * @write
242
+ * @openworld
243
+ */
214
244
  addToCalendar(options?: {
215
245
  calendar?: Calendar;
216
246
  }): Promise<CalendarEvent>;
247
+ /** Share the event with a channel's current members, as posting it in the
248
+ * channel does: they can then preview it, export it with {@link ics}, add it
249
+ * to their calendar with {@link addToCalendar} and ask to join. The caller
250
+ * must be in the channel and hold the event on their own calendar; private
251
+ * and confidential events are refused with a 403. Sharing again changes
252
+ * nothing.
253
+ *
254
+ * @write
255
+ * @idempotent
256
+ */
257
+ shareWithChannel(channel: Channel): Promise<void>;
217
258
  /** The event as an iCalendar (`.ics`) document: its series, title,
218
259
  * description, location and organizer, never its guests or join link.
219
260
  * Available for the requester's own events and ones shared with a channel
220
- * they belong to. */
261
+ * they belong to.
262
+ *
263
+ * @readonly
264
+ */
221
265
  ics(): Promise<string>;
222
- /** Record the requester's RSVP and return a handle to the synced record. */
266
+ /**
267
+ * Record the requester's RSVP and return a handle to the synced record.
268
+ *
269
+ * @destructive
270
+ * @openworld
271
+ * @idempotent
272
+ */
223
273
  rsvp(options: RsvpEventOptions): Promise<CalendarEvent>;
224
274
  }
@@ -121,16 +121,29 @@ export type CalendarEventRole = 'organizer' | 'guest';
121
121
  */
122
122
  export declare class CalendarNamespace {
123
123
  private readonly client;
124
- /** Calendar availability settings, each referring to a typed calendar. */
124
+ /**
125
+ * Calendar availability settings, each referring to a typed calendar.
126
+ *
127
+ * @readonly
128
+ */
125
129
  availabilityCalendars(): Promise<{
126
130
  calendar: Calendar;
127
131
  name: string;
128
132
  isPrimary: boolean;
129
133
  contributesToAvailability: boolean;
130
134
  }[]>;
131
- /** Current sharing preference for the team calendar. */
135
+ /**
136
+ * Current sharing preference for the team calendar.
137
+ *
138
+ * @readonly
139
+ */
132
140
  teamSharing(): Promise<TeamCalendarSharing>;
133
- /** Replace the team calendar sharing preference. */
141
+ /**
142
+ * Replace the team calendar sharing preference.
143
+ *
144
+ * @write
145
+ * @idempotent
146
+ */
134
147
  setTeamSharing(sharing: TeamCalendarSharing): Promise<TeamCalendarSharing>;
135
148
  /** Occurrences on every calendar the user can see: their schedule is only
136
149
  * `contributesToAvailability` rows and meetings they attend; call the rest
@@ -164,7 +177,10 @@ export declare class CalendarNamespace {
164
177
  * `inbox` to its `update`, `inviteGuests` or `delete`; without it the call
165
178
  * is refused with `copy_choice_required`, which names each copy's inbox and
166
179
  * event and gives the question to ask. An occurrence whose calendar is no
167
- * longer listed has no `inbox`; take it from that refusal. */
180
+ * longer listed has no `inbox`; take it from that refusal.
181
+ *
182
+ * @readonly
183
+ */
168
184
  occurrences(options: Omit<ListOccurrencesData['query'], 'cursor'>): AsyncGenerator<{
169
185
  event: CalendarEvent;
170
186
  occurrence: import("../../../generated/storage").CalendarOccurrence;
@@ -173,7 +189,11 @@ export declare class CalendarNamespace {
173
189
  inbox: string | undefined;
174
190
  role: CalendarEventRole | undefined;
175
191
  }, any, any>;
176
- /** A page of team availability, including its roster and continuation cursor. */
192
+ /**
193
+ * A page of team availability, including its roster and continuation cursor.
194
+ *
195
+ * @readonly
196
+ */
177
197
  teamPage(options: NonNullable<ListTeamCalendarData['query']>): Promise<{
178
198
  items: ({
179
199
  owner: User;
@@ -196,7 +216,11 @@ export declare class CalendarNamespace {
196
216
  }[];
197
217
  nextCursor: string | undefined;
198
218
  }>;
199
- /** Teammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation. */
219
+ /**
220
+ * Teammates' out-of-office occurrences in a bounded viewport. Check hasMore for truncation.
221
+ *
222
+ * @readonly
223
+ */
200
224
  teamOutOfOffice(options: NonNullable<ListTeamOutOfOfficeData['query']>): Promise<{
201
225
  items: {
202
226
  event: CalendarEvent;
@@ -210,18 +234,69 @@ export declare class CalendarNamespace {
210
234
  /** Booking links, their settings, booked meetings and booking statistics. */
211
235
  readonly booking: BookingNamespace;
212
236
  constructor(client: MacroClient);
213
- /** The calendars the caller can see, some possibly not theirs, primaries and writable first. */
237
+ /**
238
+ * When the user and their teammates are busy in a bounded UTC window (a day
239
+ * or a week is best, at most 370 days); `freeWindows` is present only when
240
+ * every person's data is complete, so never infer free time from missing
241
+ * busy blocks. Always includes the user; omit `members` for the whole team,
242
+ * or pass `[]` for only the user. Busy blocks carry no event titles, and
243
+ * working hours are not applied.
244
+ *
245
+ * @readonly
246
+ */
247
+ teamAvailability(opts: {
248
+ /** Inclusive start, RFC 3339 UTC. */
249
+ start: string;
250
+ /** Exclusive end, RFC 3339 UTC; later than `start`. */
251
+ end: string;
252
+ /** At most 100 current teammates. */
253
+ members?: User[];
254
+ }): Promise<{
255
+ start: string;
256
+ end: string;
257
+ members: {
258
+ user: User;
259
+ busy: Array<import("../../../generated/storage").AvailabilityInterval>;
260
+ coverage: import("../../../generated/storage").AvailabilityCoverage;
261
+ unknownReasons: Array<import("../../../generated/storage").AvailabilityUnknownReason>;
262
+ }[];
263
+ freeWindows: import("../../../generated/storage").AvailabilityInterval[] | undefined;
264
+ /** Requested people who are not current teammates; nothing about them is disclosed. */
265
+ unknownUsers: User[];
266
+ complete: boolean;
267
+ summary: string;
268
+ }>;
269
+ /**
270
+ * The calendars the caller can see, some possibly not theirs, primaries and writable first.
271
+ *
272
+ * @readonly
273
+ */
214
274
  calendars(): Promise<Calendar[]>;
215
- /** A handle to a calendar by id. Detail loads on first access. */
275
+ /**
276
+ * A handle to a calendar by id. Detail loads on first access.
277
+ *
278
+ * @readonly
279
+ */
216
280
  calendar(id: string): Calendar;
217
- /** A handle to a calendar event by id, for driving mutations. */
281
+ /**
282
+ * A handle to a calendar event by id, for driving mutations.
283
+ *
284
+ * @readonly
285
+ */
218
286
  event(id: string): CalendarEvent;
219
- /** Recover a saved replacement, including after its original event was retired. */
287
+ /**
288
+ * Recover a saved replacement, including after its original event was retired.
289
+ *
290
+ * @readonly
291
+ */
220
292
  replacement(operationId: string): CalendarReplacement;
221
293
  /**
222
294
  * Create a calendar event and return a handle to its synced record; an
223
295
  * agent's program is refused (403) and creates through a review or
224
296
  * {@link createConfirmed} instead.
297
+ *
298
+ * @destructive
299
+ * @openworld
225
300
  */
226
301
  createEvent(options: CreateEventOptions): Promise<CalendarEvent>;
227
302
  /**
@@ -236,6 +311,9 @@ export declare class CalendarNamespace {
236
311
  * out-of-office and guest policy, and the calendar to write to. The event
237
312
  * is written to the provider at once and guests receive invitations; on an
238
313
  * error, look for the event before creating it again.
314
+ *
315
+ * @destructive
316
+ * @openworld
239
317
  */
240
318
  createConfirmed(options: ConfirmedEventOptions): Promise<CalendarEvent>;
241
319
  }
@@ -5,11 +5,27 @@ export declare class CalendarReplacement {
5
5
  private readonly client;
6
6
  readonly id: string;
7
7
  constructor(client: MacroClient, id: string);
8
- /** Read progress without initiating provider writes. */
8
+ /** A handle to a replacement by its operation id. */
9
+ static byId(client: MacroClient, id: string): CalendarReplacement;
10
+ /**
11
+ * Read progress without initiating provider writes.
12
+ *
13
+ * @readonly
14
+ */
9
15
  status(): Promise<CalendarReplacementView>;
10
16
  /** Confirm the reviewed cancellation and reinvitation, or resume that same operation.
11
- * Present the preview and obtain the organizer's confirmation before the first call. */
17
+ * Present the preview and obtain the organizer's confirmation before the first call.
18
+ *
19
+ * @destructive
20
+ * @openworld
21
+ * @idempotent
22
+ */
12
23
  confirm(): Promise<CalendarReplacementView>;
13
- /** Discard an unconfirmed preview. Confirmed operations must be recovered, not discarded. */
24
+ /**
25
+ * Discard an unconfirmed preview. Confirmed operations must be recovered, not discarded.
26
+ *
27
+ * @destructive
28
+ * @idempotent
29
+ */
14
30
  discard(): Promise<void>;
15
31
  }
@@ -6,6 +6,7 @@ import { FavoritableEntity } from '../entity';
6
6
  import { Meeting } from '../meetings/meeting';
7
7
  import { MessageThread, type TimelineOptions } from '../messages/thread';
8
8
  import { EntityAccess } from '../sharing/access';
9
+ import { type SharePermissionOptions } from '../sharing/permissions';
9
10
  import { User } from '../users/user';
10
11
  import { CallConnection, type JoinOptions } from './connection';
11
12
  import { CallMessage } from './message';
@@ -18,23 +19,53 @@ export declare class CallRecord extends FavoritableEntity<CallRecordDetail> {
18
19
  private constructor();
19
20
  /** Build a live call handle without fetching its archived detail. */
20
21
  static fromLive(client: MacroClient, summary: LiveCallSummary): CallRecord;
21
- /** Join only while this call is live; never start a replacement call. */
22
+ /**
23
+ * Join only while this call is live; never start a replacement call.
24
+ *
25
+ * @write
26
+ * @mcp-exclude Returns a live call room credential; MCP calls carry JSON only.
27
+ */
22
28
  join(opts?: JoinOptions): Promise<CallConnection>;
23
- /** Read the current ring state for this account. */
29
+ /**
30
+ * Read the current ring state for this account.
31
+ *
32
+ * @readonly
33
+ */
24
34
  ringState(): Promise<RingStatus>;
25
- /** Read the connected room roster without joining. */
35
+ /**
36
+ * Read the connected room roster without joining.
37
+ *
38
+ * @readonly
39
+ */
26
40
  participants(): Promise<CallParticipant[]>;
27
- /** Decline this call's ring for the current account. */
41
+ /**
42
+ * Decline this call's ring for the current account.
43
+ *
44
+ * @write
45
+ * @idempotent
46
+ */
28
47
  decline(): Promise<void>;
29
- /** Read the persistent discussion, which may be a channel thread. */
48
+ /**
49
+ * Read the persistent discussion, which may be a channel thread.
50
+ *
51
+ * @readonly
52
+ */
30
53
  discussion(): Promise<MessageThread | Thread>;
31
54
  /** Download recording bytes through the Macro host. */
32
55
  readonly recording: {
33
56
  bytes: () => Promise<Uint8Array>;
34
57
  };
35
- /** A shared message thread scoped to this resource. */
58
+ /**
59
+ * A shared message thread scoped to this resource.
60
+ *
61
+ * @readonly
62
+ */
36
63
  messageThreadById(id: string): MessageThread;
37
- /** A mixed message and activity timeline page. */
64
+ /**
65
+ * A mixed message and activity timeline page.
66
+ *
67
+ * @readonly
68
+ */
38
69
  timelinePage(selection?: TimelineOptions<CallMessage>): Promise<{
39
70
  entries: ({
40
71
  type: "activity";
@@ -57,16 +88,34 @@ export declare class CallRecord extends FavoritableEntity<CallRecordDetail> {
57
88
  }>;
58
89
  /** Access requests and direct user grants. */
59
90
  readonly access: EntityAccess;
60
- /** Get or create a shareable meeting for this call. */
91
+ /**
92
+ * Get or create a shareable meeting for this call.
93
+ *
94
+ * @write
95
+ * @idempotent
96
+ */
61
97
  meeting(): Promise<Meeting>;
62
- /** Update custom speaker assignments in the transcript. */
98
+ /**
99
+ * Update custom speaker assignments in the transcript.
100
+ *
101
+ * @write
102
+ * @idempotent
103
+ */
63
104
  editTranscript(assignments: EditCallTranscriptRequest['assignments']): Promise<void>;
64
- /** Toggle the server's share-with-team setting and return its new value. */
105
+ /**
106
+ * Toggle the server's share-with-team setting and return its new value.
107
+ *
108
+ * @write
109
+ */
65
110
  toggleTeamShare(): Promise<boolean>;
66
111
  /** Favorites identify call records as `call`. */
67
112
  readonly entityType = "call";
68
113
  protected fetch(): Promise<CallRecordDetail>;
69
- /** The call's URL in the Macro web app; hand it to users as the link. */
114
+ /**
115
+ * The call's URL in the Macro web app; hand it to users as the link.
116
+ *
117
+ * @readonly
118
+ */
70
119
  webUrl(): string;
71
120
  /** Identity, loaded detail and {@link webUrl}, so serialized handles carry their link. */
72
121
  toJSON(): {
@@ -76,7 +125,11 @@ export declare class CallRecord extends FavoritableEntity<CallRecordDetail> {
76
125
  };
77
126
  /** A handle to a call record by id. Details load on first access. */
78
127
  static byId(client: MacroClient, id: string): CallRecord;
79
- /** A message in this call's persistent chat. Fields load on first access. */
128
+ /**
129
+ * A message in this call's persistent chat. Fields load on first access.
130
+ *
131
+ * @readonly
132
+ */
80
133
  message(id: string): CallMessage;
81
134
  /** The call's display name (user-supplied or AI-generated; unset while active). */
82
135
  readonly name: () => Promise<string | undefined>;
@@ -124,16 +177,39 @@ export declare class CallRecord extends FavoritableEntity<CallRecordDetail> {
124
177
  readonly recordingPreviewUrl: () => Promise<string | undefined>;
125
178
  /** When the recording started, if it was recorded. */
126
179
  readonly recordingStartedAt: () => Promise<string | undefined>;
127
- /** Rename the call or clear the custom name. */
180
+ /**
181
+ * Rename the call or clear the custom name.
182
+ *
183
+ * @write
184
+ * @idempotent
185
+ */
128
186
  rename(name: string | null): Promise<void>;
129
187
  /**
130
188
  * Share the call with the creator's team (view access), or unshare it.
131
189
  * While the call is live this sets the pending toggle any participant with
132
190
  * edit access may change; once archived only the call's creator may change
133
191
  * it and the API answers 403 otherwise.
192
+ *
193
+ * @write
194
+ * @idempotent
134
195
  */
135
196
  setTeamShare(shared: boolean): Promise<void>;
136
- /** Delete the call record. */
197
+ /**
198
+ * Change who can open the call: the link share and its access level, and
199
+ * channel grants. Omitted fields are left as they are; requires edit access
200
+ * (channel membership). `teamShareAccessLevel` only accepts `view` or `null`,
201
+ * and once the call is archived only its creator may change it.
202
+ *
203
+ * @write
204
+ * @idempotent
205
+ */
206
+ updateSharePermissions(options: SharePermissionOptions): Promise<void>;
207
+ /**
208
+ * Delete the call record.
209
+ *
210
+ * @destructive
211
+ * @idempotent
212
+ */
137
213
  delete(): Promise<void>;
138
214
  /** Search calls by name and transcript, most relevant first, auto-paginated. */
139
215
  static search: (client: MacroClient, query: string, searchOpts?: import("../search/options").SearchOpts) => AsyncGenerator<CallRecord, any, any>;
@@ -21,7 +21,13 @@ export declare class CallConnection {
21
21
  readonly started: boolean;
22
22
  /** Construct a connection from the server's admission response. */
23
23
  constructor(client: MacroClient, response: CallTokenResponse);
24
- /** Leave this exact call; safe to invoke after another call has started. */
24
+ /**
25
+ * Leave this exact call; safe to invoke after another call has started.
26
+ *
27
+ * @write
28
+ * @idempotent
29
+ * @mcp-exclude Acts on a live call connection, which only a join returns.
30
+ */
25
31
  leave(): Promise<{
26
32
  callEnded: boolean;
27
33
  }>;
@@ -20,14 +20,36 @@ export declare class CallMessage extends MacroEntity<MessageRecord> {
20
20
  readonly createdAt: () => Promise<string>;
21
21
  /** When the message was last updated. */
22
22
  readonly updatedAt: () => Promise<string>;
23
- /** The call whose chat contains this message. */
23
+ /**
24
+ * The call whose chat contains this message.
25
+ *
26
+ * @readonly
27
+ */
24
28
  call(): CallRecord;
25
- /** The user who sent this message. */
29
+ /**
30
+ * The user who sent this message.
31
+ *
32
+ * @readonly
33
+ */
26
34
  author(): Promise<User>;
27
- /** Reply in the call's canonical thread, including when this is a reply. */
35
+ /**
36
+ * Reply in the call's canonical thread, including when this is a reply.
37
+ *
38
+ * @write
39
+ */
28
40
  reply(body: string | RichMessage): Promise<CallMessage>;
29
- /** Replace this message's body. */
41
+ /**
42
+ * Replace this message's body.
43
+ *
44
+ * @destructive
45
+ * @idempotent
46
+ */
30
47
  edit(body: string | RichMessage): Promise<this>;
31
- /** Delete this message, preserving the rest of the call's chat. */
48
+ /**
49
+ * Delete this message, preserving the rest of the call's chat.
50
+ *
51
+ * @destructive
52
+ * @idempotent
53
+ */
32
54
  delete(): Promise<void>;
33
55
  }
@@ -20,10 +20,22 @@ export declare class CallRecordNamespace {
20
20
  constructor(client: MacroClient);
21
21
  /** Get a lazy call handle; joining it never creates a call. */
22
22
  byId(id: string): CallRecord;
23
- /** Search archived calls by name and transcript, not the live room roster. */
23
+ /**
24
+ * Search archived calls by name and transcript, not the live room roster.
25
+ *
26
+ * @readonly
27
+ */
24
28
  search(query: string, opts?: SearchOpts): AsyncGenerator<CallRecord>;
25
- /** List joinable live calls; use after an event stream reconnects. */
29
+ /**
30
+ * List joinable live calls; use after an event stream reconnects.
31
+ *
32
+ * @readonly
33
+ */
26
34
  active(): Promise<CallRecord[]>;
27
- /** Preview these calls in input order; missing records are omitted. */
35
+ /**
36
+ * Preview these calls in input order; missing records are omitted.
37
+ *
38
+ * @readonly
39
+ */
28
40
  summaries(calls: CallRecord[]): Promise<CallSummary[]>;
29
41
  }