@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/shared.ts
CHANGED
|
@@ -375,6 +375,7 @@ export type AuthorizedUserRoles =
|
|
|
375
375
|
| 'admin'
|
|
376
376
|
| 'sales_manager'
|
|
377
377
|
| 'moderator'
|
|
378
|
+
| 'advertiser'
|
|
378
379
|
| 'app_manager'
|
|
379
380
|
| 'support'
|
|
380
381
|
| 'manager'
|
|
@@ -549,6 +550,12 @@ export namespace CheckoutConfiguration {
|
|
|
549
550
|
*/
|
|
550
551
|
id: string;
|
|
551
552
|
|
|
553
|
+
/**
|
|
554
|
+
* Whether the creator has turned on adaptive pricing for this plan. Raw setting —
|
|
555
|
+
* does not check processor compatibility or feature flags.
|
|
556
|
+
*/
|
|
557
|
+
adaptive_pricing_enabled: boolean;
|
|
558
|
+
|
|
552
559
|
/**
|
|
553
560
|
* The number of days between each recurring charge. Null for one-time plans. For
|
|
554
561
|
* example, 30 for monthly or 365 for annual billing.
|
|
@@ -592,6 +599,11 @@ export namespace CheckoutConfiguration {
|
|
|
592
599
|
*/
|
|
593
600
|
renewal_price: number;
|
|
594
601
|
|
|
602
|
+
/**
|
|
603
|
+
* The 3D Secure behavior for a plan.
|
|
604
|
+
*/
|
|
605
|
+
three_ds_level: 'mandate_challenge' | 'frictionless' | null;
|
|
606
|
+
|
|
595
607
|
/**
|
|
596
608
|
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
597
609
|
* no trial is configured or the current user has already used a trial for this
|
|
@@ -1076,7 +1088,11 @@ export type Currency =
|
|
|
1076
1088
|
| 'rub'
|
|
1077
1089
|
| 'btc'
|
|
1078
1090
|
| 'cny'
|
|
1079
|
-
| 'usdt'
|
|
1091
|
+
| 'usdt'
|
|
1092
|
+
| 'kzt'
|
|
1093
|
+
| 'awg'
|
|
1094
|
+
| 'whop_usd'
|
|
1095
|
+
| 'xau';
|
|
1080
1096
|
|
|
1081
1097
|
/**
|
|
1082
1098
|
* The different types of custom CTAs that can be selected.
|
|
@@ -1872,6 +1888,13 @@ export interface Membership {
|
|
|
1872
1888
|
*/
|
|
1873
1889
|
cancellation_reason: string | null;
|
|
1874
1890
|
|
|
1891
|
+
/**
|
|
1892
|
+
* The ID of the checkout session/configuration that produced this membership, if
|
|
1893
|
+
* any. Use this to map memberships back to the checkout configuration that created
|
|
1894
|
+
* them.
|
|
1895
|
+
*/
|
|
1896
|
+
checkout_configuration_id: string | null;
|
|
1897
|
+
|
|
1875
1898
|
/**
|
|
1876
1899
|
* The company this membership belongs to.
|
|
1877
1900
|
*/
|
|
@@ -2029,6 +2052,12 @@ export namespace Membership {
|
|
|
2029
2052
|
* The unique identifier for the plan.
|
|
2030
2053
|
*/
|
|
2031
2054
|
id: string;
|
|
2055
|
+
|
|
2056
|
+
/**
|
|
2057
|
+
* Custom key-value pairs stored on the plan. Included in webhook payloads for
|
|
2058
|
+
* payment and membership events.
|
|
2059
|
+
*/
|
|
2060
|
+
metadata: { [key: string]: unknown } | null;
|
|
2032
2061
|
}
|
|
2033
2062
|
|
|
2034
2063
|
/**
|
|
@@ -2040,6 +2069,12 @@ export namespace Membership {
|
|
|
2040
2069
|
*/
|
|
2041
2070
|
id: string;
|
|
2042
2071
|
|
|
2072
|
+
/**
|
|
2073
|
+
* Custom key-value pairs stored on the product. Included in webhook payloads for
|
|
2074
|
+
* payment and membership events.
|
|
2075
|
+
*/
|
|
2076
|
+
metadata: { [key: string]: unknown } | null;
|
|
2077
|
+
|
|
2043
2078
|
/**
|
|
2044
2079
|
* The display name of the product shown to customers on the product page and in
|
|
2045
2080
|
* search results.
|
|
@@ -2339,6 +2374,12 @@ export interface Payment {
|
|
|
2339
2374
|
*/
|
|
2340
2375
|
card_last4: string | null;
|
|
2341
2376
|
|
|
2377
|
+
/**
|
|
2378
|
+
* The ID of the checkout session/configuration that produced this payment, if any.
|
|
2379
|
+
* Use this to map payments back to the checkout configuration that created them.
|
|
2380
|
+
*/
|
|
2381
|
+
checkout_configuration_id: string | null;
|
|
2382
|
+
|
|
2342
2383
|
/**
|
|
2343
2384
|
* The company for the payment.
|
|
2344
2385
|
*/
|
|
@@ -2350,9 +2391,9 @@ export interface Payment {
|
|
|
2350
2391
|
created_at: string;
|
|
2351
2392
|
|
|
2352
2393
|
/**
|
|
2353
|
-
* The
|
|
2394
|
+
* The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').
|
|
2354
2395
|
*/
|
|
2355
|
-
currency: Currency
|
|
2396
|
+
currency: Currency;
|
|
2356
2397
|
|
|
2357
2398
|
/**
|
|
2358
2399
|
* When an alert came in that this transaction will be disputed
|
|
@@ -2475,6 +2516,22 @@ export interface Payment {
|
|
|
2475
2516
|
*/
|
|
2476
2517
|
retryable: boolean;
|
|
2477
2518
|
|
|
2519
|
+
/**
|
|
2520
|
+
* The total amount charged to the customer for this payment, including taxes and
|
|
2521
|
+
* after any discounts. In the currency specified by the currency field.
|
|
2522
|
+
*/
|
|
2523
|
+
settlement_amount: number;
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').
|
|
2527
|
+
*/
|
|
2528
|
+
settlement_currency: Currency;
|
|
2529
|
+
|
|
2530
|
+
/**
|
|
2531
|
+
* Deprecated. Always returns null.
|
|
2532
|
+
*/
|
|
2533
|
+
settlement_exchange_rate: number | null;
|
|
2534
|
+
|
|
2478
2535
|
/**
|
|
2479
2536
|
* The status of a receipt
|
|
2480
2537
|
*/
|
|
@@ -2650,8 +2707,7 @@ export namespace Payment {
|
|
|
2650
2707
|
currency: Shared.Currency;
|
|
2651
2708
|
|
|
2652
2709
|
/**
|
|
2653
|
-
* Whether the dispute evidence can still be edited and submitted.
|
|
2654
|
-
* only when the dispute status requires a response.
|
|
2710
|
+
* Whether the dispute evidence can still be edited and submitted.
|
|
2655
2711
|
*/
|
|
2656
2712
|
editable: boolean | null;
|
|
2657
2713
|
|
|
@@ -2756,6 +2812,11 @@ export namespace Payment {
|
|
|
2756
2812
|
*/
|
|
2757
2813
|
id: string;
|
|
2758
2814
|
|
|
2815
|
+
/**
|
|
2816
|
+
* The phone number associated with this membership.
|
|
2817
|
+
*/
|
|
2818
|
+
phone_number: string | null;
|
|
2819
|
+
|
|
2759
2820
|
/**
|
|
2760
2821
|
* The state of the membership.
|
|
2761
2822
|
*/
|
|
@@ -2829,6 +2890,12 @@ export namespace Payment {
|
|
|
2829
2890
|
* A personal description or notes section for the business.
|
|
2830
2891
|
*/
|
|
2831
2892
|
internal_notes: string | null;
|
|
2893
|
+
|
|
2894
|
+
/**
|
|
2895
|
+
* Custom key-value pairs stored on the plan. Included in webhook payloads for
|
|
2896
|
+
* payment and membership events.
|
|
2897
|
+
*/
|
|
2898
|
+
metadata: { [key: string]: unknown } | null;
|
|
2832
2899
|
}
|
|
2833
2900
|
|
|
2834
2901
|
/**
|
|
@@ -2840,6 +2907,12 @@ export namespace Payment {
|
|
|
2840
2907
|
*/
|
|
2841
2908
|
id: string;
|
|
2842
2909
|
|
|
2910
|
+
/**
|
|
2911
|
+
* Custom key-value pairs stored on the product. Included in webhook payloads for
|
|
2912
|
+
* payment and membership events.
|
|
2913
|
+
*/
|
|
2914
|
+
metadata: { [key: string]: unknown } | null;
|
|
2915
|
+
|
|
2843
2916
|
/**
|
|
2844
2917
|
* The URL slug used in the product's public link (e.g., 'my-product' in
|
|
2845
2918
|
* whop.com/company/my-product).
|
|
@@ -2982,6 +3055,12 @@ export interface Plan {
|
|
|
2982
3055
|
*/
|
|
2983
3056
|
id: string;
|
|
2984
3057
|
|
|
3058
|
+
/**
|
|
3059
|
+
* Whether the creator has turned on adaptive pricing for this plan. Raw setting —
|
|
3060
|
+
* does not check processor compatibility or feature flags.
|
|
3061
|
+
*/
|
|
3062
|
+
adaptive_pricing_enabled: boolean;
|
|
3063
|
+
|
|
2985
3064
|
/**
|
|
2986
3065
|
* The number of days between each recurring charge. Null for one-time plans. For
|
|
2987
3066
|
* example, 30 for monthly or 365 for annual billing.
|
|
@@ -3054,6 +3133,12 @@ export interface Plan {
|
|
|
3054
3133
|
*/
|
|
3055
3134
|
member_count: number | null;
|
|
3056
3135
|
|
|
3136
|
+
/**
|
|
3137
|
+
* Custom key-value pairs stored on the plan. Included in webhook payloads for
|
|
3138
|
+
* payment and membership events.
|
|
3139
|
+
*/
|
|
3140
|
+
metadata: { [key: string]: unknown } | null;
|
|
3141
|
+
|
|
3057
3142
|
/**
|
|
3058
3143
|
* The explicit payment method configuration specifying which payment methods are
|
|
3059
3144
|
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
@@ -3108,6 +3193,11 @@ export interface Plan {
|
|
|
3108
3193
|
*/
|
|
3109
3194
|
tax_type: TaxType;
|
|
3110
3195
|
|
|
3196
|
+
/**
|
|
3197
|
+
* The 3D Secure behavior for a plan.
|
|
3198
|
+
*/
|
|
3199
|
+
three_ds_level: 'mandate_challenge' | 'frictionless' | null;
|
|
3200
|
+
|
|
3111
3201
|
/**
|
|
3112
3202
|
* The display name of the plan shown to customers on the product page and at
|
|
3113
3203
|
* checkout. Maximum 30 characters. Null if no title has been set.
|
|
@@ -3344,6 +3434,12 @@ export interface Product {
|
|
|
3344
3434
|
*/
|
|
3345
3435
|
member_count: number;
|
|
3346
3436
|
|
|
3437
|
+
/**
|
|
3438
|
+
* Custom key-value pairs stored on the product. Included in webhook payloads for
|
|
3439
|
+
* payment and membership events.
|
|
3440
|
+
*/
|
|
3441
|
+
metadata: { [key: string]: unknown } | null;
|
|
3442
|
+
|
|
3347
3443
|
/**
|
|
3348
3444
|
* The user who owns the company that sells this product.
|
|
3349
3445
|
*/
|
|
@@ -3506,6 +3602,12 @@ export interface ProductListItem {
|
|
|
3506
3602
|
*/
|
|
3507
3603
|
member_count: number;
|
|
3508
3604
|
|
|
3605
|
+
/**
|
|
3606
|
+
* Custom key-value pairs stored on the product. Included in webhook payloads for
|
|
3607
|
+
* payment and membership events.
|
|
3608
|
+
*/
|
|
3609
|
+
metadata: { [key: string]: unknown } | null;
|
|
3610
|
+
|
|
3509
3611
|
/**
|
|
3510
3612
|
* The total number of published customer reviews for this product's company.
|
|
3511
3613
|
*/
|
|
@@ -11,6 +11,30 @@ import { path } from '../internal/utils/path';
|
|
|
11
11
|
* Shipments
|
|
12
12
|
*/
|
|
13
13
|
export class Shipments extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Returns a paginated list of shipments, with optional filtering by payment,
|
|
16
|
+
* company, or user.
|
|
17
|
+
*
|
|
18
|
+
* Required permissions:
|
|
19
|
+
*
|
|
20
|
+
* - `shipment:basic:read`
|
|
21
|
+
* - `payment:basic:read`
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* // Automatically fetches more pages as needed.
|
|
26
|
+
* for await (const shipmentListResponse of client.shipments.list()) {
|
|
27
|
+
* // ...
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
list(
|
|
32
|
+
query: ShipmentListParams | null | undefined = {},
|
|
33
|
+
options?: RequestOptions,
|
|
34
|
+
): PagePromise<ShipmentListResponsesCursorPage, ShipmentListResponse> {
|
|
35
|
+
return this._client.getAPIList('/shipments', CursorPage<ShipmentListResponse>, { query, ...options });
|
|
36
|
+
}
|
|
37
|
+
|
|
14
38
|
/**
|
|
15
39
|
* Create a new shipment with a tracking code for a specific payment within a
|
|
16
40
|
* company.
|
|
@@ -51,30 +75,6 @@ export class Shipments extends APIResource {
|
|
|
51
75
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Shipment> {
|
|
52
76
|
return this._client.get(path`/shipments/${id}`, options);
|
|
53
77
|
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Returns a paginated list of shipments, with optional filtering by payment,
|
|
57
|
-
* company, or user.
|
|
58
|
-
*
|
|
59
|
-
* Required permissions:
|
|
60
|
-
*
|
|
61
|
-
* - `shipment:basic:read`
|
|
62
|
-
* - `payment:basic:read`
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* // Automatically fetches more pages as needed.
|
|
67
|
-
* for await (const shipmentListResponse of client.shipments.list()) {
|
|
68
|
-
* // ...
|
|
69
|
-
* }
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
|
-
list(
|
|
73
|
-
query: ShipmentListParams | null | undefined = {},
|
|
74
|
-
options?: RequestOptions,
|
|
75
|
-
): PagePromise<ShipmentListResponsesCursorPage, ShipmentListResponse> {
|
|
76
|
-
return this._client.getAPIList('/shipments', CursorPage<ShipmentListResponse>, { query, ...options });
|
|
77
|
-
}
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
export type ShipmentListResponsesCursorPage = CursorPage<ShipmentListResponse>;
|
|
@@ -151,25 +151,6 @@ export namespace ShipmentListResponse {
|
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
export interface ShipmentCreateParams {
|
|
155
|
-
/**
|
|
156
|
-
* The unique identifier of the company to create the shipment for, starting with
|
|
157
|
-
* 'biz\_'.
|
|
158
|
-
*/
|
|
159
|
-
company_id: string;
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* The unique identifier of the payment to associate the shipment with.
|
|
163
|
-
*/
|
|
164
|
-
payment_id: string;
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* The carrier tracking code for the shipment, such as a USPS, UPS, or FedEx
|
|
168
|
-
* tracking number.
|
|
169
|
-
*/
|
|
170
|
-
tracking_code: string;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
154
|
export interface ShipmentListParams extends CursorPageParams {
|
|
174
155
|
/**
|
|
175
156
|
* Returns the elements in the list that come before the specified cursor.
|
|
@@ -202,11 +183,30 @@ export interface ShipmentListParams extends CursorPageParams {
|
|
|
202
183
|
user_id?: string | null;
|
|
203
184
|
}
|
|
204
185
|
|
|
186
|
+
export interface ShipmentCreateParams {
|
|
187
|
+
/**
|
|
188
|
+
* The unique identifier of the company to create the shipment for, starting with
|
|
189
|
+
* 'biz\_'.
|
|
190
|
+
*/
|
|
191
|
+
company_id: string;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* The unique identifier of the payment to associate the shipment with.
|
|
195
|
+
*/
|
|
196
|
+
payment_id: string;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* The carrier tracking code for the shipment, such as a USPS, UPS, or FedEx
|
|
200
|
+
* tracking number.
|
|
201
|
+
*/
|
|
202
|
+
tracking_code: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
205
|
export declare namespace Shipments {
|
|
206
206
|
export {
|
|
207
207
|
type ShipmentListResponse as ShipmentListResponse,
|
|
208
208
|
type ShipmentListResponsesCursorPage as ShipmentListResponsesCursorPage,
|
|
209
|
-
type ShipmentCreateParams as ShipmentCreateParams,
|
|
210
209
|
type ShipmentListParams as ShipmentListParams,
|
|
210
|
+
type ShipmentCreateParams as ShipmentCreateParams,
|
|
211
211
|
};
|
|
212
212
|
}
|
|
@@ -12,23 +12,29 @@ import { path } from '../internal/utils/path';
|
|
|
12
12
|
*/
|
|
13
13
|
export class SupportChannels extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Returns a paginated list of support channels for a specific company, with
|
|
16
|
+
* optional filtering by resolution status and custom sorting.
|
|
17
17
|
*
|
|
18
18
|
* Required permissions:
|
|
19
19
|
*
|
|
20
|
-
* - `support_chat:
|
|
20
|
+
* - `support_chat:read`
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* }
|
|
24
|
+
* // Automatically fetches more pages as needed.
|
|
25
|
+
* for await (const supportChannelListResponse of client.supportChannels.list()) {
|
|
26
|
+
* // ...
|
|
27
|
+
* }
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
list(
|
|
31
|
+
query: SupportChannelListParams | null | undefined = {},
|
|
32
|
+
options?: RequestOptions,
|
|
33
|
+
): PagePromise<SupportChannelListResponsesCursorPage, SupportChannelListResponse> {
|
|
34
|
+
return this._client.getAPIList('/support_channels', CursorPage<SupportChannelListResponse>, {
|
|
35
|
+
query,
|
|
36
|
+
...options,
|
|
37
|
+
});
|
|
32
38
|
}
|
|
33
39
|
|
|
34
40
|
/**
|
|
@@ -49,31 +55,23 @@ export class SupportChannels extends APIResource {
|
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
58
|
+
* Open a new support channel between a company team member and a customer. Returns
|
|
59
|
+
* the existing channel if one already exists for that user.
|
|
54
60
|
*
|
|
55
61
|
* Required permissions:
|
|
56
62
|
*
|
|
57
|
-
* - `support_chat:
|
|
63
|
+
* - `support_chat:create`
|
|
58
64
|
*
|
|
59
65
|
* @example
|
|
60
66
|
* ```ts
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* )
|
|
65
|
-
* // ...
|
|
66
|
-
* }
|
|
67
|
+
* const supportChannel = await client.supportChannels.create({
|
|
68
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
69
|
+
* user_id: 'user_xxxxxxxxxxxxx',
|
|
70
|
+
* });
|
|
67
71
|
* ```
|
|
68
72
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
options?: RequestOptions,
|
|
72
|
-
): PagePromise<SupportChannelListResponsesCursorPage, SupportChannelListResponse> {
|
|
73
|
-
return this._client.getAPIList('/support_channels', CursorPage<SupportChannelListResponse>, {
|
|
74
|
-
query,
|
|
75
|
-
...options,
|
|
76
|
-
});
|
|
73
|
+
create(body: SupportChannelCreateParams, options?: RequestOptions): APIPromise<Shared.SupportChannel> {
|
|
74
|
+
return this._client.post('/support_channels', { body, ...options });
|
|
77
75
|
}
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -143,34 +141,18 @@ export namespace SupportChannelListResponse {
|
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
143
|
|
|
146
|
-
export interface SupportChannelCreateParams {
|
|
147
|
-
/**
|
|
148
|
-
* The unique identifier of the company to create the support channel in.
|
|
149
|
-
*/
|
|
150
|
-
company_id: string;
|
|
151
|
-
|
|
152
|
-
/**
|
|
153
|
-
* The user ID (e.g. 'user_xxxxx') or username of the customer to open a support
|
|
154
|
-
* channel for.
|
|
155
|
-
*/
|
|
156
|
-
user_id: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Optional custom display name for the support channel.
|
|
160
|
-
*/
|
|
161
|
-
custom_name?: string | null;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
144
|
export interface SupportChannelListParams extends CursorPageParams {
|
|
165
145
|
/**
|
|
166
|
-
*
|
|
146
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
167
147
|
*/
|
|
168
|
-
|
|
148
|
+
before?: string | null;
|
|
169
149
|
|
|
170
150
|
/**
|
|
171
|
-
*
|
|
151
|
+
* The unique identifier of the company to list support channels for. Includes
|
|
152
|
+
* channels of child companies. When omitted, returns support channels across all
|
|
153
|
+
* companies the user has access to.
|
|
172
154
|
*/
|
|
173
|
-
|
|
155
|
+
company_id?: string | null;
|
|
174
156
|
|
|
175
157
|
/**
|
|
176
158
|
* The direction of the sort.
|
|
@@ -197,13 +179,36 @@ export interface SupportChannelListParams extends CursorPageParams {
|
|
|
197
179
|
* Sort options for message channels
|
|
198
180
|
*/
|
|
199
181
|
order?: 'created_at' | 'last_post_sent_at' | null;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* The perspective to filter support channels by.
|
|
185
|
+
*/
|
|
186
|
+
view?: 'all' | 'admin' | 'customer' | null;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface SupportChannelCreateParams {
|
|
190
|
+
/**
|
|
191
|
+
* The unique identifier of the company to create the support channel in.
|
|
192
|
+
*/
|
|
193
|
+
company_id: string;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* The user ID (e.g. 'user_xxxxx') or username of the customer to open a support
|
|
197
|
+
* channel for.
|
|
198
|
+
*/
|
|
199
|
+
user_id: string;
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Optional custom display name for the support channel.
|
|
203
|
+
*/
|
|
204
|
+
custom_name?: string | null;
|
|
200
205
|
}
|
|
201
206
|
|
|
202
207
|
export declare namespace SupportChannels {
|
|
203
208
|
export {
|
|
204
209
|
type SupportChannelListResponse as SupportChannelListResponse,
|
|
205
210
|
type SupportChannelListResponsesCursorPage as SupportChannelListResponsesCursorPage,
|
|
206
|
-
type SupportChannelCreateParams as SupportChannelCreateParams,
|
|
207
211
|
type SupportChannelListParams as SupportChannelListParams,
|
|
212
|
+
type SupportChannelCreateParams as SupportChannelCreateParams,
|
|
208
213
|
};
|
|
209
214
|
}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Swaps extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Returns a stateless swap price preview. No funds move and nothing is persisted.
|
|
10
|
+
*/
|
|
11
|
+
createQuote(body: SwapCreateQuoteParams, options?: RequestOptions): APIPromise<SwapCreateQuoteResponse> {
|
|
12
|
+
return this._client.post('/swaps/quote', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface SwapCreateQuoteResponse {
|
|
17
|
+
amount_in: string;
|
|
18
|
+
|
|
19
|
+
amount_out: string;
|
|
20
|
+
|
|
21
|
+
cross_chain: boolean;
|
|
22
|
+
|
|
23
|
+
fee_bps: number;
|
|
24
|
+
|
|
25
|
+
from_token: { [key: string]: unknown };
|
|
26
|
+
|
|
27
|
+
metadata: { [key: string]: unknown };
|
|
28
|
+
|
|
29
|
+
object: 'swap_quote';
|
|
30
|
+
|
|
31
|
+
rate: string;
|
|
32
|
+
|
|
33
|
+
to_token: { [key: string]: unknown };
|
|
34
|
+
|
|
35
|
+
amount_out_min?: string;
|
|
36
|
+
|
|
37
|
+
bridge_fee?: string | null;
|
|
38
|
+
|
|
39
|
+
estimated_duration_seconds?: number | null;
|
|
40
|
+
|
|
41
|
+
from_address?: string | null;
|
|
42
|
+
|
|
43
|
+
requires_token_approval?: boolean | null;
|
|
44
|
+
|
|
45
|
+
to_address?: string | null;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface SwapCreateQuoteParams {
|
|
49
|
+
/**
|
|
50
|
+
* Input token amount.
|
|
51
|
+
*/
|
|
52
|
+
amount: string;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Source token contract address.
|
|
56
|
+
*/
|
|
57
|
+
from_token: string;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Destination token contract address.
|
|
61
|
+
*/
|
|
62
|
+
to_token: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Caller-owned account whose wallet address should be used.
|
|
66
|
+
*/
|
|
67
|
+
account_id?: string | null;
|
|
68
|
+
|
|
69
|
+
from_address?: string | null;
|
|
70
|
+
|
|
71
|
+
from_chain?: string | number | null;
|
|
72
|
+
|
|
73
|
+
metadata?: { [key: string]: unknown };
|
|
74
|
+
|
|
75
|
+
slippage_bps?: number | null;
|
|
76
|
+
|
|
77
|
+
to_address?: string | null;
|
|
78
|
+
|
|
79
|
+
to_chain?: string | number | null;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export declare namespace Swaps {
|
|
83
|
+
export {
|
|
84
|
+
type SwapCreateQuoteResponse as SwapCreateQuoteResponse,
|
|
85
|
+
type SwapCreateQuoteParams as SwapCreateQuoteParams,
|
|
86
|
+
};
|
|
87
|
+
}
|