@whop/sdk 0.0.39 → 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 +19 -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 +73 -45
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +73 -45
- 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 +86 -81
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +86 -81
- 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 +61 -47
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +61 -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 +172 -145
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +172 -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 +128 -70
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +128 -70
- 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 +89 -6
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +89 -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 +35 -34
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +35 -34
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +21 -21
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +21 -21
- 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 +97 -63
- 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 +23 -1
- 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 +113 -107
- 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 +73 -61
- package/src/resources/messages.ts +48 -48
- package/src/resources/payment-methods.ts +30 -30
- package/src/resources/payments.ts +222 -183
- package/src/resources/payout-accounts.ts +1 -1
- package/src/resources/payout-methods.ts +11 -11
- package/src/resources/plans.ts +151 -88
- 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 +94 -5
- package/src/resources/shipments.ts +44 -44
- package/src/resources/support-channels.ts +46 -45
- 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
|
@@ -6,6 +6,17 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
6
6
|
* Checkout configurations
|
|
7
7
|
*/
|
|
8
8
|
export class CheckoutConfigurations extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Returns a paginated list of checkout configurations for a company, with optional
|
|
11
|
+
* filtering by plan and creation date.
|
|
12
|
+
*
|
|
13
|
+
* Required permissions:
|
|
14
|
+
*
|
|
15
|
+
* - `checkout_configuration:basic:read`
|
|
16
|
+
*/
|
|
17
|
+
list(query, options) {
|
|
18
|
+
return this._client.getAPIList('/checkout_configurations', (CursorPage), { query, ...options });
|
|
19
|
+
}
|
|
9
20
|
/**
|
|
10
21
|
* Creates a new checkout configuration
|
|
11
22
|
*
|
|
@@ -38,16 +49,5 @@ export class CheckoutConfigurations extends APIResource {
|
|
|
38
49
|
retrieve(id, options) {
|
|
39
50
|
return this._client.get(path `/checkout_configurations/${id}`, options);
|
|
40
51
|
}
|
|
41
|
-
/**
|
|
42
|
-
* Returns a paginated list of checkout configurations for a company, with optional
|
|
43
|
-
* filtering by plan and creation date.
|
|
44
|
-
*
|
|
45
|
-
* Required permissions:
|
|
46
|
-
*
|
|
47
|
-
* - `checkout_configuration:basic:read`
|
|
48
|
-
*/
|
|
49
|
-
list(query, options) {
|
|
50
|
-
return this._client.getAPIList('/checkout_configurations', (CursorPage), { query, ...options });
|
|
51
|
-
}
|
|
52
52
|
}
|
|
53
53
|
//# sourceMappingURL=checkout-configurations.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkout-configurations.mjs","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD
|
|
1
|
+
{"version":3,"file":"checkout-configurations.mjs","sourceRoot":"","sources":["../src/resources/checkout-configurations.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAKf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,sBAAuB,SAAQ,WAAW;IACrD;;;;;;;OAOG;IACH,IAAI,CACF,KAAsC,EACtC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,0BAA0B,EAC1B,CAAA,UAA6C,CAAA,EAC7C,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CACJ,IAAuC,EACvC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,4BAA4B,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;CACF"}
|
|
@@ -9,42 +9,47 @@ import { RequestOptions } from "../internal/request-options.mjs";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class Companies extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* a platform, or omit it to create a company for the current user.
|
|
12
|
+
* Retrieves the details of an existing company.
|
|
14
13
|
*
|
|
15
14
|
* Required permissions:
|
|
16
15
|
*
|
|
17
|
-
* - `company:create`
|
|
18
16
|
* - `company:basic:read`
|
|
19
17
|
*/
|
|
20
|
-
|
|
18
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* Returns a paginated list of companies. When parent_company_id is provided, lists
|
|
21
|
+
* connected accounts under that platform. When omitted, lists companies the
|
|
22
|
+
* current user has access to.
|
|
23
23
|
*
|
|
24
24
|
* Required permissions:
|
|
25
25
|
*
|
|
26
26
|
* - `company:basic:read`
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
list(query?: CompanyListParams | null | undefined, options?: RequestOptions): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse>;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Create a new company. Pass parent_company_id to create a connected account under
|
|
31
|
+
* a platform, or omit it to create a company for the current user.
|
|
31
32
|
*
|
|
32
33
|
* Required permissions:
|
|
33
34
|
*
|
|
34
|
-
* - `company:
|
|
35
|
+
* - `company:create`
|
|
35
36
|
* - `company:basic:read`
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
+
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
38
39
|
/**
|
|
39
|
-
*
|
|
40
|
-
* connected accounts under that platform. When omitted, lists companies the
|
|
41
|
-
* current user has access to.
|
|
40
|
+
* Update a company's title, description, logo, and other settings.
|
|
42
41
|
*
|
|
43
42
|
* Required permissions:
|
|
44
43
|
*
|
|
44
|
+
* - `company:update`
|
|
45
45
|
* - `company:basic:read`
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
update(id: string, body?: CompanyUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
48
|
+
/**
|
|
49
|
+
* Create an API key for a connected account (child company) owned by a parent
|
|
50
|
+
* company.
|
|
51
|
+
*/
|
|
52
|
+
createAPIKey(parentCompanyID: string, body: CompanyCreateAPIKeyParams, options?: RequestOptions): APIPromise<CompanyCreateAPIKeyResponse>;
|
|
48
53
|
}
|
|
49
54
|
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
50
55
|
/**
|
|
@@ -149,6 +154,55 @@ export declare namespace CompanyListResponse {
|
|
|
149
154
|
username: string;
|
|
150
155
|
}
|
|
151
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* An API key created for a child company, including the one-time secret key.
|
|
159
|
+
*/
|
|
160
|
+
export interface CompanyCreateAPIKeyResponse {
|
|
161
|
+
/**
|
|
162
|
+
* The unique identifier for the authorized api key.
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
/**
|
|
166
|
+
* A user set name to identify an API key
|
|
167
|
+
*/
|
|
168
|
+
name: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* The secret key used to authenticate requests. Only returned at creation time.
|
|
171
|
+
*/
|
|
172
|
+
secret_key: string;
|
|
173
|
+
}
|
|
174
|
+
export interface CompanyListParams extends CursorPageParams {
|
|
175
|
+
/**
|
|
176
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
177
|
+
*/
|
|
178
|
+
before?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Only return companies created after this timestamp.
|
|
181
|
+
*/
|
|
182
|
+
created_after?: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Only return companies created before this timestamp.
|
|
185
|
+
*/
|
|
186
|
+
created_before?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* The direction of the sort.
|
|
189
|
+
*/
|
|
190
|
+
direction?: Shared.Direction | null;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the first _n_ elements from the list.
|
|
193
|
+
*/
|
|
194
|
+
first?: number | null;
|
|
195
|
+
/**
|
|
196
|
+
* Returns the last _n_ elements from the list.
|
|
197
|
+
*/
|
|
198
|
+
last?: number | null;
|
|
199
|
+
/**
|
|
200
|
+
* The unique identifier of the parent platform company. When provided, lists
|
|
201
|
+
* connected accounts under that platform. Omit to list the current user's own
|
|
202
|
+
* companies.
|
|
203
|
+
*/
|
|
204
|
+
parent_company_id?: string | null;
|
|
205
|
+
}
|
|
152
206
|
export interface CompanyCreateParams {
|
|
153
207
|
/**
|
|
154
208
|
* The display name of the company shown to customers.
|
|
@@ -312,39 +366,48 @@ export declare namespace CompanyUpdateParams {
|
|
|
312
366
|
}
|
|
313
367
|
}
|
|
314
368
|
}
|
|
315
|
-
export interface
|
|
316
|
-
/**
|
|
317
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
318
|
-
*/
|
|
319
|
-
before?: string | null;
|
|
369
|
+
export interface CompanyCreateAPIKeyParams {
|
|
320
370
|
/**
|
|
321
|
-
*
|
|
371
|
+
* The unique identifier of the connected account to create the API key for (e.g.
|
|
372
|
+
* 'biz_xxx').
|
|
322
373
|
*/
|
|
323
|
-
|
|
374
|
+
child_company_id: string;
|
|
324
375
|
/**
|
|
325
|
-
*
|
|
376
|
+
* A human-readable name for the API key, such as 'Production API Key'.
|
|
326
377
|
*/
|
|
327
|
-
|
|
378
|
+
name?: string | null;
|
|
328
379
|
/**
|
|
329
|
-
*
|
|
380
|
+
* Granular permission statements defining which actions this API key can perform.
|
|
381
|
+
* Either permissions or role must be provided.
|
|
330
382
|
*/
|
|
331
|
-
|
|
383
|
+
permissions?: Array<CompanyCreateAPIKeyParams.Permission> | null;
|
|
332
384
|
/**
|
|
333
|
-
*
|
|
334
|
-
*/
|
|
335
|
-
first?: number | null;
|
|
336
|
-
/**
|
|
337
|
-
* Returns the last _n_ elements from the list.
|
|
385
|
+
* The different system roles that can be assigned.
|
|
338
386
|
*/
|
|
339
|
-
|
|
387
|
+
role?: 'owner' | 'admin' | 'moderator' | 'sales_manager' | 'advertiser' | null;
|
|
388
|
+
}
|
|
389
|
+
export declare namespace CompanyCreateAPIKeyParams {
|
|
340
390
|
/**
|
|
341
|
-
*
|
|
342
|
-
* connected accounts under that platform. Omit to list the current user's own
|
|
343
|
-
* companies.
|
|
391
|
+
* Input for a single permissions statement
|
|
344
392
|
*/
|
|
345
|
-
|
|
393
|
+
interface Permission {
|
|
394
|
+
/**
|
|
395
|
+
* Actions covered by this statement
|
|
396
|
+
*/
|
|
397
|
+
actions: Array<string>;
|
|
398
|
+
/**
|
|
399
|
+
* Whether the actions are granted or denied
|
|
400
|
+
*/
|
|
401
|
+
grant: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or
|
|
404
|
+
* 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or
|
|
405
|
+
* 'biz_xxx|pass*_'
|
|
406
|
+
*/
|
|
407
|
+
resources: Array<string>;
|
|
408
|
+
}
|
|
346
409
|
}
|
|
347
410
|
export declare namespace Companies {
|
|
348
|
-
export { type SocialLinkWebsites as SocialLinkWebsites, type CompanyListResponse as CompanyListResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type
|
|
411
|
+
export { type SocialLinkWebsites as SocialLinkWebsites, type CompanyListResponse as CompanyListResponse, type CompanyCreateAPIKeyResponse as CompanyCreateAPIKeyResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyListParams as CompanyListParams, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type CompanyCreateAPIKeyParams as CompanyCreateAPIKeyParams, };
|
|
349
412
|
}
|
|
350
413
|
//# sourceMappingURL=companies.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.mts","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.d.mts","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1E;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAAG,IAAI,GAAG,SAAc,EAChD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,8BAA8B,EAAE,mBAAmB,CAAC;IAInE;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU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,OAAO,CAAC;QAEf;;;;WAIG;QACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/companies.d.ts
CHANGED
|
@@ -9,42 +9,47 @@ import { RequestOptions } from "../internal/request-options.js";
|
|
|
9
9
|
*/
|
|
10
10
|
export declare class Companies extends APIResource {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
13
|
-
* a platform, or omit it to create a company for the current user.
|
|
12
|
+
* Retrieves the details of an existing company.
|
|
14
13
|
*
|
|
15
14
|
* Required permissions:
|
|
16
15
|
*
|
|
17
|
-
* - `company:create`
|
|
18
16
|
* - `company:basic:read`
|
|
19
17
|
*/
|
|
20
|
-
|
|
18
|
+
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* Returns a paginated list of companies. When parent_company_id is provided, lists
|
|
21
|
+
* connected accounts under that platform. When omitted, lists companies the
|
|
22
|
+
* current user has access to.
|
|
23
23
|
*
|
|
24
24
|
* Required permissions:
|
|
25
25
|
*
|
|
26
26
|
* - `company:basic:read`
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
list(query?: CompanyListParams | null | undefined, options?: RequestOptions): PagePromise<CompanyListResponsesCursorPage, CompanyListResponse>;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Create a new company. Pass parent_company_id to create a connected account under
|
|
31
|
+
* a platform, or omit it to create a company for the current user.
|
|
31
32
|
*
|
|
32
33
|
* Required permissions:
|
|
33
34
|
*
|
|
34
|
-
* - `company:
|
|
35
|
+
* - `company:create`
|
|
35
36
|
* - `company:basic:read`
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
+
create(body: CompanyCreateParams, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
38
39
|
/**
|
|
39
|
-
*
|
|
40
|
-
* connected accounts under that platform. When omitted, lists companies the
|
|
41
|
-
* current user has access to.
|
|
40
|
+
* Update a company's title, description, logo, and other settings.
|
|
42
41
|
*
|
|
43
42
|
* Required permissions:
|
|
44
43
|
*
|
|
44
|
+
* - `company:update`
|
|
45
45
|
* - `company:basic:read`
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
update(id: string, body?: CompanyUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Company>;
|
|
48
|
+
/**
|
|
49
|
+
* Create an API key for a connected account (child company) owned by a parent
|
|
50
|
+
* company.
|
|
51
|
+
*/
|
|
52
|
+
createAPIKey(parentCompanyID: string, body: CompanyCreateAPIKeyParams, options?: RequestOptions): APIPromise<CompanyCreateAPIKeyResponse>;
|
|
48
53
|
}
|
|
49
54
|
export type CompanyListResponsesCursorPage = CursorPage<CompanyListResponse>;
|
|
50
55
|
/**
|
|
@@ -149,6 +154,55 @@ export declare namespace CompanyListResponse {
|
|
|
149
154
|
username: string;
|
|
150
155
|
}
|
|
151
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* An API key created for a child company, including the one-time secret key.
|
|
159
|
+
*/
|
|
160
|
+
export interface CompanyCreateAPIKeyResponse {
|
|
161
|
+
/**
|
|
162
|
+
* The unique identifier for the authorized api key.
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
/**
|
|
166
|
+
* A user set name to identify an API key
|
|
167
|
+
*/
|
|
168
|
+
name: string | null;
|
|
169
|
+
/**
|
|
170
|
+
* The secret key used to authenticate requests. Only returned at creation time.
|
|
171
|
+
*/
|
|
172
|
+
secret_key: string;
|
|
173
|
+
}
|
|
174
|
+
export interface CompanyListParams extends CursorPageParams {
|
|
175
|
+
/**
|
|
176
|
+
* Returns the elements in the list that come before the specified cursor.
|
|
177
|
+
*/
|
|
178
|
+
before?: string | null;
|
|
179
|
+
/**
|
|
180
|
+
* Only return companies created after this timestamp.
|
|
181
|
+
*/
|
|
182
|
+
created_after?: string | null;
|
|
183
|
+
/**
|
|
184
|
+
* Only return companies created before this timestamp.
|
|
185
|
+
*/
|
|
186
|
+
created_before?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* The direction of the sort.
|
|
189
|
+
*/
|
|
190
|
+
direction?: Shared.Direction | null;
|
|
191
|
+
/**
|
|
192
|
+
* Returns the first _n_ elements from the list.
|
|
193
|
+
*/
|
|
194
|
+
first?: number | null;
|
|
195
|
+
/**
|
|
196
|
+
* Returns the last _n_ elements from the list.
|
|
197
|
+
*/
|
|
198
|
+
last?: number | null;
|
|
199
|
+
/**
|
|
200
|
+
* The unique identifier of the parent platform company. When provided, lists
|
|
201
|
+
* connected accounts under that platform. Omit to list the current user's own
|
|
202
|
+
* companies.
|
|
203
|
+
*/
|
|
204
|
+
parent_company_id?: string | null;
|
|
205
|
+
}
|
|
152
206
|
export interface CompanyCreateParams {
|
|
153
207
|
/**
|
|
154
208
|
* The display name of the company shown to customers.
|
|
@@ -312,39 +366,48 @@ export declare namespace CompanyUpdateParams {
|
|
|
312
366
|
}
|
|
313
367
|
}
|
|
314
368
|
}
|
|
315
|
-
export interface
|
|
316
|
-
/**
|
|
317
|
-
* Returns the elements in the list that come before the specified cursor.
|
|
318
|
-
*/
|
|
319
|
-
before?: string | null;
|
|
369
|
+
export interface CompanyCreateAPIKeyParams {
|
|
320
370
|
/**
|
|
321
|
-
*
|
|
371
|
+
* The unique identifier of the connected account to create the API key for (e.g.
|
|
372
|
+
* 'biz_xxx').
|
|
322
373
|
*/
|
|
323
|
-
|
|
374
|
+
child_company_id: string;
|
|
324
375
|
/**
|
|
325
|
-
*
|
|
376
|
+
* A human-readable name for the API key, such as 'Production API Key'.
|
|
326
377
|
*/
|
|
327
|
-
|
|
378
|
+
name?: string | null;
|
|
328
379
|
/**
|
|
329
|
-
*
|
|
380
|
+
* Granular permission statements defining which actions this API key can perform.
|
|
381
|
+
* Either permissions or role must be provided.
|
|
330
382
|
*/
|
|
331
|
-
|
|
383
|
+
permissions?: Array<CompanyCreateAPIKeyParams.Permission> | null;
|
|
332
384
|
/**
|
|
333
|
-
*
|
|
334
|
-
*/
|
|
335
|
-
first?: number | null;
|
|
336
|
-
/**
|
|
337
|
-
* Returns the last _n_ elements from the list.
|
|
385
|
+
* The different system roles that can be assigned.
|
|
338
386
|
*/
|
|
339
|
-
|
|
387
|
+
role?: 'owner' | 'admin' | 'moderator' | 'sales_manager' | 'advertiser' | null;
|
|
388
|
+
}
|
|
389
|
+
export declare namespace CompanyCreateAPIKeyParams {
|
|
340
390
|
/**
|
|
341
|
-
*
|
|
342
|
-
* connected accounts under that platform. Omit to list the current user's own
|
|
343
|
-
* companies.
|
|
391
|
+
* Input for a single permissions statement
|
|
344
392
|
*/
|
|
345
|
-
|
|
393
|
+
interface Permission {
|
|
394
|
+
/**
|
|
395
|
+
* Actions covered by this statement
|
|
396
|
+
*/
|
|
397
|
+
actions: Array<string>;
|
|
398
|
+
/**
|
|
399
|
+
* Whether the actions are granted or denied
|
|
400
|
+
*/
|
|
401
|
+
grant: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* Resource identifiers. Can look like 'biz*xxxx' or 'biz_xxx|pass*_|exp*xxx' or
|
|
404
|
+
* 'biz_xxx|app_xxx' or 'biz_xxx|pass_xxx|exp_xxx' or 'biz_xxx|pass_xxx' or
|
|
405
|
+
* 'biz_xxx|pass*_'
|
|
406
|
+
*/
|
|
407
|
+
resources: Array<string>;
|
|
408
|
+
}
|
|
346
409
|
}
|
|
347
410
|
export declare namespace Companies {
|
|
348
|
-
export { type SocialLinkWebsites as SocialLinkWebsites, type CompanyListResponse as CompanyListResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type
|
|
411
|
+
export { type SocialLinkWebsites as SocialLinkWebsites, type CompanyListResponse as CompanyListResponse, type CompanyCreateAPIKeyResponse as CompanyCreateAPIKeyResponse, type CompanyListResponsesCursorPage as CompanyListResponsesCursorPage, type CompanyListParams as CompanyListParams, type CompanyCreateParams as CompanyCreateParams, type CompanyUpdateParams as CompanyUpdateParams, type CompanyCreateAPIKeyParams as CompanyCreateAPIKeyParams, };
|
|
349
412
|
}
|
|
350
413
|
//# sourceMappingURL=companies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC;IAI1E;;;;;;;;OAQG;IACH,IAAI,CACF,KAAK,GAAE,iBAAiB,GAA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AAG,eAAe,GAAG,YAAY,GAAG,IAAI,CAAC;CAChF;AAED,yBAAiB,yBAAyB,CAAC;IACzC;;OAEG;IACH,UAAiB,UAAU;QACzB;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAEvB;;WAEG;QACH,KAAK,EAAE,OAAO,CAAC;QAEf;;;;WAIG;QACH,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;KAC1B;CACF;AAED,MAAM,CAAC,OAAO,WAAW,SAAS,CAAC;IACjC,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,8BAA8B,IAAI,8BAA8B,EACrE,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
package/resources/companies.js
CHANGED
|
@@ -10,49 +10,56 @@ const path_1 = require("../internal/utils/path.js");
|
|
|
10
10
|
*/
|
|
11
11
|
class Companies extends resource_1.APIResource {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
* a platform, or omit it to create a company for the current user.
|
|
13
|
+
* Retrieves the details of an existing company.
|
|
15
14
|
*
|
|
16
15
|
* Required permissions:
|
|
17
16
|
*
|
|
18
|
-
* - `company:create`
|
|
19
17
|
* - `company:basic:read`
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
|
-
return this._client.
|
|
19
|
+
retrieve(id, options) {
|
|
20
|
+
return this._client.get((0, path_1.path) `/companies/${id}`, options);
|
|
23
21
|
}
|
|
24
22
|
/**
|
|
25
|
-
*
|
|
23
|
+
* Returns a paginated list of companies. When parent_company_id is provided, lists
|
|
24
|
+
* connected accounts under that platform. When omitted, lists companies the
|
|
25
|
+
* current user has access to.
|
|
26
26
|
*
|
|
27
27
|
* Required permissions:
|
|
28
28
|
*
|
|
29
29
|
* - `company:basic:read`
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
|
-
return this._client.
|
|
31
|
+
list(query = {}, options) {
|
|
32
|
+
return this._client.getAPIList('/companies', (pagination_1.CursorPage), { query, ...options });
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Create a new company. Pass parent_company_id to create a connected account under
|
|
36
|
+
* a platform, or omit it to create a company for the current user.
|
|
36
37
|
*
|
|
37
38
|
* Required permissions:
|
|
38
39
|
*
|
|
39
|
-
* - `company:
|
|
40
|
+
* - `company:create`
|
|
40
41
|
* - `company:basic:read`
|
|
41
42
|
*/
|
|
42
|
-
|
|
43
|
-
return this._client.
|
|
43
|
+
create(body, options) {
|
|
44
|
+
return this._client.post('/companies', { body, ...options });
|
|
44
45
|
}
|
|
45
46
|
/**
|
|
46
|
-
*
|
|
47
|
-
* connected accounts under that platform. When omitted, lists companies the
|
|
48
|
-
* current user has access to.
|
|
47
|
+
* Update a company's title, description, logo, and other settings.
|
|
49
48
|
*
|
|
50
49
|
* Required permissions:
|
|
51
50
|
*
|
|
51
|
+
* - `company:update`
|
|
52
52
|
* - `company:basic:read`
|
|
53
53
|
*/
|
|
54
|
-
|
|
55
|
-
return this._client.
|
|
54
|
+
update(id, body = {}, options) {
|
|
55
|
+
return this._client.patch((0, path_1.path) `/companies/${id}`, { body, ...options });
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create an API key for a connected account (child company) owned by a parent
|
|
59
|
+
* company.
|
|
60
|
+
*/
|
|
61
|
+
createAPIKey(parentCompanyID, body, options) {
|
|
62
|
+
return this._client.post((0, path_1.path) `/companies/${parentCompanyID}/api_keys`, { body, ...options });
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
exports.Companies = Companies;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.js","sourceRoot":"","sources":["../src/resources/companies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AAA,cAAc,eAAe,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;CACF;AApED,8BAoEC"}
|
package/resources/companies.mjs
CHANGED
|
@@ -7,49 +7,56 @@ import { path } from "../internal/utils/path.mjs";
|
|
|
7
7
|
*/
|
|
8
8
|
export class Companies extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
11
|
-
* a platform, or omit it to create a company for the current user.
|
|
10
|
+
* Retrieves the details of an existing company.
|
|
12
11
|
*
|
|
13
12
|
* Required permissions:
|
|
14
13
|
*
|
|
15
|
-
* - `company:create`
|
|
16
14
|
* - `company:basic:read`
|
|
17
15
|
*/
|
|
18
|
-
|
|
19
|
-
return this._client.
|
|
16
|
+
retrieve(id, options) {
|
|
17
|
+
return this._client.get(path `/companies/${id}`, options);
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
|
-
*
|
|
20
|
+
* Returns a paginated list of companies. When parent_company_id is provided, lists
|
|
21
|
+
* connected accounts under that platform. When omitted, lists companies the
|
|
22
|
+
* current user has access to.
|
|
23
23
|
*
|
|
24
24
|
* Required permissions:
|
|
25
25
|
*
|
|
26
26
|
* - `company:basic:read`
|
|
27
27
|
*/
|
|
28
|
-
|
|
29
|
-
return this._client.
|
|
28
|
+
list(query = {}, options) {
|
|
29
|
+
return this._client.getAPIList('/companies', (CursorPage), { query, ...options });
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Create a new company. Pass parent_company_id to create a connected account under
|
|
33
|
+
* a platform, or omit it to create a company for the current user.
|
|
33
34
|
*
|
|
34
35
|
* Required permissions:
|
|
35
36
|
*
|
|
36
|
-
* - `company:
|
|
37
|
+
* - `company:create`
|
|
37
38
|
* - `company:basic:read`
|
|
38
39
|
*/
|
|
39
|
-
|
|
40
|
-
return this._client.
|
|
40
|
+
create(body, options) {
|
|
41
|
+
return this._client.post('/companies', { body, ...options });
|
|
41
42
|
}
|
|
42
43
|
/**
|
|
43
|
-
*
|
|
44
|
-
* connected accounts under that platform. When omitted, lists companies the
|
|
45
|
-
* current user has access to.
|
|
44
|
+
* Update a company's title, description, logo, and other settings.
|
|
46
45
|
*
|
|
47
46
|
* Required permissions:
|
|
48
47
|
*
|
|
48
|
+
* - `company:update`
|
|
49
49
|
* - `company:basic:read`
|
|
50
50
|
*/
|
|
51
|
-
|
|
52
|
-
return this._client.
|
|
51
|
+
update(id, body = {}, options) {
|
|
52
|
+
return this._client.patch(path `/companies/${id}`, { body, ...options });
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Create an API key for a connected account (child company) owned by a parent
|
|
56
|
+
* company.
|
|
57
|
+
*/
|
|
58
|
+
createAPIKey(parentCompanyID, body, options) {
|
|
59
|
+
return this._client.post(path `/companies/${parentCompanyID}/api_keys`, { body, ...options });
|
|
53
60
|
}
|
|
54
61
|
}
|
|
55
62
|
//# sourceMappingURL=companies.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"companies.mjs","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC
|
|
1
|
+
{"version":3,"file":"companies.mjs","sourceRoot":"","sources":["../src/resources/companies.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,UAAU,EAAsC;OAElD,EAAE,IAAI,EAAE;AAEf;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,WAAW;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAU,EAAE,OAAwB;QAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,cAAc,EAAE,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED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