@macro-inc/sdk 0.2.2 → 0.4.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 (175) hide show
  1. package/README.md +177 -3
  2. package/dist/{chunk-OGE7WXJE.js → chunk-AZJUIUIV.js} +177 -23
  3. package/dist/{chunk-PRUFPW3B.js → chunk-G43PLP2U.js} +144 -0
  4. package/dist/{chunk-7LVVPVNT.js → chunk-K4G5VO4P.js} +76 -1
  5. package/dist/{chunk-PAAFJYGO.js → chunk-PPR7IWZ7.js} +77 -51
  6. package/dist/{chunk-QVBNNMQS.js → chunk-PTX2RV2N.js} +169 -20
  7. package/dist/{chunk-SUINKDXF.js → chunk-PZPTJI6F.js} +42 -0
  8. package/dist/{chunk-7YJ6Y7HJ.js → chunk-XFA7NCJ5.js} +207 -0
  9. package/dist/{chunk-ZQXOHNDB.js → chunk-ZLBDES7U.js} +789 -12
  10. package/dist/generated/agent-fold/index.d.ts +4332 -0
  11. package/dist/generated/agent-fold/index.js +0 -0
  12. package/dist/generated/agent-harness/index.d.ts +1 -1
  13. package/dist/generated/agent-harness/index.js +1 -1
  14. package/dist/generated/agent-harness/sdk.gen.d.ts +83 -9
  15. package/dist/generated/agent-harness/types.gen.d.ts +1504 -160
  16. package/dist/generated/agent-reviews/index.d.ts +893 -0
  17. package/dist/generated/agent-reviews/index.js +0 -0
  18. package/dist/generated/auth/index.d.ts +1 -1
  19. package/dist/generated/auth/index.js +1 -1
  20. package/dist/generated/auth/sdk.gen.d.ts +108 -2
  21. package/dist/generated/auth/types.gen.d.ts +799 -6
  22. package/dist/generated/calendar/index.d.ts +1 -1
  23. package/dist/generated/calendar/index.js +1 -1
  24. package/dist/generated/calendar/sdk.gen.d.ts +63 -1
  25. package/dist/generated/calendar/types.gen.d.ts +1234 -5
  26. package/dist/generated/cognition/index.d.ts +1 -1
  27. package/dist/generated/cognition/index.js +1 -1
  28. package/dist/generated/cognition/sdk.gen.d.ts +85 -20
  29. package/dist/generated/cognition/types.gen.d.ts +1040 -121
  30. package/dist/generated/connection/index.d.ts +1 -1
  31. package/dist/generated/connection/index.js +15 -0
  32. package/dist/generated/connection/sdk.gen.d.ts +6 -1
  33. package/dist/generated/connection/types.gen.d.ts +18 -1
  34. package/dist/generated/email/index.d.ts +1 -1
  35. package/dist/generated/email/index.js +1 -1
  36. package/dist/generated/email/sdk.gen.d.ts +44 -2
  37. package/dist/generated/email/types.gen.d.ts +475 -10
  38. package/dist/generated/notification/index.d.ts +1 -1
  39. package/dist/generated/notification/index.js +1 -1
  40. package/dist/generated/notification/sdk.gen.d.ts +29 -21
  41. package/dist/generated/notification/types.gen.d.ts +267 -73
  42. package/dist/generated/properties/index.d.ts +1 -1
  43. package/dist/generated/properties/types.gen.d.ts +21 -1
  44. package/dist/generated/scheduled-action/index.d.ts +1 -1
  45. package/dist/generated/scheduled-action/index.js +1 -1
  46. package/dist/generated/scheduled-action/sdk.gen.d.ts +8 -1
  47. package/dist/generated/scheduled-action/types.gen.d.ts +669 -19
  48. package/dist/generated/search/index.d.ts +1 -1
  49. package/dist/generated/search/types.gen.d.ts +87 -7
  50. package/dist/generated/static-files/types.gen.d.ts +6 -0
  51. package/dist/generated/storage/index.d.ts +1 -1
  52. package/dist/generated/storage/index.js +1 -1
  53. package/dist/generated/storage/sdk.gen.d.ts +376 -13
  54. package/dist/generated/storage/types.gen.d.ts +12038 -5562
  55. package/dist/src/entities/account-managers/grant.d.ts +39 -0
  56. package/dist/src/entities/account-managers/namespace.d.ts +17 -0
  57. package/dist/src/entities/agent-sessions/activity.d.ts +39 -0
  58. package/dist/src/entities/agent-sessions/agent-session.d.ts +148 -6
  59. package/dist/src/entities/agent-sessions/code-execution.d.ts +5 -0
  60. package/dist/src/entities/agent-sessions/namespace.d.ts +54 -4
  61. package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
  62. package/dist/src/entities/agent-sessions/review.d.ts +18 -62
  63. package/dist/src/entities/agent-sessions/view.d.ts +11 -0
  64. package/dist/src/entities/agents/namespace.d.ts +11 -2
  65. package/dist/src/entities/ai/namespace.d.ts +5 -1
  66. package/dist/src/entities/api-keys/namespace.d.ts +5 -1
  67. package/dist/src/entities/bots/bot.d.ts +108 -0
  68. package/dist/src/entities/bots/namespace.d.ts +17 -4
  69. package/dist/src/entities/bots/token.d.ts +34 -0
  70. package/dist/src/entities/calendar/booking-link.d.ts +49 -0
  71. package/dist/src/entities/calendar/booking-namespace.d.ts +130 -0
  72. package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
  73. package/dist/src/entities/calendar/booking.d.ts +77 -0
  74. package/dist/src/entities/calendar/calendar.d.ts +11 -4
  75. package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
  76. package/dist/src/entities/calendar/event.d.ts +104 -3
  77. package/dist/src/entities/calendar/namespace.d.ts +151 -7
  78. package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
  79. package/dist/src/entities/calls/call-record.d.ts +34 -4
  80. package/dist/src/entities/calls/connection.d.ts +53 -0
  81. package/dist/src/entities/calls/errors.d.ts +15 -0
  82. package/dist/src/entities/calls/namespace.d.ts +21 -1
  83. package/dist/src/entities/calls/participant.d.ts +22 -0
  84. package/dist/src/entities/channels/access-request.d.ts +34 -0
  85. package/dist/src/entities/channels/channel.d.ts +47 -1
  86. package/dist/src/entities/channels/namespace.d.ts +21 -5
  87. package/dist/src/entities/channels/namespace.test.d.ts +1 -0
  88. package/dist/src/entities/channels/post.d.ts +14 -3
  89. package/dist/src/entities/channels/thread.d.ts +10 -1
  90. package/dist/src/entities/chats/chat.d.ts +7 -1
  91. package/dist/src/entities/chats/namespace.d.ts +14 -1
  92. package/dist/src/entities/connected-apps/connected-app.d.ts +107 -0
  93. package/dist/src/entities/connected-apps/connector.d.ts +56 -0
  94. package/dist/src/entities/connected-apps/namespace.d.ts +74 -0
  95. package/dist/src/entities/crm/company.d.ts +7 -3
  96. package/dist/src/entities/crm/contact.d.ts +4 -4
  97. package/dist/src/entities/crm/namespace.d.ts +34 -1
  98. package/dist/src/entities/crm/pipeline.d.ts +43 -2
  99. package/dist/src/entities/databases/database.d.ts +17 -0
  100. package/dist/src/entities/databases/namespace.d.ts +56 -0
  101. package/dist/src/entities/documents/ai-edit.d.ts +52 -0
  102. package/dist/src/entities/documents/document.d.ts +244 -5
  103. package/dist/src/entities/documents/namespace.d.ts +89 -4
  104. package/dist/src/entities/documents/office-files.d.ts +47 -0
  105. package/dist/src/entities/email/draft.d.ts +36 -7
  106. package/dist/src/entities/email/message.d.ts +99 -3
  107. package/dist/src/entities/email/namespace.d.ts +47 -4
  108. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  109. package/dist/src/entities/email/thread.d.ts +55 -3
  110. package/dist/src/entities/entity-mentions/namespace.d.ts +5 -1
  111. package/dist/src/entities/external-chat/chat.d.ts +105 -0
  112. package/dist/src/entities/external-chat/message.d.ts +54 -0
  113. package/dist/src/entities/external-chat/namespace.d.ts +18 -0
  114. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  115. package/dist/src/entities/external-chat/send.d.ts +32 -0
  116. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  117. package/dist/src/entities/favorites/namespace.d.ts +5 -1
  118. package/dist/src/entities/foreign/namespace.d.ts +3 -0
  119. package/dist/src/entities/forms/form.d.ts +17 -2
  120. package/dist/src/entities/forms/namespace.d.ts +5 -1
  121. package/dist/src/entities/github-pull-requests/namespace.d.ts +5 -1
  122. package/dist/src/entities/harnesses/harness.d.ts +9 -0
  123. package/dist/src/entities/harnesses/namespace.d.ts +5 -1
  124. package/dist/src/entities/images/image.d.ts +77 -0
  125. package/dist/src/entities/images/namespace.d.ts +48 -0
  126. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  127. package/dist/src/entities/initiatives/initiative.d.ts +12 -1
  128. package/dist/src/entities/initiatives/namespace.d.ts +15 -2
  129. package/dist/src/entities/me/namespace.d.ts +43 -0
  130. package/dist/src/entities/meetings/meeting.d.ts +5 -0
  131. package/dist/src/entities/meetings/namespace.d.ts +5 -1
  132. package/dist/src/entities/messages/thread.d.ts +1 -1
  133. package/dist/src/entities/notifications/namespace.d.ts +3 -0
  134. package/dist/src/entities/pins/namespace.d.ts +5 -1
  135. package/dist/src/entities/projects/namespace.d.ts +4 -1
  136. package/dist/src/entities/projects/project.d.ts +9 -1
  137. package/dist/src/entities/properties/namespace.d.ts +2 -0
  138. package/dist/src/entities/referrals/namespace.d.ts +33 -0
  139. package/dist/src/entities/routines/namespace.d.ts +42 -2
  140. package/dist/src/entities/routines/routine.d.ts +84 -5
  141. package/dist/src/entities/search/namespace.d.ts +65 -0
  142. package/dist/src/entities/{search.d.ts → search/options.d.ts} +8 -2
  143. package/dist/src/entities/search/types.d.ts +90 -0
  144. package/dist/src/entities/sharing/access.d.ts +14 -0
  145. package/dist/src/entities/tasks/namespace.d.ts +42 -3
  146. package/dist/src/entities/tasks/task.d.ts +47 -6
  147. package/dist/src/entities/teams/invite.d.ts +30 -0
  148. package/dist/src/entities/teams/namespace.d.ts +3 -0
  149. package/dist/src/entities/teams/team.d.ts +37 -0
  150. package/dist/src/entities/unfurls/namespace.d.ts +5 -1
  151. package/dist/src/entities/users/namespace.d.ts +9 -0
  152. package/dist/src/entities/users/user.d.ts +8 -0
  153. package/dist/src/entities/web/namespace.d.ts +61 -0
  154. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  155. package/dist/src/entities/webhooks/namespace.d.ts +2 -0
  156. package/dist/src/entities/whatsapp/account.d.ts +20 -0
  157. package/dist/src/entities/whatsapp/chat.d.ts +54 -0
  158. package/dist/src/entities/whatsapp/namespace.d.ts +23 -0
  159. package/dist/src/entities/workspace/items.d.ts +7 -0
  160. package/dist/src/entities/workspace/namespace.d.ts +14 -9
  161. package/dist/src/entities/workspace/query.d.ts +23 -0
  162. package/dist/src/entities/workspace/types.d.ts +6 -3
  163. package/dist/src/events/hydrate/agentSession.d.ts +1 -1
  164. package/dist/src/events/hydrate/call.d.ts +101 -0
  165. package/dist/src/events/hydrate/channel.d.ts +8 -1
  166. package/dist/src/events/hydrate/document.d.ts +1 -1
  167. package/dist/src/events/hydrate/message.d.ts +1 -1
  168. package/dist/src/events/types.d.ts +2 -1
  169. package/dist/src/macro.d.ts +73 -4
  170. package/dist/src/macro.js +8235 -3701
  171. package/dist/src/mentions.d.ts +6 -1
  172. package/dist/src/utils/activity.d.ts +23 -2
  173. package/dist/src/utils/index.d.ts +1 -1
  174. package/dist/src/utils/unwrap.d.ts +27 -2
  175. package/package.json +2 -2
