@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
@@ -13,26 +13,38 @@ export declare class BotsNamespace {
13
13
  constructor(client: MacroClient);
14
14
  /** A handle to a bot by id. */
15
15
  byId(id: string): Bot;
16
- /** The bots the user can manage: their own and their teams'. */
16
+ /**
17
+ * The bots the user can manage: their own and their teams'.
18
+ *
19
+ * @readonly
20
+ */
17
21
  list(): Promise<Bot[]>;
18
22
  /**
19
23
  * Create a bot. It can post nowhere until `bot.grantChannel(channel)`; then
20
24
  * `bot.webhooks()` and `bot.createToken()` give an integration what it needs.
25
+ *
26
+ * @write
21
27
  */
22
28
  create(options: CreateBotOptions): Promise<Bot>;
23
29
  /**
24
30
  * The authenticated bot's own record. Requires bot auth; with a user API
25
31
  * key this throws (a user token has no bot identity).
32
+ *
33
+ * @readonly
26
34
  */
27
35
  me(): Promise<BotRecord>;
28
36
  /**
29
37
  * Channels containing the authenticated bot. Requires bot auth.
38
+ *
39
+ * @readonly
30
40
  */
31
41
  channels(): Promise<BotChannel[]>;
32
42
  /**
33
43
  * The authenticated bot's canonical principal id (`bot|<uuid>`) — the form
34
44
  * used for bot mentions, senders, and webhook `ids` filters. Cached on the
35
45
  * client; see {@link MacroClient.myPrincipalId}.
46
+ *
47
+ * @readonly
36
48
  */
37
49
  myPrincipalId(): Promise<string>;
38
50
  }
