@whop/sdk 0.0.25 → 0.0.27

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 (271) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/client.d.mts +29 -25
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +29 -25
  5. package/client.d.ts.map +1 -1
  6. package/client.js +14 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +16 -5
  9. package/client.mjs.map +1 -1
  10. package/internal/parse.d.mts.map +1 -1
  11. package/internal/parse.d.ts.map +1 -1
  12. package/internal/parse.js +5 -0
  13. package/internal/parse.js.map +1 -1
  14. package/internal/parse.mjs +5 -0
  15. package/internal/parse.mjs.map +1 -1
  16. package/package.json +3 -3
  17. package/resources/access-tokens.d.mts +32 -51
  18. package/resources/access-tokens.d.mts.map +1 -1
  19. package/resources/access-tokens.d.ts +32 -51
  20. package/resources/access-tokens.d.ts.map +1 -1
  21. package/resources/access-tokens.js +6 -8
  22. package/resources/access-tokens.js.map +1 -1
  23. package/resources/access-tokens.mjs +6 -8
  24. package/resources/access-tokens.mjs.map +1 -1
  25. package/resources/ai-chats.d.mts +36 -104
  26. package/resources/ai-chats.d.mts.map +1 -1
  27. package/resources/ai-chats.d.ts +36 -104
  28. package/resources/ai-chats.d.ts.map +1 -1
  29. package/resources/ai-chats.js +1 -1
  30. package/resources/ai-chats.js.map +1 -1
  31. package/resources/ai-chats.mjs +1 -1
  32. package/resources/ai-chats.mjs.map +1 -1
  33. package/resources/app-builds.d.mts +2 -2
  34. package/resources/app-builds.d.ts +2 -2
  35. package/resources/apps.d.mts +5 -4
  36. package/resources/apps.d.mts.map +1 -1
  37. package/resources/apps.d.ts +5 -4
  38. package/resources/apps.d.ts.map +1 -1
  39. package/resources/authorized-users.d.mts +43 -9
  40. package/resources/authorized-users.d.mts.map +1 -1
  41. package/resources/authorized-users.d.ts +43 -9
  42. package/resources/authorized-users.d.ts.map +1 -1
  43. package/resources/authorized-users.js +1 -1
  44. package/resources/authorized-users.js.map +1 -1
  45. package/resources/authorized-users.mjs +1 -1
  46. package/resources/authorized-users.mjs.map +1 -1
  47. package/resources/chat-channels.d.mts +1 -1
  48. package/resources/chat-channels.d.ts +1 -1
  49. package/resources/checkout-configurations.d.mts +24 -16
  50. package/resources/checkout-configurations.d.mts.map +1 -1
  51. package/resources/checkout-configurations.d.ts +24 -16
  52. package/resources/checkout-configurations.d.ts.map +1 -1
  53. package/resources/companies.d.mts +38 -25
  54. package/resources/companies.d.mts.map +1 -1
  55. package/resources/companies.d.ts +38 -25
  56. package/resources/companies.d.ts.map +1 -1
  57. package/resources/companies.js +7 -4
  58. package/resources/companies.js.map +1 -1
  59. package/resources/companies.mjs +7 -4
  60. package/resources/companies.mjs.map +1 -1
  61. package/resources/company-token-transactions.d.mts +23 -109
  62. package/resources/company-token-transactions.d.mts.map +1 -1
  63. package/resources/company-token-transactions.d.ts +23 -109
  64. package/resources/company-token-transactions.d.ts.map +1 -1
  65. package/resources/course-chapters.d.mts +3 -3
  66. package/resources/course-chapters.d.ts +3 -3
  67. package/resources/course-lessons.d.mts +15 -15
  68. package/resources/course-lessons.d.ts +15 -15
  69. package/resources/course-students.d.mts +6 -6
  70. package/resources/course-students.d.ts +6 -6
  71. package/resources/courses.d.mts +8 -8
  72. package/resources/courses.d.ts +8 -8
  73. package/resources/disputes.d.mts +20 -18
  74. package/resources/disputes.d.mts.map +1 -1
  75. package/resources/disputes.d.ts +20 -18
  76. package/resources/disputes.d.ts.map +1 -1
  77. package/resources/dm-channels.d.mts +161 -0
  78. package/resources/dm-channels.d.mts.map +1 -0
  79. package/resources/dm-channels.d.ts +161 -0
  80. package/resources/dm-channels.d.ts.map +1 -0
  81. package/resources/dm-channels.js +87 -0
  82. package/resources/dm-channels.js.map +1 -0
  83. package/resources/dm-channels.mjs +83 -0
  84. package/resources/dm-channels.mjs.map +1 -0
  85. package/resources/dm-members.d.mts +14 -66
  86. package/resources/dm-members.d.mts.map +1 -1
  87. package/resources/dm-members.d.ts +14 -66
  88. package/resources/dm-members.d.ts.map +1 -1
  89. package/resources/entries.d.mts +6 -6
  90. package/resources/entries.d.ts +6 -6
  91. package/resources/experiences.d.mts +6 -5
  92. package/resources/experiences.d.mts.map +1 -1
  93. package/resources/experiences.d.ts +6 -5
  94. package/resources/experiences.d.ts.map +1 -1
  95. package/resources/fee-markups.d.mts +6 -6
  96. package/resources/fee-markups.d.ts +6 -6
  97. package/resources/files.d.mts +9 -5
  98. package/resources/files.d.mts.map +1 -1
  99. package/resources/files.d.ts +9 -5
  100. package/resources/files.d.ts.map +1 -1
  101. package/resources/forum-posts.d.mts +8 -4
  102. package/resources/forum-posts.d.mts.map +1 -1
  103. package/resources/forum-posts.d.ts +8 -4
  104. package/resources/forum-posts.d.ts.map +1 -1
  105. package/resources/forums.d.mts +1 -1
  106. package/resources/forums.d.ts +1 -1
  107. package/resources/index.d.mts +12 -11
  108. package/resources/index.d.mts.map +1 -1
  109. package/resources/index.d.ts +12 -11
  110. package/resources/index.d.ts.map +1 -1
  111. package/resources/index.js +3 -1
  112. package/resources/index.js.map +1 -1
  113. package/resources/index.mjs +3 -2
  114. package/resources/index.mjs.map +1 -1
  115. package/resources/invoices.d.mts +28 -20
  116. package/resources/invoices.d.mts.map +1 -1
  117. package/resources/invoices.d.ts +28 -20
  118. package/resources/invoices.d.ts.map +1 -1
  119. package/resources/leads.d.mts +21 -189
  120. package/resources/leads.d.mts.map +1 -1
  121. package/resources/leads.d.ts +21 -189
  122. package/resources/leads.d.ts.map +1 -1
  123. package/resources/ledger-accounts.d.mts +12 -9
  124. package/resources/ledger-accounts.d.mts.map +1 -1
  125. package/resources/ledger-accounts.d.ts +12 -9
  126. package/resources/ledger-accounts.d.ts.map +1 -1
  127. package/resources/ledger-accounts.js.map +1 -1
  128. package/resources/ledger-accounts.mjs.map +1 -1
  129. package/resources/members.d.mts +14 -14
  130. package/resources/members.d.mts.map +1 -1
  131. package/resources/members.d.ts +14 -14
  132. package/resources/members.d.ts.map +1 -1
  133. package/resources/members.js +1 -1
  134. package/resources/members.js.map +1 -1
  135. package/resources/members.mjs +1 -1
  136. package/resources/members.mjs.map +1 -1
  137. package/resources/memberships.d.mts +25 -15
  138. package/resources/memberships.d.mts.map +1 -1
  139. package/resources/memberships.d.ts +25 -15
  140. package/resources/memberships.d.ts.map +1 -1
  141. package/resources/messages.d.mts +7 -3
  142. package/resources/messages.d.mts.map +1 -1
  143. package/resources/messages.d.ts +7 -3
  144. package/resources/messages.d.ts.map +1 -1
  145. package/resources/payments.d.mts +59 -19
  146. package/resources/payments.d.mts.map +1 -1
  147. package/resources/payments.d.ts +59 -19
  148. package/resources/payments.d.ts.map +1 -1
  149. package/resources/payout-methods.d.mts +14 -9
  150. package/resources/payout-methods.d.mts.map +1 -1
  151. package/resources/payout-methods.d.ts +14 -9
  152. package/resources/payout-methods.d.ts.map +1 -1
  153. package/resources/payout-methods.js.map +1 -1
  154. package/resources/payout-methods.mjs.map +1 -1
  155. package/resources/plans.d.mts +34 -24
  156. package/resources/plans.d.mts.map +1 -1
  157. package/resources/plans.d.ts +34 -24
  158. package/resources/plans.d.ts.map +1 -1
  159. package/resources/products.d.mts +4 -2
  160. package/resources/products.d.mts.map +1 -1
  161. package/resources/products.d.ts +4 -2
  162. package/resources/products.d.ts.map +1 -1
  163. package/resources/promo-codes.d.mts +22 -12
  164. package/resources/promo-codes.d.mts.map +1 -1
  165. package/resources/promo-codes.d.ts +22 -12
  166. package/resources/promo-codes.d.ts.map +1 -1
  167. package/resources/reactions.d.mts +1 -1
  168. package/resources/reactions.d.ts +1 -1
  169. package/resources/refunds.d.mts +19 -15
  170. package/resources/refunds.d.mts.map +1 -1
  171. package/resources/refunds.d.ts +19 -15
  172. package/resources/refunds.d.ts.map +1 -1
  173. package/resources/reviews.d.mts +10 -10
  174. package/resources/reviews.d.ts +10 -10
  175. package/resources/setup-intents.d.mts +18 -20
  176. package/resources/setup-intents.d.mts.map +1 -1
  177. package/resources/setup-intents.d.ts +18 -20
  178. package/resources/setup-intents.d.ts.map +1 -1
  179. package/resources/shared.d.mts +209 -137
  180. package/resources/shared.d.mts.map +1 -1
  181. package/resources/shared.d.ts +209 -137
  182. package/resources/shared.d.ts.map +1 -1
  183. package/resources/shipments.d.mts +4 -4
  184. package/resources/shipments.d.ts +4 -4
  185. package/resources/support-channels.d.mts +1 -1
  186. package/resources/support-channels.d.ts +1 -1
  187. package/resources/topups.d.mts +6 -4
  188. package/resources/topups.d.mts.map +1 -1
  189. package/resources/topups.d.ts +6 -4
  190. package/resources/topups.d.ts.map +1 -1
  191. package/resources/transfers.d.mts +8 -5
  192. package/resources/transfers.d.mts.map +1 -1
  193. package/resources/transfers.d.ts +8 -5
  194. package/resources/transfers.d.ts.map +1 -1
  195. package/resources/users.d.mts +46 -8
  196. package/resources/users.d.mts.map +1 -1
  197. package/resources/users.d.ts +46 -8
  198. package/resources/users.d.ts.map +1 -1
  199. package/resources/users.js +10 -0
  200. package/resources/users.js.map +1 -1
  201. package/resources/users.mjs +10 -0
  202. package/resources/users.mjs.map +1 -1
  203. package/resources/verifications.d.mts +12 -4
  204. package/resources/verifications.d.mts.map +1 -1
  205. package/resources/verifications.d.ts +12 -4
  206. package/resources/verifications.d.ts.map +1 -1
  207. package/resources/webhooks.d.mts +105 -350
  208. package/resources/webhooks.d.mts.map +1 -1
  209. package/resources/webhooks.d.ts +105 -350
  210. package/resources/webhooks.d.ts.map +1 -1
  211. package/resources/webhooks.js.map +1 -1
  212. package/resources/webhooks.mjs +2 -2
  213. package/resources/webhooks.mjs.map +1 -1
  214. package/resources/withdrawals.d.mts +32 -139
  215. package/resources/withdrawals.d.mts.map +1 -1
  216. package/resources/withdrawals.d.ts +32 -139
  217. package/resources/withdrawals.d.ts.map +1 -1
  218. package/src/client.ts +87 -41
  219. package/src/internal/parse.ts +6 -0
  220. package/src/resources/access-tokens.ts +35 -56
  221. package/src/resources/ai-chats.ts +36 -122
  222. package/src/resources/app-builds.ts +2 -2
  223. package/src/resources/apps.ts +5 -4
  224. package/src/resources/authorized-users.ts +49 -9
  225. package/src/resources/chat-channels.ts +1 -1
  226. package/src/resources/checkout-configurations.ts +24 -16
  227. package/src/resources/companies.ts +41 -26
  228. package/src/resources/company-token-transactions.ts +24 -126
  229. package/src/resources/course-chapters.ts +3 -3
  230. package/src/resources/course-lessons.ts +15 -15
  231. package/src/resources/course-students.ts +6 -6
  232. package/src/resources/courses.ts +8 -8
  233. package/src/resources/disputes.ts +20 -18
  234. package/src/resources/dm-channels.ts +212 -0
  235. package/src/resources/dm-members.ts +16 -78
  236. package/src/resources/entries.ts +6 -6
  237. package/src/resources/experiences.ts +6 -5
  238. package/src/resources/fee-markups.ts +6 -6
  239. package/src/resources/files.ts +10 -4
  240. package/src/resources/forum-posts.ts +8 -4
  241. package/src/resources/forums.ts +1 -1
  242. package/src/resources/index.ts +38 -18
  243. package/src/resources/invoices.ts +28 -20
  244. package/src/resources/leads.ts +21 -217
  245. package/src/resources/ledger-accounts.ts +12 -42
  246. package/src/resources/members.ts +15 -15
  247. package/src/resources/memberships.ts +34 -30
  248. package/src/resources/messages.ts +7 -3
  249. package/src/resources/payments.ts +67 -17
  250. package/src/resources/payout-methods.ts +21 -8
  251. package/src/resources/plans.ts +34 -24
  252. package/src/resources/products.ts +4 -2
  253. package/src/resources/promo-codes.ts +22 -12
  254. package/src/resources/reactions.ts +1 -1
  255. package/src/resources/refunds.ts +20 -15
  256. package/src/resources/reviews.ts +10 -10
  257. package/src/resources/setup-intents.ts +18 -20
  258. package/src/resources/shared.ts +217 -145
  259. package/src/resources/shipments.ts +4 -4
  260. package/src/resources/support-channels.ts +1 -1
  261. package/src/resources/topups.ts +6 -4
  262. package/src/resources/transfers.ts +8 -5
  263. package/src/resources/users.ts +58 -8
  264. package/src/resources/verifications.ts +50 -37
  265. package/src/resources/webhooks.ts +138 -785
  266. package/src/resources/withdrawals.ts +39 -216
  267. package/src/version.ts +1 -1
  268. package/version.d.mts +1 -1
  269. package/version.d.ts +1 -1
  270. package/version.js +1 -1
  271. package/version.mjs +1 -1
