@whop/sdk 0.0.25 → 0.0.26

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 (133) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/client.d.mts +23 -20
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +23 -20
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +8 -4
  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 +1 -1
  17. package/resources/ai-chats.d.mts +7 -103
  18. package/resources/ai-chats.d.mts.map +1 -1
  19. package/resources/ai-chats.d.ts +7 -103
  20. package/resources/ai-chats.d.ts.map +1 -1
  21. package/resources/ai-chats.js.map +1 -1
  22. package/resources/ai-chats.mjs.map +1 -1
  23. package/resources/authorized-users.d.mts +39 -5
  24. package/resources/authorized-users.d.mts.map +1 -1
  25. package/resources/authorized-users.d.ts +39 -5
  26. package/resources/authorized-users.d.ts.map +1 -1
  27. package/resources/authorized-users.js +1 -1
  28. package/resources/authorized-users.js.map +1 -1
  29. package/resources/authorized-users.mjs +1 -1
  30. package/resources/authorized-users.mjs.map +1 -1
  31. package/resources/company-token-transactions.d.mts +13 -99
  32. package/resources/company-token-transactions.d.mts.map +1 -1
  33. package/resources/company-token-transactions.d.ts +13 -99
  34. package/resources/company-token-transactions.d.ts.map +1 -1
  35. package/resources/dm-channels.d.mts +161 -0
  36. package/resources/dm-channels.d.mts.map +1 -0
  37. package/resources/dm-channels.d.ts +161 -0
  38. package/resources/dm-channels.d.ts.map +1 -0
  39. package/resources/dm-channels.js +87 -0
  40. package/resources/dm-channels.js.map +1 -0
  41. package/resources/dm-channels.mjs +83 -0
  42. package/resources/dm-channels.mjs.map +1 -0
  43. package/resources/dm-members.d.mts +14 -66
  44. package/resources/dm-members.d.mts.map +1 -1
  45. package/resources/dm-members.d.ts +14 -66
  46. package/resources/dm-members.d.ts.map +1 -1
  47. package/resources/files.d.mts +7 -3
  48. package/resources/files.d.mts.map +1 -1
  49. package/resources/files.d.ts +7 -3
  50. package/resources/files.d.ts.map +1 -1
  51. package/resources/index.d.mts +11 -10
  52. package/resources/index.d.mts.map +1 -1
  53. package/resources/index.d.ts +11 -10
  54. package/resources/index.d.ts.map +1 -1
  55. package/resources/index.js +3 -1
  56. package/resources/index.js.map +1 -1
  57. package/resources/index.mjs +3 -2
  58. package/resources/index.mjs.map +1 -1
  59. package/resources/leads.d.mts +9 -177
  60. package/resources/leads.d.mts.map +1 -1
  61. package/resources/leads.d.ts +9 -177
  62. package/resources/leads.d.ts.map +1 -1
  63. package/resources/ledger-accounts.d.mts +3 -2
  64. package/resources/ledger-accounts.d.mts.map +1 -1
  65. package/resources/ledger-accounts.d.ts +3 -2
  66. package/resources/ledger-accounts.d.ts.map +1 -1
  67. package/resources/ledger-accounts.js.map +1 -1
  68. package/resources/ledger-accounts.mjs.map +1 -1
  69. package/resources/members.d.mts +5 -5
  70. package/resources/members.d.mts.map +1 -1
  71. package/resources/members.d.ts +5 -5
  72. package/resources/members.d.ts.map +1 -1
  73. package/resources/members.js +1 -1
  74. package/resources/members.js.map +1 -1
  75. package/resources/members.mjs +1 -1
  76. package/resources/members.mjs.map +1 -1
  77. package/resources/memberships.d.mts +8 -3
  78. package/resources/memberships.d.mts.map +1 -1
  79. package/resources/memberships.d.ts +8 -3
  80. package/resources/memberships.d.ts.map +1 -1
  81. package/resources/payments.d.mts +33 -0
  82. package/resources/payments.d.mts.map +1 -1
  83. package/resources/payments.d.ts +33 -0
  84. package/resources/payments.d.ts.map +1 -1
  85. package/resources/payout-methods.d.mts +8 -3
  86. package/resources/payout-methods.d.mts.map +1 -1
  87. package/resources/payout-methods.d.ts +8 -3
  88. package/resources/payout-methods.d.ts.map +1 -1
  89. package/resources/payout-methods.js.map +1 -1
  90. package/resources/payout-methods.mjs.map +1 -1
  91. package/resources/shared.d.mts +35 -1
  92. package/resources/shared.d.mts.map +1 -1
  93. package/resources/shared.d.ts +35 -1
  94. package/resources/shared.d.ts.map +1 -1
  95. package/resources/verifications.d.mts +11 -3
  96. package/resources/verifications.d.mts.map +1 -1
  97. package/resources/verifications.d.ts +11 -3
  98. package/resources/verifications.d.ts.map +1 -1
  99. package/resources/webhooks.d.mts +34 -293
  100. package/resources/webhooks.d.mts.map +1 -1
  101. package/resources/webhooks.d.ts +34 -293
  102. package/resources/webhooks.d.ts.map +1 -1
  103. package/resources/webhooks.js.map +1 -1
  104. package/resources/webhooks.mjs +2 -2
  105. package/resources/webhooks.mjs.map +1 -1
  106. package/resources/withdrawals.d.mts +17 -128
  107. package/resources/withdrawals.d.mts.map +1 -1
  108. package/resources/withdrawals.d.ts +17 -128
  109. package/resources/withdrawals.d.ts.map +1 -1
  110. package/src/client.ts +68 -34
  111. package/src/internal/parse.ts +6 -0
  112. package/src/resources/ai-chats.ts +7 -126
  113. package/src/resources/authorized-users.ts +45 -5
  114. package/src/resources/company-token-transactions.ts +14 -116
  115. package/src/resources/dm-channels.ts +212 -0
  116. package/src/resources/dm-members.ts +16 -78
  117. package/src/resources/files.ts +8 -2
  118. package/src/resources/index.ts +36 -17
  119. package/src/resources/leads.ts +9 -205
  120. package/src/resources/ledger-accounts.ts +3 -35
  121. package/src/resources/members.ts +6 -6
  122. package/src/resources/memberships.ts +16 -18
  123. package/src/resources/payments.ts +40 -0
  124. package/src/resources/payout-methods.ts +15 -2
  125. package/src/resources/shared.ts +42 -9
  126. package/src/resources/verifications.ts +49 -36
  127. package/src/resources/webhooks.ts +67 -728
  128. package/src/resources/withdrawals.ts +24 -205
  129. package/src/version.ts +1 -1
  130. package/version.d.mts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
  133. package/version.mjs +1 -1