@@ -2,6 +2,35 @@ export type ClientOptions = {
2
2
  baseUrl: `${string}://${string}` | (string & {});
3
3
  };
4
4
  export type AbGroup = 'A' | 'B';
5
+ /**
6
+ * An agent's API key, and whether its turns can run on it.
7
+ */
8
+ export type AgentApiKey = {
9
+ key?: null | SavedAgentApiKey;
10
+ /**
11
+ * Whether the agent owner's plan includes API keys. A key saved before a
12
+ * downgrade is still listed, and removable, but unused.
13
+ */
14
+ planAllows: boolean;
15
+ };
16
+ /**
17
+ * A provider an agent can bring its own key for.
18
+ */
19
+ export type AgentApiKeyProvider = 'anthropic' | 'openai';
20
+ /**
21
+ * What an agent needs to start using the SDK.
22
+ */
23
+ export type AgentSetupResponse = {
24
+ /**
25
+ * The agent's API key. Shown only here; repeating setup revokes it.
26
+ */
27
+ api_key: string;
28
+ /**
29
+ * Whether joining the inviting team failed. The invite stays pending:
30
+ * repeating setup tries again, and the invite link works after confirming.
31
+ */
32
+ team_join_failed: boolean;
33
+ };
5
34
  /**
6
35
  * Error response body.
7
36
  */