@@ -0,0 +1,161 @@
1
+ import { APIResource } from "../core/resource.mjs";
2
+ import { APIPromise } from "../core/api-promise.mjs";
3
+ import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
4
+ import { RequestOptions } from "../internal/request-options.mjs";
5
+ export declare class DmChannels extends APIResource {
6
+ /**
7
+ * Creates a DM channel
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const dmChannel = await client.dmChannels.create({
12
+ * with_user_ids: ['string'],
13
+ * });
14
+ * ```
15
+ */
16
+ create(body: DmChannelCreateParams, options?: RequestOptions): APIPromise<DmChannel>;
17
+ /**
18
+ * Retrieves a DM channel
19
+ *
20
+ * Required permissions:
21
+ *
22
+ * - `dms:read`
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const dmChannel = await client.dmChannels.retrieve('id');
27
+ * ```
28
+ */
29
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmChannel>;
30
+ /**
31
+ * Updates a DM channel
32
+ *
33
+ * Required permissions:
34
+ *
35
+ * - `dms:channel:manage`
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const dmChannel = await client.dmChannels.update('id');
40
+ * ```
41
+ */
42
+ update(id: string, body?: DmChannelUpdateParams | null | undefined, options?: RequestOptions): APIPromise<DmChannel>;
43
+ /**
44
+ * Lists DM channels for the current user
45
+ *
46
+ * Required permissions:
47
+ *
48
+ * - `dms:read`
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * // Automatically fetches more pages as needed.
53
+ * for await (const dmChannelListResponse of client.dmChannels.list()) {
54
+ * // ...
55
+ * }
56
+ * ```
57
+ */
58
+ list(query?: DmChannelListParams | null | undefined, options?: RequestOptions): PagePromise<DmChannelListResponsesCursorPage, DmChannelListResponse>;
59
+ /**
60
+ * Deletes a DM channel
61
+ *
62
+ * Required permissions:
63
+ *
64
+ * - `dms:channel:manage`
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const dmChannel = await client.dmChannels.delete('id');
69
+ * ```
70
+ */
71
+ delete(id: string, options?: RequestOptions): APIPromise<DmChannelDeleteResponse>;
72
+ }
73
+ export type DmChannelListResponsesCursorPage = CursorPage<DmChannelListResponse>;
74
+ /**
75
+ * Represents a DM channel
76
+ */
77
+ export interface DmChannel {
78
+ /**
79
+ * The unique identifier for the entity
80
+ */
81
+ id: string;
82
+ /**
83
+ * The time the entity was created (in milliseconds since Unix epoch)
84
+ */
85
+ created_at: string;
86
+ /**
87
+ * When the last message was sent
88
+ */
89
+ last_message_at: string | null;
90
+ /**
91
+ * The custom name of the DM channel, if any
92
+ */
93
+ name: string | null;
94
+ }
95
+ /**
96
+ * Represents a DM channel
97
+ */
98
+ export interface DmChannelListResponse {
99
+ /**
100
+ * The unique identifier for the entity
101
+ */
102
+ id: string;
103
+ /**
104
+ * The time the entity was created (in milliseconds since Unix epoch)
105
+ */
106
+ created_at: string;
107
+ /**
108
+ * When the last message was sent
109
+ */
110
+ last_message_at: string | null;
111
+ /**
112
+ * The custom name of the DM channel, if any
113
+ */
114
+ name: string | null;
115
+ }
116
+ /**
117
+ * Represents `true` or `false` values.
118
+ */
119
+ export type DmChannelDeleteResponse = boolean;
120
+ export interface DmChannelCreateParams {
121
+ /**
122
+ * The user ids to create a DM with. Can be email, username or user_id (tag)
123
+ */
124
+ with_user_ids: Array<string>;
125
+ /**
126
+ * The ID of the company to scope this DM channel to.
127
+ */
128
+ company_id?: string | null;
129
+ /**
130
+ * The custom name for the DM channel
131
+ */
132
+ custom_name?: string | null;
133
+ }
134
+ export interface DmChannelUpdateParams {
135
+ /**
136
+ * The custom name for the DM channel
137
+ */
138
+ custom_name?: string | null;
139
+ }
140
+ export interface DmChannelListParams extends CursorPageParams {
141
+ /**
142
+ * Returns the elements in the list that come before the specified cursor.
143
+ */
144
+ before?: string | null;
145
+ /**
146
+ * Filter DM channels scoped to a specific company
147
+ */
148
+ company_id?: string | null;
149
+ /**
150
+ * Returns the first _n_ elements from the list.
151
+ */
152
+ first?: number | null;
153
+ /**
154
+ * Returns the last _n_ elements from the list.
155
+ */
156
+ last?: number | null;
157
+ }
158
+ export declare namespace DmChannels {
159
+ export { type DmChannel as DmChannel, type DmChannelListResponse as DmChannelListResponse, type DmChannelDeleteResponse as DmChannelDeleteResponse, type DmChannelListResponsesCursorPage as DmChannelListResponsesCursorPage, type DmChannelCreateParams as DmChannelCreateParams, type DmChannelUpdateParams as DmChannelUpdateParams, type DmChannelListParams as DmChannelListParams, };
160
+ }
161
+ //# sourceMappingURL=dm-channels.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dm-channels.d.mts","sourceRoot":"","sources":["../src/resources/dm-channels.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,qBAAqB,GAAG,IAAI,GAAG,SAAc,EACnD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,SAAS,CAAC;IAIxB;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,KAAK,GAAE,mBAAmB,GAAG,IAAI,GAAG,SAAc,EAClD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gCAAgC,EAAE,qBAAqB,CAAC;IAIvE;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,EA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AI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -0,0 +1,161 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import { APIPromise } from "../core/api-promise.js";
3
+ import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.js";
4
+ import { RequestOptions } from "../internal/request-options.js";
5
+ export declare class DmChannels extends APIResource {
6
+ /**
7
+ * Creates a DM channel
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const dmChannel = await client.dmChannels.create({
12
+ * with_user_ids: ['string'],
13
+ * });
14
+ * ```
15
+ */
16
+ create(body: DmChannelCreateParams, options?: RequestOptions): APIPromise<DmChannel>;
17
+ /**
18
+ * Retrieves a DM channel
19
+ *
20
+ * Required permissions:
21
+ *
22
+ * - `dms:read`
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const dmChannel = await client.dmChannels.retrieve('id');
27
+ * ```
28
+ */
29
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmChannel>;
30
+ /**
31
+ * Updates a DM channel
32
+ *
33
+ * Required permissions:
34
+ *
35
+ * - `dms:channel:manage`
36
+ *
37
+ * @example
38
+ * ```ts
39
+ * const dmChannel = await client.dmChannels.update('id');
40
+ * ```
41
+ */
42
+ update(id: string, body?: DmChannelUpdateParams | null | undefined, options?: RequestOptions): APIPromise<DmChannel>;
43
+ /**
44
+ * Lists DM channels for the current user
45
+ *
46
+ * Required permissions:
47
+ *
48
+ * - `dms:read`
49
+ *
50
+ * @example
51
+ * ```ts
52
+ * // Automatically fetches more pages as needed.
53
+ * for await (const dmChannelListResponse of client.dmChannels.list()) {
54
+ * // ...
55
+ * }
56
+ * ```
57
+ */
58
+ list(query?: DmChannelListParams | null | undefined, options?: RequestOptions): PagePromise<DmChannelListResponsesCursorPage, DmChannelListResponse>;
59
+ /**
60
+ * Deletes a DM channel
61
+ *
62
+ * Required permissions:
63
+ *
64
+ * - `dms:channel:manage`
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * const dmChannel = await client.dmChannels.delete('id');
69
+ * ```
70
+ */
71
+ delete(id: string, options?: RequestOptions): APIPromise<DmChannelDeleteResponse>;
72
+ }
73
+ export type DmChannelListResponsesCursorPage = CursorPage<DmChannelListResponse>;
74
+ /**
75
+ * Represents a DM channel
76
+ */
77
+ export interface DmChannel {
78
+ /**
79
+ * The unique identifier for the entity
80
+ */
81
+ id: string;
82
+ /**
83
+ * The time the entity was created (in milliseconds since Unix epoch)
84
+ */
85
+ created_at: string;
86
+ /**
87
+ * When the last message was sent
88
+ */
89
+ last_message_at: string | null;
90
+ /**
91
+ * The custom name of the DM channel, if any
92
+ */
93
+ name: string | null;
94
+ }
95
+ /**
96
+ * Represents a DM channel
97
+ */
98
+ export interface DmChannelListResponse {
99
+ /**
100
+ * The unique identifier for the entity
101
+ */
102
+ id: string;
103
+ /**
104
+ * The time the entity was created (in milliseconds since Unix epoch)
105
+ */
106
+ created_at: string;
107
+ /**
108
+ * When the last message was sent
109
+ */
110
+ last_message_at: string | null;
111
+ /**
112
+ * The custom name of the DM channel, if any
113
+ */
114
+ name: string | null;
115
+ }
116
+ /**
117
+ * Represents `true` or `false` values.
118
+ */
119
+ export type DmChannelDeleteResponse = boolean;
120
+ export interface DmChannelCreateParams {
121
+ /**
122
+ * The user ids to create a DM with. Can be email, username or user_id (tag)
123
+ */
124
+ with_user_ids: Array<string>;
125
+ /**
126
+ * The ID of the company to scope this DM channel to.
127
+ */
128
+ company_id?: string | null;
129
+ /**
130
+ * The custom name for the DM channel
131
+ */
132
+ custom_name?: string | null;
133
+ }
134
+ export interface DmChannelUpdateParams {
135
+ /**
136
+ * The custom name for the DM channel
137
+ */
138
+ custom_name?: string | null;
139
+ }
140
+ export interface DmChannelListParams extends CursorPageParams {
141
+ /**
142
+ * Returns the elements in the list that come before the specified cursor.
143
+ */
144
+ before?: string | null;
145
+ /**
146
+ * Filter DM channels scoped to a specific company
147
+ */
148
+ company_id?: string | null;
149
+ /**
150
+ * Returns the first _n_ elements from the list.
151
+ */
152
+ first?: number | null;
153
+ /**
154
+ * Returns the last _n_ elements from the list.
155
+ */
156
+ last?: number | null;
157
+ }
158
+ export declare namespace DmChannels {
159
+ export { type DmChannel as DmChannel, type DmChannelListResponse as DmChannelListResponse, type DmChannelDeleteResponse as DmChannelDeleteResponse, type DmChannelListResponsesCursorPage as DmChannelListResponsesCursorPage, type DmChannelCreateParams as DmChannelCreateParams, type DmChannelUpdateParams as DmChannelUpdateParams, type DmChannelListParams as DmChannelListParams, };
160
+ }
161
+ //# sourceMappingURL=dm-channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dm-channels.d.ts","sourceRoot":"","sources":["../src/resources/dm-channels.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIpF;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,SAAS,CAAC;IAIrE;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,IAAI,GAAE,qBAAqB,GAA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,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,SAAS,IAAI,SAAS,EAC3B,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,gCAAgC,IAAI,gCAAgC,EACzE,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.DmChannels = void 0;
5
+ const resource_1 = require("../core/resource.js");
6
+ const pagination_1 = require("../core/pagination.js");
7
+ const path_1 = require("../internal/utils/path.js");
8
+ class DmChannels extends resource_1.APIResource {
9
+ /**
10
+ * Creates a DM channel
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * const dmChannel = await client.dmChannels.create({
15
+ * with_user_ids: ['string'],
16
+ * });
17
+ * ```
18
+ */
19
+ create(body, options) {
20
+ return this._client.post('/dm_channels', { body, ...options });
21
+ }
22
+ /**
23
+ * Retrieves a DM channel
24
+ *
25
+ * Required permissions:
26
+ *
27
+ * - `dms:read`
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const dmChannel = await client.dmChannels.retrieve('id');
32
+ * ```
33
+ */
34
+ retrieve(id, options) {
35
+ return this._client.get((0, path_1.path) `/dm_channels/${id}`, options);
36
+ }
37
+ /**
38
+ * Updates a DM channel
39
+ *
40
+ * Required permissions:
41
+ *
42
+ * - `dms:channel:manage`
43
+ *
44
+ * @example
45
+ * ```ts
46
+ * const dmChannel = await client.dmChannels.update('id');
47
+ * ```
48
+ */
49
+ update(id, body = {}, options) {
50
+ return this._client.patch((0, path_1.path) `/dm_channels/${id}`, { body, ...options });
51
+ }
52
+ /**
53
+ * Lists DM channels for the current user
54
+ *
55
+ * Required permissions:
56
+ *
57
+ * - `dms:read`
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * // Automatically fetches more pages as needed.
62
+ * for await (const dmChannelListResponse of client.dmChannels.list()) {
63
+ * // ...
64
+ * }
65
+ * ```
66
+ */
67
+ list(query = {}, options) {
68
+ return this._client.getAPIList('/dm_channels', (pagination_1.CursorPage), { query, ...options });
69
+ }
70
+ /**
71
+ * Deletes a DM channel
72
+ *
73
+ * Required permissions:
74
+ *
75
+ * - `dms:channel:manage`
76
+ *
77
+ * @example
78
+ * ```ts
79
+ * const dmChannel = await client.dmChannels.delete('id');
80
+ * ```
81
+ */
82
+ delete(id, options) {
83
+ return this._client.delete((0, path_1.path) `/dm_channels/${id}`, options);
84
+ }
85
+ }
86
+ exports.DmChannels = DmChannels;
87
+ //# sourceMappingURL=dm-channels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dm-channels.js","sourceRoot":"","sources":["../src/resources/dm-channels.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAU,EACV,OAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,uBAAiC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF;AAxFD,gCAwFC"}
@@ -0,0 +1,83 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { CursorPage } from "../core/pagination.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class DmChannels extends APIResource {
6
+ /**
7
+ * Creates a DM channel
8
+ *
9
+ * @example
10
+ * ```ts
11
+ * const dmChannel = await client.dmChannels.create({
12
+ * with_user_ids: ['string'],
13
+ * });
14
+ * ```
15
+ */
16
+ create(body, options) {
17
+ return this._client.post('/dm_channels', { body, ...options });
18
+ }
19
+ /**
20
+ * Retrieves a DM channel
21
+ *
22
+ * Required permissions:
23
+ *
24
+ * - `dms:read`
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * const dmChannel = await client.dmChannels.retrieve('id');
29
+ * ```
30
+ */
31
+ retrieve(id, options) {
32
+ return this._client.get(path `/dm_channels/${id}`, options);
33
+ }
34
+ /**
35
+ * Updates a DM channel
36
+ *
37
+ * Required permissions:
38
+ *
39
+ * - `dms:channel:manage`
40
+ *
41
+ * @example
42
+ * ```ts
43
+ * const dmChannel = await client.dmChannels.update('id');
44
+ * ```
45
+ */
46
+ update(id, body = {}, options) {
47
+ return this._client.patch(path `/dm_channels/${id}`, { body, ...options });
48
+ }
49
+ /**
50
+ * Lists DM channels for the current user
51
+ *
52
+ * Required permissions:
53
+ *
54
+ * - `dms:read`
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * // Automatically fetches more pages as needed.
59
+ * for await (const dmChannelListResponse of client.dmChannels.list()) {
60
+ * // ...
61
+ * }
62
+ * ```
63
+ */
64
+ list(query = {}, options) {
65
+ return this._client.getAPIList('/dm_channels', (CursorPage), { query, ...options });
66
+ }
67
+ /**
68
+ * Deletes a DM channel
69
+ *
70
+ * Required permissions:
71
+ *
72
+ * - `dms:channel:manage`
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const dmChannel = await client.dmChannels.delete('id');
77
+ * ```
78
+ */
79
+ delete(id, options) {
80
+ return this._client.delete(path `/dm_channels/${id}`, options);
81
+ }
82
+ }
83
+ //# sourceMappingURL=dm-channels.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dm-channels.mjs","sourceRoot":"","sources":["../src/resources/dm-channels.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;OASG;IACH,MAAM,CAAC,IAA2B,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAU,EACV,OAAiD,EAAE,EACnD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,CACF,QAAgD,EAAE,EAClD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,UAAiC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3G,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAU,EAAE,OAAwB;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;CACF"}
@@ -18,7 +18,7 @@ export declare class DmMembers extends APIResource {
18
18
  * });