@@ -24,7 +24,12 @@ export declare class BotToken extends MacroEntity<BotTokenRecord> {
24
24
  readonly revokedAt: () => Promise<string | undefined>;
25
25
  /** Creation time. */
26
26
  readonly createdAt: () => Promise<string>;
27
- /** Revoke the token; requests using it fail from now on. */
27
+ /**
28
+ * Revoke the token; requests using it fail from now on.
29
+ *
30
+ * @destructive
31
+ * @idempotent
32
+ */
28
33
  revoke(): Promise<void>;
29
34
  toJSON(): {
30
35
  id: string;
@@ -21,7 +21,11 @@ export declare class BookingLink extends MacroEntity<BookingLinkRecord> {
21
21
  readonly draft: () => Promise<BookingLinkDraft>;
22
22
  /** The profile revision this link was read at; {@link edit} saves against it. */
23
23
  readonly revision: () => Promise<number>;
24
- /** The shareable URL guests book through. */
24
+ /**
25
+ * The shareable URL guests book through.
26
+ *
27
+ * @readonly
28
+ */
25
29
  webUrl(): Promise<string>;
26
30
  /**
27
31
  * Replace this link's whole configuration, only after the user replied
@@ -32,6 +36,8 @@ export declare class BookingLink extends MacroEntity<BookingLinkRecord> {
32
36
  * against {@link revision}; when someone saved in between it is refused
33
37
  * (409): read the link again and confirm the updated proposal instead of
34
38
  * overwriting their change. Returns the saved link.
39
+ *
40
+ * @write
35
41
  */
36
42
  edit(draft: BookingLinkDraft, options: {
37
43
  userConfirmation: string;
@@ -58,6 +58,8 @@ export declare class BookingNamespace {
58
58
  *
59
59
  * `query` matches link title, slug and description; omit it for every link
60
60
  * (at most 100).
61
+ *
62
+ * @readonly
61
63
  */
62
64
  links(options?: BookingScope & {
63
65
  query?: string;
@@ -83,6 +85,9 @@ export declare class BookingNamespace {
83
85
  * Replaying an identical draft at the same slug returns the saved link; a
84
86
  * different draft at that slug conflicts (409). Share the link's
85
87
  * {@link BookingLink.webUrl} as an `<m-booking-link-mention>` chip.
88
+ *
89
+ * @write
90
+ * @idempotent
86
91
  */
87
92
  createLink(draft: BookingLinkDraft, options: BookingScope & {
88
93
  userConfirmation: string;
@@ -91,6 +96,8 @@ export declare class BookingNamespace {
91
96
  * Read every booking setting of the user (or a team): booking-page name and
92
97
  * introduction, reusable schedules, default hours and every link. Reading
93
98
  * never creates settings.
99
+ *
100
+ * @readonly
94
101
  */
95
102
  settings(options?: BookingScope): Promise<BookingSettings>;
96
103
  /**
@@ -104,6 +111,8 @@ export declare class BookingNamespace {
104
111
  * hosting, so name the affected links before changing them. Deleting a link
105
112
  * cancels none of its bookings. Saving at a stale revision is refused (409):
106
113
  * read again and reconcile instead of overwriting.
114
+ *
115
+ * @destructive
107
116
  */
108
117
  saveSettings(profile: BookingProfile, options?: BookingScope): Promise<BookingSettings>;
109
118
  /**
@@ -112,6 +121,8 @@ export declare class BookingNamespace {
112
121
  * guests, answers, attendance and reschedule history. An oversized result
113
122
  * fails rather than truncating: narrow the range. Use {@link insights} for
114
123
  * statistics.
124
+ *
125
+ * @readonly
115
126
  */
116
127
  bookings(options: BookingScope & {
117
128
  from: string;
@@ -125,6 +136,8 @@ export declare class BookingNamespace {
125
136
  * Failed and processing requests are excluded. Completed means confirmed
126
137
  * and ended without a recorded no-show, not verified attendance; minutes
127
138
  * are scheduled duration, not call length. No guest contact details.
139
+ *
140
+ * @readonly
128
141
  */
129
142
  insights(query: BookingInsightsQuery): Promise<BookingInsights>;
130
143
  }
@@ -49,28 +49,43 @@ export declare class Booking extends MacroEntity<BookingRecord> {
49
49
  * Available replacement starts on one date (`YYYY-MM-DD`, in the booking
50
50
  * schedule's time zone), for {@link reschedule}. Availability is checked
51
51
  * again when the meeting moves.
52
+ *
53
+ * @readonly
52
54
  */
53
55
  rescheduleSlots(date: string): Promise<BookingSlot[]>;
54
56
  /**
55
57
  * Move the meeting to a start returned by {@link rescheduleSlots}; only on
56
58
  * the user's go-ahead, since the guest and hosts are notified. Returns the
57
59
  * saved booking.
60
+ *
61
+ * @destructive
62
+ * @openworld
58
63
  */
59
64
  reschedule(startsAt: string): Promise<Booking>;
60
65
  /**
61
66
  * Cancel the meeting; only on the user's go-ahead, since the guest and
62
67
  * hosts are notified. The booking link stays as it is. Returns the saved
63
68
  * booking.
69
+ *
70
+ * @destructive
71
+ * @openworld
72
+ * @idempotent
64
73
  */
65
74
  cancel(): Promise<Booking>;
66
75
  /**
67
76
  * Approve a legacy pending booking and send its invitations; only on the
68
77
  * user's go-ahead. Returns the saved booking.
78
+ *
79
+ * @destructive
80
+ * @openworld
69
81
  */
70
82
  approve(): Promise<Booking>;
71
83
  /**
72
84
  * Record or clear attendance once a confirmed meeting has ended. Returns
73
85
  * the saved booking.
86
+ *
87
+ * @write
88
+ * @idempotent
74
89
  */
75
90
  setAttendance(attendance: BookingAttendance): Promise<Booking>;
76
91
  private change;
@@ -9,7 +9,13 @@ import { MacroEntity } from '../entity';
9
9
  * handle loads its detail by listing the caller's calendars and matching on id.
10
10
  */
11
11
  export declare class Calendar extends MacroEntity<VisibleCalendar> {
12
- /** Set whether this calendar contributes to the caller's availability. */
12
+ /**
13
+ * Set whether this calendar contributes to the caller's availability.
14
+ *
15
+ * @write
16
+ * @openworld
17
+ * @idempotent
18
+ */
13
19
  setContributesToAvailability(contributesToAvailability: boolean): Promise<void>;
14
20
  protected fetch(): Promise<VisibleCalendar>;
15
21
  /** A handle to a calendar by id. Detail loads on first access. */
@@ -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
  }>;