@whop/sdk 0.0.26 → 0.0.28
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 +78 -0
- package/client.d.mts +10 -9
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -9
- package/client.d.ts.map +1 -1
- package/client.js +16 -2
- package/client.js.map +1 -1
- package/client.mjs +16 -2
- package/client.mjs.map +1 -1
- package/package.json +3 -3
- package/resources/access-tokens.d.mts +34 -54
- package/resources/access-tokens.d.mts.map +1 -1
- package/resources/access-tokens.d.ts +34 -54
- package/resources/access-tokens.d.ts.map +1 -1
- package/resources/access-tokens.js +6 -8
- package/resources/access-tokens.js.map +1 -1
- package/resources/access-tokens.mjs +6 -8
- package/resources/access-tokens.mjs.map +1 -1
- package/resources/account-links.d.mts +15 -13
- package/resources/account-links.d.mts.map +1 -1
- package/resources/account-links.d.ts +15 -13
- package/resources/account-links.d.ts.map +1 -1
- package/resources/account-links.js +2 -3
- package/resources/account-links.js.map +1 -1
- package/resources/account-links.mjs +2 -3
- package/resources/account-links.mjs.map +1 -1
- package/resources/ai-chats.d.mts +70 -30
- package/resources/ai-chats.d.mts.map +1 -1
- package/resources/ai-chats.d.ts +70 -30
- 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 +37 -35
- package/resources/app-builds.d.mts.map +1 -1
- package/resources/app-builds.d.ts +37 -35
- package/resources/app-builds.d.ts.map +1 -1
- package/resources/app-builds.js +7 -4
- package/resources/app-builds.js.map +1 -1
- package/resources/app-builds.mjs +7 -4
- package/resources/app-builds.mjs.map +1 -1
- package/resources/apps.d.mts +86 -60
- package/resources/apps.d.mts.map +1 -1
- package/resources/apps.d.ts +86 -60
- package/resources/apps.d.ts.map +1 -1
- package/resources/apps.js +7 -4
- package/resources/apps.js.map +1 -1
- package/resources/apps.mjs +7 -4
- package/resources/apps.mjs.map +1 -1
- package/resources/authorized-users.d.mts +38 -32
- package/resources/authorized-users.d.mts.map +1 -1
- package/resources/authorized-users.d.ts +38 -32
- package/resources/authorized-users.d.ts.map +1 -1
- package/resources/authorized-users.js +3 -2
- package/resources/authorized-users.js.map +1 -1
- package/resources/authorized-users.mjs +3 -2
- package/resources/authorized-users.mjs.map +1 -1
- package/resources/chat-channels.d.mts +28 -20
- package/resources/chat-channels.d.mts.map +1 -1
- package/resources/chat-channels.d.ts +28 -20
- package/resources/chat-channels.d.ts.map +1 -1
- package/resources/chat-channels.js +5 -3
- package/resources/chat-channels.js.map +1 -1
- package/resources/chat-channels.mjs +5 -3
- package/resources/chat-channels.mjs.map +1 -1
- package/resources/checkout-configurations.d.mts +75 -58
- package/resources/checkout-configurations.d.mts.map +1 -1
- package/resources/checkout-configurations.d.ts +75 -58
- package/resources/checkout-configurations.d.ts.map +1 -1
- package/resources/checkout-configurations.js +3 -2
- package/resources/checkout-configurations.js.map +1 -1
- package/resources/checkout-configurations.mjs +3 -2
- package/resources/checkout-configurations.mjs.map +1 -1
- package/resources/companies.d.mts +88 -56
- package/resources/companies.d.mts.map +1 -1
- package/resources/companies.d.ts +88 -56
- package/resources/companies.d.ts.map +1 -1
- package/resources/companies.js +9 -7
- package/resources/companies.js.map +1 -1
- package/resources/companies.mjs +9 -7
- package/resources/companies.mjs.map +1 -1
- package/resources/company-token-transactions.d.mts +90 -67
- package/resources/company-token-transactions.d.mts.map +1 -1
- package/resources/company-token-transactions.d.ts +90 -67
- package/resources/company-token-transactions.d.ts.map +1 -1
- package/resources/company-token-transactions.js +6 -3
- package/resources/company-token-transactions.js.map +1 -1
- package/resources/company-token-transactions.mjs +6 -3
- package/resources/company-token-transactions.mjs.map +1 -1
- package/resources/course-chapters.d.mts +27 -22
- package/resources/course-chapters.d.mts.map +1 -1
- package/resources/course-chapters.d.ts +27 -22
- package/resources/course-chapters.d.ts.map +1 -1
- package/resources/course-chapters.js +5 -5
- package/resources/course-chapters.mjs +5 -5
- package/resources/course-lesson-interactions.d.mts +7 -6
- package/resources/course-lesson-interactions.d.mts.map +1 -1
- package/resources/course-lesson-interactions.d.ts +7 -6
- package/resources/course-lesson-interactions.d.ts.map +1 -1
- package/resources/course-lesson-interactions.js +3 -2
- package/resources/course-lesson-interactions.js.map +1 -1
- package/resources/course-lesson-interactions.mjs +3 -2
- package/resources/course-lesson-interactions.mjs.map +1 -1
- package/resources/course-lessons.d.mts +141 -99
- package/resources/course-lessons.d.mts.map +1 -1
- package/resources/course-lessons.d.ts +141 -99
- package/resources/course-lessons.d.ts.map +1 -1
- package/resources/course-lessons.js +12 -8
- package/resources/course-lessons.js.map +1 -1
- package/resources/course-lessons.mjs +12 -8
- package/resources/course-lessons.mjs.map +1 -1
- package/resources/course-students.d.mts +44 -35
- package/resources/course-students.d.mts.map +1 -1
- package/resources/course-students.d.ts +44 -35
- package/resources/course-students.d.ts.map +1 -1
- package/resources/course-students.js +3 -2
- package/resources/course-students.js.map +1 -1
- package/resources/course-students.mjs +3 -2
- package/resources/course-students.mjs.map +1 -1
- package/resources/courses.d.mts +140 -99
- package/resources/courses.d.mts.map +1 -1
- package/resources/courses.d.ts +140 -99
- package/resources/courses.d.ts.map +1 -1
- package/resources/courses.js +9 -5
- package/resources/courses.js.map +1 -1
- package/resources/courses.mjs +9 -5
- package/resources/courses.mjs.map +1 -1
- package/resources/disputes.d.mts +176 -120
- package/resources/disputes.d.mts.map +1 -1
- package/resources/disputes.d.ts +176 -120
- package/resources/disputes.d.ts.map +1 -1
- package/resources/disputes.js +4 -2
- package/resources/disputes.js.map +1 -1
- package/resources/disputes.mjs +4 -2
- package/resources/disputes.mjs.map +1 -1
- package/resources/dm-channels.d.mts +29 -16
- package/resources/dm-channels.d.mts.map +1 -1
- package/resources/dm-channels.d.ts +29 -16
- package/resources/dm-channels.d.ts.map +1 -1
- package/resources/dm-channels.js +9 -5
- package/resources/dm-channels.js.map +1 -1
- package/resources/dm-channels.mjs +9 -5
- package/resources/dm-channels.mjs.map +1 -1
- package/resources/dm-members.d.mts +30 -21
- package/resources/dm-members.d.mts.map +1 -1
- package/resources/dm-members.d.ts +30 -21
- package/resources/dm-members.d.ts.map +1 -1
- package/resources/dm-members.js +9 -5
- package/resources/dm-members.js.map +1 -1
- package/resources/dm-members.mjs +9 -5
- package/resources/dm-members.mjs.map +1 -1
- package/resources/entries.d.mts +35 -27
- package/resources/entries.d.mts.map +1 -1
- package/resources/entries.d.ts +35 -27
- package/resources/entries.d.ts.map +1 -1
- package/resources/entries.js +7 -4
- package/resources/entries.js.map +1 -1
- package/resources/entries.mjs +7 -4
- package/resources/entries.mjs.map +1 -1
- package/resources/experiences.d.mts +58 -49
- package/resources/experiences.d.mts.map +1 -1
- package/resources/experiences.d.ts +58 -49
- package/resources/experiences.d.ts.map +1 -1
- package/resources/experiences.js +6 -5
- package/resources/experiences.js.map +1 -1
- package/resources/experiences.mjs +6 -5
- package/resources/experiences.mjs.map +1 -1
- package/resources/fee-markups.d.mts +38 -27
- package/resources/fee-markups.d.mts.map +1 -1
- package/resources/fee-markups.d.ts +38 -27
- package/resources/fee-markups.d.ts.map +1 -1
- package/resources/fee-markups.js +6 -3
- package/resources/fee-markups.js.map +1 -1
- package/resources/fee-markups.mjs +6 -3
- package/resources/fee-markups.mjs.map +1 -1
- package/resources/files.d.mts +23 -19
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +23 -19
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +3 -2
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +3 -2
- package/resources/files.mjs.map +1 -1
- package/resources/forum-posts.d.mts +68 -45
- package/resources/forum-posts.d.mts.map +1 -1
- package/resources/forum-posts.d.ts +68 -45
- package/resources/forum-posts.d.ts.map +1 -1
- package/resources/forum-posts.js +8 -4
- package/resources/forum-posts.js.map +1 -1
- package/resources/forum-posts.mjs +8 -4
- package/resources/forum-posts.mjs.map +1 -1
- package/resources/forums.d.mts +21 -13
- package/resources/forums.d.mts.map +1 -1
- package/resources/forums.d.ts +21 -13
- package/resources/forums.d.ts.map +1 -1
- package/resources/forums.js +5 -3
- package/resources/forums.js.map +1 -1
- package/resources/forums.mjs +5 -3
- package/resources/forums.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +136 -100
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +136 -100
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +7 -4
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +7 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/leads.d.mts +76 -54
- package/resources/leads.d.mts.map +1 -1
- package/resources/leads.d.ts +76 -54
- package/resources/leads.d.ts.map +1 -1
- package/resources/leads.js +6 -4
- package/resources/leads.js.map +1 -1
- package/resources/leads.mjs +6 -4
- package/resources/leads.mjs.map +1 -1
- package/resources/ledger-accounts.d.mts +19 -15
- package/resources/ledger-accounts.d.mts.map +1 -1
- package/resources/ledger-accounts.d.ts +19 -15
- package/resources/ledger-accounts.d.ts.map +1 -1
- package/resources/ledger-accounts.js +1 -1
- package/resources/ledger-accounts.mjs +1 -1
- package/resources/members.d.mts +27 -28
- package/resources/members.d.mts.map +1 -1
- package/resources/members.d.ts +27 -28
- package/resources/members.d.ts.map +1 -1
- package/resources/members.js +3 -2
- package/resources/members.js.map +1 -1
- package/resources/members.mjs +3 -2
- package/resources/members.mjs.map +1 -1
- package/resources/memberships.d.mts +85 -62
- package/resources/memberships.d.mts.map +1 -1
- package/resources/memberships.d.ts +85 -62
- package/resources/memberships.d.ts.map +1 -1
- package/resources/memberships.js +12 -8
- package/resources/memberships.js.map +1 -1
- package/resources/memberships.mjs +12 -8
- package/resources/memberships.mjs.map +1 -1
- package/resources/messages.d.mts +53 -35
- package/resources/messages.d.mts.map +1 -1
- package/resources/messages.d.ts +53 -35
- package/resources/messages.d.ts.map +1 -1
- package/resources/messages.js +9 -5
- package/resources/messages.js.map +1 -1
- package/resources/messages.mjs +9 -5
- package/resources/messages.mjs.map +1 -1
- package/resources/notifications.d.mts +33 -25
- package/resources/notifications.d.mts.map +1 -1
- package/resources/notifications.d.ts +33 -25
- package/resources/notifications.d.ts.map +1 -1
- package/resources/notifications.js +2 -1
- package/resources/notifications.js.map +1 -1
- package/resources/notifications.mjs +2 -1
- package/resources/notifications.mjs.map +1 -1
- package/resources/payment-methods.d.mts +212 -114
- package/resources/payment-methods.d.mts.map +1 -1
- package/resources/payment-methods.d.ts +212 -114
- package/resources/payment-methods.d.ts.map +1 -1
- package/resources/payment-methods.js +5 -10
- package/resources/payment-methods.js.map +1 -1
- package/resources/payment-methods.mjs +5 -10
- package/resources/payment-methods.mjs.map +1 -1
- package/resources/payments.d.mts +96 -56
- package/resources/payments.d.mts.map +1 -1
- package/resources/payments.d.ts +96 -56
- package/resources/payments.d.ts.map +1 -1
- package/resources/payments.js +23 -10
- package/resources/payments.js.map +1 -1
- package/resources/payments.mjs +23 -10
- package/resources/payments.mjs.map +1 -1
- package/resources/payout-methods.d.mts +50 -35
- package/resources/payout-methods.d.mts.map +1 -1
- package/resources/payout-methods.d.ts +50 -35
- package/resources/payout-methods.d.ts.map +1 -1
- package/resources/payout-methods.js +3 -2
- package/resources/payout-methods.js.map +1 -1
- package/resources/payout-methods.mjs +3 -2
- package/resources/payout-methods.mjs.map +1 -1
- package/resources/plans.d.mts +136 -95
- package/resources/plans.d.mts.map +1 -1
- package/resources/plans.d.ts +136 -95
- package/resources/plans.d.ts.map +1 -1
- package/resources/plans.js +9 -5
- package/resources/plans.js.map +1 -1
- package/resources/plans.mjs +9 -5
- package/resources/plans.mjs.map +1 -1
- package/resources/products.d.mts +80 -67
- package/resources/products.d.mts.map +1 -1
- package/resources/products.d.ts +80 -67
- package/resources/products.d.ts.map +1 -1
- package/resources/products.js +7 -5
- package/resources/products.js.map +1 -1
- package/resources/products.mjs +7 -5
- package/resources/products.mjs.map +1 -1
- package/resources/promo-codes.d.mts +60 -40
- package/resources/promo-codes.d.mts.map +1 -1
- package/resources/promo-codes.d.ts +60 -40
- package/resources/promo-codes.d.ts.map +1 -1
- package/resources/promo-codes.js +7 -4
- package/resources/promo-codes.js.map +1 -1
- package/resources/promo-codes.mjs +7 -4
- package/resources/promo-codes.mjs.map +1 -1
- package/resources/reactions.d.mts +25 -19
- package/resources/reactions.d.mts.map +1 -1
- package/resources/reactions.d.ts +25 -19
- package/resources/reactions.d.ts.map +1 -1
- package/resources/reactions.js +7 -4
- package/resources/reactions.js.map +1 -1
- package/resources/reactions.mjs +7 -4
- package/resources/reactions.mjs.map +1 -1
- package/resources/refunds.d.mts +57 -39
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +57 -39
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.js +3 -2
- package/resources/refunds.js.map +1 -1
- package/resources/refunds.mjs +3 -2
- package/resources/refunds.mjs.map +1 -1
- package/resources/reviews.d.mts +76 -60
- package/resources/reviews.d.mts.map +1 -1
- package/resources/reviews.d.ts +76 -60
- package/resources/reviews.d.ts.map +1 -1
- package/resources/reviews.js +3 -2
- package/resources/reviews.js.map +1 -1
- package/resources/reviews.mjs +3 -2
- package/resources/reviews.mjs.map +1 -1
- package/resources/setup-intents.d.mts +77 -61
- package/resources/setup-intents.d.mts.map +1 -1
- package/resources/setup-intents.d.ts +77 -61
- package/resources/setup-intents.d.ts.map +1 -1
- package/resources/setup-intents.js +4 -10
- package/resources/setup-intents.js.map +1 -1
- package/resources/setup-intents.mjs +4 -10
- package/resources/setup-intents.mjs.map +1 -1
- package/resources/shared.d.mts +854 -509
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +854 -509
- package/resources/shared.d.ts.map +1 -1
- package/resources/shipments.d.mts +30 -21
- package/resources/shipments.d.mts.map +1 -1
- package/resources/shipments.d.ts +30 -21
- package/resources/shipments.d.ts.map +1 -1
- package/resources/shipments.js +5 -3
- package/resources/shipments.js.map +1 -1
- package/resources/shipments.mjs +5 -3
- package/resources/shipments.mjs.map +1 -1
- package/resources/support-channels.d.mts +28 -20
- package/resources/support-channels.d.mts.map +1 -1
- package/resources/support-channels.d.ts +28 -20
- package/resources/support-channels.d.ts.map +1 -1
- package/resources/support-channels.js +5 -4
- package/resources/support-channels.js.map +1 -1
- package/resources/support-channels.mjs +5 -4
- package/resources/support-channels.mjs.map +1 -1
- package/resources/topups.d.mts +13 -9
- package/resources/topups.d.mts.map +1 -1
- package/resources/topups.d.ts +13 -9
- package/resources/topups.d.ts.map +1 -1
- package/resources/topups.js +2 -1
- package/resources/topups.js.map +1 -1
- package/resources/topups.mjs +2 -1
- package/resources/topups.mjs.map +1 -1
- package/resources/transfers.d.mts +37 -28
- package/resources/transfers.d.mts.map +1 -1
- package/resources/transfers.d.ts +37 -28
- package/resources/transfers.d.ts.map +1 -1
- package/resources/transfers.js +5 -3
- package/resources/transfers.js.map +1 -1
- package/resources/transfers.mjs +5 -3
- package/resources/transfers.mjs.map +1 -1
- package/resources/users.d.mts +60 -18
- package/resources/users.d.mts.map +1 -1
- package/resources/users.d.ts +60 -18
- package/resources/users.d.ts.map +1 -1
- package/resources/users.js +13 -2
- package/resources/users.js.map +1 -1
- package/resources/users.mjs +13 -2
- package/resources/users.mjs.map +1 -1
- package/resources/verifications.d.mts +7 -5
- package/resources/verifications.d.mts.map +1 -1
- package/resources/verifications.d.ts +7 -5
- package/resources/verifications.d.ts.map +1 -1
- package/resources/verifications.js +1 -1
- package/resources/verifications.mjs +1 -1
- package/resources/webhooks.d.mts +188 -133
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +188 -133
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -2
- package/resources/webhooks.mjs.map +1 -1
- package/resources/withdrawals.d.mts +60 -47
- package/resources/withdrawals.d.mts.map +1 -1
- package/resources/withdrawals.d.ts +60 -47
- package/resources/withdrawals.d.ts.map +1 -1
- package/resources/withdrawals.js +3 -2
- package/resources/withdrawals.js.map +1 -1
- package/resources/withdrawals.mjs +3 -2
- package/resources/withdrawals.mjs.map +1 -1
- package/src/client.ts +33 -11
- package/src/resources/access-tokens.ts +37 -59
- package/src/resources/account-links.ts +15 -13
- package/src/resources/ai-chats.ts +76 -30
- package/src/resources/app-builds.ts +37 -35
- package/src/resources/apps.ts +89 -60
- package/src/resources/authorized-users.ts +38 -32
- package/src/resources/chat-channels.ts +28 -20
- package/src/resources/checkout-configurations.ts +76 -58
- package/src/resources/companies.ts +94 -57
- package/src/resources/company-token-transactions.ts +91 -68
- package/src/resources/course-chapters.ts +27 -22
- package/src/resources/course-lesson-interactions.ts +7 -6
- package/src/resources/course-lessons.ts +141 -99
- package/src/resources/course-students.ts +44 -35
- package/src/resources/courses.ts +140 -99
- package/src/resources/disputes.ts +176 -120
- package/src/resources/dm-channels.ts +29 -16
- package/src/resources/dm-members.ts +30 -21
- package/src/resources/entries.ts +35 -27
- package/src/resources/experiences.ts +58 -49
- package/src/resources/fee-markups.ts +38 -27
- package/src/resources/files.ts +23 -19
- package/src/resources/forum-posts.ts +69 -45
- package/src/resources/forums.ts +21 -13
- package/src/resources/index.ts +4 -2
- package/src/resources/invoices.ts +140 -100
- package/src/resources/leads.ts +76 -54
- package/src/resources/ledger-accounts.ts +19 -15
- package/src/resources/members.ts +27 -28
- package/src/resources/memberships.ts +86 -62
- package/src/resources/messages.ts +53 -35
- package/src/resources/notifications.ts +33 -25
- package/src/resources/payment-methods.ts +212 -114
- package/src/resources/payments.ts +103 -55
- package/src/resources/payout-methods.ts +50 -35
- package/src/resources/plans.ts +136 -95
- package/src/resources/products.ts +219 -70
- package/src/resources/promo-codes.ts +60 -40
- package/src/resources/reactions.ts +25 -19
- package/src/resources/refunds.ts +59 -39
- package/src/resources/reviews.ts +76 -60
- package/src/resources/setup-intents.ts +77 -61
- package/src/resources/shared.ts +2797 -508
- package/src/resources/shipments.ts +30 -21
- package/src/resources/support-channels.ts +28 -20
- package/src/resources/topups.ts +13 -9
- package/src/resources/transfers.ts +37 -28
- package/src/resources/users.ts +72 -18
- package/src/resources/verifications.ts +7 -5
- package/src/resources/webhooks.ts +188 -133
- package/src/resources/withdrawals.ts +60 -46
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/plans.d.ts
CHANGED
|
@@ -6,7 +6,8 @@ import { CursorPage, type CursorPageParams, PagePromise } from "../core/paginati
|
|
|
6
6
|
import { RequestOptions } from "../internal/request-options.js";
|
|
7
7
|
export declare class Plans extends APIResource {
|
|
8
8
|
/**
|
|
9
|
-
* Create a new
|
|
9
|
+
* Create a new pricing plan for a product. The plan defines the billing interval,
|
|
10
|
+
* price, and availability for customers.
|
|
10
11
|
*
|
|
11
12
|
* Required permissions:
|
|
12
13
|
*
|
|
@@ -24,7 +25,7 @@ export declare class Plans extends APIResource {
|
|
|
24
25
|
*/
|
|
25
26
|
create(body: PlanCreateParams, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
26
27
|
/**
|
|
27
|
-
* Retrieves
|
|
28
|
+
* Retrieves the details of an existing plan.
|
|
28
29
|
*
|
|
29
30
|
* Required permissions:
|
|
30
31
|
*
|
|
@@ -39,7 +40,8 @@ export declare class Plans extends APIResource {
|
|
|
39
40
|
*/
|
|
40
41
|
retrieve(id: string, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
41
42
|
/**
|
|
42
|
-
* Update
|
|
43
|
+
* Update a plan's pricing, billing interval, visibility, stock, and other
|
|
44
|
+
* settings.
|
|
43
45
|
*
|
|
44
46
|
* Required permissions:
|
|
45
47
|
*
|
|
@@ -56,7 +58,8 @@ export declare class Plans extends APIResource {
|
|
|
56
58
|
*/
|
|
57
59
|
update(id: string, body?: PlanUpdateParams | null | undefined, options?: RequestOptions): APIPromise<Shared.Plan>;
|
|
58
60
|
/**
|
|
59
|
-
*
|
|
61
|
+
* Returns a paginated list of plans belonging to a company, with optional
|
|
62
|
+
* filtering by visibility, type, release method, and product.
|
|
60
63
|
*
|
|
61
64
|
* Required permissions:
|
|
62
65
|
*
|
|
@@ -74,7 +77,8 @@ export declare class Plans extends APIResource {
|
|
|
74
77
|
*/
|
|
75
78
|
list(query: PlanListParams, options?: RequestOptions): PagePromise<PlanListResponsesCursorPage, PlanListResponse>;
|
|
76
79
|
/**
|
|
77
|
-
*
|
|
80
|
+
* Permanently delete a plan from a product. Existing memberships on this plan will
|
|
81
|
+
* not be affected.
|
|
78
82
|
*
|
|
79
83
|
* Required permissions:
|
|
80
84
|
*
|
|
@@ -91,133 +95,159 @@ export declare class Plans extends APIResource {
|
|
|
91
95
|
}
|
|
92
96
|
export type PlanListResponsesCursorPage = CursorPage<PlanListResponse>;
|
|
93
97
|
/**
|
|
94
|
-
* A plan
|
|
95
|
-
*
|
|
96
|
-
*
|
|
98
|
+
* A plan defines pricing and billing terms for a checkout. Plans can optionally
|
|
99
|
+
* belong to a product, where they represent different pricing options such as
|
|
100
|
+
* one-time payments, recurring subscriptions, or free trials.
|
|
97
101
|
*/
|
|
98
102
|
export interface PlanListResponse {
|
|
99
103
|
/**
|
|
100
|
-
* The
|
|
104
|
+
* The unique identifier for the plan.
|
|
101
105
|
*/
|
|
102
106
|
id: string;
|
|
103
107
|
/**
|
|
104
|
-
* The
|
|
108
|
+
* The number of days between each recurring charge. Null for one-time plans. For
|
|
109
|
+
* example, 30 for monthly or 365 for annual billing.
|
|
105
110
|
*/
|
|
106
111
|
billing_period: number | null;
|
|
107
112
|
/**
|
|
108
|
-
* The company
|
|
113
|
+
* The company that sells this plan. Null for standalone invoice plans not linked
|
|
114
|
+
* to a company.
|
|
109
115
|
*/
|
|
110
116
|
company: PlanListResponse.Company | null;
|
|
111
117
|
/**
|
|
112
|
-
*
|
|
118
|
+
* The datetime the plan was created.
|
|
113
119
|
*/
|
|
114
120
|
created_at: string;
|
|
115
121
|
/**
|
|
116
|
-
* The
|
|
122
|
+
* The currency used for all prices on this plan (e.g., 'usd', 'eur'). All monetary
|
|
123
|
+
* amounts on the plan are denominated in this currency.
|
|
117
124
|
*/
|
|
118
125
|
currency: Shared.Currency;
|
|
119
126
|
/**
|
|
120
|
-
*
|
|
127
|
+
* A text description of the plan visible to customers. Maximum 500 characters.
|
|
128
|
+
* Null if no description is set.
|
|
121
129
|
*/
|
|
122
130
|
description: string | null;
|
|
123
131
|
/**
|
|
124
|
-
* The
|
|
132
|
+
* The number of days until the membership expires (for expiration-based plans).
|
|
133
|
+
* For example, 365 for a one-year access pass.
|
|
125
134
|
*/
|
|
126
135
|
expiration_days: number | null;
|
|
127
136
|
/**
|
|
128
|
-
* The
|
|
137
|
+
* The initial purchase price in the plan's base_currency (e.g., 49.99 for $49.99).
|
|
138
|
+
* For one-time plans, this is the full price. For renewal plans, this is charged
|
|
139
|
+
* on top of the first renewal_price.
|
|
129
140
|
*/
|
|
130
141
|
initial_price: number;
|
|
131
142
|
/**
|
|
132
|
-
*
|
|
143
|
+
* Private notes visible only to the company owner and team members. Not shown to
|
|
144
|
+
* customers. Null if no notes have been added.
|
|
133
145
|
*/
|
|
134
146
|
internal_notes: string | null;
|
|
135
147
|
/**
|
|
136
|
-
* The invoice
|
|
148
|
+
* The invoice this plan was generated for. Null if the plan was not created for a
|
|
149
|
+
* specific invoice.
|
|
137
150
|
*/
|
|
138
151
|
invoice: PlanListResponse.Invoice | null;
|
|
139
152
|
/**
|
|
140
|
-
* The number of
|
|
153
|
+
* The number of users who currently hold an active membership through this plan.
|
|
154
|
+
* Only visible to authorized team members.
|
|
141
155
|
*/
|
|
142
156
|
member_count: number | null;
|
|
143
157
|
/**
|
|
144
|
-
* The explicit payment method configuration
|
|
158
|
+
* The explicit payment method configuration specifying which payment methods are
|
|
159
|
+
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
145
160
|
*/
|
|
146
161
|
payment_method_configuration: PlanListResponse.PaymentMethodConfiguration | null;
|
|
147
162
|
/**
|
|
148
|
-
*
|
|
163
|
+
* The billing model for this plan: 'renewal' for recurring subscriptions or
|
|
164
|
+
* 'one_time' for single payments.
|
|
149
165
|
*/
|
|
150
166
|
plan_type: Shared.PlanType;
|
|
151
167
|
/**
|
|
152
|
-
* The product that this plan belongs to.
|
|
168
|
+
* The product that this plan belongs to. Null for standalone one-off purchases not
|
|
169
|
+
* linked to a product.
|
|
153
170
|
*/
|
|
154
171
|
product: PlanListResponse.Product | null;
|
|
155
172
|
/**
|
|
156
|
-
* The
|
|
173
|
+
* The full URL where customers can purchase this plan directly, bypassing the
|
|
174
|
+
* product page.
|
|
157
175
|
*/
|
|
158
176
|
purchase_url: string;
|
|
159
177
|
/**
|
|
160
|
-
*
|
|
178
|
+
* The method used to sell this plan: 'buy_now' for immediate purchase or
|
|
179
|
+
* 'waitlist' for waitlist-based access.
|
|
161
180
|
*/
|
|
162
181
|
release_method: Shared.ReleaseMethod;
|
|
163
182
|
/**
|
|
164
|
-
* The price
|
|
183
|
+
* The recurring price charged every billing_period in the plan's base_currency
|
|
184
|
+
* (e.g., 9.99 for $9.99/period). Zero for one-time plans.
|
|
165
185
|
*/
|
|
166
186
|
renewal_price: number;
|
|
167
187
|
/**
|
|
168
|
-
* The number of payments required before
|
|
188
|
+
* The total number of installment payments required before the subscription
|
|
189
|
+
* pauses. Null if split pay is not configured. Must be greater than 1.
|
|
169
190
|
*/
|
|
170
191
|
split_pay_required_payments: number | null;
|
|
171
192
|
/**
|
|
172
|
-
* The number of units available for purchase. Only
|
|
193
|
+
* The number of units available for purchase. Only visible to authorized team
|
|
194
|
+
* members. Null if the requester lacks permission.
|
|
173
195
|
*/
|
|
174
196
|
stock: number | null;
|
|
175
197
|
/**
|
|
176
|
-
* The
|
|
198
|
+
* The display name of the plan shown to customers on the product page and at
|
|
199
|
+
* checkout. Maximum 30 characters. Null if no title has been set.
|
|
177
200
|
*/
|
|
178
201
|
title: string | null;
|
|
179
202
|
/**
|
|
180
|
-
* The number of free trial days
|
|
203
|
+
* The number of free trial days before the first charge on a renewal plan. Null if
|
|
204
|
+
* no trial is configured or the current user has already used a trial for this
|
|
205
|
+
* plan.
|
|
181
206
|
*/
|
|
182
207
|
trial_period_days: number | null;
|
|
183
208
|
/**
|
|
184
|
-
*
|
|
209
|
+
* When true, the plan has unlimited stock (stock field is ignored). When false,
|
|
210
|
+
* purchases are limited by the stock field.
|
|
185
211
|
*/
|
|
186
212
|
unlimited_stock: boolean;
|
|
187
213
|
/**
|
|
188
|
-
*
|
|
214
|
+
* The datetime the plan was last updated.
|
|
189
215
|
*/
|
|
190
216
|
updated_at: string;
|
|
191
217
|
/**
|
|
192
|
-
*
|
|
218
|
+
* Controls whether the plan is visible to customers. When set to 'hidden', the
|
|
219
|
+
* plan is only accessible via direct link.
|
|
193
220
|
*/
|
|
194
221
|
visibility: Shared.Visibility;
|
|
195
222
|
}
|
|
196
223
|
export declare namespace PlanListResponse {
|
|
197
224
|
/**
|
|
198
|
-
* The company
|
|
225
|
+
* The company that sells this plan. Null for standalone invoice plans not linked
|
|
226
|
+
* to a company.
|
|
199
227
|
*/
|
|
200
228
|
interface Company {
|
|
201
229
|
/**
|
|
202
|
-
* The
|
|
230
|
+
* The unique identifier for the company.
|
|
203
231
|
*/
|
|
204
232
|
id: string;
|
|
205
233
|
/**
|
|
206
|
-
* The
|
|
234
|
+
* The display name of the company shown to customers.
|
|
207
235
|
*/
|
|
208
236
|
title: string;
|
|
209
237
|
}
|
|
210
238
|
/**
|
|
211
|
-
* The invoice
|
|
239
|
+
* The invoice this plan was generated for. Null if the plan was not created for a
|
|
240
|
+
* specific invoice.
|
|
212
241
|
*/
|
|
213
242
|
interface Invoice {
|
|
214
243
|
/**
|
|
215
|
-
* The
|
|
244
|
+
* The unique identifier for the invoice.
|
|
216
245
|
*/
|
|
217
246
|
id: string;
|
|
218
247
|
}
|
|
219
248
|
/**
|
|
220
|
-
* The explicit payment method configuration
|
|
249
|
+
* The explicit payment method configuration specifying which payment methods are
|
|
250
|
+
* enabled or disabled for this plan. Null if the plan uses default settings.
|
|
221
251
|
*/
|
|
222
252
|
interface PaymentMethodConfiguration {
|
|
223
253
|
/**
|
|
@@ -240,15 +270,17 @@ export declare namespace PlanListResponse {
|
|
|
240
270
|
include_platform_defaults: boolean;
|
|
241
271
|
}
|
|
242
272
|
/**
|
|
243
|
-
* The product that this plan belongs to.
|
|
273
|
+
* The product that this plan belongs to. Null for standalone one-off purchases not
|
|
274
|
+
* linked to a product.
|
|
244
275
|
*/
|
|
245
276
|
interface Product {
|
|
246
277
|
/**
|
|
247
|
-
* The
|
|
278
|
+
* The unique identifier for the product.
|
|
248
279
|
*/
|
|
249
280
|
id: string;
|
|
250
281
|
/**
|
|
251
|
-
* The
|
|
282
|
+
* The display name of the product shown to customers on the product page and in
|
|
283
|
+
* search results.
|
|
252
284
|
*/
|
|
253
285
|
title: string;
|
|
254
286
|
}
|
|
@@ -259,15 +291,16 @@ export declare namespace PlanListResponse {
|
|
|
259
291
|
export type PlanDeleteResponse = boolean;
|
|
260
292
|
export interface PlanCreateParams {
|
|
261
293
|
/**
|
|
262
|
-
* The
|
|
294
|
+
* The unique identifier of the company to create this plan for.
|
|
263
295
|
*/
|
|
264
296
|
company_id: string;
|
|
265
297
|
/**
|
|
266
|
-
* The
|
|
298
|
+
* The unique identifier of the product to attach this plan to.
|
|
267
299
|
*/
|
|
268
300
|
product_id: string;
|
|
269
301
|
/**
|
|
270
|
-
* The
|
|
302
|
+
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
303
|
+
* for yearly.
|
|
271
304
|
*/
|
|
272
305
|
billing_period?: number | null;
|
|
273
306
|
/**
|
|
@@ -275,33 +308,34 @@ export interface PlanCreateParams {
|
|
|
275
308
|
*/
|
|
276
309
|
currency?: Shared.Currency | null;
|
|
277
310
|
/**
|
|
278
|
-
* An array of custom field
|
|
311
|
+
* An array of custom field definitions to collect from customers at checkout.
|
|
279
312
|
*/
|
|
280
313
|
custom_fields?: Array<PlanCreateParams.CustomField> | null;
|
|
281
314
|
/**
|
|
282
|
-
*
|
|
315
|
+
* A text description of the plan displayed to customers on the product page.
|
|
283
316
|
*/
|
|
284
317
|
description?: string | null;
|
|
285
318
|
/**
|
|
286
|
-
* The
|
|
319
|
+
* The number of days until the membership expires and access is revoked. Used for
|
|
320
|
+
* expiration-based plans.
|
|
287
321
|
*/
|
|
288
322
|
expiration_days?: number | null;
|
|
289
323
|
/**
|
|
290
|
-
* An image
|
|
324
|
+
* An image displayed on the product page to represent this plan.
|
|
291
325
|
*/
|
|
292
326
|
image?: PlanCreateParams.Image | null;
|
|
293
327
|
/**
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
328
|
+
* The amount charged on the first purchase. For one-time plans, this is the full
|
|
329
|
+
* price. For recurring plans, this is an additional charge on top of the renewal
|
|
330
|
+
* price. Provided in the plan's currency (e.g., 10.43 for $10.43).
|
|
297
331
|
*/
|
|
298
332
|
initial_price?: number | null;
|
|
299
333
|
/**
|
|
300
|
-
*
|
|
334
|
+
* Private notes visible only to the business owner. Not shown to customers.
|
|
301
335
|
*/
|
|
302
336
|
internal_notes?: string | null;
|
|
303
337
|
/**
|
|
304
|
-
* Whether this plan uses legacy payment method controls
|
|
338
|
+
* Whether this plan uses legacy payment method controls.
|
|
305
339
|
*/
|
|
306
340
|
legacy_payment_method_controls?: boolean | null;
|
|
307
341
|
/**
|
|
@@ -310,8 +344,8 @@ export interface PlanCreateParams {
|
|
|
310
344
|
*/
|
|
311
345
|
override_tax_type?: Shared.TaxType | null;
|
|
312
346
|
/**
|
|
313
|
-
*
|
|
314
|
-
*
|
|
347
|
+
* Explicit payment method configuration for the plan. When not provided, the
|
|
348
|
+
* company's defaults apply.
|
|
315
349
|
*/
|
|
316
350
|
payment_method_configuration?: PlanCreateParams.PaymentMethodConfiguration | null;
|
|
317
351
|
/**
|
|
@@ -323,28 +357,30 @@ export interface PlanCreateParams {
|
|
|
323
357
|
*/
|
|
324
358
|
release_method?: Shared.ReleaseMethod | null;
|
|
325
359
|
/**
|
|
326
|
-
* The amount
|
|
327
|
-
*
|
|
360
|
+
* The amount charged each billing period for recurring plans. Provided in the
|
|
361
|
+
* plan's currency (e.g., 10.43 for $10.43).
|
|
328
362
|
*/
|
|
329
363
|
renewal_price?: number | null;
|
|
330
364
|
/**
|
|
331
|
-
* The number of payments required before
|
|
365
|
+
* The number of installment payments required before the subscription pauses.
|
|
332
366
|
*/
|
|
333
367
|
split_pay_required_payments?: number | null;
|
|
334
368
|
/**
|
|
335
|
-
* The number of units available for purchase.
|
|
369
|
+
* The maximum number of units available for purchase. Ignored when unlimited_stock
|
|
370
|
+
* is true.
|
|
336
371
|
*/
|
|
337
372
|
stock?: number | null;
|
|
338
373
|
/**
|
|
339
|
-
* The
|
|
374
|
+
* The display name of the plan shown to customers on the product page.
|
|
340
375
|
*/
|
|
341
376
|
title?: string | null;
|
|
342
377
|
/**
|
|
343
|
-
* The number of free trial days
|
|
378
|
+
* The number of free trial days before the first charge on a recurring plan.
|
|
344
379
|
*/
|
|
345
380
|
trial_period_days?: number | null;
|
|
346
381
|
/**
|
|
347
|
-
*
|
|
382
|
+
* Whether the plan has unlimited stock. When true, the stock field is ignored.
|
|
383
|
+
* Defaults to true.
|
|
348
384
|
*/
|
|
349
385
|
unlimited_stock?: boolean | null;
|
|
350
386
|
/**
|
|
@@ -380,7 +416,7 @@ export declare namespace PlanCreateParams {
|
|
|
380
416
|
required?: boolean | null;
|
|
381
417
|
}
|
|
382
418
|
/**
|
|
383
|
-
* An image
|
|
419
|
+
* An image displayed on the product page to represent this plan.
|
|
384
420
|
*/
|
|
385
421
|
interface Image {
|
|
386
422
|
/**
|
|
@@ -389,8 +425,8 @@ export declare namespace PlanCreateParams {
|
|
|
389
425
|
id: string;
|
|
390
426
|
}
|
|
391
427
|
/**
|
|
392
|
-
*
|
|
393
|
-
*
|
|
428
|
+
* Explicit payment method configuration for the plan. When not provided, the
|
|
429
|
+
* company's defaults apply.
|
|
394
430
|
*/
|
|
395
431
|
interface PaymentMethodConfiguration {
|
|
396
432
|
/**
|
|
@@ -415,7 +451,8 @@ export declare namespace PlanCreateParams {
|
|
|
415
451
|
}
|
|
416
452
|
export interface PlanUpdateParams {
|
|
417
453
|
/**
|
|
418
|
-
* The
|
|
454
|
+
* The number of days between recurring charges. For example, 30 for monthly or 365
|
|
455
|
+
* for yearly.
|
|
419
456
|
*/
|
|
420
457
|
billing_period?: number | null;
|
|
421
458
|
/**
|
|
@@ -423,35 +460,37 @@ export interface PlanUpdateParams {
|
|
|
423
460
|
*/
|
|
424
461
|
currency?: Shared.Currency | null;
|
|
425
462
|
/**
|
|
426
|
-
* An array of custom field
|
|
463
|
+
* An array of custom field definitions to collect from customers at checkout.
|
|
427
464
|
*/
|
|
428
465
|
custom_fields?: Array<PlanUpdateParams.CustomField> | null;
|
|
429
466
|
/**
|
|
430
|
-
*
|
|
467
|
+
* A text description of the plan displayed to customers on the product page.
|
|
431
468
|
*/
|
|
432
469
|
description?: string | null;
|
|
433
470
|
/**
|
|
434
|
-
* The
|
|
471
|
+
* The number of days until the membership expires and access is revoked. For
|
|
472
|
+
* example, 365 for one-year access.
|
|
435
473
|
*/
|
|
436
474
|
expiration_days?: number | null;
|
|
437
475
|
/**
|
|
438
|
-
* An image
|
|
476
|
+
* An image displayed on the product page to represent this plan.
|
|
439
477
|
*/
|
|
440
478
|
image?: PlanUpdateParams.Image | null;
|
|
441
479
|
/**
|
|
442
|
-
*
|
|
480
|
+
* The amount charged on the first purchase. Provided in the plan's currency (e.g.,
|
|
481
|
+
* 10.43 for $10.43).
|
|
443
482
|
*/
|
|
444
483
|
initial_price?: number | null;
|
|
445
484
|
/**
|
|
446
|
-
*
|
|
485
|
+
* Private notes visible only to the business owner. Not shown to customers.
|
|
447
486
|
*/
|
|
448
487
|
internal_notes?: string | null;
|
|
449
488
|
/**
|
|
450
|
-
* Whether this plan uses legacy payment method controls
|
|
489
|
+
* Whether this plan uses legacy payment method controls.
|
|
451
490
|
*/
|
|
452
491
|
legacy_payment_method_controls?: boolean | null;
|
|
453
492
|
/**
|
|
454
|
-
* Whether
|
|
493
|
+
* Whether to offer a retention discount when a customer attempts to cancel.
|
|
455
494
|
*/
|
|
456
495
|
offer_cancel_discount?: boolean | null;
|
|
457
496
|
/**
|
|
@@ -460,38 +499,40 @@ export interface PlanUpdateParams {
|
|
|
460
499
|
*/
|
|
461
500
|
override_tax_type?: Shared.TaxType | null;
|
|
462
501
|
/**
|
|
463
|
-
*
|
|
464
|
-
* custom configuration
|
|
502
|
+
* Explicit payment method configuration for the plan. Sending null removes any
|
|
503
|
+
* custom configuration.
|
|
465
504
|
*/
|
|
466
505
|
payment_method_configuration?: PlanUpdateParams.PaymentMethodConfiguration | null;
|
|
467
506
|
/**
|
|
468
|
-
* The amount
|
|
507
|
+
* The amount charged each billing period for recurring plans. Provided in the
|
|
508
|
+
* plan's currency (e.g., 10.43 for $10.43).
|
|
469
509
|
*/
|
|
470
510
|
renewal_price?: number | null;
|
|
471
511
|
/**
|
|
472
|
-
* The number of units available for purchase.
|
|
512
|
+
* The maximum number of units available for purchase. Ignored when unlimited_stock
|
|
513
|
+
* is true.
|
|
473
514
|
*/
|
|
474
515
|
stock?: number | null;
|
|
475
516
|
/**
|
|
476
|
-
*
|
|
477
|
-
*
|
|
517
|
+
* A comparison price displayed with a strikethrough for the initial price.
|
|
518
|
+
* Provided in the plan's currency (e.g., 19.99 for $19.99).
|
|
478
519
|
*/
|
|
479
520
|
strike_through_initial_price?: number | null;
|
|
480
521
|
/**
|
|
481
|
-
*
|
|
482
|
-
*
|
|
522
|
+
* A comparison price displayed with a strikethrough for the renewal price.
|
|
523
|
+
* Provided in the plan's currency (e.g., 19.99 for $19.99).
|
|
483
524
|
*/
|
|
484
525
|
strike_through_renewal_price?: number | null;
|
|
485
526
|
/**
|
|
486
|
-
* The
|
|
527
|
+
* The display name of the plan shown to customers on the product page.
|
|
487
528
|
*/
|
|
488
529
|
title?: string | null;
|
|
489
530
|
/**
|
|
490
|
-
* The number of free trial days
|
|
531
|
+
* The number of free trial days before the first charge on a recurring plan.
|
|
491
532
|
*/
|
|
492
533
|
trial_period_days?: number | null;
|
|
493
534
|
/**
|
|
494
|
-
*
|
|
535
|
+
* Whether the plan has unlimited stock. When true, the stock field is ignored.
|
|
495
536
|
*/
|
|
496
537
|
unlimited_stock?: boolean | null;
|
|
497
538
|
/**
|
|
@@ -527,7 +568,7 @@ export declare namespace PlanUpdateParams {
|
|
|
527
568
|
required?: boolean | null;
|
|
528
569
|
}
|
|
529
570
|
/**
|
|
530
|
-
* An image
|
|
571
|
+
* An image displayed on the product page to represent this plan.
|
|
531
572
|
*/
|
|
532
573
|
interface Image {
|
|
533
574
|
/**
|
|
@@ -536,8 +577,8 @@ export declare namespace PlanUpdateParams {
|
|
|
536
577
|
id: string;
|
|
537
578
|
}
|
|
538
579
|
/**
|
|
539
|
-
*
|
|
540
|
-
* custom configuration
|
|
580
|
+
* Explicit payment method configuration for the plan. Sending null removes any
|
|
581
|
+
* custom configuration.
|
|
541
582
|
*/
|
|
542
583
|
interface PaymentMethodConfiguration {
|
|
543
584
|
/**
|
|
@@ -562,7 +603,7 @@ export declare namespace PlanUpdateParams {
|
|
|
562
603
|
}
|
|
563
604
|
export interface PlanListParams extends CursorPageParams {
|
|
564
605
|
/**
|
|
565
|
-
* The
|
|
606
|
+
* The unique identifier of the company to list plans for.
|
|
566
607
|
*/
|
|
567
608
|
company_id: string;
|
|
568
609
|
/**
|
|
@@ -570,11 +611,11 @@ export interface PlanListParams extends CursorPageParams {
|
|
|
570
611
|
*/
|
|
571
612
|
before?: string | null;
|
|
572
613
|
/**
|
|
573
|
-
*
|
|
614
|
+
* Only return plans created after this timestamp.
|
|
574
615
|
*/
|
|
575
616
|
created_after?: string | null;
|
|
576
617
|
/**
|
|
577
|
-
*
|
|
618
|
+
* Only return plans created before this timestamp.
|
|
578
619
|
*/
|
|
579
620
|
created_before?: string | null;
|
|
580
621
|
/**
|
|
@@ -594,19 +635,19 @@ export interface PlanListParams extends CursorPageParams {
|
|
|
594
635
|
*/
|
|
595
636
|
order?: 'id' | 'active_members_count' | 'created_at' | 'internal_notes' | 'expires_at' | null;
|
|
596
637
|
/**
|
|
597
|
-
*
|
|
638
|
+
* Filter to only plans matching these billing types.
|
|
598
639
|
*/
|
|
599
640
|
plan_types?: Array<Shared.PlanType> | null;
|
|
600
641
|
/**
|
|
601
|
-
*
|
|
642
|
+
* Filter to only plans belonging to these product identifiers.
|
|
602
643
|
*/
|
|
603
644
|
product_ids?: Array<string> | null;
|
|
604
645
|
/**
|
|
605
|
-
*
|
|
646
|
+
* Filter to only plans matching these release methods.
|
|
606
647
|
*/
|
|
607
648
|
release_methods?: Array<Shared.ReleaseMethod> | null;
|
|
608
649
|
/**
|
|
609
|
-
*
|
|
650
|
+
* Filter to only plans matching these visibility states.
|
|
610
651
|
*/
|
|
611
652
|
visibilities?: Array<Shared.VisibilityFilter> | null;
|
|
612
653
|
}
|
package/resources/plans.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,WAAW,EAAE;OAClD,EAAE,cAAc,EAAE;AAGzB,qBAAa,KAAM,SAAQ,WAAW;IACpC
|
|
1
|
+
{"version":3,"file":"plans.d.ts","sourceRoot":"","sources":["../src/resources/plans.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,KAAK,MAAM;OACX,EAAE,UAAU,EAAE;OACd,EAAE,UAAU,EAAE,KAAK,gBAA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IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE9B;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC;IAEpC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,IAAI,GAAG,sBAAsB,GAAG,YAAY,GAAG,gBAAgB,GAAG,YAAY,GAAG,IAAI,CAAC;IAE9F;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IAEnC;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC;IAErD;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;CACtD;AAED,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;CACH"}
|
package/resources/plans.js
CHANGED
|
@@ -7,7 +7,8 @@ const pagination_1 = require("../core/pagination.js");
|
|
|
7
7
|
const path_1 = require("../internal/utils/path.js");
|
|
8
8
|
class Plans extends resource_1.APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Create a new
|
|
10
|
+
* Create a new pricing plan for a product. The plan defines the billing interval,
|
|
11
|
+
* price, and availability for customers.
|
|
11
12
|
*
|
|
12
13
|
* Required permissions:
|
|
13
14
|
*
|
|
@@ -27,7 +28,7 @@ class Plans extends resource_1.APIResource {
|
|
|
27
28
|
return this._client.post('/plans', { body, ...options });
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
|
-
* Retrieves
|
|
31
|
+
* Retrieves the details of an existing plan.
|
|
31
32
|
*
|
|
32
33
|
* Required permissions:
|
|
33
34
|
*
|
|
@@ -44,7 +45,8 @@ class Plans extends resource_1.APIResource {
|
|
|
44
45
|
return this._client.get((0, path_1.path) `/plans/${id}`, options);
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
|
-
* Update
|
|
48
|
+
* Update a plan's pricing, billing interval, visibility, stock, and other
|
|
49
|
+
* settings.
|
|
48
50
|
*
|
|
49
51
|
* Required permissions:
|
|
50
52
|
*
|
|
@@ -63,7 +65,8 @@ class Plans extends resource_1.APIResource {
|
|
|
63
65
|
return this._client.patch((0, path_1.path) `/plans/${id}`, { body, ...options });
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
|
-
*
|
|
68
|
+
* Returns a paginated list of plans belonging to a company, with optional
|
|
69
|
+
* filtering by visibility, type, release method, and product.
|
|
67
70
|
*
|
|
68
71
|
* Required permissions:
|
|
69
72
|
*
|
|
@@ -83,7 +86,8 @@ class Plans extends resource_1.APIResource {
|
|
|
83
86
|
return this._client.getAPIList('/plans', (pagination_1.CursorPage), { query, ...options });
|
|
84
87
|
}
|
|
85
88
|
/**
|
|
86
|
-
*
|
|
89
|
+
* Permanently delete a plan from a product. Existing memberships on this plan will
|
|
90
|
+
* not be affected.
|
|
87
91
|
*
|
|
88
92
|
* Required permissions:
|
|
89
93
|
*
|