@@ -31,7 +31,7 @@ export class CompanyTokenTransactions extends APIResource {
31
31
  create(
32
32
  body: CompanyTokenTransactionCreateParams,
33
33
  options?: RequestOptions,
34
- ): APIPromise<CompanyTokenTransactionCreateResponse> {
34
+ ): APIPromise<CompanyTokenTransaction> {
35
35
  return this._client.post('/company_token_transactions', { body, ...options });
36
36
  }
37
37
 
@@ -44,7 +44,7 @@ export class CompanyTokenTransactions extends APIResource {
44
44
  * - `member:basic:read`
45
45
  * - `company:basic:read`
46
46
  */
47
- retrieve(id: string, options?: RequestOptions): APIPromise<CompanyTokenTransactionRetrieveResponse> {
47
+ retrieve(id: string, options?: RequestOptions): APIPromise<CompanyTokenTransaction> {
48
48
  return this._client.get(path`/company_token_transactions/${id}`, options);
49
49
  }
50
50
 
@@ -72,116 +72,14 @@ export class CompanyTokenTransactions extends APIResource {
72
72
  export type CompanyTokenTransactionListResponsesCursorPage = CursorPage<CompanyTokenTransactionListResponse>;
73
73
 
74
74
  /**
75
- * A token transaction within a company
75
+ * The type of token transaction
76
76
  */
77
- export interface CompanyTokenTransactionCreateResponse {
78
- /**
79
- * The ID of the transaction
80
- */
81
- id: string;
82
-
83
- /**
84
- * The transaction amount (always positive)
85
- */
86
- amount: number;
87
-
88
- /**
89
- * The company
90
- */
91
- company: CompanyTokenTransactionCreateResponse.Company;
92
-
93
- /**
94
- * When the transaction was created
95
- */
96
- created_at: string;
97
-
98
- /**
99
- * Optional description
100
- */
101
- description: string | null;
102
-
103
- /**
104
- * Optional idempotency key to prevent duplicate transactions
105
- */
106
- idempotency_key: string | null;
107
-
108
- /**
109
- * For transfers, the ID of the linked transaction
110
- */
111
- linked_transaction_id: string | null;
112
-
113
- /**
114
- * The member
115
- */
116
- member: CompanyTokenTransactionCreateResponse.Member;
117
-
118
- /**
119
- * The type of transaction
120
- */
121
- transaction_type: 'add' | 'subtract' | 'transfer';
122
-
123
- /**
124
- * The user whose balance changed
125
- */
126
- user: CompanyTokenTransactionCreateResponse.User;
127
- }
128
-
129
- export namespace CompanyTokenTransactionCreateResponse {
130
- /**
131
- * The company
132
- */
133
- export interface Company {
134
- /**
135
- * The ID of the company
136
- */
137
- id: string;
138
-
139
- /**
140
- * The slug/route of the company on the Whop site.
141
- */
142
- route: string;
143
-
144
- /**
145
- * The written name of the company.
146
- */
147
- title: string;
148
- }
149
-
150
- /**
151
- * The member
152
- */
153
- export interface Member {
154
- /**
155
- * The ID of the member
156
- */
157
- id: string;
158
- }
159
-
160
- /**
161
- * The user whose balance changed
162
- */
163
- export interface User {
164
- /**
165
- * The internal ID of the user.
166
- */
167
- id: string;
168
-
169
- /**
170
- * The name of the user from their Whop account.
171
- */
172
- name: string | null;
173
-
174
- /**
175
- * The username of the user from their Whop account.
176
- */
177
- username: string;
178
- }
179
- }
77
+ export type BotTokenTransactionTypes = 'add' | 'subtract' | 'transfer';
180
78
 
181
79
  /**
182
80
  * A token transaction within a company
183
81
  */
184
- export interface CompanyTokenTransactionRetrieveResponse {
82
+ export interface CompanyTokenTransaction {
185
83
  /**
186
84
  * The ID of the transaction
187
85
  */
@@ -195,7 +93,7 @@ export interface CompanyTokenTransactionRetrieveResponse {
195
93
  /**
196
94
  * The company
197
95
  */
198
- company: CompanyTokenTransactionRetrieveResponse.Company;
96
+ company: CompanyTokenTransaction.Company;
199
97
 
200
98
  /**
201
99
  * When the transaction was created
@@ -220,20 +118,20 @@ export interface CompanyTokenTransactionRetrieveResponse {
220
118
  /**
221
119
  * The member
222
120
  */
223
- member: CompanyTokenTransactionRetrieveResponse.Member;
121
+ member: CompanyTokenTransaction.Member;
224
122
 
225
123
  /**
226
124
  * The type of transaction
227
125
  */
228
- transaction_type: 'add' | 'subtract' | 'transfer';
126
+ transaction_type: BotTokenTransactionTypes;
229
127
 
230
128
  /**
231
129
  * The user whose balance changed
232
130
  */
233
- user: CompanyTokenTransactionRetrieveResponse.User;
131
+ user: CompanyTokenTransaction.User;
234
132
  }
235
133
 
236
- export namespace CompanyTokenTransactionRetrieveResponse {
134
+ export namespace CompanyTokenTransaction {
237
135
  /**
238
136
  * The company
239
137
  */
@@ -332,7 +230,7 @@ export interface CompanyTokenTransactionListResponse {
332
230
  /**
333
231
  * The type of transaction
334
232
  */
335
- transaction_type: 'add' | 'subtract' | 'transfer';
233
+ transaction_type: BotTokenTransactionTypes;
336
234
 
337
235
  /**
338
236
  * The user whose balance changed
@@ -515,7 +413,7 @@ export interface CompanyTokenTransactionListParams extends CursorPageParams {
515
413
  /**
516
414
  * The type of token transaction
517
415
  */
518
- transaction_type?: 'add' | 'subtract' | 'transfer' | null;
416
+ transaction_type?: BotTokenTransactionTypes | null;
519
417
 
520
418
  /**
521
419
  * Filter by user ID
@@ -525,8 +423,8 @@ export interface CompanyTokenTransactionListParams extends CursorPageParams {
525
423
 
526
424
  export declare namespace CompanyTokenTransactions {
527
425
  export {
528
- type CompanyTokenTransactionCreateResponse as CompanyTokenTransactionCreateResponse,
529
- type CompanyTokenTransactionRetrieveResponse as CompanyTokenTransactionRetrieveResponse,
426
+ type BotTokenTransactionTypes as BotTokenTransactionTypes,
427
+ type CompanyTokenTransaction as CompanyTokenTransaction,
530
428
  type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
531
429
  type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
532
430
  type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
@@ -0,0 +1,212 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../core/resource';
4
+ import { APIPromise } from '../core/api-promise';
5
+ import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
6
+ import { RequestOptions } from '../internal/request-options';
7
+ import { path } from '../internal/utils/path';
8
+
9
+ export class DmChannels extends APIResource {
10
+ /**
11
+ * Creates a DM channel
12
+ *
13
+ * @example
14
+ * ```ts
15
+ * const dmChannel = await client.dmChannels.create({
16
+ * with_user_ids: ['string'],
17
+ * });
18
+ * ```
19
+ */
20
+ create(body: DmChannelCreateParams, options?: RequestOptions): APIPromise<DmChannel> {
21
+ return this._client.post('/dm_channels', { body, ...options });
22
+ }
23
+
24
+ /**
25
+ * Retrieves a DM channel
26
+ *
27
+ * Required permissions:
28
+ *
29
+ * - `dms:read`
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const dmChannel = await client.dmChannels.retrieve('id');
34
+ * ```
35
+ */
36
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmChannel> {
37
+ return this._client.get(path`/dm_channels/${id}`, options);
38
+ }
39
+
40
+ /**
41
+ * Updates a DM channel
42
+ *
43
+ * Required permissions:
44
+ *
45
+ * - `dms:channel:manage`
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * const dmChannel = await client.dmChannels.update('id');
50
+ * ```
51
+ */
52
+ update(
53
+ id: string,
54
+ body: DmChannelUpdateParams | null | undefined = {},
55
+ options?: RequestOptions,
56
+ ): APIPromise<DmChannel> {
57
+ return this._client.patch(path`/dm_channels/${id}`, { body, ...options });
58
+ }
59
+
60
+ /**
61
+ * Lists DM channels for the current user
62
+ *
63
+ * Required permissions:
64
+ *
65
+ * - `dms:read`
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * // Automatically fetches more pages as needed.
70
+ * for await (const dmChannelListResponse of client.dmChannels.list()) {
71
+ * // ...
72
+ * }
73
+ * ```
74
+ */
75
+ list(
76
+ query: DmChannelListParams | null | undefined = {},
77
+ options?: RequestOptions,
78
+ ): PagePromise<DmChannelListResponsesCursorPage, DmChannelListResponse> {
79
+ return this._client.getAPIList('/dm_channels', CursorPage<DmChannelListResponse>, { query, ...options });
80
+ }
81
+
82
+ /**
83
+ * Deletes a DM channel
84
+ *
85
+ * Required permissions:
86
+ *
87
+ * - `dms:channel:manage`
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const dmChannel = await client.dmChannels.delete('id');
92
+ * ```
93
+ */
94
+ delete(id: string, options?: RequestOptions): APIPromise<DmChannelDeleteResponse> {
95
+ return this._client.delete(path`/dm_channels/${id}`, options);
96
+ }
97
+ }
98
+
99
+ export type DmChannelListResponsesCursorPage = CursorPage<DmChannelListResponse>;
100
+
101
+ /**
102
+ * Represents a DM channel
103
+ */
104
+ export interface DmChannel {
105
+ /**
106
+ * The unique identifier for the entity
107
+ */
108
+ id: string;
109
+
110
+ /**
111
+ * The time the entity was created (in milliseconds since Unix epoch)
112
+ */
113
+ created_at: string;
114
+
115
+ /**
116
+ * When the last message was sent
117
+ */
118
+ last_message_at: string | null;
119
+
120
+ /**
121
+ * The custom name of the DM channel, if any
122
+ */
123
+ name: string | null;
124
+ }
125
+
126
+ /**
127
+ * Represents a DM channel
128
+ */
129
+ export interface DmChannelListResponse {
130
+ /**
131
+ * The unique identifier for the entity
132
+ */
133
+ id: string;
134
+
135
+ /**
136
+ * The time the entity was created (in milliseconds since Unix epoch)
137
+ */
138
+ created_at: string;
139
+
140
+ /**
141
+ * When the last message was sent
142
+ */
143
+ last_message_at: string | null;
144
+
145
+ /**
146
+ * The custom name of the DM channel, if any
147
+ */
148
+ name: string | null;
149
+ }
150
+
151
+ /**
152
+ * Represents `true` or `false` values.
153
+ */
154
+ export type DmChannelDeleteResponse = boolean;
155
+
156
+ export interface DmChannelCreateParams {
157
+ /**
158
+ * The user ids to create a DM with. Can be email, username or user_id (tag)
159
+ */
160
+ with_user_ids: Array<string>;
161
+
162
+ /**
163
+ * The ID of the company to scope this DM channel to.
164
+ */
165
+ company_id?: string | null;
166
+
167
+ /**
168
+ * The custom name for the DM channel
169
+ */
170
+ custom_name?: string | null;
171
+ }
172
+
173
+ export interface DmChannelUpdateParams {
174
+ /**
175
+ * The custom name for the DM channel
176
+ */
177
+ custom_name?: string | null;
178
+ }
179
+
180
+ export interface DmChannelListParams extends CursorPageParams {
181
+ /**
182
+ * Returns the elements in the list that come before the specified cursor.
183
+ */
184
+ before?: string | null;
185
+
186
+ /**
187
+ * Filter DM channels scoped to a specific company
188
+ */
189
+ company_id?: string | null;
190
+
191
+ /**
192
+ * Returns the first _n_ elements from the list.
193
+ */
194
+ first?: number | null;
195
+
196
+ /**
197
+ * Returns the last _n_ elements from the list.
198
+ */
199
+ last?: number | null;
200
+ }
201
+
202
+ export declare namespace DmChannels {
203
+ export {
204
+ type DmChannel as DmChannel,
205
+ type DmChannelListResponse as DmChannelListResponse,
206
+ type DmChannelDeleteResponse as DmChannelDeleteResponse,
207
+ type DmChannelListResponsesCursorPage as DmChannelListResponsesCursorPage,
208
+ type DmChannelCreateParams as DmChannelCreateParams,
209
+ type DmChannelUpdateParams as DmChannelUpdateParams,
210
+ type DmChannelListParams as DmChannelListParams,
211
+ };
212
+ }
@@ -22,7 +22,7 @@ export class DmMembers extends APIResource {
22
22
  * });
23
23
  * ```
24
24
  */
25
- create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMemberCreateResponse> {
25
+ create(body: DmMemberCreateParams, options?: RequestOptions): APIPromise<DmMember> {
26
26
  return this._client.post('/dm_members', { body, ...options });
27
27
  }
28
28
 
@@ -38,7 +38,7 @@ export class DmMembers extends APIResource {
38
38
  * const dmMember = await client.dmMembers.retrieve('id');
39
39
  * ```
40
40
  */
41
- retrieve(id: string, options?: RequestOptions): APIPromise<DmMemberRetrieveResponse> {
41
+ retrieve(id: string, options?: RequestOptions): APIPromise<DmMember> {
42
42
  return this._client.get(path`/dm_members/${id}`, options);
43
43
  }
44
44
 
@@ -58,7 +58,7 @@ export class DmMembers extends APIResource {
58
58
  id: string,
59
59
  body: DmMemberUpdateParams | null | undefined = {},
60
60
  options?: RequestOptions,
61
- ): APIPromise<DmMemberUpdateResponse> {
61
+ ): APIPromise<DmMember> {
62
62
  return this._client.patch(path`/dm_members/${id}`, { body, ...options });
63
63
  }
64
64
 
@@ -106,81 +106,19 @@ export class DmMembers extends APIResource {
106
106
  export type DmMemberListResponsesCursorPage = CursorPage<DmMemberListResponse>;
107
107
 
108
108
  /**
109
- * Represents a member of a DM channel
109
+ * The notification preferences for a DMs feed member
110
110
  */
111
- export interface DmMemberCreateResponse {
112
- /**
113
- * The unique identifier for the entity
114
- */
115
- id: string;
116
-
117
- /**
118
- * The ID of the DM channel
119
- */
120
- channel_id: string;
121
-
122
- /**
123
- * Timestamp when the member last viewed the channel (in milliseconds since Unix
124
- * epoch)
125
- */
126
- last_viewed_at: string | null;
127
-
128
- /**
129
- * The notification preference for this member (all, mentions, none)
130
- */
131
- notification_preference: 'all' | 'mentions' | 'none';
132
-
133
- /**
134
- * The status of the membership (requested, accepted, rejected)
135
- */
136
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
137
-
138
- /**
139
- * The ID of the user who is a member of the channel
140
- */
141
- user_id: string;
142
- }
111
+ export type DmFeedMemberNotificationPreferences = 'all' | 'mentions' | 'none';
143
112
 
144
113
  /**
145
- * Represents a member of a DM channel
114
+ * The statuses of a DMs feed member
146
115
  */
147
- export interface DmMemberRetrieveResponse {
148
- /**
149
- * The unique identifier for the entity
150
- */
151
- id: string;
152
-
153
- /**
154
- * The ID of the DM channel
155
- */
156
- channel_id: string;
157
-
158
- /**
159
- * Timestamp when the member last viewed the channel (in milliseconds since Unix
160
- * epoch)
161
- */
162
- last_viewed_at: string | null;
163
-
164
- /**
165
- * The notification preference for this member (all, mentions, none)
166
- */
167
- notification_preference: 'all' | 'mentions' | 'none';
168
-
169
- /**
170
- * The status of the membership (requested, accepted, rejected)
171
- */
172
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
173
-
174
- /**
175
- * The ID of the user who is a member of the channel
176
- */
177
- user_id: string;
178
- }
116
+ export type DmFeedMemberStatuses = 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
179
117
 
180
118
  /**
181
119
  * Represents a member of a DM channel
182
120
  */
183
- export interface DmMemberUpdateResponse {
121
+ export interface DmMember {
184
122
  /**
185
123
  * The unique identifier for the entity
186
124
  */
@@ -200,12 +138,12 @@ export interface DmMemberUpdateResponse {
200
138
  /**
201
139
  * The notification preference for this member (all, mentions, none)
202
140
  */
203
- notification_preference: 'all' | 'mentions' | 'none';
141
+ notification_preference: DmFeedMemberNotificationPreferences;
204
142
 
205
143
  /**
206
144
  * The status of the membership (requested, accepted, rejected)
207
145
  */
208
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
146
+ status: DmFeedMemberStatuses;
209
147
 
210
148
  /**
211
149
  * The ID of the user who is a member of the channel
@@ -236,7 +174,7 @@ export interface DmMemberListResponse {
236
174
  /**
237
175
  * The status of the membership (requested, accepted, rejected)
238
176
  */
239
- status: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived';
177
+ status: DmFeedMemberStatuses;
240
178
 
241
179
  /**
242
180
  * The ID of the user who is a member of the channel
@@ -265,12 +203,12 @@ export interface DmMemberUpdateParams {
265
203
  /**
266
204
  * The notification preferences for a DMs feed member
267
205
  */
268
- notification_preference?: 'all' | 'mentions' | 'none' | null;
206
+ notification_preference?: DmFeedMemberNotificationPreferences | null;
269
207
 
270
208
  /**
271
209
  * The statuses of a DMs feed member
272
210
  */
273
- status?: 'requested' | 'accepted' | 'hidden' | 'closed' | 'archived' | null;
211
+ status?: DmFeedMemberStatuses | null;
274
212
  }
275
213
 
276
214
  export interface DmMemberListParams extends CursorPageParams {
@@ -297,9 +235,9 @@ export interface DmMemberListParams extends CursorPageParams {
297
235
 
298
236
  export declare namespace DmMembers {
299
237
  export {
300
- type DmMemberCreateResponse as DmMemberCreateResponse,
301
- type DmMemberRetrieveResponse as DmMemberRetrieveResponse,
302
- type DmMemberUpdateResponse as DmMemberUpdateResponse,
238
+ type DmFeedMemberNotificationPreferences as DmFeedMemberNotificationPreferences,
239
+ type DmFeedMemberStatuses as DmFeedMemberStatuses,
240
+ type DmMember as DmMember,
303
241
  type DmMemberListResponse as DmMemberListResponse,
304
242
  type DmMemberDeleteResponse as DmMemberDeleteResponse,
305
243
  type DmMemberListResponsesCursorPage as DmMemberListResponsesCursorPage,
@@ -36,6 +36,11 @@ export class Files extends APIResource {
36
36
  }
37
37
  }
38
38
 
39
+ /**
40
+ * The upload status of a file
41
+ */
42
+ export type UploadStatus = 'pending' | 'processing' | 'ready' | 'failed';
43
+
39
44
  /**
40
45
  * A file that has been uploaded or is pending upload
41
46
  */
@@ -68,7 +73,7 @@ export interface FileCreateResponse {
68
73
  /**
69
74
  * The upload status of the file
70
75
  */
71
- upload_status: 'pending' | 'processing' | 'ready' | 'failed';
76
+ upload_status: UploadStatus;
72
77
 
73
78
  /**
74
79
  * The presigned URL to upload the file to (only on create)
@@ -108,7 +113,7 @@ export interface FileRetrieveResponse {
108
113
  /**
109
114
  * The upload status of the file
110
115
  */
111
- upload_status: 'pending' | 'processing' | 'ready' | 'failed';
116
+ upload_status: UploadStatus;
112
117
 
113
118
  /**
114
119
  * The URL to access the file
@@ -132,6 +137,7 @@ export interface FileUploadOptions extends RequestOptions {
132
137
 
133
138
  export declare namespace Files {
134
139
  export {
140
+ type UploadStatus as UploadStatus,
135
141
  type FileCreateResponse as FileCreateResponse,
136
142
  type FileRetrieveResponse as FileRetrieveResponse,
137
143
  type FileCreateParams as FileCreateParams,