19
19
  * ```
20
20
  */
21
- create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMemberCreateResponse>;
21
+ create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMember>;
22
22
  /**
23
23
  * Retrieves a DM channel member
24
24
  *
@@ -31,7 +31,7 @@ export declare class DmMembers extends APIResource {
31
31
  * const dmMember = await client.dmMembers.retrieve('id');
32
32
  * ```
33
33
  */
34
- retrieve(id: string, options?: RequestOptions): APIPromise<DmMemberRetrieveResponse>;
34
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmMember>;
35
35
  /**
36
36
  * Updates a DM channel member's settings
37
37
  *
@@ -44,7 +44,7 @@ export declare class DmMembers extends APIResource {
44
44
  * const dmMember = await client.dmMembers.update('id');
45
45
  * ```
46
46
  */
47
- update(id: string, body?: DmMemberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<DmMemberUpdateResponse>;
47
+ update(id: string, body?: DmMemberUpdateParams | null | undefined, options?: RequestOptions): APIPromise<DmMember>;
48
48
  /**
49
49
  * Lists members of a DM channel
50
50
  *
@@ -79,69 +79,17 @@ export declare class DmMembers extends APIResource {
79
79
  }
80
80
  export type DmMemberListResponsesCursorPage = CursorPage<DmMemberListResponse>;
81
81
  /**
82
- * Represents a member of a DM channel
82
+ * The notification preferences for a DMs feed member
83
83
  */
84
- export interface DmMemberCreateResponse {
85
- /**
86
- * The unique identifier for the entity
87
- */
88
- id: string;
89
- /**
90
- * The ID of the DM channel
91
- */
92
- channel_id: string;
93
- /**
94
- * Timestamp when the member last viewed the channel (in milliseconds since Unix
95
- * epoch)
96
- */
97
- last_viewed_at: string | null;
98
- /**
99
- * The notification preference for this member (all, mentions, none)
100
- */
101
- notification_preference: 'all' | 'mentions' | 'none';
102
- /**
103
- * The status of the membership (requested, accepted, rejected)
104
- */
105
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
106
- /**
107
- * The ID of the user who is a member of the channel
108
- */
109
- user_id: string;
110
- }
84
+ export type DmFeedMemberNotificationPreferences = 'all' | 'mentions' | 'none';
111
85
  /**
112
- * Represents a member of a DM channel
86
+ * The statuses of a DMs feed member
113
87
  */
114
- export interface DmMemberRetrieveResponse {
115
- /**
116
- * The unique identifier for the entity
117
- */
118
- id: string;
119
- /**
120
- * The ID of the DM channel
121
- */
122
- channel_id: string;
123
- /**
124
- * Timestamp when the member last viewed the channel (in milliseconds since Unix
125
- * epoch)
126
- */
127
- last_viewed_at: string | null;
128
- /**
129
- * The notification preference for this member (all, mentions, none)
130
- */
131
- notification_preference: 'all' | 'mentions' | 'none';
132
- /**
133
- * The status of the membership (requested, accepted, rejected)
134
- */
135
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
136
- /**
137
- * The ID of the user who is a member of the channel
138
- */
139
- user_id: string;
140
- }
88
+ export type DmFeedMemberStatuses = 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
141
89
  /**
142
90
  * Represents a member of a DM channel
143
91
  */
144
- export interface DmMemberUpdateResponse {
92
+ export interface DmMember {
145
93
  /**
146
94
  * The unique identifier for the entity
147
95
  */
@@ -158,11 +106,11 @@ export interface DmMemberUpdateResponse {
158
106
  /**
159
107
  * The notification preference for this member (all, mentions, none)
160
108
  */
161
- notification_preference: 'all' | 'mentions' | 'none';
109
+ notification_preference: DmFeedMemberNotificationPreferences;
162
110
  /**
163
111
  * The status of the membership (requested, accepted, rejected)
164
112
  */
165
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
113
+ status: DmFeedMemberStatuses;
166
114
  /**
167
115
  * The ID of the user who is a member of the channel
168
116
  */
@@ -188,7 +136,7 @@ export interface DmMemberListResponse {
188
136
  /**
189
137
  * The status of the membership (requested, accepted, rejected)
190
138
  */
191
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
139
+ status: DmFeedMemberStatuses;
192
140
  /**
193
141
  * The ID of the user who is a member of the channel
194
142
  */
@@ -212,11 +160,11 @@ export interface DmMemberUpdateParams {
212
160
  /**
213
161
  * The notification preferences for a DMs feed member
214
162
  */
215
- notification_preference?: 'all' | 'mentions' | 'none' | null;
163
+ notification_preference?: DmFeedMemberNotificationPreferences | null;
216
164
  /**
217
165
  * The statuses of a DMs feed member
218
166
  */
219
- status?: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived' | null;
167
+ status?: DmFeedMemberStatuses | null;
220
168
  }
221
169
  export interface DmMemberListParams extends CursorPageParams {
222
170
  /**
@@ -237,6 +185,6 @@ export interface DmMemberListParams extends CursorPageParams {
237
185
  last?: number | null;
238
186
  }
239
187
  export declare namespace DmMembers {
240
- export { type DmMemberCreateResponse as DmMemberCreateResponse, type DmMemberRetrieveResponse as DmMemberRetrieveResponse, type DmMemberUpdateResponse as DmMemberUpdateResponse, type DmMemberListResponse as DmMemberListResponse, type DmMemberDeleteResponse as DmMemberDeleteResponse, type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage, type DmMemberCreateParams as DmMemberCreateParams, type DmMemberUpdateParams as DmMemberUpdateParams, type DmMemberListParams as DmMemberListParams, };
188
+ export { type DmFeedMemberNotificationPreferences as DmFeedMemberNotificationPreferences, type DmFeedMemberStatuses as DmFeedMemberStatuses, type DmMember as DmMember, type DmMemberListResponse as DmMemberListResponse, type DmMemberDeleteResponse as DmMemberDeleteResponse, type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage, type DmMemberCreateParams as DmMemberCreateParams, type DmMemberUpdateParams as DmMemberUpdateParams, type DmMemberListParams as DmMemberListParams, };
241
189
  }
242
190
  //# sourceMappingURL=dm-members.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dm-members.d.mts","sourceRoot":"","sources":["../src/resources/dm-members.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;IAIhG;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIpF;;;;;;;;;;;OAWG;IACH,MAAM,CACJ,EAAE,EAAE,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