@whop/sdk 0.0.26 → 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 (219) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/client.d.mts +6 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -2
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -2
  9. package/client.mjs.map +1 -1
  10. package/package.json +3 -3
  11. package/resources/access-tokens.d.mts +32 -51
  12. package/resources/access-tokens.d.mts.map +1 -1
  13. package/resources/access-tokens.d.ts +32 -51
  14. package/resources/access-tokens.d.ts.map +1 -1
  15. package/resources/access-tokens.js +6 -8
  16. package/resources/access-tokens.js.map +1 -1
  17. package/resources/access-tokens.mjs +6 -8
  18. package/resources/access-tokens.mjs.map +1 -1
  19. package/resources/ai-chats.d.mts +37 -9
  20. package/resources/ai-chats.d.mts.map +1 -1
  21. package/resources/ai-chats.d.ts +37 -9
  22. package/resources/ai-chats.d.ts.map +1 -1
  23. package/resources/ai-chats.js +1 -1
  24. package/resources/ai-chats.js.map +1 -1
  25. package/resources/ai-chats.mjs +1 -1
  26. package/resources/ai-chats.mjs.map +1 -1
  27. package/resources/app-builds.d.mts +2 -2
  28. package/resources/app-builds.d.ts +2 -2
  29. package/resources/apps.d.mts +5 -4
  30. package/resources/apps.d.mts.map +1 -1
  31. package/resources/apps.d.ts +5 -4
  32. package/resources/apps.d.ts.map +1 -1
  33. package/resources/authorized-users.d.mts +6 -6
  34. package/resources/authorized-users.d.ts +6 -6
  35. package/resources/chat-channels.d.mts +1 -1
  36. package/resources/chat-channels.d.ts +1 -1
  37. package/resources/checkout-configurations.d.mts +24 -16
  38. package/resources/checkout-configurations.d.mts.map +1 -1
  39. package/resources/checkout-configurations.d.ts +24 -16
  40. package/resources/checkout-configurations.d.ts.map +1 -1
  41. package/resources/companies.d.mts +38 -25
  42. package/resources/companies.d.mts.map +1 -1
  43. package/resources/companies.d.ts +38 -25
  44. package/resources/companies.d.ts.map +1 -1
  45. package/resources/companies.js +7 -4
  46. package/resources/companies.js.map +1 -1
  47. package/resources/companies.mjs +7 -4
  48. package/resources/companies.mjs.map +1 -1
  49. package/resources/company-token-transactions.d.mts +10 -10
  50. package/resources/company-token-transactions.d.ts +10 -10
  51. package/resources/course-chapters.d.mts +3 -3
  52. package/resources/course-chapters.d.ts +3 -3
  53. package/resources/course-lessons.d.mts +15 -15
  54. package/resources/course-lessons.d.ts +15 -15
  55. package/resources/course-students.d.mts +6 -6
  56. package/resources/course-students.d.ts +6 -6
  57. package/resources/courses.d.mts +8 -8
  58. package/resources/courses.d.ts +8 -8
  59. package/resources/disputes.d.mts +20 -18
  60. package/resources/disputes.d.mts.map +1 -1
  61. package/resources/disputes.d.ts +20 -18
  62. package/resources/disputes.d.ts.map +1 -1
  63. package/resources/entries.d.mts +6 -6
  64. package/resources/entries.d.ts +6 -6
  65. package/resources/experiences.d.mts +6 -5
  66. package/resources/experiences.d.mts.map +1 -1
  67. package/resources/experiences.d.ts +6 -5
  68. package/resources/experiences.d.ts.map +1 -1
  69. package/resources/fee-markups.d.mts +6 -6
  70. package/resources/fee-markups.d.ts +6 -6
  71. package/resources/files.d.mts +2 -2
  72. package/resources/files.d.ts +2 -2
  73. package/resources/forum-posts.d.mts +8 -4
  74. package/resources/forum-posts.d.mts.map +1 -1
  75. package/resources/forum-posts.d.ts +8 -4
  76. package/resources/forum-posts.d.ts.map +1 -1
  77. package/resources/forums.d.mts +1 -1
  78. package/resources/forums.d.ts +1 -1
  79. package/resources/index.d.mts +1 -1
  80. package/resources/index.d.mts.map +1 -1
  81. package/resources/index.d.ts +1 -1
  82. package/resources/index.d.ts.map +1 -1
  83. package/resources/index.js.map +1 -1
  84. package/resources/index.mjs.map +1 -1
  85. package/resources/invoices.d.mts +28 -20
  86. package/resources/invoices.d.mts.map +1 -1
  87. package/resources/invoices.d.ts +28 -20
  88. package/resources/invoices.d.ts.map +1 -1
  89. package/resources/leads.d.mts +12 -12
  90. package/resources/leads.d.ts +12 -12
  91. package/resources/ledger-accounts.d.mts +9 -7
  92. package/resources/ledger-accounts.d.mts.map +1 -1
  93. package/resources/ledger-accounts.d.ts +9 -7
  94. package/resources/ledger-accounts.d.ts.map +1 -1
  95. package/resources/members.d.mts +9 -9
  96. package/resources/members.d.ts +9 -9
  97. package/resources/memberships.d.mts +17 -12
  98. package/resources/memberships.d.mts.map +1 -1
  99. package/resources/memberships.d.ts +17 -12
  100. package/resources/memberships.d.ts.map +1 -1
  101. package/resources/messages.d.mts +7 -3
  102. package/resources/messages.d.mts.map +1 -1
  103. package/resources/messages.d.ts +7 -3
  104. package/resources/messages.d.ts.map +1 -1
  105. package/resources/payments.d.mts +27 -20
  106. package/resources/payments.d.mts.map +1 -1
  107. package/resources/payments.d.ts +27 -20
  108. package/resources/payments.d.ts.map +1 -1
  109. package/resources/payout-methods.d.mts +6 -6
  110. package/resources/payout-methods.d.ts +6 -6
  111. package/resources/plans.d.mts +34 -24
  112. package/resources/plans.d.mts.map +1 -1
  113. package/resources/plans.d.ts +34 -24
  114. package/resources/plans.d.ts.map +1 -1
  115. package/resources/products.d.mts +4 -2
  116. package/resources/products.d.mts.map +1 -1
  117. package/resources/products.d.ts +4 -2
  118. package/resources/products.d.ts.map +1 -1
  119. package/resources/promo-codes.d.mts +22 -12
  120. package/resources/promo-codes.d.mts.map +1 -1
  121. package/resources/promo-codes.d.ts +22 -12
  122. package/resources/promo-codes.d.ts.map +1 -1
  123. package/resources/reactions.d.mts +1 -1
  124. package/resources/reactions.d.ts +1 -1
  125. package/resources/refunds.d.mts +19 -15
  126. package/resources/refunds.d.mts.map +1 -1
  127. package/resources/refunds.d.ts +19 -15
  128. package/resources/refunds.d.ts.map +1 -1
  129. package/resources/reviews.d.mts +10 -10
  130. package/resources/reviews.d.ts +10 -10
  131. package/resources/setup-intents.d.mts +18 -20
  132. package/resources/setup-intents.d.mts.map +1 -1
  133. package/resources/setup-intents.d.ts +18 -20
  134. package/resources/setup-intents.d.ts.map +1 -1
  135. package/resources/shared.d.mts +175 -137
  136. package/resources/shared.d.mts.map +1 -1
  137. package/resources/shared.d.ts +175 -137
  138. package/resources/shared.d.ts.map +1 -1
  139. package/resources/shipments.d.mts +4 -4
  140. package/resources/shipments.d.ts +4 -4
  141. package/resources/support-channels.d.mts +1 -1
  142. package/resources/support-channels.d.ts +1 -1
  143. package/resources/topups.d.mts +6 -4
  144. package/resources/topups.d.mts.map +1 -1
  145. package/resources/topups.d.ts +6 -4
  146. package/resources/topups.d.ts.map +1 -1
  147. package/resources/transfers.d.mts +8 -5
  148. package/resources/transfers.d.mts.map +1 -1
  149. package/resources/transfers.d.ts +8 -5
  150. package/resources/transfers.d.ts.map +1 -1
  151. package/resources/users.d.mts +46 -8
  152. package/resources/users.d.mts.map +1 -1
  153. package/resources/users.d.ts +46 -8
  154. package/resources/users.d.ts.map +1 -1
  155. package/resources/users.js +10 -0
  156. package/resources/users.js.map +1 -1
  157. package/resources/users.mjs +10 -0
  158. package/resources/users.mjs.map +1 -1
  159. package/resources/verifications.d.mts +1 -1
  160. package/resources/verifications.d.ts +1 -1
  161. package/resources/webhooks.d.mts +71 -57
  162. package/resources/webhooks.d.mts.map +1 -1
  163. package/resources/webhooks.d.ts +71 -57
  164. package/resources/webhooks.d.ts.map +1 -1
  165. package/resources/withdrawals.d.mts +15 -11
  166. package/resources/withdrawals.d.mts.map +1 -1
  167. package/resources/withdrawals.d.ts +15 -11
  168. package/resources/withdrawals.d.ts.map +1 -1
  169. package/src/client.ts +20 -8
  170. package/src/resources/access-tokens.ts +35 -56
  171. package/src/resources/ai-chats.ts +42 -9
  172. package/src/resources/app-builds.ts +2 -2
  173. package/src/resources/apps.ts +5 -4
  174. package/src/resources/authorized-users.ts +6 -6
  175. package/src/resources/chat-channels.ts +1 -1
  176. package/src/resources/checkout-configurations.ts +24 -16
  177. package/src/resources/companies.ts +41 -26
  178. package/src/resources/company-token-transactions.ts +10 -10
  179. package/src/resources/course-chapters.ts +3 -3
  180. package/src/resources/course-lessons.ts +15 -15
  181. package/src/resources/course-students.ts +6 -6
  182. package/src/resources/courses.ts +8 -8
  183. package/src/resources/disputes.ts +20 -18
  184. package/src/resources/entries.ts +6 -6
  185. package/src/resources/experiences.ts +6 -5
  186. package/src/resources/fee-markups.ts +6 -6
  187. package/src/resources/files.ts +2 -2
  188. package/src/resources/forum-posts.ts +8 -4
  189. package/src/resources/forums.ts +1 -1
  190. package/src/resources/index.ts +2 -1
  191. package/src/resources/invoices.ts +28 -20
  192. package/src/resources/leads.ts +12 -12
  193. package/src/resources/ledger-accounts.ts +9 -7
  194. package/src/resources/members.ts +9 -9
  195. package/src/resources/memberships.ts +18 -12
  196. package/src/resources/messages.ts +7 -3
  197. package/src/resources/payments.ts +28 -18
  198. package/src/resources/payout-methods.ts +6 -6
  199. package/src/resources/plans.ts +34 -24
  200. package/src/resources/products.ts +4 -2
  201. package/src/resources/promo-codes.ts +22 -12
  202. package/src/resources/reactions.ts +1 -1
  203. package/src/resources/refunds.ts +20 -15
  204. package/src/resources/reviews.ts +10 -10
  205. package/src/resources/setup-intents.ts +18 -20
  206. package/src/resources/shared.ts +176 -137
  207. package/src/resources/shipments.ts +4 -4
  208. package/src/resources/support-channels.ts +1 -1
  209. package/src/resources/topups.ts +6 -4
  210. package/src/resources/transfers.ts +8 -5
  211. package/src/resources/users.ts +58 -8
  212. package/src/resources/verifications.ts +1 -1
  213. package/src/resources/webhooks.ts +71 -57
  214. package/src/resources/withdrawals.ts +15 -11
  215. package/src/version.ts +1 -1
  216. package/version.d.mts +1 -1
  217. package/version.d.ts +1 -1
  218. package/version.js +1 -1
  219. package/version.mjs +1 -1
