@openpeepshq/core 0.1.31

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 (500) hide show
  1. package/LICENSE +674 -0
  2. package/dist/accessTokens/finders.d.ts +11 -0
  3. package/dist/accessTokens/finders.js +43 -0
  4. package/dist/accessTokens/helpers.d.ts +13 -0
  5. package/dist/accessTokens/helpers.js +15 -0
  6. package/dist/accessTokens/index.d.ts +4 -0
  7. package/dist/accessTokens/index.js +4 -0
  8. package/dist/accessTokens/mapping.d.ts +10 -0
  9. package/dist/accessTokens/mapping.js +25 -0
  10. package/dist/accessTokens/mutations.d.ts +4 -0
  11. package/dist/accessTokens/mutations.js +24 -0
  12. package/dist/accessTokens/revokations.d.ts +2 -0
  13. package/dist/accessTokens/revokations.js +18 -0
  14. package/dist/accessTokens/tokens.d.ts +31 -0
  15. package/dist/accessTokens/tokens.js +174 -0
  16. package/dist/accounts/cache.d.ts +3 -0
  17. package/dist/accounts/cache.js +13 -0
  18. package/dist/accounts/finders.d.ts +6 -0
  19. package/dist/accounts/finders.js +17 -0
  20. package/dist/accounts/helpers.d.ts +7 -0
  21. package/dist/accounts/helpers.js +36 -0
  22. package/dist/accounts/index.d.ts +6 -0
  23. package/dist/accounts/index.js +6 -0
  24. package/dist/accounts/mapping.d.ts +10 -0
  25. package/dist/accounts/mapping.js +28 -0
  26. package/dist/accounts/mutations.d.ts +21 -0
  27. package/dist/accounts/mutations.js +204 -0
  28. package/dist/analytics/cache.d.ts +6 -0
  29. package/dist/analytics/cache.js +29 -0
  30. package/dist/analytics/compile.d.ts +4 -0
  31. package/dist/analytics/compile.js +296 -0
  32. package/dist/analytics/dateRange.d.ts +39 -0
  33. package/dist/analytics/dateRange.js +181 -0
  34. package/dist/analytics/index.d.ts +8 -0
  35. package/dist/analytics/index.js +8 -0
  36. package/dist/analytics/jobs.d.ts +20 -0
  37. package/dist/analytics/jobs.js +84 -0
  38. package/dist/analytics/metrics.d.ts +4 -0
  39. package/dist/analytics/metrics.js +13 -0
  40. package/dist/analytics/pdfReport.d.ts +8 -0
  41. package/dist/analytics/pdfReport.js +821 -0
  42. package/dist/analytics/read.d.ts +6 -0
  43. package/dist/analytics/read.js +696 -0
  44. package/dist/analytics/report.d.ts +293 -0
  45. package/dist/analytics/report.js +153 -0
  46. package/dist/analytics/settings.d.ts +3 -0
  47. package/dist/analytics/settings.js +37 -0
  48. package/dist/backups/index.d.ts +5 -0
  49. package/dist/backups/index.js +260 -0
  50. package/dist/backups/metadata.d.ts +9 -0
  51. package/dist/backups/metadata.js +2 -0
  52. package/dist/config/db.d.ts +7 -0
  53. package/dist/config/db.js +26 -0
  54. package/dist/config/defaults/capabilities.d.ts +2 -0
  55. package/dist/config/defaults/capabilities.js +47 -0
  56. package/dist/config/defaults/community.d.ts +2 -0
  57. package/dist/config/defaults/community.js +41 -0
  58. package/dist/config/defaults/core.d.ts +2 -0
  59. package/dist/config/defaults/core.js +113 -0
  60. package/dist/config/defaults/db.d.ts +6 -0
  61. package/dist/config/defaults/db.js +8 -0
  62. package/dist/config/defaults/logs.d.ts +6 -0
  63. package/dist/config/defaults/logs.js +7 -0
  64. package/dist/config/defaults/redis.d.ts +4 -0
  65. package/dist/config/defaults/redis.js +5 -0
  66. package/dist/config/helpers.d.ts +11 -0
  67. package/dist/config/helpers.js +31 -0
  68. package/dist/config/index.d.ts +392 -0
  69. package/dist/config/index.js +83 -0
  70. package/dist/config/pruneEmptyConfigStrings.d.ts +7 -0
  71. package/dist/config/pruneEmptyConfigStrings.js +29 -0
  72. package/dist/db/aql.d.ts +0 -0
  73. package/dist/db/aql.js +1 -0
  74. package/dist/db/arango.d.ts +2 -0
  75. package/dist/db/arango.js +110 -0
  76. package/dist/db/bootMigrate.d.ts +1 -0
  77. package/dist/db/bootMigrate.js +15 -0
  78. package/dist/db/examples.d.ts +1 -0
  79. package/dist/db/examples.js +13 -0
  80. package/dist/db/explorer/csv.d.ts +1 -0
  81. package/dist/db/explorer/csv.js +18 -0
  82. package/dist/db/explorer/index.d.ts +6 -0
  83. package/dist/db/explorer/index.js +5 -0
  84. package/dist/db/explorer/mutate.d.ts +6 -0
  85. package/dist/db/explorer/mutate.js +66 -0
  86. package/dist/db/explorer/query.d.ts +17 -0
  87. package/dist/db/explorer/query.js +48 -0
  88. package/dist/db/explorer/sql.d.ts +11 -0
  89. package/dist/db/explorer/sql.js +42 -0
  90. package/dist/db/explorer/tables.d.ts +9 -0
  91. package/dist/db/explorer/tables.js +65 -0
  92. package/dist/db/helpers.d.ts +64 -0
  93. package/dist/db/helpers.js +240 -0
  94. package/dist/db/index.d.ts +13 -0
  95. package/dist/db/index.js +15 -0
  96. package/dist/db/init.d.ts +2 -0
  97. package/dist/db/init.js +10 -0
  98. package/dist/db/migration/autoMigrate.d.ts +2 -0
  99. package/dist/db/migration/autoMigrate.js +111 -0
  100. package/dist/db/migration/cli.d.ts +1 -0
  101. package/dist/db/migration/cli.js +56 -0
  102. package/dist/db/migration/detect.d.ts +6 -0
  103. package/dist/db/migration/detect.js +87 -0
  104. package/dist/db/migration/exportArango.d.ts +4 -0
  105. package/dist/db/migration/exportArango.js +80 -0
  106. package/dist/db/migration/importCollections.d.ts +19 -0
  107. package/dist/db/migration/importCollections.js +280 -0
  108. package/dist/db/migration/importPostgres.d.ts +3 -0
  109. package/dist/db/migration/importPostgres.js +18 -0
  110. package/dist/db/migration/shared.d.ts +39 -0
  111. package/dist/db/migration/shared.js +158 -0
  112. package/dist/db/migration/transform.d.ts +18 -0
  113. package/dist/db/migration/transform.js +209 -0
  114. package/dist/db/migration/validate.d.ts +18 -0
  115. package/dist/db/migration/validate.js +69 -0
  116. package/dist/db/pg/client.d.ts +35 -0
  117. package/dist/db/pg/client.js +126 -0
  118. package/dist/db/pg/collections.d.ts +48 -0
  119. package/dist/db/pg/collections.js +53 -0
  120. package/dist/db/pg/filters/common.d.ts +21 -0
  121. package/dist/db/pg/filters/common.js +48 -0
  122. package/dist/db/pg/filters/edges.d.ts +9 -0
  123. package/dist/db/pg/filters/edges.js +10 -0
  124. package/dist/db/pg/filters/groups.d.ts +7 -0
  125. package/dist/db/pg/filters/groups.js +15 -0
  126. package/dist/db/pg/filters/index.d.ts +22 -0
  127. package/dist/db/pg/filters/index.js +35 -0
  128. package/dist/db/pg/filters/notifications.d.ts +6 -0
  129. package/dist/db/pg/filters/notifications.js +10 -0
  130. package/dist/db/pg/filters/posts.d.ts +18 -0
  131. package/dist/db/pg/filters/posts.js +25 -0
  132. package/dist/db/pg/filters/profiles.d.ts +6 -0
  133. package/dist/db/pg/filters/profiles.js +9 -0
  134. package/dist/db/pg/filters/types.d.ts +7 -0
  135. package/dist/db/pg/filters/types.js +5 -0
  136. package/dist/db/pg/helpers.d.ts +19 -0
  137. package/dist/db/pg/helpers.js +67 -0
  138. package/dist/db/pg/map/filters.d.ts +22 -0
  139. package/dist/db/pg/map/filters.js +566 -0
  140. package/dist/db/pg/map/helpers.d.ts +2 -0
  141. package/dist/db/pg/map/helpers.js +2 -0
  142. package/dist/db/pg/map/index.d.ts +46 -0
  143. package/dist/db/pg/map/index.js +93 -0
  144. package/dist/db/pg/map/mutations.d.ts +11 -0
  145. package/dist/db/pg/map/mutations.js +135 -0
  146. package/dist/db/pg/map/queryTypes.d.ts +115 -0
  147. package/dist/db/pg/map/queryTypes.js +1 -0
  148. package/dist/db/pg/map/registry.d.ts +29 -0
  149. package/dist/db/pg/map/registry.js +413 -0
  150. package/dist/db/pg/map/relations.d.ts +28 -0
  151. package/dist/db/pg/map/relations.js +399 -0
  152. package/dist/db/pg/map/search.d.ts +6 -0
  153. package/dist/db/pg/map/search.js +190 -0
  154. package/dist/db/pg/map/types.d.ts +11 -0
  155. package/dist/db/pg/map/types.js +1 -0
  156. package/dist/db/pg/mappers.d.ts +28 -0
  157. package/dist/db/pg/mappers.js +29 -0
  158. package/dist/db/pg/migrate.d.ts +14 -0
  159. package/dist/db/pg/migrate.js +134 -0
  160. package/dist/db/pg/queries/activity.d.ts +10 -0
  161. package/dist/db/pg/queries/activity.js +47 -0
  162. package/dist/db/pg/queries/computed.d.ts +7 -0
  163. package/dist/db/pg/queries/computed.js +19 -0
  164. package/dist/db/pg/queries/derived.d.ts +22 -0
  165. package/dist/db/pg/queries/derived.js +100 -0
  166. package/dist/db/pg/queries/index.d.ts +4 -0
  167. package/dist/db/pg/queries/index.js +4 -0
  168. package/dist/db/pg/queries/sorts.d.ts +10 -0
  169. package/dist/db/pg/queries/sorts.js +9 -0
  170. package/dist/db/pg/schema/analytics.d.ts +998 -0
  171. package/dist/db/pg/schema/analytics.js +110 -0
  172. package/dist/db/pg/schema/base.d.ts +36 -0
  173. package/dist/db/pg/schema/base.js +23 -0
  174. package/dist/db/pg/schema/documents.d.ts +2002 -0
  175. package/dist/db/pg/schema/documents.js +40 -0
  176. package/dist/db/pg/schema/edges.d.ts +2725 -0
  177. package/dist/db/pg/schema/edges.js +34 -0
  178. package/dist/db/pg/schema/index.d.ts +5724 -0
  179. package/dist/db/pg/schema/index.js +7 -0
  180. package/dist/db/pg/sql/0000_bizarre_chat.sql +456 -0
  181. package/dist/db/pg/sql/0001_search_vector.sql +122 -0
  182. package/dist/db/pg/sql/0002_data_migrations_id_text.sql +1 -0
  183. package/dist/db/pg/sql/0003_fix_group_post_visibility.sql +4 -0
  184. package/dist/db/pg/sql/0004_analytics.sql +90 -0
  185. package/dist/db/pg/sql/meta/0000_snapshot.json +3380 -0
  186. package/dist/db/pg/sql/meta/0004_snapshot.json +4114 -0
  187. package/dist/db/pg/sql/meta/_journal.json +41 -0
  188. package/dist/db/replaceHostname.d.ts +1 -0
  189. package/dist/db/replaceHostname.js +88 -0
  190. package/dist/db/types.d.ts +17 -0
  191. package/dist/db/types.js +1 -0
  192. package/dist/email/index.d.ts +9 -0
  193. package/dist/email/index.js +19 -0
  194. package/dist/email/jobs.d.ts +3 -0
  195. package/dist/email/jobs.js +13 -0
  196. package/dist/email/queueStats.d.ts +2 -0
  197. package/dist/email/queueStats.js +27 -0
  198. package/dist/email/registry.d.ts +3 -0
  199. package/dist/email/registry.js +4 -0
  200. package/dist/email/render.d.ts +8 -0
  201. package/dist/email/render.js +34 -0
  202. package/dist/email/send.d.ts +9 -0
  203. package/dist/email/send.js +97 -0
  204. package/dist/email/smtpTest.d.ts +2 -0
  205. package/dist/email/smtpTest.js +26 -0
  206. package/dist/errors/index.d.ts +8 -0
  207. package/dist/errors/index.js +13 -0
  208. package/dist/events/index.d.ts +31 -0
  209. package/dist/events/index.js +66 -0
  210. package/dist/events/once.d.ts +4 -0
  211. package/dist/events/once.js +23 -0
  212. package/dist/groups/finders.d.ts +125 -0
  213. package/dist/groups/finders.js +18 -0
  214. package/dist/groups/helpers.d.ts +227 -0
  215. package/dist/groups/helpers.js +17 -0
  216. package/dist/groups/index.d.ts +3 -0
  217. package/dist/groups/index.js +3 -0
  218. package/dist/groups/mapping.d.ts +188 -0
  219. package/dist/groups/mapping.js +47 -0
  220. package/dist/groups/mutations.d.ts +26 -0
  221. package/dist/groups/mutations.js +41 -0
  222. package/dist/hashtags/finders.d.ts +3 -0
  223. package/dist/hashtags/finders.js +22 -0
  224. package/dist/hashtags/index.d.ts +2 -0
  225. package/dist/hashtags/index.js +2 -0
  226. package/dist/hashtags/mapping.d.ts +4 -0
  227. package/dist/hashtags/mapping.js +5 -0
  228. package/dist/hashtags/mutations.d.ts +0 -0
  229. package/dist/hashtags/mutations.js +1 -0
  230. package/dist/i18n/index.d.ts +14 -0
  231. package/dist/i18n/index.js +53 -0
  232. package/dist/index.d.ts +0 -0
  233. package/dist/index.js +1 -0
  234. package/dist/inviteLinks/finders.d.ts +3 -0
  235. package/dist/inviteLinks/finders.js +5 -0
  236. package/dist/inviteLinks/helpers.d.ts +20 -0
  237. package/dist/inviteLinks/helpers.js +4 -0
  238. package/dist/inviteLinks/index.d.ts +3 -0
  239. package/dist/inviteLinks/index.js +3 -0
  240. package/dist/inviteLinks/mapping.d.ts +10 -0
  241. package/dist/inviteLinks/mapping.js +35 -0
  242. package/dist/inviteLinks/mutations.d.ts +4 -0
  243. package/dist/inviteLinks/mutations.js +39 -0
  244. package/dist/jams/cache.d.ts +9 -0
  245. package/dist/jams/cache.js +13 -0
  246. package/dist/jams/finders.d.ts +23 -0
  247. package/dist/jams/finders.js +24 -0
  248. package/dist/jams/helpers.d.ts +70 -0
  249. package/dist/jams/helpers.js +29 -0
  250. package/dist/jams/index.d.ts +15 -0
  251. package/dist/jams/index.js +108 -0
  252. package/dist/jams/jobs.d.ts +9 -0
  253. package/dist/jams/jobs.js +42 -0
  254. package/dist/jams/livekit.d.ts +24 -0
  255. package/dist/jams/livekit.js +220 -0
  256. package/dist/jams/mapping.d.ts +137 -0
  257. package/dist/jams/mapping.js +35 -0
  258. package/dist/jams/mutations.d.ts +40 -0
  259. package/dist/jams/mutations.js +4 -0
  260. package/dist/jams/recording.d.ts +8 -0
  261. package/dist/jams/recording.js +67 -0
  262. package/dist/jams/recordingUploadAuth.d.ts +9 -0
  263. package/dist/jams/recordingUploadAuth.js +19 -0
  264. package/dist/jams/token.d.ts +4 -0
  265. package/dist/jams/token.js +129 -0
  266. package/dist/jams/waitingRoom.d.ts +5 -0
  267. package/dist/jams/waitingRoom.js +71 -0
  268. package/dist/jobs/index.d.ts +10 -0
  269. package/dist/jobs/index.js +60 -0
  270. package/dist/jobs/jobDetail.d.ts +2 -0
  271. package/dist/jobs/jobDetail.js +31 -0
  272. package/dist/jobs/jobLog.d.ts +18 -0
  273. package/dist/jobs/jobLog.js +61 -0
  274. package/dist/jwt/index.d.ts +10 -0
  275. package/dist/jwt/index.js +43 -0
  276. package/dist/lib/index.d.ts +2 -0
  277. package/dist/lib/index.js +2 -0
  278. package/dist/lib/streams.d.ts +2 -0
  279. package/dist/lib/streams.js +56 -0
  280. package/dist/lib/utils.d.ts +2 -0
  281. package/dist/lib/utils.js +17 -0
  282. package/dist/lib/zodDeepPartial.d.ts +3 -0
  283. package/dist/lib/zodDeepPartial.js +26 -0
  284. package/dist/location/index.d.ts +2 -0
  285. package/dist/location/index.js +28 -0
  286. package/dist/log/index.d.ts +3 -0
  287. package/dist/log/index.js +97 -0
  288. package/dist/mastodon/index.d.ts +4 -0
  289. package/dist/mastodon/index.js +51 -0
  290. package/dist/mastodon/types.d.ts +7579 -0
  291. package/dist/mastodon/types.js +523 -0
  292. package/dist/mastodon/typescript.d.ts +1578 -0
  293. package/dist/mastodon/typescript.js +1 -0
  294. package/dist/media/index.d.ts +40 -0
  295. package/dist/media/index.js +248 -0
  296. package/dist/media/ipfs/index.d.ts +0 -0
  297. package/dist/media/ipfs/index.js +39 -0
  298. package/dist/media/jobs.d.ts +19 -0
  299. package/dist/media/jobs.js +90 -0
  300. package/dist/media/openpeeps/index.d.ts +3 -0
  301. package/dist/media/openpeeps/index.js +131 -0
  302. package/dist/media/processing.d.ts +19 -0
  303. package/dist/media/processing.js +83 -0
  304. package/dist/media/streaming.d.ts +77 -0
  305. package/dist/media/streaming.js +257 -0
  306. package/dist/media/streamingCleanupJobs.d.ts +14 -0
  307. package/dist/media/streamingCleanupJobs.js +47 -0
  308. package/dist/media/streamingJobs.d.ts +5 -0
  309. package/dist/media/streamingJobs.js +329 -0
  310. package/dist/media/streamingPrewarm.d.ts +36 -0
  311. package/dist/media/streamingPrewarm.js +109 -0
  312. package/dist/mediaAttachments/finders.d.ts +1 -0
  313. package/dist/mediaAttachments/finders.js +3 -0
  314. package/dist/mediaAttachments/index.d.ts +5 -0
  315. package/dist/mediaAttachments/index.js +12 -0
  316. package/dist/mediaAttachments/mapping.d.ts +21 -0
  317. package/dist/mediaAttachments/mapping.js +4 -0
  318. package/dist/mediaAttachments/mutations.d.ts +3 -0
  319. package/dist/mediaAttachments/mutations.js +10 -0
  320. package/dist/notifications/defaultNotifications/announcement/index.d.ts +24 -0
  321. package/dist/notifications/defaultNotifications/announcement/index.js +42 -0
  322. package/dist/notifications/defaultNotifications/directMessage/index.d.ts +28 -0
  323. package/dist/notifications/defaultNotifications/directMessage/index.js +69 -0
  324. package/dist/notifications/defaultNotifications/follow/index.d.ts +24 -0
  325. package/dist/notifications/defaultNotifications/follow/index.js +31 -0
  326. package/dist/notifications/defaultNotifications/groupAdded/index.d.ts +18 -0
  327. package/dist/notifications/defaultNotifications/groupAdded/index.js +33 -0
  328. package/dist/notifications/defaultNotifications/groupMemberJoined/index.d.ts +18 -0
  329. package/dist/notifications/defaultNotifications/groupMemberJoined/index.js +36 -0
  330. package/dist/notifications/defaultNotifications/groupMemberLeft/index.d.ts +18 -0
  331. package/dist/notifications/defaultNotifications/groupMemberLeft/index.js +36 -0
  332. package/dist/notifications/defaultNotifications/index.d.ts +3 -0
  333. package/dist/notifications/defaultNotifications/index.js +43 -0
  334. package/dist/notifications/defaultNotifications/jamModerator/index.d.ts +23 -0
  335. package/dist/notifications/defaultNotifications/jamModerator/index.js +49 -0
  336. package/dist/notifications/defaultNotifications/jamSpeaker/index.d.ts +23 -0
  337. package/dist/notifications/defaultNotifications/jamSpeaker/index.js +47 -0
  338. package/dist/notifications/defaultNotifications/jamStarted/index.d.ts +18 -0
  339. package/dist/notifications/defaultNotifications/jamStarted/index.js +82 -0
  340. package/dist/notifications/defaultNotifications/mention/index.d.ts +24 -0
  341. package/dist/notifications/defaultNotifications/mention/index.js +89 -0
  342. package/dist/notifications/defaultNotifications/newGroupPost/index.d.ts +24 -0
  343. package/dist/notifications/defaultNotifications/newGroupPost/index.js +47 -0
  344. package/dist/notifications/defaultNotifications/newProfile/index.d.ts +24 -0
  345. package/dist/notifications/defaultNotifications/newProfile/index.js +40 -0
  346. package/dist/notifications/defaultNotifications/pollVote/index.d.ts +19 -0
  347. package/dist/notifications/defaultNotifications/pollVote/index.js +40 -0
  348. package/dist/notifications/defaultNotifications/reaction/index.d.ts +18 -0
  349. package/dist/notifications/defaultNotifications/reaction/index.js +43 -0
  350. package/dist/notifications/defaultNotifications/reply/index.d.ts +25 -0
  351. package/dist/notifications/defaultNotifications/reply/index.js +57 -0
  352. package/dist/notifications/defaultNotifications/repost/index.d.ts +18 -0
  353. package/dist/notifications/defaultNotifications/repost/index.js +42 -0
  354. package/dist/notifications/defaultNotifications/rsvp/index.d.ts +19 -0
  355. package/dist/notifications/defaultNotifications/rsvp/index.js +40 -0
  356. package/dist/notifications/fcmCredential.d.ts +14 -0
  357. package/dist/notifications/fcmCredential.js +68 -0
  358. package/dist/notifications/finders.d.ts +7 -0
  359. package/dist/notifications/finders.js +13 -0
  360. package/dist/notifications/firebase.d.ts +1 -0
  361. package/dist/notifications/firebase.js +33 -0
  362. package/dist/notifications/handlers.d.ts +3 -0
  363. package/dist/notifications/handlers.js +6 -0
  364. package/dist/notifications/helpers.d.ts +7 -0
  365. package/dist/notifications/helpers.js +31 -0
  366. package/dist/notifications/index.d.ts +9 -0
  367. package/dist/notifications/index.js +43 -0
  368. package/dist/notifications/jobs.d.ts +2 -0
  369. package/dist/notifications/jobs.js +75 -0
  370. package/dist/notifications/mapping.d.ts +25 -0
  371. package/dist/notifications/mapping.js +25 -0
  372. package/dist/notifications/mutations.d.ts +6 -0
  373. package/dist/notifications/mutations.js +40 -0
  374. package/dist/notifications/push.d.ts +9 -0
  375. package/dist/notifications/push.js +261 -0
  376. package/dist/notifications/pushInvalidation.d.ts +10 -0
  377. package/dist/notifications/pushInvalidation.js +10 -0
  378. package/dist/performance/index.d.ts +24 -0
  379. package/dist/performance/index.js +61 -0
  380. package/dist/plugins/helpers.d.ts +3 -0
  381. package/dist/plugins/helpers.js +72 -0
  382. package/dist/plugins/index.d.ts +10 -0
  383. package/dist/plugins/index.js +84 -0
  384. package/dist/plugins/pluginAuth.d.ts +30 -0
  385. package/dist/plugins/pluginAuth.js +44 -0
  386. package/dist/posts/contextClosure.d.ts +16 -0
  387. package/dist/posts/contextClosure.js +66 -0
  388. package/dist/posts/finders.d.ts +298 -0
  389. package/dist/posts/finders.js +259 -0
  390. package/dist/posts/helpers/filters.d.ts +14 -0
  391. package/dist/posts/helpers/filters.js +39 -0
  392. package/dist/posts/helpers/index.d.ts +837 -0
  393. package/dist/posts/helpers/index.js +117 -0
  394. package/dist/posts/index.d.ts +6 -0
  395. package/dist/posts/index.js +6 -0
  396. package/dist/posts/mapping.d.ts +2187 -0
  397. package/dist/posts/mapping.js +222 -0
  398. package/dist/posts/mutations.d.ts +19 -0
  399. package/dist/posts/mutations.js +202 -0
  400. package/dist/posts/rsvpConfirmationEmail.d.ts +2 -0
  401. package/dist/posts/rsvpConfirmationEmail.js +82 -0
  402. package/dist/processingStats/index.d.ts +3 -0
  403. package/dist/processingStats/index.js +3 -0
  404. package/dist/processingStats/mapping.d.ts +7 -0
  405. package/dist/processingStats/mapping.js +4 -0
  406. package/dist/processingStats/mutations.d.ts +2 -0
  407. package/dist/processingStats/mutations.js +6 -0
  408. package/dist/processingStats/queries.d.ts +4 -0
  409. package/dist/processingStats/queries.js +46 -0
  410. package/dist/profileSettings/cache.d.ts +2 -0
  411. package/dist/profileSettings/cache.js +24 -0
  412. package/dist/profileSettings/finders.d.ts +1 -0
  413. package/dist/profileSettings/finders.js +2 -0
  414. package/dist/profileSettings/index.d.ts +3 -0
  415. package/dist/profileSettings/index.js +3 -0
  416. package/dist/profileSettings/mapping.d.ts +38 -0
  417. package/dist/profileSettings/mapping.js +5 -0
  418. package/dist/profileSettings/mutations.d.ts +3 -0
  419. package/dist/profileSettings/mutations.js +24 -0
  420. package/dist/profiles/cache.d.ts +5 -0
  421. package/dist/profiles/cache.js +19 -0
  422. package/dist/profiles/capacity.d.ts +2 -0
  423. package/dist/profiles/capacity.js +20 -0
  424. package/dist/profiles/export.d.ts +3 -0
  425. package/dist/profiles/export.js +85 -0
  426. package/dist/profiles/finders.d.ts +11 -0
  427. package/dist/profiles/finders.js +39 -0
  428. package/dist/profiles/helpers.d.ts +35 -0
  429. package/dist/profiles/helpers.js +10 -0
  430. package/dist/profiles/index.d.ts +5 -0
  431. package/dist/profiles/index.js +18 -0
  432. package/dist/profiles/mapping.d.ts +157 -0
  433. package/dist/profiles/mapping.js +132 -0
  434. package/dist/profiles/mutations.d.ts +9 -0
  435. package/dist/profiles/mutations.js +75 -0
  436. package/dist/pushSubscriptions/finders.d.ts +187 -0
  437. package/dist/pushSubscriptions/finders.js +6 -0
  438. package/dist/pushSubscriptions/helpers.d.ts +99 -0
  439. package/dist/pushSubscriptions/helpers.js +3 -0
  440. package/dist/pushSubscriptions/index.d.ts +3 -0
  441. package/dist/pushSubscriptions/index.js +3 -0
  442. package/dist/pushSubscriptions/mapping.d.ts +261 -0
  443. package/dist/pushSubscriptions/mapping.js +6 -0
  444. package/dist/pushSubscriptions/mutations.d.ts +95 -0
  445. package/dist/pushSubscriptions/mutations.js +21 -0
  446. package/dist/redis/connection.d.ts +4 -0
  447. package/dist/redis/connection.js +17 -0
  448. package/dist/redis/index.d.ts +1 -0
  449. package/dist/redis/index.js +1 -0
  450. package/dist/reports/finders.d.ts +6 -0
  451. package/dist/reports/finders.js +44 -0
  452. package/dist/reports/helpers.d.ts +21 -0
  453. package/dist/reports/helpers.js +12 -0
  454. package/dist/reports/index.d.ts +3 -0
  455. package/dist/reports/index.js +3 -0
  456. package/dist/reports/mapping.d.ts +9 -0
  457. package/dist/reports/mapping.js +34 -0
  458. package/dist/reports/mutations.d.ts +5 -0
  459. package/dist/reports/mutations.js +16 -0
  460. package/dist/roles/defaults.d.ts +2 -0
  461. package/dist/roles/defaults.js +94 -0
  462. package/dist/roles/finders.d.ts +5 -0
  463. package/dist/roles/finders.js +9 -0
  464. package/dist/roles/index.d.ts +4 -0
  465. package/dist/roles/index.js +4 -0
  466. package/dist/roles/mapping.d.ts +11 -0
  467. package/dist/roles/mapping.js +5 -0
  468. package/dist/roles/mutations.d.ts +4 -0
  469. package/dist/roles/mutations.js +30 -0
  470. package/dist/search/finders.d.ts +47 -0
  471. package/dist/search/finders.js +59 -0
  472. package/dist/search/helpers.d.ts +3 -0
  473. package/dist/search/helpers.js +1 -0
  474. package/dist/search/index.d.ts +1 -0
  475. package/dist/search/index.js +1 -0
  476. package/dist/search/mapping.d.ts +40 -0
  477. package/dist/search/mapping.js +43 -0
  478. package/dist/sentry/index.d.ts +34 -0
  479. package/dist/sentry/index.js +113 -0
  480. package/dist/server/helpers.d.ts +0 -0
  481. package/dist/server/helpers.js +1 -0
  482. package/dist/server/index.d.ts +105 -0
  483. package/dist/server/index.js +64 -0
  484. package/dist/stats/finders.d.ts +16156 -0
  485. package/dist/stats/finders.js +167 -0
  486. package/dist/stats/helpers.d.ts +17 -0
  487. package/dist/stats/helpers.js +34 -0
  488. package/dist/stats/index.d.ts +1 -0
  489. package/dist/stats/index.js +1 -0
  490. package/dist/stats/mapping.d.ts +188 -0
  491. package/dist/stats/mapping.js +19 -0
  492. package/dist/stripe/cache.d.ts +30 -0
  493. package/dist/stripe/cache.js +37 -0
  494. package/dist/stripe/connection.d.ts +5 -0
  495. package/dist/stripe/connection.js +23 -0
  496. package/dist/stripe/helpers.d.ts +25 -0
  497. package/dist/stripe/helpers.js +211 -0
  498. package/dist/stripe/index.d.ts +3 -0
  499. package/dist/stripe/index.js +3 -0
  500. package/package.json +99 -0
