@macro-inc/sdk 0.0.1

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 (296) hide show
  1. package/README.md +177 -0
  2. package/dist/chunk-5HAKQN23.js +1263 -0
  3. package/dist/chunk-77EI4LSQ.js +2492 -0
  4. package/dist/chunk-CTKR64MY.js +1436 -0
  5. package/dist/chunk-JXIQT5TH.js +1467 -0
  6. package/dist/chunk-P4DTO6VD.js +830 -0
  7. package/dist/chunk-PAAFJYGO.js +967 -0
  8. package/dist/chunk-QNUS5BC5.js +913 -0
  9. package/dist/chunk-SGAHIERJ.js +1235 -0
  10. package/dist/chunk-V45LUJDI.js +838 -0
  11. package/dist/chunk-YRUXFEZM.js +1044 -0
  12. package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
  13. package/dist/generated/agent-harness/client/index.d.ts +10 -0
  14. package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
  15. package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
  16. package/dist/generated/agent-harness/client.gen.d.ts +12 -0
  17. package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
  18. package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
  19. package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
  20. package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
  21. package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
  22. package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
  23. package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
  24. package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
  25. package/dist/generated/agent-harness/index.d.ts +2 -0
  26. package/dist/generated/agent-harness/index.js +6 -0
  27. package/dist/generated/agent-harness/sdk.gen.d.ts +84 -0
  28. package/dist/generated/agent-harness/types.gen.d.ts +539 -0
  29. package/dist/generated/auth/client/client.gen.d.ts +2 -0
  30. package/dist/generated/auth/client/index.d.ts +10 -0
  31. package/dist/generated/auth/client/types.gen.d.ts +120 -0
  32. package/dist/generated/auth/client/utils.gen.d.ts +37 -0
  33. package/dist/generated/auth/client.gen.d.ts +12 -0
  34. package/dist/generated/auth/core/auth.gen.d.ts +25 -0
  35. package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
  36. package/dist/generated/auth/core/params.gen.d.ts +43 -0
  37. package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
  38. package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
  39. package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
  40. package/dist/generated/auth/core/types.gen.d.ts +83 -0
  41. package/dist/generated/auth/core/utils.gen.d.ts +19 -0
  42. package/dist/generated/auth/index.d.ts +2 -0
  43. package/dist/generated/auth/index.js +6 -0
  44. package/dist/generated/auth/sdk.gen.d.ts +383 -0
  45. package/dist/generated/auth/types.gen.d.ts +2175 -0
  46. package/dist/generated/cognition/client/client.gen.d.ts +2 -0
  47. package/dist/generated/cognition/client/index.d.ts +10 -0
  48. package/dist/generated/cognition/client/types.gen.d.ts +120 -0
  49. package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
  50. package/dist/generated/cognition/client.gen.d.ts +12 -0
  51. package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
  52. package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
  53. package/dist/generated/cognition/core/params.gen.d.ts +43 -0
  54. package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
  55. package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
  56. package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
  57. package/dist/generated/cognition/core/types.gen.d.ts +83 -0
  58. package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
  59. package/dist/generated/cognition/index.d.ts +2 -0
  60. package/dist/generated/cognition/index.js +6 -0
  61. package/dist/generated/cognition/sdk.gen.d.ts +224 -0
  62. package/dist/generated/cognition/types.gen.d.ts +2484 -0
  63. package/dist/generated/connection/client/client.gen.d.ts +2 -0
  64. package/dist/generated/connection/client/index.d.ts +10 -0
  65. package/dist/generated/connection/client/types.gen.d.ts +120 -0
  66. package/dist/generated/connection/client/utils.gen.d.ts +37 -0
  67. package/dist/generated/connection/client.gen.d.ts +12 -0
  68. package/dist/generated/connection/core/auth.gen.d.ts +25 -0
  69. package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
  70. package/dist/generated/connection/core/params.gen.d.ts +43 -0
  71. package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
  72. package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
  73. package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
  74. package/dist/generated/connection/core/types.gen.d.ts +83 -0
  75. package/dist/generated/connection/core/utils.gen.d.ts +19 -0
  76. package/dist/generated/connection/index.d.ts +2 -0
  77. package/dist/generated/connection/index.js +839 -0
  78. package/dist/generated/connection/sdk.gen.d.ts +38 -0
  79. package/dist/generated/connection/types.gen.d.ts +235 -0
  80. package/dist/generated/contacts/client/client.gen.d.ts +2 -0
  81. package/dist/generated/contacts/client/index.d.ts +10 -0
  82. package/dist/generated/contacts/client/types.gen.d.ts +120 -0
  83. package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
  84. package/dist/generated/contacts/client.gen.d.ts +12 -0
  85. package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
  86. package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
  87. package/dist/generated/contacts/core/params.gen.d.ts +43 -0
  88. package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
  89. package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
  90. package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
  91. package/dist/generated/contacts/core/types.gen.d.ts +83 -0
  92. package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
  93. package/dist/generated/contacts/index.d.ts +2 -0
  94. package/dist/generated/contacts/index.js +6 -0
  95. package/dist/generated/contacts/sdk.gen.d.ts +43 -0
  96. package/dist/generated/contacts/types.gen.d.ts +52 -0
  97. package/dist/generated/email/client/client.gen.d.ts +2 -0
  98. package/dist/generated/email/client/index.d.ts +10 -0
  99. package/dist/generated/email/client/types.gen.d.ts +120 -0
  100. package/dist/generated/email/client/utils.gen.d.ts +37 -0
  101. package/dist/generated/email/client.gen.d.ts +12 -0
  102. package/dist/generated/email/core/auth.gen.d.ts +25 -0
  103. package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
  104. package/dist/generated/email/core/params.gen.d.ts +43 -0
  105. package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
  106. package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
  107. package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
  108. package/dist/generated/email/core/types.gen.d.ts +83 -0
  109. package/dist/generated/email/core/utils.gen.d.ts +19 -0
  110. package/dist/generated/email/index.d.ts +2 -0
  111. package/dist/generated/email/index.js +6 -0
  112. package/dist/generated/email/sdk.gen.d.ts +254 -0
  113. package/dist/generated/email/types.gen.d.ts +2614 -0
  114. package/dist/generated/notification/client/client.gen.d.ts +2 -0
  115. package/dist/generated/notification/client/index.d.ts +10 -0
  116. package/dist/generated/notification/client/types.gen.d.ts +120 -0
  117. package/dist/generated/notification/client/utils.gen.d.ts +37 -0
  118. package/dist/generated/notification/client.gen.d.ts +12 -0
  119. package/dist/generated/notification/core/auth.gen.d.ts +25 -0
  120. package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
  121. package/dist/generated/notification/core/params.gen.d.ts +43 -0
  122. package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
  123. package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
  124. package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
  125. package/dist/generated/notification/core/types.gen.d.ts +83 -0
  126. package/dist/generated/notification/core/utils.gen.d.ts +19 -0
  127. package/dist/generated/notification/index.d.ts +2 -0
  128. package/dist/generated/notification/index.js +6 -0
  129. package/dist/generated/notification/sdk.gen.d.ts +118 -0
  130. package/dist/generated/notification/types.gen.d.ts +1352 -0
  131. package/dist/generated/properties/client/client.gen.d.ts +2 -0
  132. package/dist/generated/properties/client/index.d.ts +10 -0
  133. package/dist/generated/properties/client/types.gen.d.ts +120 -0
  134. package/dist/generated/properties/client/utils.gen.d.ts +37 -0
  135. package/dist/generated/properties/client.gen.d.ts +12 -0
  136. package/dist/generated/properties/core/auth.gen.d.ts +25 -0
  137. package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
  138. package/dist/generated/properties/core/params.gen.d.ts +43 -0
  139. package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
  140. package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
  141. package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
  142. package/dist/generated/properties/core/types.gen.d.ts +83 -0
  143. package/dist/generated/properties/core/utils.gen.d.ts +19 -0
  144. package/dist/generated/properties/index.d.ts +2 -0
  145. package/dist/generated/properties/index.js +6 -0
  146. package/dist/generated/properties/sdk.gen.d.ts +158 -0
  147. package/dist/generated/properties/types.gen.d.ts +1288 -0
  148. package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
  149. package/dist/generated/scheduled-action/client/index.d.ts +10 -0
  150. package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
  151. package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
  152. package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
  153. package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
  154. package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
  155. package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
  156. package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
  157. package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
  158. package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
  159. package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
  160. package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
  161. package/dist/generated/scheduled-action/index.d.ts +2 -0
  162. package/dist/generated/scheduled-action/index.js +845 -0
  163. package/dist/generated/scheduled-action/sdk.gen.d.ts +42 -0
  164. package/dist/generated/scheduled-action/types.gen.d.ts +241 -0
  165. package/dist/generated/search/client/client.gen.d.ts +2 -0
  166. package/dist/generated/search/client/index.d.ts +10 -0
  167. package/dist/generated/search/client/types.gen.d.ts +120 -0
  168. package/dist/generated/search/client/utils.gen.d.ts +37 -0
  169. package/dist/generated/search/client.gen.d.ts +12 -0
  170. package/dist/generated/search/core/auth.gen.d.ts +25 -0
  171. package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
  172. package/dist/generated/search/core/params.gen.d.ts +43 -0
  173. package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
  174. package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
  175. package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
  176. package/dist/generated/search/core/types.gen.d.ts +83 -0
  177. package/dist/generated/search/core/utils.gen.d.ts +19 -0
  178. package/dist/generated/search/index.d.ts +2 -0
  179. package/dist/generated/search/index.js +6 -0
  180. package/dist/generated/search/sdk.gen.d.ts +44 -0
  181. package/dist/generated/search/types.gen.d.ts +2194 -0
  182. package/dist/generated/static-files/client/client.gen.d.ts +2 -0
  183. package/dist/generated/static-files/client/index.d.ts +10 -0
  184. package/dist/generated/static-files/client/types.gen.d.ts +120 -0
  185. package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
  186. package/dist/generated/static-files/client.gen.d.ts +12 -0
  187. package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
  188. package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
  189. package/dist/generated/static-files/core/params.gen.d.ts +43 -0
  190. package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
  191. package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
  192. package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
  193. package/dist/generated/static-files/core/types.gen.d.ts +83 -0
  194. package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
  195. package/dist/generated/static-files/index.d.ts +2 -0
  196. package/dist/generated/static-files/index.js +842 -0
  197. package/dist/generated/static-files/sdk.gen.d.ts +43 -0
  198. package/dist/generated/static-files/types.gen.d.ts +214 -0
  199. package/dist/generated/storage/client/client.gen.d.ts +2 -0
  200. package/dist/generated/storage/client/index.d.ts +10 -0
  201. package/dist/generated/storage/client/types.gen.d.ts +120 -0
  202. package/dist/generated/storage/client/utils.gen.d.ts +37 -0
  203. package/dist/generated/storage/client.gen.d.ts +12 -0
  204. package/dist/generated/storage/core/auth.gen.d.ts +25 -0
  205. package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
  206. package/dist/generated/storage/core/params.gen.d.ts +43 -0
  207. package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
  208. package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
  209. package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
  210. package/dist/generated/storage/core/types.gen.d.ts +83 -0
  211. package/dist/generated/storage/core/utils.gen.d.ts +19 -0
  212. package/dist/generated/storage/index.d.ts +2 -0
  213. package/dist/generated/storage/index.js +6 -0
  214. package/dist/generated/storage/sdk.gen.d.ts +858 -0
  215. package/dist/generated/storage/types.gen.d.ts +12105 -0
  216. package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
  217. package/dist/generated/unfurl/client/index.d.ts +10 -0
  218. package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
  219. package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
  220. package/dist/generated/unfurl/client.gen.d.ts +12 -0
  221. package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
  222. package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
  223. package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
  224. package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
  225. package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
  226. package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
  227. package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
  228. package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
  229. package/dist/generated/unfurl/index.d.ts +2 -0
  230. package/dist/generated/unfurl/index.js +835 -0
  231. package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
  232. package/dist/generated/unfurl/types.gen.d.ts +125 -0
  233. package/dist/src/config.d.ts +51 -0
  234. package/dist/src/entities/agent-sessions/agent-session.d.ts +45 -0
  235. package/dist/src/entities/agent-sessions/namespace.d.ts +18 -0
  236. package/dist/src/entities/bots/namespace.d.ts +25 -0
  237. package/dist/src/entities/calls/call-record.d.ts +55 -0
  238. package/dist/src/entities/calls/namespace.d.ts +9 -0
  239. package/dist/src/entities/channels/channel.d.ts +88 -0
  240. package/dist/src/entities/channels/message.d.ts +64 -0
  241. package/dist/src/entities/channels/namespace.d.ts +30 -0
  242. package/dist/src/entities/channels/post.d.ts +20 -0
  243. package/dist/src/entities/channels/thread.d.ts +30 -0
  244. package/dist/src/entities/chats/chat.d.ts +55 -0
  245. package/dist/src/entities/chats/namespace.d.ts +14 -0
  246. package/dist/src/entities/crm/comment.d.ts +43 -0
  247. package/dist/src/entities/crm/company.d.ts +70 -0
  248. package/dist/src/entities/crm/contact.d.ts +48 -0
  249. package/dist/src/entities/crm/namespace.d.ts +22 -0
  250. package/dist/src/entities/documents/comment.d.ts +41 -0
  251. package/dist/src/entities/documents/document.d.ts +130 -0
  252. package/dist/src/entities/documents/namespace.d.ts +43 -0
  253. package/dist/src/entities/documents/system-skill.d.ts +16 -0
  254. package/dist/src/entities/email/attachment.d.ts +36 -0
  255. package/dist/src/entities/email/label.d.ts +31 -0
  256. package/dist/src/entities/email/link.d.ts +29 -0
  257. package/dist/src/entities/email/message.d.ts +58 -0
  258. package/dist/src/entities/email/namespace.d.ts +49 -0
  259. package/dist/src/entities/email/thread.d.ts +88 -0
  260. package/dist/src/entities/entity.d.ts +101 -0
  261. package/dist/src/entities/favorites/namespace.d.ts +19 -0
  262. package/dist/src/entities/foreign/foreign-entity.d.ts +30 -0
  263. package/dist/src/entities/foreign/namespace.d.ts +7 -0
  264. package/dist/src/entities/notifications/namespace.d.ts +29 -0
  265. package/dist/src/entities/notifications/notification.d.ts +50 -0
  266. package/dist/src/entities/pins/namespace.d.ts +19 -0
  267. package/dist/src/entities/projects/namespace.d.ts +13 -0
  268. package/dist/src/entities/projects/project.d.ts +42 -0
  269. package/dist/src/entities/properties/namespace.d.ts +47 -0
  270. package/dist/src/entities/properties/property-definition.d.ts +45 -0
  271. package/dist/src/entities/properties/property-option.d.ts +32 -0
  272. package/dist/src/entities/search.d.ts +23 -0
  273. package/dist/src/entities/tasks/namespace.d.ts +21 -0
  274. package/dist/src/entities/tasks/task.d.ts +34 -0
  275. package/dist/src/entities/teams/namespace.d.ts +12 -0
  276. package/dist/src/entities/teams/team.d.ts +40 -0
  277. package/dist/src/entities/users/namespace.d.ts +10 -0
  278. package/dist/src/entities/users/user.d.ts +43 -0
  279. package/dist/src/entities/webhooks/namespace.d.ts +31 -0
  280. package/dist/src/entities/webhooks/webhook.d.ts +88 -0
  281. package/dist/src/events/hydrate/channel.d.ts +85 -0
  282. package/dist/src/events/hydrate/document.d.ts +54 -0
  283. package/dist/src/events/receiver.d.ts +51 -0
  284. package/dist/src/events/types.d.ts +40 -0
  285. package/dist/src/events/verify.d.ts +13 -0
  286. package/dist/src/local-portmap.d.ts +8 -0
  287. package/dist/src/macro.d.ts +62 -0
  288. package/dist/src/macro.js +4215 -0
  289. package/dist/src/mentions.d.ts +37 -0
  290. package/dist/src/raw.d.ts +12 -0
  291. package/dist/src/utils/client.d.ts +53 -0
  292. package/dist/src/utils/index.d.ts +4 -0
  293. package/dist/src/utils/lazy.d.ts +18 -0
  294. package/dist/src/utils/pagination.d.ts +7 -0
  295. package/dist/src/utils/unwrap.d.ts +23 -0
  296. package/package.json +49 -0
