@whop/sdk 0.0.38 → 0.0.40
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.
- package/CHANGELOG.md +39 -0
- package/client.d.mts +88 -40
- package/client.d.mts.map +1 -1
- package/client.d.ts +88 -40
- package/client.d.ts.map +1 -1
- package/client.js +59 -0
- package/client.js.map +1 -1
- package/client.mjs +59 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +15 -9
- package/resources/accounts.d.mts +244 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +244 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +46 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +42 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/ad-campaigns.d.mts +296 -0
- package/resources/ad-campaigns.d.mts.map +1 -0
- package/resources/ad-campaigns.d.ts +296 -0
- package/resources/ad-campaigns.d.ts.map +1 -0
- package/resources/ad-campaigns.js +104 -0
- package/resources/ad-campaigns.js.map +1 -0
- package/resources/ad-campaigns.mjs +100 -0
- package/resources/ad-campaigns.mjs.map +1 -0
- package/resources/ad-groups.d.mts +1461 -0
- package/resources/ad-groups.d.mts.map +1 -0
- package/resources/ad-groups.d.ts +1461 -0
- package/resources/ad-groups.d.ts.map +1 -0
- package/resources/ad-groups.js +121 -0
- package/resources/ad-groups.js.map +1 -0
- package/resources/ad-groups.mjs +117 -0
- package/resources/ad-groups.mjs.map +1 -0
- package/resources/ad-reports.d.mts +379 -0
- package/resources/ad-reports.d.mts.map +1 -0
- package/resources/ad-reports.d.ts +379 -0
- package/resources/ad-reports.d.ts.map +1 -0
- package/resources/ad-reports.js +26 -0
- package/resources/ad-reports.js.map +1 -0
- package/resources/ad-reports.mjs +22 -0
- package/resources/ad-reports.mjs.map +1 -0
- package/resources/ads.d.mts +234 -0
- package/resources/ads.d.mts.map +1 -0
- package/resources/ads.d.ts +234 -0
- package/resources/ads.d.ts.map +1 -0
- package/resources/ads.js +56 -0
- package/resources/ads.js.map +1 -0
- package/resources/ads.mjs +52 -0
- package/resources/ads.mjs.map +1 -0
- package/resources/affiliates/affiliates.d.mts +31 -31
- package/resources/affiliates/affiliates.d.mts.map +1 -1
- package/resources/affiliates/affiliates.d.ts +31 -31
- package/resources/affiliates/affiliates.d.ts.map +1 -1
- package/resources/affiliates/affiliates.js +21 -21
- package/resources/affiliates/affiliates.js.map +1 -1
- package/resources/affiliates/affiliates.mjs +21 -21
- package/resources/affiliates/affiliates.mjs.map +1 -1
- package/resources/affiliates/index.d.mts +2 -2
- package/resources/affiliates/index.d.mts.map +1 -1
- package/resources/affiliates/index.d.ts +2 -2
- package/resources/affiliates/index.d.ts.map +1 -1
- package/resources/affiliates/overrides.d.mts +37 -37
- package/resources/affiliates/overrides.d.mts.map +1 -1
- package/resources/affiliates/overrides.d.ts +37 -37
- package/resources/affiliates/overrides.d.ts.map +1 -1
- package/resources/affiliates/overrides.js +23 -23
- package/resources/affiliates/overrides.js.map +1 -1
- package/resources/affiliates/overrides.mjs +23 -23
- package/resources/affiliates/overrides.mjs.map +1 -1
- package/resources/ai-chats.d.mts +23 -23
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +23 -23
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +6 -6
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +6 -6
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +54 -54
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +54 -54
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +21 -21
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +21 -21
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +57 -57
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +57 -57
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +15 -15
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +15 -15
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +36 -36
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +36 -36
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +21 -21
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +21 -21
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/bounties.d.mts +281 -0
- package/resources/bounties.d.mts.map +1 -0
- package/resources/bounties.d.ts +281 -0
- package/resources/bounties.d.ts.map +1 -0
- package/resources/bounties.js +63 -0
- package/resources/bounties.js.map +1 -0
- package/resources/bounties.mjs +59 -0
- package/resources/bounties.mjs.map +1 -0
- package/resources/chat-channels.d.mts +43 -43
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +43 -43
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +24 -24
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +24 -24
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +77 -49
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +77 -49
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +11 -11
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +11 -11
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +98 -35
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +98 -35
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +24 -17
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +24 -17
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +39 -39
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +39 -39
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +14 -14
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +14 -14
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/conversions.d.mts +248 -0
- package/resources/conversions.d.mts.map +1 -0
- package/resources/conversions.d.ts +248 -0
- package/resources/conversions.d.ts.map +1 -0
- package/resources/conversions.js +30 -0
- package/resources/conversions.js.map +1 -0
- package/resources/conversions.mjs +26 -0
- package/resources/conversions.mjs.map +1 -0
- package/resources/course-chapters.d.mts +36 -36
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +36 -36
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +23 -23
- package/resources/course-chapters.js.map +1 -1
- package/resources/course-chapters.mjs +23 -23
- package/resources/course-chapters.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +5 -5
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +5 -5
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +7 -7
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +7 -7
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +40 -40
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +40 -40
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +22 -22
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +22 -22
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +5 -5
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +5 -5
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +10 -10
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +10 -10
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +40 -40
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +40 -40
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +19 -19
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +19 -19
- package/resources/courses.mjs.map +1 -1
- package/resources/deposits.d.mts +64 -0
- package/resources/deposits.d.mts.map +1 -0
- package/resources/deposits.d.ts +64 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +16 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +12 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/dispute-alerts.d.mts +10 -10
- package/resources/dispute-alerts.d.mts.map +1 -1
- package/resources/dispute-alerts.d.ts +10 -10
- package/resources/dispute-alerts.d.ts.map +1 -1
- package/resources/dispute-alerts.js +13 -13
- package/resources/dispute-alerts.js.map +1 -1
- package/resources/dispute-alerts.mjs +13 -13
- package/resources/dispute-alerts.mjs.map +1 -1
- package/resources/disputes.d.mts +13 -15
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +13 -15
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +11 -11
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +11 -11
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +37 -37
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +37 -37
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +19 -19
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +19 -19
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +38 -38
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +38 -38
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +21 -21
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +21 -21
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +5 -5
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +5 -5
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -7
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -7
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +50 -50
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +50 -50
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +17 -17
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +17 -17
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +36 -36
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +36 -36
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +18 -18
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +18 -18
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +18 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +18 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +52 -48
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +52 -48
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +21 -21
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +21 -21
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +33 -33
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +33 -33
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +11 -11
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +11 -11
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +45 -35
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +45 -35
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +22 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +10 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +89 -84
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +89 -84
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +40 -40
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +40 -40
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +53 -53
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +53 -53
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +24 -24
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +24 -24
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +34 -1
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +34 -1
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +9 -7
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +9 -7
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +7 -7
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +7 -7
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +67 -47
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +67 -47
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +38 -38
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +38 -38
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +36 -36
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +36 -36
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +16 -16
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +16 -16
- package/resources/messages.mjs.map +1 -1
- package/resources/payment-methods.d.mts +20 -20
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +20 -20
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +10 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +10 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +177 -145
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +177 -145
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +68 -68
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +68 -68
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-accounts.d.mts +1 -1
- package/resources/payout-accounts.d.ts +1 -1
- package/resources/payout-methods.d.mts +5 -5
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +5 -5
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +10 -10
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +10 -10
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +130 -72
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +130 -72
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +21 -21
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +21 -21
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +81 -65
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +81 -65
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +25 -25
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +25 -25
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +59 -59
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +59 -59
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +22 -22
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +22 -22
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +25 -25
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +25 -25
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +11 -11
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +11 -11
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +59 -10
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +59 -10
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +12 -10
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +12 -10
- package/resources/refunds.mjs.map +1 -1
- package/resources/resolution-center-cases.d.mts +6 -6
- package/resources/resolution-center-cases.d.mts.map +1 -1
- package/resources/resolution-center-cases.d.ts +6 -6
- package/resources/resolution-center-cases.d.ts.map +1 -1
- package/resources/resolution-center-cases.js +10 -10
- package/resources/resolution-center-cases.js.map +1 -1
- package/resources/resolution-center-cases.mjs +10 -10
- package/resources/resolution-center-cases.mjs.map +1 -1
- package/resources/reviews.d.mts +4 -4
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +4 -4
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +6 -6
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +6 -6
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +6 -6
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +6 -6
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +11 -11
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +11 -11
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +100 -6
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +100 -6
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +35 -35
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +35 -35
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +20 -20
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +20 -20
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +42 -38
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +42 -38
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +21 -23
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +21 -23
- package/resources/support-channels.mjs.map +1 -1
- package/resources/swaps.d.mts +62 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +62 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +15 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +11 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transfers.d.mts +57 -55
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +57 -55
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +19 -19
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +19 -19
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +20 -20
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +20 -20
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +16 -16
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +16 -16
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +2 -2
- package/resources/verifications.d.ts +2 -2
- package/resources/wallets.d.mts +89 -0
- package/resources/wallets.d.mts.map +1 -0
- package/resources/wallets.d.ts +89 -0
- package/resources/wallets.d.ts.map +1 -0
- package/resources/wallets.js +28 -0
- package/resources/wallets.js.map +1 -0
- package/resources/wallets.mjs +24 -0
- package/resources/wallets.mjs.map +1 -0
- package/resources/webhooks.d.mts +2182 -1196
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +2182 -1196
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +31 -31
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +31 -31
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +47 -47
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +47 -47
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +21 -21
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +21 -21
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +277 -60
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/accounts.ts +318 -0
- package/src/resources/ad-campaigns.ts +376 -0
- package/src/resources/ad-groups.ts +1958 -0
- package/src/resources/ad-reports.ts +484 -0
- package/src/resources/ads.ts +295 -0
- package/src/resources/affiliates/affiliates.ts +39 -39
- package/src/resources/affiliates/index.ts +2 -2
- package/src/resources/affiliates/overrides.ts +51 -51
- package/src/resources/ai-chats.ts +33 -33
- package/src/resources/app-builds.ts +68 -68
- package/src/resources/apps.ts +86 -86
- package/src/resources/authorized-users.ts +48 -48
- package/src/resources/bounties.ts +353 -0
- package/src/resources/chat-channels.ts +57 -57
- package/src/resources/checkout-configurations.ts +101 -67
- package/src/resources/companies.ts +123 -41
- package/src/resources/company-token-transactions.ts +55 -55
- package/src/resources/conversions.ts +316 -0
- package/src/resources/course-chapters.ts +47 -47
- package/src/resources/course-lesson-interactions.ts +12 -12
- package/src/resources/course-lessons.ts +54 -54
- package/src/resources/course-students.ts +12 -12
- package/src/resources/courses.ts +51 -51
- package/src/resources/deposits.ts +87 -0
- package/src/resources/dispute-alerts.ts +18 -18
- package/src/resources/disputes.ts +18 -20
- package/src/resources/dm-channels.ts +45 -45
- package/src/resources/dm-members.ts +45 -45
- package/src/resources/entries.ts +10 -10
- package/src/resources/experiences.ts +64 -64
- package/src/resources/fee-markups.ts +44 -44
- package/src/resources/files.ts +22 -0
- package/src/resources/forum-posts.ts +65 -60
- package/src/resources/forums.ts +44 -44
- package/src/resources/index.ts +129 -57
- package/src/resources/invoices.ts +116 -110
- package/src/resources/leads.ts +64 -64
- package/src/resources/ledger-accounts.ts +41 -1
- package/src/resources/members.ts +14 -12
- package/src/resources/memberships.ts +80 -61
- package/src/resources/messages.ts +48 -48
- package/src/resources/payment-methods.ts +30 -30
- package/src/resources/payments.ts +229 -183
- package/src/resources/payout-accounts.ts +1 -1
- package/src/resources/payout-methods.ts +11 -11
- package/src/resources/plans.ts +153 -90
- package/src/resources/products.ts +98 -84
- package/src/resources/promo-codes.ts +74 -74
- package/src/resources/reactions.ts +33 -33
- package/src/resources/refunds.ts +65 -15
- package/src/resources/resolution-center-cases.ts +11 -12
- package/src/resources/reviews.ts +7 -7
- package/src/resources/setup-intents.ts +13 -13
- package/src/resources/shared.ts +107 -5
- package/src/resources/shipments.ts +44 -44
- package/src/resources/support-channels.ts +54 -49
- package/src/resources/swaps.ts +87 -0
- package/src/resources/transfers.ts +68 -66
- package/src/resources/users.ts +29 -29
- package/src/resources/verifications.ts +2 -2
- package/src/resources/wallets.ts +136 -0
- package/src/resources/webhooks.ts +2449 -1277
- package/src/resources/withdrawals.ts +55 -55
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/resources/plans.ts
CHANGED
|
@@ -13,6 +13,31 @@ import { path } from '../internal/utils/path';
|
|
|
13
13
|
* Plans
|
|
14
14
|
*/
|
|
15
15
|
export class Plans extends APIResource {
|
|
16
|
+
/**
|
|
17
|
+
* Returns a paginated list of plans belonging to a company, with optional
|
|
18
|
+
* filtering by visibility, type, release method, and product.
|
|
19
|
+
*
|
|
20
|
+
* Required permissions:
|
|
21
|
+
*
|
|
22
|
+
* - `plan:basic:read`
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const planListResponse of client.plans.list({
|
|
28
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
29
|
+
* })) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
list(
|
|
35
|
+
query: PlanListParams,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): PagePromise<PlanListResponsesCursorPage, PlanListResponse> {
|
|
38
|
+
return this._client.getAPIList('/plans', CursorPage<PlanListResponse>, { query, ...options });
|
|
39
|
+
}
|
|
40
|
+
|
|
16
41
|
/**
|
|
17
42
|
* Create a new pricing plan for a product. The plan defines the billing interval,
|
|
18
43
|
* price, and availability for customers.
|
|
@@ -78,31 +103,6 @@ export class Plans extends APIResource {
|
|
|
78
103
|
return this._client.patch(path`/plans/${id}`, { body, ...options });
|
|
79
104
|
}
|
|
80
105
|
|
|
81
|
-
/**
|
|
82
|
-
* Returns a paginated list of plans belonging to a company, with optional
|
|
83
|
-
* filtering by visibility, type, release method, and product.
|
|
84
|
-
*
|
|
85
|
-
* Required permissions:
|
|
86
|
-
*
|
|
87
|
-
* - `plan:basic:read`
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```ts
|
|
91
|
-
* // Automatically fetches more pages as needed.
|
|
92
|
-
* for await (const planListResponse of client.plans.list({
|
|
93
|
-
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
94
|
-
* })) {
|
|
95
|
-
* // ...
|
|
96
|
-
* }
|
|
97
|
-
* ```
|
|
98
|
-
*/
|
|
99
|
-
list(
|
|
100
|
-
query: PlanListParams,
|
|
101
|
-
options?: RequestOptions,
|
|
102
|
-
): PagePromise<PlanListResponsesCursorPage, PlanListResponse> {
|
|
103
|
-
return this._client.getAPIList('/plans', CursorPage<PlanListResponse>, { query, ...options });
|
|
104
|
-
}
|
|
105
|
-
|
|
106
106
|
/**
|
|
107
107
|
* Permanently delete a plan from a product. Existing memberships on this plan will
|
|
108
108
|
* not be affected.
|
|
@@ -146,6 +146,12 @@ export interface PlanListResponse {
|
|
|
146
146
|
*/
|
|
147
147
|
id: string;
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Whether the creator has turned on adaptive pricing for this plan. Raw setting —
|
|
151
|
+
* does not check processor compatibility or feature flags.
|
|
152
|
+
*/
|
|
153
|
+
adaptive_pricing_enabled: boolean;
|
|
154
|
+
|
|
149
155
|
/**
|
|
150
156
|
* The number of days between each recurring charge. Null for one-time plans. For
|
|
151
157
|
* example, 30 for monthly or 365 for annual billing.
|
|
@@ -206,6 +212,12 @@ export interface PlanListResponse {
|
|
|
206
212
|
*/
|
|
207
213
|
member_count: number | null;
|
|
208
214
|
|
|
215
|
+
/**
|
|
216
|
+
* Custom key-value pairs stored on the plan. Included in webhook payloads for
|
|
217
|
+
* payment and membership events.
|
|
218
|
+
*/
|
|
219
|
+
metadata: { [key: string]: unknown } | null;
|
|
220
|
+
|
|
209
221
|
/**
|
|
210
222
|
* The explicit payment method configuration specifying which payment methods are
|
|
211
223
|
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
@@ -254,6 +266,11 @@ export interface PlanListResponse {
|
|
|
254
266
|
*/
|
|
255
267
|
stock: number | null;
|
|
256
268
|
|
|
269
|
+
/**
|
|
270
|
+
* The 3D Secure behavior for a plan.
|
|
271
|
+
*/
|
|
272
|
+
three_ds_level: 'mandate_challenge' | 'frictionless' | null;
|
|
273
|
+
|
|
257
274
|
/**
|
|
258
275
|
* The display name of the plan shown to customers on the product page and at
|
|
259
276
|
* checkout. Maximum 30 characters. Null if no title has been set.
|
|
@@ -363,6 +380,68 @@ export namespace PlanListResponse {
|
|
|
363
380
|
*/
|
|
364
381
|
export type PlanDeleteResponse = boolean;
|
|
365
382
|
|
|
383
|
+
export interface PlanListParams extends CursorPageParams {
|
|
384
|
+
/**
|
|
385
|
+
* The unique identifier of the company to list plans for.
|
|
386
|
+
*/
|
|
387
|
+
company_id: string;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
391
|
+
*/
|
|
392
|
+
before?: string | null;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Only return plans created after this timestamp.
|
|
396
|
+
*/
|
|
397
|
+
created_after?: string | null;
|
|
398
|
+
|
|
399
|
+
/**
|
|
400
|
+
* Only return plans created before this timestamp.
|
|
401
|
+
*/
|
|
402
|
+
created_before?: string | null;
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* The direction of the sort.
|
|
406
|
+
*/
|
|
407
|
+
direction?: Shared.Direction | null;
|
|
408
|
+
|
|
409
|
+
/**
|
|
410
|
+
* Returns the first _n_ elements from the list.
|
|
411
|
+
*/
|
|
412
|
+
first?: number | null;
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Returns the last _n_ elements from the list.
|
|
416
|
+
*/
|
|
417
|
+
last?: number | null;
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* The ways a relation of Plans can be ordered
|
|
421
|
+
*/
|
|
422
|
+
order?: 'id' | 'active_members_count' | 'created_at' | 'internal_notes' | 'expires_at' | null;
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Filter to only plans matching these billing types.
|
|
426
|
+
*/
|
|
427
|
+
plan_types?: Array<Shared.PlanType> | null;
|
|
428
|
+
|
|
429
|
+
/**
|
|
430
|
+
* Filter to only plans belonging to these product identifiers.
|
|
431
|
+
*/
|
|
432
|
+
product_ids?: Array<string> | null;
|
|
433
|
+
|
|
434
|
+
/**
|
|
435
|
+
* Filter to only plans matching these release methods.
|
|
436
|
+
*/
|
|
437
|
+
release_methods?: Array<Shared.ReleaseMethod> | null;
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Filter to only plans matching these visibility states.
|
|
441
|
+
*/
|
|
442
|
+
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
443
|
+
}
|
|
444
|
+
|
|
366
445
|
export interface PlanCreateParams {
|
|
367
446
|
/**
|
|
368
447
|
* The unique identifier of the company to create this plan for.
|
|
@@ -374,6 +453,11 @@ export interface PlanCreateParams {
|
|
|
374
453
|
*/
|
|
375
454
|
product_id: string;
|
|
376
455
|
|
|
456
|
+
/**
|
|
457
|
+
* Whether this plan accepts local currency payments via adaptive pricing.
|
|
458
|
+
*/
|
|
459
|
+
adaptive_pricing_enabled?: boolean | null;
|
|
460
|
+
|
|
377
461
|
/**
|
|
378
462
|
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
379
463
|
* for yearly.
|
|
@@ -429,6 +513,13 @@ export interface PlanCreateParams {
|
|
|
429
513
|
*/
|
|
430
514
|
legacy_payment_method_controls?: boolean | null;
|
|
431
515
|
|
|
516
|
+
/**
|
|
517
|
+
* Custom key-value pairs to store on the plan. Included in webhook payloads for
|
|
518
|
+
* payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per
|
|
519
|
+
* value.
|
|
520
|
+
*/
|
|
521
|
+
metadata?: { [key: string]: unknown } | null;
|
|
522
|
+
|
|
432
523
|
/**
|
|
433
524
|
* Whether or not the tax is included in a plan's price (or if it hasn't been set
|
|
434
525
|
* up)
|
|
@@ -468,6 +559,11 @@ export interface PlanCreateParams {
|
|
|
468
559
|
*/
|
|
469
560
|
stock?: number | null;
|
|
470
561
|
|
|
562
|
+
/**
|
|
563
|
+
* The 3D Secure behavior for a plan.
|
|
564
|
+
*/
|
|
565
|
+
three_ds_level?: 'mandate_challenge' | 'frictionless' | null;
|
|
566
|
+
|
|
471
567
|
/**
|
|
472
568
|
* The display name of the plan shown to customers on the product page.
|
|
473
569
|
*/
|
|
@@ -496,6 +592,12 @@ export namespace PlanCreateParams {
|
|
|
496
592
|
* default.
|
|
497
593
|
*/
|
|
498
594
|
export interface CheckoutStyling {
|
|
595
|
+
/**
|
|
596
|
+
* A hex color code for the checkout page background, applied to the order summary
|
|
597
|
+
* panel (e.g. #F4F4F5).
|
|
598
|
+
*/
|
|
599
|
+
background_color?: string | null;
|
|
600
|
+
|
|
499
601
|
/**
|
|
500
602
|
* The different border-radius styles available for checkout pages.
|
|
501
603
|
*/
|
|
@@ -578,11 +680,16 @@ export namespace PlanCreateParams {
|
|
|
578
680
|
* in this configuration. The full list of default payment methods can be found in
|
|
579
681
|
* the documentation at docs.whop.com/payments.
|
|
580
682
|
*/
|
|
581
|
-
include_platform_defaults
|
|
683
|
+
include_platform_defaults?: boolean | null;
|
|
582
684
|
}
|
|
583
685
|
}
|
|
584
686
|
|
|
585
687
|
export interface PlanUpdateParams {
|
|
688
|
+
/**
|
|
689
|
+
* Whether this plan accepts local currency payments via adaptive pricing.
|
|
690
|
+
*/
|
|
691
|
+
adaptive_pricing_enabled?: boolean | null;
|
|
692
|
+
|
|
586
693
|
/**
|
|
587
694
|
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
588
695
|
* for yearly.
|
|
@@ -637,6 +744,13 @@ export interface PlanUpdateParams {
|
|
|
637
744
|
*/
|
|
638
745
|
legacy_payment_method_controls?: boolean | null;
|
|
639
746
|
|
|
747
|
+
/**
|
|
748
|
+
* Custom key-value pairs to store on the plan. Included in webhook payloads for
|
|
749
|
+
* payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per
|
|
750
|
+
* value.
|
|
751
|
+
*/
|
|
752
|
+
metadata?: { [key: string]: unknown } | null;
|
|
753
|
+
|
|
640
754
|
/**
|
|
641
755
|
* Whether to offer a retention discount when a customer attempts to cancel.
|
|
642
756
|
*/
|
|
@@ -678,6 +792,11 @@ export interface PlanUpdateParams {
|
|
|
678
792
|
*/
|
|
679
793
|
strike_through_renewal_price?: number | null;
|
|
680
794
|
|
|
795
|
+
/**
|
|
796
|
+
* The 3D Secure behavior for a plan.
|
|
797
|
+
*/
|
|
798
|
+
three_ds_level?: 'mandate_challenge' | 'frictionless' | null;
|
|
799
|
+
|
|
681
800
|
/**
|
|
682
801
|
* The display name of the plan shown to customers on the product page.
|
|
683
802
|
*/
|
|
@@ -705,6 +824,12 @@ export namespace PlanUpdateParams {
|
|
|
705
824
|
* inherit from the company default.
|
|
706
825
|
*/
|
|
707
826
|
export interface CheckoutStyling {
|
|
827
|
+
/**
|
|
828
|
+
* A hex color code for the checkout page background, applied to the order summary
|
|
829
|
+
* panel (e.g. #F4F4F5).
|
|
830
|
+
*/
|
|
831
|
+
background_color?: string | null;
|
|
832
|
+
|
|
708
833
|
/**
|
|
709
834
|
* The different border-radius styles available for checkout pages.
|
|
710
835
|
*/
|
|
@@ -787,72 +912,10 @@ export namespace PlanUpdateParams {
|
|
|
787
912
|
* in this configuration. The full list of default payment methods can be found in
|
|
788
913
|
* the documentation at docs.whop.com/payments.
|
|
789
914
|
*/
|
|
790
|
-
include_platform_defaults
|
|
915
|
+
include_platform_defaults?: boolean | null;
|
|
791
916
|
}
|
|
792
917
|
}
|
|
793
918
|
|
|
794
|
-
export interface PlanListParams extends CursorPageParams {
|
|
795
|
-
/**
|
|
796
|
-
* The unique identifier of the company to list plans for.
|
|
797
|
-
*/
|
|
798
|
-
company_id: string;
|
|
799
|
-
|
|
800
|
-
/**
|
|
801
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
802
|
-
*/
|
|
803
|
-
before?: string | null;
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Only return plans created after this timestamp.
|
|
807
|
-
*/
|
|
808
|
-
created_after?: string | null;
|
|
809
|
-
|
|
810
|
-
/**
|
|
811
|
-
* Only return plans created before this timestamp.
|
|
812
|
-
*/
|
|
813
|
-
created_before?: string | null;
|
|
814
|
-
|
|
815
|
-
/**
|
|
816
|
-
* The direction of the sort.
|
|
817
|
-
*/
|
|
818
|
-
direction?: Shared.Direction | null;
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Returns the first _n_ elements from the list.
|
|
822
|
-
*/
|
|
823
|
-
first?: number | null;
|
|
824
|
-
|
|
825
|
-
/**
|
|
826
|
-
* Returns the last _n_ elements from the list.
|
|
827
|
-
*/
|
|
828
|
-
last?: number | null;
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* The ways a relation of Plans can be ordered
|
|
832
|
-
*/
|
|
833
|
-
order?: 'id' | 'active_members_count' | 'created_at' | 'internal_notes' | 'expires_at' | null;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* Filter to only plans matching these billing types.
|
|
837
|
-
*/
|
|
838
|
-
plan_types?: Array<Shared.PlanType> | null;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Filter to only plans belonging to these product identifiers.
|
|
842
|
-
*/
|
|
843
|
-
product_ids?: Array<string> | null;
|
|
844
|
-
|
|
845
|
-
/**
|
|
846
|
-
* Filter to only plans matching these release methods.
|
|
847
|
-
*/
|
|
848
|
-
release_methods?: Array<Shared.ReleaseMethod> | null;
|
|
849
|
-
|
|
850
|
-
/**
|
|
851
|
-
* Filter to only plans matching these visibility states.
|
|
852
|
-
*/
|
|
853
|
-
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
919
|
export declare namespace Plans {
|
|
857
920
|
export {
|
|
858
921
|
type CheckoutFont as CheckoutFont,
|
|
@@ -860,8 +923,8 @@ export declare namespace Plans {
|
|
|
860
923
|
type PlanListResponse as PlanListResponse,
|
|
861
924
|
type PlanDeleteResponse as PlanDeleteResponse,
|
|
862
925
|
type PlanListResponsesCursorPage as PlanListResponsesCursorPage,
|
|
926
|
+
type PlanListParams as PlanListParams,
|
|
863
927
|
type PlanCreateParams as PlanCreateParams,
|
|
864
928
|
type PlanUpdateParams as PlanUpdateParams,
|
|
865
|
-
type PlanListParams as PlanListParams,
|
|
866
929
|
};
|
|
867
930
|
}
|
|
@@ -13,24 +13,28 @@ import { path } from '../internal/utils/path';
|
|
|
13
13
|
*/
|
|
14
14
|
export class Products extends APIResource {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
16
|
+
* Returns a paginated list of products belonging to a company, with optional
|
|
17
|
+
* filtering by type, visibility, and creation date.
|
|
18
18
|
*
|
|
19
19
|
* Required permissions:
|
|
20
20
|
*
|
|
21
|
-
* - `access_pass:create`
|
|
22
21
|
* - `access_pass:basic:read`
|
|
23
22
|
*
|
|
24
23
|
* @example
|
|
25
24
|
* ```ts
|
|
26
|
-
*
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const productListItem of client.products.list({
|
|
27
27
|
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
28
|
-
*
|
|
29
|
-
*
|
|
28
|
+
* })) {
|
|
29
|
+
* // ...
|
|
30
|
+
* }
|
|
30
31
|
* ```
|
|
31
32
|
*/
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
list(
|
|
34
|
+
query: ProductListParams,
|
|
35
|
+
options?: RequestOptions,
|
|
36
|
+
): PagePromise<ProductListItemsCursorPage, Shared.ProductListItem> {
|
|
37
|
+
return this._client.getAPIList('/products', CursorPage<Shared.ProductListItem>, { query, ...options });
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
/**
|
|
@@ -52,51 +56,47 @@ export class Products extends APIResource {
|
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
/**
|
|
55
|
-
*
|
|
59
|
+
* Create a new product for a company. The product serves as the top-level
|
|
60
|
+
* container for plans and experiences.
|
|
56
61
|
*
|
|
57
62
|
* Required permissions:
|
|
58
63
|
*
|
|
59
|
-
* - `access_pass:
|
|
64
|
+
* - `access_pass:create`
|
|
60
65
|
* - `access_pass:basic:read`
|
|
61
66
|
*
|
|
62
67
|
* @example
|
|
63
68
|
* ```ts
|
|
64
|
-
* const product = await client.products.
|
|
65
|
-
* '
|
|
66
|
-
*
|
|
69
|
+
* const product = await client.products.create({
|
|
70
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
71
|
+
* title: 'title',
|
|
72
|
+
* });
|
|
67
73
|
* ```
|
|
68
74
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
body: ProductUpdateParams | null | undefined = {},
|
|
72
|
-
options?: RequestOptions,
|
|
73
|
-
): APIPromise<Shared.Product> {
|
|
74
|
-
return this._client.patch(path`/products/${id}`, { body, ...options });
|
|
75
|
+
create(body: ProductCreateParams, options?: RequestOptions): APIPromise<Shared.Product> {
|
|
76
|
+
return this._client.post('/products', { body, ...options });
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
/**
|
|
78
|
-
*
|
|
79
|
-
* filtering by type, visibility, and creation date.
|
|
80
|
+
* Update a product's title, description, visibility, and other settings.
|
|
80
81
|
*
|
|
81
82
|
* Required permissions:
|
|
82
83
|
*
|
|
84
|
+
* - `access_pass:update`
|
|
83
85
|
* - `access_pass:basic:read`
|
|
84
86
|
*
|
|
85
87
|
* @example
|
|
86
88
|
* ```ts
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* })) {
|
|
91
|
-
* // ...
|
|
92
|
-
* }
|
|
89
|
+
* const product = await client.products.update(
|
|
90
|
+
* 'prod_xxxxxxxxxxxxx',
|
|
91
|
+
* );
|
|
93
92
|
* ```
|
|
94
93
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
update(
|
|
95
|
+
id: string,
|
|
96
|
+
body: ProductUpdateParams | null | undefined = {},
|
|
97
97
|
options?: RequestOptions,
|
|
98
|
-
):
|
|
99
|
-
return this._client.
|
|
98
|
+
): APIPromise<Shared.Product> {
|
|
99
|
+
return this._client.patch(path`/products/${id}`, { body, ...options });
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/**
|
|
@@ -123,6 +123,58 @@ export class Products extends APIResource {
|
|
|
123
123
|
*/
|
|
124
124
|
export type ProductDeleteResponse = boolean;
|
|
125
125
|
|
|
126
|
+
export interface ProductListParams extends CursorPageParams {
|
|
127
|
+
/**
|
|
128
|
+
* The unique identifier of the company to list products for.
|
|
129
|
+
*/
|
|
130
|
+
company_id: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
134
|
+
*/
|
|
135
|
+
before?: string | null;
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Only return products created after this timestamp.
|
|
139
|
+
*/
|
|
140
|
+
created_after?: string | null;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Only return products created before this timestamp.
|
|
144
|
+
*/
|
|
145
|
+
created_before?: string | null;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* The direction of the sort.
|
|
149
|
+
*/
|
|
150
|
+
direction?: Shared.Direction | null;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Returns the first _n_ elements from the list.
|
|
154
|
+
*/
|
|
155
|
+
first?: number | null;
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Returns the last _n_ elements from the list.
|
|
159
|
+
*/
|
|
160
|
+
last?: number | null;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* The ways a relation of AccessPasses can be ordered
|
|
164
|
+
*/
|
|
165
|
+
order?: 'active_memberships_count' | 'created_at' | 'usd_gmv' | 'usd_gmv_30_days' | null;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Filter to only products matching these type classifications.
|
|
169
|
+
*/
|
|
170
|
+
product_types?: Array<Shared.AccessPassType> | null;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Filter to only products matching these visibility states.
|
|
174
|
+
*/
|
|
175
|
+
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
176
|
+
}
|
|
177
|
+
|
|
126
178
|
export interface ProductCreateParams {
|
|
127
179
|
/**
|
|
128
180
|
* The unique identifier of the company to create this product for.
|
|
@@ -194,6 +246,13 @@ export interface ProductCreateParams {
|
|
|
194
246
|
*/
|
|
195
247
|
member_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
196
248
|
|
|
249
|
+
/**
|
|
250
|
+
* Custom key-value pairs to store on the product. Included in webhook payloads for
|
|
251
|
+
* payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per
|
|
252
|
+
* value.
|
|
253
|
+
*/
|
|
254
|
+
metadata?: { [key: string]: unknown } | null;
|
|
255
|
+
|
|
197
256
|
/**
|
|
198
257
|
* Configuration for an automatically generated plan to attach to this product.
|
|
199
258
|
*/
|
|
@@ -370,6 +429,13 @@ export interface ProductUpdateParams {
|
|
|
370
429
|
*/
|
|
371
430
|
member_affiliate_status?: Shared.GlobalAffiliateStatus | null;
|
|
372
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Custom key-value pairs to store on the product. Included in webhook payloads for
|
|
434
|
+
* payment and membership events. Max 50 keys, 500 chars per key, 5000 chars per
|
|
435
|
+
* value.
|
|
436
|
+
*/
|
|
437
|
+
metadata?: { [key: string]: unknown } | null;
|
|
438
|
+
|
|
373
439
|
/**
|
|
374
440
|
* The unique identifier of the tax classification code to apply to this product.
|
|
375
441
|
*/
|
|
@@ -434,64 +500,12 @@ export namespace ProductUpdateParams {
|
|
|
434
500
|
}
|
|
435
501
|
}
|
|
436
502
|
|
|
437
|
-
export interface ProductListParams extends CursorPageParams {
|
|
438
|
-
/**
|
|
439
|
-
* The unique identifier of the company to list products for.
|
|
440
|
-
*/
|
|
441
|
-
company_id: string;
|
|
442
|
-
|
|
443
|
-
/**
|
|
444
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
445
|
-
*/
|
|
446
|
-
before?: string | null;
|
|
447
|
-
|
|
448
|
-
/**
|
|
449
|
-
* Only return products created after this timestamp.
|
|
450
|
-
*/
|
|
451
|
-
created_after?: string | null;
|
|
452
|
-
|
|
453
|
-
/**
|
|
454
|
-
* Only return products created before this timestamp.
|
|
455
|
-
*/
|
|
456
|
-
created_before?: string | null;
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* The direction of the sort.
|
|
460
|
-
*/
|
|
461
|
-
direction?: Shared.Direction | null;
|
|
462
|
-
|
|
463
|
-
/**
|
|
464
|
-
* Returns the first _n_ elements from the list.
|
|
465
|
-
*/
|
|
466
|
-
first?: number | null;
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* Returns the last _n_ elements from the list.
|
|
470
|
-
*/
|
|
471
|
-
last?: number | null;
|
|
472
|
-
|
|
473
|
-
/**
|
|
474
|
-
* The ways a relation of AccessPasses can be ordered
|
|
475
|
-
*/
|
|
476
|
-
order?: 'active_memberships_count' | 'created_at' | 'usd_gmv' | 'usd_gmv_30_days' | null;
|
|
477
|
-
|
|
478
|
-
/**
|
|
479
|
-
* Filter to only products matching these type classifications.
|
|
480
|
-
*/
|
|
481
|
-
product_types?: Array<Shared.AccessPassType> | null;
|
|
482
|
-
|
|
483
|
-
/**
|
|
484
|
-
* Filter to only products matching these visibility states.
|
|
485
|
-
*/
|
|
486
|
-
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
503
|
export declare namespace Products {
|
|
490
504
|
export {
|
|
491
505
|
type ProductDeleteResponse as ProductDeleteResponse,
|
|
506
|
+
type ProductListParams as ProductListParams,
|
|
492
507
|
type ProductCreateParams as ProductCreateParams,
|
|
493
508
|
type ProductUpdateParams as ProductUpdateParams,
|
|
494
|
-
type ProductListParams as ProductListParams,
|
|
495
509
|
};
|
|
496
510
|
}
|
|
497
511
|
|