@@ -0,0 +1,1578 @@
1
+ /**
2
+ * Represents a user of Mastodon and their associated profile.
3
+ */
4
+ export interface Account {
5
+ /**
6
+ * The Webfinger account URI. Equal to `username` for local users, or
7
+ * `username@domain` for remote users.
8
+ * @since 0.1.0
9
+ */
10
+ acct: string;
11
+ /**
12
+ * An image icon that is shown next to statuses and in the profile.
13
+ * @since 0.1.0
14
+ */
15
+ avatar: string;
16
+ /**
17
+ * A static version of the avatar. Equal to `avatar` if its value is a
18
+ * static image; different if `avatar` is an animated GIF.
19
+ * @since 1.1.2
20
+ */
21
+ avatar_static: string;
22
+ /**
23
+ * Indicates that the account may perform automated actions, may not be
24
+ * monitored, or identifies as a robot.
25
+ * @since 2.4.0
26
+ */
27
+ bot: boolean;
28
+ /**
29
+ * When the account was created.
30
+ * @since 0.1.0
31
+ */
32
+ created_at: string;
33
+ /**
34
+ * Whether the account has opted into discovery features such as the profile
35
+ * directory.
36
+ * @since 3.1.0
37
+ */
38
+ discoverable?: boolean;
39
+ /**
40
+ * The profile’s display name.
41
+ * @since 0.1.0
42
+ */
43
+ display_name: string;
44
+ /**
45
+ * Custom emoji entities to be used when rendering the profile.
46
+ * @since 2.4.0
47
+ */
48
+ emojis: Array<Emoji>;
49
+ /**
50
+ * Additional metadata attached to a profile as name-value pairs.
51
+ * @since 2.4.0
52
+ */
53
+ fields: Array<unknown>;
54
+ /**
55
+ * The reported followers of this profile.
56
+ * @since 0.1.0
57
+ */
58
+ followers_count: number;
59
+ /**
60
+ * The reported follows of this profile.
61
+ * @since 0.1.0
62
+ */
63
+ following_count: number;
64
+ /**
65
+ * Indicates that the account represents a Group profile.
66
+ * @since 3.1.0
67
+ */
68
+ group: boolean;
69
+ /**
70
+ * An image banner that is shown above the profile and in profile cards.
71
+ * @since 0.1.0
72
+ */
73
+ header: string;
74
+ /**
75
+ * A static version of the header. Equal to `header` if its value is a
76
+ * static image; different if `header` is an animated GIF.
77
+ * @since 1.1.2
78
+ */
79
+ header_static: string;
80
+ /**
81
+ * The account id.
82
+ * @since 0.1.0
83
+ */
84
+ id: string;
85
+ /**
86
+ * When the most recent status was posted.
87
+ * @since 3.0.0
88
+ */
89
+ last_status_at?: string;
90
+ /**
91
+ * An extra attribute returned only when an account is silenced. If true,
92
+ * indicates that the account should be hidden behind a warning screen.
93
+ * @since 3.5.3
94
+ */
95
+ limited?: boolean;
96
+ /**
97
+ * Whether the account manually approves follow requests.
98
+ * @since 0.1.0
99
+ */
100
+ locked: boolean;
101
+ /**
102
+ * Indicates that the profile is currently inactive and that its user has
103
+ * moved to a new account.
104
+ * @since 2.1.0
105
+ */
106
+ moved?: Account;
107
+ /**
108
+ * Whether the account has opted into discovery features such as the profile
109
+ * directory.
110
+ * @since 4.0.0
111
+ */
112
+ noindex?: boolean;
113
+ /**
114
+ * The profile’s bio or description.
115
+ * @since 0.1.0
116
+ */
117
+ note: string;
118
+ /**
119
+ * How many statuses are attached to this account.
120
+ * @since 0.1.0
121
+ */
122
+ statuses_count: number;
123
+ /**
124
+ * An extra attribute returned only when an account is suspended.
125
+ * @since 3.3.0
126
+ */
127
+ suspended?: boolean;
128
+ /**
129
+ * The location of the user’s profile page.
130
+ * @since 0.1.0
131
+ */
132
+ url: string;
133
+ /**
134
+ * The username of the account, not including domain.
135
+ * @since 0.1.0
136
+ */
137
+ username: string;
138
+ }
139
+ /**
140
+ * Represents an announcement set by an administrator.
141
+ * @since 3.1.0
142
+ */
143
+ export interface Announcement {
144
+ /**
145
+ * Whether the announcement should start and end on dates only instead of
146
+ * datetimes. Will be false if there is no `starts_at` or `ends_at` time.
147
+ * @since 3.1.0
148
+ */
149
+ all_day: boolean;
150
+ /**
151
+ * The text of the announcement.
152
+ * @since 3.1.0
153
+ */
154
+ content: string;
155
+ /**
156
+ * Custom emoji used in the announcement text.
157
+ * @since 3.1.0
158
+ */
159
+ emojis: Array<Emoji>;
160
+ /**
161
+ * When the announcement will start.
162
+ * @since 3.1.0
163
+ */
164
+ ends_at?: string | null;
165
+ /**
166
+ * The ID of the announcement in the database.
167
+ * @since 3.1.0
168
+ */
169
+ id: string;
170
+ /**
171
+ * Accounts mentioned in the announcement text.
172
+ * @since 3.1.0
173
+ */
174
+ mentions: Array<AnnouncementAccount>;
175
+ /**
176
+ * Whether the announcement is currently active.
177
+ * @since 3.1.0
178
+ */
179
+ published?: boolean;
180
+ /**
181
+ * When the announcement was published.
182
+ * @since 3.1.0
183
+ */
184
+ published_at?: string | null;
185
+ /**
186
+ * Whether the announcement has been read by the current user.
187
+ * @since 3.1.0
188
+ */
189
+ read?: boolean;
190
+ /**
191
+ * Emoji reactions attached to the announcement.
192
+ * @since 3.1.0
193
+ */
194
+ reactions: Array<Reaction>;
195
+ /**
196
+ * When the announcement will start.
197
+ * @since 3.1.0
198
+ */
199
+ starts_at?: string | null;
200
+ /**
201
+ * Statuses linked in the announcement text.
202
+ * @since 3.1.0
203
+ */
204
+ statuses: Array<AnnouncementStatus>;
205
+ /**
206
+ * Tags linked in the announcement text.
207
+ * @since 3.1.0
208
+ */
209
+ tags: Array<Tag>;
210
+ /**
211
+ * When the announcement was last updated.
212
+ * @since 3.1.0
213
+ */
214
+ updated_at?: string | null;
215
+ }
216
+ /**
217
+ * Account mentioned in the announcement text.
218
+ * @since 3.1.0
219
+ */
220
+ export interface AnnouncementAccount {
221
+ /**
222
+ * URI of the mentioned user. Equivalent to `username` for local users, or
223
+ * `username@domain` for remote users.
224
+ * @since 3.1.0
225
+ */
226
+ acct: string;
227
+ /**
228
+ * The account ID of the mentioned user.
229
+ * @since 3.1.0
230
+ */
231
+ id: string;
232
+ /**
233
+ * The location of the mentioned user’s profile.
234
+ * @since 3.1.0
235
+ */
236
+ url: string;
237
+ /**
238
+ * The username of the mentioned user.
239
+ * @since 3.1.0
240
+ */
241
+ username: string;
242
+ }
243
+ /**
244
+ * Status linked in the announcement text.
245
+ * @since 3.1.0
246
+ */
247
+ export interface AnnouncementStatus {
248
+ /**
249
+ * The ID of an attached Status in the database.
250
+ * @since 3.1.0
251
+ */
252
+ id: string;
253
+ /**
254
+ * The URL of an attached Status.
255
+ * @since 3.1.0
256
+ */
257
+ url: string;
258
+ }
259
+ /**
260
+ * Represents an application that interfaces with the REST API to access
261
+ * accounts or post statuses.
262
+ */
263
+ export interface Application {
264
+ /**
265
+ * Client ID key, to be used for obtaining OAuth tokens.
266
+ * @since 0.9.9
267
+ */
268
+ client_id?: string;
269
+ /**
270
+ * Client secret key, to be used for obtaining OAuth tokens.
271
+ * @since 0.9.9
272
+ */
273
+ client_secret?: string;
274
+ /**
275
+ * The name of your application.
276
+ * @since 0.9.9
277
+ */
278
+ name: string;
279
+ /**
280
+ * Used for Push Streaming API. Returned with POST /api/v1/apps. Equivalent
281
+ * to WebPushSubscription#server_key.
282
+ * @since 2.8.0
283
+ */
284
+ vapid_key?: string;
285
+ /**
286
+ * The website associated with your application.
287
+ * @since 0.9.9
288
+ */
289
+ website?: string | null;
290
+ }
291
+ /**
292
+ * Represents a rich preview card that is generated using OpenGraph tags from a
293
+ * URL.
294
+ */
295
+ interface BaseCard {
296
+ /**
297
+ * Description of preview.
298
+ * @since 1.0.0
299
+ */
300
+ description: string;
301
+ /**
302
+ * Title of linked resource.
303
+ * @since 1.0.0
304
+ */
305
+ title: string;
306
+ /**
307
+ * The type of the preview card.
308
+ * @since 1.3.0
309
+ */
310
+ type: string;
311
+ /**
312
+ * Location of linked resource.
313
+ * @since 1.0.0
314
+ */
315
+ url: string;
316
+ }
317
+ /**
318
+ * Represents a rich preview card that is generated using OpenGraph tags from an
319
+ * URL.
320
+ */
321
+ export type Card = LinkCard | PhotoCard | IframeCard | VideoCard;
322
+ /**
323
+ * Represents an iframe preview card that is generated using OpenGraph tags from
324
+ * an URL. Iframe is not currently accepted, so won’t show up in practice.
325
+ */
326
+ export interface IframeCard extends BaseCard {
327
+ /**
328
+ * The type of the preview card.
329
+ * @since 1.3.0
330
+ */
331
+ type: 'rich';
332
+ }
333
+ /**
334
+ * Represents a link preview card that is generated using OpenGraph tags from an
335
+ * URL.
336
+ */
337
+ export interface LinkCard extends BaseCard {
338
+ /**
339
+ * The type of the preview card.
340
+ * @since 1.3.0
341
+ */
342
+ type: 'link';
343
+ }
344
+ /**
345
+ * Represents a photo preview card that is generated using OpenGraph tags from
346
+ * an URL.
347
+ */
348
+ export interface PhotoCard extends BaseCard {
349
+ /**
350
+ * The author of the original resource.
351
+ * @since 1.3.0
352
+ */
353
+ author_name: string;
354
+ /**
355
+ * A link to the author of the original resource.
356
+ * @since 1.3.0
357
+ */
358
+ author_url: string;
359
+ /**
360
+ * A hash computed by
361
+ * [the BlurHash algorithm](https://github.com/woltapp/blurhash), for
362
+ * generating colorful preview thumbnails when media has not been downloaded
363
+ * yet.
364
+ * @since 3.2.0
365
+ */
366
+ blurhash: string;
367
+ /**
368
+ * Used for photo embeds, instead of custom `html`.
369
+ * @since 2.1.0
370
+ */
371
+ embed_url: string;
372
+ /**
373
+ * Height of preview, in pixels.
374
+ * @since 1.3.0
375
+ */
376
+ height: number;
377
+ /**
378
+ * Preview thumbnail.
379
+ * @since 1.0.0
380
+ */
381
+ image?: string;
382
+ /**
383
+ * The provider of the original resource.
384
+ * @since 1.3.0
385
+ */
386
+ provider_name: string;
387
+ /**
388
+ * A link to the provider of the original resource.
389
+ * @since 1.3.0
390
+ */
391
+ provider_url: string;
392
+ /**
393
+ * The type of the preview card.
394
+ * @since 1.3.0
395
+ */
396
+ type: 'photo';
397
+ /**
398
+ * Width of preview, in pixels.
399
+ * @since 1.3.0
400
+ */
401
+ width: number;
402
+ }
403
+ /**
404
+ * Represents a video preview card that is generated using OpenGraph tags from
405
+ * an URL.
406
+ */
407
+ export interface VideoCard extends BaseCard {
408
+ /**
409
+ * The author of the original resource.
410
+ * @since 1.3.0
411
+ */
412
+ author_name: string;
413
+ /**
414
+ * A link to the author of the original resource.
415
+ * @since 1.3.0
416
+ */
417
+ author_url: string;
418
+ /**
419
+ * A hash computed by
420
+ * [the BlurHash algorithm](https://github.com/woltapp/blurhash), for
421
+ * generating colorful preview thumbnails when media has not been downloaded
422
+ * yet.
423
+ * @since 3.2.0
424
+ */
425
+ blurhash?: string;
426
+ /**
427
+ * Height of preview, in pixels.
428
+ * @since 1.3.0
429
+ */
430
+ height: number;
431
+ /**
432
+ * HTML to be used for generating the preview card.
433
+ * @since 1.3.0
434
+ */
435
+ html: string;
436
+ /**
437
+ * Preview thumbnail.
438
+ * @since 1.0.0
439
+ */
440
+ image?: string;
441
+ /**
442
+ * The provider of the original resource.
443
+ * @since 1.3.0
444
+ */
445
+ provider_name: string;
446
+ /**
447
+ * A link to the provider of the original resource.
448
+ * @since 1.3.0
449
+ */
450
+ provider_url: string;
451
+ /**
452
+ * The type of the preview card.
453
+ * @since 1.3.0
454
+ */
455
+ type: 'video';
456
+ /**
457
+ * Width of preview, in pixels.
458
+ * @since 1.3.0
459
+ */
460
+ width: number;
461
+ }
462
+ /**
463
+ * Represents a custom emoji.
464
+ * @since 2.0.0
465
+ */
466
+ export interface Emoji {
467
+ /**
468
+ * Used for sorting custom emoji in the picker.
469
+ * @since 3.0.0
470
+ */
471
+ category: string;
472
+ /**
473
+ * The name of the custom emoji.
474
+ * @since 2.0.0
475
+ */
476
+ shortcode: string;
477
+ /**
478
+ * A link to a static copy of the custom emoji.
479
+ * @since 2.0.0
480
+ */
481
+ static_url: string;
482
+ /**
483
+ * A link to the custom emoji.
484
+ * @since 2.0.0
485
+ */
486
+ url: string;
487
+ /**
488
+ * Whether this Emoji should be visible in the picker or unlisted.
489
+ * @since 2.0.0
490
+ */
491
+ visible_in_picker: boolean;
492
+ }
493
+ /**
494
+ * Represents a list of some users that the authenticated user follows.
495
+ * @since 2.1.0
496
+ */
497
+ export interface List {
498
+ /**
499
+ * The internal database ID of the list.
500
+ * @since 2.1.0
501
+ */
502
+ id: string;
503
+ /**
504
+ * Which replies should be shown in the list.
505
+ * @since 3.3.0
506
+ */
507
+ replies_policy?: ListReplyPolicy;
508
+ /**
509
+ * The user-defined title of the list.
510
+ * @since 2.1.0
511
+ */
512
+ title: string;
513
+ }
514
+ export type ListAccounts = Array<Account>;
515
+ /**
516
+ * Interface to remove accounts from a list.
517
+ */
518
+ export interface ListAccountsDelete {
519
+ account_ids: Array<string>;
520
+ }
521
+ /**
522
+ * Interface to add accounts to a list.
523
+ */
524
+ export interface ListAccountsPost {
525
+ account_ids: Array<string>;
526
+ }
527
+ /**
528
+ * Interface to post a new list, or update an existing list.
529
+ */
530
+ export interface ListPost {
531
+ /**
532
+ * The internal database ID of the list.
533
+ * @since 2.1.0
534
+ */
535
+ id?: string;
536
+ /**
537
+ * Which replies should be shown in the list.
538
+ * @since 3.3.0
539
+ */
540
+ replies_policy?: string;
541
+ /**
542
+ * The user-defined title of the list.
543
+ * @since 2.1.0
544
+ */
545
+ title: string;
546
+ }
547
+ /**
548
+ * Which replies should be shown in the list.
549
+ * @since 3.3.0
550
+ */
551
+ export type ListReplyPolicy = 'followed' | 'list' | 'none';
552
+ /**
553
+ * Represents a file or media attachment that can be added to a status.
554
+ * @since 2.9.1
555
+ */
556
+ export interface AudioAttachment {
557
+ /**
558
+ * A hash computed by the BlurHash algorithm, for generating colorful
559
+ * preview thumbnails when media has not been downloaded yet.
560
+ * @since 2.8.1
561
+ */
562
+ blurhash?: string | null;
563
+ /**
564
+ * Alternate text that describes what is in the media attachment, to be used
565
+ * for the visually impaired or when media attachments do not load.
566
+ * @since 2.0.0
567
+ */
568
+ description?: string | null;
569
+ /**
570
+ * The ID of the attachment in the database.
571
+ * @since 0.6.0
572
+ */
573
+ id: string;
574
+ /**
575
+ * Metadata returned by Paperclip.
576
+ * @since 1.5.0
577
+ */
578
+ meta: AudioAttachmentMeta;
579
+ /**
580
+ * The location of a scaled-down preview of the attachment.
581
+ * @since 0.6.0
582
+ */
583
+ preview_url: string;
584
+ /**
585
+ * The location of the full-size original attachment on the remote
586
+ * @since 0.6.0
587
+ */
588
+ remote_url?: string | null;
589
+ /**
590
+ * A shorter URL for the attachment.
591
+ * @deprecated
592
+ * @since 3.5.0
593
+ */
594
+ text_url?: string | null;
595
+ /**
596
+ * The type of the attachment.
597
+ * @since 0.6.0
598
+ */
599
+ type: 'audio';
600
+ /**
601
+ * The location of the original full-size attachment.
602
+ * @since 0.6.0
603
+ */
604
+ url: string;
605
+ }
606
+ /**
607
+ * Metadata returned by Paperclip.
608
+ * @since 1.5.0
609
+ */
610
+ export interface AudioAttachmentMeta {
611
+ audio_bitrate: string;
612
+ audio_channels: string;
613
+ audio_encode: string;
614
+ duration: number;
615
+ length: string;
616
+ original: AudioAttachmentMetaOriginal;
617
+ }
618
+ /**
619
+ * Metadata returned by Paperclip.
620
+ * @since 1.5.0
621
+ */
622
+ export interface AudioAttachmentMetaOriginal {
623
+ bitrate: number;
624
+ duration: number;
625
+ }
626
+ /**
627
+ * Represents a looping, soundless animation attachment that can be added to a
628
+ * status.
629
+ * @since 0.6.0
630
+ */
631
+ export interface GIFVAttachment {
632
+ /**
633
+ * A hash computed by the BlurHash algorithm, for generating colorful
634
+ * preview thumbnails when media has not been downloaded yet.
635
+ * @since 2.8.1
636
+ */
637
+ blurhash: string;
638
+ /**
639
+ * Alternate text that describes what is in the media attachment, to be used
640
+ * for the visually impaired or when media attachments do not load.
641
+ * @since 2.0.0
642
+ */
643
+ description?: string | null;
644
+ /**
645
+ * The ID of the attachment in the database.
646
+ * @since 0.6.0
647
+ */
648
+ id: string;
649
+ /**
650
+ * Metadata returned by Paperclip.
651
+ * @since 1.5.0
652
+ */
653
+ meta: GIFVAttachmentMeta;
654
+ /**
655
+ * The location of a scaled-down preview of the attachment.
656
+ * @since 0.6.0
657
+ */
658
+ preview_url: string;
659
+ /**
660
+ * The location of the full-size original attachment on the remote
661
+ * @since 0.6.0
662
+ */
663
+ remote_url?: string | null;
664
+ /**
665
+ * A shorter URL for the attachment.
666
+ * @deprecated
667
+ * @since 3.5.0
668
+ */
669
+ text_url?: string | null;
670
+ /**
671
+ * The type of the attachment.
672
+ * @since 0.6.0
673
+ */
674
+ type: 'gifv';
675
+ /**
676
+ * The location of the original full-size attachment.
677
+ *
678
+ * Since Mastodon v3.1.2 the URL can be `null`, when the full-size file is
679
+ * still being processed in the background. However, the preview_url should
680
+ * be available. Use `API.getMediaAttachment` to check the status of the
681
+ * media attachment.
682
+ *
683
+ * @since 0.6.0
684
+ */
685
+ url: string;
686
+ }
687
+ export interface GIFVAttachmentMeta {
688
+ aspect: number;
689
+ duration: number;
690
+ fps: number;
691
+ height: number;
692
+ length: string;
693
+ original: GIFVAttachmentMetaOriginal;
694
+ size: string;
695
+ small: GIFVAttachmentMetaSmall;
696
+ width: number;
697
+ }
698
+ export interface GIFVAttachmentMetaOriginal {
699
+ bitrate: number;
700
+ duration: number;
701
+ frame_rate: string;
702
+ height: number;
703
+ width: number;
704
+ }
705
+ export interface GIFVAttachmentMetaSmall {
706
+ aspect: number;
707
+ height: number;
708
+ size: string;
709
+ width: number;
710
+ }
711
+ /**
712
+ * Represents a static image attachment that can be added to a status.
713
+ * @since 0.6.0
714
+ */
715
+ export interface ImageAttachment {
716
+ /**
717
+ * A hash computed by the BlurHash algorithm, for generating colorful
718
+ * preview thumbnails when media has not been downloaded yet.
719
+ * @since 2.8.1
720
+ */
721
+ blurhash: string;
722
+ /**
723
+ * Alternate text that describes what is in the media attachment, to be used
724
+ * for the visually impaired or when media attachments do not load.
725
+ * @since 2.0.0
726
+ */
727
+ description?: string | null;
728
+ /**
729
+ * The ID of the attachment in the database.
730
+ * @since 0.6.0
731
+ */
732
+ id: string;
733
+ /**
734
+ * Metadata returned by Paperclip.
735
+ * @since 1.5.0
736
+ */
737
+ meta: ImageAttachmentMeta;
738
+ /**
739
+ * @since unknown
740
+ */
741
+ preview_remote_url?: string | null;
742
+ /**
743
+ * The location of a scaled-down preview of the attachment.
744
+ * @since 0.6.0
745
+ */
746
+ preview_url: string;
747
+ /**
748
+ * The location of the full-size original attachment on the remote
749
+ * @since 0.6.0
750
+ */
751
+ remote_url?: string | null;
752
+ /**
753
+ * A shorter URL for the attachment.
754
+ * @deprecated
755
+ * @since 3.5.0
756
+ */
757
+ text_url?: string | null;
758
+ /**
759
+ * The type of the attachment.
760
+ * @since 0.6.0
761
+ */
762
+ type: 'image';
763
+ /**
764
+ * The location of the original full-size attachment.
765
+ *
766
+ * Since Mastodon v3.1.2 the URL can be `null`, when the full-size file is
767
+ * still being processed in the background. However, the preview_url should
768
+ * be available. Use `API.getMediaAttachment` to check the status of the
769
+ * media attachment.
770
+ *
771
+ * @since 0.6.0
772
+ */
773
+ url: string;
774
+ }
775
+ /**
776
+ * Metadata returned by Paperclip.
777
+ * @since 1.5.0
778
+ */
779
+ export interface ImageAttachmentMeta {
780
+ focus?: ImageAttachmentMetaFocus;
781
+ original: ImageAttachmentMetaOriginal;
782
+ small: ImageAttachmentMetaSmall;
783
+ }
784
+ /**
785
+ * Metadata returned by Paperclip.
786
+ * @since 2.3.0
787
+ */
788
+ export interface ImageAttachmentMetaFocus {
789
+ x: number;
790
+ y: number;
791
+ }
792
+ /**
793
+ * Metadata returned by Paperclip.
794
+ * @since 1.5.0
795
+ */
796
+ export interface ImageAttachmentMetaOriginal {
797
+ aspect: number;
798
+ height: number;
799
+ size: string;
800
+ width: number;
801
+ }
802
+ /**
803
+ * Metadata returned by Paperclip.
804
+ * @since 1.5.0
805
+ */
806
+ export interface ImageAttachmentMetaSmall {
807
+ aspect: number;
808
+ height: number;
809
+ size: string;
810
+ width: number;
811
+ }
812
+ /**
813
+ * Represents a file or media attachment that can be added to a status.
814
+ * @since 0.6.0
815
+ */
816
+ export type MediaAttachment = AudioAttachment | GIFVAttachment | ImageAttachment | UnknownAttachment | VideoAttachment;
817
+ /**
818
+ * Interface to post a new media attachment.
819
+ */
820
+ export interface MediaAttachmentPost {
821
+ /**
822
+ * The file to be attached, encoded using multipart form data. The file must
823
+ * have a MIME type.
824
+ */
825
+ file: File;
826
+ /**
827
+ * The custom thumbnail of the media to be attached, encoded using multipart
828
+ * form data.
829
+ */
830
+ thumbnail?: Blob | File;
831
+ /**
832
+ * A plain-text description of the media, for accessibility purposes.
833
+ */
834
+ description?: string;
835
+ /**
836
+ * Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0.
837
+ */
838
+ focus?: string;
839
+ }
840
+ /**
841
+ * Interface to update the parameters of an existing media attachment.
842
+ */
843
+ export interface MediaAttachmentUpdate {
844
+ /**
845
+ * The custom thumbnail of the media to be attached, encoded using multipart
846
+ * form data.
847
+ */
848
+ thumbnail?: Blob | File;
849
+ /**
850
+ * A plain-text description of the media, for accessibility purposes.
851
+ */
852
+ description?: string;
853
+ /**
854
+ * Two floating points (x,y), comma-delimited, ranging from -1.0 to 1.0.
855
+ */
856
+ focus?: string;
857
+ }
858
+ /**
859
+ * Represents a unsupported or unrecognized file type.
860
+ * @since 0.6.0
861
+ */
862
+ export interface UnknownAttachment {
863
+ /**
864
+ * Alternate text that describes what is in the media attachment, to be used
865
+ * for the visually impaired or when media attachments do not load.
866
+ * @since 2.0.0
867
+ */
868
+ description?: string | null;
869
+ /**
870
+ * The ID of the attachment in the database.
871
+ * @since 0.6.0
872
+ */
873
+ id: string;
874
+ /**
875
+ * Metadata returned by Paperclip.
876
+ * @since 1.5.0
877
+ */
878
+ meta: Record<string, Record<string, number | string>>;
879
+ /**
880
+ * The location of a scaled-down preview of the attachment.
881
+ * @since 0.6.0
882
+ */
883
+ preview_url: string;
884
+ /**
885
+ * The location of the full-size original attachment on the remote
886
+ * @since 0.6.0
887
+ */
888
+ remote_url?: string | null;
889
+ /**
890
+ * A shorter URL for the attachment.
891
+ * @deprecated
892
+ * @since 3.5.0
893
+ */
894
+ text_url?: string | null;
895
+ /**
896
+ * The type of the attachment.
897
+ * @since 0.6.0
898
+ */
899
+ type: 'unknown';
900
+ /**
901
+ * The location of the original full-size attachment.
902
+ *
903
+ * Since Mastodon v3.1.2 the URL can be `null`, when the full-size file is
904
+ * still being processed in the background. However, the preview_url should
905
+ * be available. Use `API.getMediaAttachment` to check the status of the
906
+ * media attachment.
907
+ *
908
+ * @since 0.6.0
909
+ */
910
+ url: string | null;
911
+ }
912
+ /**
913
+ * Represents a video clip attachment that can be added to a status.
914
+ * @since 0.6.0
915
+ */
916
+ export interface VideoAttachment {
917
+ /**
918
+ * A hash computed by the BlurHash algorithm, for generating colorful
919
+ * preview thumbnails when media has not been downloaded yet.
920
+ * @since 2.8.1
921
+ */
922
+ blurhash: string;
923
+ /**
924
+ * Alternate text that describes what is in the media attachment, to be used
925
+ * for the visually impaired or when media attachments do not load.
926
+ * @since 2.0.0
927
+ */
928
+ description?: string | null;
929
+ /**
930
+ * The ID of the attachment in the database.
931
+ * @since 0.6.0
932
+ */
933
+ id: string;
934
+ /**
935
+ * Metadata returned by Paperclip.
936
+ * @since 1.5.0
937
+ */
938
+ meta: VideoAttachmentMeta;
939
+ /**
940
+ * The location of a scaled-down preview of the attachment.
941
+ * @since 0.6.0
942
+ */
943
+ preview_url: string;
944
+ /**
945
+ * The location of the full-size original attachment on the remote
946
+ * @since 0.6.0
947
+ */
948
+ remote_url?: string | null;
949
+ /** @deprecated */
950
+ text_url?: string | null;
951
+ /**
952
+ * The type of the attachment.
953
+ * @since 0.6.0
954
+ */
955
+ type: 'video';
956
+ /**
957
+ * The location of the original full-size attachment.
958
+ *
959
+ * Since Mastodon v3.1.2 the URL can be `null`, when the full-size file is
960
+ * still being processed in the background. However, the preview_url should
961
+ * be available. Use `API.getMediaAttachment` to check the status of the
962
+ * media attachment.
963
+ *
964
+ * @since 0.6.0
965
+ */
966
+ url: string | null;
967
+ }
968
+ /**
969
+ * Metadata returned by Paperclip.
970
+ * @since 1.5.0
971
+ */
972
+ export interface VideoAttachmentMeta {
973
+ aspect?: number;
974
+ audio_bitrate?: string;
975
+ audio_channels?: string;
976
+ audio_encode?: string;
977
+ duration?: number;
978
+ fps?: number;
979
+ height?: number;
980
+ length?: string;
981
+ original: VideoAttachmentMetaOriginal;
982
+ size?: string;
983
+ small: VideoAttachmentMetaSmall;
984
+ width?: number;
985
+ }
986
+ /**
987
+ * Metadata returned by Paperclip.
988
+ * @since 1.5.0
989
+ */
990
+ export interface VideoAttachmentMetaOriginal {
991
+ bitrate: number;
992
+ duration: number;
993
+ frame_rate: string;
994
+ height: number;
995
+ width: number;
996
+ }
997
+ /**
998
+ * Metadata returned by Paperclip.
999
+ * @since 1.5.0
1000
+ */
1001
+ export interface VideoAttachmentMetaSmall {
1002
+ aspect: number;
1003
+ height: number;
1004
+ size: string;
1005
+ width: number;
1006
+ }
1007
+ /**
1008
+ * Represents a notification of an event relevant to the user.
1009
+ * @since 0.9.9
1010
+ */
1011
+ export interface Notification {
1012
+ /**
1013
+ * The account that performed the action that generated the notification.
1014
+ * @since 0.9.9
1015
+ */
1016
+ account: Account;
1017
+ /**
1018
+ * The timestamp of the notification.
1019
+ * @since 0.9.9
1020
+ */
1021
+ created_at: string;
1022
+ /**
1023
+ * The id of the notification in the database.
1024
+ * @since 0.9.9
1025
+ */
1026
+ id: string;
1027
+ /**
1028
+ * Report that was the object of the notification. Attached when `type` of
1029
+ * the notification is `admin.report`.
1030
+ * @since 4.0.0
1031
+ */
1032
+ report?: unknown;
1033
+ /**
1034
+ * The type of event that resulted in the notification.
1035
+ * @since 0.9.9
1036
+ */
1037
+ type: NotificationType;
1038
+ /**
1039
+ * Status that was the object of the notification. Attached when `type` of
1040
+ * the notification is `favourite`, `reblog`, `status`, `mention`, `poll`,
1041
+ * or `update`.
1042
+ * @since 0.9.9
1043
+ */
1044
+ status?: Status;
1045
+ }
1046
+ /**
1047
+ * The type of event that resulted in the notification.
1048
+ *
1049
+ * Possible notification types:
1050
+ * - 'mention' = Someone mentioned you in their status.
1051
+ * - 'status' = Someone you enabled notifications for has posted a status.
1052
+ * (since 3.3.0)
1053
+ * - 'reblog' = Someone boosted one of your statuses.
1054
+ * - 'follow' = Someone followed you.
1055
+ * - 'follow_request' = Someone requested to follow you. (since 3.1.0)
1056
+ * - 'favourite' = Someone favourited one of your statuses.
1057
+ * - 'poll' = A poll you have voted in or created has ended. (since 2.8.0)
1058
+ * - 'update' = A status you boosted with has been edited. (since 3.5.0)
1059
+ * - 'admin.sign_up' = Someone signed up (optionally sent to admins).
1060
+ * (since 3.5.0)
1061
+ * - 'admin.report' = A new report has been filed. (since 4.0.0)
1062
+ *
1063
+ * @since 0.9.9
1064
+ */
1065
+ export type NotificationType = 'mention' | 'status' | 'reblog' | 'follow' | 'follow_request' | 'favourite' | 'poll' | 'update' | 'admin.sign_up' | 'admin.report';
1066
+ /**
1067
+ * Represents a poll attached to a status.
1068
+ * @since 2.8.0
1069
+ */
1070
+ export interface Poll {
1071
+ /**
1072
+ * Custom emoji to be used for rendering poll options.
1073
+ * @since 2.8.0
1074
+ */
1075
+ emojis: Array<Emoji>;
1076
+ /**
1077
+ * Whether the poll is currently expired.
1078
+ * @since 2.8.0
1079
+ */
1080
+ expired: boolean;
1081
+ /**
1082
+ * When the poll ends.
1083
+ * @since 2.8.0
1084
+ */
1085
+ expires_at?: string | null;
1086
+ /**
1087
+ * The ID of the poll in the database.
1088
+ * @since 2.8.0
1089
+ */
1090
+ id: string;
1091
+ /**
1092
+ * Whether the poll allow multiple-choice answers.
1093
+ * @since 2.8.0
1094
+ */
1095
+ multiple?: boolean;
1096
+ /**
1097
+ * Possible answers for the poll.
1098
+ * @since 2.8.0
1099
+ */
1100
+ options: Array<PollOption>;
1101
+ /**
1102
+ * When called with a user token, which options has the authorized user
1103
+ * chosen. Contains an array of index values for `options`.
1104
+ * @since 2.8.0
1105
+ */
1106
+ own_votes?: Array<number>;
1107
+ /**
1108
+ * When called with a user token, whether the authorized user has voted.
1109
+ * @since 2.8.0
1110
+ */
1111
+ voted?: boolean;
1112
+ /**
1113
+ * How many unique accounts have voted on a multiple-choice poll.
1114
+ * @since 2.8.0
1115
+ */
1116
+ voters_count?: number | null;
1117
+ /**
1118
+ * How many votes have been received.
1119
+ * @since 2.8.0
1120
+ */
1121
+ votes_count: number;
1122
+ }
1123
+ /**
1124
+ * Possible answer for the poll.
1125
+ * @since 2.8.0
1126
+ */
1127
+ export interface PollOption {
1128
+ /**
1129
+ * The text value of the poll option.
1130
+ * @since 2.8.0
1131
+ */
1132
+ title: string;
1133
+ /**
1134
+ * The total number of received votes for this option.
1135
+ * @since 2.8.0
1136
+ */
1137
+ votes_count?: number | null;
1138
+ }
1139
+ /**
1140
+ * Interface to post poll votes.
1141
+ */
1142
+ export interface PollVotePost {
1143
+ choices: Array<number>;
1144
+ }
1145
+ /**
1146
+ * Represents an emoji reaction to an Announcement.
1147
+ * @since 3.1.0
1148
+ */
1149
+ export interface Reaction {
1150
+ /**
1151
+ * The total number of users who have added this reaction.
1152
+ * @since 3.1.0
1153
+ */
1154
+ count: number;
1155
+ /**
1156
+ * True, if the authorized user added this reaction.
1157
+ * @since 3.1.0
1158
+ */
1159
+ me?: boolean;
1160
+ /**
1161
+ * The emoji used for the reaction. Either a unicode emoji, or a custom
1162
+ * emoji’s shortcode.
1163
+ * @since 3.1.0
1164
+ */
1165
+ name: string;
1166
+ /**
1167
+ * A link to a non-animated version of the custom emoji, if the reaction is
1168
+ * a custom emoji
1169
+ * @since 3.1.0
1170
+ */
1171
+ static_url?: string;
1172
+ /**
1173
+ * A link to the custom emoji, if the reaction is a custom emoji.
1174
+ * @since 3.1.0
1175
+ */
1176
+ url?: string;
1177
+ }
1178
+ /**
1179
+ * Search parameter to use for a search.
1180
+ * @since 1.1.0
1181
+ */
1182
+ export interface Search {
1183
+ account_id?: string;
1184
+ exclude_unreviewed?: boolean;
1185
+ following?: boolean;
1186
+ max_id?: string;
1187
+ min_id?: string;
1188
+ q: string;
1189
+ limit?: number;
1190
+ offset?: number;
1191
+ resolve?: boolean;
1192
+ type?: string;
1193
+ }
1194
+ /**
1195
+ * Search results of a search.
1196
+ * @since 1.1.0
1197
+ */
1198
+ export interface SearchResults {
1199
+ /**
1200
+ * Accounts which match the given query.
1201
+ * @since 1.1.0
1202
+ */
1203
+ accounts: Array<Account>;
1204
+ /**
1205
+ * Hashtags which match the given query.
1206
+ * @since 3.0.0
1207
+ */
1208
+ hashtags: Array<Tag>;
1209
+ /**
1210
+ * Statuses which match the given query.
1211
+ * @since 1.1.0
1212
+ */
1213
+ statuses: Array<Status>;
1214
+ }
1215
+ export interface MediaStatusPost {
1216
+ id?: string;
1217
+ in_reply_to_id?: string;
1218
+ media_ids: Array<string>;
1219
+ poll?: undefined;
1220
+ scheduled_at?: Date;
1221
+ sensitive?: boolean;
1222
+ spoiler_text?: string;
1223
+ status?: string;
1224
+ visibility?: StatusVisibility;
1225
+ }
1226
+ /**
1227
+ * Represents a status posted by an account.
1228
+ * @since 0.1.0
1229
+ */
1230
+ export interface Status {
1231
+ /**
1232
+ * The account that authored this status.
1233
+ * @since 0.1.0
1234
+ */
1235
+ account: Account;
1236
+ /**
1237
+ * The application used to post this status.
1238
+ * @since 0.9.9
1239
+ */
1240
+ application?: Application;
1241
+ /**
1242
+ * Whether the authorized user has bookmarked this status.
1243
+ * @since 3.1.0
1244
+ */
1245
+ bookmarked?: boolean;
1246
+ /**
1247
+ * Preview card for links included within status content.
1248
+ * @since 2.6.0
1249
+ */
1250
+ card?: Card | null;
1251
+ /**
1252
+ * The date when this status was created.
1253
+ * @since 0.1.0
1254
+ */
1255
+ created_at: string;
1256
+ /**
1257
+ * HTML-encoded status content.
1258
+ * @since 0.1.0
1259
+ */
1260
+ content: string;
1261
+ /**
1262
+ * Timestamp of when the status was last edited.
1263
+ * @since 3.5.0
1264
+ */
1265
+ edited_at?: string;
1266
+ /**
1267
+ * Custom emoji to be used when rendering status content.
1268
+ * @since 2.0.0
1269
+ */
1270
+ emojis: Array<Emoji>;
1271
+ /**
1272
+ * Whether the authorized user has favourited this status.
1273
+ * @since 0.1.0
1274
+ */
1275
+ favourited?: boolean;
1276
+ /**
1277
+ * How many favourites this status has received.
1278
+ * @since 0.1.0
1279
+ */
1280
+ favourites_count: number;
1281
+ /**
1282
+ * The authorized user's filter and keywords that matched this status.
1283
+ * @since 4.0.0
1284
+ */
1285
+ filtered?: Array<unknown>;
1286
+ /**
1287
+ * ID of the status in the database.
1288
+ * @since 0.1.0
1289
+ */
1290
+ id: string;
1291
+ /**
1292
+ * ID of the account that authored the status being replied to.
1293
+ * @since 0.1.0
1294
+ */
1295
+ in_reply_to_account_id?: string | null;
1296
+ /**
1297
+ * ID of the status being replied to.
1298
+ * @since 0.1.0
1299
+ */
1300
+ in_reply_to_id?: string | null;
1301
+ /**
1302
+ * Primary language of this status.
1303
+ * @since 1.4.0
1304
+ */
1305
+ language?: string | null;
1306
+ /**
1307
+ * Media that is attached to this status.
1308
+ * @since 0.6.0
1309
+ */
1310
+ media_attachments: Array<MediaAttachment>;
1311
+ /**
1312
+ * Mentions of users within the status content.
1313
+ * @since 0.6.0
1314
+ */
1315
+ mentions: Array<StatusMention>;
1316
+ /**
1317
+ * Whether the authorized user has muted notifications for this status's
1318
+ * conversation.
1319
+ * @since 1.4.0
1320
+ */
1321
+ muted?: boolean;
1322
+ /**
1323
+ * Whether the authorized user has pinned this status. Only appears if the
1324
+ * status is pinnable.
1325
+ * @since 1.6.0
1326
+ */
1327
+ pinned?: boolean;
1328
+ /**
1329
+ * The poll attached to the status.
1330
+ * @since 2.8.0
1331
+ */
1332
+ poll?: Poll | null;
1333
+ /**
1334
+ * The status being reblogged.
1335
+ * @since 0.1.0
1336
+ */
1337
+ reblog?: Status | null;
1338
+ /**
1339
+ * Whether the authorized user has boosted this status.
1340
+ * @since 0.1.0
1341
+ */
1342
+ reblogged?: boolean;
1343
+ /**
1344
+ * How many boosts this status has received.
1345
+ * @since 0.1.0
1346
+ */
1347
+ reblogs_count: number;
1348
+ /**
1349
+ * How many replies this status has received.
1350
+ * @since 2.5.0
1351
+ */
1352
+ replies_count: number;
1353
+ /**
1354
+ * Is this status marked as sensitive content?
1355
+ * @since 0.9.9
1356
+ */
1357
+ sensitive: boolean;
1358
+ /**
1359
+ * Subject or summary line, below which status content is collapsed until
1360
+ * expanded.
1361
+ * @since 1.0.0
1362
+ */
1363
+ spoiler_text: string;
1364
+ /**
1365
+ * Hashtags used within the status content.
1366
+ * @since 0.6.0
1367
+ */
1368
+ tags: Array<Tag>;
1369
+ /**
1370
+ * Plain-text source of a status. Returned instead of content when status is
1371
+ * deleted, so the user may redraft from the source text without the client
1372
+ * having to reverse-engineer the original text from the HTML content.
1373
+ * @since 2.9.0
1374
+ */
1375
+ text?: string | null;
1376
+ /**
1377
+ * URI of the status used for federation.
1378
+ * @since 0.1.0
1379
+ */
1380
+ uri: string;
1381
+ /**
1382
+ * A link to the status’s HTML representation.
1383
+ * @since 0.1.0
1384
+ */
1385
+ url?: string | null;
1386
+ /**
1387
+ * Visibility of this status.
1388
+ * @since 0.9.9
1389
+ */
1390
+ visibility: StatusVisibility;
1391
+ }
1392
+ export interface StatusContext {
1393
+ ancestors: Array<Status>;
1394
+ descendants: Array<Status>;
1395
+ }
1396
+ /**
1397
+ * Mention of a user within the status content.
1398
+ * @since 0.6.0
1399
+ */
1400
+ export interface StatusMention {
1401
+ /**
1402
+ * URI of the mentioned user. Equivalent to `username` for local users, or
1403
+ * `username@domain` for remote users.
1404
+ * @since 0.6.0
1405
+ */
1406
+ acct: string;
1407
+ /**
1408
+ * The account ID of the mentioned user.
1409
+ * @since 0.6.0
1410
+ */
1411
+ id: string;
1412
+ /**
1413
+ * The username of the mentioned user.
1414
+ * @since 0.6.0
1415
+ */
1416
+ username: string;
1417
+ /**
1418
+ * The location of the mentioned user’s profile.
1419
+ * @since 0.6.0
1420
+ */
1421
+ url: string;
1422
+ }
1423
+ export type StatusPost = MediaStatusPost | TextStatusPost;
1424
+ export interface StatusSchedule {
1425
+ id?: string;
1426
+ media_attachments: Array<MediaAttachment>;
1427
+ params: Partial<Status>;
1428
+ scheduled_at: string;
1429
+ }
1430
+ /**
1431
+ * Visibility of a status.
1432
+ *
1433
+ * - `public` = Visible to everyone, shown in public timelines.
1434
+ * - `unlisted` = Visible to public, but not included in public timelines.
1435
+ * - `private` = Visible to followers only, and to any mentioned users.
1436
+ * - `direct` = Visible only to mentioned users.
1437
+ *
1438
+ * @since 0.9.9
1439
+ */
1440
+ export type StatusVisibility = 'direct' | 'private' | 'public' | 'unlisted' | 'local';
1441
+ export interface TextStatusPost {
1442
+ id?: string;
1443
+ in_reply_to_id?: string;
1444
+ media_ids?: undefined;
1445
+ poll?: TextStatusPostPoll;
1446
+ scheduled_at?: Date;
1447
+ sensitive?: boolean;
1448
+ spoiler_text?: string;
1449
+ status: string;
1450
+ visibility?: StatusVisibility;
1451
+ }
1452
+ export interface TextStatusPostPoll {
1453
+ expires_in: number;
1454
+ hide_totals?: boolean;
1455
+ multiple?: boolean;
1456
+ options: Array<string>;
1457
+ }
1458
+ /**
1459
+ * Stream data received.
1460
+ * @since 1.0.0
1461
+ */
1462
+ export interface StreamData {
1463
+ /**
1464
+ * Event type of the stream data received.
1465
+ * @since 1.0.0
1466
+ */
1467
+ event: StreamEventType;
1468
+ /**
1469
+ * JSON object related to the event.
1470
+ * @since 1.0.0
1471
+ */
1472
+ payload?: StreamPayload;
1473
+ /**
1474
+ * Stream types related to the event.
1475
+ * @since 1.0.0
1476
+ */
1477
+ stream: Array<StreamType>;
1478
+ }
1479
+ /**
1480
+ * Event type of the stream data received.
1481
+ *
1482
+ * - `announcement` = An announcement has been published. Payload contains an
1483
+ * `Announcement`. (since 3.1.0)
1484
+ * - `announcement.delete` = An announcement has been deleted. Payload contains
1485
+ * the id of the deleted `Announcement`. (since 3.1.0)
1486
+ * - `announcement.reaction` = An announcement has received an emoji reaction.
1487
+ * Payload contains a `Hash`. (since 3.1.0)
1488
+ * - `conversation` = A direct conversation has been updated. Payload contains a
1489
+ * `Conversation`. (since 2.6.0)
1490
+ * - `delete` = A status has been deleted. Payload contains the id of the
1491
+ * deleted `Status`. (since 1.0.0)
1492
+ * - `update` = A new Status has appeared. Payload contains a `Status`.
1493
+ * (since 1.0.0)
1494
+ * - `notification` = A new notification has appeared. Payload contains a
1495
+ * `Notification`. (since 1.4.2)
1496
+ * - `filters_changed` = Keyword filters have been changed. Does not contain a
1497
+ * payload. (since 2.4.3)
1498
+ * - `status.update` = A Status has been edited. Payload contains a `Status`.
1499
+ * (since 3.5.0)
1500
+ * - `encrypted_message` = An encrypted message has been received. (since 3.2.0)
1501
+ *
1502
+ * @since 1.0.0
1503
+ */
1504
+ export type StreamEventType = 'announcement' | 'announcement.delete' | 'announcement.reaction' | 'conversation' | 'delete' | 'encrypted_message' | 'filters_changed' | 'notification' | 'status.update' | 'update';
1505
+ /**
1506
+ * Additional parameter to filter the subscription.
1507
+ * @since 1.0.0
1508
+ */
1509
+ export interface StreamParams {
1510
+ /**
1511
+ * When stream is set to list, use this parameter to specify the list
1512
+ * ID.
1513
+ * @since 1.0.0
1514
+ */
1515
+ list?: string;
1516
+ /**
1517
+ * When stream is set to hashtag or hashtag:local, use this parameter to
1518
+ * specify the tag name.
1519
+ * @since 1.0.0
1520
+ */
1521
+ tag?: string;
1522
+ }
1523
+ /**
1524
+ * Possible JSON objects related to a event.
1525
+ */
1526
+ export type StreamPayload = Notification | Status;
1527
+ /**
1528
+ * Stream types one can subscribe to.
1529
+ */
1530
+ export type StreamType = 'direct' | 'hashtag' | 'hashtag:local' | 'list' | 'public' | 'public:local' | 'public:local:media' | 'public:media' | 'public:remote' | 'public:remote:media' | 'user' | 'user:notification';
1531
+ /**
1532
+ * Represents a hashtag used within the content of a status.
1533
+ * @since 0.9.0
1534
+ */
1535
+ export interface Tag {
1536
+ /**
1537
+ * Usage statistics for given days (typically the past week).
1538
+ * @since 2.4.1
1539
+ */
1540
+ history?: Array<TagStatistic>;
1541
+ /**
1542
+ * The value of the hashtag after the # sign.
1543
+ * @since 0.9.0
1544
+ */
1545
+ name: string;
1546
+ /**
1547
+ * A link to the hashtag on the instance.
1548
+ * @since 0.9.0
1549
+ */
1550
+ url: string;
1551
+ }
1552
+ /**
1553
+ * Usage statistic for given day.
1554
+ * @since 2.4.1
1555
+ */
1556
+ export interface TagStatistic {
1557
+ /**
1558
+ * The total of accounts using the tag within that day.
1559
+ * @since 2.4.1
1560
+ */
1561
+ accounts: number;
1562
+ /**
1563
+ * UNIX timestamp on midnight of the given day.
1564
+ * @since 2.4.1
1565
+ */
1566
+ day: number;
1567
+ /**
1568
+ * Whether the authorized user is following this tag.
1569
+ * @since 4.0.0
1570
+ */
1571
+ following?: boolean;
1572
+ /**
1573
+ * The counted usage of the tag within that day.
1574
+ * @since 2.4.1
1575
+ */
1576
+ uses: number;
1577
+ }
1578
+ export {};