@whop/sdk 0.0.2 → 0.0.4

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 (196) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/client.d.mts +30 -12
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +30 -12
  5. package/client.d.ts.map +1 -1
  6. package/client.js +19 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs +21 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/app-builds.d.mts +16 -13
  12. package/resources/app-builds.d.mts.map +1 -1
  13. package/resources/app-builds.d.ts +16 -13
  14. package/resources/app-builds.d.ts.map +1 -1
  15. package/resources/app-builds.js +1 -1
  16. package/resources/app-builds.mjs +1 -1
  17. package/resources/apps.d.mts +15 -10
  18. package/resources/apps.d.mts.map +1 -1
  19. package/resources/apps.d.ts +15 -10
  20. package/resources/apps.d.ts.map +1 -1
  21. package/resources/checkout-configurations.d.mts +252 -140
  22. package/resources/checkout-configurations.d.mts.map +1 -1
  23. package/resources/checkout-configurations.d.ts +252 -140
  24. package/resources/checkout-configurations.d.ts.map +1 -1
  25. package/resources/checkout-configurations.js +6 -20
  26. package/resources/checkout-configurations.js.map +1 -1
  27. package/resources/checkout-configurations.mjs +6 -20
  28. package/resources/checkout-configurations.mjs.map +1 -1
  29. package/resources/companies.d.mts +157 -0
  30. package/resources/companies.d.mts.map +1 -1
  31. package/resources/companies.d.ts +157 -0
  32. package/resources/companies.d.ts.map +1 -1
  33. package/resources/companies.js +22 -0
  34. package/resources/companies.js.map +1 -1
  35. package/resources/companies.mjs +22 -0
  36. package/resources/companies.mjs.map +1 -1
  37. package/resources/course-chapters.d.mts +185 -0
  38. package/resources/course-chapters.d.mts.map +1 -0
  39. package/resources/course-chapters.d.ts +185 -0
  40. package/resources/course-chapters.d.ts.map +1 -0
  41. package/resources/course-chapters.js +103 -0
  42. package/resources/course-chapters.js.map +1 -0
  43. package/resources/course-chapters.mjs +99 -0
  44. package/resources/course-chapters.mjs.map +1 -0
  45. package/resources/course-lesson-interactions.d.mts +2 -2
  46. package/resources/course-lesson-interactions.d.ts +2 -2
  47. package/resources/course-lesson-interactions.js +2 -2
  48. package/resources/course-lesson-interactions.mjs +2 -2
  49. package/resources/course-lessons.d.mts +563 -0
  50. package/resources/course-lessons.d.mts.map +1 -0
  51. package/resources/course-lessons.d.ts +563 -0
  52. package/resources/course-lessons.d.ts.map +1 -0
  53. package/resources/course-lessons.js +101 -0
  54. package/resources/course-lessons.js.map +1 -0
  55. package/resources/course-lessons.mjs +97 -0
  56. package/resources/course-lessons.mjs.map +1 -0
  57. package/resources/course-students.d.mts +187 -0
  58. package/resources/course-students.d.mts.map +1 -0
  59. package/resources/course-students.d.ts +187 -0
  60. package/resources/course-students.d.ts.map +1 -0
  61. package/resources/course-students.js +36 -0
  62. package/resources/course-students.js.map +1 -0
  63. package/resources/course-students.mjs +32 -0
  64. package/resources/course-students.mjs.map +1 -0
  65. package/resources/courses.d.mts +485 -0
  66. package/resources/courses.d.mts.map +1 -0
  67. package/resources/courses.d.ts +485 -0
  68. package/resources/courses.d.ts.map +1 -0
  69. package/resources/courses.js +98 -0
  70. package/resources/courses.js.map +1 -0
  71. package/resources/courses.mjs +94 -0
  72. package/resources/courses.mjs.map +1 -0
  73. package/resources/experiences.d.mts +42 -11
  74. package/resources/experiences.d.mts.map +1 -1
  75. package/resources/experiences.d.ts +42 -11
  76. package/resources/experiences.d.ts.map +1 -1
  77. package/resources/experiences.js +22 -0
  78. package/resources/experiences.js.map +1 -1
  79. package/resources/experiences.mjs +22 -0
  80. package/resources/experiences.mjs.map +1 -1
  81. package/resources/forum-posts.d.mts +75 -10
  82. package/resources/forum-posts.d.mts.map +1 -1
  83. package/resources/forum-posts.d.ts +75 -10
  84. package/resources/forum-posts.d.ts.map +1 -1
  85. package/resources/forum-posts.js +11 -0
  86. package/resources/forum-posts.js.map +1 -1
  87. package/resources/forum-posts.mjs +11 -0
  88. package/resources/forum-posts.mjs.map +1 -1
  89. package/resources/index.d.mts +12 -6
  90. package/resources/index.d.mts.map +1 -1
  91. package/resources/index.d.ts +12 -6
  92. package/resources/index.d.ts.map +1 -1
  93. package/resources/index.js +13 -1
  94. package/resources/index.js.map +1 -1
  95. package/resources/index.mjs +7 -1
  96. package/resources/index.mjs.map +1 -1
  97. package/resources/invoices.d.mts +529 -146
  98. package/resources/invoices.d.mts.map +1 -1
  99. package/resources/invoices.d.ts +529 -146
  100. package/resources/invoices.d.ts.map +1 -1
  101. package/resources/invoices.js +2 -24
  102. package/resources/invoices.js.map +1 -1
  103. package/resources/invoices.mjs +2 -24
  104. package/resources/invoices.mjs.map +1 -1
  105. package/resources/ledger-accounts.d.mts +1 -1
  106. package/resources/ledger-accounts.d.mts.map +1 -1
  107. package/resources/ledger-accounts.d.ts +1 -1
  108. package/resources/ledger-accounts.d.ts.map +1 -1
  109. package/resources/members.d.mts +4 -0
  110. package/resources/members.d.mts.map +1 -1
  111. package/resources/members.d.ts +4 -0
  112. package/resources/members.d.ts.map +1 -1
  113. package/resources/memberships.d.mts +26 -5
  114. package/resources/memberships.d.mts.map +1 -1
  115. package/resources/memberships.d.ts +26 -5
  116. package/resources/memberships.d.ts.map +1 -1
  117. package/resources/memberships.js +1 -1
  118. package/resources/memberships.js.map +1 -1
  119. package/resources/memberships.mjs +1 -1
  120. package/resources/memberships.mjs.map +1 -1
  121. package/resources/messages.d.mts +57 -10
  122. package/resources/messages.d.mts.map +1 -1
  123. package/resources/messages.d.ts +57 -10
  124. package/resources/messages.d.ts.map +1 -1
  125. package/resources/messages.js +6 -0
  126. package/resources/messages.js.map +1 -1
  127. package/resources/messages.mjs +6 -0
  128. package/resources/messages.mjs.map +1 -1
  129. package/resources/payments.d.mts +35 -13
  130. package/resources/payments.d.mts.map +1 -1
  131. package/resources/payments.d.ts +35 -13
  132. package/resources/payments.d.ts.map +1 -1
  133. package/resources/plans.d.mts +161 -17
  134. package/resources/plans.d.mts.map +1 -1
  135. package/resources/plans.d.ts +161 -17
  136. package/resources/plans.d.ts.map +1 -1
  137. package/resources/plans.js.map +1 -1
  138. package/resources/plans.mjs.map +1 -1
  139. package/resources/products.d.mts +30 -33
  140. package/resources/products.d.mts.map +1 -1
  141. package/resources/products.d.ts +30 -33
  142. package/resources/products.d.ts.map +1 -1
  143. package/resources/promo-codes.d.mts +394 -0
  144. package/resources/promo-codes.d.mts.map +1 -0
  145. package/resources/promo-codes.d.ts +394 -0
  146. package/resources/promo-codes.d.ts.map +1 -0
  147. package/resources/promo-codes.js +91 -0
  148. package/resources/promo-codes.js.map +1 -0
  149. package/resources/promo-codes.mjs +87 -0
  150. package/resources/promo-codes.mjs.map +1 -0
  151. package/resources/reviews.d.mts +277 -0
  152. package/resources/reviews.d.mts.map +1 -0
  153. package/resources/reviews.d.ts +277 -0
  154. package/resources/reviews.d.ts.map +1 -0
  155. package/resources/reviews.js +23 -0
  156. package/resources/reviews.js.map +1 -0
  157. package/resources/reviews.mjs +19 -0
  158. package/resources/reviews.mjs.map +1 -0
  159. package/resources/shared.d.mts +117 -14
  160. package/resources/shared.d.mts.map +1 -1
  161. package/resources/shared.d.ts +117 -14
  162. package/resources/shared.d.ts.map +1 -1
  163. package/resources/transfers.d.mts +12 -0
  164. package/resources/transfers.d.mts.map +1 -1
  165. package/resources/transfers.d.ts +12 -0
  166. package/resources/transfers.d.ts.map +1 -1
  167. package/src/client.ts +166 -11
  168. package/src/resources/app-builds.ts +19 -14
  169. package/src/resources/apps.ts +16 -11
  170. package/src/resources/checkout-configurations.ts +278 -143
  171. package/src/resources/companies.ts +196 -0
  172. package/src/resources/course-chapters.ts +236 -0
  173. package/src/resources/course-lesson-interactions.ts +2 -2
  174. package/src/resources/course-lessons.ts +699 -0
  175. package/src/resources/course-students.ts +238 -0
  176. package/src/resources/courses.ts +622 -0
  177. package/src/resources/experiences.ts +54 -11
  178. package/src/resources/forum-posts.ts +95 -10
  179. package/src/resources/index.ts +73 -2
  180. package/src/resources/invoices.ts +620 -149
  181. package/src/resources/ledger-accounts.ts +13 -1
  182. package/src/resources/members.ts +5 -0
  183. package/src/resources/memberships.ts +31 -6
  184. package/src/resources/messages.ts +74 -10
  185. package/src/resources/payments.ts +146 -19
  186. package/src/resources/plans.ts +184 -17
  187. package/src/resources/products.ts +36 -37
  188. package/src/resources/promo-codes.ts +490 -0
  189. package/src/resources/reviews.ts +348 -0
  190. package/src/resources/shared.ts +128 -14
  191. package/src/resources/transfers.ts +10 -0
  192. package/src/version.ts +1 -1
  193. package/version.d.mts +1 -1
  194. package/version.d.ts +1 -1
  195. package/version.js +1 -1
  196. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
