@whop/sdk 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/client.d.mts +88 -40
- package/client.d.mts.map +1 -1
- package/client.d.ts +88 -40
- package/client.d.ts.map +1 -1
- package/client.js +59 -0
- package/client.js.map +1 -1
- package/client.mjs +59 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +15 -9
- package/resources/accounts.d.mts +244 -0
- package/resources/accounts.d.mts.map +1 -0
- package/resources/accounts.d.ts +244 -0
- package/resources/accounts.d.ts.map +1 -0
- package/resources/accounts.js +46 -0
- package/resources/accounts.js.map +1 -0
- package/resources/accounts.mjs +42 -0
- package/resources/accounts.mjs.map +1 -0
- package/resources/ad-campaigns.d.mts +296 -0
- package/resources/ad-campaigns.d.mts.map +1 -0
- package/resources/ad-campaigns.d.ts +296 -0
- package/resources/ad-campaigns.d.ts.map +1 -0
- package/resources/ad-campaigns.js +104 -0
- package/resources/ad-campaigns.js.map +1 -0
- package/resources/ad-campaigns.mjs +100 -0
- package/resources/ad-campaigns.mjs.map +1 -0
- package/resources/ad-groups.d.mts +1461 -0
- package/resources/ad-groups.d.mts.map +1 -0
- package/resources/ad-groups.d.ts +1461 -0
- package/resources/ad-groups.d.ts.map +1 -0
- package/resources/ad-groups.js +121 -0
- package/resources/ad-groups.js.map +1 -0
- package/resources/ad-groups.mjs +117 -0
- package/resources/ad-groups.mjs.map +1 -0
- package/resources/ad-reports.d.mts +379 -0
- package/resources/ad-reports.d.mts.map +1 -0
- package/resources/ad-reports.d.ts +379 -0
- package/resources/ad-reports.d.ts.map +1 -0
- package/resources/ad-reports.js +26 -0
- package/resources/ad-reports.js.map +1 -0
- package/resources/ad-reports.mjs +22 -0
- package/resources/ad-reports.mjs.map +1 -0
- package/resources/ads.d.mts +234 -0
- package/resources/ads.d.mts.map +1 -0
- package/resources/ads.d.ts +234 -0
- package/resources/ads.d.ts.map +1 -0
- package/resources/ads.js +56 -0
- package/resources/ads.js.map +1 -0
- package/resources/ads.mjs +52 -0
- package/resources/ads.mjs.map +1 -0
- package/resources/affiliates/affiliates.d.mts +31 -31
- package/resources/affiliates/affiliates.d.mts.map +1 -1
- package/resources/affiliates/affiliates.d.ts +31 -31
- package/resources/affiliates/affiliates.d.ts.map +1 -1
- package/resources/affiliates/affiliates.js +21 -21
- package/resources/affiliates/affiliates.js.map +1 -1
- package/resources/affiliates/affiliates.mjs +21 -21
- package/resources/affiliates/affiliates.mjs.map +1 -1
- package/resources/affiliates/index.d.mts +2 -2
- package/resources/affiliates/index.d.mts.map +1 -1
- package/resources/affiliates/index.d.ts +2 -2
- package/resources/affiliates/index.d.ts.map +1 -1
- package/resources/affiliates/overrides.d.mts +37 -37
- package/resources/affiliates/overrides.d.mts.map +1 -1
- package/resources/affiliates/overrides.d.ts +37 -37
- package/resources/affiliates/overrides.d.ts.map +1 -1
- package/resources/affiliates/overrides.js +23 -23
- package/resources/affiliates/overrides.js.map +1 -1
- package/resources/affiliates/overrides.mjs +23 -23
- package/resources/affiliates/overrides.mjs.map +1 -1
- package/resources/ai-chats.d.mts +23 -23
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +23 -23
- package/resources/ai-chats.d.ts.map +1 -1
- package/resources/ai-chats.js +6 -6
- package/resources/ai-chats.js.map +1 -1
- package/resources/ai-chats.mjs +6 -6
- package/resources/ai-chats.mjs.map +1 -1
- package/resources/app-builds.d.mts +54 -54
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +54 -54
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +21 -21
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +21 -21
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +57 -57
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +57 -57
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +15 -15
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +15 -15
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +36 -36
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +36 -36
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +21 -21
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +21 -21
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/bounties.d.mts +281 -0
- package/resources/bounties.d.mts.map +1 -0
- package/resources/bounties.d.ts +281 -0
- package/resources/bounties.d.ts.map +1 -0
- package/resources/bounties.js +63 -0
- package/resources/bounties.js.map +1 -0
- package/resources/bounties.mjs +59 -0
- package/resources/bounties.mjs.map +1 -0
- package/resources/chat-channels.d.mts +43 -43
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +43 -43
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +24 -24
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +24 -24
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +77 -49
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +77 -49
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +11 -11
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +11 -11
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +98 -35
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +98 -35
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +24 -17
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +24 -17
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +39 -39
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +39 -39
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +14 -14
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +14 -14
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/conversions.d.mts +248 -0
- package/resources/conversions.d.mts.map +1 -0
- package/resources/conversions.d.ts +248 -0
- package/resources/conversions.d.ts.map +1 -0
- package/resources/conversions.js +30 -0
- package/resources/conversions.js.map +1 -0
- package/resources/conversions.mjs +26 -0
- package/resources/conversions.mjs.map +1 -0
- package/resources/course-chapters.d.mts +36 -36
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +36 -36
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +23 -23
- package/resources/course-chapters.js.map +1 -1
- package/resources/course-chapters.mjs +23 -23
- package/resources/course-chapters.mjs.map +1 -1
- package/resources/course-lesson-interactions.d.mts +5 -5
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +5 -5
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +7 -7
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +7 -7
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +40 -40
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +40 -40
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +22 -22
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +22 -22
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +5 -5
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +5 -5
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +10 -10
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +10 -10
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +40 -40
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +40 -40
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +19 -19
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +19 -19
- package/resources/courses.mjs.map +1 -1
- package/resources/deposits.d.mts +64 -0
- package/resources/deposits.d.mts.map +1 -0
- package/resources/deposits.d.ts +64 -0
- package/resources/deposits.d.ts.map +1 -0
- package/resources/deposits.js +16 -0
- package/resources/deposits.js.map +1 -0
- package/resources/deposits.mjs +12 -0
- package/resources/deposits.mjs.map +1 -0
- package/resources/dispute-alerts.d.mts +10 -10
- package/resources/dispute-alerts.d.mts.map +1 -1
- package/resources/dispute-alerts.d.ts +10 -10
- package/resources/dispute-alerts.d.ts.map +1 -1
- package/resources/dispute-alerts.js +13 -13
- package/resources/dispute-alerts.js.map +1 -1
- package/resources/dispute-alerts.mjs +13 -13
- package/resources/dispute-alerts.mjs.map +1 -1
- package/resources/disputes.d.mts +13 -15
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +13 -15
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +11 -11
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +11 -11
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +37 -37
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +37 -37
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +19 -19
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +19 -19
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +38 -38
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +38 -38
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +21 -21
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +21 -21
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +5 -5
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +5 -5
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -7
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -7
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +50 -50
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +50 -50
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +17 -17
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +17 -17
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +36 -36
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +36 -36
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +18 -18
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +18 -18
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +18 -1
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +18 -1
- package/resources/files.d.ts.map +1 -1
- package/resources/forum-posts.d.mts +52 -48
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +52 -48
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +21 -21
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +21 -21
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +33 -33
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +33 -33
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +11 -11
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +11 -11
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +45 -35
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +45 -35
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +22 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +10 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +89 -84
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +89 -84
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +40 -40
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +40 -40
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +53 -53
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +53 -53
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +24 -24
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +24 -24
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +34 -1
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +34 -1
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/members.d.mts +9 -7
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +9 -7
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +7 -7
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +7 -7
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +67 -47
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +67 -47
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +38 -38
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +38 -38
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +36 -36
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +36 -36
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +16 -16
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +16 -16
- package/resources/messages.mjs.map +1 -1
- package/resources/payment-methods.d.mts +20 -20
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +20 -20
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +10 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +10 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +177 -145
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +177 -145
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +68 -68
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +68 -68
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-accounts.d.mts +1 -1
- package/resources/payout-accounts.d.ts +1 -1
- package/resources/payout-methods.d.mts +5 -5
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +5 -5
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +10 -10
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +10 -10
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +130 -72
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +130 -72
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +21 -21
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +21 -21
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +81 -65
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +81 -65
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +25 -25
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +25 -25
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +59 -59
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +59 -59
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +22 -22
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +22 -22
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +25 -25
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +25 -25
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +11 -11
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +11 -11
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +59 -10
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +59 -10
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +12 -10
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +12 -10
- package/resources/refunds.mjs.map +1 -1
- package/resources/resolution-center-cases.d.mts +6 -6
- package/resources/resolution-center-cases.d.mts.map +1 -1
- package/resources/resolution-center-cases.d.ts +6 -6
- package/resources/resolution-center-cases.d.ts.map +1 -1
- package/resources/resolution-center-cases.js +10 -10
- package/resources/resolution-center-cases.js.map +1 -1
- package/resources/resolution-center-cases.mjs +10 -10
- package/resources/resolution-center-cases.mjs.map +1 -1
- package/resources/reviews.d.mts +4 -4
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +4 -4
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +6 -6
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +6 -6
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +6 -6
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +6 -6
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +11 -11
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +11 -11
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +100 -6
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +100 -6
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +35 -35
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +35 -35
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +20 -20
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +20 -20
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +42 -38
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +42 -38
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +21 -23
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +21 -23
- package/resources/support-channels.mjs.map +1 -1
- package/resources/swaps.d.mts +62 -0
- package/resources/swaps.d.mts.map +1 -0
- package/resources/swaps.d.ts +62 -0
- package/resources/swaps.d.ts.map +1 -0
- package/resources/swaps.js +15 -0
- package/resources/swaps.js.map +1 -0
- package/resources/swaps.mjs +11 -0
- package/resources/swaps.mjs.map +1 -0
- package/resources/transfers.d.mts +57 -55
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +57 -55
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +19 -19
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +19 -19
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +20 -20
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +20 -20
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +16 -16
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +16 -16
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +2 -2
- package/resources/verifications.d.ts +2 -2
- package/resources/wallets.d.mts +89 -0
- package/resources/wallets.d.mts.map +1 -0
- package/resources/wallets.d.ts +89 -0
- package/resources/wallets.d.ts.map +1 -0
- package/resources/wallets.js +28 -0
- package/resources/wallets.js.map +1 -0
- package/resources/wallets.mjs +24 -0
- package/resources/wallets.mjs.map +1 -0
- package/resources/webhooks.d.mts +2182 -1196
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +2182 -1196
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +31 -31
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +31 -31
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +47 -47
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +47 -47
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +21 -21
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +21 -21
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +277 -60
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/accounts.ts +318 -0
- package/src/resources/ad-campaigns.ts +376 -0
- package/src/resources/ad-groups.ts +1958 -0
- package/src/resources/ad-reports.ts +484 -0
- package/src/resources/ads.ts +295 -0
- package/src/resources/affiliates/affiliates.ts +39 -39
- package/src/resources/affiliates/index.ts +2 -2
- package/src/resources/affiliates/overrides.ts +51 -51
- package/src/resources/ai-chats.ts +33 -33
- package/src/resources/app-builds.ts +68 -68
- package/src/resources/apps.ts +86 -86
- package/src/resources/authorized-users.ts +48 -48
- package/src/resources/bounties.ts +353 -0
- package/src/resources/chat-channels.ts +57 -57
- package/src/resources/checkout-configurations.ts +101 -67
- package/src/resources/companies.ts +123 -41
- package/src/resources/company-token-transactions.ts +55 -55
- package/src/resources/conversions.ts +316 -0
- package/src/resources/course-chapters.ts +47 -47
- package/src/resources/course-lesson-interactions.ts +12 -12
- package/src/resources/course-lessons.ts +54 -54
- package/src/resources/course-students.ts +12 -12
- package/src/resources/courses.ts +51 -51
- package/src/resources/deposits.ts +87 -0
- package/src/resources/dispute-alerts.ts +18 -18
- package/src/resources/disputes.ts +18 -20
- package/src/resources/dm-channels.ts +45 -45
- package/src/resources/dm-members.ts +45 -45
- package/src/resources/entries.ts +10 -10
- package/src/resources/experiences.ts +64 -64
- package/src/resources/fee-markups.ts +44 -44
- package/src/resources/files.ts +22 -0
- package/src/resources/forum-posts.ts +65 -60
- package/src/resources/forums.ts +44 -44
- package/src/resources/index.ts +129 -57
- package/src/resources/invoices.ts +116 -110
- package/src/resources/leads.ts +64 -64
- package/src/resources/ledger-accounts.ts +41 -1
- package/src/resources/members.ts +14 -12
- package/src/resources/memberships.ts +80 -61
- package/src/resources/messages.ts +48 -48
- package/src/resources/payment-methods.ts +30 -30
- package/src/resources/payments.ts +229 -183
- package/src/resources/payout-accounts.ts +1 -1
- package/src/resources/payout-methods.ts +11 -11
- package/src/resources/plans.ts +153 -90
- package/src/resources/products.ts +98 -84
- package/src/resources/promo-codes.ts +74 -74
- package/src/resources/reactions.ts +33 -33
- package/src/resources/refunds.ts +65 -15
- package/src/resources/resolution-center-cases.ts +11 -12
- package/src/resources/reviews.ts +7 -7
- package/src/resources/setup-intents.ts +13 -13
- package/src/resources/shared.ts +107 -5
- package/src/resources/shipments.ts +44 -44
- package/src/resources/support-channels.ts +54 -49
- package/src/resources/swaps.ts +87 -0
- package/src/resources/transfers.ts +68 -66
- package/src/resources/users.ts +29 -29
- package/src/resources/verifications.ts +2 -2
- package/src/resources/wallets.ts +136 -0
- package/src/resources/webhooks.ts +2449 -1277
- package/src/resources/withdrawals.ts +55 -55
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -13,6 +13,25 @@ import { path } from '../internal/utils/path';
|
|
|
13
13
|
* Checkout configurations
|
|
14
14
|
*/
|
|
15
15
|
export class CheckoutConfigurations extends APIResource {
|
|
16
|
+
/**
|
|
17
|
+
* Returns a paginated list of checkout configurations for a company, with optional
|
|
18
|
+
* filtering by plan and creation date.
|
|
19
|
+
*
|
|
20
|
+
* Required permissions:
|
|
21
|
+
*
|
|
22
|
+
* - `checkout_configuration:basic:read`
|
|
23
|
+
*/
|
|
24
|
+
list(
|
|
25
|
+
query: CheckoutConfigurationListParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): PagePromise<CheckoutConfigurationListResponsesCursorPage, CheckoutConfigurationListResponse> {
|
|
28
|
+
return this._client.getAPIList(
|
|
29
|
+
'/checkout_configurations',
|
|
30
|
+
CursorPage<CheckoutConfigurationListResponse>,
|
|
31
|
+
{ query, ...options },
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
/**
|
|
17
36
|
* Creates a new checkout configuration
|
|
18
37
|
*
|
|
@@ -49,25 +68,6 @@ export class CheckoutConfigurations extends APIResource {
|
|
|
49
68
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.CheckoutConfiguration> {
|
|
50
69
|
return this._client.get(path`/checkout_configurations/${id}`, options);
|
|
51
70
|
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Returns a paginated list of checkout configurations for a company, with optional
|
|
55
|
-
* filtering by plan and creation date.
|
|
56
|
-
*
|
|
57
|
-
* Required permissions:
|
|
58
|
-
*
|
|
59
|
-
* - `checkout_configuration:basic:read`
|
|
60
|
-
*/
|
|
61
|
-
list(
|
|
62
|
-
query: CheckoutConfigurationListParams,
|
|
63
|
-
options?: RequestOptions,
|
|
64
|
-
): PagePromise<CheckoutConfigurationListResponsesCursorPage, CheckoutConfigurationListResponse> {
|
|
65
|
-
return this._client.getAPIList(
|
|
66
|
-
'/checkout_configurations',
|
|
67
|
-
CursorPage<CheckoutConfigurationListResponse>,
|
|
68
|
-
{ query, ...options },
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export type CheckoutConfigurationListResponsesCursorPage = CursorPage<CheckoutConfigurationListResponse>;
|
|
@@ -181,6 +181,12 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
181
181
|
*/
|
|
182
182
|
id: string;
|
|
183
183
|
|
|
184
|
+
/**
|
|
185
|
+
* Whether the creator has turned on adaptive pricing for this plan. Raw setting —
|
|
186
|
+
* does not check processor compatibility or feature flags.
|
|
187
|
+
*/
|
|
188
|
+
adaptive_pricing_enabled: boolean;
|
|
189
|
+
|
|
184
190
|
/**
|
|
185
191
|
* The number of days between each recurring charge. Null for one-time plans. For
|
|
186
192
|
* example, 30 for monthly or 365 for annual billing.
|
|
@@ -224,6 +230,11 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
224
230
|
*/
|
|
225
231
|
renewal_price: number;
|
|
226
232
|
|
|
233
|
+
/**
|
|
234
|
+
* The 3D Secure behavior for a plan.
|
|
235
|
+
*/
|
|
236
|
+
three_ds_level: 'mandate_challenge' | 'frictionless' | null;
|
|
237
|
+
|
|
227
238
|
/**
|
|
228
239
|
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
229
240
|
* no trial is configured or the current user has already used a trial for this
|
|
@@ -239,6 +250,49 @@ export namespace CheckoutConfigurationListResponse {
|
|
|
239
250
|
}
|
|
240
251
|
}
|
|
241
252
|
|
|
253
|
+
export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
254
|
+
/**
|
|
255
|
+
* The unique identifier of the company to list checkout configurations for.
|
|
256
|
+
*/
|
|
257
|
+
company_id: string;
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
261
|
+
*/
|
|
262
|
+
before?: string | null;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Only return checkout configurations created after this timestamp.
|
|
266
|
+
*/
|
|
267
|
+
created_after?: string | null;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Only return checkout configurations created before this timestamp.
|
|
271
|
+
*/
|
|
272
|
+
created_before?: string | null;
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The direction of the sort.
|
|
276
|
+
*/
|
|
277
|
+
direction?: Shared.Direction | null;
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Returns the first _n_ elements from the list.
|
|
281
|
+
*/
|
|
282
|
+
first?: number | null;
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Returns the last _n_ elements from the list.
|
|
286
|
+
*/
|
|
287
|
+
last?: number | null;
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Filter checkout configurations to only those associated with this plan
|
|
291
|
+
* identifier.
|
|
292
|
+
*/
|
|
293
|
+
plan_id?: string | null;
|
|
294
|
+
}
|
|
295
|
+
|
|
242
296
|
export type CheckoutConfigurationCreateParams =
|
|
243
297
|
| CheckoutConfigurationCreateParams.CreateCheckoutSessionInputModePaymentWithPlan
|
|
244
298
|
| CheckoutConfigurationCreateParams.CreateCheckoutSessionInputModePaymentWithPlanID
|
|
@@ -312,6 +366,11 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
312
366
|
*/
|
|
313
367
|
currency: Shared.Currency;
|
|
314
368
|
|
|
369
|
+
/**
|
|
370
|
+
* Whether this plan accepts local currency payments via adaptive pricing.
|
|
371
|
+
*/
|
|
372
|
+
adaptive_pricing_enabled?: boolean | null;
|
|
373
|
+
|
|
315
374
|
/**
|
|
316
375
|
* The application fee amount collected by the platform from this connected
|
|
317
376
|
* account. Provided as a number in dollars (e.g., 5.00 for $5.00). Must be less
|
|
@@ -496,7 +555,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
496
555
|
* in this configuration. The full list of default payment methods can be found in
|
|
497
556
|
* the documentation at docs.whop.com/payments.
|
|
498
557
|
*/
|
|
499
|
-
include_platform_defaults
|
|
558
|
+
include_platform_defaults?: boolean | null;
|
|
500
559
|
}
|
|
501
560
|
|
|
502
561
|
/**
|
|
@@ -575,6 +634,12 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
575
634
|
* defaults.
|
|
576
635
|
*/
|
|
577
636
|
export interface CheckoutStyling {
|
|
637
|
+
/**
|
|
638
|
+
* A hex color code for the checkout page background, applied to the order summary
|
|
639
|
+
* panel (e.g. #F4F4F5).
|
|
640
|
+
*/
|
|
641
|
+
background_color?: string | null;
|
|
642
|
+
|
|
578
643
|
/**
|
|
579
644
|
* The different border-radius styles available for checkout pages.
|
|
580
645
|
*/
|
|
@@ -615,7 +680,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
615
680
|
* in this configuration. The full list of default payment methods can be found in
|
|
616
681
|
* the documentation at docs.whop.com/payments.
|
|
617
682
|
*/
|
|
618
|
-
include_platform_defaults
|
|
683
|
+
include_platform_defaults?: boolean | null;
|
|
619
684
|
}
|
|
620
685
|
}
|
|
621
686
|
|
|
@@ -678,6 +743,12 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
678
743
|
* defaults.
|
|
679
744
|
*/
|
|
680
745
|
export interface CheckoutStyling {
|
|
746
|
+
/**
|
|
747
|
+
* A hex color code for the checkout page background, applied to the order summary
|
|
748
|
+
* panel (e.g. #F4F4F5).
|
|
749
|
+
*/
|
|
750
|
+
background_color?: string | null;
|
|
751
|
+
|
|
681
752
|
/**
|
|
682
753
|
* The different border-radius styles available for checkout pages.
|
|
683
754
|
*/
|
|
@@ -718,7 +789,7 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
718
789
|
* in this configuration. The full list of default payment methods can be found in
|
|
719
790
|
* the documentation at docs.whop.com/payments.
|
|
720
791
|
*/
|
|
721
|
-
include_platform_defaults
|
|
792
|
+
include_platform_defaults?: boolean | null;
|
|
722
793
|
}
|
|
723
794
|
}
|
|
724
795
|
|
|
@@ -776,6 +847,12 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
776
847
|
* defaults.
|
|
777
848
|
*/
|
|
778
849
|
export interface CheckoutStyling {
|
|
850
|
+
/**
|
|
851
|
+
* A hex color code for the checkout page background, applied to the order summary
|
|
852
|
+
* panel (e.g. #F4F4F5).
|
|
853
|
+
*/
|
|
854
|
+
background_color?: string | null;
|
|
855
|
+
|
|
779
856
|
/**
|
|
780
857
|
* The different border-radius styles available for checkout pages.
|
|
781
858
|
*/
|
|
@@ -816,60 +893,17 @@ export declare namespace CheckoutConfigurationCreateParams {
|
|
|
816
893
|
* in this configuration. The full list of default payment methods can be found in
|
|
817
894
|
* the documentation at docs.whop.com/payments.
|
|
818
895
|
*/
|
|
819
|
-
include_platform_defaults
|
|
896
|
+
include_platform_defaults?: boolean | null;
|
|
820
897
|
}
|
|
821
898
|
}
|
|
822
899
|
}
|
|
823
900
|
|
|
824
|
-
export interface CheckoutConfigurationListParams extends CursorPageParams {
|
|
825
|
-
/**
|
|
826
|
-
* The unique identifier of the company to list checkout configurations for.
|
|
827
|
-
*/
|
|
828
|
-
company_id: string;
|
|
829
|
-
|
|
830
|
-
/**
|
|
831
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
832
|
-
*/
|
|
833
|
-
before?: string | null;
|
|
834
|
-
|
|
835
|
-
/**
|
|
836
|
-
* Only return checkout configurations created after this timestamp.
|
|
837
|
-
*/
|
|
838
|
-
created_after?: string | null;
|
|
839
|
-
|
|
840
|
-
/**
|
|
841
|
-
* Only return checkout configurations created before this timestamp.
|
|
842
|
-
*/
|
|
843
|
-
created_before?: string | null;
|
|
844
|
-
|
|
845
|
-
/**
|
|
846
|
-
* The direction of the sort.
|
|
847
|
-
*/
|
|
848
|
-
direction?: Shared.Direction | null;
|
|
849
|
-
|
|
850
|
-
/**
|
|
851
|
-
* Returns the first _n_ elements from the list.
|
|
852
|
-
*/
|
|
853
|
-
first?: number | null;
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
* Returns the last _n_ elements from the list.
|
|
857
|
-
*/
|
|
858
|
-
last?: number | null;
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Filter checkout configurations to only those associated with this plan
|
|
862
|
-
* identifier.
|
|
863
|
-
*/
|
|
864
|
-
plan_id?: string | null;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
901
|
export declare namespace CheckoutConfigurations {
|
|
868
902
|
export {
|
|
869
903
|
type CheckoutModes as CheckoutModes,
|
|
870
904
|
type CheckoutConfigurationListResponse as CheckoutConfigurationListResponse,
|
|
871
905
|
type CheckoutConfigurationListResponsesCursorPage as CheckoutConfigurationListResponsesCursorPage,
|
|
872
|
-
type CheckoutConfigurationCreateParams as CheckoutConfigurationCreateParams,
|
|
873
906
|
type CheckoutConfigurationListParams as CheckoutConfigurationListParams,
|
|
907
|
+
type CheckoutConfigurationCreateParams as CheckoutConfigurationCreateParams,
|
|
874
908
|
};
|
|
875
909
|
}
|
|
@@ -13,27 +13,43 @@ import { path } from '../internal/utils/path';
|
|
|
13
13
|
*/
|
|
14
14
|
export class Companies extends APIResource {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
* a platform, or omit it to create a company for the current user.
|
|
16
|
+
* Retrieves the details of an existing company.
|
|
18
17
|
*
|
|
19
18
|
* Required permissions:
|
|
20
19
|
*
|
|
21
|
-
* - `company:create`
|
|
22
20
|
* - `company:basic:read`
|
|
23
21
|
*/
|
|
24
|
-
|
|
25
|
-
return this._client.
|
|
22
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Company> {
|
|
23
|
+
return this._client.get(path`/companies/${id}`, options);
|
|
26
24
|
}
|
|
27
25
|
|
|
28
26
|
/**
|
|
29
|
-
*
|
|
27
|
+
* Returns a paginated list of companies. When parent_company_id is provided, lists
|
|
28
|
+
* connected accounts under that platform. When omitted, lists companies the
|
|
29
|
+
* current user has access to.
|
|
30
30
|
*
|
|
31
31
|
* Required permissions:
|
|
32
32
|
*
|
|
33
33
|
* - `company:basic:read`
|
|
34
34
|
*/
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
list(
|
|
36
|
+
query: CompanyListParams | null | undefined = {},
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse> {
|
|
39
|
+
return this._client.getAPIList('/companies', CursorPage<CompanyListResponse>, { query, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Create a new company. Pass parent_company_id to create a connected account under
|
|
44
|
+
* a platform, or omit it to create a company for the current user.
|
|
45
|
+
*
|
|
46
|
+
* Required permissions:
|
|
47
|
+
*
|
|
48
|
+
* - `company:create`
|
|
49
|
+
* - `company:basic:read`
|
|
50
|
+
*/
|
|
51
|
+
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company> {
|
|
52
|
+
return this._client.post('/companies', { body, ...options });
|
|
37
53
|
}
|
|
38
54
|
|
|
39
55
|
/**
|
|
@@ -53,19 +69,15 @@ export class Companies extends APIResource {
|
|
|
53
69
|
}
|
|
54
70
|
|
|
55
71
|
/**
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* current user has access to.
|
|
59
|
-
*
|
|
60
|
-
* Required permissions:
|
|
61
|
-
*
|
|
62
|
-
* - `company:basic:read`
|
|
72
|
+
* Create an API key for a connected account (child company) owned by a parent
|
|
73
|
+
* company.
|
|
63
74
|
*/
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
createAPIKey(
|
|
76
|
+
parentCompanyID: string,
|
|
77
|
+
body: CompanyCreateAPIKeyParams,
|
|
66
78
|
options?: RequestOptions,
|
|
67
|
-
):
|
|
68
|
-
return this._client.
|
|
79
|
+
): APIPromise<CompanyCreateAPIKeyResponse> {
|
|
80
|
+
return this._client.post(path`/companies/${parentCompanyID}/api_keys`, { body, ...options });
|
|
69
81
|
}
|
|
70
82
|
}
|
|
71
83
|
|
|
@@ -199,6 +211,65 @@ export namespace CompanyListResponse {
|
|
|
199
211
|
}
|
|
200
212
|
}
|
|
201
213
|
|
|
214
|
+
/**
|
|
215
|
+
* An API key created for a child company, including the one-time secret key.
|
|
216
|
+
*/
|
|
217
|
+
export interface CompanyCreateAPIKeyResponse {
|
|
218
|
+
/**
|
|
219
|
+
* The unique identifier for the authorized api key.
|
|
220
|
+
*/
|
|
221
|
+
id: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* A user set name to identify an API key
|
|
225
|
+
*/
|
|
226
|
+
name: string | null;
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* The secret key used to authenticate requests. Only returned at creation time.
|
|
230
|
+
*/
|
|
231
|
+
secret_key: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface CompanyListParams extends CursorPageParams {
|
|
235
|
+
/**
|
|
236
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
237
|
+
*/
|
|
238
|
+
before?: string | null;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Only return companies created after this timestamp.
|
|
242
|
+
*/
|
|
243
|
+
created_after?: string | null;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Only return companies created before this timestamp.
|
|
247
|
+
*/
|
|
248
|
+
created_before?: string | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* The direction of the sort.
|
|
252
|
+
*/
|
|
253
|
+
direction?: Shared.Direction | null;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Returns the first _n_ elements from the list.
|
|
257
|
+
*/
|
|
258
|
+
first?: number | null;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Returns the last _n_ elements from the list.
|
|
262
|
+
*/
|
|
263
|
+
last?: number | null;
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* The unique identifier of the parent platform company. When provided, lists
|
|
267
|
+
* connected accounts under that platform. Omit to list the current user's own
|
|
268
|
+
* companies.
|
|
269
|
+
*/
|
|
270
|
+
parent_company_id?: string | null;
|
|
271
|
+
}
|
|
272
|
+
|
|
202
273
|
export interface CompanyCreateParams {
|
|
203
274
|
/**
|
|
204
275
|
* The display name of the company shown to customers.
|
|
@@ -388,52 +459,63 @@ export namespace CompanyUpdateParams {
|
|
|
388
459
|
}
|
|
389
460
|
}
|
|
390
461
|
|
|
391
|
-
export interface
|
|
462
|
+
export interface CompanyCreateAPIKeyParams {
|
|
392
463
|
/**
|
|
393
|
-
*
|
|
464
|
+
* The unique identifier of the connected account to create the API key for (e.g.
|
|
465
|
+
* 'biz_xxx').
|
|
394
466
|
*/
|
|
395
|
-
|
|
467
|
+
child_company_id: string;
|
|
396
468
|
|
|
397
469
|
/**
|
|
398
|
-
*
|
|
470
|
+
* A human-readable name for the API key, such as 'Production API Key'.
|
|
399
471
|
*/
|
|
400
|
-
|
|
472
|
+
name?: string | null;
|
|
401
473
|
|
|
402
474
|
/**
|
|
403
|
-
*
|
|
475
|
+
* Granular permission statements defining which actions this API key can perform.
|
|
476
|
+
* Either permissions or role must be provided.
|
|
404
477
|
*/
|
|
405
|
-
|
|
478
|
+
permissions?: Array<CompanyCreateAPIKeyParams.Permission> | null;
|
|
406
479
|
|
|
407
480
|
/**
|
|
408
|
-
* The
|
|
481
|
+
* The different system roles that can be assigned.
|
|
409
482
|
*/
|
|
410
|
-
|
|
483
|
+
role?: 'owner' | 'admin' | 'moderator' | 'sales_manager' | 'advertiser' | null;
|
|
484
|
+
}
|
|
411
485
|
|
|
486
|
+
export namespace CompanyCreateAPIKeyParams {
|
|
412
487
|
/**
|
|
413
|
-
*
|
|
488
|
+
* Input for a single permissions statement
|
|
414
489
|
*/
|
|
415
|
-
|
|
490
|
+
export interface Permission {
|
|
491
|
+
/**
|
|
492
|
+
* Actions covered by this statement
|
|
493
|
+
*/
|
|
494
|
+
actions: Array<string>;
|
|
416
495
|
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
496
|
+
/**
|
|
497
|
+
* Whether the actions are granted or denied
|
|
498
|
+
*/
|
|
499
|
+
grant: boolean;
|
|
421
500
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
501
|
+
/**
|
|
502
|
+
* Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or
|
|
503
|
+
* 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or
|
|
504
|
+
* 'biz_xxx|pass*_'
|
|
505
|
+
*/
|
|
506
|
+
resources: Array<string>;
|
|
507
|
+
}
|
|
428
508
|
}
|
|
429
509
|
|
|
430
510
|
export declare namespace Companies {
|
|
431
511
|
export {
|
|
432
512
|
type SocialLinkWebsites as SocialLinkWebsites,
|
|
433
513
|
type CompanyListResponse as CompanyListResponse,
|
|
514
|
+
type CompanyCreateAPIKeyResponse as CompanyCreateAPIKeyResponse,
|
|
434
515
|
type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage,
|
|
516
|
+
type CompanyListParams as CompanyListParams,
|
|
435
517
|
type CompanyCreateParams as CompanyCreateParams,
|
|
436
518
|
type CompanyUpdateParams as CompanyUpdateParams,
|
|
437
|
-
type
|
|
519
|
+
type CompanyCreateAPIKeyParams as CompanyCreateAPIKeyParams,
|
|
438
520
|
};
|
|
439
521
|
}
|
|
@@ -10,6 +10,28 @@ import { path } from '../internal/utils/path';
|
|
|
10
10
|
* Company token transactions
|
|
11
11
|
*/
|
|
12
12
|
export class CompanyTokenTransactions extends APIResource {
|
|
13
|
+
/**
|
|
14
|
+
* Returns a paginated list of token transactions for a user or company, depending
|
|
15
|
+
* on the authenticated actor, with optional filtering by user and transaction
|
|
16
|
+
* type.
|
|
17
|
+
*
|
|
18
|
+
* Required permissions:
|
|
19
|
+
*
|
|
20
|
+
* - `company_token_transaction:read`
|
|
21
|
+
* - `member:basic:read`
|
|
22
|
+
* - `company:basic:read`
|
|
23
|
+
*/
|
|
24
|
+
list(
|
|
25
|
+
query: CompanyTokenTransactionListParams,
|
|
26
|
+
options?: RequestOptions,
|
|
27
|
+
): PagePromise<CompanyTokenTransactionListResponsesCursorPage, CompanyTokenTransactionListResponse> {
|
|
28
|
+
return this._client.getAPIList(
|
|
29
|
+
'/company_token_transactions',
|
|
30
|
+
CursorPage<CompanyTokenTransactionListResponse>,
|
|
31
|
+
{ query, ...options },
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
13
35
|
/**
|
|
14
36
|
* Create a token transaction to add, subtract, or transfer tokens for a member
|
|
15
37
|
* within a company.
|
|
@@ -51,28 +73,6 @@ export class CompanyTokenTransactions extends APIResource {
|
|
|
51
73
|
retrieve(id: string, options?: RequestOptions): APIPromise<CompanyTokenTransaction> {
|
|
52
74
|
return this._client.get(path`/company_token_transactions/${id}`, options);
|
|
53
75
|
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Returns a paginated list of token transactions for a user or company, depending
|
|
57
|
-
* on the authenticated actor, with optional filtering by user and transaction
|
|
58
|
-
* type.
|
|
59
|
-
*
|
|
60
|
-
* Required permissions:
|
|
61
|
-
*
|
|
62
|
-
* - `company_token_transaction:read`
|
|
63
|
-
* - `member:basic:read`
|
|
64
|
-
* - `company:basic:read`
|
|
65
|
-
*/
|
|
66
|
-
list(
|
|
67
|
-
query: CompanyTokenTransactionListParams,
|
|
68
|
-
options?: RequestOptions,
|
|
69
|
-
): PagePromise<CompanyTokenTransactionListResponsesCursorPage, CompanyTokenTransactionListResponse> {
|
|
70
|
-
return this._client.getAPIList(
|
|
71
|
-
'/company_token_transactions',
|
|
72
|
-
CursorPage<CompanyTokenTransactionListResponse>,
|
|
73
|
-
{ query, ...options },
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export type CompanyTokenTransactionListResponsesCursorPage = CursorPage<CompanyTokenTransactionListResponse>;
|
|
@@ -306,6 +306,38 @@ export namespace CompanyTokenTransactionListResponse {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
|
|
309
|
+
export interface CompanyTokenTransactionListParams extends CursorPageParams {
|
|
310
|
+
/**
|
|
311
|
+
* The unique identifier of the company to list token transactions for.
|
|
312
|
+
*/
|
|
313
|
+
company_id: string;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
317
|
+
*/
|
|
318
|
+
before?: string | null;
|
|
319
|
+
|
|
320
|
+
/**
|
|
321
|
+
* Returns the first _n_ elements from the list.
|
|
322
|
+
*/
|
|
323
|
+
first?: number | null;
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Returns the last _n_ elements from the list.
|
|
327
|
+
*/
|
|
328
|
+
last?: number | null;
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* The type of token transaction
|
|
332
|
+
*/
|
|
333
|
+
transaction_type?: CompanyTokenTransactionType | null;
|
|
334
|
+
|
|
335
|
+
/**
|
|
336
|
+
* Filter transactions to only those involving this specific user.
|
|
337
|
+
*/
|
|
338
|
+
user_id?: string | null;
|
|
339
|
+
}
|
|
340
|
+
|
|
309
341
|
export type CompanyTokenTransactionCreateParams =
|
|
310
342
|
| CompanyTokenTransactionCreateParams.CreateCompanyTokenTransactionInputTransactionTypeTransfer
|
|
311
343
|
| CompanyTokenTransactionCreateParams.CreateCompanyTokenTransactionInputTransactionTypeAdd
|
|
@@ -415,45 +447,13 @@ export declare namespace CompanyTokenTransactionCreateParams {
|
|
|
415
447
|
}
|
|
416
448
|
}
|
|
417
449
|
|
|
418
|
-
export interface CompanyTokenTransactionListParams extends CursorPageParams {
|
|
419
|
-
/**
|
|
420
|
-
* The unique identifier of the company to list token transactions for.
|
|
421
|
-
*/
|
|
422
|
-
company_id: string;
|
|
423
|
-
|
|
424
|
-
/**
|
|
425
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
426
|
-
*/
|
|
427
|
-
before?: string | null;
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* Returns the first _n_ elements from the list.
|
|
431
|
-
*/
|
|
432
|
-
first?: number | null;
|
|
433
|
-
|
|
434
|
-
/**
|
|
435
|
-
* Returns the last _n_ elements from the list.
|
|
436
|
-
*/
|
|
437
|
-
last?: number | null;
|
|
438
|
-
|
|
439
|
-
/**
|
|
440
|
-
* The type of token transaction
|
|
441
|
-
*/
|
|
442
|
-
transaction_type?: CompanyTokenTransactionType | null;
|
|
443
|
-
|
|
444
|
-
/**
|
|
445
|
-
* Filter transactions to only those involving this specific user.
|
|
446
|
-
*/
|
|
447
|
-
user_id?: string | null;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
450
|
export declare namespace CompanyTokenTransactions {
|
|
451
451
|
export {
|
|
452
452
|
type CompanyTokenTransaction as CompanyTokenTransaction,
|
|
453
453
|
type CompanyTokenTransactionType as CompanyTokenTransactionType,
|
|
454
454
|
type CompanyTokenTransactionListResponse as CompanyTokenTransactionListResponse,
|
|
455
455
|
type CompanyTokenTransactionListResponsesCursorPage as CompanyTokenTransactionListResponsesCursorPage,
|
|
456
|
-
type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
|
|
457
456
|
type CompanyTokenTransactionListParams as CompanyTokenTransactionListParams,
|
|
457
|
+
type CompanyTokenTransactionCreateParams as CompanyTokenTransactionCreateParams,
|
|
458
458
|
};
|
|
459
459
|
}
|