@@ -0,0 +1,1352 @@
1
+ export type ClientOptions = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ export type AiResponseMetadata = {
5
+ messageId: string;
6
+ summary: string;
7
+ };
8
+ export type ApiUserNotification = Entity & {
9
+ /**
10
+ * When the notification was created.
11
+ */
12
+ created_at: string;
13
+ /**
14
+ * When the notification was deleted.
15
+ */
16
+ deleted_at?: string | null;
17
+ /**
18
+ * Whether the notification is marked as done.
19
+ */
20
+ done: boolean;
21
+ /**
22
+ * The notification ID.
23
+ */
24
+ id: string;
25
+ /**
26
+ * The notification event type string (e.g. "channel_mention").
27
+ * TODO make this a new type
28
+ */
29
+ notification_event_type: string;
30
+ /**
31
+ * Deserialized notification metadata.
32
+ */
33
+ notification_metadata: NotifEvent;
34
+ /**
35
+ * The user who owns this notification.
36
+ */
37
+ owner_id: string;
38
+ /**
39
+ * The user who triggered the notification.
40
+ */
41
+ sender_id?: string | null;
42
+ /**
43
+ * Whether the notification has been sent.
44
+ */
45
+ sent: boolean;
46
+ /**
47
+ * When the notification was last updated.
48
+ */
49
+ updated_at: string;
50
+ /**
51
+ * When the notification was viewed/seen.
52
+ */
53
+ viewed_at?: string | null;
54
+ };
55
+ /**
56
+ * Request body for bulk-fetching notifications by event item IDs.
57
+ */
58
+ export type BulkGetByEventItemIdsRequest = {
59
+ /**
60
+ * The event item IDs to filter notifications by.
61
+ */
62
+ eventItemIds: Array<string>;
63
+ };
64
+ /**
65
+ * A calendar event alarm came due. Like [`ReminderMetadata`], these are
66
+ * self-notifications: `sender_id` must stay `None` or the only recipient is
67
+ * filtered out. Everything the alert renders rides in here so the
68
+ * dispatcher never has to resolve the event again at display time.
69
+ */
70
+ export type CalendarEventReminderMetadata = {
71
+ /**
72
+ * Instance end, for timed events.
73
+ */
74
+ endsAt?: string | null;
75
+ /**
76
+ * The calendar event entity the alarm belongs to.
77
+ */
78
+ eventId: string;
79
+ /**
80
+ * Minutes before the start the alarm was configured to fire.
81
+ */
82
+ minutesBefore: number;
83
+ /**
84
+ * Stable occurrence key of the instance that is starting.
85
+ */
86
+ occurrenceKey: string;
87
+ /**
88
+ * Instance start date, for all-day events.
89
+ */
90
+ startDate?: string | null;
91
+ /**
92
+ * Instance start, for timed events.
93
+ */
94
+ startsAt?: string | null;
95
+ /**
96
+ * IANA zone for rendering local clock times, when known.
97
+ */
98
+ timeZone?: string | null;
99
+ /**
100
+ * Event display title at dispatch time.
101
+ */
102
+ title: string;
103
+ };
104
+ /**
105
+ * Metadata for a notification that a call has started in a channel.
106
+ *
107
+ * Mirrors the producer-side `CallStartedNotification` in the `call` crate:
108
+ * both serialize the same wire shape (snake_case fields) under the same
109
+ * `call_started` [`Notification::TYPE_NAME`]. This type is the read-side
110
+ * model used by [`crate::NotifEvent`]; the producer keeps its own type
111
+ * because it additionally builds the incoming-call APNS/VoIP push.
112
+ *
113
+ * Rows persisted before the type name was normalized used the kebab-case
114
+ * `call-started`; the [`crate::NotifEvent::CallStarted`] variant carries a
115
+ * `#[serde(alias = "call-started")]` so those rows still deserialize.
116
+ */
117
+ export type CallStartedMetadata = {
118
+ /**
119
+ * The name of the channel the call started in, when available.
120
+ */
121
+ channel_name?: string | null;
122
+ /**
123
+ * Profile picture URL of the user who started the call, when available.
124
+ */
125
+ sender_profile_picture_url?: string | null;
126
+ };
127
+ /**
128
+ * Metadata for when a user is invited to a channel.
129
+ */
130
+ export type ChannelInviteMetadata = {
131
+ /**
132
+ * The name of the channel
133
+ */
134
+ channelName?: string;
135
+ /**
136
+ * The user who sent the invitation
137
+ */
138
+ invitedBy: string;
139
+ /**
140
+ * Message content to show in the invite email, when the invite was triggered by a message.
141
+ */
142
+ messageContent?: string | null;
143
+ /**
144
+ * The sender's profile picture URL, if available.
145
+ */
146
+ senderProfilePictureUrl?: string | null;
147
+ };
148
+ export type ChannelMentionMetadata = CommonChannelMetadata & {
149
+ /**
150
+ * The message content
151
+ */
152
+ messageContent: string;
153
+ /**
154
+ * The message you were mentioned in
155
+ */
156
+ messageId: string;
157
+ /**
158
+ * Display name for non-user senders such as bots
159
+ */
160
+ senderDisplayName?: string | null;
161
+ senderProfilePictureUrl?: string | null;
162
+ /**
163
+ * the id of the thread
164
+ */
165
+ threadId?: string | null;
166
+ };
167
+ export type ChannelMessageSendMetadata = CommonChannelMetadata & {
168
+ /**
169
+ * The content of the message
170
+ */
171
+ messageContent?: string;
172
+ /**
173
+ * The message id
174
+ */
175
+ messageId: string;
176
+ /**
177
+ * The user who sent the message, when sent by a user
178
+ */
179
+ sender?: string | null;
180
+ /**
181
+ * Display name for non-user senders such as bots
182
+ */
183
+ senderDisplayName?: string | null;
184
+ senderProfilePictureUrl?: string | null;
185
+ };
186
+ export type ChannelReplyMetadata = CommonChannelMetadata & {
187
+ /**
188
+ * The message content
189
+ */
190
+ messageContent: string;
191
+ /**
192
+ * The id of the new message
193
+ */
194
+ messageId: string;
195
+ /**
196
+ * Display name for non-user senders such as bots
197
+ */
198
+ senderDisplayName?: string | null;
199
+ senderProfilePictureUrl?: string | null;
200
+ /**
201
+ * The id of the thread that has the reply
202
+ */
203
+ threadId: string;
204
+ /**
205
+ * The user who sent the root message of the thread
206
+ */
207
+ threadParentSenderId?: string | null;
208
+ /**
209
+ * The sender id of the reply, when sent by a user
210
+ */
211
+ userId?: string | null;
212
+ };
213
+ export type ChannelType = 'public' | 'private' | 'directMessage' | 'team';
214
+ /**
215
+ * Notification sent when someone comments on a document the user owns.
216
+ */
217
+ export type CommentedOnDocumentMetadata = {
218
+ /**
219
+ * the comment id
220
+ */
221
+ commentId: number;
222
+ /**
223
+ * The name of the document.
224
+ */
225
+ documentName: string;
226
+ /**
227
+ * The file type of the document.
228
+ */
229
+ fileType?: string | null;
230
+ /**
231
+ * The owner of the document.
232
+ */
233
+ owner: string;
234
+ senderProfilePictureUrl?: string | null;
235
+ subType?: null | NotificationDocumentSubType;
236
+ /**
237
+ * the text of the comment
238
+ */
239
+ text: string;
240
+ /**
241
+ * the thread id
242
+ */
243
+ threadId: number;
244
+ };
245
+ /**
246
+ * Common metadata for notifications on channels
247
+ */
248
+ export type CommonChannelMetadata = {
249
+ channelName?: string;
250
+ channelType: ChannelType;
251
+ };
252
+ /**
253
+ * Concrete schema type for [`RealtimeNotif`] with `serde_json::Value` metadata.
254
+ *
255
+ * Used for OpenAPI schema generation — serializes identically to
256
+ * `RealtimeNotif<serde_json::Value>`.
257
+ */
258
+ export type ConnGatewayNotificationPayload = RealtimeNotifTaggedContentValue;
259
+ export type CreateNotification = Entity & {
260
+ /**
261
+ * Custom metadata that may be needed for the notification
262
+ */
263
+ metadata?: unknown;
264
+ /**
265
+ * The type of notification
266
+ */
267
+ notification_event_type: string;
268
+ /**
269
+ * The service that created the notification
270
+ */
271
+ service_sender: string;
272
+ };
273
+ /**
274
+ * Request to register or unregister a device for push notifications.
275
+ */
276
+ export type DeviceRequest = {
277
+ /**
278
+ * The device platform type (iOS or Android).
279
+ */
280
+ deviceType: DeviceType;
281
+ /**
282
+ * The device push notification token.
283
+ */
284
+ token: string;
285
+ };
286
+ export type DeviceType = 'ios' | 'android' | 'iosvoip';
287
+ /**
288
+ * Someone mentioned a document in a channel
289
+ */
290
+ export type DocumentMentionMetadata = ChannelMentionMetadata & {
291
+ /**
292
+ * The name of the document
293
+ */
294
+ documentName: string;
295
+ /**
296
+ * The file type of the document
297
+ */
298
+ fileType?: string | null;
299
+ /**
300
+ * The owner of the document
301
+ */
302
+ owner: string;
303
+ subType?: null | NotificationDocumentSubType;
304
+ };
305
+ /**
306
+ * Empty response is required due to custom fetch forcing `response.json()`
307
+ */
308
+ export type EmptyResponse = {
309
+ [key: string]: unknown;
310
+ };
311
+ /**
312
+ * The Entity describes the minimum amount of information required to describe a unique thing in Macro
313
+ * This contains the type of the entity [EntityType] and the string id of that entity
314
+ */
315
+ export type Entity = {
316
+ /**
317
+ * The id of that entity
318
+ */
319
+ entity_id: string;
320
+ /**
321
+ * The type of entity we are describing
322
+ */
323
+ entity_type: EntityType;
324
+ };
325
+ /**
326
+ * The type of an entity in Macro
327
+ */
328
+ export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
329
+ /**
330
+ * A plain old json error response for use with axum.
331
+ * yup, thats it.
332
+ */
333
+ export type ErrorResponse = {
334
+ /**
335
+ * Message to explain failure
336
+ */
337
+ message: string;
338
+ };
339
+ /**
340
+ * The strongly typed response for listing user notifications.
341
+ */
342
+ export type GetAllUserNotificationsResponse = {
343
+ /**
344
+ * The list of items returned.
345
+ */
346
+ items: Array<ApiUserNotification>;
347
+ /**
348
+ * The next page cursor if it exists.
349
+ */
350
+ next_cursor?: string | null;
351
+ };
352
+ /**
353
+ * Response for listing disabled notification types.
354
+ */
355
+ export type GetNotificationTypePreferencesResponse = {
356
+ /**
357
+ * The notification types that the user has disabled.
358
+ */
359
+ disabled_types: Array<string>;
360
+ };
361
+ /**
362
+ * Metadata for a notification that a GitHub pull request check run completed.
363
+ */
364
+ export type GithubPrCheckRun = GithubPrNotificationCommon & {
365
+ /**
366
+ * The display name GitHub reported for the check run.
367
+ */
368
+ checkName: string;
369
+ /**
370
+ * The GitHub numeric id of the check run.
371
+ */
372
+ checkRunGithubId: number;
373
+ /**
374
+ * The raw GitHub check run status.
375
+ */
376
+ checkStatus: string;
377
+ /**
378
+ * The public GitHub URL for the check run.
379
+ */
380
+ checkUrl: string;
381
+ /**
382
+ * When GitHub marked the check run as complete.
383
+ */
384
+ completedAt: string;
385
+ /**
386
+ * The raw GitHub check run conclusion.
387
+ */
388
+ conclusion: string;
389
+ /**
390
+ * The normalized notification state for this check run.
391
+ */
392
+ state: GithubPrCheckRunState;
393
+ };
394
+ /**
395
+ * The normalized result state for a GitHub pull request check-run notification.
396
+ */
397
+ export type GithubPrCheckRunState = 'completed' | 'failed';
398
+ /**
399
+ * Metadata for a notification that a GitHub pull request was commented on.
400
+ */
401
+ export type GithubPrComment = GithubPrNotificationCommon & {
402
+ /**
403
+ * The GitHub numeric id of the comment, when available.
404
+ */
405
+ commentGithubId?: number | null;
406
+ /**
407
+ * The kind of comment that was posted.
408
+ */
409
+ commentKind: GithubPrCommentKind;
410
+ /**
411
+ * A truncated excerpt of the comment body.
412
+ */
413
+ commentSnippet: string;
414
+ /**
415
+ * The public GitHub URL for the comment, when available.
416
+ */
417
+ commentUrl?: string | null;
418
+ };
419
+ /**
420
+ * The kind of GitHub comment that triggered a [`GithubPrComment`] notification.
421
+ */
422
+ export type GithubPrCommentKind = 'issue' | 'review_comment';
423
+ /**
424
+ * The GitHub pull request webhook action that triggered the notification.
425
+ */
426
+ export type GithubPrEventAction = 'opened' | 'reopened' | 'closed';
427
+ /**
428
+ * The normalized lifecycle status for a GitHub pull request notification.
429
+ */
430
+ export type GithubPrEventStatus = 'open' | 'closed' | 'merged';
431
+ /**
432
+ * Metadata for a notification that the user was mentioned on a GitHub pull request.
433
+ */
434
+ export type GithubPrMention = GithubPrNotificationCommon & {
435
+ /**
436
+ * The GitHub numeric id of the comment or review containing the mention, when available.
437
+ */
438
+ commentGithubId?: number | null;
439
+ /**
440
+ * The public GitHub URL for the text containing the mention, when available.
441
+ */
442
+ commentUrl?: string | null;
443
+ /**
444
+ * Where the mention appeared.
445
+ */
446
+ location: GithubPrMentionLocation;
447
+ /**
448
+ * A truncated excerpt of the text containing the mention.
449
+ */
450
+ textSnippet: string;
451
+ };
452
+ /**
453
+ * Where in a GitHub pull request the user was mentioned.
454
+ */
455
+ export type GithubPrMentionLocation = 'pr_body' | 'comment' | 'review' | 'review_comment';
456
+ /**
457
+ * Fields shared by every GitHub pull request notification type.
458
+ *
459
+ * Embedded with `#[serde(flatten)]` so the wire shape keeps these keys at the
460
+ * top level of the metadata object.
461
+ */
462
+ export type GithubPrNotificationCommon = {
463
+ /**
464
+ * A compact label suitable for display in the UI.
465
+ */
466
+ displayName: string;
467
+ /**
468
+ * The source-specific internal foreign entity row id for this pull request.
469
+ */
470
+ foreignEntityId: string;
471
+ /**
472
+ * The external GitHub key, in `owner/repo/pull/number` format.
473
+ */
474
+ githubKey: string;
475
+ /**
476
+ * The GitHub pull request number.
477
+ */
478
+ number: number;
479
+ /**
480
+ * The GitHub repository owner or organization.
481
+ */
482
+ owner: string;
483
+ /**
484
+ * The GitHub repository name.
485
+ */
486
+ repo: string;
487
+ /**
488
+ * The GitHub avatar URL for the sender, when available.
489
+ */
490
+ senderGithubAvatarUrl?: string | null;
491
+ /**
492
+ * The GitHub login for the sender, when available.
493
+ */
494
+ senderGithubLogin?: string | null;
495
+ /**
496
+ * The stable GitHub numeric user id for the sender, serialized as a string.
497
+ */
498
+ senderGithubUserId?: string | null;
499
+ /**
500
+ * The GitHub pull request title. Falls back to `display_name` when GitHub has no title.
501
+ */
502
+ title: string;
503
+ /**
504
+ * The public GitHub URL for the pull request.
505
+ */
506
+ url: string;
507
+ };
508
+ /**
509
+ * Metadata for a notification that a review was submitted on the user's GitHub pull request.
510
+ */
511
+ export type GithubPrReview = GithubPrNotificationCommon & {
512
+ /**
513
+ * The GitHub numeric id of the review, when available.
514
+ */
515
+ reviewGithubId?: number | null;
516
+ /**
517
+ * A truncated excerpt of the review body, when any was written.
518
+ */
519
+ reviewSnippet?: string | null;
520
+ /**
521
+ * The public GitHub URL for the review, when available.
522
+ */
523
+ reviewUrl?: string | null;
524
+ /**
525
+ * The review decision state.
526
+ */
527
+ state: GithubPrReviewState;
528
+ };
529
+ /**
530
+ * The state of a submitted GitHub pull request review.
531
+ */
532
+ export type GithubPrReviewState = 'approved' | 'changes_requested' | 'commented';
533
+ /**
534
+ * Metadata for a GitHub pull request lifecycle notification.
535
+ */
536
+ export type GithubPrStatusChanged = GithubPrNotificationCommon & {
537
+ /**
538
+ * The webhook action that triggered this notification.
539
+ */
540
+ action: GithubPrEventAction;
541
+ /**
542
+ * The pull request base branch, when available.
543
+ */
544
+ baseBranch?: string | null;
545
+ /**
546
+ * The pull request head branch, when available.
547
+ */
548
+ headBranch?: string | null;
549
+ /**
550
+ * When the pull request was merged, when available.
551
+ */
552
+ mergedAt?: string | null;
553
+ previousStatus?: null | GithubPrEventStatus;
554
+ /**
555
+ * The current normalized pull request status.
556
+ */
557
+ status: GithubPrEventStatus;
558
+ };
559
+ /**
560
+ * Metadata for a notification that the user's review was requested on a GitHub pull request.
561
+ */
562
+ export type GithubReviewRequested = GithubPrNotificationCommon & {
563
+ /**
564
+ * The GitHub login of the requested reviewer, when available.
565
+ */
566
+ requestedReviewerGithubLogin?: string | null;
567
+ /**
568
+ * The stable GitHub numeric user id of the requested reviewer, serialized as a string.
569
+ */
570
+ requestedReviewerGithubUserId?: string | null;
571
+ };
572
+ /**
573
+ * Metadata for a notification that a linked inbox's grant has died and the
574
+ * inbox must be reconnected. Fanned out to the inbox owner and every delegate,
575
+ * since any of them holding the Google grant can restore sync.
576
+ */
577
+ export type InboxReauthRequiredMetadata = {
578
+ /**
579
+ * The address of the inbox that needs to be reconnected.
580
+ */
581
+ emailAddress: string;
582
+ };
583
+ /**
584
+ * Metadata for when a user is invited to a team.
585
+ */
586
+ export type InviteToTeamMetadata = {
587
+ /**
588
+ * The user who sent the invitation
589
+ */
590
+ invitedBy: string;
591
+ /**
592
+ * Role/permission level in the team
593
+ */
594
+ role?: string | null;
595
+ /**
596
+ * The sender's profile picture URL, if available.
597
+ */
598
+ senderProfilePictureUrl?: string | null;
599
+ /**
600
+ * The unique identifier of the team
601
+ */
602
+ teamId: string;
603
+ /**
604
+ * The unique identifier of the team invite
605
+ */
606
+ teamInviteId: string;
607
+ /**
608
+ * The name of the team being invited to
609
+ */
610
+ teamName: string;
611
+ };
612
+ /**
613
+ * Metadata for when a item is shared with a user
614
+ */
615
+ export type ItemSharedMetadata = {
616
+ /**
617
+ * The name/title of the shared item (optional)
618
+ */
619
+ itemId: string;
620
+ /**
621
+ * The name/title of the shared item
622
+ */
623
+ itemName?: string | null;
624
+ /**
625
+ * The type of item being shared
626
+ */
627
+ itemType: EntityType;
628
+ /**
629
+ * Permission level granted (read, write, admin, etc.)
630
+ */
631
+ permissionLevel?: string | null;
632
+ sharedBy: string;
633
+ /**
634
+ * List of user IDs that the item is shared with
635
+ */
636
+ userIds: Array<string>;
637
+ };
638
+ export type MacroUserIdStr = string;
639
+ /**
640
+ * Notification sent when a user is mentioned in a document comment.
641
+ */
642
+ export type MentionedInDocumentCommentMetadata = {
643
+ /**
644
+ * the comment id
645
+ */
646
+ commentId: number;
647
+ /**
648
+ * The name of the document.
649
+ */
650
+ documentName: string;
651
+ /**
652
+ * The file type of the document.
653
+ */
654
+ fileType?: string | null;
655
+ /**
656
+ * The mention ID.
657
+ */
658
+ mentionId: string;
659
+ /**
660
+ * The owner of the document.
661
+ */
662
+ owner: string;
663
+ senderProfilePictureUrl?: string | null;
664
+ subType?: null | NotificationDocumentSubType;
665
+ /**
666
+ * the text of the comment
667
+ */
668
+ text: string;
669
+ /**
670
+ * the thread id
671
+ */
672
+ threadId: number;
673
+ };
674
+ export type NewEmailMetadata = {
675
+ sender?: string | null;
676
+ snippet: string;
677
+ subject: string;
678
+ threadId: string;
679
+ toEmail: string;
680
+ };
681
+ /**
682
+ * Mirrors [`model_notifications::NotificationEvent`] but uses `tag` / `content`
683
+ * as the serde adjacently-tagged field names so it can be deserialized from the
684
+ * shape produced by [`UserNotificationRow::into_tagged`] +
685
+ * [`UserNotificationRow::into_json`].
686
+ *
687
+ * Only includes variants whose metadata types implement the `Notification` trait.
688
+ */
689
+ export type NotifEvent = {
690
+ /**
691
+ * Someone mentioned you in a channel.
692
+ */
693
+ content: ChannelMentionMetadata;
694
+ tag: 'channel_mention';
695
+ } | {
696
+ /**
697
+ * Someone mentioned a document in a channel.
698
+ */
699
+ content: DocumentMentionMetadata;
700
+ tag: 'document_mention';
701
+ } | {
702
+ /**
703
+ * User was mentioned in a comment in a document
704
+ */
705
+ content: MentionedInDocumentCommentMetadata;
706
+ tag: 'mentioned_in_document_comment';
707
+ } | {
708
+ /**
709
+ * Someone replied to a document comment thread the user participated in.
710
+ */
711
+ content: RepliedToDocumentCommentThreadMetadata;
712
+ tag: 'replied_to_document_comment_thread';
713
+ } | {
714
+ /**
715
+ * Someone commented on a document the user owns.
716
+ */
717
+ content: CommentedOnDocumentMetadata;
718
+ tag: 'commented_on_document';
719
+ } | {
720
+ /**
721
+ * The user was invited to a channel.
722
+ */
723
+ content: ChannelInviteMetadata;
724
+ tag: 'channel_invite';
725
+ } | {
726
+ /**
727
+ * A user sent a message in a channel.
728
+ */
729
+ content: ChannelMessageSendMetadata;
730
+ tag: 'channel_message_send';
731
+ } | {
732
+ /**
733
+ * Someone replied to a thread in a channel that the user is part of.
734
+ */
735
+ content: ChannelReplyMetadata;
736
+ tag: 'channel_message_reply';
737
+ } | {
738
+ /**
739
+ * A call has started in a channel the user is a member of.
740
+ *
741
+ * The `call-started` alias keeps rows persisted before the type name
742
+ * was normalized to snake_case (`call_started`) deserializable.
743
+ */
744
+ content: CallStartedMetadata;
745
+ tag: 'call_started';
746
+ } | {
747
+ /**
748
+ * A new email has been sent to the user.
749
+ */
750
+ content: NewEmailMetadata;
751
+ tag: 'new_email';
752
+ } | {
753
+ /**
754
+ * A linked inbox's grant died and must be reconnected.
755
+ */
756
+ content: InboxReauthRequiredMetadata;
757
+ tag: 'inbox_reauth_required';
758
+ } | {
759
+ /**
760
+ * A user was invited to a team.
761
+ */
762
+ content: InviteToTeamMetadata;
763
+ tag: 'invite_to_team';
764
+ } | {
765
+ /**
766
+ * A user was assigned to a task.
767
+ */
768
+ content: TaskAssignedMetadata;
769
+ tag: 'task_assigned';
770
+ } | {
771
+ /**
772
+ * A reminder the user set for themselves came due.
773
+ */
774
+ content: ReminderMetadata;
775
+ tag: 'reminder';
776
+ } | {
777
+ /**
778
+ * A calendar event alarm came due.
779
+ */
780
+ content: CalendarEventReminderMetadata;
781
+ tag: 'calendar_event_reminder';
782
+ } | {
783
+ /**
784
+ * An AI assistant responded to a chat.
785
+ */
786
+ content: AiResponseMetadata;
787
+ tag: 'ai_response';
788
+ } | {
789
+ /**
790
+ * A GitHub pull request changed lifecycle state.
791
+ *
792
+ * The `github_pr_event` alias keeps rows and queue messages persisted
793
+ * before the rename deserializable.
794
+ */
795
+ content: GithubPrStatusChanged;
796
+ tag: 'github_pr_status_changed';
797
+ } | {
798
+ /**
799
+ * A GitHub pull request check run completed.
800
+ */
801
+ content: GithubPrCheckRun;
802
+ tag: 'github_pr_check_run';
803
+ } | {
804
+ /**
805
+ * The user's review was requested on a GitHub pull request.
806
+ */
807
+ content: GithubReviewRequested;
808
+ tag: 'github_review_requested';
809
+ } | {
810
+ /**
811
+ * A GitHub pull request was commented on.
812
+ */
813
+ content: GithubPrComment;
814
+ tag: 'github_pr_comment';
815
+ } | {
816
+ /**
817
+ * The user was mentioned on a GitHub pull request.
818
+ */
819
+ content: GithubPrMention;
820
+ tag: 'github_pr_mention';
821
+ } | {
822
+ /**
823
+ * A review was submitted on the user's GitHub pull request.
824
+ */
825
+ content: GithubPrReview;
826
+ tag: 'github_pr_review';
827
+ };
828
+ /**
829
+ * the notification ids that we are bulk updating
830
+ */
831
+ export type NotificationBulkRequest = {
832
+ /**
833
+ * The ids of the notifications to handle
834
+ */
835
+ notificationIds: Array<string>;
836
+ };
837
+ /**
838
+ * The sub type of a document in a notification.
839
+ * Serializes as `{ "type": "task" }` matching the storage service pattern.
840
+ */
841
+ export type NotificationDocumentSubType = {
842
+ type: 'task';
843
+ } | {
844
+ type: 'snippet';
845
+ } | {
846
+ type: 'skill';
847
+ };
848
+ export type NotificationServiceApiVersion = 'v1';
849
+ /**
850
+ * newtype wrapper for the the typename of a Notification
851
+ */
852
+ export type NotificationTypeName = string;
853
+ export type PushNotificationData = {
854
+ /**
855
+ * The id of the notification record (UserNotification.id)
856
+ */
857
+ notificationId: string;
858
+ /**
859
+ * The sender's profile picture URL, used by the Notification Service Extension
860
+ * to download and attach as a rich notification image.
861
+ */
862
+ senderProfilePictureUrl?: string | null;
863
+ };
864
+ /**
865
+ * the value of the inner payload inside [ConnGatewayNotification]
866
+ */
867
+ export type RealtimeNotifTaggedContentValue = Entity & {
868
+ /**
869
+ * When the notification was created.
870
+ */
871
+ created_at: string;
872
+ /**
873
+ * When the notification was deleted.
874
+ */
875
+ deleted_at?: string | null;
876
+ /**
877
+ * Whether the notification is marked as done.
878
+ */
879
+ done: boolean;
880
+ /**
881
+ * The notification event type string (e.g. "channel_mention").
882
+ * TODO make this a new type
883
+ */
884
+ notification_event_type: string;
885
+ /**
886
+ * The notification ID.
887
+ */
888
+ notification_id: string;
889
+ /**
890
+ * A notification metadata value tagged with the notification event type.
891
+ */
892
+ notification_metadata: {
893
+ content: unknown;
894
+ tag: NotificationTypeName;
895
+ };
896
+ sender_id?: null | MacroUserIdStr;
897
+ /**
898
+ * Whether the notification has been sent.
899
+ */
900
+ sent: boolean;
901
+ /**
902
+ * When the notification was last updated.
903
+ */
904
+ updated_at: string;
905
+ /**
906
+ * When the notification was viewed/seen.
907
+ */
908
+ viewed_at?: string | null;
909
+ };
910
+ /**
911
+ * Metadata for a reminder the user set for themselves coming due.
912
+ *
913
+ * There is no sender: a reminder is self-set, so the dispatcher sends it with
914
+ * `sender_id: None` (a recipient who is also the sender is filtered out of
915
+ * their own notification). Every formatter here must therefore work without
916
+ * one.
917
+ *
918
+ * The associated entity, when there is one, lives on the notification row
919
+ * rather than in here, and clients resolve its name from that — so the
920
+ * dispatcher does not have to look up a name across five entity types.
921
+ */
922
+ export type ReminderMetadata = {
923
+ /**
924
+ * What the user asked to be reminded about.
925
+ */
926
+ description: string;
927
+ /**
928
+ * The reminder that fired.
929
+ */
930
+ reminderId: string;
931
+ /**
932
+ * Which firing this is — the occurrence the reminder came due for.
933
+ *
934
+ * What distinguishes two firings of the same recurring reminder, which are
935
+ * otherwise identical: same id, same description. The collapse key is
936
+ * built from it, so without it Tuesday's alert would replace Monday's
937
+ * unread one on the lock screen.
938
+ *
939
+ * Optional because notifications written before recurring dispatch existed
940
+ * have no such field, and they still have to read back.
941
+ */
942
+ scheduledFor?: string | null;
943
+ };
944
+ /**
945
+ * Notification sent when someone replies to a document comment thread.
946
+ */
947
+ export type RepliedToDocumentCommentThreadMetadata = {
948
+ /**
949
+ * the comment id
950
+ */
951
+ commentId: number;
952
+ /**
953
+ * The name of the document.
954
+ */
955
+ documentName: string;
956
+ /**
957
+ * The file type of the document.
958
+ */
959
+ fileType?: string | null;
960
+ /**
961
+ * The owner of the document.
962
+ */
963
+ owner: string;
964
+ senderProfilePictureUrl?: string | null;
965
+ subType?: null | NotificationDocumentSubType;
966
+ /**
967
+ * the text of the comment
968
+ */
969
+ text: string;
970
+ /**
971
+ * the thread id
972
+ */
973
+ threadId: number;
974
+ };
975
+ /**
976
+ * Metadata for when a user is assigned to a task
977
+ */
978
+ export type TaskAssignedMetadata = {
979
+ /**
980
+ * The user who assigned the task
981
+ */
982
+ assignedBy: string;
983
+ senderProfilePictureUrl?: string | null;
984
+ subType?: null | NotificationDocumentSubType;
985
+ /**
986
+ * The unique identifier of the task
987
+ */
988
+ taskId: string;
989
+ /**
990
+ * The name of the task (optional)
991
+ */
992
+ taskName?: string | null;
993
+ };
994
+ export type UnsubscribeItemPathParams = {
995
+ item_id: string;
996
+ item_type: string;
997
+ };
998
+ export type UserUnsubscribe = {
999
+ /**
1000
+ * The item id
1001
+ */
1002
+ item_id: string;
1003
+ /**
1004
+ * The item type
1005
+ */
1006
+ item_type: string;
1007
+ };
1008
+ export type HealthHandlerData = {
1009
+ body?: never;
1010
+ path?: never;
1011
+ query?: never;
1012
+ url: '/health';
1013
+ };
1014
+ export type HealthHandlerResponses = {
1015
+ /**
1016
+ * health
1017
+ */
1018
+ 200: EmptyResponse;
1019
+ };
1020
+ export type HealthHandlerResponse = HealthHandlerResponses[keyof HealthHandlerResponses];
1021
+ export type GetUnsubscribesData = {
1022
+ body?: never;
1023
+ path?: never;
1024
+ query?: never;
1025
+ url: '/unsubscribe';
1026
+ };
1027
+ export type GetUnsubscribesErrors = {
1028
+ 401: ErrorResponse;
1029
+ 500: ErrorResponse;
1030
+ };
1031
+ export type GetUnsubscribesError = GetUnsubscribesErrors[keyof GetUnsubscribesErrors];
1032
+ export type GetUnsubscribesResponses = {
1033
+ 200: Array<UserUnsubscribe>;
1034
+ };
1035
+ export type GetUnsubscribesResponse = GetUnsubscribesResponses[keyof GetUnsubscribesResponses];
1036
+ export type UnsubscribeEmailData = {
1037
+ body?: never;
1038
+ path?: never;
1039
+ query?: never;
1040
+ url: '/unsubscribe/email';
1041
+ };
1042
+ export type UnsubscribeEmailErrors = {
1043
+ 404: ErrorResponse;
1044
+ 500: ErrorResponse;
1045
+ };
1046
+ export type UnsubscribeEmailError = UnsubscribeEmailErrors[keyof UnsubscribeEmailErrors];
1047
+ export type UnsubscribeEmailResponses = {
1048
+ 200: EmptyResponse;
1049
+ };
1050
+ export type UnsubscribeEmailResponse = UnsubscribeEmailResponses[keyof UnsubscribeEmailResponses];
1051
+ export type RemoveUnsubscribeItemData = {
1052
+ body?: never;
1053
+ path: {
1054
+ item_type: string;
1055
+ item_id: string;
1056
+ };
1057
+ query?: never;
1058
+ url: '/unsubscribe/item/{item_type}/{item_id}';
1059
+ };
1060
+ export type RemoveUnsubscribeItemErrors = {
1061
+ 401: ErrorResponse;
1062
+ 500: ErrorResponse;
1063
+ };
1064
+ export type RemoveUnsubscribeItemError = RemoveUnsubscribeItemErrors[keyof RemoveUnsubscribeItemErrors];
1065
+ export type RemoveUnsubscribeItemResponses = {
1066
+ 200: EmptyResponse;
1067
+ };
1068
+ export type RemoveUnsubscribeItemResponse = RemoveUnsubscribeItemResponses[keyof RemoveUnsubscribeItemResponses];
1069
+ export type UnsubscribeItemData = {
1070
+ body?: never;
1071
+ path: {
1072
+ item_type: string;
1073
+ item_id: string;
1074
+ };
1075
+ query?: never;
1076
+ url: '/unsubscribe/item/{item_type}/{item_id}';
1077
+ };
1078
+ export type UnsubscribeItemErrors = {
1079
+ 401: ErrorResponse;
1080
+ 500: ErrorResponse;
1081
+ };
1082
+ export type UnsubscribeItemError = UnsubscribeItemErrors[keyof UnsubscribeItemErrors];
1083
+ export type UnsubscribeItemResponses = {
1084
+ 200: EmptyResponse;
1085
+ };
1086
+ export type UnsubscribeItemResponse = UnsubscribeItemResponses[keyof UnsubscribeItemResponses];
1087
+ export type RemoveUnsubscribeAllData = {
1088
+ body?: never;
1089
+ path?: never;
1090
+ query?: never;
1091
+ url: '/unsubscribe/mute';
1092
+ };
1093
+ export type RemoveUnsubscribeAllErrors = {
1094
+ 401: ErrorResponse;
1095
+ 500: ErrorResponse;
1096
+ };
1097
+ export type RemoveUnsubscribeAllError = RemoveUnsubscribeAllErrors[keyof RemoveUnsubscribeAllErrors];
1098
+ export type RemoveUnsubscribeAllResponses = {
1099
+ 200: EmptyResponse;
1100
+ };
1101
+ export type RemoveUnsubscribeAllResponse = RemoveUnsubscribeAllResponses[keyof RemoveUnsubscribeAllResponses];
1102
+ export type UnsubscribeAllData = {
1103
+ body?: never;
1104
+ path?: never;
1105
+ query?: never;
1106
+ url: '/unsubscribe/mute';
1107
+ };
1108
+ export type UnsubscribeAllErrors = {
1109
+ 401: ErrorResponse;
1110
+ 500: ErrorResponse;
1111
+ };
1112
+ export type UnsubscribeAllError = UnsubscribeAllErrors[keyof UnsubscribeAllErrors];
1113
+ export type UnsubscribeAllResponses = {
1114
+ 200: EmptyResponse;
1115
+ };
1116
+ export type UnsubscribeAllResponse = UnsubscribeAllResponses[keyof UnsubscribeAllResponses];
1117
+ export type ListTypedNotificationsData = {
1118
+ body?: never;
1119
+ path?: never;
1120
+ query?: {
1121
+ /**
1122
+ * Size limit per page.
1123
+ */
1124
+ limit?: number;
1125
+ /**
1126
+ * Cursor value. Base64 encoded timestamp and item id.
1127
+ */
1128
+ cursor?: string;
1129
+ };
1130
+ url: '/v1/user_notifications';
1131
+ };
1132
+ export type ListTypedNotificationsErrors = {
1133
+ 400: ErrorResponse;
1134
+ 401: ErrorResponse;
1135
+ 500: ErrorResponse;
1136
+ };
1137
+ export type ListTypedNotificationsError = ListTypedNotificationsErrors[keyof ListTypedNotificationsErrors];
1138
+ export type ListTypedNotificationsResponses = {
1139
+ 200: GetAllUserNotificationsResponse;
1140
+ };
1141
+ export type ListTypedNotificationsResponse = ListTypedNotificationsResponses[keyof ListTypedNotificationsResponses];
1142
+ export type BulkGetTypedNotificationsByEventItemIdsData = {
1143
+ body: BulkGetByEventItemIdsRequest;
1144
+ path?: never;
1145
+ query?: {
1146
+ /**
1147
+ * Size limit per page. Default 20, max 500.
1148
+ */
1149
+ limit?: number;
1150
+ /**
1151
+ * Cursor value. Base64 encoded timestamp and item id.
1152
+ */
1153
+ cursor?: string;
1154
+ };
1155
+ url: '/v1/user_notifications/item/bulk';
1156
+ };
1157
+ export type BulkGetTypedNotificationsByEventItemIdsErrors = {
1158
+ 400: ErrorResponse;
1159
+ 401: ErrorResponse;
1160
+ 500: ErrorResponse;
1161
+ };
1162
+ export type BulkGetTypedNotificationsByEventItemIdsError = BulkGetTypedNotificationsByEventItemIdsErrors[keyof BulkGetTypedNotificationsByEventItemIdsErrors];
1163
+ export type BulkGetTypedNotificationsByEventItemIdsResponses = {
1164
+ 200: GetAllUserNotificationsResponse;
1165
+ };
1166
+ export type BulkGetTypedNotificationsByEventItemIdsResponse = BulkGetTypedNotificationsByEventItemIdsResponses[keyof BulkGetTypedNotificationsByEventItemIdsResponses];
1167
+ export type GetTypedNotificationsByEventItemIdData = {
1168
+ body?: never;
1169
+ path: {
1170
+ /**
1171
+ * The event item ID
1172
+ */
1173
+ event_item_id: string;
1174
+ };
1175
+ query?: {
1176
+ /**
1177
+ * Size limit per page.
1178
+ */
1179
+ limit?: number;
1180
+ /**
1181
+ * Cursor value. Base64 encoded timestamp and item id.
1182
+ */
1183
+ cursor?: string;
1184
+ };
1185
+ url: '/v1/user_notifications/item/{event_item_id}';
1186
+ };
1187
+ export type GetTypedNotificationsByEventItemIdErrors = {
1188
+ 400: ErrorResponse;
1189
+ 401: ErrorResponse;
1190
+ 500: ErrorResponse;
1191
+ };
1192
+ export type GetTypedNotificationsByEventItemIdError = GetTypedNotificationsByEventItemIdErrors[keyof GetTypedNotificationsByEventItemIdErrors];
1193
+ export type GetTypedNotificationsByEventItemIdResponses = {
1194
+ 200: GetAllUserNotificationsResponse;
1195
+ };
1196
+ export type GetTypedNotificationsByEventItemIdResponse = GetTypedNotificationsByEventItemIdResponses[keyof GetTypedNotificationsByEventItemIdResponses];
1197
+ export type GetNotificationTypePreferencesData = {
1198
+ body?: never;
1199
+ path?: never;
1200
+ query?: never;
1201
+ url: '/v1/user_notifications/preferences';
1202
+ };
1203
+ export type GetNotificationTypePreferencesErrors = {
1204
+ 401: ErrorResponse;
1205
+ 500: ErrorResponse;
1206
+ };
1207
+ export type GetNotificationTypePreferencesError = GetNotificationTypePreferencesErrors[keyof GetNotificationTypePreferencesErrors];
1208
+ export type GetNotificationTypePreferencesResponses = {
1209
+ 200: GetNotificationTypePreferencesResponse;
1210
+ };
1211
+ export type GetNotificationTypePreferencesResponse2 = GetNotificationTypePreferencesResponses[keyof GetNotificationTypePreferencesResponses];
1212
+ export type DisableNotificationTypeData = {
1213
+ body?: never;
1214
+ path: {
1215
+ /**
1216
+ * The notification event type to disable
1217
+ */
1218
+ notification_event_type: string;
1219
+ };
1220
+ query?: never;
1221
+ url: '/v1/user_notifications/preferences/{notification_event_type}/disable';
1222
+ };
1223
+ export type DisableNotificationTypeErrors = {
1224
+ 400: ErrorResponse;
1225
+ 401: ErrorResponse;
1226
+ 500: ErrorResponse;
1227
+ };
1228
+ export type DisableNotificationTypeError = DisableNotificationTypeErrors[keyof DisableNotificationTypeErrors];
1229
+ export type DisableNotificationTypeResponses = {
1230
+ 200: unknown;
1231
+ };
1232
+ export type EnableNotificationTypeData = {
1233
+ body?: never;
1234
+ path: {
1235
+ /**
1236
+ * The notification event type to enable
1237
+ */
1238
+ notification_event_type: string;
1239
+ };
1240
+ query?: never;
1241
+ url: '/v1/user_notifications/preferences/{notification_event_type}/enable';
1242
+ };
1243
+ export type EnableNotificationTypeErrors = {
1244
+ 401: ErrorResponse;
1245
+ 500: ErrorResponse;
1246
+ };
1247
+ export type EnableNotificationTypeError = EnableNotificationTypeErrors[keyof EnableNotificationTypeErrors];
1248
+ export type EnableNotificationTypeResponses = {
1249
+ 200: unknown;
1250
+ };
1251
+ export type GetTypedNotificationByIdData = {
1252
+ body?: never;
1253
+ path: {
1254
+ /**
1255
+ * ID of the notification
1256
+ */
1257
+ notification_id: string;
1258
+ };
1259
+ query?: never;
1260
+ url: '/v1/user_notifications/{notification_id}';
1261
+ };
1262
+ export type GetTypedNotificationByIdErrors = {
1263
+ 400: ErrorResponse;
1264
+ 401: ErrorResponse;
1265
+ 404: ErrorResponse;
1266
+ 500: ErrorResponse;
1267
+ };
1268
+ export type GetTypedNotificationByIdError = GetTypedNotificationByIdErrors[keyof GetTypedNotificationByIdErrors];
1269
+ export type GetTypedNotificationByIdResponses = {
1270
+ 200: ApiUserNotification;
1271
+ };
1272
+ export type GetTypedNotificationByIdResponse = GetTypedNotificationByIdResponses[keyof GetTypedNotificationByIdResponses];
1273
+ export type BulkDeleteUserNotificationsV2Data = {
1274
+ body: NotificationBulkRequest;
1275
+ path?: never;
1276
+ query?: never;
1277
+ url: '/v2/user_notifications/bulk';
1278
+ };
1279
+ export type BulkDeleteUserNotificationsV2Errors = {
1280
+ 400: ErrorResponse;
1281
+ 401: ErrorResponse;
1282
+ 500: ErrorResponse;
1283
+ };
1284
+ export type BulkDeleteUserNotificationsV2Error = BulkDeleteUserNotificationsV2Errors[keyof BulkDeleteUserNotificationsV2Errors];
1285
+ export type BulkDeleteUserNotificationsV2Responses = {
1286
+ 200: unknown;
1287
+ };
1288
+ export type BulkMarkNotificationsDoneData = {
1289
+ body: NotificationBulkRequest;
1290
+ path?: never;
1291
+ query?: never;
1292
+ url: '/v2/user_notifications/bulk/done';
1293
+ };
1294
+ export type BulkMarkNotificationsDoneErrors = {
1295
+ 400: ErrorResponse;
1296
+ 401: ErrorResponse;
1297
+ 500: ErrorResponse;
1298
+ };
1299
+ export type BulkMarkNotificationsDoneError = BulkMarkNotificationsDoneErrors[keyof BulkMarkNotificationsDoneErrors];
1300
+ export type BulkMarkNotificationsDoneResponses = {
1301
+ 200: unknown;
1302
+ };
1303
+ export type BulkMarkNotificationsSeenData = {
1304
+ body: NotificationBulkRequest;
1305
+ path?: never;
1306
+ query?: never;
1307
+ url: '/v2/user_notifications/bulk/seen';
1308
+ };
1309
+ export type BulkMarkNotificationsSeenErrors = {
1310
+ 400: ErrorResponse;
1311
+ 401: ErrorResponse;
1312
+ 500: ErrorResponse;
1313
+ };
1314
+ export type BulkMarkNotificationsSeenError = BulkMarkNotificationsSeenErrors[keyof BulkMarkNotificationsSeenErrors];
1315
+ export type BulkMarkNotificationsSeenResponses = {
1316
+ 200: unknown;
1317
+ };
1318
+ export type BulkMarkNotificationsUndoneData = {
1319
+ body: NotificationBulkRequest;
1320
+ path?: never;
1321
+ query?: never;
1322
+ url: '/v2/user_notifications/bulk/undone';
1323
+ };
1324
+ export type BulkMarkNotificationsUndoneErrors = {
1325
+ 400: ErrorResponse;
1326
+ 401: ErrorResponse;
1327
+ 500: ErrorResponse;
1328
+ };
1329
+ export type BulkMarkNotificationsUndoneError = BulkMarkNotificationsUndoneErrors[keyof BulkMarkNotificationsUndoneErrors];
1330
+ export type BulkMarkNotificationsUndoneResponses = {
1331
+ 200: unknown;
1332
+ };
1333
+ export type DeleteUserNotificationV2Data = {
1334
+ body?: never;
1335
+ path: {
1336
+ /**
1337
+ * ID of the notification
1338
+ */
1339
+ notification_id: string;
1340
+ };
1341
+ query?: never;
1342
+ url: '/v2/user_notifications/{notification_id}';
1343
+ };
1344
+ export type DeleteUserNotificationV2Errors = {
1345
+ 400: ErrorResponse;
1346
+ 401: ErrorResponse;
1347
+ 500: ErrorResponse;
1348
+ };
1349
+ export type DeleteUserNotificationV2Error = DeleteUserNotificationV2Errors[keyof DeleteUserNotificationV2Errors];
1350
+ export type DeleteUserNotificationV2Responses = {
1351
+ 200: unknown;
1352
+ };