integrateledger 0.0.0-stage → 0.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/FUNCTIONS.md +39 -0
- package/LICENSE +21 -0
- package/README.md +397 -2
- package/RUNTIMES.md +49 -0
- package/TESTING.md +55 -0
- package/USAGE.md +15 -0
- package/dist/commonjs/core.d.ts +10 -0
- package/dist/commonjs/core.d.ts.map +1 -0
- package/dist/commonjs/core.js +17 -0
- package/dist/commonjs/core.js.map +1 -0
- package/dist/commonjs/funcs/archive-add-on.d.ts +16 -0
- package/dist/commonjs/funcs/archive-add-on.d.ts.map +1 -0
- package/dist/commonjs/funcs/archive-add-on.js +123 -0
- package/dist/commonjs/funcs/archive-add-on.js.map +1 -0
- package/dist/commonjs/funcs/archive-feature.d.ts +16 -0
- package/dist/commonjs/funcs/archive-feature.d.ts.map +1 -0
- package/dist/commonjs/funcs/archive-feature.js +123 -0
- package/dist/commonjs/funcs/archive-feature.js.map +1 -0
- package/dist/commonjs/funcs/archive-plan.d.ts +16 -0
- package/dist/commonjs/funcs/archive-plan.d.ts.map +1 -0
- package/dist/commonjs/funcs/archive-plan.js +123 -0
- package/dist/commonjs/funcs/archive-plan.js.map +1 -0
- package/dist/commonjs/funcs/attach.d.ts +15 -0
- package/dist/commonjs/funcs/attach.d.ts.map +1 -0
- package/dist/commonjs/funcs/attach.js +117 -0
- package/dist/commonjs/funcs/attach.js.map +1 -0
- package/dist/commonjs/funcs/check-credits.d.ts +15 -0
- package/dist/commonjs/funcs/check-credits.d.ts.map +1 -0
- package/dist/commonjs/funcs/check-credits.js +117 -0
- package/dist/commonjs/funcs/check-credits.js.map +1 -0
- package/dist/commonjs/funcs/create-add-on.d.ts +15 -0
- package/dist/commonjs/funcs/create-add-on.d.ts.map +1 -0
- package/dist/commonjs/funcs/create-add-on.js +117 -0
- package/dist/commonjs/funcs/create-add-on.js.map +1 -0
- package/dist/commonjs/funcs/create-feature.d.ts +15 -0
- package/dist/commonjs/funcs/create-feature.d.ts.map +1 -0
- package/dist/commonjs/funcs/create-feature.js +117 -0
- package/dist/commonjs/funcs/create-feature.js.map +1 -0
- package/dist/commonjs/funcs/create-or-get-customer.d.ts +15 -0
- package/dist/commonjs/funcs/create-or-get-customer.d.ts.map +1 -0
- package/dist/commonjs/funcs/create-or-get-customer.js +117 -0
- package/dist/commonjs/funcs/create-or-get-customer.js.map +1 -0
- package/dist/commonjs/funcs/create-plan.d.ts +15 -0
- package/dist/commonjs/funcs/create-plan.d.ts.map +1 -0
- package/dist/commonjs/funcs/create-plan.js +117 -0
- package/dist/commonjs/funcs/create-plan.js.map +1 -0
- package/dist/commonjs/funcs/get-add-on.d.ts +16 -0
- package/dist/commonjs/funcs/get-add-on.d.ts.map +1 -0
- package/dist/commonjs/funcs/get-add-on.js +123 -0
- package/dist/commonjs/funcs/get-add-on.js.map +1 -0
- package/dist/commonjs/funcs/get-customer.d.ts +16 -0
- package/dist/commonjs/funcs/get-customer.d.ts.map +1 -0
- package/dist/commonjs/funcs/get-customer.js +121 -0
- package/dist/commonjs/funcs/get-customer.js.map +1 -0
- package/dist/commonjs/funcs/get-feature.d.ts +16 -0
- package/dist/commonjs/funcs/get-feature.d.ts.map +1 -0
- package/dist/commonjs/funcs/get-feature.js +123 -0
- package/dist/commonjs/funcs/get-feature.js.map +1 -0
- package/dist/commonjs/funcs/get-plan.d.ts +16 -0
- package/dist/commonjs/funcs/get-plan.d.ts.map +1 -0
- package/dist/commonjs/funcs/get-plan.js +123 -0
- package/dist/commonjs/funcs/get-plan.js.map +1 -0
- package/dist/commonjs/funcs/list-add-ons.d.ts +15 -0
- package/dist/commonjs/funcs/list-add-ons.d.ts.map +1 -0
- package/dist/commonjs/funcs/list-add-ons.js +106 -0
- package/dist/commonjs/funcs/list-add-ons.js.map +1 -0
- package/dist/commonjs/funcs/list-customer-purchases.d.ts +16 -0
- package/dist/commonjs/funcs/list-customer-purchases.d.ts.map +1 -0
- package/dist/commonjs/funcs/list-customer-purchases.js +123 -0
- package/dist/commonjs/funcs/list-customer-purchases.js.map +1 -0
- package/dist/commonjs/funcs/list-customer-subscriptions.d.ts +16 -0
- package/dist/commonjs/funcs/list-customer-subscriptions.d.ts.map +1 -0
- package/dist/commonjs/funcs/list-customer-subscriptions.js +123 -0
- package/dist/commonjs/funcs/list-customer-subscriptions.js.map +1 -0
- package/dist/commonjs/funcs/list-features.d.ts +15 -0
- package/dist/commonjs/funcs/list-features.d.ts.map +1 -0
- package/dist/commonjs/funcs/list-features.js +106 -0
- package/dist/commonjs/funcs/list-features.js.map +1 -0
- package/dist/commonjs/funcs/list-plans.d.ts +15 -0
- package/dist/commonjs/funcs/list-plans.d.ts.map +1 -0
- package/dist/commonjs/funcs/list-plans.js +106 -0
- package/dist/commonjs/funcs/list-plans.js.map +1 -0
- package/dist/commonjs/funcs/publish-catalog.d.ts +15 -0
- package/dist/commonjs/funcs/publish-catalog.d.ts.map +1 -0
- package/dist/commonjs/funcs/publish-catalog.js +117 -0
- package/dist/commonjs/funcs/publish-catalog.js.map +1 -0
- package/dist/commonjs/funcs/set-subscription-cancellation.d.ts +16 -0
- package/dist/commonjs/funcs/set-subscription-cancellation.d.ts.map +1 -0
- package/dist/commonjs/funcs/set-subscription-cancellation.js +128 -0
- package/dist/commonjs/funcs/set-subscription-cancellation.js.map +1 -0
- package/dist/commonjs/funcs/track-usage.d.ts +15 -0
- package/dist/commonjs/funcs/track-usage.d.ts.map +1 -0
- package/dist/commonjs/funcs/track-usage.js +117 -0
- package/dist/commonjs/funcs/track-usage.js.map +1 -0
- package/dist/commonjs/funcs/update-add-on.d.ts +16 -0
- package/dist/commonjs/funcs/update-add-on.d.ts.map +1 -0
- package/dist/commonjs/funcs/update-add-on.js +124 -0
- package/dist/commonjs/funcs/update-add-on.js.map +1 -0
- package/dist/commonjs/funcs/update-feature.d.ts +16 -0
- package/dist/commonjs/funcs/update-feature.d.ts.map +1 -0
- package/dist/commonjs/funcs/update-feature.js +124 -0
- package/dist/commonjs/funcs/update-feature.js.map +1 -0
- package/dist/commonjs/funcs/update-plan.d.ts +16 -0
- package/dist/commonjs/funcs/update-plan.d.ts.map +1 -0
- package/dist/commonjs/funcs/update-plan.js +124 -0
- package/dist/commonjs/funcs/update-plan.js.map +1 -0
- package/dist/commonjs/funcs/upgrade-paid-plan.d.ts +16 -0
- package/dist/commonjs/funcs/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/commonjs/funcs/upgrade-paid-plan.js +119 -0
- package/dist/commonjs/funcs/upgrade-paid-plan.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts +25 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
- package/dist/commonjs/hooks/hooks.js +84 -0
- package/dist/commonjs/hooks/hooks.js.map +1 -0
- package/dist/commonjs/hooks/index.d.ts +3 -0
- package/dist/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +77 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -0
- package/dist/commonjs/hooks/types.js +6 -0
- package/dist/commonjs/hooks/types.js.map +1 -0
- package/dist/commonjs/index.d.ts +7 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +50 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/base64.d.ts +10 -0
- package/dist/commonjs/lib/base64.d.ts.map +1 -0
- package/dist/commonjs/lib/base64.js +73 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +38 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +42 -0
- package/dist/commonjs/lib/config.js.map +1 -0
- package/dist/commonjs/lib/encodings.d.ts +55 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +422 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +15 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +82 -0
- package/dist/commonjs/lib/env.js.map +1 -0
- package/dist/commonjs/lib/files.d.ts +26 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -0
- package/dist/commonjs/lib/files.js +96 -0
- package/dist/commonjs/lib/files.js.map +1 -0
- package/dist/commonjs/lib/http.d.ts +67 -0
- package/dist/commonjs/lib/http.d.ts.map +1 -0
- package/dist/commonjs/lib/http.js +219 -0
- package/dist/commonjs/lib/http.js.map +1 -0
- package/dist/commonjs/lib/logger.d.ts +6 -0
- package/dist/commonjs/lib/logger.d.ts.map +1 -0
- package/dist/commonjs/lib/logger.js +6 -0
- package/dist/commonjs/lib/logger.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts +59 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -0
- package/dist/commonjs/lib/matchers.js +221 -0
- package/dist/commonjs/lib/matchers.js.map +1 -0
- package/dist/commonjs/lib/primitives.d.ts +27 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -0
- package/dist/commonjs/lib/primitives.js +129 -0
- package/dist/commonjs/lib/primitives.js.map +1 -0
- package/dist/commonjs/lib/retries.d.ts +38 -0
- package/dist/commonjs/lib/retries.d.ts.map +1 -0
- package/dist/commonjs/lib/retries.js +163 -0
- package/dist/commonjs/lib/retries.js.map +1 -0
- package/dist/commonjs/lib/schemas.d.ts +21 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +95 -0
- package/dist/commonjs/lib/schemas.js.map +1 -0
- package/dist/commonjs/lib/sdks.d.ts +63 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -0
- package/dist/commonjs/lib/sdks.js +298 -0
- package/dist/commonjs/lib/sdks.js.map +1 -0
- package/dist/commonjs/lib/security.d.ts +84 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +154 -0
- package/dist/commonjs/lib/security.js.map +1 -0
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -0
- package/dist/commonjs/lib/url.js +27 -0
- package/dist/commonjs/lib/url.js.map +1 -0
- package/dist/commonjs/models/add-on-archived.d.ts +10 -0
- package/dist/commonjs/models/add-on-archived.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-archived.js +51 -0
- package/dist/commonjs/models/add-on-archived.js.map +1 -0
- package/dist/commonjs/models/add-on-attach-input.d.ts +15 -0
- package/dist/commonjs/models/add-on-attach-input.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-attach-input.js +50 -0
- package/dist/commonjs/models/add-on-attach-input.js.map +1 -0
- package/dist/commonjs/models/add-on-attach-response.d.ts +11 -0
- package/dist/commonjs/models/add-on-attach-response.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-attach-response.js +52 -0
- package/dist/commonjs/models/add-on-attach-response.js.map +1 -0
- package/dist/commonjs/models/add-on-item.d.ts +21 -0
- package/dist/commonjs/models/add-on-item.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-item.js +62 -0
- package/dist/commonjs/models/add-on-item.js.map +1 -0
- package/dist/commonjs/models/add-on-list.d.ts +11 -0
- package/dist/commonjs/models/add-on-list.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-list.js +52 -0
- package/dist/commonjs/models/add-on-list.js.map +1 -0
- package/dist/commonjs/models/add-on-mutation.d.ts +12 -0
- package/dist/commonjs/models/add-on-mutation.d.ts.map +1 -0
- package/dist/commonjs/models/add-on-mutation.js +53 -0
- package/dist/commonjs/models/add-on-mutation.js.map +1 -0
- package/dist/commonjs/models/attach-input.d.ts +10 -0
- package/dist/commonjs/models/attach-input.d.ts.map +1 -0
- package/dist/commonjs/models/attach-input.js +19 -0
- package/dist/commonjs/models/attach-input.js.map +1 -0
- package/dist/commonjs/models/attach-response.d.ts +11 -0
- package/dist/commonjs/models/attach-response.d.ts.map +1 -0
- package/dist/commonjs/models/attach-response.js +22 -0
- package/dist/commonjs/models/attach-response.js.map +1 -0
- package/dist/commonjs/models/catalog-error.d.ts +11 -0
- package/dist/commonjs/models/catalog-error.d.ts.map +1 -0
- package/dist/commonjs/models/catalog-error.js +52 -0
- package/dist/commonjs/models/catalog-error.js.map +1 -0
- package/dist/commonjs/models/catalog-input.d.ts +114 -0
- package/dist/commonjs/models/catalog-input.d.ts.map +1 -0
- package/dist/commonjs/models/catalog-input.js +125 -0
- package/dist/commonjs/models/catalog-input.js.map +1 -0
- package/dist/commonjs/models/catalog-publish-response.d.ts +21 -0
- package/dist/commonjs/models/catalog-publish-response.d.ts.map +1 -0
- package/dist/commonjs/models/catalog-publish-response.js +61 -0
- package/dist/commonjs/models/catalog-publish-response.js.map +1 -0
- package/dist/commonjs/models/check-input.d.ts +14 -0
- package/dist/commonjs/models/check-input.d.ts.map +1 -0
- package/dist/commonjs/models/check-input.js +50 -0
- package/dist/commonjs/models/check-input.js.map +1 -0
- package/dist/commonjs/models/check-response.d.ts +12 -0
- package/dist/commonjs/models/check-response.d.ts.map +1 -0
- package/dist/commonjs/models/check-response.js +53 -0
- package/dist/commonjs/models/check-response.js.map +1 -0
- package/dist/commonjs/models/create-add-on-input.d.ts +27 -0
- package/dist/commonjs/models/create-add-on-input.d.ts.map +1 -0
- package/dist/commonjs/models/create-add-on-input.js +58 -0
- package/dist/commonjs/models/create-add-on-input.js.map +1 -0
- package/dist/commonjs/models/create-customer-input.d.ts +12 -0
- package/dist/commonjs/models/create-customer-input.d.ts.map +1 -0
- package/dist/commonjs/models/create-customer-input.js +49 -0
- package/dist/commonjs/models/create-customer-input.js.map +1 -0
- package/dist/commonjs/models/create-feature-input.d.ts +16 -0
- package/dist/commonjs/models/create-feature-input.d.ts.map +1 -0
- package/dist/commonjs/models/create-feature-input.js +51 -0
- package/dist/commonjs/models/create-feature-input.js.map +1 -0
- package/dist/commonjs/models/create-plan-input.d.ts +18 -0
- package/dist/commonjs/models/create-plan-input.d.ts.map +1 -0
- package/dist/commonjs/models/create-plan-input.js +52 -0
- package/dist/commonjs/models/create-plan-input.js.map +1 -0
- package/dist/commonjs/models/customer-detail.d.ts +31 -0
- package/dist/commonjs/models/customer-detail.d.ts.map +1 -0
- package/dist/commonjs/models/customer-detail.js +74 -0
- package/dist/commonjs/models/customer-detail.js.map +1 -0
- package/dist/commonjs/models/customer-purchase-item.d.ts +15 -0
- package/dist/commonjs/models/customer-purchase-item.d.ts.map +1 -0
- package/dist/commonjs/models/customer-purchase-item.js +56 -0
- package/dist/commonjs/models/customer-purchase-item.js.map +1 -0
- package/dist/commonjs/models/customer-purchase-page.d.ts +13 -0
- package/dist/commonjs/models/customer-purchase-page.d.ts.map +1 -0
- package/dist/commonjs/models/customer-purchase-page.js +54 -0
- package/dist/commonjs/models/customer-purchase-page.js.map +1 -0
- package/dist/commonjs/models/customer-response.d.ts +11 -0
- package/dist/commonjs/models/customer-response.d.ts.map +1 -0
- package/dist/commonjs/models/customer-response.js +52 -0
- package/dist/commonjs/models/customer-response.js.map +1 -0
- package/dist/commonjs/models/customer-subscription-cancellation.d.ts +13 -0
- package/dist/commonjs/models/customer-subscription-cancellation.d.ts.map +1 -0
- package/dist/commonjs/models/customer-subscription-cancellation.js +54 -0
- package/dist/commonjs/models/customer-subscription-cancellation.js.map +1 -0
- package/dist/commonjs/models/customer-subscription-item.d.ts +19 -0
- package/dist/commonjs/models/customer-subscription-item.d.ts.map +1 -0
- package/dist/commonjs/models/customer-subscription-item.js +60 -0
- package/dist/commonjs/models/customer-subscription-item.js.map +1 -0
- package/dist/commonjs/models/customer-subscription-page.d.ts +13 -0
- package/dist/commonjs/models/customer-subscription-page.d.ts.map +1 -0
- package/dist/commonjs/models/customer-subscription-page.js +54 -0
- package/dist/commonjs/models/customer-subscription-page.js.map +1 -0
- package/dist/commonjs/models/errors/archive-add-on.d.ts +66 -0
- package/dist/commonjs/models/errors/archive-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/errors/archive-add-on.js +136 -0
- package/dist/commonjs/models/errors/archive-add-on.js.map +1 -0
- package/dist/commonjs/models/errors/archive-feature.d.ts +66 -0
- package/dist/commonjs/models/errors/archive-feature.d.ts.map +1 -0
- package/dist/commonjs/models/errors/archive-feature.js +136 -0
- package/dist/commonjs/models/errors/archive-feature.js.map +1 -0
- package/dist/commonjs/models/errors/archive-plan.d.ts +66 -0
- package/dist/commonjs/models/errors/archive-plan.d.ts.map +1 -0
- package/dist/commonjs/models/errors/archive-plan.js +136 -0
- package/dist/commonjs/models/errors/archive-plan.js.map +1 -0
- package/dist/commonjs/models/errors/attach-error.d.ts +18 -0
- package/dist/commonjs/models/errors/attach-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/attach-error.js +72 -0
- package/dist/commonjs/models/errors/attach-error.js.map +1 -0
- package/dist/commonjs/models/errors/catalog-error.d.ts +21 -0
- package/dist/commonjs/models/errors/catalog-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/catalog-error.js +76 -0
- package/dist/commonjs/models/errors/catalog-error.js.map +1 -0
- package/dist/commonjs/models/errors/check-error.d.ts +18 -0
- package/dist/commonjs/models/errors/check-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/check-error.js +72 -0
- package/dist/commonjs/models/errors/check-error.js.map +1 -0
- package/dist/commonjs/models/errors/create-add-on.d.ts +66 -0
- package/dist/commonjs/models/errors/create-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/errors/create-add-on.js +136 -0
- package/dist/commonjs/models/errors/create-add-on.js.map +1 -0
- package/dist/commonjs/models/errors/create-feature.d.ts +66 -0
- package/dist/commonjs/models/errors/create-feature.d.ts.map +1 -0
- package/dist/commonjs/models/errors/create-feature.js +136 -0
- package/dist/commonjs/models/errors/create-feature.js.map +1 -0
- package/dist/commonjs/models/errors/create-plan.d.ts +66 -0
- package/dist/commonjs/models/errors/create-plan.d.ts.map +1 -0
- package/dist/commonjs/models/errors/create-plan.js +136 -0
- package/dist/commonjs/models/errors/create-plan.js.map +1 -0
- package/dist/commonjs/models/errors/customer-error.d.ts +18 -0
- package/dist/commonjs/models/errors/customer-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/customer-error.js +71 -0
- package/dist/commonjs/models/errors/customer-error.js.map +1 -0
- package/dist/commonjs/models/errors/get-add-on.d.ts +66 -0
- package/dist/commonjs/models/errors/get-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/errors/get-add-on.js +136 -0
- package/dist/commonjs/models/errors/get-add-on.js.map +1 -0
- package/dist/commonjs/models/errors/get-feature.d.ts +66 -0
- package/dist/commonjs/models/errors/get-feature.d.ts.map +1 -0
- package/dist/commonjs/models/errors/get-feature.js +136 -0
- package/dist/commonjs/models/errors/get-feature.js.map +1 -0
- package/dist/commonjs/models/errors/get-plan.d.ts +66 -0
- package/dist/commonjs/models/errors/get-plan.d.ts.map +1 -0
- package/dist/commonjs/models/errors/get-plan.js +136 -0
- package/dist/commonjs/models/errors/get-plan.js.map +1 -0
- package/dist/commonjs/models/errors/http-client-errors.d.ts +44 -0
- package/dist/commonjs/models/errors/http-client-errors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/http-client-errors.js +65 -0
- package/dist/commonjs/models/errors/http-client-errors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +28 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +47 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/ledger-default-error.d.ts +10 -0
- package/dist/commonjs/models/errors/ledger-default-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/ledger-default-error.js +34 -0
- package/dist/commonjs/models/errors/ledger-default-error.js.map +1 -0
- package/dist/commonjs/models/errors/ledger-error.d.ts +19 -0
- package/dist/commonjs/models/errors/ledger-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/ledger-error.js +30 -0
- package/dist/commonjs/models/errors/ledger-error.js.map +1 -0
- package/dist/commonjs/models/errors/list-add-ons.d.ts +24 -0
- package/dist/commonjs/models/errors/list-add-ons.d.ts.map +1 -0
- package/dist/commonjs/models/errors/list-add-ons.js +74 -0
- package/dist/commonjs/models/errors/list-add-ons.js.map +1 -0
- package/dist/commonjs/models/errors/list-features.d.ts +24 -0
- package/dist/commonjs/models/errors/list-features.d.ts.map +1 -0
- package/dist/commonjs/models/errors/list-features.js +74 -0
- package/dist/commonjs/models/errors/list-features.js.map +1 -0
- package/dist/commonjs/models/errors/list-plans.d.ts +24 -0
- package/dist/commonjs/models/errors/list-plans.d.ts.map +1 -0
- package/dist/commonjs/models/errors/list-plans.js +74 -0
- package/dist/commonjs/models/errors/list-plans.js.map +1 -0
- package/dist/commonjs/models/errors/response-validation-error.d.ts +26 -0
- package/dist/commonjs/models/errors/response-validation-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/response-validation-error.js +74 -0
- package/dist/commonjs/models/errors/response-validation-error.js.map +1 -0
- package/dist/commonjs/models/errors/sdk-validation-error.d.ts +21 -0
- package/dist/commonjs/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdk-validation-error.js +90 -0
- package/dist/commonjs/models/errors/sdk-validation-error.js.map +1 -0
- package/dist/commonjs/models/errors/track-error.d.ts +22 -0
- package/dist/commonjs/models/errors/track-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/track-error.js +81 -0
- package/dist/commonjs/models/errors/track-error.js.map +1 -0
- package/dist/commonjs/models/errors/update-add-on.d.ts +87 -0
- package/dist/commonjs/models/errors/update-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/errors/update-add-on.js +167 -0
- package/dist/commonjs/models/errors/update-add-on.js.map +1 -0
- package/dist/commonjs/models/errors/update-feature.d.ts +87 -0
- package/dist/commonjs/models/errors/update-feature.d.ts.map +1 -0
- package/dist/commonjs/models/errors/update-feature.js +167 -0
- package/dist/commonjs/models/errors/update-feature.js.map +1 -0
- package/dist/commonjs/models/errors/update-plan.d.ts +87 -0
- package/dist/commonjs/models/errors/update-plan.d.ts.map +1 -0
- package/dist/commonjs/models/errors/update-plan.js +167 -0
- package/dist/commonjs/models/errors/update-plan.js.map +1 -0
- package/dist/commonjs/models/errors/upgrade-error.d.ts +18 -0
- package/dist/commonjs/models/errors/upgrade-error.d.ts.map +1 -0
- package/dist/commonjs/models/errors/upgrade-error.js +71 -0
- package/dist/commonjs/models/errors/upgrade-error.js.map +1 -0
- package/dist/commonjs/models/errors/upgrade-paid-plan.d.ts +110 -0
- package/dist/commonjs/models/errors/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/commonjs/models/errors/upgrade-paid-plan.js +202 -0
- package/dist/commonjs/models/errors/upgrade-paid-plan.js.map +1 -0
- package/dist/commonjs/models/feature-archived.d.ts +10 -0
- package/dist/commonjs/models/feature-archived.d.ts.map +1 -0
- package/dist/commonjs/models/feature-archived.js +51 -0
- package/dist/commonjs/models/feature-archived.js.map +1 -0
- package/dist/commonjs/models/feature-item.d.ts +12 -0
- package/dist/commonjs/models/feature-item.d.ts.map +1 -0
- package/dist/commonjs/models/feature-item.js +54 -0
- package/dist/commonjs/models/feature-item.js.map +1 -0
- package/dist/commonjs/models/feature-list.d.ts +11 -0
- package/dist/commonjs/models/feature-list.d.ts.map +1 -0
- package/dist/commonjs/models/feature-list.js +52 -0
- package/dist/commonjs/models/feature-list.js.map +1 -0
- package/dist/commonjs/models/feature-mutation.d.ts +12 -0
- package/dist/commonjs/models/feature-mutation.d.ts.map +1 -0
- package/dist/commonjs/models/feature-mutation.js +53 -0
- package/dist/commonjs/models/feature-mutation.js.map +1 -0
- package/dist/commonjs/models/free-plan-attach-response.d.ts +18 -0
- package/dist/commonjs/models/free-plan-attach-response.d.ts.map +1 -0
- package/dist/commonjs/models/free-plan-attach-response.js +58 -0
- package/dist/commonjs/models/free-plan-attach-response.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +46 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +65 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/operations/archive-add-on.d.ts +12 -0
- package/dist/commonjs/models/operations/archive-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/operations/archive-add-on.js +49 -0
- package/dist/commonjs/models/operations/archive-add-on.js.map +1 -0
- package/dist/commonjs/models/operations/archive-feature.d.ts +12 -0
- package/dist/commonjs/models/operations/archive-feature.d.ts.map +1 -0
- package/dist/commonjs/models/operations/archive-feature.js +49 -0
- package/dist/commonjs/models/operations/archive-feature.js.map +1 -0
- package/dist/commonjs/models/operations/archive-plan.d.ts +12 -0
- package/dist/commonjs/models/operations/archive-plan.d.ts.map +1 -0
- package/dist/commonjs/models/operations/archive-plan.js +49 -0
- package/dist/commonjs/models/operations/archive-plan.js.map +1 -0
- package/dist/commonjs/models/operations/get-add-on.d.ts +12 -0
- package/dist/commonjs/models/operations/get-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-add-on.js +49 -0
- package/dist/commonjs/models/operations/get-add-on.js.map +1 -0
- package/dist/commonjs/models/operations/get-customer.d.ts +12 -0
- package/dist/commonjs/models/operations/get-customer.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-customer.js +49 -0
- package/dist/commonjs/models/operations/get-customer.js.map +1 -0
- package/dist/commonjs/models/operations/get-feature.d.ts +12 -0
- package/dist/commonjs/models/operations/get-feature.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-feature.js +49 -0
- package/dist/commonjs/models/operations/get-feature.js.map +1 -0
- package/dist/commonjs/models/operations/get-plan.d.ts +12 -0
- package/dist/commonjs/models/operations/get-plan.d.ts.map +1 -0
- package/dist/commonjs/models/operations/get-plan.js +49 -0
- package/dist/commonjs/models/operations/get-plan.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +15 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -0
- package/dist/commonjs/models/operations/index.js +34 -0
- package/dist/commonjs/models/operations/index.js.map +1 -0
- package/dist/commonjs/models/operations/list-customer-purchases.d.ts +16 -0
- package/dist/commonjs/models/operations/list-customer-purchases.d.ts.map +1 -0
- package/dist/commonjs/models/operations/list-customer-purchases.js +51 -0
- package/dist/commonjs/models/operations/list-customer-purchases.js.map +1 -0
- package/dist/commonjs/models/operations/list-customer-subscriptions.d.ts +16 -0
- package/dist/commonjs/models/operations/list-customer-subscriptions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/list-customer-subscriptions.js +51 -0
- package/dist/commonjs/models/operations/list-customer-subscriptions.js.map +1 -0
- package/dist/commonjs/models/operations/set-subscription-cancellation.d.ts +17 -0
- package/dist/commonjs/models/operations/set-subscription-cancellation.d.ts.map +1 -0
- package/dist/commonjs/models/operations/set-subscription-cancellation.js +52 -0
- package/dist/commonjs/models/operations/set-subscription-cancellation.js.map +1 -0
- package/dist/commonjs/models/operations/update-add-on.d.ts +15 -0
- package/dist/commonjs/models/operations/update-add-on.d.ts.map +1 -0
- package/dist/commonjs/models/operations/update-add-on.js +51 -0
- package/dist/commonjs/models/operations/update-add-on.js.map +1 -0
- package/dist/commonjs/models/operations/update-feature.d.ts +15 -0
- package/dist/commonjs/models/operations/update-feature.d.ts.map +1 -0
- package/dist/commonjs/models/operations/update-feature.js +51 -0
- package/dist/commonjs/models/operations/update-feature.js.map +1 -0
- package/dist/commonjs/models/operations/update-plan.d.ts +15 -0
- package/dist/commonjs/models/operations/update-plan.d.ts.map +1 -0
- package/dist/commonjs/models/operations/update-plan.js +51 -0
- package/dist/commonjs/models/operations/update-plan.js.map +1 -0
- package/dist/commonjs/models/operations/upgrade-paid-plan.d.ts +15 -0
- package/dist/commonjs/models/operations/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/commonjs/models/operations/upgrade-paid-plan.js +56 -0
- package/dist/commonjs/models/operations/upgrade-paid-plan.js.map +1 -0
- package/dist/commonjs/models/plan-archived.d.ts +10 -0
- package/dist/commonjs/models/plan-archived.d.ts.map +1 -0
- package/dist/commonjs/models/plan-archived.js +51 -0
- package/dist/commonjs/models/plan-archived.js.map +1 -0
- package/dist/commonjs/models/plan-attach-input.d.ts +15 -0
- package/dist/commonjs/models/plan-attach-input.d.ts.map +1 -0
- package/dist/commonjs/models/plan-attach-input.js +50 -0
- package/dist/commonjs/models/plan-attach-input.js.map +1 -0
- package/dist/commonjs/models/plan-attach-response.d.ts +11 -0
- package/dist/commonjs/models/plan-attach-response.d.ts.map +1 -0
- package/dist/commonjs/models/plan-attach-response.js +52 -0
- package/dist/commonjs/models/plan-attach-response.js.map +1 -0
- package/dist/commonjs/models/plan-item.d.ts +23 -0
- package/dist/commonjs/models/plan-item.d.ts.map +1 -0
- package/dist/commonjs/models/plan-item.js +64 -0
- package/dist/commonjs/models/plan-item.js.map +1 -0
- package/dist/commonjs/models/plan-list.d.ts +11 -0
- package/dist/commonjs/models/plan-list.d.ts.map +1 -0
- package/dist/commonjs/models/plan-list.js +52 -0
- package/dist/commonjs/models/plan-list.js.map +1 -0
- package/dist/commonjs/models/plan-mutation.d.ts +23 -0
- package/dist/commonjs/models/plan-mutation.d.ts.map +1 -0
- package/dist/commonjs/models/plan-mutation.js +63 -0
- package/dist/commonjs/models/plan-mutation.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +12 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +54 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/models/track-input.d.ts +16 -0
- package/dist/commonjs/models/track-input.d.ts.map +1 -0
- package/dist/commonjs/models/track-input.js +56 -0
- package/dist/commonjs/models/track-input.js.map +1 -0
- package/dist/commonjs/models/track-response.d.ts +14 -0
- package/dist/commonjs/models/track-response.d.ts.map +1 -0
- package/dist/commonjs/models/track-response.js +60 -0
- package/dist/commonjs/models/track-response.js.map +1 -0
- package/dist/commonjs/models/update-add-on-input.d.ts +25 -0
- package/dist/commonjs/models/update-add-on-input.d.ts.map +1 -0
- package/dist/commonjs/models/update-add-on-input.js +57 -0
- package/dist/commonjs/models/update-add-on-input.js.map +1 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-input.d.ts +12 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-input.d.ts.map +1 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-input.js +49 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-input.js.map +1 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-response.d.ts +11 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-response.d.ts.map +1 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-response.js +53 -0
- package/dist/commonjs/models/update-customer-subscription-cancellation-response.js.map +1 -0
- package/dist/commonjs/models/update-feature-input.d.ts +14 -0
- package/dist/commonjs/models/update-feature-input.d.ts.map +1 -0
- package/dist/commonjs/models/update-feature-input.js +50 -0
- package/dist/commonjs/models/update-feature-input.js.map +1 -0
- package/dist/commonjs/models/update-plan-input.d.ts +16 -0
- package/dist/commonjs/models/update-plan-input.d.ts.map +1 -0
- package/dist/commonjs/models/update-plan-input.js +51 -0
- package/dist/commonjs/models/update-plan-input.js.map +1 -0
- package/dist/commonjs/models/upgrade-input.d.ts +14 -0
- package/dist/commonjs/models/upgrade-input.d.ts.map +1 -0
- package/dist/commonjs/models/upgrade-input.js +50 -0
- package/dist/commonjs/models/upgrade-input.js.map +1 -0
- package/dist/commonjs/models/upgrade-response.d.ts +22 -0
- package/dist/commonjs/models/upgrade-response.d.ts.map +1 -0
- package/dist/commonjs/models/upgrade-response.js +62 -0
- package/dist/commonjs/models/upgrade-response.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/sdk/index.d.ts +2 -0
- package/dist/commonjs/sdk/index.d.ts.map +1 -0
- package/dist/commonjs/sdk/index.js +21 -0
- package/dist/commonjs/sdk/index.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +106 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +187 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -0
- package/dist/commonjs/types/async.d.ts +23 -0
- package/dist/commonjs/types/async.d.ts.map +1 -0
- package/dist/commonjs/types/async.js +32 -0
- package/dist/commonjs/types/async.js.map +1 -0
- package/dist/commonjs/types/blobs.d.ts +4 -0
- package/dist/commonjs/types/blobs.d.ts.map +1 -0
- package/dist/commonjs/types/blobs.js +62 -0
- package/dist/commonjs/types/blobs.js.map +1 -0
- package/dist/commonjs/types/const-date-time.d.ts +3 -0
- package/dist/commonjs/types/const-date-time.d.ts.map +1 -0
- package/dist/commonjs/types/const-date-time.js +46 -0
- package/dist/commonjs/types/const-date-time.js.map +1 -0
- package/dist/commonjs/types/default-to-zero-value.d.ts +12 -0
- package/dist/commonjs/types/default-to-zero-value.d.ts.map +1 -0
- package/dist/commonjs/types/default-to-zero-value.js +35 -0
- package/dist/commonjs/types/default-to-zero-value.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +9 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +66 -0
- package/dist/commonjs/types/enums.js.map +1 -0
- package/dist/commonjs/types/fp.d.ts +31 -0
- package/dist/commonjs/types/fp.d.ts.map +1 -0
- package/dist/commonjs/types/fp.js +37 -0
- package/dist/commonjs/types/fp.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +10 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +31 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/types/operations.d.ts +27 -0
- package/dist/commonjs/types/operations.d.ts.map +1 -0
- package/dist/commonjs/types/operations.js +83 -0
- package/dist/commonjs/types/operations.js.map +1 -0
- package/dist/commonjs/types/primitives.d.ts +9 -0
- package/dist/commonjs/types/primitives.d.ts.map +1 -0
- package/dist/commonjs/types/primitives.js +151 -0
- package/dist/commonjs/types/primitives.js.map +1 -0
- package/dist/commonjs/types/rfcdate.d.ts +21 -0
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
- package/dist/commonjs/types/rfcdate.js +47 -0
- package/dist/commonjs/types/rfcdate.js.map +1 -0
- package/dist/commonjs/types/smart-union.d.ts +7 -0
- package/dist/commonjs/types/smart-union.d.ts.map +1 -0
- package/dist/commonjs/types/smart-union.js +158 -0
- package/dist/commonjs/types/smart-union.js.map +1 -0
- package/dist/commonjs/types/streams.d.ts +2 -0
- package/dist/commonjs/types/streams.d.ts.map +1 -0
- package/dist/commonjs/types/streams.js +18 -0
- package/dist/commonjs/types/streams.js.map +1 -0
- package/dist/commonjs/types/unrecognized.d.ts +16 -0
- package/dist/commonjs/types/unrecognized.d.ts.map +1 -0
- package/dist/commonjs/types/unrecognized.js +34 -0
- package/dist/commonjs/types/unrecognized.js.map +1 -0
- package/dist/esm/core.d.ts +10 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +13 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/funcs/archive-add-on.d.ts +16 -0
- package/dist/esm/funcs/archive-add-on.d.ts.map +1 -0
- package/dist/esm/funcs/archive-add-on.js +87 -0
- package/dist/esm/funcs/archive-add-on.js.map +1 -0
- package/dist/esm/funcs/archive-feature.d.ts +16 -0
- package/dist/esm/funcs/archive-feature.d.ts.map +1 -0
- package/dist/esm/funcs/archive-feature.js +87 -0
- package/dist/esm/funcs/archive-feature.js.map +1 -0
- package/dist/esm/funcs/archive-plan.d.ts +16 -0
- package/dist/esm/funcs/archive-plan.d.ts.map +1 -0
- package/dist/esm/funcs/archive-plan.js +87 -0
- package/dist/esm/funcs/archive-plan.js.map +1 -0
- package/dist/esm/funcs/attach.d.ts +15 -0
- package/dist/esm/funcs/attach.d.ts.map +1 -0
- package/dist/esm/funcs/attach.js +81 -0
- package/dist/esm/funcs/attach.js.map +1 -0
- package/dist/esm/funcs/check-credits.d.ts +15 -0
- package/dist/esm/funcs/check-credits.d.ts.map +1 -0
- package/dist/esm/funcs/check-credits.js +81 -0
- package/dist/esm/funcs/check-credits.js.map +1 -0
- package/dist/esm/funcs/create-add-on.d.ts +15 -0
- package/dist/esm/funcs/create-add-on.d.ts.map +1 -0
- package/dist/esm/funcs/create-add-on.js +81 -0
- package/dist/esm/funcs/create-add-on.js.map +1 -0
- package/dist/esm/funcs/create-feature.d.ts +15 -0
- package/dist/esm/funcs/create-feature.d.ts.map +1 -0
- package/dist/esm/funcs/create-feature.js +81 -0
- package/dist/esm/funcs/create-feature.js.map +1 -0
- package/dist/esm/funcs/create-or-get-customer.d.ts +15 -0
- package/dist/esm/funcs/create-or-get-customer.d.ts.map +1 -0
- package/dist/esm/funcs/create-or-get-customer.js +81 -0
- package/dist/esm/funcs/create-or-get-customer.js.map +1 -0
- package/dist/esm/funcs/create-plan.d.ts +15 -0
- package/dist/esm/funcs/create-plan.d.ts.map +1 -0
- package/dist/esm/funcs/create-plan.js +81 -0
- package/dist/esm/funcs/create-plan.js.map +1 -0
- package/dist/esm/funcs/get-add-on.d.ts +16 -0
- package/dist/esm/funcs/get-add-on.d.ts.map +1 -0
- package/dist/esm/funcs/get-add-on.js +87 -0
- package/dist/esm/funcs/get-add-on.js.map +1 -0
- package/dist/esm/funcs/get-customer.d.ts +16 -0
- package/dist/esm/funcs/get-customer.d.ts.map +1 -0
- package/dist/esm/funcs/get-customer.js +85 -0
- package/dist/esm/funcs/get-customer.js.map +1 -0
- package/dist/esm/funcs/get-feature.d.ts +16 -0
- package/dist/esm/funcs/get-feature.d.ts.map +1 -0
- package/dist/esm/funcs/get-feature.js +87 -0
- package/dist/esm/funcs/get-feature.js.map +1 -0
- package/dist/esm/funcs/get-plan.d.ts +16 -0
- package/dist/esm/funcs/get-plan.d.ts.map +1 -0
- package/dist/esm/funcs/get-plan.js +87 -0
- package/dist/esm/funcs/get-plan.js.map +1 -0
- package/dist/esm/funcs/list-add-ons.d.ts +15 -0
- package/dist/esm/funcs/list-add-ons.d.ts.map +1 -0
- package/dist/esm/funcs/list-add-ons.js +70 -0
- package/dist/esm/funcs/list-add-ons.js.map +1 -0
- package/dist/esm/funcs/list-customer-purchases.d.ts +16 -0
- package/dist/esm/funcs/list-customer-purchases.d.ts.map +1 -0
- package/dist/esm/funcs/list-customer-purchases.js +87 -0
- package/dist/esm/funcs/list-customer-purchases.js.map +1 -0
- package/dist/esm/funcs/list-customer-subscriptions.d.ts +16 -0
- package/dist/esm/funcs/list-customer-subscriptions.d.ts.map +1 -0
- package/dist/esm/funcs/list-customer-subscriptions.js +87 -0
- package/dist/esm/funcs/list-customer-subscriptions.js.map +1 -0
- package/dist/esm/funcs/list-features.d.ts +15 -0
- package/dist/esm/funcs/list-features.d.ts.map +1 -0
- package/dist/esm/funcs/list-features.js +70 -0
- package/dist/esm/funcs/list-features.js.map +1 -0
- package/dist/esm/funcs/list-plans.d.ts +15 -0
- package/dist/esm/funcs/list-plans.d.ts.map +1 -0
- package/dist/esm/funcs/list-plans.js +70 -0
- package/dist/esm/funcs/list-plans.js.map +1 -0
- package/dist/esm/funcs/publish-catalog.d.ts +15 -0
- package/dist/esm/funcs/publish-catalog.d.ts.map +1 -0
- package/dist/esm/funcs/publish-catalog.js +81 -0
- package/dist/esm/funcs/publish-catalog.js.map +1 -0
- package/dist/esm/funcs/set-subscription-cancellation.d.ts +16 -0
- package/dist/esm/funcs/set-subscription-cancellation.d.ts.map +1 -0
- package/dist/esm/funcs/set-subscription-cancellation.js +92 -0
- package/dist/esm/funcs/set-subscription-cancellation.js.map +1 -0
- package/dist/esm/funcs/track-usage.d.ts +15 -0
- package/dist/esm/funcs/track-usage.d.ts.map +1 -0
- package/dist/esm/funcs/track-usage.js +81 -0
- package/dist/esm/funcs/track-usage.js.map +1 -0
- package/dist/esm/funcs/update-add-on.d.ts +16 -0
- package/dist/esm/funcs/update-add-on.d.ts.map +1 -0
- package/dist/esm/funcs/update-add-on.js +88 -0
- package/dist/esm/funcs/update-add-on.js.map +1 -0
- package/dist/esm/funcs/update-feature.d.ts +16 -0
- package/dist/esm/funcs/update-feature.d.ts.map +1 -0
- package/dist/esm/funcs/update-feature.js +88 -0
- package/dist/esm/funcs/update-feature.js.map +1 -0
- package/dist/esm/funcs/update-plan.d.ts +16 -0
- package/dist/esm/funcs/update-plan.d.ts.map +1 -0
- package/dist/esm/funcs/update-plan.js +88 -0
- package/dist/esm/funcs/update-plan.js.map +1 -0
- package/dist/esm/funcs/upgrade-paid-plan.d.ts +16 -0
- package/dist/esm/funcs/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/esm/funcs/upgrade-paid-plan.js +83 -0
- package/dist/esm/funcs/upgrade-paid-plan.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts +25 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -0
- package/dist/esm/hooks/hooks.js +80 -0
- package/dist/esm/hooks/hooks.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +77 -0
- package/dist/esm/hooks/types.d.ts.map +1 -0
- package/dist/esm/hooks/types.js +5 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +7 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +9 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/base64.d.ts +10 -0
- package/dist/esm/lib/base64.d.ts.map +1 -0
- package/dist/esm/lib/base64.js +31 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +38 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +38 -0
- package/dist/esm/lib/config.js.map +1 -0
- package/dist/esm/lib/encodings.d.ts +55 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +407 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +15 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +44 -0
- package/dist/esm/lib/env.js.map +1 -0
- package/dist/esm/lib/files.d.ts +26 -0
- package/dist/esm/lib/files.d.ts.map +1 -0
- package/dist/esm/lib/files.js +91 -0
- package/dist/esm/lib/files.js.map +1 -0
- package/dist/esm/lib/http.d.ts +67 -0
- package/dist/esm/lib/http.d.ts.map +1 -0
- package/dist/esm/lib/http.js +209 -0
- package/dist/esm/lib/http.js.map +1 -0
- package/dist/esm/lib/logger.d.ts +6 -0
- package/dist/esm/lib/logger.d.ts.map +1 -0
- package/dist/esm/lib/logger.js +5 -0
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts +59 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -0
- package/dist/esm/lib/matchers.js +202 -0
- package/dist/esm/lib/matchers.js.map +1 -0
- package/dist/esm/lib/primitives.d.ts +27 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -0
- package/dist/esm/lib/primitives.js +120 -0
- package/dist/esm/lib/primitives.js.map +1 -0
- package/dist/esm/lib/retries.d.ts +38 -0
- package/dist/esm/lib/retries.d.ts.map +1 -0
- package/dist/esm/lib/retries.js +157 -0
- package/dist/esm/lib/retries.js.map +1 -0
- package/dist/esm/lib/schemas.d.ts +21 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -0
- package/dist/esm/lib/schemas.js +57 -0
- package/dist/esm/lib/schemas.js.map +1 -0
- package/dist/esm/lib/sdks.d.ts +63 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -0
- package/dist/esm/lib/sdks.js +294 -0
- package/dist/esm/lib/sdks.js.map +1 -0
- package/dist/esm/lib/security.d.ts +84 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +147 -0
- package/dist/esm/lib/security.js.map +1 -0
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -0
- package/dist/esm/lib/url.js +24 -0
- package/dist/esm/lib/url.js.map +1 -0
- package/dist/esm/models/add-on-archived.d.ts +10 -0
- package/dist/esm/models/add-on-archived.d.ts.map +1 -0
- package/dist/esm/models/add-on-archived.js +14 -0
- package/dist/esm/models/add-on-archived.js.map +1 -0
- package/dist/esm/models/add-on-attach-input.d.ts +15 -0
- package/dist/esm/models/add-on-attach-input.d.ts.map +1 -0
- package/dist/esm/models/add-on-attach-input.js +13 -0
- package/dist/esm/models/add-on-attach-input.js.map +1 -0
- package/dist/esm/models/add-on-attach-response.d.ts +11 -0
- package/dist/esm/models/add-on-attach-response.d.ts.map +1 -0
- package/dist/esm/models/add-on-attach-response.js +15 -0
- package/dist/esm/models/add-on-attach-response.js.map +1 -0
- package/dist/esm/models/add-on-item.d.ts +21 -0
- package/dist/esm/models/add-on-item.d.ts.map +1 -0
- package/dist/esm/models/add-on-item.js +25 -0
- package/dist/esm/models/add-on-item.js.map +1 -0
- package/dist/esm/models/add-on-list.d.ts +11 -0
- package/dist/esm/models/add-on-list.d.ts.map +1 -0
- package/dist/esm/models/add-on-list.js +15 -0
- package/dist/esm/models/add-on-list.js.map +1 -0
- package/dist/esm/models/add-on-mutation.d.ts +12 -0
- package/dist/esm/models/add-on-mutation.d.ts.map +1 -0
- package/dist/esm/models/add-on-mutation.js +16 -0
- package/dist/esm/models/add-on-mutation.js.map +1 -0
- package/dist/esm/models/attach-input.d.ts +10 -0
- package/dist/esm/models/attach-input.d.ts.map +1 -0
- package/dist/esm/models/attach-input.js +15 -0
- package/dist/esm/models/attach-input.js.map +1 -0
- package/dist/esm/models/attach-response.d.ts +11 -0
- package/dist/esm/models/attach-response.d.ts.map +1 -0
- package/dist/esm/models/attach-response.js +18 -0
- package/dist/esm/models/attach-response.js.map +1 -0
- package/dist/esm/models/catalog-error.d.ts +11 -0
- package/dist/esm/models/catalog-error.d.ts.map +1 -0
- package/dist/esm/models/catalog-error.js +15 -0
- package/dist/esm/models/catalog-error.js.map +1 -0
- package/dist/esm/models/catalog-input.d.ts +114 -0
- package/dist/esm/models/catalog-input.d.ts.map +1 -0
- package/dist/esm/models/catalog-input.js +84 -0
- package/dist/esm/models/catalog-input.js.map +1 -0
- package/dist/esm/models/catalog-publish-response.d.ts +21 -0
- package/dist/esm/models/catalog-publish-response.d.ts.map +1 -0
- package/dist/esm/models/catalog-publish-response.js +24 -0
- package/dist/esm/models/catalog-publish-response.js.map +1 -0
- package/dist/esm/models/check-input.d.ts +14 -0
- package/dist/esm/models/check-input.d.ts.map +1 -0
- package/dist/esm/models/check-input.js +13 -0
- package/dist/esm/models/check-input.js.map +1 -0
- package/dist/esm/models/check-response.d.ts +12 -0
- package/dist/esm/models/check-response.d.ts.map +1 -0
- package/dist/esm/models/check-response.js +16 -0
- package/dist/esm/models/check-response.js.map +1 -0
- package/dist/esm/models/create-add-on-input.d.ts +27 -0
- package/dist/esm/models/create-add-on-input.d.ts.map +1 -0
- package/dist/esm/models/create-add-on-input.js +21 -0
- package/dist/esm/models/create-add-on-input.js.map +1 -0
- package/dist/esm/models/create-customer-input.d.ts +12 -0
- package/dist/esm/models/create-customer-input.d.ts.map +1 -0
- package/dist/esm/models/create-customer-input.js +12 -0
- package/dist/esm/models/create-customer-input.js.map +1 -0
- package/dist/esm/models/create-feature-input.d.ts +16 -0
- package/dist/esm/models/create-feature-input.d.ts.map +1 -0
- package/dist/esm/models/create-feature-input.js +14 -0
- package/dist/esm/models/create-feature-input.js.map +1 -0
- package/dist/esm/models/create-plan-input.d.ts +18 -0
- package/dist/esm/models/create-plan-input.d.ts.map +1 -0
- package/dist/esm/models/create-plan-input.js +15 -0
- package/dist/esm/models/create-plan-input.js.map +1 -0
- package/dist/esm/models/customer-detail.d.ts +31 -0
- package/dist/esm/models/customer-detail.d.ts.map +1 -0
- package/dist/esm/models/customer-detail.js +36 -0
- package/dist/esm/models/customer-detail.js.map +1 -0
- package/dist/esm/models/customer-purchase-item.d.ts +15 -0
- package/dist/esm/models/customer-purchase-item.d.ts.map +1 -0
- package/dist/esm/models/customer-purchase-item.js +19 -0
- package/dist/esm/models/customer-purchase-item.js.map +1 -0
- package/dist/esm/models/customer-purchase-page.d.ts +13 -0
- package/dist/esm/models/customer-purchase-page.d.ts.map +1 -0
- package/dist/esm/models/customer-purchase-page.js +17 -0
- package/dist/esm/models/customer-purchase-page.js.map +1 -0
- package/dist/esm/models/customer-response.d.ts +11 -0
- package/dist/esm/models/customer-response.d.ts.map +1 -0
- package/dist/esm/models/customer-response.js +15 -0
- package/dist/esm/models/customer-response.js.map +1 -0
- package/dist/esm/models/customer-subscription-cancellation.d.ts +13 -0
- package/dist/esm/models/customer-subscription-cancellation.d.ts.map +1 -0
- package/dist/esm/models/customer-subscription-cancellation.js +17 -0
- package/dist/esm/models/customer-subscription-cancellation.js.map +1 -0
- package/dist/esm/models/customer-subscription-item.d.ts +19 -0
- package/dist/esm/models/customer-subscription-item.d.ts.map +1 -0
- package/dist/esm/models/customer-subscription-item.js +23 -0
- package/dist/esm/models/customer-subscription-item.js.map +1 -0
- package/dist/esm/models/customer-subscription-page.d.ts +13 -0
- package/dist/esm/models/customer-subscription-page.d.ts.map +1 -0
- package/dist/esm/models/customer-subscription-page.js +17 -0
- package/dist/esm/models/customer-subscription-page.js.map +1 -0
- package/dist/esm/models/errors/archive-add-on.d.ts +66 -0
- package/dist/esm/models/errors/archive-add-on.d.ts.map +1 -0
- package/dist/esm/models/errors/archive-add-on.js +97 -0
- package/dist/esm/models/errors/archive-add-on.js.map +1 -0
- package/dist/esm/models/errors/archive-feature.d.ts +66 -0
- package/dist/esm/models/errors/archive-feature.d.ts.map +1 -0
- package/dist/esm/models/errors/archive-feature.js +97 -0
- package/dist/esm/models/errors/archive-feature.js.map +1 -0
- package/dist/esm/models/errors/archive-plan.d.ts +66 -0
- package/dist/esm/models/errors/archive-plan.d.ts.map +1 -0
- package/dist/esm/models/errors/archive-plan.js +97 -0
- package/dist/esm/models/errors/archive-plan.js.map +1 -0
- package/dist/esm/models/errors/attach-error.d.ts +18 -0
- package/dist/esm/models/errors/attach-error.d.ts.map +1 -0
- package/dist/esm/models/errors/attach-error.js +35 -0
- package/dist/esm/models/errors/attach-error.js.map +1 -0
- package/dist/esm/models/errors/catalog-error.d.ts +21 -0
- package/dist/esm/models/errors/catalog-error.d.ts.map +1 -0
- package/dist/esm/models/errors/catalog-error.js +39 -0
- package/dist/esm/models/errors/catalog-error.js.map +1 -0
- package/dist/esm/models/errors/check-error.d.ts +18 -0
- package/dist/esm/models/errors/check-error.d.ts.map +1 -0
- package/dist/esm/models/errors/check-error.js +35 -0
- package/dist/esm/models/errors/check-error.js.map +1 -0
- package/dist/esm/models/errors/create-add-on.d.ts +66 -0
- package/dist/esm/models/errors/create-add-on.d.ts.map +1 -0
- package/dist/esm/models/errors/create-add-on.js +97 -0
- package/dist/esm/models/errors/create-add-on.js.map +1 -0
- package/dist/esm/models/errors/create-feature.d.ts +66 -0
- package/dist/esm/models/errors/create-feature.d.ts.map +1 -0
- package/dist/esm/models/errors/create-feature.js +97 -0
- package/dist/esm/models/errors/create-feature.js.map +1 -0
- package/dist/esm/models/errors/create-plan.d.ts +66 -0
- package/dist/esm/models/errors/create-plan.d.ts.map +1 -0
- package/dist/esm/models/errors/create-plan.js +97 -0
- package/dist/esm/models/errors/create-plan.js.map +1 -0
- package/dist/esm/models/errors/customer-error.d.ts +18 -0
- package/dist/esm/models/errors/customer-error.d.ts.map +1 -0
- package/dist/esm/models/errors/customer-error.js +34 -0
- package/dist/esm/models/errors/customer-error.js.map +1 -0
- package/dist/esm/models/errors/get-add-on.d.ts +66 -0
- package/dist/esm/models/errors/get-add-on.d.ts.map +1 -0
- package/dist/esm/models/errors/get-add-on.js +97 -0
- package/dist/esm/models/errors/get-add-on.js.map +1 -0
- package/dist/esm/models/errors/get-feature.d.ts +66 -0
- package/dist/esm/models/errors/get-feature.d.ts.map +1 -0
- package/dist/esm/models/errors/get-feature.js +97 -0
- package/dist/esm/models/errors/get-feature.js.map +1 -0
- package/dist/esm/models/errors/get-plan.d.ts +66 -0
- package/dist/esm/models/errors/get-plan.d.ts.map +1 -0
- package/dist/esm/models/errors/get-plan.js +97 -0
- package/dist/esm/models/errors/get-plan.js.map +1 -0
- package/dist/esm/models/errors/http-client-errors.d.ts +44 -0
- package/dist/esm/models/errors/http-client-errors.d.ts.map +1 -0
- package/dist/esm/models/errors/http-client-errors.js +56 -0
- package/dist/esm/models/errors/http-client-errors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +28 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +31 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/ledger-default-error.d.ts +10 -0
- package/dist/esm/models/errors/ledger-default-error.d.ts.map +1 -0
- package/dist/esm/models/errors/ledger-default-error.js +30 -0
- package/dist/esm/models/errors/ledger-default-error.js.map +1 -0
- package/dist/esm/models/errors/ledger-error.d.ts +19 -0
- package/dist/esm/models/errors/ledger-error.d.ts.map +1 -0
- package/dist/esm/models/errors/ledger-error.js +26 -0
- package/dist/esm/models/errors/ledger-error.js.map +1 -0
- package/dist/esm/models/errors/list-add-ons.d.ts +24 -0
- package/dist/esm/models/errors/list-add-ons.d.ts.map +1 -0
- package/dist/esm/models/errors/list-add-ons.js +37 -0
- package/dist/esm/models/errors/list-add-ons.js.map +1 -0
- package/dist/esm/models/errors/list-features.d.ts +24 -0
- package/dist/esm/models/errors/list-features.d.ts.map +1 -0
- package/dist/esm/models/errors/list-features.js +37 -0
- package/dist/esm/models/errors/list-features.js.map +1 -0
- package/dist/esm/models/errors/list-plans.d.ts +24 -0
- package/dist/esm/models/errors/list-plans.d.ts.map +1 -0
- package/dist/esm/models/errors/list-plans.js +37 -0
- package/dist/esm/models/errors/list-plans.js.map +1 -0
- package/dist/esm/models/errors/response-validation-error.d.ts +26 -0
- package/dist/esm/models/errors/response-validation-error.d.ts.map +1 -0
- package/dist/esm/models/errors/response-validation-error.js +37 -0
- package/dist/esm/models/errors/response-validation-error.js.map +1 -0
- package/dist/esm/models/errors/sdk-validation-error.d.ts +21 -0
- package/dist/esm/models/errors/sdk-validation-error.d.ts.map +1 -0
- package/dist/esm/models/errors/sdk-validation-error.js +52 -0
- package/dist/esm/models/errors/sdk-validation-error.js.map +1 -0
- package/dist/esm/models/errors/track-error.d.ts +22 -0
- package/dist/esm/models/errors/track-error.d.ts.map +1 -0
- package/dist/esm/models/errors/track-error.js +44 -0
- package/dist/esm/models/errors/track-error.js.map +1 -0
- package/dist/esm/models/errors/update-add-on.d.ts +87 -0
- package/dist/esm/models/errors/update-add-on.d.ts.map +1 -0
- package/dist/esm/models/errors/update-add-on.js +127 -0
- package/dist/esm/models/errors/update-add-on.js.map +1 -0
- package/dist/esm/models/errors/update-feature.d.ts +87 -0
- package/dist/esm/models/errors/update-feature.d.ts.map +1 -0
- package/dist/esm/models/errors/update-feature.js +127 -0
- package/dist/esm/models/errors/update-feature.js.map +1 -0
- package/dist/esm/models/errors/update-plan.d.ts +87 -0
- package/dist/esm/models/errors/update-plan.d.ts.map +1 -0
- package/dist/esm/models/errors/update-plan.js +127 -0
- package/dist/esm/models/errors/update-plan.js.map +1 -0
- package/dist/esm/models/errors/upgrade-error.d.ts +18 -0
- package/dist/esm/models/errors/upgrade-error.d.ts.map +1 -0
- package/dist/esm/models/errors/upgrade-error.js +34 -0
- package/dist/esm/models/errors/upgrade-error.js.map +1 -0
- package/dist/esm/models/errors/upgrade-paid-plan.d.ts +110 -0
- package/dist/esm/models/errors/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/esm/models/errors/upgrade-paid-plan.js +161 -0
- package/dist/esm/models/errors/upgrade-paid-plan.js.map +1 -0
- package/dist/esm/models/feature-archived.d.ts +10 -0
- package/dist/esm/models/feature-archived.d.ts.map +1 -0
- package/dist/esm/models/feature-archived.js +14 -0
- package/dist/esm/models/feature-archived.js.map +1 -0
- package/dist/esm/models/feature-item.d.ts +12 -0
- package/dist/esm/models/feature-item.d.ts.map +1 -0
- package/dist/esm/models/feature-item.js +17 -0
- package/dist/esm/models/feature-item.js.map +1 -0
- package/dist/esm/models/feature-list.d.ts +11 -0
- package/dist/esm/models/feature-list.d.ts.map +1 -0
- package/dist/esm/models/feature-list.js +15 -0
- package/dist/esm/models/feature-list.js.map +1 -0
- package/dist/esm/models/feature-mutation.d.ts +12 -0
- package/dist/esm/models/feature-mutation.d.ts.map +1 -0
- package/dist/esm/models/feature-mutation.js +16 -0
- package/dist/esm/models/feature-mutation.js.map +1 -0
- package/dist/esm/models/free-plan-attach-response.d.ts +18 -0
- package/dist/esm/models/free-plan-attach-response.d.ts.map +1 -0
- package/dist/esm/models/free-plan-attach-response.js +21 -0
- package/dist/esm/models/free-plan-attach-response.js.map +1 -0
- package/dist/esm/models/index.d.ts +46 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +49 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/operations/archive-add-on.d.ts +12 -0
- package/dist/esm/models/operations/archive-add-on.d.ts.map +1 -0
- package/dist/esm/models/operations/archive-add-on.js +12 -0
- package/dist/esm/models/operations/archive-add-on.js.map +1 -0
- package/dist/esm/models/operations/archive-feature.d.ts +12 -0
- package/dist/esm/models/operations/archive-feature.d.ts.map +1 -0
- package/dist/esm/models/operations/archive-feature.js +12 -0
- package/dist/esm/models/operations/archive-feature.js.map +1 -0
- package/dist/esm/models/operations/archive-plan.d.ts +12 -0
- package/dist/esm/models/operations/archive-plan.d.ts.map +1 -0
- package/dist/esm/models/operations/archive-plan.js +12 -0
- package/dist/esm/models/operations/archive-plan.js.map +1 -0
- package/dist/esm/models/operations/get-add-on.d.ts +12 -0
- package/dist/esm/models/operations/get-add-on.d.ts.map +1 -0
- package/dist/esm/models/operations/get-add-on.js +12 -0
- package/dist/esm/models/operations/get-add-on.js.map +1 -0
- package/dist/esm/models/operations/get-customer.d.ts +12 -0
- package/dist/esm/models/operations/get-customer.d.ts.map +1 -0
- package/dist/esm/models/operations/get-customer.js +12 -0
- package/dist/esm/models/operations/get-customer.js.map +1 -0
- package/dist/esm/models/operations/get-feature.d.ts +12 -0
- package/dist/esm/models/operations/get-feature.d.ts.map +1 -0
- package/dist/esm/models/operations/get-feature.js +12 -0
- package/dist/esm/models/operations/get-feature.js.map +1 -0
- package/dist/esm/models/operations/get-plan.d.ts +12 -0
- package/dist/esm/models/operations/get-plan.d.ts.map +1 -0
- package/dist/esm/models/operations/get-plan.js +12 -0
- package/dist/esm/models/operations/get-plan.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +15 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -0
- package/dist/esm/models/operations/index.js +18 -0
- package/dist/esm/models/operations/index.js.map +1 -0
- package/dist/esm/models/operations/list-customer-purchases.d.ts +16 -0
- package/dist/esm/models/operations/list-customer-purchases.d.ts.map +1 -0
- package/dist/esm/models/operations/list-customer-purchases.js +14 -0
- package/dist/esm/models/operations/list-customer-purchases.js.map +1 -0
- package/dist/esm/models/operations/list-customer-subscriptions.d.ts +16 -0
- package/dist/esm/models/operations/list-customer-subscriptions.d.ts.map +1 -0
- package/dist/esm/models/operations/list-customer-subscriptions.js +14 -0
- package/dist/esm/models/operations/list-customer-subscriptions.js.map +1 -0
- package/dist/esm/models/operations/set-subscription-cancellation.d.ts +17 -0
- package/dist/esm/models/operations/set-subscription-cancellation.d.ts.map +1 -0
- package/dist/esm/models/operations/set-subscription-cancellation.js +15 -0
- package/dist/esm/models/operations/set-subscription-cancellation.js.map +1 -0
- package/dist/esm/models/operations/update-add-on.d.ts +15 -0
- package/dist/esm/models/operations/update-add-on.d.ts.map +1 -0
- package/dist/esm/models/operations/update-add-on.js +14 -0
- package/dist/esm/models/operations/update-add-on.js.map +1 -0
- package/dist/esm/models/operations/update-feature.d.ts +15 -0
- package/dist/esm/models/operations/update-feature.d.ts.map +1 -0
- package/dist/esm/models/operations/update-feature.js +14 -0
- package/dist/esm/models/operations/update-feature.js.map +1 -0
- package/dist/esm/models/operations/update-plan.d.ts +15 -0
- package/dist/esm/models/operations/update-plan.d.ts.map +1 -0
- package/dist/esm/models/operations/update-plan.js +14 -0
- package/dist/esm/models/operations/update-plan.js.map +1 -0
- package/dist/esm/models/operations/upgrade-paid-plan.d.ts +15 -0
- package/dist/esm/models/operations/upgrade-paid-plan.d.ts.map +1 -0
- package/dist/esm/models/operations/upgrade-paid-plan.js +19 -0
- package/dist/esm/models/operations/upgrade-paid-plan.js.map +1 -0
- package/dist/esm/models/plan-archived.d.ts +10 -0
- package/dist/esm/models/plan-archived.d.ts.map +1 -0
- package/dist/esm/models/plan-archived.js +14 -0
- package/dist/esm/models/plan-archived.js.map +1 -0
- package/dist/esm/models/plan-attach-input.d.ts +15 -0
- package/dist/esm/models/plan-attach-input.d.ts.map +1 -0
- package/dist/esm/models/plan-attach-input.js +13 -0
- package/dist/esm/models/plan-attach-input.js.map +1 -0
- package/dist/esm/models/plan-attach-response.d.ts +11 -0
- package/dist/esm/models/plan-attach-response.d.ts.map +1 -0
- package/dist/esm/models/plan-attach-response.js +15 -0
- package/dist/esm/models/plan-attach-response.js.map +1 -0
- package/dist/esm/models/plan-item.d.ts +23 -0
- package/dist/esm/models/plan-item.d.ts.map +1 -0
- package/dist/esm/models/plan-item.js +27 -0
- package/dist/esm/models/plan-item.js.map +1 -0
- package/dist/esm/models/plan-list.d.ts +11 -0
- package/dist/esm/models/plan-list.d.ts.map +1 -0
- package/dist/esm/models/plan-list.js +15 -0
- package/dist/esm/models/plan-list.js.map +1 -0
- package/dist/esm/models/plan-mutation.d.ts +23 -0
- package/dist/esm/models/plan-mutation.d.ts.map +1 -0
- package/dist/esm/models/plan-mutation.js +26 -0
- package/dist/esm/models/plan-mutation.js.map +1 -0
- package/dist/esm/models/security.d.ts +12 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +17 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/models/track-input.d.ts +16 -0
- package/dist/esm/models/track-input.d.ts.map +1 -0
- package/dist/esm/models/track-input.js +19 -0
- package/dist/esm/models/track-input.js.map +1 -0
- package/dist/esm/models/track-response.d.ts +14 -0
- package/dist/esm/models/track-response.d.ts.map +1 -0
- package/dist/esm/models/track-response.js +23 -0
- package/dist/esm/models/track-response.js.map +1 -0
- package/dist/esm/models/update-add-on-input.d.ts +25 -0
- package/dist/esm/models/update-add-on-input.d.ts.map +1 -0
- package/dist/esm/models/update-add-on-input.js +20 -0
- package/dist/esm/models/update-add-on-input.js.map +1 -0
- package/dist/esm/models/update-customer-subscription-cancellation-input.d.ts +12 -0
- package/dist/esm/models/update-customer-subscription-cancellation-input.d.ts.map +1 -0
- package/dist/esm/models/update-customer-subscription-cancellation-input.js +12 -0
- package/dist/esm/models/update-customer-subscription-cancellation-input.js.map +1 -0
- package/dist/esm/models/update-customer-subscription-cancellation-response.d.ts +11 -0
- package/dist/esm/models/update-customer-subscription-cancellation-response.d.ts.map +1 -0
- package/dist/esm/models/update-customer-subscription-cancellation-response.js +16 -0
- package/dist/esm/models/update-customer-subscription-cancellation-response.js.map +1 -0
- package/dist/esm/models/update-feature-input.d.ts +14 -0
- package/dist/esm/models/update-feature-input.d.ts.map +1 -0
- package/dist/esm/models/update-feature-input.js +13 -0
- package/dist/esm/models/update-feature-input.js.map +1 -0
- package/dist/esm/models/update-plan-input.d.ts +16 -0
- package/dist/esm/models/update-plan-input.d.ts.map +1 -0
- package/dist/esm/models/update-plan-input.js +14 -0
- package/dist/esm/models/update-plan-input.js.map +1 -0
- package/dist/esm/models/upgrade-input.d.ts +14 -0
- package/dist/esm/models/upgrade-input.d.ts.map +1 -0
- package/dist/esm/models/upgrade-input.js +13 -0
- package/dist/esm/models/upgrade-input.js.map +1 -0
- package/dist/esm/models/upgrade-response.d.ts +22 -0
- package/dist/esm/models/upgrade-response.d.ts.map +1 -0
- package/dist/esm/models/upgrade-response.js +25 -0
- package/dist/esm/models/upgrade-response.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/sdk/index.d.ts +2 -0
- package/dist/esm/sdk/index.d.ts.map +1 -0
- package/dist/esm/sdk/index.js +5 -0
- package/dist/esm/sdk/index.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +106 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +183 -0
- package/dist/esm/sdk/sdk.js.map +1 -0
- package/dist/esm/types/async.d.ts +23 -0
- package/dist/esm/types/async.d.ts.map +1 -0
- package/dist/esm/types/async.js +28 -0
- package/dist/esm/types/async.js.map +1 -0
- package/dist/esm/types/blobs.d.ts +4 -0
- package/dist/esm/types/blobs.d.ts.map +1 -0
- package/dist/esm/types/blobs.js +25 -0
- package/dist/esm/types/blobs.js.map +1 -0
- package/dist/esm/types/const-date-time.d.ts +3 -0
- package/dist/esm/types/const-date-time.d.ts.map +1 -0
- package/dist/esm/types/const-date-time.js +10 -0
- package/dist/esm/types/const-date-time.js.map +1 -0
- package/dist/esm/types/default-to-zero-value.d.ts +12 -0
- package/dist/esm/types/default-to-zero-value.d.ts.map +1 -0
- package/dist/esm/types/default-to-zero-value.js +31 -0
- package/dist/esm/types/default-to-zero-value.js.map +1 -0
- package/dist/esm/types/enums.d.ts +9 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +27 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/fp.d.ts +31 -0
- package/dist/esm/types/fp.d.ts.map +1 -0
- package/dist/esm/types/fp.js +31 -0
- package/dist/esm/types/fp.js.map +1 -0
- package/dist/esm/types/index.d.ts +10 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +10 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/operations.d.ts +27 -0
- package/dist/esm/types/operations.d.ts.map +1 -0
- package/dist/esm/types/operations.js +77 -0
- package/dist/esm/types/operations.js.map +1 -0
- package/dist/esm/types/primitives.d.ts +9 -0
- package/dist/esm/types/primitives.d.ts.map +1 -0
- package/dist/esm/types/primitives.js +109 -0
- package/dist/esm/types/primitives.js.map +1 -0
- package/dist/esm/types/rfcdate.d.ts +21 -0
- package/dist/esm/types/rfcdate.d.ts.map +1 -0
- package/dist/esm/types/rfcdate.js +43 -0
- package/dist/esm/types/rfcdate.js.map +1 -0
- package/dist/esm/types/smart-union.d.ts +7 -0
- package/dist/esm/types/smart-union.d.ts.map +1 -0
- package/dist/esm/types/smart-union.js +122 -0
- package/dist/esm/types/smart-union.js.map +1 -0
- package/dist/esm/types/streams.d.ts +2 -0
- package/dist/esm/types/streams.d.ts.map +1 -0
- package/dist/esm/types/streams.js +15 -0
- package/dist/esm/types/streams.js.map +1 -0
- package/dist/esm/types/unrecognized.d.ts +16 -0
- package/dist/esm/types/unrecognized.d.ts.map +1 -0
- package/dist/esm/types/unrecognized.js +31 -0
- package/dist/esm/types/unrecognized.js.map +1 -0
- package/docs/lib/utils/retryconfig.md +24 -0
- package/docs/models/add-on-archived.md +17 -0
- package/docs/models/add-on-attach-input.md +19 -0
- package/docs/models/add-on-attach-response.md +19 -0
- package/docs/models/add-on-item-type.md +17 -0
- package/docs/models/add-on-item.md +25 -0
- package/docs/models/add-on-list.md +25 -0
- package/docs/models/add-on-mutation.md +25 -0
- package/docs/models/add-on.md +25 -0
- package/docs/models/attach-input.md +23 -0
- package/docs/models/attach-response.md +32 -0
- package/docs/models/catalog-input-type.md +15 -0
- package/docs/models/catalog-input.md +38 -0
- package/docs/models/catalog-publish-response-stripe-sync.md +17 -0
- package/docs/models/catalog-publish-response.md +19 -0
- package/docs/models/check-input.md +19 -0
- package/docs/models/check-response.md +21 -0
- package/docs/models/create-add-on-input-type.md +15 -0
- package/docs/models/create-add-on-input.md +25 -0
- package/docs/models/create-customer-input.md +17 -0
- package/docs/models/create-feature-input.md +21 -0
- package/docs/models/create-plan-input.md +23 -0
- package/docs/models/currency.md +15 -0
- package/docs/models/current-plan.md +25 -0
- package/docs/models/customer-detail-status.md +17 -0
- package/docs/models/customer-detail.md +29 -0
- package/docs/models/customer-purchase-item.md +27 -0
- package/docs/models/customer-purchase-page.md +30 -0
- package/docs/models/customer-response.md +19 -0
- package/docs/models/customer-subscription-cancellation.md +23 -0
- package/docs/models/customer-subscription-item.md +38 -0
- package/docs/models/customer-subscription-page.md +38 -0
- package/docs/models/environment.md +15 -0
- package/docs/models/errors/archive-add-on-bad-request-error.md +17 -0
- package/docs/models/errors/archive-add-on-not-found-error.md +17 -0
- package/docs/models/errors/archive-add-on-unauthorized-error.md +17 -0
- package/docs/models/errors/archive-feature-bad-request-error.md +17 -0
- package/docs/models/errors/archive-feature-not-found-error.md +17 -0
- package/docs/models/errors/archive-feature-unauthorized-error.md +17 -0
- package/docs/models/errors/archive-plan-bad-request-error.md +17 -0
- package/docs/models/errors/archive-plan-not-found-error.md +17 -0
- package/docs/models/errors/archive-plan-unauthorized-error.md +17 -0
- package/docs/models/errors/attach-error.md +15 -0
- package/docs/models/errors/bad-gateway-error.md +17 -0
- package/docs/models/errors/catalog-error.md +16 -0
- package/docs/models/errors/check-error.md +15 -0
- package/docs/models/errors/create-add-on-bad-request-error.md +17 -0
- package/docs/models/errors/create-add-on-conflict-error.md +17 -0
- package/docs/models/errors/create-add-on-unauthorized-error.md +17 -0
- package/docs/models/errors/create-feature-bad-request-error.md +17 -0
- package/docs/models/errors/create-feature-conflict-error.md +17 -0
- package/docs/models/errors/create-feature-unauthorized-error.md +17 -0
- package/docs/models/errors/create-plan-bad-request-error.md +17 -0
- package/docs/models/errors/create-plan-conflict-error.md +17 -0
- package/docs/models/errors/create-plan-unauthorized-error.md +17 -0
- package/docs/models/errors/customer-error.md +15 -0
- package/docs/models/errors/get-add-on-bad-request-error.md +17 -0
- package/docs/models/errors/get-add-on-not-found-error.md +17 -0
- package/docs/models/errors/get-add-on-unauthorized-error.md +17 -0
- package/docs/models/errors/get-feature-bad-request-error.md +17 -0
- package/docs/models/errors/get-feature-not-found-error.md +17 -0
- package/docs/models/errors/get-feature-unauthorized-error.md +17 -0
- package/docs/models/errors/get-plan-bad-request-error.md +17 -0
- package/docs/models/errors/get-plan-not-found-error.md +17 -0
- package/docs/models/errors/get-plan-unauthorized-error.md +17 -0
- package/docs/models/errors/list-add-ons-unauthorized-error.md +17 -0
- package/docs/models/errors/list-features-unauthorized-error.md +17 -0
- package/docs/models/errors/list-plans-unauthorized-error.md +17 -0
- package/docs/models/errors/service-unavailable-error.md +18 -0
- package/docs/models/errors/track-error.md +17 -0
- package/docs/models/errors/update-add-on-bad-request-error.md +17 -0
- package/docs/models/errors/update-add-on-conflict-error.md +17 -0
- package/docs/models/errors/update-add-on-not-found-error.md +17 -0
- package/docs/models/errors/update-add-on-unauthorized-error.md +17 -0
- package/docs/models/errors/update-feature-bad-request-error.md +17 -0
- package/docs/models/errors/update-feature-conflict-error.md +17 -0
- package/docs/models/errors/update-feature-not-found-error.md +17 -0
- package/docs/models/errors/update-feature-unauthorized-error.md +17 -0
- package/docs/models/errors/update-plan-bad-request-error.md +17 -0
- package/docs/models/errors/update-plan-conflict-error.md +17 -0
- package/docs/models/errors/update-plan-not-found-error.md +17 -0
- package/docs/models/errors/update-plan-unauthorized-error.md +17 -0
- package/docs/models/errors/upgrade-error.md +15 -0
- package/docs/models/errors/upgrade-paid-plan-conflict-error.md +17 -0
- package/docs/models/errors/upgrade-paid-plan-not-found-error.md +17 -0
- package/docs/models/errors/upgrade-paid-plan-unauthorized-error.md +17 -0
- package/docs/models/feature-archived.md +17 -0
- package/docs/models/feature-item.md +21 -0
- package/docs/models/feature-list.md +23 -0
- package/docs/models/feature-mutation.md +23 -0
- package/docs/models/feature.md +21 -0
- package/docs/models/free-plan-attach-response-status.md +17 -0
- package/docs/models/free-plan-attach-response.md +19 -0
- package/docs/models/issue.md +19 -0
- package/docs/models/on-insufficient-credits.md +15 -0
- package/docs/models/operations/archive-add-on-request.md +17 -0
- package/docs/models/operations/archive-feature-request.md +17 -0
- package/docs/models/operations/archive-plan-request.md +17 -0
- package/docs/models/operations/get-add-on-request.md +17 -0
- package/docs/models/operations/get-customer-request.md +17 -0
- package/docs/models/operations/get-feature-request.md +17 -0
- package/docs/models/operations/get-plan-request.md +17 -0
- package/docs/models/operations/list-customer-purchases-request.md +19 -0
- package/docs/models/operations/list-customer-subscriptions-request.md +19 -0
- package/docs/models/operations/set-subscription-cancellation-request.md +23 -0
- package/docs/models/operations/update-add-on-request.md +24 -0
- package/docs/models/operations/update-feature-request.md +22 -0
- package/docs/models/operations/update-plan-request.md +23 -0
- package/docs/models/operations/upgrade-paid-plan-request.md +22 -0
- package/docs/models/plan-archived.md +17 -0
- package/docs/models/plan-attach-input.md +19 -0
- package/docs/models/plan-attach-response.md +19 -0
- package/docs/models/plan-item.md +24 -0
- package/docs/models/plan-list.md +24 -0
- package/docs/models/plan-mutation-stripe-sync.md +17 -0
- package/docs/models/plan-mutation.md +25 -0
- package/docs/models/plan.md +23 -0
- package/docs/models/policy.md +17 -0
- package/docs/models/schema-version.md +15 -0
- package/docs/models/security.md +15 -0
- package/docs/models/stripe-sync-status.md +17 -0
- package/docs/models/track-input.md +21 -0
- package/docs/models/track-response.md +25 -0
- package/docs/models/update-add-on-input-type.md +15 -0
- package/docs/models/update-add-on-input.md +23 -0
- package/docs/models/update-customer-subscription-cancellation-input.md +17 -0
- package/docs/models/update-customer-subscription-cancellation-response.md +19 -0
- package/docs/models/update-feature-input.md +19 -0
- package/docs/models/update-plan-input.md +21 -0
- package/docs/models/upgrade-input.md +19 -0
- package/docs/models/upgrade-response-status.md +17 -0
- package/docs/models/upgrade-response.md +21 -0
- package/docs/sdks/ledger/README.md +2030 -0
- package/package.json +144 -4
- package/src/core.ts +13 -0
- package/src/funcs/archive-add-on.ts +183 -0
- package/src/funcs/archive-feature.ts +183 -0
- package/src/funcs/archive-plan.ts +183 -0
- package/src/funcs/attach.ts +170 -0
- package/src/funcs/check-credits.ts +169 -0
- package/src/funcs/create-add-on.ts +177 -0
- package/src/funcs/create-feature.ts +177 -0
- package/src/funcs/create-or-get-customer.ts +169 -0
- package/src/funcs/create-plan.ts +177 -0
- package/src/funcs/get-add-on.ts +183 -0
- package/src/funcs/get-customer.ts +174 -0
- package/src/funcs/get-feature.ts +183 -0
- package/src/funcs/get-plan.ts +183 -0
- package/src/funcs/list-add-ons.ts +150 -0
- package/src/funcs/list-customer-purchases.ts +177 -0
- package/src/funcs/list-customer-subscriptions.ts +180 -0
- package/src/funcs/list-features.ts +150 -0
- package/src/funcs/list-plans.ts +150 -0
- package/src/funcs/publish-catalog.ts +169 -0
- package/src/funcs/set-subscription-cancellation.ts +191 -0
- package/src/funcs/track-usage.ts +169 -0
- package/src/funcs/update-add-on.ts +188 -0
- package/src/funcs/update-feature.ts +188 -0
- package/src/funcs/update-plan.ts +188 -0
- package/src/funcs/upgrade-paid-plan.ts +195 -0
- package/src/hooks/hooks.ts +129 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/types.ts +108 -0
- package/src/index.ts +10 -0
- package/src/lib/base64.ts +39 -0
- package/src/lib/config.ts +71 -0
- package/src/lib/encodings.ts +564 -0
- package/src/lib/env.ts +61 -0
- package/src/lib/files.ts +104 -0
- package/src/lib/http.ts +325 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +353 -0
- package/src/lib/primitives.ts +166 -0
- package/src/lib/retries.ts +226 -0
- package/src/lib/schemas.ts +94 -0
- package/src/lib/sdks.ts +442 -0
- package/src/lib/security.ts +280 -0
- package/src/lib/url.ts +35 -0
- package/src/models/add-on-archived.ts +31 -0
- package/src/models/add-on-attach-input.ts +34 -0
- package/src/models/add-on-attach-response.ts +33 -0
- package/src/models/add-on-item.ts +50 -0
- package/src/models/add-on-list.ts +29 -0
- package/src/models/add-on-mutation.ts +34 -0
- package/src/models/attach-input.ts +36 -0
- package/src/models/attach-response.ts +46 -0
- package/src/models/catalog-error.ts +30 -0
- package/src/models/catalog-input.ts +198 -0
- package/src/models/catalog-publish-response.ts +51 -0
- package/src/models/check-input.ts +29 -0
- package/src/models/check-response.ts +35 -0
- package/src/models/create-add-on-input.ts +53 -0
- package/src/models/create-customer-input.ts +30 -0
- package/src/models/create-feature-input.ts +36 -0
- package/src/models/create-plan-input.ts +37 -0
- package/src/models/customer-detail.ts +79 -0
- package/src/models/customer-purchase-item.ts +41 -0
- package/src/models/customer-purchase-page.ts +39 -0
- package/src/models/customer-response.ts +33 -0
- package/src/models/customer-subscription-cancellation.ts +37 -0
- package/src/models/customer-subscription-item.ts +51 -0
- package/src/models/customer-subscription-page.ts +39 -0
- package/src/models/errors/archive-add-on.ts +160 -0
- package/src/models/errors/archive-feature.ts +160 -0
- package/src/models/errors/archive-plan.ts +160 -0
- package/src/models/errors/attach-error.ts +50 -0
- package/src/models/errors/catalog-error.ts +55 -0
- package/src/models/errors/check-error.ts +50 -0
- package/src/models/errors/create-add-on.ts +160 -0
- package/src/models/errors/create-feature.ts +160 -0
- package/src/models/errors/create-plan.ts +160 -0
- package/src/models/errors/customer-error.ts +52 -0
- package/src/models/errors/get-add-on.ts +160 -0
- package/src/models/errors/get-feature.ts +160 -0
- package/src/models/errors/get-plan.ts +160 -0
- package/src/models/errors/http-client-errors.ts +62 -0
- package/src/models/errors/index.ts +31 -0
- package/src/models/errors/ledger-default-error.ts +40 -0
- package/src/models/errors/ledger-error.ts +35 -0
- package/src/models/errors/list-add-ons.ts +58 -0
- package/src/models/errors/list-features.ts +58 -0
- package/src/models/errors/list-plans.ts +58 -0
- package/src/models/errors/response-validation-error.ts +50 -0
- package/src/models/errors/sdk-validation-error.ts +54 -0
- package/src/models/errors/track-error.ts +60 -0
- package/src/models/errors/update-add-on.ts +211 -0
- package/src/models/errors/update-feature.ts +211 -0
- package/src/models/errors/update-plan.ts +211 -0
- package/src/models/errors/upgrade-error.ts +50 -0
- package/src/models/errors/upgrade-paid-plan.ts +266 -0
- package/src/models/feature-archived.ts +31 -0
- package/src/models/feature-item.ts +33 -0
- package/src/models/feature-list.ts +29 -0
- package/src/models/feature-mutation.ts +34 -0
- package/src/models/free-plan-attach-response.ts +48 -0
- package/src/models/index.ts +49 -0
- package/src/models/operations/archive-add-on.ts +30 -0
- package/src/models/operations/archive-feature.ts +30 -0
- package/src/models/operations/archive-plan.ts +30 -0
- package/src/models/operations/get-add-on.ts +28 -0
- package/src/models/operations/get-customer.ts +30 -0
- package/src/models/operations/get-feature.ts +30 -0
- package/src/models/operations/get-plan.ts +26 -0
- package/src/models/operations/index.ts +18 -0
- package/src/models/operations/list-customer-purchases.ts +38 -0
- package/src/models/operations/list-customer-subscriptions.ts +38 -0
- package/src/models/operations/set-subscription-cancellation.ts +39 -0
- package/src/models/operations/update-add-on.ts +34 -0
- package/src/models/operations/update-feature.ts +34 -0
- package/src/models/operations/update-plan.ts +34 -0
- package/src/models/operations/upgrade-paid-plan.ts +42 -0
- package/src/models/plan-archived.ts +29 -0
- package/src/models/plan-attach-input.ts +32 -0
- package/src/models/plan-attach-response.ts +33 -0
- package/src/models/plan-item.ts +52 -0
- package/src/models/plan-list.ts +29 -0
- package/src/models/plan-mutation.ts +50 -0
- package/src/models/security.ts +34 -0
- package/src/models/track-input.ts +40 -0
- package/src/models/track-response.ts +47 -0
- package/src/models/update-add-on-input.ts +50 -0
- package/src/models/update-customer-subscription-cancellation-input.ts +34 -0
- package/src/models/update-customer-subscription-cancellation-response.ts +38 -0
- package/src/models/update-feature-input.ts +33 -0
- package/src/models/update-plan-input.ts +34 -0
- package/src/models/upgrade-input.ts +29 -0
- package/src/models/upgrade-response.ts +51 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/sdk.ts +379 -0
- package/src/types/async.ts +69 -0
- package/src/types/blobs.ts +33 -0
- package/src/types/const-date-time.ts +15 -0
- package/src/types/default-to-zero-value.ts +33 -0
- package/src/types/enums.ts +45 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +13 -0
- package/src/types/operations.ts +105 -0
- package/src/types/primitives.ts +140 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/smart-union.ts +162 -0
- package/src/types/streams.ts +21 -0
- package/src/types/unrecognized.ts +35 -0
|
@@ -0,0 +1,2030 @@
|
|
|
1
|
+
# Ledger SDK
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
### Available Operations
|
|
6
|
+
|
|
7
|
+
* [publishCatalog](#publishcatalog) - Publish an organization's catalog
|
|
8
|
+
* [listFeatures](#listfeatures) - List active features
|
|
9
|
+
* [createFeature](#createfeature) - Create a feature
|
|
10
|
+
* [getFeature](#getfeature) - Get a feature
|
|
11
|
+
* [updateFeature](#updatefeature) - Update a feature
|
|
12
|
+
* [archiveFeature](#archivefeature) - Archive a feature
|
|
13
|
+
* [listPlans](#listplans) - List active plans
|
|
14
|
+
* [createPlan](#createplan) - Create a plan
|
|
15
|
+
* [getPlan](#getplan) - Get a plan
|
|
16
|
+
* [updatePlan](#updateplan) - Update a plan
|
|
17
|
+
* [archivePlan](#archiveplan) - Archive a plan
|
|
18
|
+
* [listAddOns](#listaddons) - List active add-ons
|
|
19
|
+
* [createAddOn](#createaddon) - Create an add-on
|
|
20
|
+
* [getAddOn](#getaddon) - Get an add-on
|
|
21
|
+
* [updateAddOn](#updateaddon) - Update an add-on
|
|
22
|
+
* [archiveAddOn](#archiveaddon) - Archive an add-on
|
|
23
|
+
* [checkCredits](#checkcredits) - Check a customer's available credits
|
|
24
|
+
* [listCustomerSubscriptions](#listcustomersubscriptions) - List a customer's subscriptions
|
|
25
|
+
* [listCustomerPurchases](#listcustomerpurchases) - List a customer's credit-pack purchases
|
|
26
|
+
* [setSubscriptionCancellation](#setsubscriptioncancellation) - Stop or resume a paid subscription's renewal
|
|
27
|
+
* [getCustomer](#getcustomer) - Get a customer and current balance
|
|
28
|
+
* [createOrGetCustomer](#createorgetcustomer) - Create or get a customer
|
|
29
|
+
* [trackUsage](#trackusage) - Record feature usage
|
|
30
|
+
* [attach](#attach) - Attach a plan or add-on to a customer
|
|
31
|
+
* [upgradePaidPlan](#upgradepaidplan) - Upgrade a paid plan
|
|
32
|
+
|
|
33
|
+
## publishCatalog
|
|
34
|
+
|
|
35
|
+
Publish an organization's catalog
|
|
36
|
+
|
|
37
|
+
### Example Usage
|
|
38
|
+
|
|
39
|
+
<!-- UsageSnippet language="typescript" operationID="publishCatalog" method="put" path="/v1/catalog" -->
|
|
40
|
+
```typescript
|
|
41
|
+
import ledger from "integrateledger";
|
|
42
|
+
|
|
43
|
+
const client = new ledger({
|
|
44
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
async function run() {
|
|
48
|
+
const result = await client.publishCatalog({
|
|
49
|
+
schemaVersion: 1,
|
|
50
|
+
environment: "sandbox",
|
|
51
|
+
currency: "usd",
|
|
52
|
+
plans: [
|
|
53
|
+
{
|
|
54
|
+
id: "<id>",
|
|
55
|
+
name: "<value>",
|
|
56
|
+
monthlyCredits: 864590,
|
|
57
|
+
monthlyPriceCents: 443804,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
features: [
|
|
61
|
+
{
|
|
62
|
+
id: "<id>",
|
|
63
|
+
name: "<value>",
|
|
64
|
+
creditCost: 654459,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
addOns: [
|
|
68
|
+
{
|
|
69
|
+
id: "<id>",
|
|
70
|
+
name: "<value>",
|
|
71
|
+
type: "credit_pack",
|
|
72
|
+
creditAmount: 345711,
|
|
73
|
+
priceCents: 305112,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
policy: {
|
|
77
|
+
onInsufficientCredits: "block",
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
console.log(result);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
run();
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Standalone function
|
|
88
|
+
|
|
89
|
+
The standalone function version of this method:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
93
|
+
import { publishCatalog } from "integrateledger/funcs/publish-catalog.js";
|
|
94
|
+
|
|
95
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
96
|
+
// You can create one instance of it to use across an application.
|
|
97
|
+
const ledger = new LedgerCore({
|
|
98
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
async function run() {
|
|
102
|
+
const res = await publishCatalog(ledger, {
|
|
103
|
+
schemaVersion: 1,
|
|
104
|
+
environment: "sandbox",
|
|
105
|
+
currency: "usd",
|
|
106
|
+
plans: [
|
|
107
|
+
{
|
|
108
|
+
id: "<id>",
|
|
109
|
+
name: "<value>",
|
|
110
|
+
monthlyCredits: 864590,
|
|
111
|
+
monthlyPriceCents: 443804,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
features: [
|
|
115
|
+
{
|
|
116
|
+
id: "<id>",
|
|
117
|
+
name: "<value>",
|
|
118
|
+
creditCost: 654459,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
addOns: [
|
|
122
|
+
{
|
|
123
|
+
id: "<id>",
|
|
124
|
+
name: "<value>",
|
|
125
|
+
type: "credit_pack",
|
|
126
|
+
creditAmount: 345711,
|
|
127
|
+
priceCents: 305112,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
policy: {
|
|
131
|
+
onInsufficientCredits: "block",
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
if (res.ok) {
|
|
135
|
+
const { value: result } = res;
|
|
136
|
+
console.log(result);
|
|
137
|
+
} else {
|
|
138
|
+
console.log("publishCatalog failed:", res.error);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
run();
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
| Parameter | Type | Required | Description |
|
|
148
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
149
|
+
| `request` | [models.CatalogInput](../../models/catalog-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
150
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
151
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
152
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
153
|
+
|
|
154
|
+
### Response
|
|
155
|
+
|
|
156
|
+
**Promise\<[models.CatalogPublishResponse](../../models/catalog-publish-response.md)\>**
|
|
157
|
+
|
|
158
|
+
### Errors
|
|
159
|
+
|
|
160
|
+
| Error Type | Status Code | Content Type |
|
|
161
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
162
|
+
| errors.CatalogError | 400, 401, 409 | application/json |
|
|
163
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
164
|
+
|
|
165
|
+
## listFeatures
|
|
166
|
+
|
|
167
|
+
List active features
|
|
168
|
+
|
|
169
|
+
### Example Usage
|
|
170
|
+
|
|
171
|
+
<!-- UsageSnippet language="typescript" operationID="listFeatures" method="get" path="/v1/features" -->
|
|
172
|
+
```typescript
|
|
173
|
+
import ledger from "integrateledger";
|
|
174
|
+
|
|
175
|
+
const client = new ledger({
|
|
176
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
async function run() {
|
|
180
|
+
const result = await client.listFeatures();
|
|
181
|
+
|
|
182
|
+
console.log(result);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
run();
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### Standalone function
|
|
189
|
+
|
|
190
|
+
The standalone function version of this method:
|
|
191
|
+
|
|
192
|
+
```typescript
|
|
193
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
194
|
+
import { listFeatures } from "integrateledger/funcs/list-features.js";
|
|
195
|
+
|
|
196
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
197
|
+
// You can create one instance of it to use across an application.
|
|
198
|
+
const ledger = new LedgerCore({
|
|
199
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
async function run() {
|
|
203
|
+
const res = await listFeatures(ledger);
|
|
204
|
+
if (res.ok) {
|
|
205
|
+
const { value: result } = res;
|
|
206
|
+
console.log(result);
|
|
207
|
+
} else {
|
|
208
|
+
console.log("listFeatures failed:", res.error);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
run();
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
| Parameter | Type | Required | Description |
|
|
218
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
219
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
220
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
221
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
222
|
+
|
|
223
|
+
### Response
|
|
224
|
+
|
|
225
|
+
**Promise\<[models.FeatureList](../../models/feature-list.md)\>**
|
|
226
|
+
|
|
227
|
+
### Errors
|
|
228
|
+
|
|
229
|
+
| Error Type | Status Code | Content Type |
|
|
230
|
+
| ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
|
231
|
+
| errors.ListFeaturesUnauthorizedError | 401 | application/json |
|
|
232
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
233
|
+
|
|
234
|
+
## createFeature
|
|
235
|
+
|
|
236
|
+
Create a feature
|
|
237
|
+
|
|
238
|
+
### Example Usage
|
|
239
|
+
|
|
240
|
+
<!-- UsageSnippet language="typescript" operationID="createFeature" method="post" path="/v1/features" -->
|
|
241
|
+
```typescript
|
|
242
|
+
import ledger from "integrateledger";
|
|
243
|
+
|
|
244
|
+
const client = new ledger({
|
|
245
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
246
|
+
});
|
|
247
|
+
|
|
248
|
+
async function run() {
|
|
249
|
+
const result = await client.createFeature({
|
|
250
|
+
id: "<id>",
|
|
251
|
+
name: "<value>",
|
|
252
|
+
creditCost: 627189,
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
console.log(result);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
run();
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Standalone function
|
|
262
|
+
|
|
263
|
+
The standalone function version of this method:
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
267
|
+
import { createFeature } from "integrateledger/funcs/create-feature.js";
|
|
268
|
+
|
|
269
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
270
|
+
// You can create one instance of it to use across an application.
|
|
271
|
+
const ledger = new LedgerCore({
|
|
272
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
async function run() {
|
|
276
|
+
const res = await createFeature(ledger, {
|
|
277
|
+
id: "<id>",
|
|
278
|
+
name: "<value>",
|
|
279
|
+
creditCost: 627189,
|
|
280
|
+
});
|
|
281
|
+
if (res.ok) {
|
|
282
|
+
const { value: result } = res;
|
|
283
|
+
console.log(result);
|
|
284
|
+
} else {
|
|
285
|
+
console.log("createFeature failed:", res.error);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
run();
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Parameters
|
|
293
|
+
|
|
294
|
+
| Parameter | Type | Required | Description |
|
|
295
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
296
|
+
| `request` | [models.CreateFeatureInput](../../models/create-feature-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
297
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
298
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
299
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
300
|
+
|
|
301
|
+
### Response
|
|
302
|
+
|
|
303
|
+
**Promise\<[models.FeatureMutation](../../models/feature-mutation.md)\>**
|
|
304
|
+
|
|
305
|
+
### Errors
|
|
306
|
+
|
|
307
|
+
| Error Type | Status Code | Content Type |
|
|
308
|
+
| ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
|
309
|
+
| errors.CreateFeatureBadRequestError | 400 | application/json |
|
|
310
|
+
| errors.CreateFeatureUnauthorizedError | 401 | application/json |
|
|
311
|
+
| errors.CreateFeatureConflictError | 409 | application/json |
|
|
312
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
313
|
+
|
|
314
|
+
## getFeature
|
|
315
|
+
|
|
316
|
+
Get a feature
|
|
317
|
+
|
|
318
|
+
### Example Usage
|
|
319
|
+
|
|
320
|
+
<!-- UsageSnippet language="typescript" operationID="getFeature" method="get" path="/v1/features/{id}" -->
|
|
321
|
+
```typescript
|
|
322
|
+
import ledger from "integrateledger";
|
|
323
|
+
|
|
324
|
+
const client = new ledger({
|
|
325
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
async function run() {
|
|
329
|
+
const result = await client.getFeature({
|
|
330
|
+
id: "<id>",
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
console.log(result);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
run();
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
### Standalone function
|
|
340
|
+
|
|
341
|
+
The standalone function version of this method:
|
|
342
|
+
|
|
343
|
+
```typescript
|
|
344
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
345
|
+
import { getFeature } from "integrateledger/funcs/get-feature.js";
|
|
346
|
+
|
|
347
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
348
|
+
// You can create one instance of it to use across an application.
|
|
349
|
+
const ledger = new LedgerCore({
|
|
350
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
async function run() {
|
|
354
|
+
const res = await getFeature(ledger, {
|
|
355
|
+
id: "<id>",
|
|
356
|
+
});
|
|
357
|
+
if (res.ok) {
|
|
358
|
+
const { value: result } = res;
|
|
359
|
+
console.log(result);
|
|
360
|
+
} else {
|
|
361
|
+
console.log("getFeature failed:", res.error);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
run();
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Parameters
|
|
369
|
+
|
|
370
|
+
| Parameter | Type | Required | Description |
|
|
371
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
372
|
+
| `request` | [operations.GetFeatureRequest](../../models/operations/get-feature-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
373
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
374
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
375
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
376
|
+
|
|
377
|
+
### Response
|
|
378
|
+
|
|
379
|
+
**Promise\<[models.FeatureItem](../../models/feature-item.md)\>**
|
|
380
|
+
|
|
381
|
+
### Errors
|
|
382
|
+
|
|
383
|
+
| Error Type | Status Code | Content Type |
|
|
384
|
+
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
385
|
+
| errors.GetFeatureBadRequestError | 400 | application/json |
|
|
386
|
+
| errors.GetFeatureUnauthorizedError | 401 | application/json |
|
|
387
|
+
| errors.GetFeatureNotFoundError | 404 | application/json |
|
|
388
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
389
|
+
|
|
390
|
+
## updateFeature
|
|
391
|
+
|
|
392
|
+
Update a feature
|
|
393
|
+
|
|
394
|
+
### Example Usage
|
|
395
|
+
|
|
396
|
+
<!-- UsageSnippet language="typescript" operationID="updateFeature" method="put" path="/v1/features/{id}" -->
|
|
397
|
+
```typescript
|
|
398
|
+
import ledger from "integrateledger";
|
|
399
|
+
|
|
400
|
+
const client = new ledger({
|
|
401
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
402
|
+
});
|
|
403
|
+
|
|
404
|
+
async function run() {
|
|
405
|
+
const result = await client.updateFeature({
|
|
406
|
+
id: "<id>",
|
|
407
|
+
body: {
|
|
408
|
+
name: "<value>",
|
|
409
|
+
creditCost: 810971,
|
|
410
|
+
},
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
console.log(result);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
run();
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Standalone function
|
|
420
|
+
|
|
421
|
+
The standalone function version of this method:
|
|
422
|
+
|
|
423
|
+
```typescript
|
|
424
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
425
|
+
import { updateFeature } from "integrateledger/funcs/update-feature.js";
|
|
426
|
+
|
|
427
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
428
|
+
// You can create one instance of it to use across an application.
|
|
429
|
+
const ledger = new LedgerCore({
|
|
430
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
async function run() {
|
|
434
|
+
const res = await updateFeature(ledger, {
|
|
435
|
+
id: "<id>",
|
|
436
|
+
body: {
|
|
437
|
+
name: "<value>",
|
|
438
|
+
creditCost: 810971,
|
|
439
|
+
},
|
|
440
|
+
});
|
|
441
|
+
if (res.ok) {
|
|
442
|
+
const { value: result } = res;
|
|
443
|
+
console.log(result);
|
|
444
|
+
} else {
|
|
445
|
+
console.log("updateFeature failed:", res.error);
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
run();
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### Parameters
|
|
453
|
+
|
|
454
|
+
| Parameter | Type | Required | Description |
|
|
455
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
456
|
+
| `request` | [operations.UpdateFeatureRequest](../../models/operations/update-feature-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
457
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
458
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
459
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
460
|
+
|
|
461
|
+
### Response
|
|
462
|
+
|
|
463
|
+
**Promise\<[models.FeatureMutation](../../models/feature-mutation.md)\>**
|
|
464
|
+
|
|
465
|
+
### Errors
|
|
466
|
+
|
|
467
|
+
| Error Type | Status Code | Content Type |
|
|
468
|
+
| ------------------------------------- | ------------------------------------- | ------------------------------------- |
|
|
469
|
+
| errors.UpdateFeatureBadRequestError | 400 | application/json |
|
|
470
|
+
| errors.UpdateFeatureUnauthorizedError | 401 | application/json |
|
|
471
|
+
| errors.UpdateFeatureNotFoundError | 404 | application/json |
|
|
472
|
+
| errors.UpdateFeatureConflictError | 409 | application/json |
|
|
473
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
474
|
+
|
|
475
|
+
## archiveFeature
|
|
476
|
+
|
|
477
|
+
Archive a feature
|
|
478
|
+
|
|
479
|
+
### Example Usage
|
|
480
|
+
|
|
481
|
+
<!-- UsageSnippet language="typescript" operationID="archiveFeature" method="delete" path="/v1/features/{id}" -->
|
|
482
|
+
```typescript
|
|
483
|
+
import ledger from "integrateledger";
|
|
484
|
+
|
|
485
|
+
const client = new ledger({
|
|
486
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
async function run() {
|
|
490
|
+
const result = await client.archiveFeature({
|
|
491
|
+
id: "<id>",
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
console.log(result);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
run();
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Standalone function
|
|
501
|
+
|
|
502
|
+
The standalone function version of this method:
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
506
|
+
import { archiveFeature } from "integrateledger/funcs/archive-feature.js";
|
|
507
|
+
|
|
508
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
509
|
+
// You can create one instance of it to use across an application.
|
|
510
|
+
const ledger = new LedgerCore({
|
|
511
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
512
|
+
});
|
|
513
|
+
|
|
514
|
+
async function run() {
|
|
515
|
+
const res = await archiveFeature(ledger, {
|
|
516
|
+
id: "<id>",
|
|
517
|
+
});
|
|
518
|
+
if (res.ok) {
|
|
519
|
+
const { value: result } = res;
|
|
520
|
+
console.log(result);
|
|
521
|
+
} else {
|
|
522
|
+
console.log("archiveFeature failed:", res.error);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
run();
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
### Parameters
|
|
530
|
+
|
|
531
|
+
| Parameter | Type | Required | Description |
|
|
532
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
533
|
+
| `request` | [operations.ArchiveFeatureRequest](../../models/operations/archive-feature-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
534
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
535
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
536
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
537
|
+
|
|
538
|
+
### Response
|
|
539
|
+
|
|
540
|
+
**Promise\<[models.FeatureArchived](../../models/feature-archived.md)\>**
|
|
541
|
+
|
|
542
|
+
### Errors
|
|
543
|
+
|
|
544
|
+
| Error Type | Status Code | Content Type |
|
|
545
|
+
| -------------------------------------- | -------------------------------------- | -------------------------------------- |
|
|
546
|
+
| errors.ArchiveFeatureBadRequestError | 400 | application/json |
|
|
547
|
+
| errors.ArchiveFeatureUnauthorizedError | 401 | application/json |
|
|
548
|
+
| errors.ArchiveFeatureNotFoundError | 404 | application/json |
|
|
549
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
550
|
+
|
|
551
|
+
## listPlans
|
|
552
|
+
|
|
553
|
+
List active plans
|
|
554
|
+
|
|
555
|
+
### Example Usage
|
|
556
|
+
|
|
557
|
+
<!-- UsageSnippet language="typescript" operationID="listPlans" method="get" path="/v1/plans" -->
|
|
558
|
+
```typescript
|
|
559
|
+
import ledger from "integrateledger";
|
|
560
|
+
|
|
561
|
+
const client = new ledger({
|
|
562
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
async function run() {
|
|
566
|
+
const result = await client.listPlans();
|
|
567
|
+
|
|
568
|
+
console.log(result);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
run();
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
### Standalone function
|
|
575
|
+
|
|
576
|
+
The standalone function version of this method:
|
|
577
|
+
|
|
578
|
+
```typescript
|
|
579
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
580
|
+
import { listPlans } from "integrateledger/funcs/list-plans.js";
|
|
581
|
+
|
|
582
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
583
|
+
// You can create one instance of it to use across an application.
|
|
584
|
+
const ledger = new LedgerCore({
|
|
585
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
async function run() {
|
|
589
|
+
const res = await listPlans(ledger);
|
|
590
|
+
if (res.ok) {
|
|
591
|
+
const { value: result } = res;
|
|
592
|
+
console.log(result);
|
|
593
|
+
} else {
|
|
594
|
+
console.log("listPlans failed:", res.error);
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
run();
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Parameters
|
|
602
|
+
|
|
603
|
+
| Parameter | Type | Required | Description |
|
|
604
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
605
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
606
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
607
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
608
|
+
|
|
609
|
+
### Response
|
|
610
|
+
|
|
611
|
+
**Promise\<[models.PlanList](../../models/plan-list.md)\>**
|
|
612
|
+
|
|
613
|
+
### Errors
|
|
614
|
+
|
|
615
|
+
| Error Type | Status Code | Content Type |
|
|
616
|
+
| --------------------------------- | --------------------------------- | --------------------------------- |
|
|
617
|
+
| errors.ListPlansUnauthorizedError | 401 | application/json |
|
|
618
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
619
|
+
|
|
620
|
+
## createPlan
|
|
621
|
+
|
|
622
|
+
Create a plan
|
|
623
|
+
|
|
624
|
+
### Example Usage
|
|
625
|
+
|
|
626
|
+
<!-- UsageSnippet language="typescript" operationID="createPlan" method="post" path="/v1/plans" -->
|
|
627
|
+
```typescript
|
|
628
|
+
import ledger from "integrateledger";
|
|
629
|
+
|
|
630
|
+
const client = new ledger({
|
|
631
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
632
|
+
});
|
|
633
|
+
|
|
634
|
+
async function run() {
|
|
635
|
+
const result = await client.createPlan({
|
|
636
|
+
id: "<id>",
|
|
637
|
+
name: "<value>",
|
|
638
|
+
monthlyCredits: 465571,
|
|
639
|
+
monthlyPriceCents: 337393,
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
console.log(result);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
run();
|
|
646
|
+
```
|
|
647
|
+
|
|
648
|
+
### Standalone function
|
|
649
|
+
|
|
650
|
+
The standalone function version of this method:
|
|
651
|
+
|
|
652
|
+
```typescript
|
|
653
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
654
|
+
import { createPlan } from "integrateledger/funcs/create-plan.js";
|
|
655
|
+
|
|
656
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
657
|
+
// You can create one instance of it to use across an application.
|
|
658
|
+
const ledger = new LedgerCore({
|
|
659
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
async function run() {
|
|
663
|
+
const res = await createPlan(ledger, {
|
|
664
|
+
id: "<id>",
|
|
665
|
+
name: "<value>",
|
|
666
|
+
monthlyCredits: 465571,
|
|
667
|
+
monthlyPriceCents: 337393,
|
|
668
|
+
});
|
|
669
|
+
if (res.ok) {
|
|
670
|
+
const { value: result } = res;
|
|
671
|
+
console.log(result);
|
|
672
|
+
} else {
|
|
673
|
+
console.log("createPlan failed:", res.error);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
run();
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
### Parameters
|
|
681
|
+
|
|
682
|
+
| Parameter | Type | Required | Description |
|
|
683
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
684
|
+
| `request` | [models.CreatePlanInput](../../models/create-plan-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
685
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
686
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
687
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
688
|
+
|
|
689
|
+
### Response
|
|
690
|
+
|
|
691
|
+
**Promise\<[models.PlanMutation](../../models/plan-mutation.md)\>**
|
|
692
|
+
|
|
693
|
+
### Errors
|
|
694
|
+
|
|
695
|
+
| Error Type | Status Code | Content Type |
|
|
696
|
+
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
697
|
+
| errors.CreatePlanBadRequestError | 400 | application/json |
|
|
698
|
+
| errors.CreatePlanUnauthorizedError | 401 | application/json |
|
|
699
|
+
| errors.CreatePlanConflictError | 409 | application/json |
|
|
700
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
701
|
+
|
|
702
|
+
## getPlan
|
|
703
|
+
|
|
704
|
+
Get a plan
|
|
705
|
+
|
|
706
|
+
### Example Usage
|
|
707
|
+
|
|
708
|
+
<!-- UsageSnippet language="typescript" operationID="getPlan" method="get" path="/v1/plans/{id}" -->
|
|
709
|
+
```typescript
|
|
710
|
+
import ledger from "integrateledger";
|
|
711
|
+
|
|
712
|
+
const client = new ledger({
|
|
713
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
async function run() {
|
|
717
|
+
const result = await client.getPlan({
|
|
718
|
+
id: "<id>",
|
|
719
|
+
});
|
|
720
|
+
|
|
721
|
+
console.log(result);
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
run();
|
|
725
|
+
```
|
|
726
|
+
|
|
727
|
+
### Standalone function
|
|
728
|
+
|
|
729
|
+
The standalone function version of this method:
|
|
730
|
+
|
|
731
|
+
```typescript
|
|
732
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
733
|
+
import { getPlan } from "integrateledger/funcs/get-plan.js";
|
|
734
|
+
|
|
735
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
736
|
+
// You can create one instance of it to use across an application.
|
|
737
|
+
const ledger = new LedgerCore({
|
|
738
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
739
|
+
});
|
|
740
|
+
|
|
741
|
+
async function run() {
|
|
742
|
+
const res = await getPlan(ledger, {
|
|
743
|
+
id: "<id>",
|
|
744
|
+
});
|
|
745
|
+
if (res.ok) {
|
|
746
|
+
const { value: result } = res;
|
|
747
|
+
console.log(result);
|
|
748
|
+
} else {
|
|
749
|
+
console.log("getPlan failed:", res.error);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
run();
|
|
754
|
+
```
|
|
755
|
+
|
|
756
|
+
### Parameters
|
|
757
|
+
|
|
758
|
+
| Parameter | Type | Required | Description |
|
|
759
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
760
|
+
| `request` | [operations.GetPlanRequest](../../models/operations/get-plan-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
761
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
762
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
763
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
764
|
+
|
|
765
|
+
### Response
|
|
766
|
+
|
|
767
|
+
**Promise\<[models.PlanItem](../../models/plan-item.md)\>**
|
|
768
|
+
|
|
769
|
+
### Errors
|
|
770
|
+
|
|
771
|
+
| Error Type | Status Code | Content Type |
|
|
772
|
+
| ------------------------------- | ------------------------------- | ------------------------------- |
|
|
773
|
+
| errors.GetPlanBadRequestError | 400 | application/json |
|
|
774
|
+
| errors.GetPlanUnauthorizedError | 401 | application/json |
|
|
775
|
+
| errors.GetPlanNotFoundError | 404 | application/json |
|
|
776
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
777
|
+
|
|
778
|
+
## updatePlan
|
|
779
|
+
|
|
780
|
+
Update a plan
|
|
781
|
+
|
|
782
|
+
### Example Usage
|
|
783
|
+
|
|
784
|
+
<!-- UsageSnippet language="typescript" operationID="updatePlan" method="put" path="/v1/plans/{id}" -->
|
|
785
|
+
```typescript
|
|
786
|
+
import ledger from "integrateledger";
|
|
787
|
+
|
|
788
|
+
const client = new ledger({
|
|
789
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
790
|
+
});
|
|
791
|
+
|
|
792
|
+
async function run() {
|
|
793
|
+
const result = await client.updatePlan({
|
|
794
|
+
id: "<id>",
|
|
795
|
+
body: {
|
|
796
|
+
name: "<value>",
|
|
797
|
+
monthlyCredits: 384443,
|
|
798
|
+
monthlyPriceCents: 16485,
|
|
799
|
+
},
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
console.log(result);
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
run();
|
|
806
|
+
```
|
|
807
|
+
|
|
808
|
+
### Standalone function
|
|
809
|
+
|
|
810
|
+
The standalone function version of this method:
|
|
811
|
+
|
|
812
|
+
```typescript
|
|
813
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
814
|
+
import { updatePlan } from "integrateledger/funcs/update-plan.js";
|
|
815
|
+
|
|
816
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
817
|
+
// You can create one instance of it to use across an application.
|
|
818
|
+
const ledger = new LedgerCore({
|
|
819
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
820
|
+
});
|
|
821
|
+
|
|
822
|
+
async function run() {
|
|
823
|
+
const res = await updatePlan(ledger, {
|
|
824
|
+
id: "<id>",
|
|
825
|
+
body: {
|
|
826
|
+
name: "<value>",
|
|
827
|
+
monthlyCredits: 384443,
|
|
828
|
+
monthlyPriceCents: 16485,
|
|
829
|
+
},
|
|
830
|
+
});
|
|
831
|
+
if (res.ok) {
|
|
832
|
+
const { value: result } = res;
|
|
833
|
+
console.log(result);
|
|
834
|
+
} else {
|
|
835
|
+
console.log("updatePlan failed:", res.error);
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
run();
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
### Parameters
|
|
843
|
+
|
|
844
|
+
| Parameter | Type | Required | Description |
|
|
845
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
846
|
+
| `request` | [operations.UpdatePlanRequest](../../models/operations/update-plan-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
847
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
848
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
849
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
850
|
+
|
|
851
|
+
### Response
|
|
852
|
+
|
|
853
|
+
**Promise\<[models.PlanMutation](../../models/plan-mutation.md)\>**
|
|
854
|
+
|
|
855
|
+
### Errors
|
|
856
|
+
|
|
857
|
+
| Error Type | Status Code | Content Type |
|
|
858
|
+
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
859
|
+
| errors.UpdatePlanBadRequestError | 400 | application/json |
|
|
860
|
+
| errors.UpdatePlanUnauthorizedError | 401 | application/json |
|
|
861
|
+
| errors.UpdatePlanNotFoundError | 404 | application/json |
|
|
862
|
+
| errors.UpdatePlanConflictError | 409 | application/json |
|
|
863
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
864
|
+
|
|
865
|
+
## archivePlan
|
|
866
|
+
|
|
867
|
+
Archive a plan
|
|
868
|
+
|
|
869
|
+
### Example Usage
|
|
870
|
+
|
|
871
|
+
<!-- UsageSnippet language="typescript" operationID="archivePlan" method="delete" path="/v1/plans/{id}" -->
|
|
872
|
+
```typescript
|
|
873
|
+
import ledger from "integrateledger";
|
|
874
|
+
|
|
875
|
+
const client = new ledger({
|
|
876
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
877
|
+
});
|
|
878
|
+
|
|
879
|
+
async function run() {
|
|
880
|
+
const result = await client.archivePlan({
|
|
881
|
+
id: "<id>",
|
|
882
|
+
});
|
|
883
|
+
|
|
884
|
+
console.log(result);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
run();
|
|
888
|
+
```
|
|
889
|
+
|
|
890
|
+
### Standalone function
|
|
891
|
+
|
|
892
|
+
The standalone function version of this method:
|
|
893
|
+
|
|
894
|
+
```typescript
|
|
895
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
896
|
+
import { archivePlan } from "integrateledger/funcs/archive-plan.js";
|
|
897
|
+
|
|
898
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
899
|
+
// You can create one instance of it to use across an application.
|
|
900
|
+
const ledger = new LedgerCore({
|
|
901
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
async function run() {
|
|
905
|
+
const res = await archivePlan(ledger, {
|
|
906
|
+
id: "<id>",
|
|
907
|
+
});
|
|
908
|
+
if (res.ok) {
|
|
909
|
+
const { value: result } = res;
|
|
910
|
+
console.log(result);
|
|
911
|
+
} else {
|
|
912
|
+
console.log("archivePlan failed:", res.error);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
run();
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
### Parameters
|
|
920
|
+
|
|
921
|
+
| Parameter | Type | Required | Description |
|
|
922
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
923
|
+
| `request` | [operations.ArchivePlanRequest](../../models/operations/archive-plan-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
924
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
925
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
926
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
927
|
+
|
|
928
|
+
### Response
|
|
929
|
+
|
|
930
|
+
**Promise\<[models.PlanArchived](../../models/plan-archived.md)\>**
|
|
931
|
+
|
|
932
|
+
### Errors
|
|
933
|
+
|
|
934
|
+
| Error Type | Status Code | Content Type |
|
|
935
|
+
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
|
936
|
+
| errors.ArchivePlanBadRequestError | 400 | application/json |
|
|
937
|
+
| errors.ArchivePlanUnauthorizedError | 401 | application/json |
|
|
938
|
+
| errors.ArchivePlanNotFoundError | 404 | application/json |
|
|
939
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
940
|
+
|
|
941
|
+
## listAddOns
|
|
942
|
+
|
|
943
|
+
List active add-ons
|
|
944
|
+
|
|
945
|
+
### Example Usage
|
|
946
|
+
|
|
947
|
+
<!-- UsageSnippet language="typescript" operationID="listAddOns" method="get" path="/v1/add-ons" -->
|
|
948
|
+
```typescript
|
|
949
|
+
import ledger from "integrateledger";
|
|
950
|
+
|
|
951
|
+
const client = new ledger({
|
|
952
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
async function run() {
|
|
956
|
+
const result = await client.listAddOns();
|
|
957
|
+
|
|
958
|
+
console.log(result);
|
|
959
|
+
}
|
|
960
|
+
|
|
961
|
+
run();
|
|
962
|
+
```
|
|
963
|
+
|
|
964
|
+
### Standalone function
|
|
965
|
+
|
|
966
|
+
The standalone function version of this method:
|
|
967
|
+
|
|
968
|
+
```typescript
|
|
969
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
970
|
+
import { listAddOns } from "integrateledger/funcs/list-add-ons.js";
|
|
971
|
+
|
|
972
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
973
|
+
// You can create one instance of it to use across an application.
|
|
974
|
+
const ledger = new LedgerCore({
|
|
975
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
976
|
+
});
|
|
977
|
+
|
|
978
|
+
async function run() {
|
|
979
|
+
const res = await listAddOns(ledger);
|
|
980
|
+
if (res.ok) {
|
|
981
|
+
const { value: result } = res;
|
|
982
|
+
console.log(result);
|
|
983
|
+
} else {
|
|
984
|
+
console.log("listAddOns failed:", res.error);
|
|
985
|
+
}
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
run();
|
|
989
|
+
```
|
|
990
|
+
|
|
991
|
+
### Parameters
|
|
992
|
+
|
|
993
|
+
| Parameter | Type | Required | Description |
|
|
994
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
995
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
996
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
997
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
998
|
+
|
|
999
|
+
### Response
|
|
1000
|
+
|
|
1001
|
+
**Promise\<[models.AddOnList](../../models/add-on-list.md)\>**
|
|
1002
|
+
|
|
1003
|
+
### Errors
|
|
1004
|
+
|
|
1005
|
+
| Error Type | Status Code | Content Type |
|
|
1006
|
+
| ---------------------------------- | ---------------------------------- | ---------------------------------- |
|
|
1007
|
+
| errors.ListAddOnsUnauthorizedError | 401 | application/json |
|
|
1008
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1009
|
+
|
|
1010
|
+
## createAddOn
|
|
1011
|
+
|
|
1012
|
+
Create an add-on
|
|
1013
|
+
|
|
1014
|
+
### Example Usage
|
|
1015
|
+
|
|
1016
|
+
<!-- UsageSnippet language="typescript" operationID="createAddOn" method="post" path="/v1/add-ons" -->
|
|
1017
|
+
```typescript
|
|
1018
|
+
import ledger from "integrateledger";
|
|
1019
|
+
|
|
1020
|
+
const client = new ledger({
|
|
1021
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1022
|
+
});
|
|
1023
|
+
|
|
1024
|
+
async function run() {
|
|
1025
|
+
const result = await client.createAddOn({
|
|
1026
|
+
id: "<id>",
|
|
1027
|
+
name: "<value>",
|
|
1028
|
+
type: "credit_pack",
|
|
1029
|
+
creditAmount: 455680,
|
|
1030
|
+
priceCents: 206146,
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
console.log(result);
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
run();
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
### Standalone function
|
|
1040
|
+
|
|
1041
|
+
The standalone function version of this method:
|
|
1042
|
+
|
|
1043
|
+
```typescript
|
|
1044
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1045
|
+
import { createAddOn } from "integrateledger/funcs/create-add-on.js";
|
|
1046
|
+
|
|
1047
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1048
|
+
// You can create one instance of it to use across an application.
|
|
1049
|
+
const ledger = new LedgerCore({
|
|
1050
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
async function run() {
|
|
1054
|
+
const res = await createAddOn(ledger, {
|
|
1055
|
+
id: "<id>",
|
|
1056
|
+
name: "<value>",
|
|
1057
|
+
type: "credit_pack",
|
|
1058
|
+
creditAmount: 455680,
|
|
1059
|
+
priceCents: 206146,
|
|
1060
|
+
});
|
|
1061
|
+
if (res.ok) {
|
|
1062
|
+
const { value: result } = res;
|
|
1063
|
+
console.log(result);
|
|
1064
|
+
} else {
|
|
1065
|
+
console.log("createAddOn failed:", res.error);
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
run();
|
|
1070
|
+
```
|
|
1071
|
+
|
|
1072
|
+
### Parameters
|
|
1073
|
+
|
|
1074
|
+
| Parameter | Type | Required | Description |
|
|
1075
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1076
|
+
| `request` | [models.CreateAddOnInput](../../models/create-add-on-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1077
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1078
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1079
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1080
|
+
|
|
1081
|
+
### Response
|
|
1082
|
+
|
|
1083
|
+
**Promise\<[models.AddOnMutation](../../models/add-on-mutation.md)\>**
|
|
1084
|
+
|
|
1085
|
+
### Errors
|
|
1086
|
+
|
|
1087
|
+
| Error Type | Status Code | Content Type |
|
|
1088
|
+
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
|
1089
|
+
| errors.CreateAddOnBadRequestError | 400 | application/json |
|
|
1090
|
+
| errors.CreateAddOnUnauthorizedError | 401 | application/json |
|
|
1091
|
+
| errors.CreateAddOnConflictError | 409 | application/json |
|
|
1092
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1093
|
+
|
|
1094
|
+
## getAddOn
|
|
1095
|
+
|
|
1096
|
+
Get an add-on
|
|
1097
|
+
|
|
1098
|
+
### Example Usage
|
|
1099
|
+
|
|
1100
|
+
<!-- UsageSnippet language="typescript" operationID="getAddOn" method="get" path="/v1/add-ons/{id}" -->
|
|
1101
|
+
```typescript
|
|
1102
|
+
import ledger from "integrateledger";
|
|
1103
|
+
|
|
1104
|
+
const client = new ledger({
|
|
1105
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1106
|
+
});
|
|
1107
|
+
|
|
1108
|
+
async function run() {
|
|
1109
|
+
const result = await client.getAddOn({
|
|
1110
|
+
id: "<id>",
|
|
1111
|
+
});
|
|
1112
|
+
|
|
1113
|
+
console.log(result);
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
run();
|
|
1117
|
+
```
|
|
1118
|
+
|
|
1119
|
+
### Standalone function
|
|
1120
|
+
|
|
1121
|
+
The standalone function version of this method:
|
|
1122
|
+
|
|
1123
|
+
```typescript
|
|
1124
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1125
|
+
import { getAddOn } from "integrateledger/funcs/get-add-on.js";
|
|
1126
|
+
|
|
1127
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1128
|
+
// You can create one instance of it to use across an application.
|
|
1129
|
+
const ledger = new LedgerCore({
|
|
1130
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1131
|
+
});
|
|
1132
|
+
|
|
1133
|
+
async function run() {
|
|
1134
|
+
const res = await getAddOn(ledger, {
|
|
1135
|
+
id: "<id>",
|
|
1136
|
+
});
|
|
1137
|
+
if (res.ok) {
|
|
1138
|
+
const { value: result } = res;
|
|
1139
|
+
console.log(result);
|
|
1140
|
+
} else {
|
|
1141
|
+
console.log("getAddOn failed:", res.error);
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
run();
|
|
1146
|
+
```
|
|
1147
|
+
|
|
1148
|
+
### Parameters
|
|
1149
|
+
|
|
1150
|
+
| Parameter | Type | Required | Description |
|
|
1151
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1152
|
+
| `request` | [operations.GetAddOnRequest](../../models/operations/get-add-on-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1153
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1154
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1155
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1156
|
+
|
|
1157
|
+
### Response
|
|
1158
|
+
|
|
1159
|
+
**Promise\<[models.AddOnItem](../../models/add-on-item.md)\>**
|
|
1160
|
+
|
|
1161
|
+
### Errors
|
|
1162
|
+
|
|
1163
|
+
| Error Type | Status Code | Content Type |
|
|
1164
|
+
| -------------------------------- | -------------------------------- | -------------------------------- |
|
|
1165
|
+
| errors.GetAddOnBadRequestError | 400 | application/json |
|
|
1166
|
+
| errors.GetAddOnUnauthorizedError | 401 | application/json |
|
|
1167
|
+
| errors.GetAddOnNotFoundError | 404 | application/json |
|
|
1168
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1169
|
+
|
|
1170
|
+
## updateAddOn
|
|
1171
|
+
|
|
1172
|
+
Update an add-on
|
|
1173
|
+
|
|
1174
|
+
### Example Usage
|
|
1175
|
+
|
|
1176
|
+
<!-- UsageSnippet language="typescript" operationID="updateAddOn" method="put" path="/v1/add-ons/{id}" -->
|
|
1177
|
+
```typescript
|
|
1178
|
+
import ledger from "integrateledger";
|
|
1179
|
+
|
|
1180
|
+
const client = new ledger({
|
|
1181
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1182
|
+
});
|
|
1183
|
+
|
|
1184
|
+
async function run() {
|
|
1185
|
+
const result = await client.updateAddOn({
|
|
1186
|
+
id: "<id>",
|
|
1187
|
+
body: {
|
|
1188
|
+
name: "<value>",
|
|
1189
|
+
type: "credit_pack",
|
|
1190
|
+
creditAmount: 526505,
|
|
1191
|
+
priceCents: 417123,
|
|
1192
|
+
},
|
|
1193
|
+
});
|
|
1194
|
+
|
|
1195
|
+
console.log(result);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
run();
|
|
1199
|
+
```
|
|
1200
|
+
|
|
1201
|
+
### Standalone function
|
|
1202
|
+
|
|
1203
|
+
The standalone function version of this method:
|
|
1204
|
+
|
|
1205
|
+
```typescript
|
|
1206
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1207
|
+
import { updateAddOn } from "integrateledger/funcs/update-add-on.js";
|
|
1208
|
+
|
|
1209
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1210
|
+
// You can create one instance of it to use across an application.
|
|
1211
|
+
const ledger = new LedgerCore({
|
|
1212
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1213
|
+
});
|
|
1214
|
+
|
|
1215
|
+
async function run() {
|
|
1216
|
+
const res = await updateAddOn(ledger, {
|
|
1217
|
+
id: "<id>",
|
|
1218
|
+
body: {
|
|
1219
|
+
name: "<value>",
|
|
1220
|
+
type: "credit_pack",
|
|
1221
|
+
creditAmount: 526505,
|
|
1222
|
+
priceCents: 417123,
|
|
1223
|
+
},
|
|
1224
|
+
});
|
|
1225
|
+
if (res.ok) {
|
|
1226
|
+
const { value: result } = res;
|
|
1227
|
+
console.log(result);
|
|
1228
|
+
} else {
|
|
1229
|
+
console.log("updateAddOn failed:", res.error);
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
run();
|
|
1234
|
+
```
|
|
1235
|
+
|
|
1236
|
+
### Parameters
|
|
1237
|
+
|
|
1238
|
+
| Parameter | Type | Required | Description |
|
|
1239
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1240
|
+
| `request` | [operations.UpdateAddOnRequest](../../models/operations/update-add-on-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1241
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1242
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1243
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1244
|
+
|
|
1245
|
+
### Response
|
|
1246
|
+
|
|
1247
|
+
**Promise\<[models.AddOnMutation](../../models/add-on-mutation.md)\>**
|
|
1248
|
+
|
|
1249
|
+
### Errors
|
|
1250
|
+
|
|
1251
|
+
| Error Type | Status Code | Content Type |
|
|
1252
|
+
| ----------------------------------- | ----------------------------------- | ----------------------------------- |
|
|
1253
|
+
| errors.UpdateAddOnBadRequestError | 400 | application/json |
|
|
1254
|
+
| errors.UpdateAddOnUnauthorizedError | 401 | application/json |
|
|
1255
|
+
| errors.UpdateAddOnNotFoundError | 404 | application/json |
|
|
1256
|
+
| errors.UpdateAddOnConflictError | 409 | application/json |
|
|
1257
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1258
|
+
|
|
1259
|
+
## archiveAddOn
|
|
1260
|
+
|
|
1261
|
+
Archive an add-on
|
|
1262
|
+
|
|
1263
|
+
### Example Usage
|
|
1264
|
+
|
|
1265
|
+
<!-- UsageSnippet language="typescript" operationID="archiveAddOn" method="delete" path="/v1/add-ons/{id}" -->
|
|
1266
|
+
```typescript
|
|
1267
|
+
import ledger from "integrateledger";
|
|
1268
|
+
|
|
1269
|
+
const client = new ledger({
|
|
1270
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1271
|
+
});
|
|
1272
|
+
|
|
1273
|
+
async function run() {
|
|
1274
|
+
const result = await client.archiveAddOn({
|
|
1275
|
+
id: "<id>",
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
console.log(result);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
run();
|
|
1282
|
+
```
|
|
1283
|
+
|
|
1284
|
+
### Standalone function
|
|
1285
|
+
|
|
1286
|
+
The standalone function version of this method:
|
|
1287
|
+
|
|
1288
|
+
```typescript
|
|
1289
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1290
|
+
import { archiveAddOn } from "integrateledger/funcs/archive-add-on.js";
|
|
1291
|
+
|
|
1292
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1293
|
+
// You can create one instance of it to use across an application.
|
|
1294
|
+
const ledger = new LedgerCore({
|
|
1295
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1296
|
+
});
|
|
1297
|
+
|
|
1298
|
+
async function run() {
|
|
1299
|
+
const res = await archiveAddOn(ledger, {
|
|
1300
|
+
id: "<id>",
|
|
1301
|
+
});
|
|
1302
|
+
if (res.ok) {
|
|
1303
|
+
const { value: result } = res;
|
|
1304
|
+
console.log(result);
|
|
1305
|
+
} else {
|
|
1306
|
+
console.log("archiveAddOn failed:", res.error);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
run();
|
|
1311
|
+
```
|
|
1312
|
+
|
|
1313
|
+
### Parameters
|
|
1314
|
+
|
|
1315
|
+
| Parameter | Type | Required | Description |
|
|
1316
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1317
|
+
| `request` | [operations.ArchiveAddOnRequest](../../models/operations/archive-add-on-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1318
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1319
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1320
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1321
|
+
|
|
1322
|
+
### Response
|
|
1323
|
+
|
|
1324
|
+
**Promise\<[models.AddOnArchived](../../models/add-on-archived.md)\>**
|
|
1325
|
+
|
|
1326
|
+
### Errors
|
|
1327
|
+
|
|
1328
|
+
| Error Type | Status Code | Content Type |
|
|
1329
|
+
| ------------------------------------ | ------------------------------------ | ------------------------------------ |
|
|
1330
|
+
| errors.ArchiveAddOnBadRequestError | 400 | application/json |
|
|
1331
|
+
| errors.ArchiveAddOnUnauthorizedError | 401 | application/json |
|
|
1332
|
+
| errors.ArchiveAddOnNotFoundError | 404 | application/json |
|
|
1333
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1334
|
+
|
|
1335
|
+
## checkCredits
|
|
1336
|
+
|
|
1337
|
+
Check a customer's available credits
|
|
1338
|
+
|
|
1339
|
+
### Example Usage
|
|
1340
|
+
|
|
1341
|
+
<!-- UsageSnippet language="typescript" operationID="checkCredits" method="post" path="/v1/check" -->
|
|
1342
|
+
```typescript
|
|
1343
|
+
import ledger from "integrateledger";
|
|
1344
|
+
|
|
1345
|
+
const client = new ledger({
|
|
1346
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1347
|
+
});
|
|
1348
|
+
|
|
1349
|
+
async function run() {
|
|
1350
|
+
const result = await client.checkCredits({
|
|
1351
|
+
customerId: "<id>",
|
|
1352
|
+
featureId: "<id>",
|
|
1353
|
+
});
|
|
1354
|
+
|
|
1355
|
+
console.log(result);
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
run();
|
|
1359
|
+
```
|
|
1360
|
+
|
|
1361
|
+
### Standalone function
|
|
1362
|
+
|
|
1363
|
+
The standalone function version of this method:
|
|
1364
|
+
|
|
1365
|
+
```typescript
|
|
1366
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1367
|
+
import { checkCredits } from "integrateledger/funcs/check-credits.js";
|
|
1368
|
+
|
|
1369
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1370
|
+
// You can create one instance of it to use across an application.
|
|
1371
|
+
const ledger = new LedgerCore({
|
|
1372
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1373
|
+
});
|
|
1374
|
+
|
|
1375
|
+
async function run() {
|
|
1376
|
+
const res = await checkCredits(ledger, {
|
|
1377
|
+
customerId: "<id>",
|
|
1378
|
+
featureId: "<id>",
|
|
1379
|
+
});
|
|
1380
|
+
if (res.ok) {
|
|
1381
|
+
const { value: result } = res;
|
|
1382
|
+
console.log(result);
|
|
1383
|
+
} else {
|
|
1384
|
+
console.log("checkCredits failed:", res.error);
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
run();
|
|
1389
|
+
```
|
|
1390
|
+
|
|
1391
|
+
### Parameters
|
|
1392
|
+
|
|
1393
|
+
| Parameter | Type | Required | Description |
|
|
1394
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1395
|
+
| `request` | [models.CheckInput](../../models/check-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1396
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1397
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1398
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1399
|
+
|
|
1400
|
+
### Response
|
|
1401
|
+
|
|
1402
|
+
**Promise\<[models.CheckResponse](../../models/check-response.md)\>**
|
|
1403
|
+
|
|
1404
|
+
### Errors
|
|
1405
|
+
|
|
1406
|
+
| Error Type | Status Code | Content Type |
|
|
1407
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1408
|
+
| errors.CheckError | 400, 401, 404 | application/json |
|
|
1409
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1410
|
+
|
|
1411
|
+
## listCustomerSubscriptions
|
|
1412
|
+
|
|
1413
|
+
List a customer's subscriptions
|
|
1414
|
+
|
|
1415
|
+
### Example Usage
|
|
1416
|
+
|
|
1417
|
+
<!-- UsageSnippet language="typescript" operationID="listCustomerSubscriptions" method="get" path="/v1/customers/subscriptions" -->
|
|
1418
|
+
```typescript
|
|
1419
|
+
import ledger from "integrateledger";
|
|
1420
|
+
|
|
1421
|
+
const client = new ledger({
|
|
1422
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1423
|
+
});
|
|
1424
|
+
|
|
1425
|
+
async function run() {
|
|
1426
|
+
const result = await client.listCustomerSubscriptions({
|
|
1427
|
+
customerId: "<id>",
|
|
1428
|
+
});
|
|
1429
|
+
|
|
1430
|
+
console.log(result);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
run();
|
|
1434
|
+
```
|
|
1435
|
+
|
|
1436
|
+
### Standalone function
|
|
1437
|
+
|
|
1438
|
+
The standalone function version of this method:
|
|
1439
|
+
|
|
1440
|
+
```typescript
|
|
1441
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1442
|
+
import { listCustomerSubscriptions } from "integrateledger/funcs/list-customer-subscriptions.js";
|
|
1443
|
+
|
|
1444
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1445
|
+
// You can create one instance of it to use across an application.
|
|
1446
|
+
const ledger = new LedgerCore({
|
|
1447
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1448
|
+
});
|
|
1449
|
+
|
|
1450
|
+
async function run() {
|
|
1451
|
+
const res = await listCustomerSubscriptions(ledger, {
|
|
1452
|
+
customerId: "<id>",
|
|
1453
|
+
});
|
|
1454
|
+
if (res.ok) {
|
|
1455
|
+
const { value: result } = res;
|
|
1456
|
+
console.log(result);
|
|
1457
|
+
} else {
|
|
1458
|
+
console.log("listCustomerSubscriptions failed:", res.error);
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
run();
|
|
1463
|
+
```
|
|
1464
|
+
|
|
1465
|
+
### Parameters
|
|
1466
|
+
|
|
1467
|
+
| Parameter | Type | Required | Description |
|
|
1468
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1469
|
+
| `request` | [operations.ListCustomerSubscriptionsRequest](../../models/operations/list-customer-subscriptions-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1470
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1471
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1472
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1473
|
+
|
|
1474
|
+
### Response
|
|
1475
|
+
|
|
1476
|
+
**Promise\<[models.CustomerSubscriptionPage](../../models/customer-subscription-page.md)\>**
|
|
1477
|
+
|
|
1478
|
+
### Errors
|
|
1479
|
+
|
|
1480
|
+
| Error Type | Status Code | Content Type |
|
|
1481
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1482
|
+
| errors.CustomerError | 400, 401, 404 | application/json |
|
|
1483
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1484
|
+
|
|
1485
|
+
## listCustomerPurchases
|
|
1486
|
+
|
|
1487
|
+
List a customer's credit-pack purchases
|
|
1488
|
+
|
|
1489
|
+
### Example Usage
|
|
1490
|
+
|
|
1491
|
+
<!-- UsageSnippet language="typescript" operationID="listCustomerPurchases" method="get" path="/v1/customers/purchases" -->
|
|
1492
|
+
```typescript
|
|
1493
|
+
import ledger from "integrateledger";
|
|
1494
|
+
|
|
1495
|
+
const client = new ledger({
|
|
1496
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1497
|
+
});
|
|
1498
|
+
|
|
1499
|
+
async function run() {
|
|
1500
|
+
const result = await client.listCustomerPurchases({
|
|
1501
|
+
customerId: "<id>",
|
|
1502
|
+
});
|
|
1503
|
+
|
|
1504
|
+
console.log(result);
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
run();
|
|
1508
|
+
```
|
|
1509
|
+
|
|
1510
|
+
### Standalone function
|
|
1511
|
+
|
|
1512
|
+
The standalone function version of this method:
|
|
1513
|
+
|
|
1514
|
+
```typescript
|
|
1515
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1516
|
+
import { listCustomerPurchases } from "integrateledger/funcs/list-customer-purchases.js";
|
|
1517
|
+
|
|
1518
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1519
|
+
// You can create one instance of it to use across an application.
|
|
1520
|
+
const ledger = new LedgerCore({
|
|
1521
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1522
|
+
});
|
|
1523
|
+
|
|
1524
|
+
async function run() {
|
|
1525
|
+
const res = await listCustomerPurchases(ledger, {
|
|
1526
|
+
customerId: "<id>",
|
|
1527
|
+
});
|
|
1528
|
+
if (res.ok) {
|
|
1529
|
+
const { value: result } = res;
|
|
1530
|
+
console.log(result);
|
|
1531
|
+
} else {
|
|
1532
|
+
console.log("listCustomerPurchases failed:", res.error);
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
run();
|
|
1537
|
+
```
|
|
1538
|
+
|
|
1539
|
+
### Parameters
|
|
1540
|
+
|
|
1541
|
+
| Parameter | Type | Required | Description |
|
|
1542
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1543
|
+
| `request` | [operations.ListCustomerPurchasesRequest](../../models/operations/list-customer-purchases-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1544
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1545
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1546
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1547
|
+
|
|
1548
|
+
### Response
|
|
1549
|
+
|
|
1550
|
+
**Promise\<[models.CustomerPurchasePage](../../models/customer-purchase-page.md)\>**
|
|
1551
|
+
|
|
1552
|
+
### Errors
|
|
1553
|
+
|
|
1554
|
+
| Error Type | Status Code | Content Type |
|
|
1555
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1556
|
+
| errors.CustomerError | 400, 401, 404 | application/json |
|
|
1557
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1558
|
+
|
|
1559
|
+
## setSubscriptionCancellation
|
|
1560
|
+
|
|
1561
|
+
Stop or resume a paid subscription's renewal
|
|
1562
|
+
|
|
1563
|
+
### Example Usage
|
|
1564
|
+
|
|
1565
|
+
<!-- UsageSnippet language="typescript" operationID="setSubscriptionCancellation" method="put" path="/v1/customers/subscriptions/{subscriptionId}/cancellation" -->
|
|
1566
|
+
```typescript
|
|
1567
|
+
import ledger from "integrateledger";
|
|
1568
|
+
|
|
1569
|
+
const client = new ledger({
|
|
1570
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1571
|
+
});
|
|
1572
|
+
|
|
1573
|
+
async function run() {
|
|
1574
|
+
const result = await client.setSubscriptionCancellation({
|
|
1575
|
+
subscriptionId: 597065,
|
|
1576
|
+
customerId: "<id>",
|
|
1577
|
+
body: {
|
|
1578
|
+
cancelAtPeriodEnd: false,
|
|
1579
|
+
},
|
|
1580
|
+
});
|
|
1581
|
+
|
|
1582
|
+
console.log(result);
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
run();
|
|
1586
|
+
```
|
|
1587
|
+
|
|
1588
|
+
### Standalone function
|
|
1589
|
+
|
|
1590
|
+
The standalone function version of this method:
|
|
1591
|
+
|
|
1592
|
+
```typescript
|
|
1593
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1594
|
+
import { setSubscriptionCancellation } from "integrateledger/funcs/set-subscription-cancellation.js";
|
|
1595
|
+
|
|
1596
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1597
|
+
// You can create one instance of it to use across an application.
|
|
1598
|
+
const ledger = new LedgerCore({
|
|
1599
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1600
|
+
});
|
|
1601
|
+
|
|
1602
|
+
async function run() {
|
|
1603
|
+
const res = await setSubscriptionCancellation(ledger, {
|
|
1604
|
+
subscriptionId: 597065,
|
|
1605
|
+
customerId: "<id>",
|
|
1606
|
+
body: {
|
|
1607
|
+
cancelAtPeriodEnd: false,
|
|
1608
|
+
},
|
|
1609
|
+
});
|
|
1610
|
+
if (res.ok) {
|
|
1611
|
+
const { value: result } = res;
|
|
1612
|
+
console.log(result);
|
|
1613
|
+
} else {
|
|
1614
|
+
console.log("setSubscriptionCancellation failed:", res.error);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
run();
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
### Parameters
|
|
1622
|
+
|
|
1623
|
+
| Parameter | Type | Required | Description |
|
|
1624
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1625
|
+
| `request` | [operations.SetSubscriptionCancellationRequest](../../models/operations/set-subscription-cancellation-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1626
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1627
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1628
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1629
|
+
|
|
1630
|
+
### Response
|
|
1631
|
+
|
|
1632
|
+
**Promise\<[models.UpdateCustomerSubscriptionCancellationResponse](../../models/update-customer-subscription-cancellation-response.md)\>**
|
|
1633
|
+
|
|
1634
|
+
### Errors
|
|
1635
|
+
|
|
1636
|
+
| Error Type | Status Code | Content Type |
|
|
1637
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1638
|
+
| errors.CustomerError | 400, 401, 404, 409, 422 | application/json |
|
|
1639
|
+
| errors.CustomerError | 502 | application/json |
|
|
1640
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1641
|
+
|
|
1642
|
+
## getCustomer
|
|
1643
|
+
|
|
1644
|
+
Get a customer and current balance
|
|
1645
|
+
|
|
1646
|
+
### Example Usage
|
|
1647
|
+
|
|
1648
|
+
<!-- UsageSnippet language="typescript" operationID="getCustomer" method="get" path="/v1/customers" -->
|
|
1649
|
+
```typescript
|
|
1650
|
+
import ledger from "integrateledger";
|
|
1651
|
+
|
|
1652
|
+
const client = new ledger({
|
|
1653
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1654
|
+
});
|
|
1655
|
+
|
|
1656
|
+
async function run() {
|
|
1657
|
+
const result = await client.getCustomer({
|
|
1658
|
+
customerId: "<id>",
|
|
1659
|
+
});
|
|
1660
|
+
|
|
1661
|
+
console.log(result);
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
run();
|
|
1665
|
+
```
|
|
1666
|
+
|
|
1667
|
+
### Standalone function
|
|
1668
|
+
|
|
1669
|
+
The standalone function version of this method:
|
|
1670
|
+
|
|
1671
|
+
```typescript
|
|
1672
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1673
|
+
import { getCustomer } from "integrateledger/funcs/get-customer.js";
|
|
1674
|
+
|
|
1675
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1676
|
+
// You can create one instance of it to use across an application.
|
|
1677
|
+
const ledger = new LedgerCore({
|
|
1678
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1679
|
+
});
|
|
1680
|
+
|
|
1681
|
+
async function run() {
|
|
1682
|
+
const res = await getCustomer(ledger, {
|
|
1683
|
+
customerId: "<id>",
|
|
1684
|
+
});
|
|
1685
|
+
if (res.ok) {
|
|
1686
|
+
const { value: result } = res;
|
|
1687
|
+
console.log(result);
|
|
1688
|
+
} else {
|
|
1689
|
+
console.log("getCustomer failed:", res.error);
|
|
1690
|
+
}
|
|
1691
|
+
}
|
|
1692
|
+
|
|
1693
|
+
run();
|
|
1694
|
+
```
|
|
1695
|
+
|
|
1696
|
+
### Parameters
|
|
1697
|
+
|
|
1698
|
+
| Parameter | Type | Required | Description |
|
|
1699
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1700
|
+
| `request` | [operations.GetCustomerRequest](../../models/operations/get-customer-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1701
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1702
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1703
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1704
|
+
|
|
1705
|
+
### Response
|
|
1706
|
+
|
|
1707
|
+
**Promise\<[models.CustomerDetail](../../models/customer-detail.md)\>**
|
|
1708
|
+
|
|
1709
|
+
### Errors
|
|
1710
|
+
|
|
1711
|
+
| Error Type | Status Code | Content Type |
|
|
1712
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1713
|
+
| errors.CustomerError | 400, 401, 404 | application/json |
|
|
1714
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1715
|
+
|
|
1716
|
+
## createOrGetCustomer
|
|
1717
|
+
|
|
1718
|
+
Create or get a customer
|
|
1719
|
+
|
|
1720
|
+
### Example Usage
|
|
1721
|
+
|
|
1722
|
+
<!-- UsageSnippet language="typescript" operationID="createOrGetCustomer" method="post" path="/v1/customers" -->
|
|
1723
|
+
```typescript
|
|
1724
|
+
import ledger from "integrateledger";
|
|
1725
|
+
|
|
1726
|
+
const client = new ledger({
|
|
1727
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1728
|
+
});
|
|
1729
|
+
|
|
1730
|
+
async function run() {
|
|
1731
|
+
const result = await client.createOrGetCustomer({
|
|
1732
|
+
customerId: "<id>",
|
|
1733
|
+
});
|
|
1734
|
+
|
|
1735
|
+
console.log(result);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
run();
|
|
1739
|
+
```
|
|
1740
|
+
|
|
1741
|
+
### Standalone function
|
|
1742
|
+
|
|
1743
|
+
The standalone function version of this method:
|
|
1744
|
+
|
|
1745
|
+
```typescript
|
|
1746
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1747
|
+
import { createOrGetCustomer } from "integrateledger/funcs/create-or-get-customer.js";
|
|
1748
|
+
|
|
1749
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1750
|
+
// You can create one instance of it to use across an application.
|
|
1751
|
+
const ledger = new LedgerCore({
|
|
1752
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1753
|
+
});
|
|
1754
|
+
|
|
1755
|
+
async function run() {
|
|
1756
|
+
const res = await createOrGetCustomer(ledger, {
|
|
1757
|
+
customerId: "<id>",
|
|
1758
|
+
});
|
|
1759
|
+
if (res.ok) {
|
|
1760
|
+
const { value: result } = res;
|
|
1761
|
+
console.log(result);
|
|
1762
|
+
} else {
|
|
1763
|
+
console.log("createOrGetCustomer failed:", res.error);
|
|
1764
|
+
}
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
run();
|
|
1768
|
+
```
|
|
1769
|
+
|
|
1770
|
+
### Parameters
|
|
1771
|
+
|
|
1772
|
+
| Parameter | Type | Required | Description |
|
|
1773
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1774
|
+
| `request` | [models.CreateCustomerInput](../../models/create-customer-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1775
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1776
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1777
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1778
|
+
|
|
1779
|
+
### Response
|
|
1780
|
+
|
|
1781
|
+
**Promise\<[models.CustomerResponse](../../models/customer-response.md)\>**
|
|
1782
|
+
|
|
1783
|
+
### Errors
|
|
1784
|
+
|
|
1785
|
+
| Error Type | Status Code | Content Type |
|
|
1786
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1787
|
+
| errors.CustomerError | 400, 401 | application/json |
|
|
1788
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1789
|
+
|
|
1790
|
+
## trackUsage
|
|
1791
|
+
|
|
1792
|
+
Record feature usage
|
|
1793
|
+
|
|
1794
|
+
### Example Usage
|
|
1795
|
+
|
|
1796
|
+
<!-- UsageSnippet language="typescript" operationID="trackUsage" method="post" path="/v1/track" -->
|
|
1797
|
+
```typescript
|
|
1798
|
+
import ledger from "integrateledger";
|
|
1799
|
+
|
|
1800
|
+
const client = new ledger({
|
|
1801
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1802
|
+
});
|
|
1803
|
+
|
|
1804
|
+
async function run() {
|
|
1805
|
+
const result = await client.trackUsage({
|
|
1806
|
+
customerId: "<id>",
|
|
1807
|
+
featureId: "<id>",
|
|
1808
|
+
requestId: "<id>",
|
|
1809
|
+
});
|
|
1810
|
+
|
|
1811
|
+
console.log(result);
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
run();
|
|
1815
|
+
```
|
|
1816
|
+
|
|
1817
|
+
### Standalone function
|
|
1818
|
+
|
|
1819
|
+
The standalone function version of this method:
|
|
1820
|
+
|
|
1821
|
+
```typescript
|
|
1822
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1823
|
+
import { trackUsage } from "integrateledger/funcs/track-usage.js";
|
|
1824
|
+
|
|
1825
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1826
|
+
// You can create one instance of it to use across an application.
|
|
1827
|
+
const ledger = new LedgerCore({
|
|
1828
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1829
|
+
});
|
|
1830
|
+
|
|
1831
|
+
async function run() {
|
|
1832
|
+
const res = await trackUsage(ledger, {
|
|
1833
|
+
customerId: "<id>",
|
|
1834
|
+
featureId: "<id>",
|
|
1835
|
+
requestId: "<id>",
|
|
1836
|
+
});
|
|
1837
|
+
if (res.ok) {
|
|
1838
|
+
const { value: result } = res;
|
|
1839
|
+
console.log(result);
|
|
1840
|
+
} else {
|
|
1841
|
+
console.log("trackUsage failed:", res.error);
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
run();
|
|
1846
|
+
```
|
|
1847
|
+
|
|
1848
|
+
### Parameters
|
|
1849
|
+
|
|
1850
|
+
| Parameter | Type | Required | Description |
|
|
1851
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1852
|
+
| `request` | [models.TrackInput](../../models/track-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1853
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1854
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1855
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1856
|
+
|
|
1857
|
+
### Response
|
|
1858
|
+
|
|
1859
|
+
**Promise\<[models.TrackResponse](../../models/track-response.md)\>**
|
|
1860
|
+
|
|
1861
|
+
### Errors
|
|
1862
|
+
|
|
1863
|
+
| Error Type | Status Code | Content Type |
|
|
1864
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1865
|
+
| errors.TrackError | 400, 401, 404, 409 | application/json |
|
|
1866
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1867
|
+
|
|
1868
|
+
## attach
|
|
1869
|
+
|
|
1870
|
+
Attach a plan or add-on to a customer
|
|
1871
|
+
|
|
1872
|
+
### Example Usage
|
|
1873
|
+
|
|
1874
|
+
<!-- UsageSnippet language="typescript" operationID="attach" method="post" path="/v1/billing/attach" -->
|
|
1875
|
+
```typescript
|
|
1876
|
+
import ledger from "integrateledger";
|
|
1877
|
+
|
|
1878
|
+
const client = new ledger({
|
|
1879
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1880
|
+
});
|
|
1881
|
+
|
|
1882
|
+
async function run() {
|
|
1883
|
+
const result = await client.attach({
|
|
1884
|
+
customerId: "<id>",
|
|
1885
|
+
planId: "<id>",
|
|
1886
|
+
});
|
|
1887
|
+
|
|
1888
|
+
console.log(result);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
run();
|
|
1892
|
+
```
|
|
1893
|
+
|
|
1894
|
+
### Standalone function
|
|
1895
|
+
|
|
1896
|
+
The standalone function version of this method:
|
|
1897
|
+
|
|
1898
|
+
```typescript
|
|
1899
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1900
|
+
import { attach } from "integrateledger/funcs/attach.js";
|
|
1901
|
+
|
|
1902
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1903
|
+
// You can create one instance of it to use across an application.
|
|
1904
|
+
const ledger = new LedgerCore({
|
|
1905
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1906
|
+
});
|
|
1907
|
+
|
|
1908
|
+
async function run() {
|
|
1909
|
+
const res = await attach(ledger, {
|
|
1910
|
+
customerId: "<id>",
|
|
1911
|
+
planId: "<id>",
|
|
1912
|
+
});
|
|
1913
|
+
if (res.ok) {
|
|
1914
|
+
const { value: result } = res;
|
|
1915
|
+
console.log(result);
|
|
1916
|
+
} else {
|
|
1917
|
+
console.log("attach failed:", res.error);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
run();
|
|
1922
|
+
```
|
|
1923
|
+
|
|
1924
|
+
### Parameters
|
|
1925
|
+
|
|
1926
|
+
| Parameter | Type | Required | Description |
|
|
1927
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
1928
|
+
| `request` | [models.AttachInput](../../models/attach-input.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
1929
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
1930
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
1931
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
1932
|
+
|
|
1933
|
+
### Response
|
|
1934
|
+
|
|
1935
|
+
**Promise\<[models.AttachResponse](../../models/attach-response.md)\>**
|
|
1936
|
+
|
|
1937
|
+
### Errors
|
|
1938
|
+
|
|
1939
|
+
| Error Type | Status Code | Content Type |
|
|
1940
|
+
| ------------------------- | ------------------------- | ------------------------- |
|
|
1941
|
+
| errors.AttachError | 400, 401, 404, 409 | application/json |
|
|
1942
|
+
| errors.AttachError | 502, 503 | application/json |
|
|
1943
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|
|
1944
|
+
|
|
1945
|
+
## upgradePaidPlan
|
|
1946
|
+
|
|
1947
|
+
Upgrade a paid plan
|
|
1948
|
+
|
|
1949
|
+
### Example Usage
|
|
1950
|
+
|
|
1951
|
+
<!-- UsageSnippet language="typescript" operationID="upgradePaidPlan" method="post" path="/v1/billing/upgrade" -->
|
|
1952
|
+
```typescript
|
|
1953
|
+
import ledger from "integrateledger";
|
|
1954
|
+
|
|
1955
|
+
const client = new ledger({
|
|
1956
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1957
|
+
});
|
|
1958
|
+
|
|
1959
|
+
async function run() {
|
|
1960
|
+
const result = await client.upgradePaidPlan({
|
|
1961
|
+
idempotencyKey: "<value>",
|
|
1962
|
+
body: {
|
|
1963
|
+
customerId: "<id>",
|
|
1964
|
+
planId: "<id>",
|
|
1965
|
+
},
|
|
1966
|
+
});
|
|
1967
|
+
|
|
1968
|
+
console.log(result);
|
|
1969
|
+
}
|
|
1970
|
+
|
|
1971
|
+
run();
|
|
1972
|
+
```
|
|
1973
|
+
|
|
1974
|
+
### Standalone function
|
|
1975
|
+
|
|
1976
|
+
The standalone function version of this method:
|
|
1977
|
+
|
|
1978
|
+
```typescript
|
|
1979
|
+
import { LedgerCore } from "integrateledger/core.js";
|
|
1980
|
+
import { upgradePaidPlan } from "integrateledger/funcs/upgrade-paid-plan.js";
|
|
1981
|
+
|
|
1982
|
+
// Use `LedgerCore` for best tree-shaking performance.
|
|
1983
|
+
// You can create one instance of it to use across an application.
|
|
1984
|
+
const ledger = new LedgerCore({
|
|
1985
|
+
apiKey: process.env["LEDGER_API_KEY"] ?? "",
|
|
1986
|
+
});
|
|
1987
|
+
|
|
1988
|
+
async function run() {
|
|
1989
|
+
const res = await upgradePaidPlan(ledger, {
|
|
1990
|
+
idempotencyKey: "<value>",
|
|
1991
|
+
body: {
|
|
1992
|
+
customerId: "<id>",
|
|
1993
|
+
planId: "<id>",
|
|
1994
|
+
},
|
|
1995
|
+
});
|
|
1996
|
+
if (res.ok) {
|
|
1997
|
+
const { value: result } = res;
|
|
1998
|
+
console.log(result);
|
|
1999
|
+
} else {
|
|
2000
|
+
console.log("upgradePaidPlan failed:", res.error);
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
run();
|
|
2005
|
+
```
|
|
2006
|
+
|
|
2007
|
+
### Parameters
|
|
2008
|
+
|
|
2009
|
+
| Parameter | Type | Required | Description |
|
|
2010
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
2011
|
+
| `request` | [operations.UpgradePaidPlanRequest](../../models/operations/upgrade-paid-plan-request.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
2012
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
2013
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
2014
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
2015
|
+
|
|
2016
|
+
### Response
|
|
2017
|
+
|
|
2018
|
+
**Promise\<[models.UpgradeResponse](../../models/upgrade-response.md)\>**
|
|
2019
|
+
|
|
2020
|
+
### Errors
|
|
2021
|
+
|
|
2022
|
+
| Error Type | Status Code | Content Type |
|
|
2023
|
+
| --------------------------------------- | --------------------------------------- | --------------------------------------- |
|
|
2024
|
+
| errors.UpgradeError | 400 | application/json |
|
|
2025
|
+
| errors.UpgradePaidPlanUnauthorizedError | 401 | application/json |
|
|
2026
|
+
| errors.UpgradePaidPlanNotFoundError | 404 | application/json |
|
|
2027
|
+
| errors.UpgradePaidPlanConflictError | 409 | application/json |
|
|
2028
|
+
| errors.BadGatewayError | 502 | application/json |
|
|
2029
|
+
| errors.ServiceUnavailableError | 503 | application/json |
|
|
2030
|
+
| errors.LedgerDefaultError | 4XX, 5XX | \*/\* |
|