@@ -33,8 +62,9 @@ export type AutoReloadDefaults = {
33
62
  */
34
63
  export type AutoReloadMonthlyBudget = {
35
64
  /**
36
- * Reloads paid, pending, or failed with an invoice that can still collect.
37
- * Customer cents; manual credit purchases do not count.
65
+ * Reloads and one-time card purchases paid, pending, or failed with an
66
+ * invoice that can still collect. Customer cents; Checkout purchases do
67
+ * not count.
38
68
  */
39
69
  committed_cents: number;
40
70
  /**
@@ -287,15 +317,43 @@ export type CreatePortalSessionRequest = {
287
317
  */
288
318
  returnUrl: string;
289
319
  };
320
+ export type CreateProfilePictureUploadRequest = {
321
+ /**
322
+ * Mime type of the image.
323
+ */
324
+ content_type: string;
325
+ /**
326
+ * File name, such as `avatar.png`.
327
+ */
328
+ file_name: string;
329
+ /**
330
+ * Exact size of the image in bytes. Storage rejects a body of any other size.
331
+ */
332
+ size_bytes: number;
333
+ };
290
334
  /**
291
335
  * The request body to create a new team
292
336
  */
293
337
  export type CreateTeamRequest = {
338
+ /**
339
+ * Whether colleagues who sign up with the owner's work email domain join
340
+ * the team automatically. Ignored for generic email providers.
341
+ */
342
+ allow_domain_join?: boolean;
294
343
  /**
295
344
  * The name of the team
296
345
  */
297
346
  name: string;
298
347
  };
348
+ /**
349
+ * A newly created team invite link.
350
+ */
351
+ export type CreatedTeamInviteLinkResponse = {
352
+ /**
353
+ * The new link's token. Any previous link stops working.
354
+ */
355
+ token: TeamInviteLinkToken;
356
+ };
299
357
  /**
300
358
  * Request body for [`create_credit_checkout_handler`].
301
359
  */
@@ -323,6 +381,63 @@ export type CreditCheckoutResponse = {
323
381
  */
324
382
  url: string;
325
383
  };
384
+ /**
385
+ * Request body for [`purchase_credits_handler`].
386
+ */
387
+ export type CreditPurchaseRequestBody = {
388
+ /**
389
+ * One of the catalog's credit packs, cents.
390
+ */
391
+ amountCents: number;
392
+ };
393
+ /**
394
+ * Response for [`purchase_credits_handler`].
395
+ */
396
+ export type CreditPurchaseResponse = {
397
+ /**
398
+ * Amount charged, cents: the requested pack, unless an earlier declined
399
+ * purchase that Stripe collected in the meantime was booked instead.
400
+ */
401
+ amountCents: number;
402
+ snapshot?: null | UsageSnapshot;
403
+ /**
404
+ * Whether the card on file paid.
405
+ */
406
+ status: CreditPurchaseStatus;
407
+ };
408
+ /**
409
+ * The monthly credit limit that applies to this user's one-time purchases.
410
+ */
411
+ export type CreditPurchaseSnapshot = {
412
+ /**
413
+ * Charged this month so far, including charges that may still collect.
414
+ */
415
+ committed_cents: number;
416
+ /**
417
+ * Most credits charged to the card on file per UTC calendar month, from
418
+ * automatic reloads and one-time purchases together, in customer cents.
419
+ * `null` when the payer set no limit; team members always have one.
420
+ */
421
+ monthly_limit_cents?: number | null;
422
+ /**
423
+ * Start of the next UTC calendar month.
424
+ */
425
+ resets_at: string;
426
+ };
427
+ /**
428
+ * How a one-time credit purchase charged to the card on file ended.
429
+ */
430
+ export type CreditPurchaseStatus = 'paid' | 'declined' | 'payment_method_required' | 'authentication_required';
431
+ /**
432
+ * The status every user sees, without who set it.
433
+ */
434
+ export type CurrentSystemStatus = SystemStatus & {
435
+ /**
436
+ * When it was set; absent when no status was ever set. Clients keep the
437
+ * newest status they have seen, whether fetched or pushed.
438
+ */
439
+ updatedAt?: string | null;
440
+ };
326
441
  /**
327
442
  * What settings needs to render the Cursor connection.
328
443
  *
@@ -387,11 +502,21 @@ export type CursorModelsResponse = {
387
502
  */
388
503
  export type DenyReason = 'allowance_exhausted' | 'free_allowance_exhausted' | 'overage_limit_reached' | 'overage_payment_failed';
389
504
  /**
390
- * Actual deployment availability for the provider selector.
505
+ * What the provider selector offers the requesting user.
391
506
  */
392
507
  export type EmailConnectionProviders = {
393
508
  gmail: boolean;
509
+ /**
510
+ * Whether this user may start a new Outlook connection: the deployment
511
+ * switch and their `enable-outlook` flag.
512
+ */
394
513
  outlook: boolean;
514
+ /**
515
+ * Where a Microsoft 365 administrator approves Macro for their whole
516
+ * directory. Present when Outlook is configured and the request named an
517
+ * `original_url` for the administrator's browser to return to.
518
+ */
519
+ outlook_admin_consent_url?: string | null;
395
520
  };
396
521
  /**
397
522
  * Empty response is required due to custom fetch forcing `response.json()`
@@ -543,6 +668,10 @@ export type GetLegacyUserPermissionsResponse = {
543
668
  * Whether the user has trialed through stripe
544
669
  */
545
670
  hasTrialed: boolean;
671
+ /**
672
+ * Whether this is an agent account rather than a person
673
+ */
674
+ isAgent: boolean;
546
675
  /**
547
676
  * The user's license status
548
677
  */
@@ -833,6 +962,12 @@ export type GithubPullRequestReview = {
833
962
  * What a reviewer's latest review on a pull request said.
834
963
  */
835
964
  export type GithubPullRequestReviewState = 'approved' | 'changes_requested' | 'commented' | 'dismissed';
965
+ /**
966
+ * Whether a pull request is open or closed, as a user sets it. Merging is a
967
+ * separate action, so unlike `GithubPullRequestStatus` there is no merged
968
+ * state.
969
+ */
970
+ export type GithubPullRequestState = 'open' | 'closed';
836
971
  /**
837
972
  * The normalized lifecycle status for a GitHub pull request.
838
973
  */
@@ -1027,7 +1162,35 @@ export type InviteToTeamRequest = {
1027
1162
  * The invites to send, each with an email and tier
1028
1163
  */
1029
1164
  invites: Array<InviteEntry>;
1165
+ /**
1166
+ * Invite these addresses as agents: an address with no account signs up
1167
+ * as an agent and joins the team when it first signs in.
1168
+ */
1169
+ is_agent?: boolean;
1170
+ /**
1171
+ * The team the caller means to invite to. Invites always go to the
1172
+ * caller's current team; when this names another team, nothing is sent
1173
+ * and the request answers 409.
1174
+ */
1175
+ team_id?: string | null;
1176
+ };
1177
+ /**
1178
+ * The result of opening a team invite link.
1179
+ */
1180
+ export type JoinTeamByInviteLinkResponse = {
1181
+ /**
1182
+ * True when the user was already on the team and nothing changed.
1183
+ */
1184
+ already_member: boolean;
1185
+ /**
1186
+ * The team the link joins.
1187
+ */
1188
+ team_id: string;
1030
1189
  };
1190
+ /**
1191
+ * A language the app's interface is available in, as a BCP 47 tag.
1192
+ */
1193
+ export type Language = 'en' | 'de' | 'fr' | 'es' | 'it' | 'nl' | 'pt-PT' | 'sv' | 'da' | 'nb' | 'fi' | 'pl' | 'ru' | 'ja' | 'ko' | 'zh-Hans' | 'zh-Hant' | 'hi' | 'id' | 'vi' | 'th';
1031
1194
  /**
1032
1195
  * Defines who can access an item through its share link.
1033
1196
  */
@@ -1082,6 +1245,12 @@ export type PasswordlessRequest = {
1082
1245
  * The email to initiate passwordless authentication for
1083
1246
  */
1084
1247
  email: string;
1248
+ /**
1249
+ * Create an agent account if this address has no account yet. Otherwise
1250
+ * `true` has no effect, and `false` reverts an agent flag nobody has proven:
1251
+ * see `revert_unconfirmed_agent`.
1252
+ */
1253
+ is_agent?: boolean;
1085
1254
  /**
1086
1255
  * The redirect uri to redirect to after login
1087
1256
  */
@@ -1153,6 +1322,7 @@ export type PatchTeamMemberPlanRequest = {
1153
1322
  */
1154
1323
  export type PatchTeamRequest = {
1155
1324
  default_link_share?: null | LinkShare;
1325
+ language?: null | Language;
1156
1326
  /**
1157
1327
  * The new name for the team
1158
1328
  */
@@ -1223,6 +1393,11 @@ export type Permission = {
1223
1393
  * One plan in the catalog.
1224
1394
  */
1225
1395
  export type PlanCatalogEntry = {
1396
+ /**
1397
+ * Monthly automatic reload limit a payer on this plan starts from,
1398
+ * cents. Absent for plans that cannot reload.
1399
+ */
1400
+ auto_reload_default_monthly_limit_cents?: number | null;
1226
1401
  /**
1227
1402
  * Included AI per seat per period, in cents at provider cost. For the
1228
1403
  * free plan this is its monthly hard cap.
@@ -1281,6 +1456,19 @@ export type PostGetNamesRequestBody = {
1281
1456
  export type ProfilePictureQueryParams = {
1282
1457
  url: string;
1283
1458
  };
1459
+ /**
1460
+ * Where to upload a new profile picture, and the file id to set afterwards.
1461
+ */
1462
+ export type ProfilePictureUpload = {
1463
+ /**
1464
+ * Id to pass to `PUT /user/profile_picture/file` once uploaded.
1465
+ */
1466
+ file_id: string;
1467
+ /**
1468
+ * Expiring URL to `PUT` the image bytes to.
1469
+ */
1470
+ upload_url: string;
1471
+ };
1284
1472
  export type ProfilePictures = {
1285
1473
  pictures: Array<UserProfilePicture>;
1286
1474
  };
@@ -1301,6 +1489,16 @@ export type PublicGtmInviteLink = {
1301
1489
  */
1302
1490
  status: GtmInviteLinkStatus;
1303
1491
  };
1492
+ /**
1493
+ * The key someone pasted.
1494
+ */
1495
+ export type PutAgentApiKeyRequest = {
1496
+ /**
1497
+ * An Anthropic (`sk-ant-…`) or OpenAI (`sk-…`) key, for the provider of
1498
+ * the agent's model.
1499
+ */
1500
+ apiKey: string;
1501
+ };
1304
1502
  /**
1305
1503
  * The key the user pasted.
1306
1504
  */
@@ -1320,6 +1518,12 @@ export type PutCursorDefaultModelRequest = {
1320
1518
  */
1321
1519
  modelId?: string | null;
1322
1520
  };
1521
+ export type PutProfilePictureFileRequest = {
1522
+ /**
1523
+ * Id of an image the caller uploaded to static file storage.
1524
+ */
1525
+ file_id: string;
1526
+ };
1323
1527
  export type PutUserNameQueryParams = {
1324
1528
  /**
1325
1529
  * First Name of user
@@ -1345,6 +1549,19 @@ export type ResendFusionauthVerifyUserEmailRequest = {
1345
1549
  */
1346
1550
  email: string;
1347
1551
  };
1552
+ /**
1553
+ * The agent's saved key. Never includes the key.
1554
+ */
1555
+ export type SavedAgentApiKey = {
1556
+ /**
1557
+ * The provider the key is for.
1558
+ */
1559
+ provider: AgentApiKeyProvider;
1560
+ /**
1561
+ * When the key was last replaced.
1562
+ */
1563
+ updatedAt: string;
1564
+ };
1348
1565
  /**
1349
1566
  * A seat's future plan in the subscription's currently attached schedule.
1350
1567
  */
@@ -1364,6 +1581,15 @@ export type ScheduledSeatPlan = {
1364
1581
  * plan in use.
1365
1582
  */
1366
1583
  export type SeatPlan = 'premium' | 'max';
1584
+ /**
1585
+ * Response for the domain notice endpoint.
1586
+ */
1587
+ export type SendDomainNoticeResponse = {
1588
+ /**
1589
+ * How many colleagues were emailed by this call.
1590
+ */
1591
+ sent: number;
1592
+ };
1367
1593
  /**
1368
1594
  * The body which is used to describe the recipient email
1369
1595
  */
@@ -1417,12 +1643,60 @@ export type SetGithubPullRequestDraftResponse = {
1417
1643
  draft: boolean;
1418
1644
  pullRequest?: null | EnrichedGithubPullRequest;
1419
1645
  };
1646
+ /**
1647
+ * A request to close one pull request, or reopen it, on the user's behalf.
1648
+ */
1649
+ export type SetGithubPullRequestStateRequest = {
1650
+ /**
1651
+ * The GitHub pull request number.
1652
+ */
1653
+ number: number;
1654
+ /**
1655
+ * The GitHub repository owner or organization.
1656
+ */
1657
+ owner: string;
1658
+ /**
1659
+ * The GitHub repository name.
1660
+ */
1661
+ repo: string;
1662
+ /**
1663
+ * `closed` closes the pull request; `open` reopens it.
1664
+ */
1665
+ state: GithubPullRequestState;
1666
+ };
1667
+ /**
1668
+ * Response body for a pull request that was closed or reopened.
1669
+ */
1670
+ export type SetGithubPullRequestStateResponse = {
1671
+ pullRequest?: null | EnrichedGithubPullRequest;
1672
+ /**
1673
+ * Whether the pull request is now open or closed.
1674
+ */
1675
+ state: GithubPullRequestState;
1676
+ };
1420
1677
  export type SsoRequiredResponse = {
1421
1678
  /**
1422
1679
  * The idp_id you need to perform sso login with.
1423
1680
  */
1424
1681
  idp_id: string;
1425
1682
  };
1683
+ /**
1684
+ * One status a staff member set. The newest is the current status.
1685
+ */
1686
+ export type StatusUpdate = SystemStatus & {
1687
+ /**
1688
+ * When it was set.
1689
+ */
1690
+ createdAt: string;
1691
+ /**
1692
+ * UUIDv7, so ids sort by creation.
1693
+ */
1694
+ id: string;
1695
+ /**
1696
+ * The staff member who set it.
1697
+ */
1698
+ userId: string;
1699
+ };
1426
1700
  /**
1427
1701
  * Response containing the Stripe session URL
1428
1702
  */
@@ -1442,6 +1716,33 @@ export type SubscriptionStatus = {
1442
1716
  renewalDate?: string | null;
1443
1717
  scheduledChange?: null | ScheduledSeatPlan;
1444
1718
  };
1719
+ /**
1720
+ * The platform status. Only the non-operational statuses carry a message.
1721
+ */
1722
+ export type SystemStatus = {
1723
+ status: 'operational';
1724
+ } | {
1725
+ /**
1726
+ * What users should know.
1727
+ */
1728
+ message: string;
1729
+ status: 'degraded';
1730
+ } | {
1731
+ /**
1732
+ * What users should know.
1733
+ */
1734
+ message: string;
1735
+ status: 'major_outage';
1736
+ };
1737
+ /**
1738
+ * Recent status updates, newest first.
1739
+ */
1740
+ export type SystemStatusHistory = {
1741
+ /**
1742
+ * The updates.
1743
+ */
1744
+ updates: Array<StatusUpdate>;
1745
+ };
1445
1746
  /**
1446
1747
  * The Team struct
1447
1748
  */
@@ -1469,6 +1770,7 @@ export type Team = {
1469
1770
  */
1470
1771
  enterprise: boolean;
1471
1772
  id: string;
1773
+ language?: null | Language;
1472
1774
  name: string;
1473
1775
  owner_id: string;
1474
1776
  slug: string;
@@ -1493,6 +1795,10 @@ export type TeamInviteDetails = {
1493
1795
  * The user who sent the invitation
1494
1796
  */
1495
1797
  invited_by: string;
1798
+ /**
1799
+ * Whether the invite creates an agent account
1800
+ */
1801
+ is_agent: boolean;
1496
1802
  /**
1497
1803
  * When the invite was last sent
1498
1804
  */
@@ -1506,6 +1812,43 @@ export type TeamInviteDetails = {
1506
1812
  */
1507
1813
  team_role: TeamRole;
1508
1814
  };
1815
+ /**
1816
+ * The caller's team invite link.
1817
+ */
1818
+ export type TeamInviteLinkResponse = {
1819
+ token?: null | TeamInviteLinkToken;
1820
+ };
1821
+ /**
1822
+ * The team an invite link joins, shown before the user accepts.
1823
+ */
1824
+ export type TeamInviteLinkTeam = {
1825
+ /**
1826
+ * Id of the team the link joins.
1827
+ */
1828
+ team_id: string;
1829
+ /**
1830
+ * Name of the team the link joins.
1831
+ */
1832
+ team_name: string;
1833
+ };
1834
+ /**
1835
+ * The secret in a team's shareable invite link.
1836
+ *
1837
+ * Anyone signed in who holds the token can join the team, so it is a random
1838
+ * value rather than a time-ordered id, and an admin resetting the link
1839
+ * replaces it.
1840
+ */
1841
+ export type TeamInviteLinkToken = string;
1842
+ /**
1843
+ * Identifies an invite link. The token travels in the body, not the path, so
1844
+ * request spans and access logs that record the path never see it.
1845
+ */
1846
+ export type TeamInviteLinkTokenRequest = {
1847
+ /**
1848
+ * The invite link's token.
1849
+ */
1850
+ token: TeamInviteLinkToken;
1851
+ };
1509
1852
  /**
1510
1853
  * Response containing a list of team invites
1511
1854
  */
@@ -1634,6 +1977,24 @@ export type UpdateOverageRequest = {
1634
1977
  */
1635
1978
  limitCents?: number;
1636
1979
  };
1980
+ /**
1981
+ * What kind of upstream failure a 502 or 503 reports, for clients that
1982
+ * branch on it.
1983
+ */
1984
+ export type UpstreamErrorCode = 'upstream_unavailable' | 'upstream_rate_limited' | 'upstream_invalid_response';
1985
+ /**
1986
+ * The body of a 502 or 503 caused by a third-party service.
1987
+ */
1988
+ export type UpstreamErrorResponse = {
1989
+ /**
1990
+ * The kind of failure.
1991
+ */
1992
+ code: UpstreamErrorCode;
1993
+ /**
1994
+ * What failed and what to do about it, written for the user.
1995
+ */
1996
+ message: string;
1997
+ };
1637
1998
  /**
1638
1999
  * The payer's current-period position, as shown in Billing settings and used
1639
2000
  * by the gate.
@@ -1653,6 +2014,7 @@ export type UsageSnapshot = {
1653
2014
  * Shared prepaid credit balance, in customer cents.
1654
2015
  */
1655
2016
  credit_balance_cents: number;
2017
+ credit_purchase?: null | CreditPurchaseSnapshot;
1656
2018
  /**
1657
2019
  * Shared payer credits already applied to this period, in customer cents.
1658
2020
  */
@@ -1722,6 +2084,13 @@ export type UsageSnapshot = {
1722
2084
  */
1723
2085
  used_cents: number;
1724
2086
  };
2087
+ /**
2088
+ * The interface language a user picked for themselves. `None` follows their
2089
+ * team's language, else their browser's.
2090
+ */
2091
+ export type UserLanguage = {
2092
+ language?: null | Language;
2093
+ };
1725
2094
  export type UserLinkResponse = {
1726
2095
  /**
1727
2096
  * Whether or not a link exists for the given idp
@@ -1731,6 +2100,10 @@ export type UserLinkResponse = {
1731
2100
  export type UserName = {
1732
2101
  first_name?: string | null;
1733
2102
  id: string;
2103
+ /**
2104
+ * Whether this is an agent account rather than a person.
2105
+ */
2106
+ is_agent?: boolean;
1734
2107
  last_name?: string | null;
1735
2108
  };
1736
2109
  export type UserNames = {
@@ -1782,6 +2155,61 @@ export type UserTokensResponse = {
1782
2155
  */
1783
2156
  refresh_token: string;
1784
2157
  };
2158
+ export type DeleteAgentApiKeyData = {
2159
+ body?: never;
2160
+ path: {
2161
+ agent_id: string;
2162
+ };
2163
+ query?: never;
2164
+ url: '/agents/{agent_id}/api-key';
2165
+ };
2166
+ export type DeleteAgentApiKeyErrors = {
2167
+ 401: string;
2168
+ 403: ErrorResponse;
2169
+ 404: ErrorResponse;
2170
+ };
2171
+ export type DeleteAgentApiKeyError = DeleteAgentApiKeyErrors[keyof DeleteAgentApiKeyErrors];
2172
+ export type DeleteAgentApiKeyResponses = {
2173
+ 200: AgentApiKey;
2174
+ };
2175
+ export type DeleteAgentApiKeyResponse = DeleteAgentApiKeyResponses[keyof DeleteAgentApiKeyResponses];
2176
+ export type GetAgentApiKeyData = {
2177
+ body?: never;
2178
+ path: {
2179
+ agent_id: string;
2180
+ };
2181
+ query?: never;
2182
+ url: '/agents/{agent_id}/api-key';
2183
+ };
2184
+ export type GetAgentApiKeyErrors = {
2185
+ 401: string;
2186
+ 403: ErrorResponse;
2187
+ 404: ErrorResponse;
2188
+ };
2189
+ export type GetAgentApiKeyError = GetAgentApiKeyErrors[keyof GetAgentApiKeyErrors];
2190
+ export type GetAgentApiKeyResponses = {
2191
+ 200: AgentApiKey;
2192
+ };
2193
+ export type GetAgentApiKeyResponse = GetAgentApiKeyResponses[keyof GetAgentApiKeyResponses];
2194
+ export type PutAgentApiKeyData = {
2195
+ body: PutAgentApiKeyRequest;
2196
+ path: {
2197
+ agent_id: string;
2198
+ };
2199
+ query?: never;
2200
+ url: '/agents/{agent_id}/api-key';
2201
+ };
2202
+ export type PutAgentApiKeyErrors = {
2203
+ 400: ErrorResponse;
2204
+ 401: string;
2205
+ 403: ErrorResponse;
2206
+ 404: ErrorResponse;
2207
+ };
2208
+ export type PutAgentApiKeyError = PutAgentApiKeyErrors[keyof PutAgentApiKeyErrors];
2209
+ export type PutAgentApiKeyResponses = {
2210
+ 200: AgentApiKey;
2211
+ };
2212
+ export type PutAgentApiKeyResponse = PutAgentApiKeyResponses[keyof PutAgentApiKeyResponses];
1785
2213
  export type UpdateAiBillingAutoReloadData = {
1786
2214
  body: UpdateAutoReloadRequest;
1787
2215
  path?: never;
@@ -1854,6 +2282,42 @@ export type CreateAiCreditCheckoutResponses = {
1854
2282
  200: CreditCheckoutResponse;
1855
2283
  };
1856
2284
  export type CreateAiCreditCheckoutResponse = CreateAiCreditCheckoutResponses[keyof CreateAiCreditCheckoutResponses];
2285
+ export type PurchaseAiCreditsData = {
2286
+ body: CreditPurchaseRequestBody;
2287
+ path?: never;
2288
+ query?: never;
2289
+ url: '/ai-billing/credits/purchase';
2290
+ };
2291
+ export type PurchaseAiCreditsErrors = {
2292
+ /**
2293
+ * Invalid pack or no payment account
2294
+ */
2295
+ 400: AiBillingErrorBody;
2296
+ /**
2297
+ * Unauthorized
2298
+ */
2299
+ 401: unknown;
2300
+ /**
2301
+ * A paid plan is required
2302
+ */
2303
+ 402: AiBillingErrorBody;
2304
+ /**
2305
+ * Over the monthly credit limit, or an earlier purchase is still processing
2306
+ */
2307
+ 409: AiBillingErrorBody;
2308
+ /**
2309
+ * Internal server error
2310
+ */
2311
+ 500: AiBillingErrorBody;
2312
+ };
2313
+ export type PurchaseAiCreditsError = PurchaseAiCreditsErrors[keyof PurchaseAiCreditsErrors];
2314
+ export type PurchaseAiCreditsResponses = {
2315
+ /**
2316
+ * Purchase outcome and updated position
2317
+ */
2318
+ 200: CreditPurchaseResponse;
2319
+ };
2320
+ export type PurchaseAiCreditsResponse = PurchaseAiCreditsResponses[keyof PurchaseAiCreditsResponses];
1857
2321
  export type UpdateAiBillingOverageData = {
1858
2322
  body: UpdateOverageRequest;
1859
2323
  path?: never;
@@ -2169,6 +2633,8 @@ export type SetGithubPullRequestDraftErrors = {
2169
2633
  422: ErrorResponse;
2170
2634
  428: ErrorResponse;
2171
2635
  500: ErrorResponse;
2636
+ 502: UpstreamErrorResponse;
2637
+ 503: UpstreamErrorResponse;
2172
2638
  };
2173
2639
  export type SetGithubPullRequestDraftError = SetGithubPullRequestDraftErrors[keyof SetGithubPullRequestDraftErrors];
2174
2640
  export type SetGithubPullRequestDraftResponses = {
@@ -2186,6 +2652,8 @@ export type EnrichGithubPullRequestsErrors = {
2186
2652
  404: ErrorResponse;
2187
2653
  428: ErrorResponse;
2188
2654
  500: ErrorResponse;
2655
+ 502: UpstreamErrorResponse;
2656
+ 503: UpstreamErrorResponse;
2189
2657
  };
2190
2658
  export type EnrichGithubPullRequestsError = EnrichGithubPullRequestsErrors[keyof EnrichGithubPullRequestsErrors];
2191
2659
  export type EnrichGithubPullRequestsResponses = {
@@ -2215,6 +2683,8 @@ export type MergeGithubPullRequestErrors = {
2215
2683
  422: ErrorResponse;
2216
2684
  428: ErrorResponse;
2217
2685
  500: ErrorResponse;
2686
+ 502: UpstreamErrorResponse;
2687
+ 503: UpstreamErrorResponse;
2218
2688
  };
2219
2689
  export type MergeGithubPullRequestError = MergeGithubPullRequestErrors[keyof MergeGithubPullRequestErrors];
2220
2690
  export type MergeGithubPullRequestResponses = {
@@ -2239,12 +2709,44 @@ export type GetGithubPullRequestMergeabilityErrors = {
2239
2709
  422: ErrorResponse;
2240
2710
  428: ErrorResponse;
2241
2711
  500: ErrorResponse;
2712
+ 502: UpstreamErrorResponse;
2713
+ 503: UpstreamErrorResponse;
2242
2714
  };
2243
2715
  export type GetGithubPullRequestMergeabilityError = GetGithubPullRequestMergeabilityErrors[keyof GetGithubPullRequestMergeabilityErrors];
2244
2716
  export type GetGithubPullRequestMergeabilityResponses = {
2245
2717
  200: GithubPullRequestMergeabilityResponse;
2246
2718
  };
2247
2719
  export type GetGithubPullRequestMergeabilityResponse = GetGithubPullRequestMergeabilityResponses[keyof GetGithubPullRequestMergeabilityResponses];
2720
+ export type SetGithubPullRequestStateData = {
2721
+ body: SetGithubPullRequestStateRequest;
2722
+ path?: never;
2723
+ query?: never;
2724
+ url: '/github_pull_requests/state';
2725
+ };
2726
+ export type SetGithubPullRequestStateErrors = {
2727
+ 401: ErrorResponse;
2728
+ /**
2729
+ * The user cannot change the pull request
2730
+ */
2731
+ 403: ErrorResponse;
2732
+ /**
2733
+ * No GitHub link, or the pull request is not visible to the user
2734
+ */
2735
+ 404: ErrorResponse;
2736
+ /**
2737
+ * GitHub declined the change
2738
+ */
2739
+ 422: ErrorResponse;
2740
+ 428: ErrorResponse;
2741
+ 500: ErrorResponse;
2742
+ 502: UpstreamErrorResponse;
2743
+ 503: UpstreamErrorResponse;
2744
+ };
2745
+ export type SetGithubPullRequestStateError = SetGithubPullRequestStateErrors[keyof SetGithubPullRequestStateErrors];
2746
+ export type SetGithubPullRequestStateResponses = {
2747
+ 200: SetGithubPullRequestStateResponse;
2748
+ };
2749
+ export type SetGithubPullRequestStateResponse2 = SetGithubPullRequestStateResponses[keyof SetGithubPullRequestStateResponses];
2248
2750
  export type ListGtmInviteLinksData = {
2249
2751
  body?: never;
2250
2752
  path?: never;
@@ -2405,7 +2907,7 @@ export type RefreshErrors = {
2405
2907
  400: string;
2406
2908
  401: string;
2407
2909
  /**
2408
- * Refresh already in progress for this user
2910
+ * Refresh already in progress for this user, or the access token lacks the Macro claims and was issued too recently to refresh
2409
2911
  */
2410
2912
  429: string;
2411
2913
  500: string;
@@ -2435,9 +2937,19 @@ export type CreateInProgressLinkResponse2 = CreateInProgressLinkResponses[keyof
2435
2937
  export type EmailConnectionProvidersData = {
2436
2938
  body?: never;
2437
2939
  path?: never;
2438
- query?: never;
2940
+ query?: {
2941
+ /**
2942
+ * **OPTIONAL**. Where the admin-consent flow returns to; required for `outlook_admin_consent_url`.
2943
+ */
2944
+ original_url?: string;
2945
+ };
2439
2946
  url: '/link/email/providers';
2440
2947
  };
2948
+ export type EmailConnectionProvidersErrors = {
2949
+ 400: ErrorResponse;
2950
+ 401: ErrorResponse;
2951
+ };
2952
+ export type EmailConnectionProvidersError = EmailConnectionProvidersErrors[keyof EmailConnectionProvidersErrors];
2441
2953
  export type EmailConnectionProvidersResponses = {
2442
2954
  200: EmailConnectionProviders;
2443
2955
  };
@@ -2452,6 +2964,8 @@ export type DeleteGithubLinkErrors = {
2452
2964
  400: ErrorResponse;
2453
2965
  401: ErrorResponse;
2454
2966
  500: ErrorResponse;
2967
+ 502: UpstreamErrorResponse;
2968
+ 503: UpstreamErrorResponse;
2455
2969
  };
2456
2970
  export type DeleteGithubLinkError = DeleteGithubLinkErrors[keyof DeleteGithubLinkErrors];
2457
2971
  export type DeleteGithubLinkResponses = {
@@ -2474,6 +2988,8 @@ export type InitGithubLinkErrors = {
2474
2988
  401: ErrorResponse;
2475
2989
  429: ErrorResponse;
2476
2990
  500: ErrorResponse;
2991
+ 502: UpstreamErrorResponse;
2992
+ 503: UpstreamErrorResponse;
2477
2993
  };
2478
2994
  export type InitGithubLinkError = InitGithubLinkErrors[keyof InitGithubLinkErrors];
2479
2995
  export type InitGithubLinkResponses = {
@@ -2491,6 +3007,8 @@ export type CheckGithubLinkStatusErrors = {
2491
3007
  404: ErrorResponse;
2492
3008
  428: ErrorResponse;
2493
3009
  500: ErrorResponse;
3010
+ 502: UpstreamErrorResponse;
3011
+ 503: UpstreamErrorResponse;
2494
3012
  };
2495
3013
  export type CheckGithubLinkStatusError = CheckGithubLinkStatusErrors[keyof CheckGithubLinkStatusErrors];
2496
3014
  export type CheckGithubLinkStatusResponses = {
@@ -2654,6 +3172,10 @@ export type SsoLoginData = {
2654
3172
  * **OPTIONAL**. If the user opened a link with a referral code.
2655
3173
  */
2656
3174
  referral_code: string;
3175
+ /**
3176
+ * **OPTIONAL**. If the sign-in started on the agent signup page. A new account becomes an agent.
3177
+ */
3178
+ is_agent: boolean;
2657
3179
  };
2658
3180
  url: '/login/sso';
2659
3181
  };
@@ -2885,6 +3407,56 @@ export type SessionLoginResponses = {
2885
3407
  200: UserTokensResponse;
2886
3408
  };
2887
3409
  export type SessionLoginResponse = SessionLoginResponses[keyof SessionLoginResponses];
3410
+ export type GetSystemStatusData = {
3411
+ body?: never;
3412
+ path?: never;
3413
+ query?: never;
3414
+ url: '/system-status';
3415
+ };
3416
+ export type GetSystemStatusErrors = {
3417
+ 500: ErrorResponse;
3418
+ };
3419
+ export type GetSystemStatusError = GetSystemStatusErrors[keyof GetSystemStatusErrors];
3420
+ export type GetSystemStatusResponses = {
3421
+ 200: CurrentSystemStatus;
3422
+ };
3423
+ export type GetSystemStatusResponse = GetSystemStatusResponses[keyof GetSystemStatusResponses];
3424
+ export type SetSystemStatusData = {
3425
+ body: SystemStatus;
3426
+ path?: never;
3427
+ query?: never;
3428
+ url: '/system-status';
3429
+ };
3430
+ export type SetSystemStatusErrors = {
3431
+ 401: ErrorResponse;
3432
+ 403: ErrorResponse;
3433
+ /**
3434
+ * The body is not a valid status
3435
+ */
3436
+ 422: unknown;
3437
+ 500: ErrorResponse;
3438
+ };
3439
+ export type SetSystemStatusError = SetSystemStatusErrors[keyof SetSystemStatusErrors];
3440
+ export type SetSystemStatusResponses = {
3441
+ 200: StatusUpdate;
3442
+ };
3443
+ export type SetSystemStatusResponse = SetSystemStatusResponses[keyof SetSystemStatusResponses];
3444
+ export type ListSystemStatusHistoryData = {
3445
+ body?: never;
3446
+ path?: never;
3447
+ query?: never;
3448
+ url: '/system-status/history';
3449
+ };
3450
+ export type ListSystemStatusHistoryErrors = {
3451
+ 401: ErrorResponse;
3452
+ 403: ErrorResponse;
3453
+ 500: ErrorResponse;
3454
+ };
3455
+ export type ListSystemStatusHistoryError = ListSystemStatusHistoryErrors[keyof ListSystemStatusHistoryErrors];
3456
+ export type ListSystemStatusHistoryResponses = {
3457
+ 200: SystemStatusHistory;
3458
+ };
3459
+ export type ListSystemStatusHistoryResponse = ListSystemStatusHistoryResponses[keyof ListSystemStatusHistoryResponses];
2888
3460
  export type DeleteTeamData = {
2889
3461
  body?: never;
2890
3462
  path?: never;
@@ -2986,6 +3558,22 @@ export type PatchTeamCrmSettingsResponses = {
2986
3558
  200: PatchTeamCrmSettingsResponse;
2987
3559
  };
2988
3560
  export type PatchTeamCrmSettingsResponse2 = PatchTeamCrmSettingsResponses[keyof PatchTeamCrmSettingsResponses];
3561
+ export type SendTeamDomainNoticeData = {
3562
+ body?: never;
3563
+ path?: never;
3564
+ query?: never;
3565
+ url: '/team/domain-notice';
3566
+ };
3567
+ export type SendTeamDomainNoticeErrors = {
3568
+ 401: ErrorResponse;
3569
+ 403: ErrorResponse;
3570
+ 500: ErrorResponse;
3571
+ };
3572
+ export type SendTeamDomainNoticeError = SendTeamDomainNoticeErrors[keyof SendTeamDomainNoticeErrors];
3573
+ export type SendTeamDomainNoticeResponses = {
3574
+ 200: SendDomainNoticeResponse;
3575
+ };
3576
+ export type SendTeamDomainNoticeResponse = SendTeamDomainNoticeResponses[keyof SendTeamDomainNoticeResponses];
2989
3577
  export type InviteToTeamData = {
2990
3578
  body: InviteToTeamRequest;
2991
3579
  path?: never;
@@ -2996,12 +3584,97 @@ export type InviteToTeamErrors = {
2996
3584
  400: ErrorResponse;
2997
3585
  401: ErrorResponse;
2998
3586
  404: ErrorResponse;
3587
+ /**
3588
+ * `team_id` names a team other than the caller's current team
3589
+ */
3590
+ 409: ErrorResponse;
2999
3591
  500: ErrorResponse;
3000
3592
  };
3001
3593
  export type InviteToTeamError = InviteToTeamErrors[keyof InviteToTeamErrors];
3002
3594
  export type InviteToTeamResponses = {
3003
3595
  201: unknown;
3004
3596
  };
3597
+ export type DeleteTeamInviteLinkData = {
3598
+ body?: never;
3599
+ path?: never;
3600
+ query?: never;
3601
+ url: '/team/invite-link';
3602
+ };
3603
+ export type DeleteTeamInviteLinkErrors = {
3604
+ 401: ErrorResponse;
3605
+ 403: ErrorResponse;
3606
+ 500: ErrorResponse;
3607
+ };
3608
+ export type DeleteTeamInviteLinkError = DeleteTeamInviteLinkErrors[keyof DeleteTeamInviteLinkErrors];
3609
+ export type DeleteTeamInviteLinkResponses = {
3610
+ 204: void;
3611
+ };
3612
+ export type DeleteTeamInviteLinkResponse = DeleteTeamInviteLinkResponses[keyof DeleteTeamInviteLinkResponses];
3613
+ export type GetTeamInviteLinkData = {
3614
+ body?: never;
3615
+ path?: never;
3616
+ query?: never;
3617
+ url: '/team/invite-link';
3618
+ };
3619
+ export type GetTeamInviteLinkErrors = {
3620
+ 401: ErrorResponse;
3621
+ 403: ErrorResponse;
3622
+ 500: ErrorResponse;
3623
+ };
3624
+ export type GetTeamInviteLinkError = GetTeamInviteLinkErrors[keyof GetTeamInviteLinkErrors];
3625
+ export type GetTeamInviteLinkResponses = {
3626
+ 200: TeamInviteLinkResponse;
3627
+ };
3628
+ export type GetTeamInviteLinkResponse = GetTeamInviteLinkResponses[keyof GetTeamInviteLinkResponses];
3629
+ export type CreateTeamInviteLinkData = {
3630
+ body?: never;
3631
+ path?: never;
3632
+ query?: never;
3633
+ url: '/team/invite-link';
3634
+ };
3635
+ export type CreateTeamInviteLinkErrors = {
3636
+ 401: ErrorResponse;
3637
+ 403: ErrorResponse;
3638
+ 500: ErrorResponse;
3639
+ };
3640
+ export type CreateTeamInviteLinkError = CreateTeamInviteLinkErrors[keyof CreateTeamInviteLinkErrors];
3641
+ export type CreateTeamInviteLinkResponses = {
3642
+ 201: CreatedTeamInviteLinkResponse;
3643
+ };
3644
+ export type CreateTeamInviteLinkResponse = CreateTeamInviteLinkResponses[keyof CreateTeamInviteLinkResponses];
3645
+ export type JoinTeamByInviteLinkData = {
3646
+ body: TeamInviteLinkTokenRequest;
3647
+ path?: never;
3648
+ query?: never;
3649
+ url: '/team/invite-link/join';
3650
+ };
3651
+ export type JoinTeamByInviteLinkErrors = {
3652
+ 401: ErrorResponse;
3653
+ 404: ErrorResponse;
3654
+ 409: ErrorResponse;
3655
+ 500: ErrorResponse;
3656
+ };
3657
+ export type JoinTeamByInviteLinkError = JoinTeamByInviteLinkErrors[keyof JoinTeamByInviteLinkErrors];
3658
+ export type JoinTeamByInviteLinkResponses = {
3659
+ 200: JoinTeamByInviteLinkResponse;
3660
+ };
3661
+ export type JoinTeamByInviteLinkResponse2 = JoinTeamByInviteLinkResponses[keyof JoinTeamByInviteLinkResponses];
3662
+ export type GetTeamByInviteLinkData = {
3663
+ body: TeamInviteLinkTokenRequest;
3664
+ path?: never;
3665
+ query?: never;
3666
+ url: '/team/invite-link/team';
3667
+ };
3668
+ export type GetTeamByInviteLinkErrors = {
3669
+ 401: ErrorResponse;
3670
+ 404: ErrorResponse;
3671
+ 500: ErrorResponse;
3672
+ };
3673
+ export type GetTeamByInviteLinkError = GetTeamByInviteLinkErrors[keyof GetTeamByInviteLinkErrors];
3674
+ export type GetTeamByInviteLinkResponses = {
3675
+ 200: TeamInviteLinkTeam;
3676
+ };
3677
+ export type GetTeamByInviteLinkResponse = GetTeamByInviteLinkResponses[keyof GetTeamByInviteLinkResponses];
3005
3678
  export type DeleteTeamInviteHandlerData = {
3006
3679
  body?: never;
3007
3680
  path: {
@@ -3026,12 +3699,23 @@ export type DeleteTeamInviteHandlerResponses = {
3026
3699
  export type GetTeamInvitesData = {
3027
3700
  body?: never;
3028
3701
  path?: never;
3029
- query?: never;
3702
+ query?: {
3703
+ /**
3704
+ * The team the caller means to list. Invites are always read from the
3705
+ * caller's current team; when this names another team, the request
3706
+ * answers 409.
3707
+ */
3708
+ team_id?: string;
3709
+ };
3030
3710
  url: '/team/invites';
3031
3711
  };
3032
3712
  export type GetTeamInvitesErrors = {
3033
3713
  400: ErrorResponse;
3034
3714
  401: ErrorResponse;
3715
+ /**
3716
+ * `team_id` names a team other than the caller's current team
3717
+ */
3718
+ 409: ErrorResponse;
3035
3719
  500: ErrorResponse;
3036
3720
  };
3037
3721
  export type GetTeamInvitesError = GetTeamInvitesErrors[keyof GetTeamInvitesErrors];
@@ -3174,6 +3858,29 @@ export type GetUserInvitesResponses = {
3174
3858
  200: TeamInvitesResponse;
3175
3859
  };
3176
3860
  export type GetUserInvitesResponse = GetUserInvitesResponses[keyof GetUserInvitesResponses];
3861
+ export type AgentSetupData = {
3862
+ body?: never;
3863
+ path?: never;
3864
+ query?: never;
3865
+ url: '/user/agent_setup';
3866
+ };
3867
+ export type AgentSetupErrors = {
3868
+ 401: string;
3869
+ /**
3870
+ * The account is not an agent
3871
+ */
3872
+ 403: ErrorResponse;
3873
+ /**
3874
+ * Setup is already confirmed
3875
+ */
3876
+ 409: ErrorResponse;
3877
+ 500: ErrorResponse;
3878
+ };
3879
+ export type AgentSetupError = AgentSetupErrors[keyof AgentSetupErrors];
3880
+ export type AgentSetupResponses = {
3881
+ 200: AgentSetupResponse;
3882
+ };
3883
+ export type AgentSetupResponse2 = AgentSetupResponses[keyof AgentSetupResponses];
3177
3884
  export type GetUserNamesData = {
3178
3885
  body: PostGetNamesRequestBody;
3179
3886
  path?: never;
@@ -3221,6 +3928,42 @@ export type PatchUserGroupResponses = {
3221
3928
  200: EmptyResponse;
3222
3929
  };
3223
3930
  export type PatchUserGroupResponse = PatchUserGroupResponses[keyof PatchUserGroupResponses];
3931
+ export type GetUserLanguageData = {
3932
+ body?: never;
3933
+ path?: never;
3934
+ query?: never;
3935
+ url: '/user/language';
3936
+ };
3937
+ export type GetUserLanguageErrors = {
3938
+ 401: ErrorResponse;
3939
+ 404: ErrorResponse;
3940
+ 500: ErrorResponse;
3941
+ };
3942
+ export type GetUserLanguageError = GetUserLanguageErrors[keyof GetUserLanguageErrors];
3943
+ export type GetUserLanguageResponses = {
3944
+ 200: UserLanguage;
3945
+ };
3946
+ export type GetUserLanguageResponse = GetUserLanguageResponses[keyof GetUserLanguageResponses];
3947
+ export type PutUserLanguageData = {
3948
+ body: UserLanguage;
3949
+ path?: never;
3950
+ query?: never;
3951
+ url: '/user/language';
3952
+ };
3953
+ export type PutUserLanguageErrors = {
3954
+ 400: ErrorResponse;
3955
+ 401: ErrorResponse;
3956
+ 404: ErrorResponse;
3957
+ 500: ErrorResponse;
3958
+ };
3959
+ export type PutUserLanguageError = PutUserLanguageErrors[keyof PutUserLanguageErrors];
3960
+ export type PutUserLanguageResponses = {
3961
+ /**
3962
+ * Language updated
3963
+ */
3964
+ 204: void;
3965
+ };
3966
+ export type PutUserLanguageResponse = PutUserLanguageResponses[keyof PutUserLanguageResponses];
3224
3967
  export type GetLegacyUserPermissionsData = {
3225
3968
  body?: never;
3226
3969
  path?: never;
@@ -3382,6 +4125,56 @@ export type PutProfilePictureResponses = {
3382
4125
  200: EmptyResponse;
3383
4126
  };
3384
4127
  export type PutProfilePictureResponse = PutProfilePictureResponses[keyof PutProfilePictureResponses];
4128
+ export type CreateProfilePictureUploadData = {
4129
+ body: CreateProfilePictureUploadRequest;
4130
+ path?: never;
4131
+ query?: never;
4132
+ url: '/user/profile_picture/file';
4133
+ };
4134
+ export type CreateProfilePictureUploadErrors = {
4135
+ /**
4136
+ * Not a supported image type, or empty
4137
+ */
4138
+ 400: ErrorResponse;
4139
+ 401: string;
4140
+ /**
4141
+ * The image is larger than 16 MB
4142
+ */
4143
+ 413: ErrorResponse;
4144
+ /**
4145
+ * Too many uploads this hour
4146
+ */
4147
+ 429: ErrorResponse;
4148
+ 500: ErrorResponse;
4149
+ };
4150
+ export type CreateProfilePictureUploadError = CreateProfilePictureUploadErrors[keyof CreateProfilePictureUploadErrors];
4151
+ export type CreateProfilePictureUploadResponses = {
4152
+ 200: ProfilePictureUpload;
4153
+ };
4154
+ export type CreateProfilePictureUploadResponse = CreateProfilePictureUploadResponses[keyof CreateProfilePictureUploadResponses];
4155
+ export type PutProfilePictureFileData = {
4156
+ body: PutProfilePictureFileRequest;
4157
+ path?: never;
4158
+ query?: never;
4159
+ url: '/user/profile_picture/file';
4160
+ };
4161
+ export type PutProfilePictureFileErrors = {
4162
+ /**
4163
+ * The file is not a supported image
4164
+ */
4165
+ 400: ErrorResponse;
4166
+ 401: string;
4167
+ /**
4168
+ * The caller has no such file
4169
+ */
4170
+ 404: ErrorResponse;
4171
+ 500: ErrorResponse;
4172
+ };
4173
+ export type PutProfilePictureFileError = PutProfilePictureFileErrors[keyof PutProfilePictureFileErrors];
4174
+ export type PutProfilePictureFileResponses = {
4175
+ 200: EmptyResponse;
4176
+ };
4177
+ export type PutProfilePictureFileResponse = PutProfilePictureFileResponses[keyof PutProfilePictureFileResponses];
3385
4178
  export type PostProfilePicturesData = {
3386
4179
  body: GetProfilePicturesRequestBody;
3387
4180
  path?: never;