@paddle/paddle-node-sdk 2.8.0 → 3.1.0
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/dist/cjs/entities/address/address.js +14 -0
- package/dist/cjs/entities/adjustment/adjustment-credit-note-pdf.js +1 -0
- package/dist/cjs/entities/adjustment/adjustment-item-totals.js +3 -0
- package/dist/cjs/entities/adjustment/adjustment-item.js +6 -0
- package/dist/cjs/entities/adjustment/adjustment-proration.js +2 -0
- package/dist/cjs/entities/adjustment/adjustment-time-period.js +2 -0
- package/dist/cjs/entities/adjustment/adjustment.js +15 -0
- package/dist/cjs/entities/business/business.js +11 -0
- package/dist/cjs/entities/business/contacts.js +2 -0
- package/dist/cjs/entities/client-token/client-token-collection.js +11 -0
- package/dist/cjs/entities/client-token/client-token.js +24 -0
- package/dist/cjs/entities/client-token/index.js +18 -0
- package/dist/cjs/entities/customer/auth-token.js +2 -0
- package/dist/cjs/entities/customer/credit-balance.js +3 -0
- package/dist/cjs/entities/customer/customer-balance.js +3 -0
- package/dist/cjs/entities/customer/customer.js +10 -0
- package/dist/cjs/entities/customer-portal-session/customer-portal-session.js +4 -0
- package/dist/cjs/entities/customer-portal-session/customer-portal-subscription-url.js +3 -0
- package/dist/cjs/entities/customer-portal-session/general.js +1 -0
- package/dist/cjs/entities/customer-portal-session/urls.js +3 -2
- package/dist/cjs/entities/discount/discount.js +24 -2
- package/dist/cjs/entities/discount-group/discount-group.js +6 -0
- package/dist/cjs/entities/event-types/event-type.js +4 -0
- package/dist/cjs/entities/events/event.js +6 -2
- package/dist/cjs/entities/notification-settings/notification-settings.js +10 -0
- package/dist/cjs/entities/notifications/notification-log.js +6 -2
- package/dist/cjs/entities/notifications/notification.js +16 -5
- package/dist/cjs/entities/notifications/replay-notification.js +1 -0
- package/dist/cjs/entities/payment-method/payment-method.js +10 -0
- package/dist/cjs/entities/payout/payout.js +4 -0
- package/dist/cjs/entities/price/price-quantity.js +2 -0
- package/dist/cjs/entities/price/price.js +18 -2
- package/dist/cjs/entities/pricing-preview/pricing-preview-details.js +1 -0
- package/dist/cjs/entities/pricing-preview/pricing-preview-discounts.js +3 -0
- package/dist/cjs/entities/pricing-preview/pricing-preview-line-item.js +9 -0
- package/dist/cjs/entities/pricing-preview/pricing-preview.js +15 -7
- package/dist/cjs/entities/product/product.js +13 -2
- package/dist/cjs/entities/report/report-csv.js +1 -0
- package/dist/cjs/entities/report/report-filters.js +4 -2
- package/dist/cjs/entities/report/report.js +10 -4
- package/dist/cjs/entities/shared/adjustment-original-amount.js +2 -0
- package/dist/cjs/entities/shared/billing-details.js +5 -2
- package/dist/cjs/entities/shared/chargeback-fee.js +2 -0
- package/dist/cjs/entities/shared/import-meta.js +2 -0
- package/dist/cjs/entities/shared/korean-market-underlying-details.js +1 -0
- package/dist/cjs/entities/shared/money.js +2 -0
- package/dist/cjs/entities/shared/payment-card.js +5 -0
- package/dist/cjs/entities/shared/payment-method-details.js +3 -0
- package/dist/cjs/entities/shared/payment-method-underlying-details.js +1 -0
- package/dist/cjs/entities/shared/payout-totals-adjustment.js +7 -0
- package/dist/cjs/entities/shared/paypal.js +2 -0
- package/dist/cjs/entities/shared/simulation-event-request.js +1 -0
- package/dist/cjs/entities/shared/simulation-event-response.js +2 -0
- package/dist/cjs/entities/shared/tax-rates-used.js +2 -0
- package/dist/cjs/entities/shared/time-period.js +2 -0
- package/dist/cjs/entities/shared/total-adjustments.js +6 -0
- package/dist/cjs/entities/shared/totals.js +4 -0
- package/dist/cjs/entities/shared/transaction-checkout.js +1 -0
- package/dist/cjs/entities/shared/transaction-payment-attempt.js +10 -2
- package/dist/cjs/entities/shared/transaction-payout-totals-adjusted.js +9 -0
- package/dist/cjs/entities/shared/transaction-payout-totals.js +15 -0
- package/dist/cjs/entities/shared/transaction-totals-adjusted.js +7 -0
- package/dist/cjs/entities/shared/transaction-totals.js +11 -0
- package/dist/cjs/entities/shared/unit-price-override.js +2 -0
- package/dist/cjs/entities/shared/unit-totals.js +4 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/simulation-scenario-config.js +5 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-cancellation-details.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-cancellation-entities.js +2 -2
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-cancellation-options.js +4 -3
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-creation-details.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-creation-entities.js +14 -8
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-creation-item.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-creation-options.js +6 -4
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-pause-details.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-pause-entities.js +2 -2
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-pause-options.js +4 -3
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-renewal-details.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-renewal-entities.js +2 -2
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-renewal-options.js +4 -3
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-resume-details.js +2 -0
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-resume-entities.js +2 -2
- package/dist/cjs/entities/simulation/simulation-scenario-config/subscription-resume-options.js +4 -3
- package/dist/cjs/entities/simulation/simulation.js +12 -3
- package/dist/cjs/entities/simulation-run/simulation-run.js +7 -2
- package/dist/cjs/entities/simulation-run-event/simulation-run-event.js +8 -0
- package/dist/cjs/entities/simulation-types/simulation-type.js +6 -0
- package/dist/cjs/entities/subscription/next-transaction-adjustment-item.js +5 -0
- package/dist/cjs/entities/subscription/next-transaction-adjustment-preview.js +3 -0
- package/dist/cjs/entities/subscription/next-transaction.js +3 -0
- package/dist/cjs/entities/subscription/subscription-discount.js +5 -3
- package/dist/cjs/entities/subscription/subscription-item.js +10 -0
- package/dist/cjs/entities/subscription/subscription-management.js +2 -0
- package/dist/cjs/entities/subscription/subscription-preview-summary-result.js +3 -0
- package/dist/cjs/entities/subscription/subscription-preview-update-summary.js +3 -0
- package/dist/cjs/entities/subscription/subscription-preview.js +26 -0
- package/dist/cjs/entities/subscription/subscription-scheduled-change.js +3 -0
- package/dist/cjs/entities/subscription/subscription-time-period.js +2 -0
- package/dist/cjs/entities/subscription/subscription.js +25 -0
- package/dist/cjs/entities/subscription/transaction-details-preview.js +3 -0
- package/dist/cjs/entities/subscription/transaction-line-item-preview.js +7 -0
- package/dist/cjs/entities/transaction/address-preview.js +2 -0
- package/dist/cjs/entities/transaction/adjustment-totals-breakdown.js +3 -0
- package/dist/cjs/entities/transaction/adjustment-totals.js +7 -0
- package/dist/cjs/entities/transaction/proration.js +2 -0
- package/dist/cjs/entities/transaction/transaction-adjustment-item.js +6 -0
- package/dist/cjs/entities/transaction/transaction-adjustment.js +14 -0
- package/dist/cjs/entities/transaction/transaction-details.js +6 -0
- package/dist/cjs/entities/transaction/transaction-invoice-pdf.js +1 -0
- package/dist/cjs/entities/transaction/transaction-item-preview.js +5 -2
- package/dist/cjs/entities/transaction/transaction-item.js +3 -0
- package/dist/cjs/entities/transaction/transaction-line-item.js +8 -0
- package/dist/cjs/entities/transaction/transaction-preview.js +12 -2
- package/dist/cjs/entities/transaction/transaction-proration.js +2 -0
- package/dist/cjs/entities/transaction/transaction.js +31 -2
- package/dist/cjs/entities/transaction/transactions-time-period.js +2 -0
- package/dist/cjs/enums/client-tokens/client-token-status.js +2 -0
- package/dist/cjs/enums/client-tokens/index.js +17 -0
- package/dist/cjs/enums/index.js +1 -0
- package/dist/cjs/internal/api/case-helpers.js +2 -13
- package/dist/cjs/internal/api/client.js +54 -64
- package/dist/cjs/internal/base/base-resource.js +1 -0
- package/dist/cjs/internal/base/collection.js +20 -45
- package/dist/cjs/internal/base/logger.js +1 -0
- package/dist/cjs/internal/base/path-parameters.js +2 -0
- package/dist/cjs/internal/base/query-parameters.js +1 -0
- package/dist/cjs/internal/errors/generic.js +5 -0
- package/dist/cjs/internal/providers/crypto/crypto-provider.js +2 -13
- package/dist/cjs/internal/providers/crypto/edge-crypto.js +14 -25
- package/dist/cjs/internal/providers/crypto/node-crypto.js +5 -16
- package/dist/cjs/internal/providers/runtime-provider.js +1 -0
- package/dist/cjs/notifications/entities/address/address-notification.js +15 -2
- package/dist/cjs/notifications/entities/adjustment/adjustment-item-notification.js +6 -0
- package/dist/cjs/notifications/entities/adjustment/adjustment-item-totals-notification.js +3 -0
- package/dist/cjs/notifications/entities/adjustment/adjustment-notification.js +15 -0
- package/dist/cjs/notifications/entities/adjustment/adjustment-proration-notification.js +2 -0
- package/dist/cjs/notifications/entities/adjustment/adjustment-time-period-notification.js +2 -0
- package/dist/cjs/notifications/entities/api-key/api-key-notification.js +13 -4
- package/dist/cjs/notifications/entities/business/business-notification.js +12 -2
- package/dist/cjs/notifications/entities/business/contacts-notification.js +2 -0
- package/dist/cjs/notifications/entities/client-token/client-token-notification.js +24 -0
- package/dist/cjs/notifications/entities/client-token/index.js +17 -0
- package/dist/cjs/notifications/entities/customer/customer-notification.js +10 -0
- package/dist/cjs/notifications/entities/discount/discount-notification.js +22 -2
- package/dist/cjs/notifications/entities/discount-group/discount-group-notification.js +6 -0
- package/dist/cjs/notifications/entities/index.js +1 -0
- package/dist/cjs/notifications/entities/payment-method/payment-method-deleted-notification.js +8 -0
- package/dist/cjs/notifications/entities/payment-method/payment-method-notification.js +7 -0
- package/dist/cjs/notifications/entities/payout/payout-notification.js +4 -0
- package/dist/cjs/notifications/entities/price/price-notification.js +19 -4
- package/dist/cjs/notifications/entities/price/price-quantity-notification.js +2 -0
- package/dist/cjs/notifications/entities/product/product-notification.js +13 -3
- package/dist/cjs/notifications/entities/report/report-filters-notification.js +4 -2
- package/dist/cjs/notifications/entities/report/report-notification.js +10 -4
- package/dist/cjs/notifications/entities/shared/adjustment-original-amount-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/billing-details-notification.js +5 -2
- package/dist/cjs/notifications/entities/shared/chargeback-fee-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/import-meta-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/korean-market-underlying-details-notification.js +1 -0
- package/dist/cjs/notifications/entities/shared/money-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/payment-card-notification.js +5 -0
- package/dist/cjs/notifications/entities/shared/payment-method-details-notification.js +3 -0
- package/dist/cjs/notifications/entities/shared/payment-method-underlying-details-notification.js +1 -0
- package/dist/cjs/notifications/entities/shared/payout-totals-adjustment-notification.js +7 -0
- package/dist/cjs/notifications/entities/shared/tax-rates-used-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/time-period-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/total-adjustments-notification.js +6 -0
- package/dist/cjs/notifications/entities/shared/totals-notification.js +4 -0
- package/dist/cjs/notifications/entities/shared/transaction-checkout-notification.js +1 -0
- package/dist/cjs/notifications/entities/shared/transaction-payment-attempt-notification.js +10 -2
- package/dist/cjs/notifications/entities/shared/transaction-payout-totals-adjusted-notification.js +9 -0
- package/dist/cjs/notifications/entities/shared/transaction-payout-totals-notification.js +13 -0
- package/dist/cjs/notifications/entities/shared/transaction-totals-adjusted-notification.js +7 -0
- package/dist/cjs/notifications/entities/shared/transaction-totals-notification.js +11 -0
- package/dist/cjs/notifications/entities/shared/unit-price-override-notification.js +2 -0
- package/dist/cjs/notifications/entities/shared/unit-totals-notification.js +4 -0
- package/dist/cjs/notifications/entities/subscription/subscription-created-notification.js +23 -0
- package/dist/cjs/notifications/entities/subscription/subscription-discount-notification.js +4 -2
- package/dist/cjs/notifications/entities/subscription/subscription-item-notification.js +10 -0
- package/dist/cjs/notifications/entities/subscription/subscription-notification.js +22 -0
- package/dist/cjs/notifications/entities/subscription/subscription-price-notification.js +16 -3
- package/dist/cjs/notifications/entities/subscription/subscription-scheduled-change-notification.js +3 -0
- package/dist/cjs/notifications/entities/subscription/subscription-time-period-notification.js +2 -0
- package/dist/cjs/notifications/entities/transaction/transaction-details-notification.js +6 -0
- package/dist/cjs/notifications/entities/transaction/transaction-item-notification.js +3 -0
- package/dist/cjs/notifications/entities/transaction/transaction-line-item-notification.js +8 -0
- package/dist/cjs/notifications/entities/transaction/transaction-notification.js +23 -0
- package/dist/cjs/notifications/entities/transaction/transaction-proration-notification.js +2 -0
- package/dist/cjs/notifications/entities/transaction/transactions-time-period-notification.js +2 -0
- package/dist/cjs/notifications/events/address/address-created-event.js +2 -1
- package/dist/cjs/notifications/events/address/address-imported-event.js +2 -1
- package/dist/cjs/notifications/events/address/address-updated-event.js +2 -1
- package/dist/cjs/notifications/events/adjustment/adjustment-created-event.js +2 -1
- package/dist/cjs/notifications/events/adjustment/adjustment-updated-event.js +2 -1
- package/dist/cjs/notifications/events/api-key/api-key-created-event.js +2 -1
- package/dist/cjs/notifications/events/api-key/api-key-expired-event.js +2 -1
- package/dist/cjs/notifications/events/api-key/api-key-expiring-event.js +2 -1
- package/dist/cjs/notifications/events/api-key/api-key-revoked-event.js +2 -1
- package/dist/cjs/notifications/events/api-key/api-key-updated-event.js +2 -1
- package/dist/cjs/notifications/events/business/business-created-event.js +2 -1
- package/dist/cjs/notifications/events/business/business-imported-event.js +2 -1
- package/dist/cjs/notifications/events/business/business-updated-event.js +2 -1
- package/dist/cjs/notifications/events/client-token/client-token-created-event.js +15 -0
- package/dist/cjs/notifications/events/client-token/client-token-revoked-event.js +15 -0
- package/dist/cjs/notifications/events/client-token/client-token-updated-event.js +15 -0
- package/dist/cjs/notifications/events/client-token/index.js +19 -0
- package/dist/cjs/notifications/events/customer/customer-created-event.js +2 -1
- package/dist/cjs/notifications/events/customer/customer-imported-event.js +2 -1
- package/dist/cjs/notifications/events/customer/customer-updated-event.js +2 -1
- package/dist/cjs/notifications/events/discount/discount-created-event.js +2 -1
- package/dist/cjs/notifications/events/discount/discount-imported-event.js +2 -1
- package/dist/cjs/notifications/events/discount/discount-updated-event.js +2 -1
- package/dist/cjs/notifications/events/discount-group/discount-group-created-event.js +2 -1
- package/dist/cjs/notifications/events/discount-group/discount-group-updated-event.js +15 -0
- package/dist/cjs/notifications/events/discount-group/index.js +1 -0
- package/dist/cjs/notifications/events/generic/generic-event.js +1 -0
- package/dist/cjs/notifications/events/index.js +1 -0
- package/dist/cjs/notifications/events/payment-method/payment-method-deleted-event.js +2 -1
- package/dist/cjs/notifications/events/payment-method/payment-method-saved-event.js +2 -1
- package/dist/cjs/notifications/events/payout/payout-created-event.js +2 -1
- package/dist/cjs/notifications/events/payout/payout-paid-event.js +2 -1
- package/dist/cjs/notifications/events/price/price-created-event.js +2 -1
- package/dist/cjs/notifications/events/price/price-imported-event.js +2 -1
- package/dist/cjs/notifications/events/price/price-updated-event.js +2 -1
- package/dist/cjs/notifications/events/product/product-created-event.js +2 -1
- package/dist/cjs/notifications/events/product/product-imported-event.js +2 -1
- package/dist/cjs/notifications/events/product/product-updated-event.js +2 -1
- package/dist/cjs/notifications/events/report/report-created-event.js +2 -1
- package/dist/cjs/notifications/events/report/report-updated-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-activated-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-canceled-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-created-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-imported-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-past-due-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-paused-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-resumed-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-trialing-event.js +2 -1
- package/dist/cjs/notifications/events/subscription/subscription-updated-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-billed-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-canceled-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-completed-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-created-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-paid-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-past-due-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-payment-failed-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-ready-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-revised-event.js +2 -1
- package/dist/cjs/notifications/events/transaction/transaction-updated-event.js +2 -1
- package/dist/cjs/notifications/helpers/types.js +4 -0
- package/dist/cjs/notifications/helpers/webhooks-validator.js +14 -26
- package/dist/cjs/notifications/helpers/webhooks.js +19 -24
- package/dist/cjs/notifications/types/client-token/client-token-notification-response.js +2 -0
- package/dist/cjs/notifications/types/client-token/index.js +17 -0
- package/dist/cjs/notifications/types/index.js +1 -0
- package/dist/cjs/paddle.js +31 -5
- package/dist/cjs/resources/addresses/index.js +25 -42
- package/dist/cjs/resources/adjustments/index.js +12 -25
- package/dist/cjs/resources/businesses/index.js +25 -42
- package/dist/cjs/resources/client-tokens/index.js +57 -0
- package/dist/cjs/resources/client-tokens/operations/create-client-token-request-body.js +2 -0
- package/dist/cjs/resources/client-tokens/operations/index.js +19 -0
- package/dist/cjs/resources/client-tokens/operations/list-client-token-query-parameters.js +2 -0
- package/dist/cjs/resources/client-tokens/operations/update-client-token-request-body.js +2 -0
- package/dist/cjs/resources/customer-portal-sessions/index.js +8 -19
- package/dist/cjs/resources/customers/index.js +35 -56
- package/dist/cjs/resources/discount-groups/index.js +25 -15
- package/dist/cjs/resources/discount-groups/operations/index.js +1 -0
- package/dist/cjs/resources/discount-groups/operations/update-discount-group-request-body.js +2 -0
- package/dist/cjs/resources/discounts/index.js +21 -37
- package/dist/cjs/resources/discounts/operations/get-discount-query-parameters.js +2 -0
- package/dist/cjs/resources/discounts/operations/index.js +1 -0
- package/dist/cjs/resources/event-types/index.js +4 -15
- package/dist/cjs/resources/index.js +1 -0
- package/dist/cjs/resources/notification-settings/index.js +31 -50
- package/dist/cjs/resources/notifications/index.js +14 -27
- package/dist/cjs/resources/payment-methods/index.js +17 -30
- package/dist/cjs/resources/prices/index.js +21 -38
- package/dist/cjs/resources/pricing-preview/index.js +4 -15
- package/dist/cjs/resources/products/index.js +21 -38
- package/dist/cjs/resources/reports/index.js +18 -33
- package/dist/cjs/resources/simulation-run-events/index.js +18 -31
- package/dist/cjs/resources/simulation-runs/index.js +16 -29
- package/dist/cjs/resources/simulation-types/index.js +4 -15
- package/dist/cjs/resources/simulations/index.js +18 -33
- package/dist/cjs/resources/subscriptions/index.js +71 -100
- package/dist/cjs/resources/transactions/index.js +40 -61
- package/dist/cjs/types/client-token/client-token-response.js +2 -0
- package/dist/cjs/types/client-token/index.js +17 -0
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/esm/entities/address/address.js +14 -0
- package/dist/esm/entities/adjustment/adjustment-credit-note-pdf.js +1 -0
- package/dist/esm/entities/adjustment/adjustment-item-totals.js +3 -0
- package/dist/esm/entities/adjustment/adjustment-item.js +6 -0
- package/dist/esm/entities/adjustment/adjustment-proration.js +2 -0
- package/dist/esm/entities/adjustment/adjustment-time-period.js +2 -0
- package/dist/esm/entities/adjustment/adjustment.js +15 -0
- package/dist/esm/entities/business/business.js +11 -0
- package/dist/esm/entities/business/contacts.js +2 -0
- package/dist/esm/entities/client-token/client-token-collection.js +7 -0
- package/dist/esm/entities/client-token/client-token.js +20 -0
- package/dist/esm/entities/client-token/index.js +2 -0
- package/dist/esm/entities/customer/auth-token.js +2 -0
- package/dist/esm/entities/customer/credit-balance.js +3 -0
- package/dist/esm/entities/customer/customer-balance.js +3 -0
- package/dist/esm/entities/customer/customer.js +10 -0
- package/dist/esm/entities/customer-portal-session/customer-portal-session.js +4 -0
- package/dist/esm/entities/customer-portal-session/customer-portal-subscription-url.js +3 -0
- package/dist/esm/entities/customer-portal-session/general.js +1 -0
- package/dist/esm/entities/customer-portal-session/urls.js +3 -2
- package/dist/esm/entities/discount/discount.js +25 -3
- package/dist/esm/entities/discount-group/discount-group.js +6 -0
- package/dist/esm/entities/event-types/event-type.js +4 -0
- package/dist/esm/entities/events/event.js +6 -2
- package/dist/esm/entities/notification-settings/notification-settings.js +10 -0
- package/dist/esm/entities/notifications/notification-log.js +6 -2
- package/dist/esm/entities/notifications/notification.js +16 -5
- package/dist/esm/entities/notifications/replay-notification.js +1 -0
- package/dist/esm/entities/payment-method/payment-method.js +10 -0
- package/dist/esm/entities/payout/payout.js +4 -0
- package/dist/esm/entities/price/price-quantity.js +2 -0
- package/dist/esm/entities/price/price.js +18 -2
- package/dist/esm/entities/pricing-preview/pricing-preview-details.js +1 -0
- package/dist/esm/entities/pricing-preview/pricing-preview-discounts.js +3 -0
- package/dist/esm/entities/pricing-preview/pricing-preview-line-item.js +9 -0
- package/dist/esm/entities/pricing-preview/pricing-preview.js +15 -7
- package/dist/esm/entities/product/product.js +13 -2
- package/dist/esm/entities/report/report-csv.js +1 -0
- package/dist/esm/entities/report/report-filters.js +4 -2
- package/dist/esm/entities/report/report.js +10 -4
- package/dist/esm/entities/shared/adjustment-original-amount.js +2 -0
- package/dist/esm/entities/shared/billing-details.js +5 -2
- package/dist/esm/entities/shared/chargeback-fee.js +2 -0
- package/dist/esm/entities/shared/import-meta.js +2 -0
- package/dist/esm/entities/shared/korean-market-underlying-details.js +1 -0
- package/dist/esm/entities/shared/money.js +2 -0
- package/dist/esm/entities/shared/payment-card.js +5 -0
- package/dist/esm/entities/shared/payment-method-details.js +3 -0
- package/dist/esm/entities/shared/payment-method-underlying-details.js +1 -0
- package/dist/esm/entities/shared/payout-totals-adjustment.js +7 -0
- package/dist/esm/entities/shared/paypal.js +2 -0
- package/dist/esm/entities/shared/simulation-event-request.js +1 -0
- package/dist/esm/entities/shared/simulation-event-response.js +2 -0
- package/dist/esm/entities/shared/tax-rates-used.js +2 -0
- package/dist/esm/entities/shared/time-period.js +2 -0
- package/dist/esm/entities/shared/total-adjustments.js +6 -0
- package/dist/esm/entities/shared/totals.js +4 -0
- package/dist/esm/entities/shared/transaction-checkout.js +1 -0
- package/dist/esm/entities/shared/transaction-payment-attempt.js +10 -2
- package/dist/esm/entities/shared/transaction-payout-totals-adjusted.js +9 -0
- package/dist/esm/entities/shared/transaction-payout-totals.js +15 -0
- package/dist/esm/entities/shared/transaction-totals-adjusted.js +7 -0
- package/dist/esm/entities/shared/transaction-totals.js +11 -0
- package/dist/esm/entities/shared/unit-price-override.js +2 -0
- package/dist/esm/entities/shared/unit-totals.js +4 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/simulation-scenario-config.js +5 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-cancellation-details.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-cancellation-entities.js +2 -2
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-cancellation-options.js +4 -3
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-creation-details.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-creation-entities.js +14 -8
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-creation-item.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-creation-options.js +6 -4
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-pause-details.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-pause-entities.js +2 -2
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-pause-options.js +4 -3
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-renewal-details.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-renewal-entities.js +2 -2
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-renewal-options.js +4 -3
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-resume-details.js +2 -0
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-resume-entities.js +2 -2
- package/dist/esm/entities/simulation/simulation-scenario-config/subscription-resume-options.js +4 -3
- package/dist/esm/entities/simulation/simulation.js +12 -3
- package/dist/esm/entities/simulation-run/simulation-run.js +7 -2
- package/dist/esm/entities/simulation-run-event/simulation-run-event.js +8 -0
- package/dist/esm/entities/simulation-types/simulation-type.js +6 -0
- package/dist/esm/entities/subscription/next-transaction-adjustment-item.js +5 -0
- package/dist/esm/entities/subscription/next-transaction-adjustment-preview.js +3 -0
- package/dist/esm/entities/subscription/next-transaction.js +3 -0
- package/dist/esm/entities/subscription/subscription-discount.js +5 -3
- package/dist/esm/entities/subscription/subscription-item.js +10 -0
- package/dist/esm/entities/subscription/subscription-management.js +2 -0
- package/dist/esm/entities/subscription/subscription-preview-summary-result.js +3 -0
- package/dist/esm/entities/subscription/subscription-preview-update-summary.js +3 -0
- package/dist/esm/entities/subscription/subscription-preview.js +26 -0
- package/dist/esm/entities/subscription/subscription-scheduled-change.js +3 -0
- package/dist/esm/entities/subscription/subscription-time-period.js +2 -0
- package/dist/esm/entities/subscription/subscription.js +25 -0
- package/dist/esm/entities/subscription/transaction-details-preview.js +3 -0
- package/dist/esm/entities/subscription/transaction-line-item-preview.js +7 -0
- package/dist/esm/entities/transaction/address-preview.js +2 -0
- package/dist/esm/entities/transaction/adjustment-totals-breakdown.js +3 -0
- package/dist/esm/entities/transaction/adjustment-totals.js +7 -0
- package/dist/esm/entities/transaction/proration.js +2 -0
- package/dist/esm/entities/transaction/transaction-adjustment-item.js +6 -0
- package/dist/esm/entities/transaction/transaction-adjustment.js +14 -0
- package/dist/esm/entities/transaction/transaction-details.js +6 -0
- package/dist/esm/entities/transaction/transaction-invoice-pdf.js +1 -0
- package/dist/esm/entities/transaction/transaction-item-preview.js +5 -2
- package/dist/esm/entities/transaction/transaction-item.js +3 -0
- package/dist/esm/entities/transaction/transaction-line-item.js +8 -0
- package/dist/esm/entities/transaction/transaction-preview.js +12 -2
- package/dist/esm/entities/transaction/transaction-proration.js +2 -0
- package/dist/esm/entities/transaction/transaction.js +31 -2
- package/dist/esm/entities/transaction/transactions-time-period.js +2 -0
- package/dist/esm/enums/client-tokens/client-token-status.js +1 -0
- package/dist/esm/enums/client-tokens/index.js +1 -0
- package/dist/esm/enums/index.js +1 -0
- package/dist/esm/internal/api/case-helpers.js +2 -13
- package/dist/esm/internal/api/client.js +54 -64
- package/dist/esm/internal/base/base-resource.js +1 -0
- package/dist/esm/internal/base/collection.js +20 -45
- package/dist/esm/internal/base/logger.js +1 -0
- package/dist/esm/internal/base/path-parameters.js +2 -0
- package/dist/esm/internal/base/query-parameters.js +1 -0
- package/dist/esm/internal/errors/generic.js +5 -0
- package/dist/esm/internal/providers/crypto/crypto-provider.js +2 -13
- package/dist/esm/internal/providers/crypto/edge-crypto.js +14 -25
- package/dist/esm/internal/providers/crypto/node-crypto.js +5 -16
- package/dist/esm/internal/providers/runtime-provider.js +1 -0
- package/dist/esm/notifications/entities/address/address-notification.js +15 -2
- package/dist/esm/notifications/entities/adjustment/adjustment-item-notification.js +6 -0
- package/dist/esm/notifications/entities/adjustment/adjustment-item-totals-notification.js +3 -0
- package/dist/esm/notifications/entities/adjustment/adjustment-notification.js +15 -0
- package/dist/esm/notifications/entities/adjustment/adjustment-proration-notification.js +2 -0
- package/dist/esm/notifications/entities/adjustment/adjustment-time-period-notification.js +2 -0
- package/dist/esm/notifications/entities/api-key/api-key-notification.js +13 -4
- package/dist/esm/notifications/entities/business/business-notification.js +12 -2
- package/dist/esm/notifications/entities/business/contacts-notification.js +2 -0
- package/dist/esm/notifications/entities/client-token/client-token-notification.js +20 -0
- package/dist/esm/notifications/entities/client-token/index.js +1 -0
- package/dist/esm/notifications/entities/customer/customer-notification.js +10 -0
- package/dist/esm/notifications/entities/discount/discount-notification.js +22 -2
- package/dist/esm/notifications/entities/discount-group/discount-group-notification.js +6 -0
- package/dist/esm/notifications/entities/index.js +1 -0
- package/dist/esm/notifications/entities/payment-method/payment-method-deleted-notification.js +8 -0
- package/dist/esm/notifications/entities/payment-method/payment-method-notification.js +7 -0
- package/dist/esm/notifications/entities/payout/payout-notification.js +4 -0
- package/dist/esm/notifications/entities/price/price-notification.js +19 -4
- package/dist/esm/notifications/entities/price/price-quantity-notification.js +2 -0
- package/dist/esm/notifications/entities/product/product-notification.js +13 -3
- package/dist/esm/notifications/entities/report/report-filters-notification.js +4 -2
- package/dist/esm/notifications/entities/report/report-notification.js +10 -4
- package/dist/esm/notifications/entities/shared/adjustment-original-amount-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/billing-details-notification.js +5 -2
- package/dist/esm/notifications/entities/shared/chargeback-fee-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/import-meta-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/korean-market-underlying-details-notification.js +1 -0
- package/dist/esm/notifications/entities/shared/money-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/payment-card-notification.js +5 -0
- package/dist/esm/notifications/entities/shared/payment-method-details-notification.js +3 -0
- package/dist/esm/notifications/entities/shared/payment-method-underlying-details-notification.js +1 -0
- package/dist/esm/notifications/entities/shared/payout-totals-adjustment-notification.js +7 -0
- package/dist/esm/notifications/entities/shared/tax-rates-used-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/time-period-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/total-adjustments-notification.js +6 -0
- package/dist/esm/notifications/entities/shared/totals-notification.js +4 -0
- package/dist/esm/notifications/entities/shared/transaction-checkout-notification.js +1 -0
- package/dist/esm/notifications/entities/shared/transaction-payment-attempt-notification.js +10 -2
- package/dist/esm/notifications/entities/shared/transaction-payout-totals-adjusted-notification.js +9 -0
- package/dist/esm/notifications/entities/shared/transaction-payout-totals-notification.js +13 -0
- package/dist/esm/notifications/entities/shared/transaction-totals-adjusted-notification.js +7 -0
- package/dist/esm/notifications/entities/shared/transaction-totals-notification.js +11 -0
- package/dist/esm/notifications/entities/shared/unit-price-override-notification.js +2 -0
- package/dist/esm/notifications/entities/shared/unit-totals-notification.js +4 -0
- package/dist/esm/notifications/entities/subscription/subscription-created-notification.js +23 -0
- package/dist/esm/notifications/entities/subscription/subscription-discount-notification.js +4 -2
- package/dist/esm/notifications/entities/subscription/subscription-item-notification.js +10 -0
- package/dist/esm/notifications/entities/subscription/subscription-notification.js +22 -0
- package/dist/esm/notifications/entities/subscription/subscription-price-notification.js +16 -3
- package/dist/esm/notifications/entities/subscription/subscription-scheduled-change-notification.js +3 -0
- package/dist/esm/notifications/entities/subscription/subscription-time-period-notification.js +2 -0
- package/dist/esm/notifications/entities/transaction/transaction-details-notification.js +6 -0
- package/dist/esm/notifications/entities/transaction/transaction-item-notification.js +3 -0
- package/dist/esm/notifications/entities/transaction/transaction-line-item-notification.js +8 -0
- package/dist/esm/notifications/entities/transaction/transaction-notification.js +23 -0
- package/dist/esm/notifications/entities/transaction/transaction-proration-notification.js +2 -0
- package/dist/esm/notifications/entities/transaction/transactions-time-period-notification.js +2 -0
- package/dist/esm/notifications/events/address/address-created-event.js +2 -1
- package/dist/esm/notifications/events/address/address-imported-event.js +2 -1
- package/dist/esm/notifications/events/address/address-updated-event.js +2 -1
- package/dist/esm/notifications/events/adjustment/adjustment-created-event.js +2 -1
- package/dist/esm/notifications/events/adjustment/adjustment-updated-event.js +2 -1
- package/dist/esm/notifications/events/api-key/api-key-created-event.js +2 -1
- package/dist/esm/notifications/events/api-key/api-key-expired-event.js +2 -1
- package/dist/esm/notifications/events/api-key/api-key-expiring-event.js +2 -1
- package/dist/esm/notifications/events/api-key/api-key-revoked-event.js +2 -1
- package/dist/esm/notifications/events/api-key/api-key-updated-event.js +2 -1
- package/dist/esm/notifications/events/business/business-created-event.js +2 -1
- package/dist/esm/notifications/events/business/business-imported-event.js +2 -1
- package/dist/esm/notifications/events/business/business-updated-event.js +2 -1
- package/dist/esm/notifications/events/client-token/client-token-created-event.js +11 -0
- package/dist/esm/notifications/events/client-token/client-token-revoked-event.js +11 -0
- package/dist/esm/notifications/events/client-token/client-token-updated-event.js +11 -0
- package/dist/esm/notifications/events/client-token/index.js +3 -0
- package/dist/esm/notifications/events/customer/customer-created-event.js +2 -1
- package/dist/esm/notifications/events/customer/customer-imported-event.js +2 -1
- package/dist/esm/notifications/events/customer/customer-updated-event.js +2 -1
- package/dist/esm/notifications/events/discount/discount-created-event.js +2 -1
- package/dist/esm/notifications/events/discount/discount-imported-event.js +2 -1
- package/dist/esm/notifications/events/discount/discount-updated-event.js +2 -1
- package/dist/esm/notifications/events/discount-group/discount-group-created-event.js +2 -1
- package/dist/esm/notifications/events/discount-group/discount-group-updated-event.js +11 -0
- package/dist/esm/notifications/events/discount-group/index.js +1 -0
- package/dist/esm/notifications/events/generic/generic-event.js +1 -0
- package/dist/esm/notifications/events/index.js +1 -0
- package/dist/esm/notifications/events/payment-method/payment-method-deleted-event.js +2 -1
- package/dist/esm/notifications/events/payment-method/payment-method-saved-event.js +2 -1
- package/dist/esm/notifications/events/payout/payout-created-event.js +2 -1
- package/dist/esm/notifications/events/payout/payout-paid-event.js +2 -1
- package/dist/esm/notifications/events/price/price-created-event.js +2 -1
- package/dist/esm/notifications/events/price/price-imported-event.js +2 -1
- package/dist/esm/notifications/events/price/price-updated-event.js +2 -1
- package/dist/esm/notifications/events/product/product-created-event.js +2 -1
- package/dist/esm/notifications/events/product/product-imported-event.js +2 -1
- package/dist/esm/notifications/events/product/product-updated-event.js +2 -1
- package/dist/esm/notifications/events/report/report-created-event.js +2 -1
- package/dist/esm/notifications/events/report/report-updated-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-activated-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-canceled-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-created-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-imported-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-past-due-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-paused-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-resumed-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-trialing-event.js +2 -1
- package/dist/esm/notifications/events/subscription/subscription-updated-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-billed-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-canceled-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-completed-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-created-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-paid-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-past-due-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-payment-failed-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-ready-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-revised-event.js +2 -1
- package/dist/esm/notifications/events/transaction/transaction-updated-event.js +2 -1
- package/dist/esm/notifications/helpers/types.js +4 -0
- package/dist/esm/notifications/helpers/webhooks-validator.js +14 -26
- package/dist/esm/notifications/helpers/webhooks.js +20 -25
- package/dist/esm/notifications/types/client-token/client-token-notification-response.js +1 -0
- package/dist/esm/notifications/types/client-token/index.js +1 -0
- package/dist/esm/notifications/types/index.js +1 -0
- package/dist/esm/paddle.js +32 -6
- package/dist/esm/resources/addresses/index.js +25 -42
- package/dist/esm/resources/adjustments/index.js +12 -25
- package/dist/esm/resources/businesses/index.js +25 -42
- package/dist/esm/resources/client-tokens/index.js +39 -0
- package/dist/esm/resources/client-tokens/operations/create-client-token-request-body.js +1 -0
- package/dist/esm/resources/client-tokens/operations/index.js +3 -0
- package/dist/esm/resources/client-tokens/operations/list-client-token-query-parameters.js +1 -0
- package/dist/esm/resources/client-tokens/operations/update-client-token-request-body.js +1 -0
- package/dist/esm/resources/customer-portal-sessions/index.js +8 -19
- package/dist/esm/resources/customers/index.js +35 -56
- package/dist/esm/resources/discount-groups/index.js +26 -16
- package/dist/esm/resources/discount-groups/operations/index.js +1 -0
- package/dist/esm/resources/discount-groups/operations/update-discount-group-request-body.js +1 -0
- package/dist/esm/resources/discounts/index.js +21 -37
- package/dist/esm/resources/discounts/operations/get-discount-query-parameters.js +1 -0
- package/dist/esm/resources/discounts/operations/index.js +1 -0
- package/dist/esm/resources/event-types/index.js +4 -15
- package/dist/esm/resources/index.js +1 -0
- package/dist/esm/resources/notification-settings/index.js +31 -50
- package/dist/esm/resources/notifications/index.js +14 -27
- package/dist/esm/resources/payment-methods/index.js +17 -30
- package/dist/esm/resources/prices/index.js +21 -38
- package/dist/esm/resources/pricing-preview/index.js +4 -15
- package/dist/esm/resources/products/index.js +21 -38
- package/dist/esm/resources/reports/index.js +18 -33
- package/dist/esm/resources/simulation-run-events/index.js +18 -31
- package/dist/esm/resources/simulation-runs/index.js +16 -29
- package/dist/esm/resources/simulation-types/index.js +4 -15
- package/dist/esm/resources/simulations/index.js +18 -33
- package/dist/esm/resources/subscriptions/index.js +71 -100
- package/dist/esm/resources/transactions/index.js +40 -61
- package/dist/esm/types/client-token/client-token-response.js +1 -0
- package/dist/esm/types/client-token/index.js +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/dist/types/entities/client-token/client-token-collection.d.ts +6 -0
- package/dist/types/entities/client-token/client-token.d.ts +13 -0
- package/dist/types/entities/client-token/index.d.ts +2 -0
- package/dist/types/entities/discount/discount.d.ts +3 -1
- package/dist/types/entities/shared/transaction-payout-totals-adjusted.d.ts +1 -0
- package/dist/types/entities/shared/transaction-payout-totals.d.ts +2 -0
- package/dist/types/enums/api-key/api-key-permission.d.ts +1 -1
- package/dist/types/enums/client-tokens/client-token-status.d.ts +1 -0
- package/dist/types/enums/client-tokens/index.d.ts +1 -0
- package/dist/types/enums/index.d.ts +1 -0
- package/dist/types/notifications/entities/client-token/client-token-notification.d.ts +13 -0
- package/dist/types/notifications/entities/client-token/index.d.ts +1 -0
- package/dist/types/notifications/entities/discount/discount-notification.d.ts +1 -0
- package/dist/types/notifications/entities/index.d.ts +1 -0
- package/dist/types/notifications/entities/shared/transaction-payout-totals-adjusted-notification.d.ts +1 -0
- package/dist/types/notifications/events/client-token/client-token-created-event.d.ts +10 -0
- package/dist/types/notifications/events/client-token/client-token-revoked-event.d.ts +10 -0
- package/dist/types/notifications/events/client-token/client-token-updated-event.d.ts +10 -0
- package/dist/types/notifications/events/client-token/index.d.ts +3 -0
- package/dist/types/notifications/events/discount-group/discount-group-updated-event.d.ts +10 -0
- package/dist/types/notifications/events/discount-group/index.d.ts +1 -0
- package/dist/types/notifications/events/index.d.ts +1 -0
- package/dist/types/notifications/helpers/types.d.ts +6 -2
- package/dist/types/notifications/types/client-token/client-token-notification-response.d.ts +11 -0
- package/dist/types/notifications/types/client-token/index.d.ts +1 -0
- package/dist/types/notifications/types/discount/discount-notification-response.d.ts +1 -0
- package/dist/types/notifications/types/index.d.ts +1 -0
- package/dist/types/notifications/types/shared/payment-method-details.d.ts +1 -1
- package/dist/types/notifications/types/shared/transaction-payout-totals-adjusted-notification-response.d.ts +1 -0
- package/dist/types/paddle.d.ts +2 -1
- package/dist/types/resources/client-tokens/index.d.ts +11 -0
- package/dist/types/resources/client-tokens/operations/create-client-token-request-body.d.ts +4 -0
- package/dist/types/resources/client-tokens/operations/index.d.ts +3 -0
- package/dist/types/resources/client-tokens/operations/list-client-token-query-parameters.d.ts +7 -0
- package/dist/types/resources/client-tokens/operations/update-client-token-request-body.d.ts +4 -0
- package/dist/types/resources/discount-groups/index.d.ts +4 -1
- package/dist/types/resources/discount-groups/operations/index.d.ts +1 -0
- package/dist/types/resources/discount-groups/operations/update-discount-group-request-body.d.ts +5 -0
- package/dist/types/resources/discounts/index.d.ts +2 -2
- package/dist/types/resources/discounts/operations/create-discount-request-body.d.ts +1 -0
- package/dist/types/resources/discounts/operations/get-discount-query-parameters.d.ts +3 -0
- package/dist/types/resources/discounts/operations/index.d.ts +1 -0
- package/dist/types/resources/discounts/operations/list-discount-query-parameters.d.ts +2 -0
- package/dist/types/resources/discounts/operations/update-discount-request-body.d.ts +1 -0
- package/dist/types/resources/index.d.ts +1 -0
- package/dist/types/types/client-token/client-token-response.d.ts +11 -0
- package/dist/types/types/client-token/index.d.ts +1 -0
- package/dist/types/types/discount/discount-response.d.ts +4 -1
- package/dist/types/types/events/events-response.d.ts +14 -2
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/shared/payment-method-details.d.ts +1 -1
- package/dist/types/types/shared/transaction-payout-totals-adjusted-response.d.ts +1 -0
- package/dist/types/types/shared/transaction-payout-totals-response.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -4
|
@@ -13,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
17
|
exports.BusinessesResource = void 0;
|
|
27
18
|
const index_js_1 = require("../../internal/base/index.js");
|
|
@@ -41,42 +32,34 @@ class BusinessesResource extends index_js_1.BaseResource {
|
|
|
41
32
|
}).deriveUrl();
|
|
42
33
|
return new index_js_2.BusinessCollection(this.client, urlWithPathParams + queryParameters.toQueryString());
|
|
43
34
|
}
|
|
44
|
-
create(customerId, createBusinessParameters) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return new index_js_2.Business(data);
|
|
52
|
-
});
|
|
35
|
+
async create(customerId, createBusinessParameters) {
|
|
36
|
+
const urlWithPathParams = new index_js_1.PathParameters(BusinessPaths.create, {
|
|
37
|
+
customer_id: customerId,
|
|
38
|
+
}).deriveUrl();
|
|
39
|
+
const response = await this.client.post(urlWithPathParams, createBusinessParameters);
|
|
40
|
+
const data = this.handleResponse(response);
|
|
41
|
+
return new index_js_2.Business(data);
|
|
53
42
|
}
|
|
54
|
-
get(customerId, businessId) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return new index_js_2.Business(data);
|
|
63
|
-
});
|
|
43
|
+
async get(customerId, businessId) {
|
|
44
|
+
const urlWithPathParams = new index_js_1.PathParameters(BusinessPaths.get, {
|
|
45
|
+
customer_id: customerId,
|
|
46
|
+
business_id: businessId,
|
|
47
|
+
}).deriveUrl();
|
|
48
|
+
const response = await this.client.get(urlWithPathParams);
|
|
49
|
+
const data = this.handleResponse(response);
|
|
50
|
+
return new index_js_2.Business(data);
|
|
64
51
|
}
|
|
65
|
-
update(customerId, businessId, updateBusiness) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
return new index_js_2.Business(data);
|
|
74
|
-
});
|
|
52
|
+
async update(customerId, businessId, updateBusiness) {
|
|
53
|
+
const urlWithPathParams = new index_js_1.PathParameters(BusinessPaths.update, {
|
|
54
|
+
customer_id: customerId,
|
|
55
|
+
business_id: businessId,
|
|
56
|
+
}).deriveUrl();
|
|
57
|
+
const response = await this.client.patch(urlWithPathParams, updateBusiness);
|
|
58
|
+
const data = this.handleResponse(response);
|
|
59
|
+
return new index_js_2.Business(data);
|
|
75
60
|
}
|
|
76
|
-
archive(customerId, businessId) {
|
|
77
|
-
return
|
|
78
|
-
return yield this.update(customerId, businessId, { status: 'archived' });
|
|
79
|
-
});
|
|
61
|
+
async archive(customerId, businessId) {
|
|
62
|
+
return await this.update(customerId, businessId, { status: 'archived' });
|
|
80
63
|
}
|
|
81
64
|
}
|
|
82
65
|
exports.BusinessesResource = BusinessesResource;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.ClientTokensResource = void 0;
|
|
18
|
+
const index_js_1 = require("../../internal/base/index.js");
|
|
19
|
+
const index_js_2 = require("../../entities/client-token/index.js");
|
|
20
|
+
const ClientTokenPaths = {
|
|
21
|
+
list: '/client-tokens',
|
|
22
|
+
create: '/client-tokens',
|
|
23
|
+
get: '/client-tokens/{client_token_id}',
|
|
24
|
+
update: '/client-tokens/{client_token_id}',
|
|
25
|
+
};
|
|
26
|
+
__exportStar(require("./operations/index.js"), exports);
|
|
27
|
+
class ClientTokensResource extends index_js_1.BaseResource {
|
|
28
|
+
list(queryParams) {
|
|
29
|
+
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
30
|
+
return new index_js_2.ClientTokenCollection(this.client, ClientTokenPaths.list + queryParameters.toQueryString());
|
|
31
|
+
}
|
|
32
|
+
async create(createClientTokenRequestBody) {
|
|
33
|
+
const response = await this.client.post(ClientTokenPaths.create, createClientTokenRequestBody);
|
|
34
|
+
const data = this.handleResponse(response);
|
|
35
|
+
return new index_js_2.ClientToken(data);
|
|
36
|
+
}
|
|
37
|
+
async get(clientTokenId) {
|
|
38
|
+
const urlWithPathParams = new index_js_1.PathParameters(ClientTokenPaths.get, {
|
|
39
|
+
client_token_id: clientTokenId,
|
|
40
|
+
}).deriveUrl();
|
|
41
|
+
const response = await this.client.get(urlWithPathParams);
|
|
42
|
+
const data = this.handleResponse(response);
|
|
43
|
+
return new index_js_2.ClientToken(data);
|
|
44
|
+
}
|
|
45
|
+
async update(clientTokenId, updateClientToken) {
|
|
46
|
+
const urlWithPathParams = new index_js_1.PathParameters(ClientTokenPaths.update, {
|
|
47
|
+
client_token_id: clientTokenId,
|
|
48
|
+
}).deriveUrl();
|
|
49
|
+
const response = await this.client.patch(urlWithPathParams, updateClientToken);
|
|
50
|
+
const data = this.handleResponse(response);
|
|
51
|
+
return new index_js_2.ClientToken(data);
|
|
52
|
+
}
|
|
53
|
+
async revoke(clientTokenId) {
|
|
54
|
+
return await this.update(clientTokenId, { status: 'revoked' });
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.ClientTokensResource = ClientTokensResource;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-client-token-request-body.js"), exports);
|
|
18
|
+
__exportStar(require("./list-client-token-query-parameters.js"), exports);
|
|
19
|
+
__exportStar(require("./update-client-token-request-body.js"), exports);
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.CustomerPortalSessionsResource = void 0;
|
|
13
4
|
const index_js_1 = require("../../entities/index.js");
|
|
@@ -16,17 +7,15 @@ const CustomerPortalSessionPaths = {
|
|
|
16
7
|
create: '/customers/{customer_id}/portal-sessions',
|
|
17
8
|
};
|
|
18
9
|
class CustomerPortalSessionsResource extends index_js_2.BaseResource {
|
|
19
|
-
create(customerId, subscriptionIds) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
subscriptionIds,
|
|
26
|
-
});
|
|
27
|
-
const data = this.handleResponse(response);
|
|
28
|
-
return new index_js_1.CustomerPortalSession(data);
|
|
10
|
+
async create(customerId, subscriptionIds) {
|
|
11
|
+
const urlWithPathParams = new index_js_2.PathParameters(CustomerPortalSessionPaths.create, {
|
|
12
|
+
customer_id: customerId,
|
|
13
|
+
}).deriveUrl();
|
|
14
|
+
const response = await this.client.post(urlWithPathParams, {
|
|
15
|
+
subscriptionIds,
|
|
29
16
|
});
|
|
17
|
+
const data = this.handleResponse(response);
|
|
18
|
+
return new index_js_1.CustomerPortalSession(data);
|
|
30
19
|
}
|
|
31
20
|
}
|
|
32
21
|
exports.CustomerPortalSessionsResource = CustomerPortalSessionsResource;
|
|
@@ -13,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
17
|
exports.CustomersResource = void 0;
|
|
27
18
|
const index_js_1 = require("../../internal/base/index.js");
|
|
@@ -40,58 +31,46 @@ class CustomersResource extends index_js_1.BaseResource {
|
|
|
40
31
|
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
41
32
|
return new index_js_2.CustomerCollection(this.client, CustomerPaths.list + queryParameters.toQueryString());
|
|
42
33
|
}
|
|
43
|
-
create(createCustomerParameters) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return new index_js_2.Customer(data);
|
|
48
|
-
});
|
|
34
|
+
async create(createCustomerParameters) {
|
|
35
|
+
const response = await this.client.post(CustomerPaths.create, createCustomerParameters);
|
|
36
|
+
const data = this.handleResponse(response);
|
|
37
|
+
return new index_js_2.Customer(data);
|
|
49
38
|
}
|
|
50
|
-
get(customerId) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return new index_js_2.Customer(data);
|
|
58
|
-
});
|
|
39
|
+
async get(customerId) {
|
|
40
|
+
const urlWithPathParams = new index_js_1.PathParameters(CustomerPaths.get, {
|
|
41
|
+
customer_id: customerId,
|
|
42
|
+
}).deriveUrl();
|
|
43
|
+
const response = await this.client.get(urlWithPathParams);
|
|
44
|
+
const data = this.handleResponse(response);
|
|
45
|
+
return new index_js_2.Customer(data);
|
|
59
46
|
}
|
|
60
|
-
update(customerId, updateCustomer) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return new index_js_2.Customer(data);
|
|
68
|
-
});
|
|
47
|
+
async update(customerId, updateCustomer) {
|
|
48
|
+
const urlWithPathParams = new index_js_1.PathParameters(CustomerPaths.update, {
|
|
49
|
+
customer_id: customerId,
|
|
50
|
+
}).deriveUrl();
|
|
51
|
+
const response = await this.client.patch(urlWithPathParams, updateCustomer);
|
|
52
|
+
const data = this.handleResponse(response);
|
|
53
|
+
return new index_js_2.Customer(data);
|
|
69
54
|
}
|
|
70
|
-
getCreditBalance(customerId, queryParams) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return data.map((balance) => new index_js_2.CreditBalance(balance));
|
|
79
|
-
});
|
|
55
|
+
async getCreditBalance(customerId, queryParams) {
|
|
56
|
+
const urlWithPathParams = new index_js_1.PathParameters(CustomerPaths.getCustomerBalance, {
|
|
57
|
+
customer_id: customerId,
|
|
58
|
+
}).deriveUrl();
|
|
59
|
+
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
60
|
+
const response = await this.client.get(urlWithPathParams, queryParameters);
|
|
61
|
+
const data = this.handleResponse(response);
|
|
62
|
+
return data.map((balance) => new index_js_2.CreditBalance(balance));
|
|
80
63
|
}
|
|
81
|
-
archive(customerId) {
|
|
82
|
-
return
|
|
83
|
-
return yield this.update(customerId, { status: 'archived' });
|
|
84
|
-
});
|
|
64
|
+
async archive(customerId) {
|
|
65
|
+
return await this.update(customerId, { status: 'archived' });
|
|
85
66
|
}
|
|
86
|
-
generateAuthToken(customerId) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return new index_js_2.AuthToken(data);
|
|
94
|
-
});
|
|
67
|
+
async generateAuthToken(customerId) {
|
|
68
|
+
const urlWithPathParams = new index_js_1.PathParameters(CustomerPaths.generate, {
|
|
69
|
+
customer_id: customerId,
|
|
70
|
+
}).deriveUrl();
|
|
71
|
+
const response = await this.client.post(urlWithPathParams, undefined);
|
|
72
|
+
const data = this.handleResponse(response);
|
|
73
|
+
return new index_js_2.AuthToken(data);
|
|
95
74
|
}
|
|
96
75
|
}
|
|
97
76
|
exports.CustomersResource = CustomersResource;
|
|
@@ -13,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
17
|
exports.DiscountGroupsResource = void 0;
|
|
27
18
|
const index_js_1 = require("../../entities/index.js");
|
|
@@ -29,6 +20,8 @@ const index_js_2 = require("../../internal/base/index.js");
|
|
|
29
20
|
const DiscountGroupPaths = {
|
|
30
21
|
list: '/discount-groups',
|
|
31
22
|
create: '/discount-groups',
|
|
23
|
+
get: '/discount-groups/{discount_group_id}',
|
|
24
|
+
update: '/discount-groups/{discount_group_id}',
|
|
32
25
|
};
|
|
33
26
|
__exportStar(require("./operations/index.js"), exports);
|
|
34
27
|
class DiscountGroupsResource extends index_js_2.BaseResource {
|
|
@@ -36,12 +29,29 @@ class DiscountGroupsResource extends index_js_2.BaseResource {
|
|
|
36
29
|
const queryParameters = new index_js_2.QueryParameters(queryParams);
|
|
37
30
|
return new index_js_1.DiscountGroupCollection(this.client, DiscountGroupPaths.list + queryParameters.toQueryString());
|
|
38
31
|
}
|
|
39
|
-
create(createDiscountGroupRequestBody) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
async create(createDiscountGroupRequestBody) {
|
|
33
|
+
const response = await this.client.post(DiscountGroupPaths.create, createDiscountGroupRequestBody);
|
|
34
|
+
const data = this.handleResponse(response);
|
|
35
|
+
return new index_js_1.DiscountGroup(data);
|
|
36
|
+
}
|
|
37
|
+
async get(discountGroupId) {
|
|
38
|
+
const urlWithPathParams = new index_js_2.PathParameters(DiscountGroupPaths.get, {
|
|
39
|
+
discount_group_id: discountGroupId,
|
|
40
|
+
}).deriveUrl();
|
|
41
|
+
const response = await this.client.get(urlWithPathParams);
|
|
42
|
+
const data = this.handleResponse(response);
|
|
43
|
+
return new index_js_1.DiscountGroup(data);
|
|
44
|
+
}
|
|
45
|
+
async update(discountGroupId, updateDiscountGroup) {
|
|
46
|
+
const urlWithPathParams = new index_js_2.PathParameters(DiscountGroupPaths.update, {
|
|
47
|
+
discount_group_id: discountGroupId,
|
|
48
|
+
}).deriveUrl();
|
|
49
|
+
const response = await this.client.patch(urlWithPathParams, updateDiscountGroup);
|
|
50
|
+
const data = this.handleResponse(response);
|
|
51
|
+
return new index_js_1.DiscountGroup(data);
|
|
52
|
+
}
|
|
53
|
+
async archive(discountGroupId) {
|
|
54
|
+
return await this.update(discountGroupId, { status: 'archived' });
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
exports.DiscountGroupsResource = DiscountGroupsResource;
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./list-discount-group-query-parameters.js"), exports);
|
|
18
18
|
__exportStar(require("./create-discount-group-request-body.js"), exports);
|
|
19
|
+
__exportStar(require("./update-discount-group-request-body.js"), exports);
|
|
@@ -13,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
17
|
exports.DiscountsResource = void 0;
|
|
27
18
|
const index_js_1 = require("../../internal/base/index.js");
|
|
@@ -38,37 +29,30 @@ class DiscountsResource extends index_js_1.BaseResource {
|
|
|
38
29
|
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
39
30
|
return new index_js_2.DiscountCollection(this.client, DiscountPaths.list + queryParameters.toQueryString());
|
|
40
31
|
}
|
|
41
|
-
create(createDiscountParameters) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return new index_js_2.Discount(data);
|
|
46
|
-
});
|
|
32
|
+
async create(createDiscountParameters) {
|
|
33
|
+
const response = await this.client.post(DiscountPaths.create, createDiscountParameters);
|
|
34
|
+
const data = this.handleResponse(response);
|
|
35
|
+
return new index_js_2.Discount(data);
|
|
47
36
|
}
|
|
48
|
-
get(discountId) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
});
|
|
37
|
+
async get(discountId, queryParams) {
|
|
38
|
+
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
39
|
+
const urlWithPathParams = new index_js_1.PathParameters(DiscountPaths.get, {
|
|
40
|
+
discount_id: discountId,
|
|
41
|
+
}).deriveUrl();
|
|
42
|
+
const response = await this.client.get(urlWithPathParams + queryParameters.toQueryString());
|
|
43
|
+
const data = this.handleResponse(response);
|
|
44
|
+
return new index_js_2.Discount(data);
|
|
57
45
|
}
|
|
58
|
-
update(discountId, updateDiscount) {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return new index_js_2.Discount(data);
|
|
66
|
-
});
|
|
46
|
+
async update(discountId, updateDiscount) {
|
|
47
|
+
const urlWithPathParams = new index_js_1.PathParameters(DiscountPaths.update, {
|
|
48
|
+
discount_id: discountId,
|
|
49
|
+
}).deriveUrl();
|
|
50
|
+
const response = await this.client.patch(urlWithPathParams, updateDiscount);
|
|
51
|
+
const data = this.handleResponse(response);
|
|
52
|
+
return new index_js_2.Discount(data);
|
|
67
53
|
}
|
|
68
|
-
archive(discountId) {
|
|
69
|
-
return
|
|
70
|
-
return yield this.update(discountId, { status: 'archived' });
|
|
71
|
-
});
|
|
54
|
+
async archive(discountId) {
|
|
55
|
+
return await this.update(discountId, { status: 'archived' });
|
|
72
56
|
}
|
|
73
57
|
}
|
|
74
58
|
exports.DiscountsResource = DiscountsResource;
|
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./list-discount-query-parameters.js"), exports);
|
|
18
18
|
__exportStar(require("./create-discount-request-body.js"), exports);
|
|
19
19
|
__exportStar(require("./update-discount-request-body.js"), exports);
|
|
20
|
+
__exportStar(require("./get-discount-query-parameters.js"), exports);
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.EventTypesResource = void 0;
|
|
13
4
|
const index_js_1 = require("../../internal/base/index.js");
|
|
@@ -16,12 +7,10 @@ const EventTypesPaths = {
|
|
|
16
7
|
list: '/event-types',
|
|
17
8
|
};
|
|
18
9
|
class EventTypesResource extends index_js_1.BaseResource {
|
|
19
|
-
list() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return data.map((eventType) => new index_js_2.EventType(eventType));
|
|
24
|
-
});
|
|
10
|
+
async list() {
|
|
11
|
+
const response = await this.client.get(EventTypesPaths.list);
|
|
12
|
+
const data = this.handleResponse(response);
|
|
13
|
+
return data.map((eventType) => new index_js_2.EventType(eventType));
|
|
25
14
|
}
|
|
26
15
|
}
|
|
27
16
|
exports.EventTypesResource = EventTypesResource;
|
|
@@ -35,3 +35,4 @@ __exportStar(require("./simulation-types/index.js"), exports);
|
|
|
35
35
|
__exportStar(require("./simulations/index.js"), exports);
|
|
36
36
|
__exportStar(require("./simulation-runs/index.js"), exports);
|
|
37
37
|
__exportStar(require("./simulation-run-events/index.js"), exports);
|
|
38
|
+
__exportStar(require("./client-tokens/index.js"), exports);
|
|
@@ -13,15 +13,6 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
13
13
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
17
|
exports.NotificationSettingsResource = void 0;
|
|
27
18
|
const index_js_1 = require("../../internal/base/index.js");
|
|
@@ -35,51 +26,41 @@ const NotificationSettingsPaths = {
|
|
|
35
26
|
};
|
|
36
27
|
__exportStar(require("./operations/index.js"), exports);
|
|
37
28
|
class NotificationSettingsResource extends index_js_1.BaseResource {
|
|
38
|
-
list(queryParams) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return data.map((notificationSetting) => new index_js_2.NotificationSettings(notificationSetting));
|
|
44
|
-
});
|
|
29
|
+
async list(queryParams) {
|
|
30
|
+
const queryParameters = new index_js_1.QueryParameters(queryParams);
|
|
31
|
+
const response = await this.client.get(NotificationSettingsPaths.list + queryParameters.toQueryString());
|
|
32
|
+
const data = this.handleResponse(response);
|
|
33
|
+
return data.map((notificationSetting) => new index_js_2.NotificationSettings(notificationSetting));
|
|
45
34
|
}
|
|
46
|
-
create(createNotificationSettings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
return new index_js_2.NotificationSettings(data);
|
|
51
|
-
});
|
|
35
|
+
async create(createNotificationSettings) {
|
|
36
|
+
const response = await this.client.post(NotificationSettingsPaths.create, createNotificationSettings);
|
|
37
|
+
const data = this.handleResponse(response);
|
|
38
|
+
return new index_js_2.NotificationSettings(data);
|
|
52
39
|
}
|
|
53
|
-
get(notificationId) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return new index_js_2.NotificationSettings(data);
|
|
61
|
-
});
|
|
40
|
+
async get(notificationId) {
|
|
41
|
+
const urlWithPathParams = new index_js_1.PathParameters(NotificationSettingsPaths.get, {
|
|
42
|
+
notification_setting_id: notificationId,
|
|
43
|
+
}).deriveUrl();
|
|
44
|
+
const response = await this.client.get(urlWithPathParams);
|
|
45
|
+
const data = this.handleResponse(response);
|
|
46
|
+
return new index_js_2.NotificationSettings(data);
|
|
62
47
|
}
|
|
63
|
-
update(notificationId, updateNotificationSettings) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return new index_js_2.NotificationSettings(data);
|
|
71
|
-
});
|
|
48
|
+
async update(notificationId, updateNotificationSettings) {
|
|
49
|
+
const urlWithPathParams = new index_js_1.PathParameters(NotificationSettingsPaths.update, {
|
|
50
|
+
notification_setting_id: notificationId,
|
|
51
|
+
}).deriveUrl();
|
|
52
|
+
const response = await this.client.patch(urlWithPathParams, updateNotificationSettings);
|
|
53
|
+
const data = this.handleResponse(response);
|
|
54
|
+
return new index_js_2.NotificationSettings(data);
|
|
72
55
|
}
|
|
73
|
-
delete(notificationId) {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
});
|
|
56
|
+
async delete(notificationId) {
|
|
57
|
+
const urlWithPathParams = new index_js_1.PathParameters(NotificationSettingsPaths.update, {
|
|
58
|
+
notification_setting_id: notificationId,
|
|
59
|
+
}).deriveUrl();
|
|
60
|
+
const response = await this.client.delete(urlWithPathParams);
|
|
61
|
+
if (response) {
|
|
62
|
+
this.handleResponse(response);
|
|
63
|
+
}
|
|
83
64
|
}
|
|
84
65
|
}
|
|
85
66
|
exports.NotificationSettingsResource = NotificationSettingsResource;
|