@@ -59,19 +59,21 @@ export declare class Withdrawals extends APIResource {
59
59
  }
60
60
  export type WithdrawalListResponsesCursorPage = CursorPage<WithdrawalListResponse>;
61
61
  /**
62
- * A withdrawal request.
62
+ * A withdrawal represents a request to transfer funds from a company's ledger
63
+ * account to an external payout method.
63
64
  */
64
65
  export interface Withdrawal {
65
66
  /**
66
- * Internal ID of the withdrawal request.
67
+ * The unique identifier for the withdrawal.
67
68
  */
68
69
  id: string;
69
70
  /**
70
- * How much money was attempted to be withdrawn, in a float type.
71
+ * The withdrawal amount. Provided as a number in the specified currency. Eg:
72
+ * 100.00 for $100.00 USD.
71
73
  */
72
74
  amount: number;
73
75
  /**
74
- * When the withdrawal request was created.
76
+ * The datetime the withdrawal was created.
75
77
  */
76
78
  created_at: string;
77
79
  /**
@@ -133,7 +135,7 @@ export declare namespace Withdrawal {
133
135
  */
134
136
  interface LedgerAccount {
135
137
  /**
136
- * The ID of the LedgerAccount.
138
+ * The unique identifier for the ledger account.
137
139
  */
138
140
  id: string;
139
141
  /**
@@ -146,11 +148,11 @@ export declare namespace Withdrawal {
146
148
  */
147
149
  interface PayoutToken {
148
150
  /**
149
- * The ID of the payout token
151
+ * The unique identifier for the payout token.
150
152
  */
151
153
  id: string;
152
154
  /**
153
- * The date and time the payout token was created
155
+ * The datetime the payout token was created.
154
156
  */
155
157
  created_at: string;
156
158
  /**
@@ -182,19 +184,21 @@ export type WithdrawalSpeeds = 'standard' | 'instant';
182
184
  */
183
185
  export type WithdrawalStatus = 'requested' | 'awaiting_payment' | 'in_transit' | 'completed' | 'failed' | 'canceled' | 'denied';
184
186
  /**
185
- * A withdrawal request.
187
+ * A withdrawal represents a request to transfer funds from a company's ledger
188
+ * account to an external payout method.
186
189
  */
187
190
  export interface WithdrawalListResponse {
188
191
  /**
189
- * Internal ID of the withdrawal request.
192
+ * The unique identifier for the withdrawal.
190
193
  */
191
194
  id: string;
192
195
  /**
193
- * How much money was attempted to be withdrawn, in a float type.
196
+ * The withdrawal amount. Provided as a number in the specified currency. Eg:
197
+ * 100.00 for $100.00 USD.
194
198
  */
195
199
  amount: number;
196
200
  /**
197
- * When the withdrawal request was created.
201
+ * The datetime the withdrawal was created.
198
202
  */
199
203
  created_at: string;
200
204
  /**
@@ -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C,SAAS,GAAG,IAAI,CAAC;IAEpC;;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,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
package/src/client.ts CHANGED
@@ -378,9 +378,10 @@ import {
378
378
  Transfers,
379
379
  } from './resources/transfers';
380
380
  import {
381
+ User,
381
382
  UserCheckAccessParams,
382
383
  UserCheckAccessResponse,
383
- UserRetrieveResponse,
384
+ UserUpdateProfileParams,
384
385
  Users,
385
386
  } from './resources/users';
386
387
  import {
@@ -457,7 +458,7 @@ import { makeUserTokenVerifierFromSdk } from './lib/verify-user-token';
457
458
 
458
459
  export interface ClientOptions {
459
460
  /**
460
- * The app API key from an app from the /dashboard/developer page
461
+ * A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like `Bearer ***************************`
461
462
  */
462
463
  apiKey?: string | undefined;
463
464
 
@@ -547,7 +548,6 @@ export class Whop {
547
548
  apiKey: string;
548
549
  webhookKey: string | null;
549
550
  appID: string | null;
550
-
551
551
  baseURL: string;
552
552
  maxRetries: number;
553
553
  timeout: number;
@@ -916,9 +916,14 @@ export class Whop {
916
916
  getAPIList<Item, PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>>(
917
917
  path: string,
918
918
  Page: new (...args: any[]) => PageClass,
919
- opts?: RequestOptions,
919
+ opts?: PromiseOrValue<RequestOptions>,
920
920
  ): Pagination.PagePromise<PageClass, Item> {
921
- return this.requestAPIList(Page, { method: 'get', path, ...opts });
921
+ return this.requestAPIList(
922
+ Page,
923
+ opts && 'then' in opts ?
924
+ opts.then((opts) => ({ method: 'get', path, ...opts }))
925
+ : { method: 'get', path, ...opts },
926
+ );
922
927
  }
923
928
 
924
929
  requestAPIList<
@@ -926,7 +931,7 @@ export class Whop {
926
931
  PageClass extends Pagination.AbstractPage<Item> = Pagination.AbstractPage<Item>,
927
932
  >(
928
933
  Page: new (...args: ConstructorParameters<typeof Pagination.AbstractPage>) => PageClass,
929
- options: FinalRequestOptions,
934
+ options: PromiseOrValue<FinalRequestOptions>,
930
935
  ): Pagination.PagePromise<PageClass, Item> {
931
936
  const request = this.makeRequest(options, null, undefined);
932
937
  return new Pagination.PagePromise<PageClass, Item>(this as any as Whop, request, Page);
@@ -939,7 +944,7 @@ export class Whop {
939
944
  controller: AbortController,
940
945
  ): Promise<Response> {
941
946
  const { signal, method, ...options } = init || {};
942
- const abort = controller.abort.bind(controller);
947
+ const abort = this._makeAbort(controller);
943
948
  if (signal) signal.addEventListener('abort', abort, { once: true });
944
949
 
945
950
  const timeout = setTimeout(abort, ms);
@@ -1110,6 +1115,12 @@ export class Whop {
1110
1115
  return headers.values;
1111
1116
  }
1112
1117
 
1118
+ private _makeAbort(controller: AbortController) {
1119
+ // note: we can't just inline this method inside `fetchWithTimeout()` because then the closure
1120
+ // would capture all request options, and cause a memory leak.
1121
+ return () => controller.abort();
1122
+ }
1123
+
1113
1124
  private buildBody({ options: { body, headers: rawHeaders } }: { options: FinalRequestOptions }): {
1114
1125
  bodyHeaders: HeadersLike;
1115
1126
  body: BodyInit | undefined;
@@ -1461,9 +1472,10 @@ export declare namespace Whop {
1461
1472
 
1462
1473
  export {
1463
1474
  Users as Users,
1464
- type UserRetrieveResponse as UserRetrieveResponse,
1475
+ type User as User,
1465
1476
  type UserCheckAccessResponse as UserCheckAccessResponse,
1466
1477
  type UserCheckAccessParams as UserCheckAccessParams,
1478
+ type UserUpdateProfileParams as UserUpdateProfileParams,
1467
1479
  };
1468
1480
 
1469
1481
  export {
@@ -6,19 +6,20 @@ import { RequestOptions } from '../internal/request-options';
6
6
 
7
7
  export class AccessTokens extends APIResource {
8
8
  /**
9
- * Create a short-lived access token to authenticate API requests on behalf of a
10
- * Company or User. This token should be used with Whop's web and mobile embedded
11
- * components. You must provide either a company_id or a user_id argument, but not
12
- * both.
9
+ * Create a short-lived access token to authenticate API requests. When using API
10
+ * key authentication, provide company_id or user_id. When using OAuth
11
+ * authentication, the user is derived from the token. This token should be used
12
+ * with Whop's web and mobile embedded components.
13
13
  *
14
14
  * @example
15
15
  * ```ts
16
- * const accessToken = await client.accessTokens.create({
17
- * company_id: 'biz_xxxxxxxxxxxxxx',
18
- * });
16
+ * const accessToken = await client.accessTokens.create();
19
17
  * ```
20
18
  */
21
- create(body: AccessTokenCreateParams, options?: RequestOptions): APIPromise<AccessTokenCreateResponse> {
19
+ create(
20
+ body: AccessTokenCreateParams | null | undefined = {},
21
+ options?: RequestOptions,
22
+ ): APIPromise<AccessTokenCreateResponse> {
22
23
  return this._client.post('/access_tokens', { body, ...options });
23
24
  }
24
25
  }
@@ -38,57 +39,35 @@ export interface AccessTokenCreateResponse {
38
39
  expires_at: string;
39
40
  }
40
41
 
41
- export type AccessTokenCreateParams =
42
- | AccessTokenCreateParams.CreateAccessTokenInputWithCompanyID
43
- | AccessTokenCreateParams.CreateAccessTokenInputWithUserID;
44
-
45
- export declare namespace AccessTokenCreateParams {
46
- export interface CreateAccessTokenInputWithCompanyID {
47
- /**
48
- * The ID of the Company to generate the token for. The API key must have
49
- * permission to access this Company, such as the being the company the API key
50
- * belongs to or a sub-merchant of it
51
- */
52
- company_id: string;
53
-
54
- /**
55
- * The expiration timestamp for the access token. If not provided, a default
56
- * expiration time of 1 hour will be used. The expiration can be set to a maximum
57
- * of 3 hours from the current time.
58
- */
59
- expires_at?: string | null;
60
-
61
- /**
62
- * Array of desired scoped actions for the access token. If sent as an empty array
63
- * or not provided, all permissions from the API key making the request will be
64
- * available on the token. If sending an explicit list, they must be a subset of
65
- * the API keys's existing permissions. Otherwise, an error will be raised.
66
- */
67
- scoped_actions?: Array<string> | null;
68
- }
42
+ export interface AccessTokenCreateParams {
43
+ /**
44
+ * The ID of the Company to generate the token for. The API key must have
45
+ * permission to access this Company, such as the being the company the API key
46
+ * belongs to or a sub-merchant of it
47
+ */
48
+ company_id?: string | null;
69
49
 
70
- export interface CreateAccessTokenInputWithUserID {
71
- /**
72
- * The ID of the User to generate the token for. The API key must have permission
73
- * to access this User.
74
- */
75
- user_id: string;
50
+ /**
51
+ * The expiration timestamp for the access token. If not provided, a default
52
+ * expiration time of 1 hour will be used. The expiration can be set to a maximum
53
+ * of 3 hours from the current time.
54
+ */
55
+ expires_at?: string | null;
76
56
 
77
- /**
78
- * The expiration timestamp for the access token. If not provided, a default
79
- * expiration time of 1 hour will be used. The expiration can be set to a maximum
80
- * of 3 hours from the current time.
81
- */
82
- expires_at?: string | null;
57
+ /**
58
+ * Array of desired scoped actions for the access token. If sent as an empty array
59
+ * or not provided, all permissions from the authenticating credential (API key or
60
+ * OAuth token) will be available on the token. If sending an explicit list, they
61
+ * must be a subset of the credential's existing permissions. Otherwise, an error
62
+ * will be raised.
63
+ */
64
+ scoped_actions?: Array<string> | null;
83
65
 
84
- /**
85
- * Array of desired scoped actions for the access token. If sent as an empty array
86
- * or not provided, all permissions from the API key making the request will be
87
- * available on the token. If sending an explicit list, they must be a subset of
88
- * the API keys's existing permissions. Otherwise, an error will be raised.
89
- */
90
- scoped_actions?: Array<string> | null;
91
- }
66
+ /**
67
+ * The ID of the User to generate the token for. The API key must have permission
68
+ * to access this User.
69
+ */
70
+ user_id?: string | null;
92
71
  }
93
72
 
94
73
  export declare namespace AccessTokens {
@@ -14,7 +14,7 @@ export class AIChats extends APIResource {
14
14
  *
15
15
  * - `ai_chat:create`
16
16
  */
17
- create(body: AIChatCreateParams | null | undefined = {}, options?: RequestOptions): APIPromise<AIChat> {
17
+ create(body: AIChatCreateParams, options?: RequestOptions): APIPromise<AIChat> {
18
18
  return this._client.post('/ai_chats', { body, ...options });
19
19
  }
20
20
 
@@ -69,7 +69,7 @@ export type AIChatListResponsesCursorPage = CursorPage<AIChatListResponse>;
69
69
  */
70
70
  export interface AIChat {
71
71
  /**
72
- * The unique identifier for the AI chat
72
+ * The unique identifier for the ai chat.
73
73
  */
74
74
  id: string;
75
75
 
@@ -79,7 +79,7 @@ export interface AIChat {
79
79
  blended_token_usage: string;
80
80
 
81
81
  /**
82
- * When the AI chat was created
82
+ * The datetime the ai chat was created.
83
83
  */
84
84
  created_at: string;
85
85
 
@@ -99,7 +99,7 @@ export interface AIChat {
99
99
  title: string | null;
100
100
 
101
101
  /**
102
- * When the AI chat was last updated
102
+ * The datetime the ai chat was last updated.
103
103
  */
104
104
  updated_at: string;
105
105
 
@@ -115,7 +115,7 @@ export namespace AIChat {
115
115
  */
116
116
  export interface User {
117
117
  /**
118
- * The internal ID of the user.
118
+ * The unique identifier for the user.
119
119
  */
120
120
  id: string;
121
121
  }
@@ -126,7 +126,7 @@ export namespace AIChat {
126
126
  */
127
127
  export interface AIChatListResponse {
128
128
  /**
129
- * The unique identifier for the AI chat
129
+ * The unique identifier for the ai chat.
130
130
  */
131
131
  id: string;
132
132
 
@@ -136,7 +136,7 @@ export interface AIChatListResponse {
136
136
  blended_token_usage: string;
137
137
 
138
138
  /**
139
- * When the AI chat was created
139
+ * The datetime the ai chat was created.
140
140
  */
141
141
  created_at: string;
142
142
 
@@ -156,7 +156,7 @@ export interface AIChatListResponse {
156
156
  title: string | null;
157
157
 
158
158
  /**
159
- * When the AI chat was last updated
159
+ * The datetime the ai chat was last updated.
160
160
  */
161
161
  updated_at: string;
162
162
 
@@ -172,7 +172,7 @@ export namespace AIChatListResponse {
172
172
  */
173
173
  export interface User {
174
174
  /**
175
- * The internal ID of the user.
175
+ * The unique identifier for the user.
176
176
  */
177
177
  id: string;
178
178
  }
@@ -184,13 +184,46 @@ export namespace AIChatListResponse {
184
184
  export type AIChatDeleteResponse = boolean;
185
185
 
186
186
  export interface AIChatCreateParams {
187
+ /**
188
+ * The text content of the first message sent in the chat
189
+ */
190
+ message_text: string;
191
+
192
+ /**
193
+ * The ID of the company to set as the current company in context for the AI chat
194
+ */
195
+ current_company_id?: string | null;
196
+
197
+ /**
198
+ * The IDs of existing uploaded attachments to include in the first message to the
199
+ * agent
200
+ */
201
+ message_attachments?: Array<AIChatCreateParams.MessageAttachment> | null;
202
+
187
203
  /**
188
204
  * The title of the AI chat
189
205
  */
190
206
  title?: string | null;
191
207
  }
192
208
 
209
+ export namespace AIChatCreateParams {
210
+ /**
211
+ * Input for an attachment
212
+ */
213
+ export interface MessageAttachment {
214
+ /**
215
+ * The ID of an existing file object.
216
+ */
217
+ id: string;
218
+ }
219
+ }
220
+
193
221
  export interface AIChatUpdateParams {
222
+ /**
223
+ * The ID of the company to set as the current company in context for the AI chat
224
+ */
225
+ current_company_id?: string | null;
226
+
194
227
  /**
195
228
  * The new title for the AI chat
196
229
  */
@@ -96,7 +96,7 @@ export type AppBuildListResponsesCursorPage = CursorPage<AppBuildListResponse>;
96
96
  */
97
97
  export interface AppBuildListResponse {
98
98
  /**
99
- * The ID of the app build. It will look like apbu_xxxxx.
99
+ * The unique identifier for the app build.
100
100
  */
101
101
  id: string;
102
102
 
@@ -107,7 +107,7 @@ export interface AppBuildListResponse {
107
107
  checksum: string;
108
108
 
109
109
  /**
110
- * When this app build was created.
110
+ * The datetime the app build was created.
111
111
  */
112
112
  created_at: string;
113
113
 
@@ -94,11 +94,12 @@ export type AppListResponsesCursorPage = CursorPage<AppListResponse>;
94
94
  export type AppType = 'b2b_app' | 'b2c_app' | 'company_app' | 'component';
95
95
 
96
96
  /**
97
- * An object representing an app
97
+ * An app is an integration built on Whop. Apps can serve consumers as experiences
98
+ * within products, or serve companies as business tools.
98
99
  */
99
100
  export interface AppListResponse {
100
101
  /**
101
- * The ID of the app
102
+ * The unique identifier for the app.
102
103
  */
103
104
  id: string;
104
105
 
@@ -185,7 +186,7 @@ export namespace AppListResponse {
185
186
  */
186
187
  export interface Company {
187
188
  /**
188
- * The ID (tag) of the company.
189
+ * The unique identifier for the company.
189
190
  */
190
191
  id: string;
191
192
 
@@ -200,7 +201,7 @@ export namespace AppListResponse {
200
201
  */
201
202
  export interface Creator {
202
203
  /**
203
- * The internal ID of the user.
204
+ * The unique identifier for the user.
204
205
  */
205
206
  id: string;
206
207
 
@@ -46,7 +46,7 @@ export type AuthorizedUserListResponsesCursorPage = CursorPage<AuthorizedUserLis
46
46
  */
47
47
  export interface AuthorizedUserRetrieveResponse {
48
48
  /**
49
- * A unique ID representing the authorized user object.
49
+ * The unique identifier for the authorized user.
50
50
  */
51
51
  id: string;
52
52
 
@@ -72,7 +72,7 @@ export namespace AuthorizedUserRetrieveResponse {
72
72
  */
73
73
  export interface Company {
74
74
  /**
75
- * The ID (tag) of the company.
75
+ * The unique identifier for the company.
76
76
  */
77
77
  id: string;
78
78
 
@@ -87,7 +87,7 @@ export namespace AuthorizedUserRetrieveResponse {
87
87
  */
88
88
  export interface User {
89
89
  /**
90
- * The internal ID of the user.
90
+ * The unique identifier for the user.
91
91
  */
92
92
  id: string;
93
93
 
@@ -113,7 +113,7 @@ export namespace AuthorizedUserRetrieveResponse {
113
113
  */
114
114
  export interface AuthorizedUserListResponse {
115
115
  /**
116
- * A unique ID representing the authorized user object.
116
+ * The unique identifier for the authorized user.
117
117
  */
118
118
  id: string;
119
119
 
@@ -139,7 +139,7 @@ export namespace AuthorizedUserListResponse {
139
139
  */
140
140
  export interface Company {
141
141
  /**
142
- * The ID (tag) of the company.
142
+ * The unique identifier for the company.
143
143
  */
144
144
  id: string;
145
145
 
@@ -154,7 +154,7 @@ export namespace AuthorizedUserListResponse {
154
154
  */
155
155
  export interface User {
156
156
  /**
157
- * The internal ID of the user.
157
+ * The unique identifier for the user.
158
158
  */
159
159
  id: string;
160
160
 
@@ -127,7 +127,7 @@ export namespace ChatChannelListResponse {
127
127
  */
128
128
  export interface Experience {
129
129
  /**
130
- * The unique ID representing this experience
130
+ * The unique identifier for the experience.
131
131
  */
132
132
  id: string;
133
133
 
@@ -73,14 +73,13 @@ export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutCo
73
73
  export type CheckoutModes = 'payment' | 'setup';
74
74
 
75
75
  /**
76
- * A checkout configuration object.
77
- * Can be used to create a reusable custom configuration for a checkout, including attaching plans, affiliates and custom metadata to the checkout.
78
- * This configuration can be re-used by multiple users.
79
- * All successful payments and memberships resulting from a checkout will contain the passed metadata.
76
+ * A checkout session is a reusable configuration for a checkout, including the
77
+ * plan, affiliate, and custom metadata. Payments and memberships created from a
78
+ * checkout session inherit its metadata.
80
79
  */
81
80
  export interface CheckoutConfigurationListResponse {
82
81
  /**
83
- * The ID of the checkout configuration
82
+ * The unique identifier for the checkout session.
84
83
  */
85
84
  id: string;
86
85
 
@@ -167,12 +166,12 @@ export namespace CheckoutConfigurationListResponse {
167
166
  */
168
167
  export interface Plan {
169
168
  /**
170
- * The internal ID of the plan.
169
+ * The unique identifier for the plan.
171
170
  */
172
171
  id: string;
173
172
 
174
173
  /**
175
- * The interval at which the plan charges (renewal plans).
174
+ * The interval in days at which the plan charges (renewal plans).
176
175
  */
177
176
  billing_period: number | null;
178
177
 
@@ -182,12 +181,15 @@ export namespace CheckoutConfigurationListResponse {
182
181
  currency: Shared.Currency;
183
182
 
184
183
  /**
185
- * The interval at which the plan charges (expiration plans).
184
+ * The number of days until the membership expires (for expiration-based plans).
185
+ * For example, 365 for a one-year access pass.
186
186
  */
187
187
  expiration_days: number | null;
188
188
 
189
189
  /**
190
- * The price a person has to pay for a plan on the initial purchase.
190
+ * The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
191
+ * For one-time plans, this is the full price. For renewal plans, this is charged
192
+ * on top of the first renewal_price.
191
193
  */
192
194
  initial_price: number;
193
195
 
@@ -202,7 +204,8 @@ export namespace CheckoutConfigurationListResponse {
202
204
  release_method: Shared.ReleaseMethod;
203
205
 
204
206
  /**
205
- * The price a person has to pay for a plan on the renewal purchase.
207
+ * The recurring price charged every billing_period in the plan's base_currency
208
+ * (e.g., 9.99 for $9.99/period). Zero for one-time plans.
206
209
  */
207
210
  renewal_price: number;
208
211
 
@@ -282,13 +285,15 @@ export declare namespace CheckoutConfigurationCreateParams {
282
285
 
283
286
  /**
284
287
  * The application fee amount collected by the platform from this connected
285
- * account. Must be less than the total payment amount. Only valid for connected
286
- * accounts with a parent company.
288
+ * account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
289
+ * than the total payment amount. Only valid for connected accounts with a parent
290
+ * company.
287
291
  */
288
292
  application_fee_amount?: number | null;
289
293
 
290
294
  /**
291
- * The interval at which the plan charges (renewal plans).
295
+ * The interval in days at which the plan charges (renewal plans). For example, 30
296
+ * for monthly billing.
292
297
  */
293
298
  billing_period?: number | null;
294
299
 
@@ -303,7 +308,8 @@ export declare namespace CheckoutConfigurationCreateParams {
303
308
  description?: string | null;
304
309
 
305
310
  /**
306
- * The interval at which the plan charges (expiration plans).
311
+ * The number of days until the membership expires (for expiration-based plans).
312
+ * For example, 365 for a one-year access pass.
307
313
  */
308
314
  expiration_days?: number | null;
309
315
 
@@ -319,7 +325,8 @@ export declare namespace CheckoutConfigurationCreateParams {
319
325
  image?: Plan.Image | null;
320
326
 
321
327
  /**
322
- * An additional amount charged upon first purchase.
328
+ * An additional amount charged upon first purchase. Provided as a number in
329
+ * dollars (e.g., 10.00 for $10.00).
323
330
  */
324
331
  initial_price?: number | null;
325
332
 
@@ -362,7 +369,8 @@ export declare namespace CheckoutConfigurationCreateParams {
362
369
  release_method?: Shared.ReleaseMethod | null;
363
370
 
364
371
  /**
365
- * The amount the customer is charged every billing period.
372
+ * The amount the customer is charged every billing period. Provided as a number in
373
+ * dollars (e.g., 9.99 for $9.99/period).
366
374
  */
367
375
  renewal_price?: number | null;
368
376