@whop/sdk 0.0.30 → 0.0.32
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 +57 -105
- package/client.d.mts +165 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +165 -9
- package/client.d.ts.map +1 -1
- package/client.js +164 -7
- package/client.js.map +1 -1
- package/client.mjs +164 -7
- package/client.mjs.map +1 -1
- package/internal/tslib.js +22 -22
- package/internal/utils/query.d.mts +2 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +2 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +10 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +6 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/access-tokens.d.mts +3 -0
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +3 -0
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +3 -0
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +3 -0
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/account-links.d.mts +3 -0
- package/resources/account-links.d.mts.map +1 -1
- package/resources/account-links.d.ts +3 -0
- package/resources/account-links.d.ts.map +1 -1
- package/resources/account-links.js +3 -0
- package/resources/account-links.js.map +1 -1
- package/resources/account-links.mjs +3 -0
- package/resources/account-links.mjs.map +1 -1
- package/resources/ai-chats.d.mts +12 -0
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +12 -0
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +3 -0
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +3 -0
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +3 -0
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +3 -0
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +3 -0
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +3 -0
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +3 -0
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +3 -0
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +3 -0
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +3 -0
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +88 -6
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +88 -6
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +57 -0
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +57 -0
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +3 -0
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +3 -0
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +3 -0
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +3 -0
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +3 -0
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +3 -0
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -0
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -0
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +54 -1
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +54 -1
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +3 -0
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +3 -0
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +3 -0
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +3 -0
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +3 -0
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +3 -0
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/course-chapters.d.mts +3 -0
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +3 -0
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +3 -0
- package/resources/course-chapters.js.map +1 -1
- package/resources/course-chapters.mjs +3 -0
- package/resources/course-chapters.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +3 -0
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +3 -0
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +3 -0
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +3 -0
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +3 -0
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +3 -0
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +3 -0
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +3 -0
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +3 -0
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +3 -0
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +3 -0
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +3 -0
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +3 -0
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +3 -0
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +3 -0
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +3 -0
- package/resources/courses.mjs.map +1 -1
- package/resources/dispute-alerts.d.mts +3 -0
- package/resources/dispute-alerts.d.mts.map +1 -1
- package/resources/dispute-alerts.d.ts +3 -0
- package/resources/dispute-alerts.d.ts.map +1 -1
- package/resources/dispute-alerts.js +3 -0
- package/resources/dispute-alerts.js.map +1 -1
- package/resources/dispute-alerts.mjs +3 -0
- package/resources/dispute-alerts.mjs.map +1 -1
- package/resources/disputes.d.mts +3 -0
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +3 -0
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +3 -0
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +3 -0
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +3 -0
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +3 -0
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +3 -0
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +3 -0
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +3 -0
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +3 -0
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +3 -0
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +3 -0
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +3 -0
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +3 -0
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +3 -0
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +3 -0
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +3 -0
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +3 -0
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +3 -0
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +3 -0
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +3 -0
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +3 -0
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +3 -0
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +3 -0
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +3 -0
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +3 -0
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -0
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -0
- package/resources/files.mjs.map +1 -1
- package/resources/forum-posts.d.mts +38 -0
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +38 -0
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +3 -0
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +3 -0
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +20 -0
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +20 -0
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +3 -0
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +3 -0
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +5 -4
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -4
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -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 +141 -8
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +141 -8
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +4 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +4 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +3 -0
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +3 -0
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +3 -0
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +3 -0
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +3 -0
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +3 -0
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +3 -0
- package/resources/ledger-accounts.js.map +1 -1
- package/resources/ledger-accounts.mjs +3 -0
- package/resources/ledger-accounts.mjs.map +1 -1
- package/resources/members.d.mts +3 -0
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +3 -0
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +3 -0
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +3 -0
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +81 -2
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +81 -2
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +75 -1
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +75 -1
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +12 -0
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +12 -0
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +3 -0
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +3 -0
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +3 -0
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +3 -0
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +3 -0
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +3 -0
- package/resources/notifications.mjs.map +1 -1
- package/resources/payment-methods.d.mts +3 -0
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +3 -0
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +3 -0
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +3 -0
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +19 -2
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +19 -2
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +3 -0
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +3 -0
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +3 -0
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +3 -0
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +3 -0
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +3 -0
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +3 -0
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +3 -0
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +3 -0
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +3 -0
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +13 -0
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +13 -0
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +3 -0
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +3 -0
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +3 -0
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +3 -0
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +3 -0
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +3 -0
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +3 -0
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +3 -0
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +3 -0
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +3 -0
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +17 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +17 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -0
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -0
- package/resources/refunds.mjs.map +1 -1
- package/resources/resolution-center-cases.d.mts +367 -0
- package/resources/resolution-center-cases.d.mts.map +1 -0
- package/resources/resolution-center-cases.d.ts +367 -0
- package/resources/resolution-center-cases.d.ts.map +1 -0
- package/resources/resolution-center-cases.js +38 -0
- package/resources/resolution-center-cases.js.map +1 -0
- package/resources/resolution-center-cases.mjs +34 -0
- package/resources/resolution-center-cases.mjs.map +1 -0
- package/resources/reviews.d.mts +3 -0
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +3 -0
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +3 -0
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +3 -0
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +3 -0
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +3 -0
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +3 -0
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +3 -0
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +63 -9
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +63 -9
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +3 -0
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +3 -0
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +3 -0
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +3 -0
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +3 -0
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +3 -0
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +3 -0
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +3 -0
- package/resources/support-channels.mjs.map +1 -1
- package/resources/topups.d.mts +3 -0
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +3 -0
- package/resources/topups.d.ts.map +1 -1
- package/resources/topups.js +3 -0
- package/resources/topups.js.map +1 -1
- package/resources/topups.mjs +3 -0
- package/resources/topups.mjs.map +1 -1
- package/resources/transfers.d.mts +3 -0
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +3 -0
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +3 -0
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +3 -0
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +3 -0
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +3 -0
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +3 -0
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +3 -0
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +3 -0
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +3 -0
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +3 -0
- package/resources/verifications.js.map +1 -1
- package/resources/verifications.mjs +3 -0
- package/resources/verifications.mjs.map +1 -1
- package/resources/webhooks.d.mts +29 -0
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +29 -0
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -0
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -0
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +3 -0
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +3 -0
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +3 -0
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +3 -0
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +205 -12
- package/src/internal/utils/query.ts +7 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/access-tokens.ts +3 -0
- package/src/resources/account-links.ts +3 -0
- package/src/resources/ai-chats.ts +14 -0
- package/src/resources/app-builds.ts +3 -0
- package/src/resources/apps.ts +3 -0
- package/src/resources/authorized-users.ts +108 -6
- package/src/resources/chat-channels.ts +3 -0
- package/src/resources/checkout-configurations.ts +3 -0
- package/src/resources/companies.ts +72 -0
- package/src/resources/company-token-transactions.ts +3 -0
- package/src/resources/course-chapters.ts +3 -0
- package/src/resources/course-lesson-interactions.ts +3 -0
- package/src/resources/course-lessons.ts +3 -0
- package/src/resources/course-students.ts +3 -0
- package/src/resources/courses.ts +3 -0
- package/src/resources/dispute-alerts.ts +3 -0
- package/src/resources/disputes.ts +3 -0
- package/src/resources/dm-channels.ts +3 -0
- package/src/resources/dm-members.ts +3 -0
- package/src/resources/entries.ts +3 -0
- package/src/resources/experiences.ts +3 -0
- package/src/resources/fee-markups.ts +3 -0
- package/src/resources/files.ts +3 -0
- package/src/resources/forum-posts.ts +44 -0
- package/src/resources/forums.ts +22 -0
- package/src/resources/index.ts +19 -1
- package/src/resources/invoices.ts +162 -9
- package/src/resources/leads.ts +3 -0
- package/src/resources/ledger-accounts.ts +3 -0
- package/src/resources/members.ts +3 -0
- package/src/resources/memberships.ts +89 -1
- package/src/resources/messages.ts +14 -0
- package/src/resources/notifications.ts +3 -0
- package/src/resources/payment-methods.ts +3 -0
- package/src/resources/payments.ts +22 -0
- package/src/resources/payout-methods.ts +3 -0
- package/src/resources/plans.ts +3 -0
- package/src/resources/products.ts +15 -0
- package/src/resources/promo-codes.ts +3 -0
- package/src/resources/reactions.ts +3 -0
- package/src/resources/refunds.ts +21 -1
- package/src/resources/resolution-center-cases.ts +492 -0
- package/src/resources/reviews.ts +3 -0
- package/src/resources/setup-intents.ts +3 -0
- package/src/resources/shared.ts +74 -33
- package/src/resources/shipments.ts +3 -0
- package/src/resources/support-channels.ts +3 -0
- package/src/resources/topups.ts +3 -0
- package/src/resources/transfers.ts +3 -0
- package/src/resources/users.ts +3 -0
- package/src/resources/verifications.ts +3 -0
- package/src/resources/webhooks.ts +35 -0
- package/src/resources/withdrawals.ts +3 -0
- 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/client.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { APIResponseProps } from './internal/parse';
|
|
|
11
11
|
import { getPlatformHeaders } from './internal/detect-platform';
|
|
12
12
|
import * as Shims from './internal/shims';
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
|
-
import
|
|
14
|
+
import { stringifyQuery } from './internal/utils/query';
|
|
15
15
|
import { VERSION } from './version';
|
|
16
16
|
import * as Errors from './core/error';
|
|
17
17
|
import * as Pagination from './core/pagination';
|
|
@@ -48,10 +48,13 @@ import {
|
|
|
48
48
|
Apps,
|
|
49
49
|
} from './resources/apps';
|
|
50
50
|
import {
|
|
51
|
+
AuthorizedUser,
|
|
52
|
+
AuthorizedUserCreateParams,
|
|
53
|
+
AuthorizedUserDeleteParams,
|
|
54
|
+
AuthorizedUserDeleteResponse,
|
|
51
55
|
AuthorizedUserListParams,
|
|
52
56
|
AuthorizedUserListResponse,
|
|
53
57
|
AuthorizedUserListResponsesCursorPage,
|
|
54
|
-
AuthorizedUserRetrieveResponse,
|
|
55
58
|
AuthorizedUsers,
|
|
56
59
|
} from './resources/authorized-users';
|
|
57
60
|
import {
|
|
@@ -76,6 +79,7 @@ import {
|
|
|
76
79
|
CompanyListResponse,
|
|
77
80
|
CompanyListResponsesCursorPage,
|
|
78
81
|
CompanyUpdateParams,
|
|
82
|
+
SocialLinkWebsites,
|
|
79
83
|
} from './resources/companies';
|
|
80
84
|
import {
|
|
81
85
|
CompanyTokenTransaction,
|
|
@@ -248,6 +252,7 @@ import {
|
|
|
248
252
|
} from './resources/members';
|
|
249
253
|
import {
|
|
250
254
|
CancelOptions,
|
|
255
|
+
MembershipAddFreeDaysParams,
|
|
251
256
|
MembershipCancelParams,
|
|
252
257
|
MembershipListParams,
|
|
253
258
|
MembershipListResponse,
|
|
@@ -291,6 +296,7 @@ import {
|
|
|
291
296
|
PaymentMethodTypes,
|
|
292
297
|
PaymentRefundParams,
|
|
293
298
|
Payments,
|
|
299
|
+
ReceiptTaxBehavior,
|
|
294
300
|
} from './resources/payments';
|
|
295
301
|
import {
|
|
296
302
|
PayoutDestinationCategory,
|
|
@@ -347,6 +353,18 @@ import {
|
|
|
347
353
|
RefundStatus,
|
|
348
354
|
Refunds,
|
|
349
355
|
} from './resources/refunds';
|
|
356
|
+
import {
|
|
357
|
+
ResolutionCenterCaseCustomerResponse,
|
|
358
|
+
ResolutionCenterCaseIssueType,
|
|
359
|
+
ResolutionCenterCaseListParams,
|
|
360
|
+
ResolutionCenterCaseListResponse,
|
|
361
|
+
ResolutionCenterCaseListResponsesCursorPage,
|
|
362
|
+
ResolutionCenterCaseMerchantResponse,
|
|
363
|
+
ResolutionCenterCasePlatformResponse,
|
|
364
|
+
ResolutionCenterCaseRetrieveResponse,
|
|
365
|
+
ResolutionCenterCaseStatus,
|
|
366
|
+
ResolutionCenterCases,
|
|
367
|
+
} from './resources/resolution-center-cases';
|
|
350
368
|
import {
|
|
351
369
|
ReviewListParams,
|
|
352
370
|
ReviewListResponse,
|
|
@@ -666,8 +684,8 @@ export class Whop {
|
|
|
666
684
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
667
685
|
}
|
|
668
686
|
|
|
669
|
-
protected stringifyQuery(query: Record<string, unknown>): string {
|
|
670
|
-
return
|
|
687
|
+
protected stringifyQuery(query: object | Record<string, unknown>): string {
|
|
688
|
+
return stringifyQuery(query);
|
|
671
689
|
}
|
|
672
690
|
|
|
673
691
|
private getUserAgent(): string {
|
|
@@ -699,12 +717,13 @@ export class Whop {
|
|
|
699
717
|
: new URL(baseURL + (baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path));
|
|
700
718
|
|
|
701
719
|
const defaultQuery = this.defaultQuery();
|
|
702
|
-
|
|
703
|
-
|
|
720
|
+
const pathQuery = Object.fromEntries(url.searchParams);
|
|
721
|
+
if (!isEmptyObj(defaultQuery) || !isEmptyObj(pathQuery)) {
|
|
722
|
+
query = { ...pathQuery, ...defaultQuery, ...query };
|
|
704
723
|
}
|
|
705
724
|
|
|
706
725
|
if (typeof query === 'object' && query && !Array.isArray(query)) {
|
|
707
|
-
url.search = this.stringifyQuery(query
|
|
726
|
+
url.search = this.stringifyQuery(query);
|
|
708
727
|
}
|
|
709
728
|
|
|
710
729
|
return url.toString();
|
|
@@ -1033,9 +1052,9 @@ export class Whop {
|
|
|
1033
1052
|
}
|
|
1034
1053
|
}
|
|
1035
1054
|
|
|
1036
|
-
// If the API asks us to wait a certain amount of time
|
|
1037
|
-
//
|
|
1038
|
-
if (
|
|
1055
|
+
// If the API asks us to wait a certain amount of time, just do what it
|
|
1056
|
+
// says, but otherwise calculate a default
|
|
1057
|
+
if (timeoutMillis === undefined) {
|
|
1039
1058
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
1040
1059
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
1041
1060
|
}
|
|
@@ -1168,7 +1187,7 @@ export class Whop {
|
|
|
1168
1187
|
) {
|
|
1169
1188
|
return {
|
|
1170
1189
|
bodyHeaders: { 'content-type': 'application/x-www-form-urlencoded' },
|
|
1171
|
-
body: this.stringifyQuery(body
|
|
1190
|
+
body: this.stringifyQuery(body),
|
|
1172
1191
|
};
|
|
1173
1192
|
} else {
|
|
1174
1193
|
return this.#encoder({ body, headers });
|
|
@@ -1196,56 +1215,210 @@ export class Whop {
|
|
|
1196
1215
|
|
|
1197
1216
|
static toFile = Uploads.toFile;
|
|
1198
1217
|
|
|
1218
|
+
/**
|
|
1219
|
+
* Apps
|
|
1220
|
+
*/
|
|
1199
1221
|
apps: API.Apps = new API.Apps(this);
|
|
1222
|
+
/**
|
|
1223
|
+
* Invoices
|
|
1224
|
+
*/
|
|
1200
1225
|
invoices: API.Invoices = new API.Invoices(this);
|
|
1226
|
+
/**
|
|
1227
|
+
* Course lesson interactions
|
|
1228
|
+
*/
|
|
1201
1229
|
courseLessonInteractions: API.CourseLessonInteractions = new API.CourseLessonInteractions(this);
|
|
1230
|
+
/**
|
|
1231
|
+
* Products
|
|
1232
|
+
*/
|
|
1202
1233
|
products: API.Products = new API.Products(this);
|
|
1234
|
+
/**
|
|
1235
|
+
* Companies
|
|
1236
|
+
*/
|
|
1203
1237
|
companies: API.Companies = new API.Companies(this);
|
|
1238
|
+
/**
|
|
1239
|
+
* Webhooks
|
|
1240
|
+
*/
|
|
1204
1241
|
webhooks: API.Webhooks = new API.Webhooks(this);
|
|
1242
|
+
/**
|
|
1243
|
+
* Plans
|
|
1244
|
+
*/
|
|
1205
1245
|
plans: API.Plans = new API.Plans(this);
|
|
1246
|
+
/**
|
|
1247
|
+
* Entries
|
|
1248
|
+
*/
|
|
1206
1249
|
entries: API.Entries = new API.Entries(this);
|
|
1250
|
+
/**
|
|
1251
|
+
* Forum posts
|
|
1252
|
+
*/
|
|
1207
1253
|
forumPosts: API.ForumPosts = new API.ForumPosts(this);
|
|
1254
|
+
/**
|
|
1255
|
+
* Transfers
|
|
1256
|
+
*/
|
|
1208
1257
|
transfers: API.Transfers = new API.Transfers(this);
|
|
1258
|
+
/**
|
|
1259
|
+
* Ledger accounts
|
|
1260
|
+
*/
|
|
1209
1261
|
ledgerAccounts: API.LedgerAccounts = new API.LedgerAccounts(this);
|
|
1262
|
+
/**
|
|
1263
|
+
* Memberships
|
|
1264
|
+
*/
|
|
1210
1265
|
memberships: API.Memberships = new API.Memberships(this);
|
|
1266
|
+
/**
|
|
1267
|
+
* Authorized users
|
|
1268
|
+
*/
|
|
1211
1269
|
authorizedUsers: API.AuthorizedUsers = new API.AuthorizedUsers(this);
|
|
1270
|
+
/**
|
|
1271
|
+
* App builds
|
|
1272
|
+
*/
|
|
1212
1273
|
appBuilds: API.AppBuilds = new API.AppBuilds(this);
|
|
1274
|
+
/**
|
|
1275
|
+
* Shipments
|
|
1276
|
+
*/
|
|
1213
1277
|
shipments: API.Shipments = new API.Shipments(this);
|
|
1278
|
+
/**
|
|
1279
|
+
* Checkout configurations
|
|
1280
|
+
*/
|
|
1214
1281
|
checkoutConfigurations: API.CheckoutConfigurations = new API.CheckoutConfigurations(this);
|
|
1282
|
+
/**
|
|
1283
|
+
* Messages
|
|
1284
|
+
*/
|
|
1215
1285
|
messages: API.Messages = new API.Messages(this);
|
|
1286
|
+
/**
|
|
1287
|
+
* Chat channels
|
|
1288
|
+
*/
|
|
1216
1289
|
chatChannels: API.ChatChannels = new API.ChatChannels(this);
|
|
1290
|
+
/**
|
|
1291
|
+
* Users
|
|
1292
|
+
*/
|
|
1217
1293
|
users: API.Users = new API.Users(this);
|
|
1294
|
+
/**
|
|
1295
|
+
* Payments
|
|
1296
|
+
*/
|
|
1218
1297
|
payments: API.Payments = new API.Payments(this);
|
|
1298
|
+
/**
|
|
1299
|
+
* Support channels
|
|
1300
|
+
*/
|
|
1219
1301
|
supportChannels: API.SupportChannels = new API.SupportChannels(this);
|
|
1302
|
+
/**
|
|
1303
|
+
* Experiences
|
|
1304
|
+
*/
|
|
1220
1305
|
experiences: API.Experiences = new API.Experiences(this);
|
|
1306
|
+
/**
|
|
1307
|
+
* Reactions
|
|
1308
|
+
*/
|
|
1221
1309
|
reactions: API.Reactions = new API.Reactions(this);
|
|
1310
|
+
/**
|
|
1311
|
+
* Members
|
|
1312
|
+
*/
|
|
1222
1313
|
members: API.Members = new API.Members(this);
|
|
1314
|
+
/**
|
|
1315
|
+
* Forums
|
|
1316
|
+
*/
|
|
1223
1317
|
forums: API.Forums = new API.Forums(this);
|
|
1318
|
+
/**
|
|
1319
|
+
* Promo codes
|
|
1320
|
+
*/
|
|
1224
1321
|
promoCodes: API.PromoCodes = new API.PromoCodes(this);
|
|
1322
|
+
/**
|
|
1323
|
+
* Courses
|
|
1324
|
+
*/
|
|
1225
1325
|
courses: API.Courses = new API.Courses(this);
|
|
1326
|
+
/**
|
|
1327
|
+
* Course chapters
|
|
1328
|
+
*/
|
|
1226
1329
|
courseChapters: API.CourseChapters = new API.CourseChapters(this);
|
|
1330
|
+
/**
|
|
1331
|
+
* Course lessons
|
|
1332
|
+
*/
|
|
1227
1333
|
courseLessons: API.CourseLessons = new API.CourseLessons(this);
|
|
1334
|
+
/**
|
|
1335
|
+
* Reviews
|
|
1336
|
+
*/
|
|
1228
1337
|
reviews: API.Reviews = new API.Reviews(this);
|
|
1338
|
+
/**
|
|
1339
|
+
* Course students
|
|
1340
|
+
*/
|
|
1229
1341
|
courseStudents: API.CourseStudents = new API.CourseStudents(this);
|
|
1342
|
+
/**
|
|
1343
|
+
* Access tokens
|
|
1344
|
+
*/
|
|
1230
1345
|
accessTokens: API.AccessTokens = new API.AccessTokens(this);
|
|
1346
|
+
/**
|
|
1347
|
+
* Notifications
|
|
1348
|
+
*/
|
|
1231
1349
|
notifications: API.Notifications = new API.Notifications(this);
|
|
1350
|
+
/**
|
|
1351
|
+
* Disputes
|
|
1352
|
+
*/
|
|
1232
1353
|
disputes: API.Disputes = new API.Disputes(this);
|
|
1354
|
+
/**
|
|
1355
|
+
* Refunds
|
|
1356
|
+
*/
|
|
1233
1357
|
refunds: API.Refunds = new API.Refunds(this);
|
|
1358
|
+
/**
|
|
1359
|
+
* Withdrawals
|
|
1360
|
+
*/
|
|
1234
1361
|
withdrawals: API.Withdrawals = new API.Withdrawals(this);
|
|
1362
|
+
/**
|
|
1363
|
+
* Account links
|
|
1364
|
+
*/
|
|
1235
1365
|
accountLinks: API.AccountLinks = new API.AccountLinks(this);
|
|
1366
|
+
/**
|
|
1367
|
+
* Setup intents
|
|
1368
|
+
*/
|
|
1236
1369
|
setupIntents: API.SetupIntents = new API.SetupIntents(this);
|
|
1370
|
+
/**
|
|
1371
|
+
* Payment methods
|
|
1372
|
+
*/
|
|
1237
1373
|
paymentMethods: API.PaymentMethods = new API.PaymentMethods(this);
|
|
1374
|
+
/**
|
|
1375
|
+
* Fee markups
|
|
1376
|
+
*/
|
|
1238
1377
|
feeMarkups: API.FeeMarkups = new API.FeeMarkups(this);
|
|
1378
|
+
/**
|
|
1379
|
+
* Payout methods
|
|
1380
|
+
*/
|
|
1239
1381
|
payoutMethods: API.PayoutMethods = new API.PayoutMethods(this);
|
|
1382
|
+
/**
|
|
1383
|
+
* Verifications
|
|
1384
|
+
*/
|
|
1240
1385
|
verifications: API.Verifications = new API.Verifications(this);
|
|
1386
|
+
/**
|
|
1387
|
+
* Leads
|
|
1388
|
+
*/
|
|
1241
1389
|
leads: API.Leads = new API.Leads(this);
|
|
1390
|
+
/**
|
|
1391
|
+
* Topups
|
|
1392
|
+
*/
|
|
1242
1393
|
topups: API.Topups = new API.Topups(this);
|
|
1394
|
+
/**
|
|
1395
|
+
* Files
|
|
1396
|
+
*/
|
|
1243
1397
|
files: API.Files = new API.Files(this);
|
|
1398
|
+
/**
|
|
1399
|
+
* Company token transactions
|
|
1400
|
+
*/
|
|
1244
1401
|
companyTokenTransactions: API.CompanyTokenTransactions = new API.CompanyTokenTransactions(this);
|
|
1402
|
+
/**
|
|
1403
|
+
* Dm members
|
|
1404
|
+
*/
|
|
1245
1405
|
dmMembers: API.DmMembers = new API.DmMembers(this);
|
|
1406
|
+
/**
|
|
1407
|
+
* Ai chats
|
|
1408
|
+
*/
|
|
1246
1409
|
aiChats: API.AIChats = new API.AIChats(this);
|
|
1410
|
+
/**
|
|
1411
|
+
* Dm channels
|
|
1412
|
+
*/
|
|
1247
1413
|
dmChannels: API.DmChannels = new API.DmChannels(this);
|
|
1414
|
+
/**
|
|
1415
|
+
* Dispute alerts
|
|
1416
|
+
*/
|
|
1248
1417
|
disputeAlerts: API.DisputeAlerts = new API.DisputeAlerts(this);
|
|
1418
|
+
/**
|
|
1419
|
+
* Resolution center cases
|
|
1420
|
+
*/
|
|
1421
|
+
resolutionCenterCases: API.ResolutionCenterCases = new API.ResolutionCenterCases(this);
|
|
1249
1422
|
}
|
|
1250
1423
|
|
|
1251
1424
|
Whop.Apps = Apps;
|
|
@@ -1298,6 +1471,7 @@ Whop.DmMembers = DmMembers;
|
|
|
1298
1471
|
Whop.AIChats = AIChats;
|
|
1299
1472
|
Whop.DmChannels = DmChannels;
|
|
1300
1473
|
Whop.DisputeAlerts = DisputeAlerts;
|
|
1474
|
+
Whop.ResolutionCenterCases = ResolutionCenterCases;
|
|
1301
1475
|
|
|
1302
1476
|
export declare namespace Whop {
|
|
1303
1477
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -1337,6 +1511,7 @@ export declare namespace Whop {
|
|
|
1337
1511
|
|
|
1338
1512
|
export {
|
|
1339
1513
|
Companies as Companies,
|
|
1514
|
+
type SocialLinkWebsites as SocialLinkWebsites,
|
|
1340
1515
|
type CompanyListResponse as CompanyListResponse,
|
|
1341
1516
|
type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage,
|
|
1342
1517
|
type CompanyCreateParams as CompanyCreateParams,
|
|
@@ -1435,16 +1610,20 @@ export declare namespace Whop {
|
|
|
1435
1610
|
type MembershipListResponsesCursorPage as MembershipListResponsesCursorPage,
|
|
1436
1611
|
type MembershipUpdateParams as MembershipUpdateParams,
|
|
1437
1612
|
type MembershipListParams as MembershipListParams,
|
|
1613
|
+
type MembershipAddFreeDaysParams as MembershipAddFreeDaysParams,
|
|
1438
1614
|
type MembershipCancelParams as MembershipCancelParams,
|
|
1439
1615
|
type MembershipPauseParams as MembershipPauseParams,
|
|
1440
1616
|
};
|
|
1441
1617
|
|
|
1442
1618
|
export {
|
|
1443
1619
|
AuthorizedUsers as AuthorizedUsers,
|
|
1444
|
-
type
|
|
1620
|
+
type AuthorizedUser as AuthorizedUser,
|
|
1445
1621
|
type AuthorizedUserListResponse as AuthorizedUserListResponse,
|
|
1622
|
+
type AuthorizedUserDeleteResponse as AuthorizedUserDeleteResponse,
|
|
1446
1623
|
type AuthorizedUserListResponsesCursorPage as AuthorizedUserListResponsesCursorPage,
|
|
1624
|
+
type AuthorizedUserCreateParams as AuthorizedUserCreateParams,
|
|
1447
1625
|
type AuthorizedUserListParams as AuthorizedUserListParams,
|
|
1626
|
+
type AuthorizedUserDeleteParams as AuthorizedUserDeleteParams,
|
|
1448
1627
|
};
|
|
1449
1628
|
|
|
1450
1629
|
export {
|
|
@@ -1503,6 +1682,7 @@ export declare namespace Whop {
|
|
|
1503
1682
|
type BillingReasons as BillingReasons,
|
|
1504
1683
|
type CardBrands as CardBrands,
|
|
1505
1684
|
type PaymentMethodTypes as PaymentMethodTypes,
|
|
1685
|
+
type ReceiptTaxBehavior as ReceiptTaxBehavior,
|
|
1506
1686
|
type PaymentListResponse as PaymentListResponse,
|
|
1507
1687
|
type PaymentListFeesResponse as PaymentListFeesResponse,
|
|
1508
1688
|
type PaymentListResponsesCursorPage as PaymentListResponsesCursorPage,
|
|
@@ -1807,6 +1987,19 @@ export declare namespace Whop {
|
|
|
1807
1987
|
type DisputeAlertListParams as DisputeAlertListParams,
|
|
1808
1988
|
};
|
|
1809
1989
|
|
|
1990
|
+
export {
|
|
1991
|
+
ResolutionCenterCases as ResolutionCenterCases,
|
|
1992
|
+
type ResolutionCenterCaseCustomerResponse as ResolutionCenterCaseCustomerResponse,
|
|
1993
|
+
type ResolutionCenterCaseIssueType as ResolutionCenterCaseIssueType,
|
|
1994
|
+
type ResolutionCenterCaseMerchantResponse as ResolutionCenterCaseMerchantResponse,
|
|
1995
|
+
type ResolutionCenterCasePlatformResponse as ResolutionCenterCasePlatformResponse,
|
|
1996
|
+
type ResolutionCenterCaseStatus as ResolutionCenterCaseStatus,
|
|
1997
|
+
type ResolutionCenterCaseRetrieveResponse as ResolutionCenterCaseRetrieveResponse,
|
|
1998
|
+
type ResolutionCenterCaseListResponse as ResolutionCenterCaseListResponse,
|
|
1999
|
+
type ResolutionCenterCaseListResponsesCursorPage as ResolutionCenterCaseListResponsesCursorPage,
|
|
2000
|
+
type ResolutionCenterCaseListParams as ResolutionCenterCaseListParams,
|
|
2001
|
+
};
|
|
2002
|
+
|
|
1810
2003
|
export type AccessLevel = API.AccessLevel;
|
|
1811
2004
|
export type AccessPassType = API.AccessPassType;
|
|
1812
2005
|
export type App = API.App;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import * as qs from '../qs/stringify';
|
|
4
|
+
|
|
5
|
+
export function stringifyQuery(query: object | Record<string, unknown>) {
|
|
6
|
+
return qs.stringify(query, { arrayFormat: 'brackets' });
|
|
7
|
+
}
|
package/src/internal/utils.ts
CHANGED
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Access tokens
|
|
9
|
+
*/
|
|
7
10
|
export class AccessTokens extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Create a short-lived access token for authenticating API requests. When using
|
|
@@ -4,6 +4,9 @@ import { APIResource } from '../core/resource';
|
|
|
4
4
|
import { APIPromise } from '../core/api-promise';
|
|
5
5
|
import { RequestOptions } from '../internal/request-options';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* Account links
|
|
9
|
+
*/
|
|
7
10
|
export class AccountLinks extends APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Generate a URL that directs a sub-merchant to their account portal, such as the
|
|
@@ -6,6 +6,9 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
import { path } from '../internal/utils/path';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Ai chats
|
|
11
|
+
*/
|
|
9
12
|
export class AIChats extends APIResource {
|
|
10
13
|
/**
|
|
11
14
|
* Create a new AI chat thread and send the first message to the AI agent.
|
|
@@ -212,6 +215,12 @@ export interface AIChatCreateParams {
|
|
|
212
215
|
*/
|
|
213
216
|
message_source?: 'manual' | 'suggestion' | 'link' | null;
|
|
214
217
|
|
|
218
|
+
/**
|
|
219
|
+
* The type of suggestion prompt that was clicked, when message_source is
|
|
220
|
+
* 'suggestion'.
|
|
221
|
+
*/
|
|
222
|
+
suggestion_type?: string | null;
|
|
223
|
+
|
|
215
224
|
/**
|
|
216
225
|
* An optional display title for the AI chat thread (e.g., "Help with billing").
|
|
217
226
|
*/
|
|
@@ -258,6 +267,11 @@ export interface AIChatListParams extends CursorPageParams {
|
|
|
258
267
|
* Returns the last _n_ elements from the list.
|
|
259
268
|
*/
|
|
260
269
|
last?: number | null;
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* When true, returns only chats with an active cron schedule
|
|
273
|
+
*/
|
|
274
|
+
only_active_crons?: boolean | null;
|
|
261
275
|
}
|
|
262
276
|
|
|
263
277
|
export declare namespace AIChats {
|
|
@@ -7,6 +7,9 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* App builds
|
|
12
|
+
*/
|
|
10
13
|
export class AppBuilds extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Upload a new build artifact for an app. The build must include a compiled code
|
package/src/resources/apps.ts
CHANGED
|
@@ -7,6 +7,9 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Apps
|
|
12
|
+
*/
|
|
10
13
|
export class Apps extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Register a new app on the Whop developer platform. Apps provide custom
|
|
@@ -7,7 +7,31 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Authorized users
|
|
12
|
+
*/
|
|
10
13
|
export class AuthorizedUsers extends APIResource {
|
|
14
|
+
/**
|
|
15
|
+
* Add a new authorized user to a company.
|
|
16
|
+
*
|
|
17
|
+
* Required permissions:
|
|
18
|
+
*
|
|
19
|
+
* - `authorized_user:create`
|
|
20
|
+
* - `member:email:read`
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const authorizedUser = await client.authorizedUsers.create({
|
|
25
|
+
* company_id: 'biz_xxxxxxxxxxxxxx',
|
|
26
|
+
* role: 'owner',
|
|
27
|
+
* user_id: 'user_xxxxxxxxxxxxx',
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
create(body: AuthorizedUserCreateParams, options?: RequestOptions): APIPromise<AuthorizedUser> {
|
|
32
|
+
return this._client.post('/authorized_users', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
|
|
11
35
|
/**
|
|
12
36
|
* Retrieves the details of an existing authorized user.
|
|
13
37
|
*
|
|
@@ -15,8 +39,16 @@ export class AuthorizedUsers extends APIResource {
|
|
|
15
39
|
*
|
|
16
40
|
* - `company:authorized_user:read`
|
|
17
41
|
* - `member:email:read`
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const authorizedUser =
|
|
46
|
+
* await client.authorizedUsers.retrieve(
|
|
47
|
+
* 'ausr_xxxxxxxxxxxxx',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
18
50
|
*/
|
|
19
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<
|
|
51
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<AuthorizedUser> {
|
|
20
52
|
return this._client.get(path`/authorized_users/${id}`, options);
|
|
21
53
|
}
|
|
22
54
|
|
|
@@ -28,6 +60,14 @@ export class AuthorizedUsers extends APIResource {
|
|
|
28
60
|
*
|
|
29
61
|
* - `company:authorized_user:read`
|
|
30
62
|
* - `member:email:read`
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* // Automatically fetches more pages as needed.
|
|
67
|
+
* for await (const authorizedUserListResponse of client.authorizedUsers.list()) {
|
|
68
|
+
* // ...
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
31
71
|
*/
|
|
32
72
|
list(
|
|
33
73
|
query: AuthorizedUserListParams | null | undefined = {},
|
|
@@ -38,6 +78,29 @@ export class AuthorizedUsers extends APIResource {
|
|
|
38
78
|
...options,
|
|
39
79
|
});
|
|
40
80
|
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Remove an authorized user from a company.
|
|
84
|
+
*
|
|
85
|
+
* Required permissions:
|
|
86
|
+
*
|
|
87
|
+
* - `authorized_user:delete`
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* const authorizedUser = await client.authorizedUsers.delete(
|
|
92
|
+
* 'ausr_xxxxxxxxxxxxx',
|
|
93
|
+
* );
|
|
94
|
+
* ```
|
|
95
|
+
*/
|
|
96
|
+
delete(
|
|
97
|
+
id: string,
|
|
98
|
+
params: AuthorizedUserDeleteParams | null | undefined = {},
|
|
99
|
+
options?: RequestOptions,
|
|
100
|
+
): APIPromise<AuthorizedUserDeleteResponse> {
|
|
101
|
+
const { company_id } = params ?? {};
|
|
102
|
+
return this._client.delete(path`/authorized_users/${id}`, { query: { company_id }, ...options });
|
|
103
|
+
}
|
|
41
104
|
}
|
|
42
105
|
|
|
43
106
|
export type AuthorizedUserListResponsesCursorPage = CursorPage<AuthorizedUserListResponse>;
|
|
@@ -46,7 +109,7 @@ export type AuthorizedUserListResponsesCursorPage = CursorPage<AuthorizedUserLis
|
|
|
46
109
|
* A user who has been granted administrative access to manage a company's
|
|
47
110
|
* dashboard and settings.
|
|
48
111
|
*/
|
|
49
|
-
export interface
|
|
112
|
+
export interface AuthorizedUser {
|
|
50
113
|
/**
|
|
51
114
|
* The unique identifier for the authorized user.
|
|
52
115
|
*/
|
|
@@ -55,7 +118,7 @@ export interface AuthorizedUserRetrieveResponse {
|
|
|
55
118
|
/**
|
|
56
119
|
* The company this authorized user has access to.
|
|
57
120
|
*/
|
|
58
|
-
company:
|
|
121
|
+
company: AuthorizedUser.Company;
|
|
59
122
|
|
|
60
123
|
/**
|
|
61
124
|
* The permission role assigned to this authorized user within the company.
|
|
@@ -65,10 +128,10 @@ export interface AuthorizedUserRetrieveResponse {
|
|
|
65
128
|
/**
|
|
66
129
|
* The user account linked to this authorized user record.
|
|
67
130
|
*/
|
|
68
|
-
user:
|
|
131
|
+
user: AuthorizedUser.User;
|
|
69
132
|
}
|
|
70
133
|
|
|
71
|
-
export namespace
|
|
134
|
+
export namespace AuthorizedUser {
|
|
72
135
|
/**
|
|
73
136
|
* The company this authorized user has access to.
|
|
74
137
|
*/
|
|
@@ -180,6 +243,34 @@ export namespace AuthorizedUserListResponse {
|
|
|
180
243
|
}
|
|
181
244
|
}
|
|
182
245
|
|
|
246
|
+
/**
|
|
247
|
+
* Represents `true` or `false` values.
|
|
248
|
+
*/
|
|
249
|
+
export type AuthorizedUserDeleteResponse = boolean;
|
|
250
|
+
|
|
251
|
+
export interface AuthorizedUserCreateParams {
|
|
252
|
+
/**
|
|
253
|
+
* The ID of the company to add the authorized user to.
|
|
254
|
+
*/
|
|
255
|
+
company_id: string;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* The role to assign to the authorized user within the company. Supported roles:
|
|
259
|
+
* 'moderator', 'sales_manager'.
|
|
260
|
+
*/
|
|
261
|
+
role: Shared.AuthorizedUserRoles;
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* The ID of the user to add as an authorized user.
|
|
265
|
+
*/
|
|
266
|
+
user_id: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Whether to send notification emails to the user on creation.
|
|
270
|
+
*/
|
|
271
|
+
send_emails?: boolean | null;
|
|
272
|
+
}
|
|
273
|
+
|
|
183
274
|
export interface AuthorizedUserListParams extends CursorPageParams {
|
|
184
275
|
/**
|
|
185
276
|
* Returns the elements in the list that come before the specified cursor.
|
|
@@ -223,11 +314,22 @@ export interface AuthorizedUserListParams extends CursorPageParams {
|
|
|
223
314
|
user_id?: string | null;
|
|
224
315
|
}
|
|
225
316
|
|
|
317
|
+
export interface AuthorizedUserDeleteParams {
|
|
318
|
+
/**
|
|
319
|
+
* The ID of the company the authorized user belongs to. Optional if the authorized
|
|
320
|
+
* user ID is provided.
|
|
321
|
+
*/
|
|
322
|
+
company_id?: string | null;
|
|
323
|
+
}
|
|
324
|
+
|
|
226
325
|
export declare namespace AuthorizedUsers {
|
|
227
326
|
export {
|
|
228
|
-
type
|
|
327
|
+
type AuthorizedUser as AuthorizedUser,
|
|
229
328
|
type AuthorizedUserListResponse as AuthorizedUserListResponse,
|
|
329
|
+
type AuthorizedUserDeleteResponse as AuthorizedUserDeleteResponse,
|
|
230
330
|
type AuthorizedUserListResponsesCursorPage as AuthorizedUserListResponsesCursorPage,
|
|
331
|
+
type AuthorizedUserCreateParams as AuthorizedUserCreateParams,
|
|
231
332
|
type AuthorizedUserListParams as AuthorizedUserListParams,
|
|
333
|
+
type AuthorizedUserDeleteParams as AuthorizedUserDeleteParams,
|
|
232
334
|
};
|
|
233
335
|
}
|
|
@@ -7,6 +7,9 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
7
7
|
import { RequestOptions } from '../internal/request-options';
|
|
8
8
|
import { path } from '../internal/utils/path';
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Chat channels
|
|
12
|
+
*/
|
|
10
13
|
export class ChatChannels extends APIResource {
|
|
11
14
|
/**
|
|
12
15
|
* Retrieves the details of an existing chat channel.
|
|
@@ -8,6 +8,9 @@ import { CursorPage, type CursorPageParams, PagePromise } from '../core/paginati
|
|
|
8
8
|
import { RequestOptions } from '../internal/request-options';
|
|
9
9
|
import { path } from '../internal/utils/path';
|
|
10
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Checkout configurations
|
|
13
|
+
*/
|
|
11
14
|
export class CheckoutConfigurations extends APIResource {
|
|
12
15
|
/**
|
|
13
16
|
* Creates a new checkout configuration
|