+ import * as PaymentsAPI from './payments';
4
5
  import * as Shared from './shared';
5
6
  import { APIPromise } from '../core/api-promise';
6
7
  import { CursorPage, type CursorPageParams, PagePromise } from '../core/pagination';
@@ -15,15 +16,19 @@ export class CheckoutConfigurations extends APIResource {
15
16
  *
16
17
  * - `checkout_configuration:create`
17
18
  * - `plan:create`
19
+ * - `access_pass:create`
20
+ * - `access_pass:update`
18
21
  *
19
22
  * @example
20
23
  * ```ts
21
24
  * const checkoutConfiguration =
22
- * await client.checkoutConfigurations.create();
25
+ * await client.checkoutConfigurations.create({
26
+ * plan_id: 'plan_xxxxxxxxxxxxx',
27
+ * });
23
28
  * ```
24
29
  */
25
30
  create(
26
- body: CheckoutConfigurationCreateParams | null | undefined = {},
31
+ body: CheckoutConfigurationCreateParams,
27
32
  options?: RequestOptions,
28
33
  ): APIPromise<Shared.CheckoutConfiguration> {
29
34
  return this._client.post('/checkout_configurations', { body, ...options });
@@ -35,14 +40,6 @@ export class CheckoutConfigurations extends APIResource {
35
40
  * Required permissions:
36
41
  *
37
42
  * - `checkout_configuration:basic:read`
38
- *
39
- * @example
40
- * ```ts
41
- * const checkoutConfiguration =
42
- * await client.checkoutConfigurations.retrieve(
43
- * 'ch_xxxxxxxxxxxxxxx',
44
- * );
45
- * ```
46
43
  */
47
44
  retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration> {
48
45
  return this._client.get(path`/checkout_configurations/${id}`, options);
@@ -54,16 +51,6 @@ export class CheckoutConfigurations extends APIResource {
54
51
  * Required permissions:
55
52
  *
56
53
  * - `checkout_configuration:basic:read`
57
- *
58
- * @example
59
- * ```ts
60
- * // Automatically fetches more pages as needed.
61
- * for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list(
62
- * { company_id: 'biz_xxxxxxxxxxxxxx' },
63
- * )) {
64
- * // ...
65
- * }
66
- * ```
67
54
  */
68
55
  list(
69
56
  query: CheckoutConfigurationListParams,
@@ -112,7 +99,8 @@ export interface CheckoutConfigurationListResponse {
112
99
  plan: CheckoutConfigurationListResponse.Plan;
113
100
 
114
101
  /**
115
- * The URL to redirect the user to after the checkout configuration is created
102
+ * A URL you can send to customers to complete a checkout. It looks like
103
+ * `/checkout/plan_xxxx?session={id}`
116
104
  */
117
105
  purchase_url: string;
118
106
 
@@ -179,183 +167,330 @@ export namespace CheckoutConfigurationListResponse {
179
167
  }
180
168
  }
181
169
 
182
- export interface CheckoutConfigurationCreateParams {
183
- /**
184
- * The affiliate code to use for the checkout configuration
185
- */
186
- affiliate_code?: string | null;
187
-
188
- /**
189
- * The metadata to use for the checkout configuration
190
- */
191
- metadata?: { [key: string]: unknown } | null;
192
-
193
- /**
194
- * Pass this object to create a new plan for this checkout configuration
195
- */
196
- plan?: CheckoutConfigurationCreateParams.Plan | null;
197
-
198
- /**
199
- * The ID of the plan to use for the checkout configuration
200
- */
201
- plan_id?: string | null;
202
-
203
- /**
204
- * The URL to redirect the user to after the checkout configuration is created
205
- */
206
- redirect_url?: string | null;
207
- }
170
+ export type CheckoutConfigurationCreateParams =
171
+ | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlan
172
+ | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlanID;
208
173
 
209
- export namespace CheckoutConfigurationCreateParams {
210
- /**
211
- * Pass this object to create a new plan for this checkout configuration
212
- */
213
- export interface Plan {
174
+ export declare namespace CheckoutConfigurationCreateParams {
175
+ export interface CreateCheckoutSessionInputWithPlan {
214
176
  /**
215
- * The company the plan should be created for.
177
+ * Pass this object to create a new plan for this checkout configuration
216
178
  */
217
- company_id: string;
179
+ plan: CreateCheckoutSessionInputWithPlan.Plan;
218
180
 
219
181
  /**
220
- * The interval at which the plan charges (renewal plans).
182
+ * The affiliate code to use for the checkout configuration
221
183
  */
222
- billing_period?: number | null;
184
+ affiliate_code?: string | null;
223
185
 
224
186
  /**
225
- * The available currencies on the platform
187
+ * The metadata to use for the checkout configuration
226
188
  */
227
- currency?: Shared.Currency | null;
189
+ metadata?: { [key: string]: unknown } | null;
228
190
 
229
191
  /**
230
- * An array of custom field objects.
192
+ * The URL to redirect the user to after the checkout configuration is created
231
193
  */
232
- custom_fields?: Array<Plan.CustomField> | null;
194
+ redirect_url?: string | null;
195
+ }
233
196
 
197
+ export namespace CreateCheckoutSessionInputWithPlan {
234
198
  /**
235
- * The description of the plan.
199
+ * Pass this object to create a new plan for this checkout configuration
236
200
  */
237
- description?: string | null;
201
+ export interface Plan {
202
+ /**
203
+ * The company the plan should be created for.
204
+ */
205
+ company_id: string;
238
206
 
239
- /**
240
- * The interval at which the plan charges (expiration plans).
241
- */
242
- expiration_days?: number | null;
207
+ /**
208
+ * The interval at which the plan charges (renewal plans).
209
+ */
210
+ billing_period?: number | null;
243
211
 
244
- /**
245
- * Whether to force the creation of a new plan even if one with the same attributes
246
- * already exists.
247
- */
248
- force_create_new_plan?: boolean | null;
212
+ /**
213
+ * The available currencies on the platform
214
+ */
215
+ currency?: Shared.Currency | null;
249
216
 
250
- /**
251
- * An image for the plan. This will be visible on the product page to customers.
252
- */
253
- image?: Plan.Image | null;
217
+ /**
218
+ * An array of custom field objects.
219
+ */
220
+ custom_fields?: Array<Plan.CustomField> | null;
254
221
 
255
- /**
256
- * An additional amount charged upon first purchase.
257
- */
258
- initial_price?: number | null;
222
+ /**
223
+ * The description of the plan.
224
+ */
225
+ description?: string | null;
259
226
 
260
- /**
261
- * A personal description or notes section for the business.
262
- */
263
- internal_notes?: string | null;
227
+ /**
228
+ * The interval at which the plan charges (expiration plans).
229
+ */
230
+ expiration_days?: number | null;
264
231
 
265
- /**
266
- * Whether or not the tax is included in a plan's price (or if it hasn't been set
267
- * up)
268
- */
269
- override_tax_type?: Shared.TaxType | null;
232
+ /**
233
+ * Whether to force the creation of a new plan even if one with the same attributes
234
+ * already exists.
235
+ */
236
+ force_create_new_plan?: boolean | null;
270
237
 
271
- /**
272
- * The type of plan that can be attached to an access pass
273
- */
274
- plan_type?: Shared.PlanType | null;
238
+ /**
239
+ * An image for the plan. This will be visible on the product page to customers.
240
+ */
241
+ image?: Plan.AttachmentInputWithDirectUploadID | Plan.AttachmentInputWithID | null;
275
242
 
276
- /**
277
- * The product the plan is related to.
278
- */
279
- product_id?: string | null;
243
+ /**
244
+ * An additional amount charged upon first purchase.
245
+ */
246
+ initial_price?: number | null;
280
247
 
281
- /**
282
- * The methods of how a plan can be released.
283
- */
284
- release_method?: Shared.ReleaseMethod | null;
248
+ /**
249
+ * A personal description or notes section for the business.
250
+ */
251
+ internal_notes?: string | null;
285
252
 
286
- /**
287
- * The amount the customer is charged every billing period.
288
- */
289
- renewal_price?: number | null;
253
+ /**
254
+ * Whether or not the tax is included in a plan's price (or if it hasn't been set
255
+ * up)
256
+ */
257
+ override_tax_type?: Shared.TaxType | null;
290
258
 
291
- /**
292
- * The title of the plan. This will be visible on the product page to customers.
293
- */
294
- title?: string | null;
259
+ /**
260
+ * The explicit payment method configuration for the plan. If not provided, the
261
+ * platform or company's defaults will apply.
262
+ */
263
+ payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
295
264
 
296
- /**
297
- * The number of free trial days added before a renewal plan.
298
- */
299
- trial_period_days?: number | null;
265
+ /**
266
+ * The type of plan that can be attached to an access pass
267
+ */
268
+ plan_type?: Shared.PlanType | null;
300
269
 
301
- /**
302
- * Visibility of a resource
303
- */
304
- visibility?: Shared.Visibility | null;
305
- }
270
+ /**
271
+ * Pass this object to create a new product for this plan. We will use the product
272
+ * external identifier to find or create an existing product.
273
+ */
274
+ product?: Plan.Product | null;
306
275
 
307
- export namespace Plan {
308
- export interface CustomField {
309
276
  /**
310
- * The type of the custom field.
277
+ * The product the plan is related to. Either this or product is required.
311
278
  */
312
- field_type: 'text';
279
+ product_id?: string | null;
313
280
 
314
281
  /**
315
- * The name of the custom field.
282
+ * The methods of how a plan can be released.
316
283
  */
317
- name: string;
284
+ release_method?: Shared.ReleaseMethod | null;
318
285
 
319
286
  /**
320
- * The ID of the custom field (if being updated)
287
+ * The amount the customer is charged every billing period.
321
288
  */
322
- id?: string | null;
289
+ renewal_price?: number | null;
323
290
 
324
291
  /**
325
- * The order of the field.
292
+ * The title of the plan. This will be visible on the product page to customers.
326
293
  */
327
- order?: number | null;
294
+ title?: string | null;
328
295
 
329
296
  /**
330
- * The placeholder value of the field.
297
+ * The number of free trial days added before a renewal plan.
331
298
  */
332
- placeholder?: string | null;
299
+ trial_period_days?: number | null;
333
300
 
334
301
  /**
335
- * Whether or not the field is required.
302
+ * Visibility of a resource
336
303
  */
337
- required?: boolean | null;
304
+ visibility?: Shared.Visibility | null;
338
305
  }
339
306
 
340
- /**
341
- * An image for the plan. This will be visible on the product page to customers.
342
- */
343
- export interface Image {
307
+ export namespace Plan {
308
+ export interface CustomField {
309
+ /**
310
+ * The type of the custom field.
311
+ */
312
+ field_type: 'text';
313
+
314
+ /**
315
+ * The name of the custom field.
316
+ */
317
+ name: string;
318
+
319
+ /**
320
+ * The ID of the custom field (if being updated)
321
+ */
322
+ id?: string | null;
323
+
324
+ /**
325
+ * The order of the field.
326
+ */
327
+ order?: number | null;
328
+
329
+ /**
330
+ * The placeholder value of the field.
331
+ */
332
+ placeholder?: string | null;
333
+
334
+ /**
335
+ * Whether or not the field is required.
336
+ */
337
+ required?: boolean | null;
338
+ }
339
+
340
+ /**
341
+ * Input for an attachment
342
+ */
343
+ export interface AttachmentInputWithDirectUploadID {
344
+ /**
345
+ * This ID should be used the first time you upload an attachment. It is the ID of
346
+ * the direct upload that was created when uploading the file to S3 via the
347
+ * mediaDirectUpload mutation.
348
+ */
349
+ direct_upload_id: string;
350
+ }
351
+
352
+ /**
353
+ * Input for an attachment
354
+ */
355
+ export interface AttachmentInputWithID {
356
+ /**
357
+ * The ID of an existing attachment object. Use this when updating a resource and
358
+ * keeping a subset of the attachments. Don't use this unless you know what you're
359
+ * doing.
360
+ */
361
+ id: string;
362
+ }
363
+
344
364
  /**
345
- * The ID of an existing attachment object. Use this when updating a resource and
346
- * keeping a subset of the attachments. Don't use this unless you know what you're
347
- * doing.
365
+ * The explicit payment method configuration for the plan. If not provided, the
366
+ * platform or company's defaults will apply.
348
367
  */
349
- id?: string | null;
368
+ export interface PaymentMethodConfiguration {
369
+ /**
370
+ * An array of payment method identifiers that are explicitly disabled. Only
371
+ * applies if the include_platform_defaults is true.
372
+ */
373
+ disabled: Array<PaymentsAPI.PaymentMethodTypes>;
374
+
375
+ /**
376
+ * An array of payment method identifiers that are explicitly enabled. This means
377
+ * these payment methods will be shown on checkout. Example use case is to only
378
+ * enable a specific payment method like cashapp, or extending the platform
379
+ * defaults with additional methods.
380
+ */
381
+ enabled: Array<PaymentsAPI.PaymentMethodTypes>;
382
+
383
+ /**
384
+ * Whether Whop's platform default payment method enablement settings are included
385
+ * in this configuration. The full list of default payment methods can be found in
386
+ * the documentation at docs.whop.com/payments.
387
+ */
388
+ include_platform_defaults: boolean;
389
+ }
350
390
 
351
391
  /**
352
- * This ID should be used the first time you upload an attachment. It is the ID of
353
- * the direct upload that was created when uploading the file to S3 via the
354
- * mediaDirectUpload mutation.
392
+ * Pass this object to create a new product for this plan. We will use the product
393
+ * external identifier to find or create an existing product.
355
394
  */
356
- direct_upload_id?: string | null;
395
+ export interface Product {
396
+ /**
397
+ * A unique ID used to find or create a product. When provided during creation, we
398
+ * will look for an existing product with this external identifier — if found, it
399
+ * will be updated; otherwise, a new product will be created.
400
+ */
401
+ external_identifier: string;
402
+
403
+ /**
404
+ * The title of the product.
405
+ */
406
+ title: string;
407
+
408
+ /**
409
+ * The different business types a company can be.
410
+ */
411
+ business_type?: Shared.BusinessTypes | null;
412
+
413
+ /**
414
+ * Whether or not to collect shipping information at checkout from the customer.
415
+ */
416
+ collect_shipping_address?: boolean | null;
417
+
418
+ /**
419
+ * The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
420
+ * between 5 and 22 characters, contain at least one letter, and not contain any of
421
+ * the following characters: <, >, \, ', "
422
+ */
423
+ custom_statement_descriptor?: string | null;
424
+
425
+ /**
426
+ * A written description of the product.
427
+ */
428
+ description?: string | null;
429
+
430
+ /**
431
+ * The percentage of the revenue that goes to the global affiliate program.
432
+ */
433
+ global_affiliate_percentage?: number | null;
434
+
435
+ /**
436
+ * The different statuses of the global affiliate program for an access pass.
437
+ */
438
+ global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
439
+
440
+ /**
441
+ * The headline of the product.
442
+ */
443
+ headline?: string | null;
444
+
445
+ /**
446
+ * The different industry types a company can be in.
447
+ */
448
+ industry_type?: Shared.IndustryTypes | null;
449
+
450
+ /**
451
+ * The ID of the product tax code to apply to this product.
452
+ */
453
+ product_tax_code_id?: string | null;
454
+
455
+ /**
456
+ * The URL to redirect the customer to after a purchase.
457
+ */
458
+ redirect_purchase_url?: string | null;
459
+
460
+ /**
461
+ * The route of the product.
462
+ */
463
+ route?: string | null;
464
+
465
+ /**
466
+ * Visibility of a resource
467
+ */
468
+ visibility?: Shared.Visibility | null;
469
+ }
357
470
  }
358
471
  }
472
+
473
+ export interface CreateCheckoutSessionInputWithPlanID {
474
+ /**
475
+ * The ID of the plan to use for the checkout configuration
476
+ */
477
+ plan_id: string;
478
+
479
+ /**
480
+ * The affiliate code to use for the checkout configuration
481
+ */
482
+ affiliate_code?: string | null;
483
+
484
+ /**
485
+ * The metadata to use for the checkout configuration
486
+ */
487
+ metadata?: { [key: string]: unknown } | null;
488
+
489
+ /**
490
+ * The URL to redirect the user to after the checkout configuration is created
491
+ */
492
+ redirect_url?: string | null;
493
+ }
359
494
  }
360
495
 
361
496
  export interface CheckoutConfigurationListParams extends CursorPageParams {