@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,4 +1,5 @@
1
1
  import { APIResource } from "../core/resource.mjs";
2
+ import * as PaymentsAPI from "./payments.mjs";
2
3
  import * as Shared from "./shared.mjs";
3
4
  import { APIPromise } from "../core/api-promise.mjs";
4
5
  import { CursorPage, type CursorPageParams, PagePromise } from "../core/pagination.mjs";
@@ -11,28 +12,24 @@ export declare class CheckoutConfigurations extends APIResource {
11
12
  *
12
13
  * - `checkout_configuration:create`
13
14
  * - `plan:create`
15
+ * - `access_pass:create`
16
+ * - `access_pass:update`
14
17
  *
15
18
  * @example
16
19
  * ```ts
17
20
  * const checkoutConfiguration =
18
- * await client.checkoutConfigurations.create();
21
+ * await client.checkoutConfigurations.create({
22
+ * plan_id: 'plan_xxxxxxxxxxxxx',
23
+ * });
19
24
  * ```
20
25
  */
21
- create(body?: CheckoutConfigurationCreateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
26
+ create(body: CheckoutConfigurationCreateParams, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
22
27
  /**
23
28
  * Retrieves a checkout configuration by ID
24
29
  *
25
30
  * Required permissions:
26
31
  *
27
32
  * - `checkout_configuration:basic:read`
28
- *
29
- * @example
30
- * ```ts
31
- * const checkoutConfiguration =
32
- * await client.checkoutConfigurations.retrieve(
33
- * 'ch_xxxxxxxxxxxxxxx',
34
- * );
35
- * ```
36
33
  */
37
34
  retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration>;
38
35
  /**
@@ -41,16 +38,6 @@ export declare class CheckoutConfigurations extends APIResource {
41
38
  * Required permissions:
42
39
  *
43
40
  * - `checkout_configuration:basic:read`
44
- *
45
- * @example
46
- * ```ts
47
- * // Automatically fetches more pages as needed.
48
- * for await (const checkoutConfigurationListResponse of client.checkoutConfigurations.list(
49
- * { company_id: 'biz_xxxxxxxxxxxxxx' },
50
- * )) {
51
- * // ...
52
- * }
53
- * ```
54
41
  */
55
42
  list(query: CheckoutConfigurationListParams, options?: RequestOptions): PagePromise<CheckoutConfigurationListResponsesCursorPage, CheckoutConfigurationListResponse>;
56
43
  }
@@ -85,7 +72,8 @@ export interface CheckoutConfigurationListResponse {
85
72
  */
86
73
  plan: CheckoutConfigurationListResponse.Plan;
87
74
  /**
88
- * The URL to redirect the user to after the checkout configuration is created
75
+ * A URL you can send to customers to complete a checkout. It looks like
76
+ * `/checkout/plan_xxxx?session={id}`
89
77
  */
90
78
  purchase_url: string;
91
79
  /**
@@ -140,155 +128,279 @@ export declare namespace CheckoutConfigurationListResponse {
140
128
  visibility: Shared.Visibility;
141
129
  }
142
130
  }
143
- export interface CheckoutConfigurationCreateParams {
144
- /**
145
- * The affiliate code to use for the checkout configuration
146
- */
147
- affiliate_code?: string | null;
148
- /**
149
- * The metadata to use for the checkout configuration
150
- */
151
- metadata?: {
152
- [key: string]: unknown;
153
- } | null;
154
- /**
155
- * Pass this object to create a new plan for this checkout configuration
156
- */
157
- plan?: CheckoutConfigurationCreateParams.Plan | null;
158
- /**
159
- * The ID of the plan to use for the checkout configuration
160
- */
161
- plan_id?: string | null;
162
- /**
163
- * The URL to redirect the user to after the checkout configuration is created
164
- */
165
- redirect_url?: string | null;
166
- }
131
+ export type CheckoutConfigurationCreateParams = CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlan | CheckoutConfigurationCreateParams.CreateCheckoutSessionInputWithPlanID;
167
132
  export declare namespace CheckoutConfigurationCreateParams {
168
- /**
169
- * Pass this object to create a new plan for this checkout configuration
170
- */
171
- interface Plan {
172
- /**
173
- * The company the plan should be created for.
174
- */
175
- company_id: string;
176
- /**
177
- * The interval at which the plan charges (renewal plans).
178
- */
179
- billing_period?: number | null;
180
- /**
181
- * The available currencies on the platform
182
- */
183
- currency?: Shared.Currency | null;
184
- /**
185
- * An array of custom field objects.
186
- */
187
- custom_fields?: Array<Plan.CustomField> | null;
188
- /**
189
- * The description of the plan.
190
- */
191
- description?: string | null;
192
- /**
193
- * The interval at which the plan charges (expiration plans).
194
- */
195
- expiration_days?: number | null;
133
+ interface CreateCheckoutSessionInputWithPlan {
196
134
  /**
197
- * Whether to force the creation of a new plan even if one with the same attributes
198
- * already exists.
135
+ * Pass this object to create a new plan for this checkout configuration
199
136
  */
200
- force_create_new_plan?: boolean | null;
137
+ plan: CreateCheckoutSessionInputWithPlan.Plan;
201
138
  /**
202
- * An image for the plan. This will be visible on the product page to customers.
139
+ * The affiliate code to use for the checkout configuration
203
140
  */
204
- image?: Plan.Image | null;
141
+ affiliate_code?: string | null;
205
142
  /**
206
- * An additional amount charged upon first purchase.
143
+ * The metadata to use for the checkout configuration
207
144
  */
208
- initial_price?: number | null;
145
+ metadata?: {
146
+ [key: string]: unknown;
147
+ } | null;
209
148
  /**
210
- * A personal description or notes section for the business.
149
+ * The URL to redirect the user to after the checkout configuration is created
211
150
  */
212
- internal_notes?: string | null;
213
- /**
214
- * Whether or not the tax is included in a plan's price (or if it hasn't been set
215
- * up)
216
- */
217
- override_tax_type?: Shared.TaxType | null;
218
- /**
219
- * The type of plan that can be attached to an access pass
220
- */
221
- plan_type?: Shared.PlanType | null;
222
- /**
223
- * The product the plan is related to.
224
- */
225
- product_id?: string | null;
226
- /**
227
- * The methods of how a plan can be released.
228
- */
229
- release_method?: Shared.ReleaseMethod | null;
230
- /**
231
- * The amount the customer is charged every billing period.
232
- */
233
- renewal_price?: number | null;
234
- /**
235
- * The title of the plan. This will be visible on the product page to customers.
236
- */
237
- title?: string | null;
238
- /**
239
- * The number of free trial days added before a renewal plan.
240
- */
241
- trial_period_days?: number | null;
151
+ redirect_url?: string | null;
152
+ }
153
+ namespace CreateCheckoutSessionInputWithPlan {
242
154
  /**
243
- * Visibility of a resource
155
+ * Pass this object to create a new plan for this checkout configuration
244
156
  */
245
- visibility?: Shared.Visibility | null;
246
- }
247
- namespace Plan {
248
- interface CustomField {
157
+ interface Plan {
158
+ /**
159
+ * The company the plan should be created for.
160
+ */
161
+ company_id: string;
162
+ /**
163
+ * The interval at which the plan charges (renewal plans).
164
+ */
165
+ billing_period?: number | null;
166
+ /**
167
+ * The available currencies on the platform
168
+ */
169
+ currency?: Shared.Currency | null;
170
+ /**
171
+ * An array of custom field objects.
172
+ */
173
+ custom_fields?: Array<Plan.CustomField> | null;
174
+ /**
175
+ * The description of the plan.
176
+ */
177
+ description?: string | null;
178
+ /**
179
+ * The interval at which the plan charges (expiration plans).
180
+ */
181
+ expiration_days?: number | null;
182
+ /**
183
+ * Whether to force the creation of a new plan even if one with the same attributes
184
+ * already exists.
185
+ */
186
+ force_create_new_plan?: boolean | null;
187
+ /**
188
+ * An image for the plan. This will be visible on the product page to customers.
189
+ */
190
+ image?: Plan.AttachmentInputWithDirectUploadID | Plan.AttachmentInputWithID | null;
191
+ /**
192
+ * An additional amount charged upon first purchase.
193
+ */
194
+ initial_price?: number | null;
249
195
  /**
250
- * The type of the custom field.
196
+ * A personal description or notes section for the business.
251
197
  */
252
- field_type: 'text';
198
+ internal_notes?: string | null;
253
199
  /**
254
- * The name of the custom field.
200
+ * Whether or not the tax is included in a plan's price (or if it hasn't been set
201
+ * up)
255
202
  */
256
- name: string;
203
+ override_tax_type?: Shared.TaxType | null;
257
204
  /**
258
- * The ID of the custom field (if being updated)
205
+ * The explicit payment method configuration for the plan. If not provided, the
206
+ * platform or company's defaults will apply.
259
207
  */
260
- id?: string | null;
208
+ payment_method_configuration?: Plan.PaymentMethodConfiguration | null;
261
209
  /**
262
- * The order of the field.
210
+ * The type of plan that can be attached to an access pass
263
211
  */
264
- order?: number | null;
212
+ plan_type?: Shared.PlanType | null;
265
213
  /**
266
- * The placeholder value of the field.
214
+ * Pass this object to create a new product for this plan. We will use the product
215
+ * external identifier to find or create an existing product.
267
216
  */
268
- placeholder?: string | null;
217
+ product?: Plan.Product | null;
269
218
  /**
270
- * Whether or not the field is required.
219
+ * The product the plan is related to. Either this or product is required.
271
220
  */
272
- required?: boolean | null;
221
+ product_id?: string | null;
222
+ /**
223
+ * The methods of how a plan can be released.
224
+ */
225
+ release_method?: Shared.ReleaseMethod | null;
226
+ /**
227
+ * The amount the customer is charged every billing period.
228
+ */
229
+ renewal_price?: number | null;
230
+ /**
231
+ * The title of the plan. This will be visible on the product page to customers.
232
+ */
233
+ title?: string | null;
234
+ /**
235
+ * The number of free trial days added before a renewal plan.
236
+ */
237
+ trial_period_days?: number | null;
238
+ /**
239
+ * Visibility of a resource
240
+ */
241
+ visibility?: Shared.Visibility | null;
273
242
  }
274
- /**
275
- * An image for the plan. This will be visible on the product page to customers.
276
- */
277
- interface Image {
243
+ namespace Plan {
244
+ interface CustomField {
245
+ /**
246
+ * The type of the custom field.
247
+ */
248
+ field_type: 'text';
249
+ /**
250
+ * The name of the custom field.
251
+ */
252
+ name: string;
253
+ /**
254
+ * The ID of the custom field (if being updated)
255
+ */
256
+ id?: string | null;
257
+ /**
258
+ * The order of the field.
259
+ */
260
+ order?: number | null;
261
+ /**
262
+ * The placeholder value of the field.
263
+ */
264
+ placeholder?: string | null;
265
+ /**
266
+ * Whether or not the field is required.
267
+ */
268
+ required?: boolean | null;
269
+ }
278
270
  /**
279
- * The ID of an existing attachment object. Use this when updating a resource and
280
- * keeping a subset of the attachments. Don't use this unless you know what you're
281
- * doing.
271
+ * Input for an attachment
282
272
  */
283
- id?: string | null;
273
+ interface AttachmentInputWithDirectUploadID {
274
+ /**
275
+ * This ID should be used the first time you upload an attachment. It is the ID of
276
+ * the direct upload that was created when uploading the file to S3 via the
277
+ * mediaDirectUpload mutation.
278
+ */
279
+ direct_upload_id: string;
280
+ }
284
281
  /**
285
- * This ID should be used the first time you upload an attachment. It is the ID of
286
- * the direct upload that was created when uploading the file to S3 via the
287
- * mediaDirectUpload mutation.
282
+ * Input for an attachment
288
283
  */
289
- direct_upload_id?: string | null;
284
+ interface AttachmentInputWithID {
285
+ /**
286
+ * The ID of an existing attachment object. Use this when updating a resource and
287
+ * keeping a subset of the attachments. Don't use this unless you know what you're
288
+ * doing.
289
+ */
290
+ id: string;
291
+ }
292
+ /**
293
+ * The explicit payment method configuration for the plan. If not provided, the
294
+ * platform or company's defaults will apply.
295
+ */
296
+ interface PaymentMethodConfiguration {
297
+ /**
298
+ * An array of payment method identifiers that are explicitly disabled. Only
299
+ * applies if the include_platform_defaults is true.
300
+ */
301
+ disabled: Array<PaymentsAPI.PaymentMethodTypes>;
302
+ /**
303
+ * An array of payment method identifiers that are explicitly enabled. This means
304
+ * these payment methods will be shown on checkout. Example use case is to only
305
+ * enable a specific payment method like cashapp, or extending the platform
306
+ * defaults with additional methods.
307
+ */
308
+ enabled: Array<PaymentsAPI.PaymentMethodTypes>;
309
+ /**
310
+ * Whether Whop's platform default payment method enablement settings are included
311
+ * in this configuration. The full list of default payment methods can be found in
312
+ * the documentation at docs.whop.com/payments.
313
+ */
314
+ include_platform_defaults: boolean;
315
+ }
316
+ /**
317
+ * Pass this object to create a new product for this plan. We will use the product
318
+ * external identifier to find or create an existing product.
319
+ */
320
+ interface Product {
321
+ /**
322
+ * A unique ID used to find or create a product. When provided during creation, we
323
+ * will look for an existing product with this external identifier — if found, it
324
+ * will be updated; otherwise, a new product will be created.
325
+ */
326
+ external_identifier: string;
327
+ /**
328
+ * The title of the product.
329
+ */
330
+ title: string;
331
+ /**
332
+ * The different business types a company can be.
333
+ */
334
+ business_type?: Shared.BusinessTypes | null;
335
+ /**
336
+ * Whether or not to collect shipping information at checkout from the customer.
337
+ */
338
+ collect_shipping_address?: boolean | null;
339
+ /**
340
+ * The custom statement descriptor for the product i.e. WHOP\*SPORTS, must be
341
+ * between 5 and 22 characters, contain at least one letter, and not contain any of
342
+ * the following characters: <, >, \, ', "
343
+ */
344
+ custom_statement_descriptor?: string | null;
345
+ /**
346
+ * A written description of the product.
347
+ */
348
+ description?: string | null;
349
+ /**
350
+ * The percentage of the revenue that goes to the global affiliate program.
351
+ */
352
+ global_affiliate_percentage?: number | null;
353
+ /**
354
+ * The different statuses of the global affiliate program for an access pass.
355
+ */
356
+ global_affiliate_status?: Shared.GlobalAffiliateStatus | null;
357
+ /**
358
+ * The headline of the product.
359
+ */
360
+ headline?: string | null;
361
+ /**
362
+ * The different industry types a company can be in.
363
+ */
364
+ industry_type?: Shared.IndustryTypes | null;
365
+ /**
366
+ * The ID of the product tax code to apply to this product.
367
+ */
368
+ product_tax_code_id?: string | null;
369
+ /**
370
+ * The URL to redirect the customer to after a purchase.
371
+ */
372
+ redirect_purchase_url?: string | null;
373
+ /**
374
+ * The route of the product.
375
+ */
376
+ route?: string | null;
377
+ /**
378
+ * Visibility of a resource
379
+ */
380
+ visibility?: Shared.Visibility | null;
381
+ }
290
382
  }
291
383
  }
384
+ interface CreateCheckoutSessionInputWithPlanID {
385
+ /**
386
+ * The ID of the plan to use for the checkout configuration
387
+ */
388
+ plan_id: string;
389
+ /**
390
+ * The affiliate code to use for the checkout configuration
391
+ */
392
+ affiliate_code?: string | null;
393
+ /**
394
+ * The metadata to use for the checkout configuration
395
+ */
396
+ metadata?: {
397
+ [key: string]: unknown;
398
+ } | null;
399
+ /**
400
+ * The URL to redirect the user to after the checkout configuration is created
401
+ */
402
+ redirect_url?: string | null;
403
+ }
292
404
  }
293
405
  export interface CheckoutConfigurationListParams extends CursorPageParams {
294
406
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,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;;eAEG;YACH,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;SAC3B;QAED;;WAEG;QACH,UAAiB,KAAK;YACpB;;;;eAIG;YACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;YAEnB;;;;eAIG;YACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;SAClC;KACF;CACF;AAED,MAAM,WAAW,+BAAgC,SAAQ,gBAAgB;IACvE;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,OAAO,EACL,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,4CAA4C,IAAI,4CAA4C,EACjG,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;CACH"}
1
+ {"version":3,"file":"checkout-configurations.d.mts","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,IAAI,EAAE,iCAAiC,EACvC,OAAO,CAAC,EA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