@whop/sdk 0.0.27 → 0.0.29
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 +75 -0
- package/client.d.mts +9 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -6
- package/client.d.ts.map +1 -1
- package/client.js +10 -0
- package/client.js.map +1 -1
- package/client.mjs +10 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/access-tokens.d.mts +19 -20
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +19 -20
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +4 -4
- package/resources/access-tokens.mjs +4 -4
- package/resources/account-links.d.mts +15 -13
- package/resources/account-links.d.mts.map +1 -1
- package/resources/account-links.d.ts +15 -13
- package/resources/account-links.d.ts.map +1 -1
- package/resources/account-links.js +2 -3
- package/resources/account-links.js.map +1 -1
- package/resources/account-links.mjs +2 -3
- package/resources/account-links.mjs.map +1 -1
- package/resources/ai-chats.d.mts +38 -26
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +38 -26
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +5 -5
- package/resources/ai-chats.mjs +5 -5
- package/resources/app-builds.d.mts +35 -33
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +35 -33
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +7 -4
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +7 -4
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +81 -56
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +81 -56
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +7 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +7 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +32 -26
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +32 -26
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +3 -2
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +3 -2
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +27 -19
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +27 -19
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +5 -3
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +5 -3
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +55 -46
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +55 -46
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -2
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -2
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +71 -46
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +71 -46
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +7 -8
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +7 -8
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +80 -57
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +80 -57
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +6 -3
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +6 -3
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/course-chapters.d.mts +24 -19
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +24 -19
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +5 -5
- package/resources/course-chapters.mjs +5 -5
- package/resources/course-lesson-interactions.d.mts +7 -6
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +7 -6
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +3 -2
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +3 -2
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +126 -84
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +126 -84
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +12 -8
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +12 -8
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +38 -29
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +38 -29
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +3 -2
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +3 -2
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +132 -91
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +132 -91
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +9 -5
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +9 -5
- package/resources/courses.mjs.map +1 -1
- package/resources/dispute-alerts.d.mts +325 -0
- package/resources/dispute-alerts.d.mts.map +1 -0
- package/resources/dispute-alerts.d.ts +325 -0
- package/resources/dispute-alerts.d.ts.map +1 -0
- package/resources/dispute-alerts.js +42 -0
- package/resources/dispute-alerts.js.map +1 -0
- package/resources/dispute-alerts.mjs +38 -0
- package/resources/dispute-alerts.mjs.map +1 -0
- package/resources/disputes.d.mts +156 -102
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +156 -102
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +4 -2
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +4 -2
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +29 -16
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +29 -16
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +9 -5
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +9 -5
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +30 -21
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +30 -21
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +9 -5
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +9 -5
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +29 -21
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +29 -21
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -4
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -4
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +53 -49
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +53 -49
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +6 -9
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +6 -9
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +32 -21
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +32 -21
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +6 -3
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +6 -3
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +21 -17
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +21 -17
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -2
- package/resources/files.mjs.map +1 -1
- package/resources/forum-posts.d.mts +62 -43
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +62 -43
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +8 -4
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +8 -4
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +20 -12
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +20 -12
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +5 -3
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +5 -3
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +4 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +108 -80
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +108 -80
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +7 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +7 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +64 -42
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +64 -42
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +6 -4
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +6 -4
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +10 -8
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +10 -8
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +18 -19
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +18 -19
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +3 -2
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +3 -2
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +69 -51
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +69 -51
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +12 -8
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +12 -8
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +50 -32
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +50 -32
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +9 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +9 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +33 -25
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +33 -25
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +2 -1
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +2 -1
- package/resources/notifications.mjs.map +1 -1
- package/resources/payment-methods.d.mts +212 -114
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +212 -114
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +5 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +5 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +73 -40
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +73 -40
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -10
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -10
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +44 -29
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +44 -29
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +3 -2
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +3 -2
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +121 -90
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +121 -90
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +9 -5
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +9 -5
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +76 -65
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +76 -65
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +7 -5
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +7 -5
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +41 -31
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +41 -31
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +7 -4
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +7 -4
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +24 -18
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +24 -18
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +7 -4
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +7 -4
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +43 -29
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +43 -29
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -2
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -2
- package/resources/refunds.mjs.map +1 -1
- package/resources/reviews.d.mts +66 -50
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +66 -50
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +3 -2
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +3 -2
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +61 -43
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +61 -43
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +4 -10
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +4 -10
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +696 -389
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +696 -389
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +26 -17
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +26 -17
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +5 -3
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +5 -3
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +31 -19
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +31 -19
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +5 -4
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +5 -4
- package/resources/support-channels.mjs.map +1 -1
- package/resources/topups.d.mts +11 -9
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +11 -9
- package/resources/topups.d.ts.map +1 -1
- package/resources/topups.js +2 -1
- package/resources/topups.js.map +1 -1
- package/resources/topups.mjs +2 -1
- package/resources/topups.mjs.map +1 -1
- package/resources/transfers.d.mts +35 -29
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +35 -29
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +5 -3
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +5 -3
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +20 -16
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +20 -16
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +4 -3
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +4 -3
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +6 -4
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +6 -4
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +1 -1
- package/resources/verifications.mjs +1 -1
- package/resources/webhooks.d.mts +360 -98
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +360 -98
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +53 -44
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +53 -44
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +3 -2
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +3 -2
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +34 -3
- package/src/resources/access-tokens.ts +19 -20
- package/src/resources/account-links.ts +15 -13
- package/src/resources/ai-chats.ts +39 -26
- package/src/resources/app-builds.ts +35 -33
- package/src/resources/apps.ts +84 -56
- package/src/resources/authorized-users.ts +32 -26
- package/src/resources/chat-channels.ts +27 -19
- package/src/resources/checkout-configurations.ts +56 -46
- package/src/resources/companies.ts +75 -46
- package/src/resources/company-token-transactions.ts +81 -58
- package/src/resources/course-chapters.ts +24 -19
- package/src/resources/course-lesson-interactions.ts +7 -6
- package/src/resources/course-lessons.ts +126 -84
- package/src/resources/course-students.ts +38 -29
- package/src/resources/courses.ts +132 -91
- package/src/resources/dispute-alerts.ts +404 -0
- package/src/resources/disputes.ts +156 -102
- package/src/resources/dm-channels.ts +29 -16
- package/src/resources/dm-members.ts +30 -21
- package/src/resources/entries.ts +29 -21
- package/src/resources/experiences.ts +53 -49
- package/src/resources/fee-markups.ts +32 -21
- package/src/resources/files.ts +21 -17
- package/src/resources/forum-posts.ts +63 -43
- package/src/resources/forums.ts +20 -12
- package/src/resources/index.ts +11 -1
- package/src/resources/invoices.ts +112 -80
- package/src/resources/leads.ts +64 -42
- package/src/resources/ledger-accounts.ts +10 -8
- package/src/resources/members.ts +18 -19
- package/src/resources/memberships.ts +69 -51
- package/src/resources/messages.ts +51 -32
- package/src/resources/notifications.ts +33 -25
- package/src/resources/payment-methods.ts +212 -114
- package/src/resources/payments.ts +78 -39
- package/src/resources/payout-methods.ts +44 -29
- package/src/resources/plans.ts +121 -90
- package/src/resources/products.ts +219 -68
- package/src/resources/promo-codes.ts +41 -31
- package/src/resources/reactions.ts +24 -18
- package/src/resources/refunds.ts +45 -29
- package/src/resources/reviews.ts +66 -50
- package/src/resources/setup-intents.ts +61 -43
- package/src/resources/shared.ts +2649 -388
- package/src/resources/shipments.ts +26 -17
- package/src/resources/support-channels.ts +32 -19
- package/src/resources/topups.ts +11 -9
- package/src/resources/transfers.ts +35 -29
- package/src/resources/users.ts +20 -16
- package/src/resources/verifications.ts +6 -4
- package/src/resources/webhooks.ts +404 -95
- package/src/resources/withdrawals.ts +53 -43
- 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
|
@@ -23,7 +23,7 @@ export declare class Withdrawals extends APIResource {
|
|
|
23
23
|
*/
|
|
24
24
|
create(body: WithdrawalCreateParams, options?: RequestOptions): APIPromise<Withdrawal>;
|
|
25
25
|
/**
|
|
26
|
-
* Retrieves
|
|
26
|
+
* Retrieves the details of an existing withdrawal.
|
|
27
27
|
*
|
|
28
28
|
* Required permissions:
|
|
29
29
|
*
|
|
@@ -39,7 +39,8 @@ export declare class Withdrawals extends APIResource {
|
|
|
39
39
|
*/
|
|
40
40
|
retrieve(id: string, options?: RequestOptions): APIPromise<Withdrawal>;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Returns a paginated list of withdrawals for a company, with optional sorting and
|
|
43
|
+
* date filtering.
|
|
43
44
|
*
|
|
44
45
|
* Required permissions:
|
|
45
46
|
*
|
|
@@ -59,8 +60,8 @@ export declare class Withdrawals extends APIResource {
|
|
|
59
60
|
}
|
|
60
61
|
export type WithdrawalListResponsesCursorPage = CursorPage<WithdrawalListResponse>;
|
|
61
62
|
/**
|
|
62
|
-
* A withdrawal represents a request to transfer funds from a
|
|
63
|
-
*
|
|
63
|
+
* A withdrawal represents a request to transfer funds from a ledger account to an
|
|
64
|
+
* external payout method.
|
|
64
65
|
*/
|
|
65
66
|
export interface Withdrawal {
|
|
66
67
|
/**
|
|
@@ -68,8 +69,8 @@ export interface Withdrawal {
|
|
|
68
69
|
*/
|
|
69
70
|
id: string;
|
|
70
71
|
/**
|
|
71
|
-
* The withdrawal amount
|
|
72
|
-
* 100.00 for $100.00 USD.
|
|
72
|
+
* The withdrawal amount as a decimal number in the specified currency (e.g.,
|
|
73
|
+
* 100.00 for $100.00 USD).
|
|
73
74
|
*/
|
|
74
75
|
amount: number;
|
|
75
76
|
/**
|
|
@@ -77,24 +78,26 @@ export interface Withdrawal {
|
|
|
77
78
|
*/
|
|
78
79
|
created_at: string;
|
|
79
80
|
/**
|
|
80
|
-
* The currency
|
|
81
|
+
* The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur').
|
|
81
82
|
*/
|
|
82
83
|
currency: Shared.Currency;
|
|
83
84
|
/**
|
|
84
85
|
* The different error codes a payout can be in.
|
|
85
86
|
*/
|
|
86
|
-
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | null;
|
|
87
|
+
error_code: 'account_closed' | 'account_does_not_exist' | 'account_information_invalid' | 'account_number_invalid_region' | 'account_frozen' | 'account_lookup_failed' | 'account_not_found' | 'amount_out_of_bounds' | 'attributes_not_validated' | 'b2b_payments_prohibited' | 'bank_statement_required' | 'compliance_review' | 'currency_not_supported' | 'deposit_canceled' | 'deposit_failed' | 'deposit_rejected' | 'destination_unavailable' | 'exceeded_account_limit' | 'expired_quote' | 'generic_payout_error' | 'technical_problem' | 'identification_number_invalid' | 'invalid_account_number' | 'invalid_bank_code' | 'invalid_beneficiary' | 'invalid_mailing_address' | 'invalid_branch_number' | 'invalid_branch_code' | 'invalid_phone_number' | 'invalid_routing_number' | 'invalid_swift_code' | 'invalid_company_details' | 'manual_cancelation' | 'misc_error' | 'missing_city_and_country' | 'missing_phone_number' | 'missing_remittance_info' | 'payee_name_invalid' | 'receiving_account_locked' | 'rejected_by_compliance' | 'rtp_not_supported' | 'non_transaction_account' | 'source_token_insufficient_funds' | 'ssn_invalid' | 'wallet_screenshot_required' | 'unsupported_region' | 'payout_provider_timeout' | null;
|
|
87
88
|
/**
|
|
88
|
-
*
|
|
89
|
+
* A human-readable message describing why the payout failed. Null if no error
|
|
90
|
+
* occurred.
|
|
89
91
|
*/
|
|
90
92
|
error_message: string | null;
|
|
91
93
|
/**
|
|
92
|
-
* The estimated
|
|
94
|
+
* The estimated time at which the funds become available in the destination
|
|
95
|
+
* account. Null if no estimate is available. As a Unix timestamp.
|
|
93
96
|
*/
|
|
94
97
|
estimated_availability: string | null;
|
|
95
98
|
/**
|
|
96
|
-
* The fee
|
|
97
|
-
*
|
|
99
|
+
* The fee charged for processing this withdrawal, in the same currency as the
|
|
100
|
+
* withdrawal amount.
|
|
98
101
|
*/
|
|
99
102
|
fee_amount: number;
|
|
100
103
|
/**
|
|
@@ -102,36 +105,37 @@ export interface Withdrawal {
|
|
|
102
105
|
*/
|
|
103
106
|
fee_type: WithdrawalFeeTypes | null;
|
|
104
107
|
/**
|
|
105
|
-
* The ledger account
|
|
108
|
+
* The ledger account from which the withdrawal funds are sourced.
|
|
106
109
|
*/
|
|
107
110
|
ledger_account: Withdrawal.LedgerAccount;
|
|
108
111
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* Rails.
|
|
112
|
+
* An additional markup fee charged for the withdrawal, in the same currency as the
|
|
113
|
+
* withdrawal amount. Only applies to platform accounts using Whop Rails.
|
|
112
114
|
*/
|
|
113
115
|
markup_fee: number;
|
|
114
116
|
/**
|
|
115
|
-
* The payout
|
|
117
|
+
* The saved payout destination used for this withdrawal (e.g., a bank account or
|
|
118
|
+
* PayPal address). Null if no payout token was used.
|
|
116
119
|
*/
|
|
117
120
|
payout_token: Withdrawal.PayoutToken | null;
|
|
118
121
|
/**
|
|
119
|
-
* The speed
|
|
122
|
+
* The processing speed selected for this withdrawal ('standard' or 'instant').
|
|
120
123
|
*/
|
|
121
124
|
speed: WithdrawalSpeeds;
|
|
122
125
|
/**
|
|
123
|
-
*
|
|
126
|
+
* The computed lifecycle status of the withdrawal, accounting for the state of
|
|
127
|
+
* associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed').
|
|
124
128
|
*/
|
|
125
129
|
status: WithdrawalStatus;
|
|
126
130
|
/**
|
|
127
|
-
* The trace
|
|
128
|
-
* available.
|
|
131
|
+
* The ACH trace number for tracking the payout through the banking network. Null
|
|
132
|
+
* if not available or not an ACH transaction.
|
|
129
133
|
*/
|
|
130
134
|
trace_code: string | null;
|
|
131
135
|
}
|
|
132
136
|
export declare namespace Withdrawal {
|
|
133
137
|
/**
|
|
134
|
-
* The ledger account
|
|
138
|
+
* The ledger account from which the withdrawal funds are sourced.
|
|
135
139
|
*/
|
|
136
140
|
interface LedgerAccount {
|
|
137
141
|
/**
|
|
@@ -139,12 +143,17 @@ export declare namespace Withdrawal {
|
|
|
139
143
|
*/
|
|
140
144
|
id: string;
|
|
141
145
|
/**
|
|
142
|
-
*
|
|
146
|
+
* Represents a unique identifier that is Base64 obfuscated. It is often used to
|
|
147
|
+
* refetch an object or as key for a cache. The ID type appears in a JSON response
|
|
148
|
+
* as a String; however, it is not intended to be human-readable. When expected as
|
|
149
|
+
* an input type, any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
|
|
150
|
+
* input value will be accepted as an ID.
|
|
143
151
|
*/
|
|
144
152
|
company_id: string | null;
|
|
145
153
|
}
|
|
146
154
|
/**
|
|
147
|
-
* The payout
|
|
155
|
+
* The saved payout destination used for this withdrawal (e.g., a bank account or
|
|
156
|
+
* PayPal address). Null if no payout token was used.
|
|
148
157
|
*/
|
|
149
158
|
interface PayoutToken {
|
|
150
159
|
/**
|
|
@@ -156,17 +165,17 @@ export declare namespace Withdrawal {
|
|
|
156
165
|
*/
|
|
157
166
|
created_at: string;
|
|
158
167
|
/**
|
|
159
|
-
* The currency code
|
|
160
|
-
*
|
|
168
|
+
* The three-letter ISO currency code that payouts are delivered in for this
|
|
169
|
+
* destination.
|
|
161
170
|
*/
|
|
162
171
|
destination_currency_code: string;
|
|
163
172
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
173
|
+
* A user-defined label to help identify this payout destination. Not sent to the
|
|
174
|
+
* provider. Null if no nickname has been set.
|
|
166
175
|
*/
|
|
167
176
|
nickname: string | null;
|
|
168
177
|
/**
|
|
169
|
-
* The name of the
|
|
178
|
+
* The legal name of the account holder receiving payouts. Null if not provided.
|
|
170
179
|
*/
|
|
171
180
|
payer_name: string | null;
|
|
172
181
|
}
|
|
@@ -184,8 +193,8 @@ export type WithdrawalSpeeds = 'standard' | 'instant';
|
|
|
184
193
|
*/
|
|
185
194
|
export type WithdrawalStatus = 'requested' | 'awaiting_payment' | 'in_transit' | 'completed' | 'failed' | 'canceled' | 'denied';
|
|
186
195
|
/**
|
|
187
|
-
* A withdrawal represents a request to transfer funds from a
|
|
188
|
-
*
|
|
196
|
+
* A withdrawal represents a request to transfer funds from a ledger account to an
|
|
197
|
+
* external payout method.
|
|
189
198
|
*/
|
|
190
199
|
export interface WithdrawalListResponse {
|
|
191
200
|
/**
|
|
@@ -193,8 +202,8 @@ export interface WithdrawalListResponse {
|
|
|
193
202
|
*/
|
|
194
203
|
id: string;
|
|
195
204
|
/**
|
|
196
|
-
* The withdrawal amount
|
|
197
|
-
* 100.00 for $100.00 USD.
|
|
205
|
+
* The withdrawal amount as a decimal number in the specified currency (e.g.,
|
|
206
|
+
* 100.00 for $100.00 USD).
|
|
198
207
|
*/
|
|
199
208
|
amount: number;
|
|
200
209
|
/**
|
|
@@ -202,12 +211,12 @@ export interface WithdrawalListResponse {
|
|
|
202
211
|
*/
|
|
203
212
|
created_at: string;
|
|
204
213
|
/**
|
|
205
|
-
* The currency
|
|
214
|
+
* The three-letter ISO currency code for this withdrawal (e.g., 'usd', 'eur').
|
|
206
215
|
*/
|
|
207
216
|
currency: Shared.Currency;
|
|
208
217
|
/**
|
|
209
|
-
* The fee
|
|
210
|
-
*
|
|
218
|
+
* The fee charged for processing this withdrawal, in the same currency as the
|
|
219
|
+
* withdrawal amount.
|
|
211
220
|
*/
|
|
212
221
|
fee_amount: number;
|
|
213
222
|
/**
|
|
@@ -215,17 +224,17 @@ export interface WithdrawalListResponse {
|
|
|
215
224
|
*/
|
|
216
225
|
fee_type: WithdrawalFeeTypes | null;
|
|
217
226
|
/**
|
|
218
|
-
*
|
|
219
|
-
*
|
|
220
|
-
* Rails.
|
|
227
|
+
* An additional markup fee charged for the withdrawal, in the same currency as the
|
|
228
|
+
* withdrawal amount. Only applies to platform accounts using Whop Rails.
|
|
221
229
|
*/
|
|
222
230
|
markup_fee: number;
|
|
223
231
|
/**
|
|
224
|
-
* The speed
|
|
232
|
+
* The processing speed selected for this withdrawal ('standard' or 'instant').
|
|
225
233
|
*/
|
|
226
234
|
speed: WithdrawalSpeeds;
|
|
227
235
|
/**
|
|
228
|
-
*
|
|
236
|
+
* The computed lifecycle status of the withdrawal, accounting for the state of
|
|
237
|
+
* associated payouts (e.g., 'requested', 'in_transit', 'completed', 'failed').
|
|
229
238
|
*/
|
|
230
239
|
status: WithdrawalStatus;
|
|
231
240
|
}
|
|
@@ -258,7 +267,7 @@ export interface WithdrawalCreateParams {
|
|
|
258
267
|
}
|
|
259
268
|
export interface WithdrawalListParams extends CursorPageParams {
|
|
260
269
|
/**
|
|
261
|
-
* The
|
|
270
|
+
* The unique identifier of the company to list withdrawals for.
|
|
262
271
|
*/
|
|
263
272
|
company_id: string;
|
|
264
273
|
/**
|
|
@@ -266,11 +275,11 @@ export interface WithdrawalListParams extends CursorPageParams {
|
|
|
266
275
|
*/
|
|
267
276
|
before?: string | null;
|
|
268
277
|
/**
|
|
269
|
-
*
|
|
278
|
+
* Only return withdrawals created after this timestamp.
|
|
270
279
|
*/
|
|
271
280
|
created_after?: string | null;
|
|
272
281
|
/**
|
|
273
|
-
*
|
|
282
|
+
* Only return withdrawals created before this timestamp.
|
|
274
283
|
*/
|
|
275
284
|
created_before?: string | null;
|
|
276
285
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.d.ts","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,UAAU,CAAC;IAItF;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,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E,OAAO,GAAG,IAAI,CAAC;IAEtC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/withdrawals.js
CHANGED
|
@@ -27,7 +27,7 @@ class Withdrawals extends resource_1.APIResource {
|
|
|
27
27
|
return this._client.post('/withdrawals', { body, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Retrieves
|
|
30
|
+
* Retrieves the details of an existing withdrawal.
|
|
31
31
|
*
|
|
32
32
|
* Required permissions:
|
|
33
33
|
*
|
|
@@ -45,7 +45,8 @@ class Withdrawals extends resource_1.APIResource {
|
|
|
45
45
|
return this._client.get((0, path_1.path) `/withdrawals/${id}`, options);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Returns a paginated list of withdrawals for a company, with optional sorting and
|
|
49
|
+
* date filtering.
|
|
49
50
|
*
|
|
50
51
|
* Required permissions:
|
|
51
52
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"withdrawals.js","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAG/C,sDAAoF;AAEpF,oDAA8C;AAE9C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,uBAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF;AAjED,kCAiEC"}
|
|
@@ -24,7 +24,7 @@ export class Withdrawals extends APIResource {
|
|
|
24
24
|
return this._client.post('/withdrawals', { body, ...options });
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* Retrieves
|
|
27
|
+
* Retrieves the details of an existing withdrawal.
|
|
28
28
|
*
|
|
29
29
|
* Required permissions:
|
|
30
30
|
*
|
|
@@ -42,7 +42,8 @@ export class Withdrawals extends APIResource {
|
|
|
42
42
|
return this._client.get(path `/withdrawals/${id}`, options);
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* Returns a paginated list of withdrawals for a company, with optional sorting and
|
|
46
|
+
* date filtering.
|
|
46
47
|
*
|
|
47
48
|
* Required permissions:
|
|
48
49
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withdrawals.mjs","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"withdrawals.mjs","sourceRoot":"","sources":["../src/resources/withdrawals.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,IAA4B,EAAE,OAAwB;QAC3D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,gBAAgB,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC7D,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CACF,KAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,CAAA,UAAkC,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5G,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -78,12 +78,12 @@ import {
|
|
|
78
78
|
CompanyUpdateParams,
|
|
79
79
|
} from './resources/companies';
|
|
80
80
|
import {
|
|
81
|
-
BotTokenTransactionTypes,
|
|
82
81
|
CompanyTokenTransaction,
|
|
83
82
|
CompanyTokenTransactionCreateParams,
|
|
84
83
|
CompanyTokenTransactionListParams,
|
|
85
84
|
CompanyTokenTransactionListResponse,
|
|
86
85
|
CompanyTokenTransactionListResponsesCursorPage,
|
|
86
|
+
CompanyTokenTransactionType,
|
|
87
87
|
CompanyTokenTransactions,
|
|
88
88
|
} from './resources/company-token-transactions';
|
|
89
89
|
import {
|
|
@@ -137,6 +137,14 @@ import {
|
|
|
137
137
|
Courses,
|
|
138
138
|
Languages,
|
|
139
139
|
} from './resources/courses';
|
|
140
|
+
import {
|
|
141
|
+
DisputeAlertListParams,
|
|
142
|
+
DisputeAlertListResponse,
|
|
143
|
+
DisputeAlertListResponsesCursorPage,
|
|
144
|
+
DisputeAlertRetrieveResponse,
|
|
145
|
+
DisputeAlertType,
|
|
146
|
+
DisputeAlerts,
|
|
147
|
+
} from './resources/dispute-alerts';
|
|
140
148
|
import {
|
|
141
149
|
Dispute,
|
|
142
150
|
DisputeListParams,
|
|
@@ -302,6 +310,7 @@ import {
|
|
|
302
310
|
Plans,
|
|
303
311
|
} from './resources/plans';
|
|
304
312
|
import {
|
|
313
|
+
IndustryGroups,
|
|
305
314
|
ProductCreateParams,
|
|
306
315
|
ProductDeleteResponse,
|
|
307
316
|
ProductListParams,
|
|
@@ -393,6 +402,7 @@ import {
|
|
|
393
402
|
import {
|
|
394
403
|
APIVersion,
|
|
395
404
|
CourseLessonInteractionCompletedWebhookEvent,
|
|
405
|
+
DisputeAlertCreatedWebhookEvent,
|
|
396
406
|
DisputeCreatedWebhookEvent,
|
|
397
407
|
DisputeUpdatedWebhookEvent,
|
|
398
408
|
EntryApprovedWebhookEvent,
|
|
@@ -879,7 +889,7 @@ export class Whop {
|
|
|
879
889
|
loggerFor(this).info(`${responseInfo} - ${retryMessage}`);
|
|
880
890
|
|
|
881
891
|
const errText = await response.text().catch((err: any) => castToError(err).message);
|
|
882
|
-
const errJSON = safeJSON(errText);
|
|
892
|
+
const errJSON = safeJSON(errText) as any;
|
|
883
893
|
const errMessage = errJSON ? undefined : errText;
|
|
884
894
|
|
|
885
895
|
loggerFor(this).debug(
|
|
@@ -1153,6 +1163,14 @@ export class Whop {
|
|
|
1153
1163
|
(Symbol.iterator in body && 'next' in body && typeof body.next === 'function'))
|
|
1154
1164
|
) {
|
|
1155
1165
|
return { bodyHeaders: undefined, body: Shims.ReadableStreamFrom(body as AsyncIterable<Uint8Array>) };
|
|
1166
|
+
} else if (
|
|
1167
|
+
typeof body === 'object' &&
|
|
1168
|
+
headers.values.get('content-type') === 'application/x-www-form-urlencoded'
|
|
1169
|
+
) {
|
|
1170
|
+
return {
|
|
1171
|
+
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
1172
|
+
body: this.stringifyQuery(body as Record<string, unknown>),
|
|
1173
|
+
};
|
|
1156
1174
|
} else {
|
|
1157
1175
|
return this.#encoder({ body, headers });
|
|
1158
1176
|
}
|
|
@@ -1228,6 +1246,7 @@ export class Whop {
|
|
|
1228
1246
|
dmMembers: API.DmMembers = new API.DmMembers(this);
|
|
1229
1247
|
aiChats: API.AIChats = new API.AIChats(this);
|
|
1230
1248
|
dmChannels: API.DmChannels = new API.DmChannels(this);
|
|
1249
|
+
disputeAlerts: API.DisputeAlerts = new API.DisputeAlerts(this);
|
|
1231
1250
|
}
|
|
1232
1251
|
|
|
1233
1252
|
Whop.Apps = Apps;
|
|
@@ -1279,6 +1298,7 @@ Whop.CompanyTokenTransactions = CompanyTokenTransactions;
|
|
|
1279
1298
|
Whop.DmMembers = DmMembers;
|
|
1280
1299
|
Whop.AIChats = AIChats;
|
|
1281
1300
|
Whop.DmChannels = DmChannels;
|
|
1301
|
+
Whop.DisputeAlerts = DisputeAlerts;
|
|
1282
1302
|
|
|
1283
1303
|
export declare namespace Whop {
|
|
1284
1304
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1310,6 +1330,7 @@ export declare namespace Whop {
|
|
|
1310
1330
|
|
|
1311
1331
|
export {
|
|
1312
1332
|
Products as Products,
|
|
1333
|
+
type IndustryGroups as IndustryGroups,
|
|
1313
1334
|
type ProductDeleteResponse as ProductDeleteResponse,
|
|
1314
1335
|
type ProductCreateParams as ProductCreateParams,
|
|
1315
1336
|
type ProductUpdateParams as ProductUpdateParams,
|
|
@@ -1359,6 +1380,7 @@ export declare namespace Whop {
|
|
|
1359
1380
|
type DisputeUpdatedWebhookEvent as DisputeUpdatedWebhookEvent,
|
|
1360
1381
|
type RefundCreatedWebhookEvent as RefundCreatedWebhookEvent,
|
|
1361
1382
|
type RefundUpdatedWebhookEvent as RefundUpdatedWebhookEvent,
|
|
1383
|
+
type DisputeAlertCreatedWebhookEvent as DisputeAlertCreatedWebhookEvent,
|
|
1362
1384
|
type MembershipCancelAtPeriodEndChangedWebhookEvent as MembershipCancelAtPeriodEndChangedWebhookEvent,
|
|
1363
1385
|
type UnwrapWebhookEvent as UnwrapWebhookEvent,
|
|
1364
1386
|
type WebhookListResponsesCursorPage as WebhookListResponsesCursorPage,
|
|
@@ -1735,8 +1757,8 @@ export declare namespace Whop {
|
|
|
1735
1757
|
|
|
1736
1758
|
export {
|
|
1737
1759
|
CompanyTokenTransactions as CompanyTokenTransactions,
|
|
1738
|
-
type BotTokenTransactionTypes as BotTokenTransactionTypes,
|
|
1739
1760
|
type CompanyTokenTransaction as CompanyTokenTransaction,
|
|
1761
|
+
type CompanyTokenTransactionType as CompanyTokenTransactionType,
|
|
1740
1762
|
type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
|
|
1741
1763
|
type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
|
|
1742
1764
|
type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
|
|
@@ -1778,6 +1800,15 @@ export declare namespace Whop {
|
|
|
1778
1800
|
type DmChannelListParams as DmChannelListParams,
|
|
1779
1801
|
};
|
|
1780
1802
|
|
|
1803
|
+
export {
|
|
1804
|
+
DisputeAlerts as DisputeAlerts,
|
|
1805
|
+
type DisputeAlertType as DisputeAlertType,
|
|
1806
|
+
type DisputeAlertRetrieveResponse as DisputeAlertRetrieveResponse,
|
|
1807
|
+
type DisputeAlertListResponse as DisputeAlertListResponse,
|
|
1808
|
+
type DisputeAlertListResponsesCursorPage as DisputeAlertListResponsesCursorPage,
|
|
1809
|
+
type DisputeAlertListParams as DisputeAlertListParams,
|
|
1810
|
+
};
|
|
1811
|
+
|
|
1781
1812
|
export type AccessLevel = API.AccessLevel;
|
|
1782
1813
|
export type AccessPassType = API.AccessPassType;
|
|
1783
1814
|
export type App = API.App;
|
|
@@ -6,10 +6,10 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class AccessTokens extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a short-lived access token
|
|
10
|
-
* key authentication, provide company_id or user_id. When using OAuth
|
|
11
|
-
*
|
|
12
|
-
*
|
|
9
|
+
* Create a short-lived access token for authenticating API requests. When using
|
|
10
|
+
* API key authentication, provide company_id or user_id. When using OAuth, the
|
|
11
|
+
* user is derived from the token. Use this token with Whop's web and mobile
|
|
12
|
+
* embedded components.
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
@@ -25,47 +25,46 @@ export class AccessTokens extends APIResource {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* A short-lived access token used to authenticate API requests on behalf of a
|
|
29
|
+
* user.
|
|
29
30
|
*/
|
|
30
31
|
export interface AccessTokenCreateResponse {
|
|
31
32
|
/**
|
|
32
|
-
* The JWT access token string
|
|
33
|
+
* The signed JWT access token string to include in API request Authorization
|
|
34
|
+
* headers.
|
|
33
35
|
*/
|
|
34
36
|
token: string;
|
|
35
37
|
|
|
36
38
|
/**
|
|
37
|
-
* The
|
|
39
|
+
* The timestamp after which this access token is no longer valid and must be
|
|
40
|
+
* refreshed.
|
|
38
41
|
*/
|
|
39
42
|
expires_at: string;
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
export interface AccessTokenCreateParams {
|
|
43
46
|
/**
|
|
44
|
-
* The
|
|
45
|
-
*
|
|
46
|
-
* belongs to or a sub-merchant of it
|
|
47
|
+
* The unique identifier of the company to generate the token for, starting with
|
|
48
|
+
* 'biz\_'. The API key must have permission to access this company.
|
|
47
49
|
*/
|
|
48
50
|
company_id?: string | null;
|
|
49
51
|
|
|
50
52
|
/**
|
|
51
|
-
* The expiration timestamp for the access token.
|
|
52
|
-
*
|
|
53
|
-
* of 3 hours from the current time.
|
|
53
|
+
* The expiration timestamp for the access token. Defaults to 1 hour from now, with
|
|
54
|
+
* a maximum of 3 hours.
|
|
54
55
|
*/
|
|
55
56
|
expires_at?: string | null;
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* must be a subset of the credential's existing permissions. Otherwise, an error
|
|
62
|
-
* will be raised.
|
|
59
|
+
* An array of permission scopes to grant to the access token. If empty or omitted,
|
|
60
|
+
* all permissions from the authenticating credential are inherited. Must be a
|
|
61
|
+
* subset of the credential's permissions.
|
|
63
62
|
*/
|
|
64
63
|
scoped_actions?: Array<string> | null;
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* The
|
|
68
|
-
* to access this
|
|
66
|
+
* The unique identifier of the user to generate the token for, starting with
|
|
67
|
+
* 'user\_'. The API key must have permission to access this user.
|
|
69
68
|
*/
|
|
70
69
|
user_id?: string | null;
|
|
71
70
|
}
|
|
@@ -6,9 +6,8 @@ import { RequestOptions } from '../internal/request-options';
|
|
|
6
6
|
|
|
7
7
|
export class AccountLinks extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* the hosted KYC onboarding flow.
|
|
9
|
+
* Generate a URL that directs a sub-merchant to their account portal, such as the
|
|
10
|
+
* hosted payouts dashboard or the KYC onboarding flow.
|
|
12
11
|
*
|
|
13
12
|
* @example
|
|
14
13
|
* ```ts
|
|
@@ -26,41 +25,44 @@ export class AccountLinks extends APIResource {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
28
|
+
* A temporary, time-limited URL that grants a user access to an external account
|
|
29
|
+
* management page.
|
|
31
30
|
*/
|
|
32
31
|
export interface AccountLinkCreateResponse {
|
|
33
32
|
/**
|
|
34
|
-
* The
|
|
33
|
+
* The timestamp after which this account link URL is no longer valid.
|
|
35
34
|
*/
|
|
36
35
|
expires_at: string;
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
|
-
* The URL to
|
|
38
|
+
* The temporary URL to redirect the user to for account access. Expires at the
|
|
39
|
+
* time specified by expires_at.
|
|
40
40
|
*/
|
|
41
41
|
url: string;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export interface AccountLinkCreateParams {
|
|
45
45
|
/**
|
|
46
|
-
* The
|
|
47
|
-
* sub-merchant of the API key's company.
|
|
46
|
+
* The unique identifier of the company to generate the link for, starting with
|
|
47
|
+
* 'biz\_'. Must be a sub-merchant of the API key's company.
|
|
48
48
|
*/
|
|
49
49
|
company_id: string;
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* The URL to redirect to if the session expires and needs to be
|
|
53
|
-
*
|
|
52
|
+
* The URL to redirect the user to if the session expires and needs to be
|
|
53
|
+
* re-authenticated, such as 'https://example.com/refresh'.
|
|
54
54
|
*/
|
|
55
55
|
refresh_url: string;
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
* The URL to redirect to when
|
|
58
|
+
* The URL to redirect the user to when they want to return to your site, such as
|
|
59
|
+
* 'https://example.com/return'.
|
|
59
60
|
*/
|
|
60
61
|
return_url: string;
|
|
61
62
|
|
|
62
63
|
/**
|
|
63
|
-
* The
|
|
64
|
+
* The purpose of the account link, such as hosted payouts portal or hosted KYC
|
|
65
|
+
* onboarding.
|
|
64
66
|
*/
|
|
65
67
|
use_case: 'account_onboarding' | 'payouts_portal';
|
|
66
68
|
}
|