@schematichq/schematic-typescript-node 1.1.9 → 1.1.11
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/Client.d.ts +20 -13
- package/Client.js +13 -8
- package/README.md +199 -0
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +19 -8
- package/api/errors/ForbiddenError.d.ts +2 -1
- package/api/errors/ForbiddenError.js +19 -8
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +19 -8
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +19 -8
- package/api/errors/UnauthorizedError.d.ts +2 -1
- package/api/errors/UnauthorizedError.js +19 -8
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/accesstokens/client/Client.d.ts +7 -1
- package/api/resources/accesstokens/client/Client.js +50 -22
- package/api/resources/accounts/client/Client.d.ts +55 -14
- package/api/resources/accounts/client/Client.js +548 -224
- package/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
- package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
- package/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
- package/api/resources/accounts/types/index.d.ts +1 -0
- package/api/resources/accounts/types/index.js +1 -0
- package/api/resources/billing/client/Client.d.ts +99 -25
- package/api/resources/billing/client/Client.js +912 -307
- package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +10 -1
- package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
- package/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
- package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +14 -2
- package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -5
- package/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +6 -2
- package/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
- package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +10 -1
- package/api/resources/billing/client/requests/ListCouponsRequest.d.ts +19 -0
- package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
- package/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +0 -1
- package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +10 -1
- package/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +3 -1
- package/api/resources/billing/client/requests/index.d.ts +2 -1
- package/api/resources/billing/types/CountBillingProductsParams.d.ts +6 -1
- package/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +10 -0
- package/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +10 -0
- package/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +8 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +10 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +8 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +10 -0
- package/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +8 -0
- package/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +10 -0
- package/api/resources/billing/types/DeleteBillingProductResponse.d.ts +9 -0
- package/api/resources/billing/types/ListBillingProductsParams.d.ts +6 -1
- package/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +10 -0
- package/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +10 -0
- package/api/resources/billing/types/ListCouponsParams.d.ts +14 -0
- package/api/resources/billing/types/ListCouponsResponse.d.ts +10 -0
- package/{dist/api/resources/billing/types/ListCustomersParams.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
- package/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
- package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
- package/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
- package/api/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
- package/api/resources/billing/types/ListProductPricesParams.d.ts +6 -1
- package/api/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/ListProductPricesRequestPriceUsageType.js +10 -0
- package/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +8 -0
- package/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +10 -0
- package/api/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
- package/api/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +8 -0
- package/api/resources/billing/types/SearchBillingPricesRequestUsageType.js +10 -0
- package/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +8 -0
- package/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +10 -0
- package/api/resources/billing/types/index.d.ts +17 -2
- package/api/resources/billing/types/index.js +17 -2
- package/api/resources/checkout/client/Client.d.ts +19 -6
- package/api/resources/checkout/client/Client.js +149 -73
- package/api/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
- package/api/resources/checkout/client/requests/CheckoutDataRequestBody.js +5 -0
- package/api/resources/checkout/client/requests/index.d.ts +1 -0
- package/api/resources/companies/client/Client.d.ts +99 -37
- package/api/resources/companies/client/Client.js +1024 -499
- package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
- package/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
- package/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
- package/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
- package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
- package/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
- package/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
- package/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
- package/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
- package/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +1 -1
- package/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
- package/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
- package/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
- package/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
- package/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
- package/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
- package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
- package/api/resources/components/client/Client.d.ts +22 -7
- package/api/resources/components/client/Client.js +226 -117
- package/api/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +1 -1
- package/api/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +1 -1
- package/api/resources/components/types/UpdateComponentRequestBodyState.d.ts +1 -1
- package/api/resources/crm/client/Client.d.ts +19 -5
- package/api/resources/crm/client/Client.js +183 -83
- package/api/resources/dataexports/client/Client.d.ts +58 -0
- package/api/resources/dataexports/client/Client.js +265 -0
- package/api/resources/dataexports/client/index.d.ts +1 -0
- package/api/resources/dataexports/client/index.js +17 -0
- package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
- package/api/resources/dataexports/client/requests/index.d.ts +1 -0
- package/api/resources/dataexports/client/requests/index.js +2 -0
- package/api/resources/dataexports/index.d.ts +2 -0
- package/api/resources/dataexports/index.js +18 -0
- package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
- package/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
- package/api/resources/dataexports/types/index.d.ts +1 -0
- package/api/resources/dataexports/types/index.js +17 -0
- package/api/resources/entitlements/client/Client.d.ts +57 -22
- package/api/resources/entitlements/client/Client.js +612 -306
- package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
- package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
- package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
- package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
- package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/api/resources/events/client/Client.d.ts +20 -6
- package/api/resources/events/client/Client.js +199 -99
- package/api/resources/features/client/Client.d.ts +56 -19
- package/api/resources/features/client/Client.js +607 -300
- package/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
- package/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
- package/api/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +1 -1
- package/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +1 -1
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +21 -8
- package/api/resources/plangroups/client/Client.d.ts +17 -5
- package/api/resources/plangroups/client/Client.js +105 -55
- package/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +7 -2
- package/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +7 -2
- package/api/resources/plans/client/Client.d.ts +128 -11
- package/api/resources/plans/client/Client.js +1063 -210
- package/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
- package/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
- package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
- package/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
- package/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
- package/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
- package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
- package/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
- package/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
- package/api/resources/plans/client/requests/index.d.ts +4 -0
- package/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
- package/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
- package/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
- package/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
- package/api/resources/plans/types/CountPlansRequestPlanType.d.ts +1 -1
- package/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +1 -1
- package/api/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +1 -1
- package/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
- package/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
- package/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
- package/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
- package/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
- package/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
- package/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
- package/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
- package/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
- package/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
- package/api/resources/plans/types/ListPlansRequestPlanType.d.ts +1 -1
- package/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +1 -1
- package/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
- package/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
- package/api/resources/plans/types/index.d.ts +8 -0
- package/api/resources/plans/types/index.js +8 -0
- package/api/resources/webhooks/client/Client.d.ts +28 -9
- package/api/resources/webhooks/client/Client.js +293 -148
- package/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
- package/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
- package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
- package/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
- package/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +1 -1
- package/api/types/BillingCouponResponseData.d.ts +0 -3
- package/api/types/BillingPriceResponseData.d.ts +2 -0
- package/api/types/BillingPriceView.d.ts +7 -0
- package/api/types/BillingProductDetailResponseData.d.ts +3 -0
- package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/api/types/BillingProductPlanResponseData.d.ts +2 -0
- package/api/types/BillingProductPriceResponseData.d.ts +3 -0
- package/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
- package/api/types/BillingProductPriceTierResponseData.js +5 -0
- package/api/types/BillingProductPricing.d.ts +4 -1
- package/api/types/BillingProductPricingUsageType.d.ts +8 -0
- package/api/types/BillingProductPricingUsageType.js +10 -0
- package/api/types/BillingProductResponseData.d.ts +2 -0
- package/api/types/BillingSubscriptionResponseData.d.ts +3 -0
- package/api/types/BillingSubscriptionView.d.ts +3 -0
- package/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/api/types/CheckFlagResponseData.d.ts +2 -0
- package/api/types/CheckoutDataResponseData.d.ts +3 -1
- package/api/types/CompanyDetailResponseData.d.ts +2 -0
- package/api/types/CompanyPlanDetailResponseData.d.ts +5 -0
- package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/api/types/CompanySubscriptionResponseData.d.ts +2 -0
- package/api/types/ComponentCapabilities.d.ts +1 -0
- package/api/types/CreateBillingPriceTierRequestBody.d.ts +10 -0
- package/api/types/CreateBillingPriceTierRequestBody.js +5 -0
- package/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
- package/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
- package/api/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
- package/api/types/CreateEventRequestBodyEventType.d.ts +1 -1
- package/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
- package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
- package/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
- package/api/types/CreateOrUpdateRuleRequestBodyRuleType.d.ts +1 -1
- package/api/types/CustomPlanConfig.d.ts +8 -0
- package/api/types/CustomPlanConfig.js +5 -0
- package/api/types/CustomPlanViewConfigResponseData.d.ts +8 -0
- package/api/types/CustomPlanViewConfigResponseData.js +5 -0
- package/api/types/DataExportResponseData.d.ts +17 -0
- package/api/types/DataExportResponseData.js +5 -0
- package/api/types/Decimal.d.ts +1 -1
- package/api/types/EntitlementTriggerConfig.d.ts +6 -0
- package/api/types/EntitlementTriggerConfig.js +5 -0
- package/api/types/EntitlementsInPlan.d.ts +7 -0
- package/api/types/EntitlementsInPlan.js +5 -0
- package/api/types/EventBody.d.ts +1 -1
- package/api/types/EventSummaryResponseData.d.ts +2 -2
- package/api/types/FeatureCompanyResponseDataAllocationType.d.ts +1 -1
- package/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +1 -1
- package/api/types/FeatureDetailResponseData.d.ts +2 -0
- package/api/types/FeatureResponseData.d.ts +2 -0
- package/api/types/FeatureUsageResponseData.d.ts +2 -0
- package/api/types/FeatureUsageResponseDataAllocationType.d.ts +1 -1
- package/api/types/OrderedPlansInGroup.d.ts +8 -0
- package/api/types/OrderedPlansInGroup.js +5 -0
- package/api/types/PaymentMethodRequestBody.d.ts +0 -1
- package/api/types/PaymentMethodResponseData.d.ts +0 -1
- package/api/types/PlanDetailResponseData.d.ts +2 -0
- package/api/types/PlanEntitlementResponseData.d.ts +2 -0
- package/api/types/PlanEntitlementsOrder.d.ts +7 -0
- package/api/types/PlanEntitlementsOrder.js +5 -0
- package/api/types/PlanGroupDetailResponseData.d.ts +3 -0
- package/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/api/types/PlanGroupPlanEntitlementsOrder.d.ts +8 -0
- package/api/types/PlanGroupPlanEntitlementsOrder.js +5 -0
- package/api/types/PlanGroupResponseData.d.ts +2 -1
- package/api/types/PlanTraitResponseData.d.ts +16 -0
- package/api/types/PlanTraitResponseData.js +5 -0
- package/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
- package/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
- package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
- package/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
- package/api/types/QuickstartResp.d.ts +6 -0
- package/api/types/QuickstartResp.js +5 -0
- package/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
- package/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
- package/api/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
- package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
- package/api/types/UpsertTraitRequestBody.d.ts +1 -1
- package/api/types/UpsertUserRequestBody.d.ts +7 -2
- package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
- package/api/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
- package/api/types/WebhookResponseData.d.ts +3 -0
- package/api/types/index.d.ts +15 -0
- package/api/types/index.js +15 -0
- package/core/fetcher/APIResponse.d.ts +11 -1
- package/core/fetcher/Fetcher.d.ts +2 -2
- package/core/fetcher/Fetcher.js +13 -5
- package/core/fetcher/Headers.d.ts +2 -0
- package/core/fetcher/Headers.js +84 -0
- package/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/core/fetcher/HttpResponsePromise.js +103 -0
- package/core/fetcher/RawResponse.d.ts +29 -0
- package/core/fetcher/RawResponse.js +44 -0
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/custom.js +19 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +1 -2
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +4 -5
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/dist/Client.d.ts +20 -13
- package/dist/Client.js +13 -8
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +19 -8
- package/dist/api/errors/ForbiddenError.d.ts +2 -1
- package/dist/api/errors/ForbiddenError.js +19 -8
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +19 -8
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +19 -8
- package/dist/api/errors/UnauthorizedError.d.ts +2 -1
- package/dist/api/errors/UnauthorizedError.js +19 -8
- package/dist/api/errors/index.d.ts +1 -1
- package/dist/api/errors/index.js +1 -1
- package/dist/api/resources/accesstokens/client/Client.d.ts +7 -1
- package/dist/api/resources/accesstokens/client/Client.js +50 -22
- package/dist/api/resources/accounts/client/Client.d.ts +55 -14
- package/dist/api/resources/accounts/client/Client.js +548 -224
- package/dist/api/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
- package/dist/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
- package/dist/api/resources/accounts/types/QuickstartResponse.js +5 -0
- package/dist/api/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.d.ts +1 -1
- package/dist/api/resources/accounts/types/index.d.ts +1 -0
- package/dist/api/resources/accounts/types/index.js +1 -0
- package/dist/api/resources/billing/client/Client.d.ts +99 -25
- package/dist/api/resources/billing/client/Client.js +912 -307
- package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +10 -1
- package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
- package/dist/api/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
- package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +14 -2
- package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -5
- package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +6 -2
- package/dist/api/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
- package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +10 -1
- package/dist/api/resources/billing/client/requests/ListCouponsRequest.d.ts +19 -0
- package/dist/api/resources/billing/client/requests/ListCouponsRequest.js +5 -0
- package/dist/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
- package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.js +5 -0
- package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +0 -1
- package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +10 -1
- package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +3 -1
- package/dist/api/resources/billing/client/requests/index.d.ts +2 -1
- package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +6 -1
- package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +8 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +10 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +8 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +10 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +10 -0
- package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +8 -0
- package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +10 -0
- package/dist/api/resources/billing/types/DeleteBillingProductResponse.d.ts +9 -0
- package/dist/api/resources/billing/types/DeleteBillingProductResponse.js +5 -0
- package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +6 -1
- package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/ListCouponsParams.d.ts +14 -0
- package/dist/api/resources/billing/types/ListCouponsParams.js +5 -0
- package/dist/api/resources/billing/types/ListCouponsResponse.d.ts +10 -0
- package/dist/api/resources/billing/types/ListCouponsResponse.js +5 -0
- package/{api/resources/billing/types/ListCustomersParams.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
- package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsParams.js +5 -0
- package/{api/resources/billing/types/ListCustomersResponse.d.ts → dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
- package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js +5 -0
- package/dist/api/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
- package/dist/api/resources/billing/types/ListProductPricesParams.d.ts +6 -1
- package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/ListProductPricesRequestPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +10 -0
- package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
- package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/SearchBillingPricesRequestUsageType.js +10 -0
- package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +8 -0
- package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +10 -0
- package/dist/api/resources/billing/types/index.d.ts +17 -2
- package/dist/api/resources/billing/types/index.js +17 -2
- package/dist/api/resources/checkout/client/Client.d.ts +19 -6
- package/dist/api/resources/checkout/client/Client.js +149 -73
- package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
- package/dist/api/resources/checkout/client/requests/CheckoutDataRequestBody.js +5 -0
- package/dist/api/resources/checkout/client/requests/index.d.ts +1 -0
- package/dist/api/resources/companies/client/Client.d.ts +99 -37
- package/dist/api/resources/companies/client/Client.js +1024 -499
- package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +4 -0
- package/dist/api/resources/companies/client/requests/LookupCompanyRequest.d.ts +2 -4
- package/dist/api/resources/companies/client/requests/LookupUserRequest.d.ts +2 -4
- package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
- package/dist/api/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
- package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
- package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
- package/dist/api/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.d.ts +1 -1
- package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.d.ts +1 -1
- package/dist/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/dist/api/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/dist/api/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.d.ts +1 -1
- package/dist/api/resources/components/client/Client.d.ts +22 -7
- package/dist/api/resources/components/client/Client.js +226 -117
- package/dist/api/resources/components/types/CreateComponentRequestBodyEntityType.d.ts +1 -1
- package/dist/api/resources/components/types/UpdateComponentRequestBodyEntityType.d.ts +1 -1
- package/dist/api/resources/components/types/UpdateComponentRequestBodyState.d.ts +1 -1
- package/dist/api/resources/crm/client/Client.d.ts +19 -5
- package/dist/api/resources/crm/client/Client.js +183 -83
- package/dist/api/resources/dataexports/client/Client.d.ts +58 -0
- package/dist/api/resources/dataexports/client/Client.js +265 -0
- package/dist/api/resources/dataexports/client/index.d.ts +1 -0
- package/dist/api/resources/dataexports/client/index.js +17 -0
- package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/dist/api/resources/dataexports/client/requests/CreateDataExportRequestBody.js +5 -0
- package/dist/api/resources/dataexports/client/requests/index.d.ts +1 -0
- package/dist/api/resources/dataexports/client/requests/index.js +2 -0
- package/dist/api/resources/dataexports/index.d.ts +2 -0
- package/dist/api/resources/dataexports/index.js +18 -0
- package/dist/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
- package/dist/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
- package/dist/api/resources/dataexports/types/index.d.ts +1 -0
- package/dist/api/resources/dataexports/types/index.js +17 -0
- package/dist/api/resources/entitlements/client/Client.d.ts +57 -22
- package/dist/api/resources/entitlements/client/Client.js +612 -306
- package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
- package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
- package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
- package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/dist/api/resources/events/client/Client.d.ts +20 -6
- package/dist/api/resources/events/client/Client.js +199 -99
- package/dist/api/resources/features/client/Client.d.ts +56 -19
- package/dist/api/resources/features/client/Client.js +607 -300
- package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
- package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
- package/dist/api/resources/features/types/CreateFeatureRequestBodyFeatureType.d.ts +1 -1
- package/dist/api/resources/features/types/UpdateFeatureRequestBodyFeatureType.d.ts +1 -1
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +21 -8
- package/dist/api/resources/plangroups/client/Client.d.ts +17 -5
- package/dist/api/resources/plangroups/client/Client.js +105 -55
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +7 -2
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +7 -2
- package/dist/api/resources/plans/client/Client.d.ts +128 -11
- package/dist/api/resources/plans/client/Client.js +1063 -210
- package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.d.ts +20 -0
- package/dist/api/resources/plans/client/requests/CountPlanTraitsRequest.js +5 -0
- package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +16 -0
- package/dist/api/resources/plans/client/requests/CreatePlanTraitRequestBody.js +5 -0
- package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.d.ts +20 -0
- package/dist/api/resources/plans/client/requests/ListPlanTraitsRequest.js +5 -0
- package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +14 -0
- package/dist/api/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +5 -0
- package/dist/api/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
- package/dist/api/resources/plans/client/requests/index.d.ts +4 -0
- package/dist/api/resources/plans/types/CountPlanTraitsParams.d.ts +15 -0
- package/dist/api/resources/plans/types/CountPlanTraitsParams.js +5 -0
- package/dist/api/resources/plans/types/CountPlanTraitsResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/CountPlanTraitsResponse.js +5 -0
- package/dist/api/resources/plans/types/CountPlansRequestPlanType.d.ts +1 -1
- package/dist/api/resources/plans/types/CountPlansResponseParamsPlanType.d.ts +1 -1
- package/dist/api/resources/plans/types/CreatePlanRequestBodyPlanType.d.ts +1 -1
- package/dist/api/resources/plans/types/CreatePlanTraitResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/CreatePlanTraitResponse.js +5 -0
- package/dist/api/resources/plans/types/DeletePlanTraitResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/DeletePlanTraitResponse.js +5 -0
- package/dist/api/resources/plans/types/GetPlanTraitResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/GetPlanTraitResponse.js +5 -0
- package/dist/api/resources/plans/types/ListPlanTraitsParams.d.ts +15 -0
- package/dist/api/resources/plans/types/ListPlanTraitsParams.js +5 -0
- package/dist/api/resources/plans/types/ListPlanTraitsResponse.d.ts +10 -0
- package/dist/api/resources/plans/types/ListPlanTraitsResponse.js +5 -0
- package/dist/api/resources/plans/types/ListPlansRequestPlanType.d.ts +1 -1
- package/dist/api/resources/plans/types/ListPlansResponseParamsPlanType.d.ts +1 -1
- package/dist/api/resources/plans/types/UpdatePlanTraitResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/UpdatePlanTraitResponse.js +5 -0
- package/dist/api/resources/plans/types/index.d.ts +8 -0
- package/dist/api/resources/plans/types/index.js +8 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +28 -9
- package/dist/api/resources/webhooks/client/Client.js +293 -148
- package/dist/api/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +1 -0
- package/dist/api/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +1 -0
- package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
- package/dist/api/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +5 -1
- package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/dist/api/resources/webhooks/types/UpdateWebhookRequestBodyStatus.d.ts +1 -1
- package/dist/api/types/BillingCouponResponseData.d.ts +0 -3
- package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
- package/dist/api/types/BillingPriceView.d.ts +7 -0
- package/dist/api/types/BillingProductDetailResponseData.d.ts +3 -0
- package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/dist/api/types/BillingProductPlanResponseData.d.ts +2 -0
- package/dist/api/types/BillingProductPriceResponseData.d.ts +3 -0
- package/dist/api/types/BillingProductPriceTierResponseData.d.ts +9 -0
- package/dist/api/types/BillingProductPriceTierResponseData.js +5 -0
- package/dist/api/types/BillingProductPricing.d.ts +4 -1
- package/dist/api/types/BillingProductPricingUsageType.d.ts +8 -0
- package/dist/api/types/BillingProductPricingUsageType.js +10 -0
- package/dist/api/types/BillingProductResponseData.d.ts +2 -0
- package/dist/api/types/BillingSubscriptionResponseData.d.ts +3 -0
- package/dist/api/types/BillingSubscriptionView.d.ts +3 -0
- package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
- package/dist/api/types/CheckoutDataResponseData.d.ts +3 -1
- package/dist/api/types/CompanyDetailResponseData.d.ts +2 -0
- package/dist/api/types/CompanyPlanDetailResponseData.d.ts +5 -0
- package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/api/types/CompanySubscriptionResponseData.d.ts +2 -0
- package/dist/api/types/ComponentCapabilities.d.ts +1 -0
- package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +10 -0
- package/dist/api/types/CreateBillingPriceTierRequestBody.js +5 -0
- package/dist/api/types/CreateEntitlementReqCommonMetricPeriod.d.ts +1 -1
- package/dist/api/types/CreateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
- package/dist/api/types/CreateEventRequestBodyEventType.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateConditionRequestBodyConditionType.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriod.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateConditionRequestBodyOperator.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateRuleRequestBodyRuleType.d.ts +1 -1
- package/dist/api/types/CustomPlanConfig.d.ts +8 -0
- package/dist/api/types/CustomPlanConfig.js +5 -0
- package/dist/api/types/CustomPlanViewConfigResponseData.d.ts +8 -0
- package/dist/api/types/CustomPlanViewConfigResponseData.js +5 -0
- package/dist/api/types/DataExportResponseData.d.ts +17 -0
- package/dist/api/types/DataExportResponseData.js +5 -0
- package/dist/api/types/Decimal.d.ts +1 -1
- package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
- package/dist/api/types/EntitlementTriggerConfig.js +5 -0
- package/dist/api/types/EntitlementsInPlan.d.ts +7 -0
- package/dist/api/types/EntitlementsInPlan.js +5 -0
- package/dist/api/types/EventBody.d.ts +1 -1
- package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
- package/dist/api/types/FeatureCompanyResponseDataAllocationType.d.ts +1 -1
- package/dist/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +1 -1
- package/dist/api/types/FeatureDetailResponseData.d.ts +2 -0
- package/dist/api/types/FeatureResponseData.d.ts +2 -0
- package/dist/api/types/FeatureUsageResponseData.d.ts +2 -0
- package/dist/api/types/FeatureUsageResponseDataAllocationType.d.ts +1 -1
- package/dist/api/types/OrderedPlansInGroup.d.ts +8 -0
- package/dist/api/types/OrderedPlansInGroup.js +5 -0
- package/dist/api/types/PaymentMethodRequestBody.d.ts +0 -1
- package/dist/api/types/PaymentMethodResponseData.d.ts +0 -1
- package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
- package/dist/api/types/PlanEntitlementResponseData.d.ts +2 -0
- package/dist/api/types/PlanEntitlementsOrder.d.ts +7 -0
- package/dist/api/types/PlanEntitlementsOrder.js +5 -0
- package/dist/api/types/PlanGroupDetailResponseData.d.ts +3 -0
- package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/dist/api/types/PlanGroupPlanEntitlementsOrder.d.ts +8 -0
- package/dist/api/types/PlanGroupPlanEntitlementsOrder.js +5 -0
- package/dist/api/types/PlanGroupResponseData.d.ts +2 -1
- package/dist/api/types/PlanTraitResponseData.d.ts +16 -0
- package/dist/api/types/PlanTraitResponseData.js +5 -0
- package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +15 -0
- package/dist/api/types/PreviewSubscriptionFinanceResponseData.js +5 -0
- package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +10 -0
- package/dist/api/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +5 -0
- package/dist/api/types/QuickstartResp.d.ts +6 -0
- package/dist/api/types/QuickstartResp.js +5 -0
- package/dist/api/types/UpdateEntitlementReqCommonMetricPeriod.d.ts +1 -1
- package/dist/api/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.d.ts +1 -1
- package/dist/api/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
- package/dist/api/types/UpsertCompanyRequestBody.d.ts +1 -0
- package/dist/api/types/UpsertTraitRequestBody.d.ts +1 -1
- package/dist/api/types/UpsertUserRequestBody.d.ts +7 -2
- package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
- package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
- package/dist/api/types/WebhookResponseData.d.ts +3 -0
- package/dist/api/types/index.d.ts +15 -0
- package/dist/api/types/index.js +15 -0
- package/dist/core/fetcher/APIResponse.d.ts +11 -1
- package/dist/core/fetcher/Fetcher.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.js +13 -5
- package/dist/core/fetcher/Headers.d.ts +2 -0
- package/dist/core/fetcher/Headers.js +84 -0
- package/dist/core/fetcher/HttpResponsePromise.d.ts +58 -0
- package/dist/core/fetcher/HttpResponsePromise.js +103 -0
- package/dist/core/fetcher/RawResponse.d.ts +29 -0
- package/dist/core/fetcher/RawResponse.js +44 -0
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/custom.js +19 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +1 -2
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +4 -5
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/environments.d.ts +1 -1
- package/dist/errors/SchematicError.d.ts +4 -1
- package/dist/errors/SchematicError.js +6 -8
- package/dist/errors/SchematicTimeoutError.d.ts +1 -1
- package/dist/errors/SchematicTimeoutError.js +2 -2
- package/dist/events.d.ts +4 -0
- package/dist/events.js +41 -5
- package/dist/events.test.js +51 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -8
- package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +17 -7
- package/dist/serialization/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +17 -7
- package/dist/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.js +17 -7
- package/dist/serialization/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +17 -7
- package/dist/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +17 -7
- package/dist/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +17 -7
- package/dist/serialization/resources/accounts/types/CountApiKeysParams.js +17 -7
- package/dist/serialization/resources/accounts/types/CountApiKeysResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/CountApiRequestsParams.js +17 -7
- package/dist/serialization/resources/accounts/types/CountApiRequestsResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/CreateApiKeyResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +17 -7
- package/dist/serialization/resources/accounts/types/CreateEnvironmentResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/DeleteApiKeyResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/DeleteEnvironmentResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/GetApiKeyResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/GetApiRequestResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/GetEnvironmentResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/ListApiKeysParams.js +17 -7
- package/dist/serialization/resources/accounts/types/ListApiKeysResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/ListApiRequestsParams.js +17 -7
- package/dist/serialization/resources/accounts/types/ListApiRequestsResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/ListEnvironmentsParams.js +17 -7
- package/dist/serialization/resources/accounts/types/ListEnvironmentsResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
- package/dist/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
- package/dist/serialization/resources/accounts/types/UpdateApiKeyResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +17 -7
- package/dist/serialization/resources/accounts/types/UpdateEnvironmentResponse.js +17 -7
- package/dist/serialization/resources/accounts/types/index.d.ts +1 -0
- package/dist/serialization/resources/accounts/types/index.js +1 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +18 -7
- package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +11 -1
- package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +28 -8
- package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -2
- package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +18 -9
- package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +5 -1
- package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +22 -8
- package/dist/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +17 -7
- package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +17 -7
- package/dist/serialization/resources/billing/client/requests/CreateMeterRequestBody.js +17 -7
- package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
- package/dist/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +17 -8
- package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +4 -1
- package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +21 -8
- package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/CountBillingProductsResponse.js +17 -7
- package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/dist/serialization/resources/billing/types/CountCustomersParams.js +18 -7
- package/dist/serialization/resources/billing/types/CountCustomersResponse.js +17 -7
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +41 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +41 -0
- package/dist/serialization/resources/billing/types/DeleteBillingProductResponse.d.ts +14 -0
- package/dist/serialization/resources/billing/types/DeleteBillingProductResponse.js +45 -0
- package/dist/serialization/resources/billing/types/DeleteProductPriceResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -1
- package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +21 -8
- package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/ListBillingProductsResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/ListCouponsParams.d.ts +15 -0
- package/dist/serialization/resources/billing/types/ListCouponsParams.js +46 -0
- package/dist/serialization/resources/billing/types/ListCouponsResponse.d.ts +15 -0
- package/dist/serialization/resources/billing/types/ListCouponsResponse.js +46 -0
- package/dist/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
- package/dist/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +20 -9
- package/{serialization/resources/billing/types/ListCustomersResponse.d.ts → dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
- package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +21 -11
- package/dist/serialization/resources/billing/types/ListInvoicesParams.js +17 -7
- package/dist/serialization/resources/billing/types/ListInvoicesResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListMetersParams.js +17 -7
- package/dist/serialization/resources/billing/types/ListMetersResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
- package/dist/serialization/resources/billing/types/ListPaymentMethodsParams.js +17 -8
- package/dist/serialization/resources/billing/types/ListPaymentMethodsResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -1
- package/dist/serialization/resources/billing/types/ListProductPricesParams.js +21 -8
- package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/ListProductPricesResponse.js +17 -7
- package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
- package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +20 -8
- package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesResponse.js +17 -7
- package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +10 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +41 -0
- package/dist/serialization/resources/billing/types/UpsertBillingCouponResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertBillingCustomerResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertBillingMeterResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertBillingPriceResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertBillingProductResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertBillingSubscriptionResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertInvoiceResponse.js +17 -7
- package/dist/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +17 -7
- package/dist/serialization/resources/billing/types/index.d.ts +17 -2
- package/dist/serialization/resources/billing/types/index.js +17 -2
- package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
- package/dist/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.js +44 -0
- package/dist/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +17 -7
- package/dist/serialization/resources/checkout/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/checkout/client/requests/index.js +3 -1
- package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.js +17 -7
- package/dist/serialization/resources/checkout/types/GetCheckoutDataResponse.js +17 -7
- package/dist/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +17 -7
- package/dist/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +17 -7
- package/dist/serialization/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +17 -7
- package/dist/serialization/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +17 -7
- package/dist/serialization/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +17 -7
- package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/CountCompaniesParams.js +18 -7
- package/dist/serialization/resources/companies/types/CountCompaniesResponse.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsParams.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsParams.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/CountUsersParams.js +17 -7
- package/dist/serialization/resources/companies/types/CountUsersResponse.js +17 -7
- package/dist/serialization/resources/companies/types/CreateCompanyResponse.js +17 -7
- package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/CreateUserResponse.js +17 -7
- package/dist/serialization/resources/companies/types/DeleteCompanyByKeysResponse.js +17 -7
- package/dist/serialization/resources/companies/types/DeleteCompanyMembershipResponse.js +17 -7
- package/dist/serialization/resources/companies/types/DeleteCompanyResponse.js +17 -7
- package/dist/serialization/resources/companies/types/DeleteUserByKeysResponse.js +17 -7
- package/dist/serialization/resources/companies/types/DeleteUserResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +17 -7
- package/dist/serialization/resources/companies/types/GetActiveCompanySubscriptionResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetActiveDealsParams.js +17 -7
- package/dist/serialization/resources/companies/types/GetActiveDealsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetCompanyResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetEntityTraitValuesParams.js +17 -7
- package/dist/serialization/resources/companies/types/GetEntityTraitValuesResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +17 -7
- package/dist/serialization/resources/companies/types/GetUserResponse.js +17 -7
- package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/ListCompaniesParams.js +18 -7
- package/dist/serialization/resources/companies/types/ListCompaniesResponse.js +17 -7
- package/dist/serialization/resources/companies/types/ListCompanyMembershipsParams.js +17 -7
- package/dist/serialization/resources/companies/types/ListCompanyMembershipsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsParams.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsParams.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponse.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
- package/dist/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/ListUsersParams.js +17 -7
- package/dist/serialization/resources/companies/types/ListUsersResponse.js +17 -7
- package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/dist/serialization/resources/companies/types/LookupCompanyParams.js +18 -8
- package/dist/serialization/resources/companies/types/LookupCompanyResponse.js +17 -7
- package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/dist/serialization/resources/companies/types/LookupUserParams.js +18 -8
- package/dist/serialization/resources/companies/types/LookupUserResponse.js +17 -7
- package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
- package/dist/serialization/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +17 -7
- package/dist/serialization/resources/companies/types/UpsertCompanyResponse.js +17 -7
- package/dist/serialization/resources/companies/types/UpsertCompanyTraitResponse.js +17 -7
- package/dist/serialization/resources/companies/types/UpsertUserResponse.js +17 -7
- package/dist/serialization/resources/companies/types/UpsertUserTraitResponse.js +17 -7
- package/dist/serialization/resources/components/client/requests/CreateComponentRequestBody.js +17 -7
- package/dist/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +17 -7
- package/dist/serialization/resources/components/types/CountComponentsParams.js +17 -7
- package/dist/serialization/resources/components/types/CountComponentsResponse.js +17 -7
- package/dist/serialization/resources/components/types/CreateComponentRequestBodyEntityType.js +17 -7
- package/dist/serialization/resources/components/types/CreateComponentResponse.js +17 -7
- package/dist/serialization/resources/components/types/DeleteComponentResponse.js +17 -7
- package/dist/serialization/resources/components/types/GetComponentResponse.js +17 -7
- package/dist/serialization/resources/components/types/ListComponentsParams.js +17 -7
- package/dist/serialization/resources/components/types/ListComponentsResponse.js +17 -7
- package/dist/serialization/resources/components/types/PreviewComponentDataParams.js +17 -7
- package/dist/serialization/resources/components/types/PreviewComponentDataResponse.js +17 -7
- package/dist/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.js +17 -7
- package/dist/serialization/resources/components/types/UpdateComponentRequestBodyState.js +17 -7
- package/dist/serialization/resources/components/types/UpdateComponentResponse.js +17 -7
- package/dist/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +17 -7
- package/dist/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.js +17 -7
- package/dist/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +17 -7
- package/dist/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.js +17 -7
- package/dist/serialization/resources/crm/types/ListCrmProductsParams.js +17 -7
- package/dist/serialization/resources/crm/types/ListCrmProductsResponse.js +17 -7
- package/dist/serialization/resources/crm/types/UpsertCrmDealResponse.js +17 -7
- package/dist/serialization/resources/crm/types/UpsertCrmProductResponse.js +17 -7
- package/dist/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.js +17 -7
- package/dist/serialization/resources/crm/types/UpsertLineItemResponse.js +17 -7
- package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/client/index.js +17 -0
- package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
- package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
- package/dist/serialization/resources/dataexports/index.d.ts +2 -0
- package/dist/serialization/resources/dataexports/index.js +18 -0
- package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
- package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
- package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/types/index.js +17 -0
- package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +17 -7
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +24 -7
- package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +17 -7
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +24 -7
- package/dist/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountCompanyOverridesResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureCompaniesResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureUsageParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureUsageResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureUsersParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountFeatureUsersResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/CountPlanEntitlementsResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +17 -7
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/DeleteCompanyOverrideResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/DeletePlanEntitlementResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/GetCompanyOverrideResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +18 -8
- package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/GetPlanEntitlementResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListCompanyOverridesResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureCompaniesResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureUsageParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureUsageResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureUsersParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListFeatureUsersResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +17 -7
- package/dist/serialization/resources/entitlements/types/ListPlanEntitlementsResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideResponse.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +17 -7
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementResponse.js +17 -7
- package/dist/serialization/resources/events/client/requests/CreateEventBatchRequestBody.js +17 -7
- package/dist/serialization/resources/events/types/CreateEventBatchResponse.js +17 -7
- package/dist/serialization/resources/events/types/CreateEventResponse.js +17 -7
- package/dist/serialization/resources/events/types/GetEventResponse.js +17 -7
- package/dist/serialization/resources/events/types/GetEventSummariesParams.js +17 -7
- package/dist/serialization/resources/events/types/GetEventSummariesResponse.js +17 -7
- package/dist/serialization/resources/events/types/GetSegmentIntegrationStatusResponse.js +17 -7
- package/dist/serialization/resources/events/types/ListEventsParams.js +17 -7
- package/dist/serialization/resources/events/types/ListEventsResponse.js +17 -7
- package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
- package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +19 -7
- package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
- package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +19 -7
- package/dist/serialization/resources/features/client/requests/UpdateFlagRulesRequestBody.js +17 -7
- package/dist/serialization/resources/features/types/CheckFlagResponse.js +17 -7
- package/dist/serialization/resources/features/types/CheckFlagsResponse.js +17 -7
- package/dist/serialization/resources/features/types/CountAudienceCompaniesResponse.js +17 -7
- package/dist/serialization/resources/features/types/CountAudienceUsersResponse.js +17 -7
- package/dist/serialization/resources/features/types/CountFeaturesParams.js +17 -7
- package/dist/serialization/resources/features/types/CountFeaturesResponse.js +17 -7
- package/dist/serialization/resources/features/types/CountFlagsParams.js +17 -7
- package/dist/serialization/resources/features/types/CountFlagsResponse.js +17 -7
- package/dist/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.js +17 -7
- package/dist/serialization/resources/features/types/CreateFeatureResponse.js +17 -7
- package/dist/serialization/resources/features/types/CreateFlagResponse.js +17 -7
- package/dist/serialization/resources/features/types/DeleteFeatureResponse.js +17 -7
- package/dist/serialization/resources/features/types/DeleteFlagResponse.js +17 -7
- package/dist/serialization/resources/features/types/GetFeatureResponse.js +17 -7
- package/dist/serialization/resources/features/types/GetFlagResponse.js +17 -7
- package/dist/serialization/resources/features/types/ListAudienceCompaniesResponse.js +17 -7
- package/dist/serialization/resources/features/types/ListAudienceUsersResponse.js +17 -7
- package/dist/serialization/resources/features/types/ListFeaturesParams.js +17 -7
- package/dist/serialization/resources/features/types/ListFeaturesResponse.js +17 -7
- package/dist/serialization/resources/features/types/ListFlagsParams.js +17 -7
- package/dist/serialization/resources/features/types/ListFlagsResponse.js +17 -7
- package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +17 -7
- package/dist/serialization/resources/features/types/UpdateFeatureResponse.js +17 -7
- package/dist/serialization/resources/features/types/UpdateFlagResponse.js +17 -7
- package/dist/serialization/resources/features/types/UpdateFlagRulesResponse.js +17 -7
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +21 -8
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +5 -1
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +22 -8
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +5 -1
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +22 -8
- package/dist/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +17 -7
- package/dist/serialization/resources/plangroups/types/GetPlanGroupResponse.js +17 -7
- package/dist/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +17 -7
- package/dist/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +17 -7
- package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
- package/dist/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
- package/dist/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.js +17 -7
- package/dist/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +17 -7
- package/dist/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +17 -7
- package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
- package/dist/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
- package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
- package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +19 -7
- package/dist/serialization/resources/plans/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/plans/client/requests/index.js +5 -1
- package/dist/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
- package/dist/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
- package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
- package/dist/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
- package/dist/serialization/resources/plans/types/CountPlansParams.js +17 -7
- package/dist/serialization/resources/plans/types/CountPlansRequestPlanType.js +17 -7
- package/dist/serialization/resources/plans/types/CountPlansResponse.js +17 -7
- package/dist/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +17 -7
- package/dist/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.js +17 -7
- package/dist/serialization/resources/plans/types/CreatePlanResponse.js +17 -7
- package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
- package/dist/serialization/resources/plans/types/DeleteAudienceResponse.js +17 -7
- package/dist/serialization/resources/plans/types/DeletePlanResponse.js +17 -7
- package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
- package/dist/serialization/resources/plans/types/GetAudienceResponse.js +17 -7
- package/dist/serialization/resources/plans/types/GetPlanResponse.js +17 -7
- package/dist/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
- package/dist/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
- package/dist/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
- package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
- package/dist/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.js +17 -7
- package/dist/serialization/resources/plans/types/ListPlansRequestPlanType.js +17 -7
- package/dist/serialization/resources/plans/types/ListPlansResponse.js +17 -7
- package/dist/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +17 -7
- package/dist/serialization/resources/plans/types/UpdateAudienceResponse.js +17 -7
- package/dist/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +17 -7
- package/dist/serialization/resources/plans/types/UpdatePlanResponse.js +17 -7
- package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
- package/dist/serialization/resources/plans/types/UpsertBillingProductPlanResponse.js +17 -7
- package/dist/serialization/resources/plans/types/index.d.ts +8 -0
- package/dist/serialization/resources/plans/types/index.js +8 -0
- package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
- package/dist/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +19 -7
- package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
- package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +19 -7
- package/dist/serialization/resources/webhooks/types/CountWebhookEventsParams.js +17 -7
- package/dist/serialization/resources/webhooks/types/CountWebhookEventsResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/CountWebhooksParams.js +17 -7
- package/dist/serialization/resources/webhooks/types/CountWebhooksResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +21 -7
- package/dist/serialization/resources/webhooks/types/CreateWebhookResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/DeleteWebhookResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/GetWebhookEventResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/GetWebhookResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/ListWebhookEventsParams.js +17 -7
- package/dist/serialization/resources/webhooks/types/ListWebhookEventsResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/ListWebhooksParams.js +17 -7
- package/dist/serialization/resources/webhooks/types/ListWebhooksResponse.js +17 -7
- package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +21 -7
- package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +17 -7
- package/dist/serialization/resources/webhooks/types/UpdateWebhookResponse.js +17 -7
- package/dist/serialization/types/ApiError.js +17 -7
- package/dist/serialization/types/ApiKeyCreateResponseData.js +17 -7
- package/dist/serialization/types/ApiKeyRequestListResponseData.js +17 -7
- package/dist/serialization/types/ApiKeyRequestResponseData.js +17 -7
- package/dist/serialization/types/ApiKeyResponseData.js +17 -7
- package/dist/serialization/types/AudienceRequestBody.js +17 -7
- package/dist/serialization/types/BillingCouponResponseData.js +17 -7
- package/dist/serialization/types/BillingCustomerResponseData.js +17 -7
- package/dist/serialization/types/BillingCustomerSubscription.js +17 -7
- package/dist/serialization/types/BillingCustomerWithSubscriptionsResponseData.js +17 -7
- package/dist/serialization/types/BillingMeterResponseData.js +17 -7
- package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingPriceResponseData.js +19 -7
- package/dist/serialization/types/BillingPriceView.d.ts +7 -0
- package/dist/serialization/types/BillingPriceView.js +24 -7
- package/dist/serialization/types/BillingProductDetailResponseData.d.ts +3 -0
- package/dist/serialization/types/BillingProductDetailResponseData.js +20 -7
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +22 -7
- package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductPlanResponseData.js +19 -7
- package/dist/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
- package/dist/serialization/types/BillingProductPriceResponseData.js +20 -7
- package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
- package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
- package/dist/serialization/types/BillingProductPricing.d.ts +4 -1
- package/dist/serialization/types/BillingProductPricing.js +21 -8
- package/dist/serialization/types/BillingProductPricingUsageType.d.ts +10 -0
- package/dist/serialization/types/BillingProductPricingUsageType.js +41 -0
- package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductResponseData.js +19 -7
- package/dist/serialization/types/BillingSubscriptionDiscount.js +17 -7
- package/dist/serialization/types/BillingSubscriptionDiscountView.js +17 -7
- package/dist/serialization/types/BillingSubscriptionResponseData.d.ts +3 -0
- package/dist/serialization/types/BillingSubscriptionResponseData.js +20 -7
- package/dist/serialization/types/BillingSubscriptionView.d.ts +3 -0
- package/dist/serialization/types/BillingSubscriptionView.js +20 -7
- package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +18 -7
- package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/serialization/types/ChangeSubscriptionRequestBody.js +18 -7
- package/dist/serialization/types/CheckFlagRequestBody.js +17 -7
- package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/dist/serialization/types/CheckFlagResponseData.js +18 -7
- package/dist/serialization/types/CheckFlagsResponseData.js +17 -7
- package/dist/serialization/types/CheckoutDataResponseData.d.ts +2 -0
- package/dist/serialization/types/CheckoutDataResponseData.js +19 -7
- package/dist/serialization/types/CompanyCrmDealsResponseData.js +17 -7
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +3 -0
- package/dist/serialization/types/CompanyDetailResponseData.js +20 -7
- package/dist/serialization/types/CompanyEventPeriodMetricsResponseData.js +17 -7
- package/dist/serialization/types/CompanyMembershipDetailResponseData.js +17 -7
- package/dist/serialization/types/CompanyMembershipResponseData.js +17 -7
- package/dist/serialization/types/CompanyOverrideResponseData.js +17 -7
- package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +6 -0
- package/dist/serialization/types/CompanyPlanDetailResponseData.js +23 -7
- package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/serialization/types/CompanyPlanWithBillingSubView.js +19 -7
- package/dist/serialization/types/CompanyResponseData.js +17 -7
- package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanySubscriptionResponseData.js +19 -7
- package/dist/serialization/types/ComponentCapabilities.d.ts +1 -0
- package/dist/serialization/types/ComponentCapabilities.js +18 -7
- package/dist/serialization/types/ComponentHydrateResponseData.js +17 -7
- package/dist/serialization/types/ComponentPreviewResponseData.js +17 -7
- package/dist/serialization/types/ComponentResponseData.js +17 -7
- package/dist/serialization/types/CountResponse.js +17 -7
- package/dist/serialization/types/CouponRequestBody.js +17 -7
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +16 -0
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +47 -0
- package/dist/serialization/types/CreateEntitlementReqCommon.js +17 -7
- package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +17 -7
- package/dist/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/types/CreateEntitlementReqCommonValueType.js +17 -7
- package/dist/serialization/types/CreateEventRequestBody.js +17 -7
- package/dist/serialization/types/CreateEventRequestBodyEventType.js +17 -7
- package/dist/serialization/types/CreateFlagRequestBody.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionGroupRequestBody.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionRequestBody.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +17 -7
- package/dist/serialization/types/CreateOrUpdateFlagRequestBody.js +17 -7
- package/dist/serialization/types/CreateOrUpdateRuleRequestBody.js +17 -7
- package/dist/serialization/types/CreateOrUpdateRuleRequestBodyRuleType.js +17 -7
- package/dist/serialization/types/CrmDealLineItem.js +17 -7
- package/dist/serialization/types/CrmDealResponseData.js +17 -7
- package/dist/serialization/types/CrmLineItemResponseData.js +17 -7
- package/dist/serialization/types/CrmProductResponseData.js +17 -7
- package/dist/serialization/types/CustomPlanConfig.d.ts +14 -0
- package/dist/serialization/types/CustomPlanConfig.js +45 -0
- package/dist/serialization/types/CustomPlanViewConfigResponseData.d.ts +14 -0
- package/dist/serialization/types/CustomPlanViewConfigResponseData.js +45 -0
- package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
- package/dist/serialization/types/DataExportResponseData.js +51 -0
- package/dist/serialization/types/Decimal.js +17 -7
- package/dist/serialization/types/DeleteResponse.js +17 -7
- package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
- package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
- package/dist/serialization/types/EntitlementsInPlan.d.ts +13 -0
- package/dist/serialization/types/EntitlementsInPlan.js +44 -0
- package/dist/serialization/types/EntityKeyDefinitionResponseData.js +17 -7
- package/dist/serialization/types/EntityKeyDetailResponseData.js +17 -7
- package/dist/serialization/types/EntityKeyResponseData.js +17 -7
- package/dist/serialization/types/EntityTraitDefinitionResponseData.js +17 -7
- package/dist/serialization/types/EntityTraitDetailResponseData.js +17 -7
- package/dist/serialization/types/EntityTraitResponseData.js +17 -7
- package/dist/serialization/types/EntityTraitValue.js +17 -7
- package/dist/serialization/types/EnvironmentDetailResponseData.js +17 -7
- package/dist/serialization/types/EnvironmentResponseData.js +17 -7
- package/dist/serialization/types/EventBody.js +17 -7
- package/dist/serialization/types/EventBodyFlagCheck.js +17 -7
- package/dist/serialization/types/EventBodyIdentify.js +17 -7
- package/dist/serialization/types/EventBodyIdentifyCompany.js +17 -7
- package/dist/serialization/types/EventBodyTrack.js +17 -7
- package/dist/serialization/types/EventDetailResponseData.js +17 -7
- package/dist/serialization/types/EventResponseData.js +17 -7
- package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
- package/dist/serialization/types/EventSummaryResponseData.js +19 -9
- package/dist/serialization/types/FeatureCompanyResponseData.js +17 -7
- package/dist/serialization/types/FeatureCompanyResponseDataAllocationType.js +17 -7
- package/dist/serialization/types/FeatureCompanyUserResponseData.js +17 -7
- package/dist/serialization/types/FeatureCompanyUserResponseDataAllocationType.js +17 -7
- package/dist/serialization/types/FeatureDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/FeatureDetailResponseData.js +19 -7
- package/dist/serialization/types/FeatureResponseData.d.ts +2 -0
- package/dist/serialization/types/FeatureResponseData.js +19 -7
- package/dist/serialization/types/FeatureUsageDetailResponseData.js +17 -7
- package/dist/serialization/types/FeatureUsageResponseData.d.ts +1 -0
- package/dist/serialization/types/FeatureUsageResponseData.js +18 -7
- package/dist/serialization/types/FeatureUsageResponseDataAllocationType.js +17 -7
- package/dist/serialization/types/FlagDetailResponseData.js +17 -7
- package/dist/serialization/types/FlagResponseData.js +17 -7
- package/dist/serialization/types/GenericPreviewObject.js +17 -7
- package/dist/serialization/types/InvoiceRequestBody.js +17 -7
- package/dist/serialization/types/InvoiceResponseData.js +17 -7
- package/dist/serialization/types/IssueTemporaryAccessTokenResponseData.js +17 -7
- package/dist/serialization/types/KeysRequestBody.js +17 -7
- package/dist/serialization/types/MeterRequestBody.js +17 -7
- package/dist/serialization/types/OrderedPlansInGroup.d.ts +14 -0
- package/dist/serialization/types/OrderedPlansInGroup.js +45 -0
- package/dist/serialization/types/PaginationFilter.js +17 -7
- package/dist/serialization/types/PaymentMethodRequestBody.d.ts +0 -1
- package/dist/serialization/types/PaymentMethodRequestBody.js +17 -8
- package/dist/serialization/types/PaymentMethodResponseData.d.ts +0 -1
- package/dist/serialization/types/PaymentMethodResponseData.js +17 -8
- package/dist/serialization/types/PlanAudienceDetailResponseData.js +17 -7
- package/dist/serialization/types/PlanAudienceResponseData.js +17 -7
- package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanDetailResponseData.js +19 -7
- package/dist/serialization/types/PlanEntitlementResponseData.d.ts +3 -0
- package/dist/serialization/types/PlanEntitlementResponseData.js +20 -7
- package/dist/serialization/types/PlanEntitlementsOrder.d.ts +13 -0
- package/dist/serialization/types/PlanEntitlementsOrder.js +44 -0
- package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +5 -0
- package/dist/serialization/types/PlanGroupDetailResponseData.js +22 -7
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +5 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +22 -7
- package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.d.ts +14 -0
- package/dist/serialization/types/PlanGroupPlanEntitlementsOrder.js +45 -0
- package/dist/serialization/types/PlanGroupResponseData.d.ts +2 -1
- package/dist/serialization/types/PlanGroupResponseData.js +19 -8
- package/dist/serialization/types/PlanResponseData.js +17 -7
- package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
- package/dist/serialization/types/PlanTraitResponseData.js +50 -0
- package/dist/serialization/types/PreviewObject.js +17 -7
- package/dist/serialization/types/PreviewObjectResponseData.js +17 -7
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +21 -7
- package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
- package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
- package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
- package/dist/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
- package/dist/serialization/types/QuickstartResp.d.ts +12 -0
- package/dist/serialization/types/QuickstartResp.js +43 -0
- package/dist/serialization/types/RawEventBatchResponseData.js +17 -7
- package/dist/serialization/types/RawEventResponseData.js +17 -7
- package/dist/serialization/types/RuleConditionDetailResponseData.js +17 -7
- package/dist/serialization/types/RuleConditionGroupDetailResponseData.js +17 -7
- package/dist/serialization/types/RuleConditionGroupResponseData.js +17 -7
- package/dist/serialization/types/RuleConditionResponseData.js +17 -7
- package/dist/serialization/types/RuleDetailResponseData.js +17 -7
- package/dist/serialization/types/RuleResponseData.js +17 -7
- package/dist/serialization/types/RulesDetailResponseData.js +17 -7
- package/dist/serialization/types/SegmentStatusResp.js +17 -7
- package/dist/serialization/types/StripeEmbedInfo.js +17 -7
- package/dist/serialization/types/TemporaryAccessTokenResponseData.js +17 -7
- package/dist/serialization/types/UpdateAddOnRequestBody.js +17 -7
- package/dist/serialization/types/UpdateEntitlementReqCommon.js +17 -7
- package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +17 -7
- package/dist/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
- package/dist/serialization/types/UpdateEntitlementReqCommonValueType.js +17 -7
- package/dist/serialization/types/UpdatePayInAdvanceRequestBody.js +17 -7
- package/dist/serialization/types/UpdateRuleRequestBody.js +17 -7
- package/dist/serialization/types/UpsertCompanyRequestBody.js +17 -7
- package/dist/serialization/types/UpsertTraitRequestBody.js +17 -7
- package/dist/serialization/types/UpsertUserRequestBody.d.ts +2 -0
- package/dist/serialization/types/UpsertUserRequestBody.js +19 -7
- package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertUserSubRequestBody.js +18 -7
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +24 -7
- package/dist/serialization/types/UsageBasedEntitlementResponseData.js +17 -7
- package/dist/serialization/types/UserDetailResponseData.js +17 -7
- package/dist/serialization/types/UserResponseData.js +17 -7
- package/dist/serialization/types/WebhookEventDetailResponseData.js +17 -7
- package/dist/serialization/types/WebhookEventResponseData.js +17 -7
- package/dist/serialization/types/WebhookResponseData.d.ts +3 -0
- package/dist/serialization/types/WebhookResponseData.js +20 -7
- package/dist/serialization/types/index.d.ts +15 -0
- package/dist/serialization/types/index.js +15 -0
- package/dist/webhooks.d.ts +76 -0
- package/dist/webhooks.js +170 -0
- package/environments.d.ts +1 -1
- package/errors/SchematicError.d.ts +4 -1
- package/errors/SchematicError.js +6 -8
- package/errors/SchematicTimeoutError.d.ts +1 -1
- package/errors/SchematicTimeoutError.js +2 -2
- package/events.d.ts +4 -0
- package/events.js +41 -5
- package/events.test.js +51 -4
- package/index.d.ts +1 -0
- package/index.js +26 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +18 -16
- package/reference.md +532 -21
- package/scripts/rename-to-esm-files.js +115 -0
- package/scripts/webhook-test-server/README.md +24 -0
- package/scripts/webhook-test-server/package-lock.json +196 -0
- package/scripts/webhook-test-server/package.json +13 -0
- package/scripts/webhook-test-server/webhook-test-server.ts +100 -0
- package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +17 -7
- package/serialization/resources/accesstokens/types/IssueTemporaryAccessTokenResponse.js +17 -7
- package/serialization/resources/accounts/client/requests/CreateApiKeyRequestBody.js +17 -7
- package/serialization/resources/accounts/client/requests/CreateEnvironmentRequestBody.js +17 -7
- package/serialization/resources/accounts/client/requests/UpdateApiKeyRequestBody.js +17 -7
- package/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.js +17 -7
- package/serialization/resources/accounts/types/CountApiKeysParams.js +17 -7
- package/serialization/resources/accounts/types/CountApiKeysResponse.js +17 -7
- package/serialization/resources/accounts/types/CountApiRequestsParams.js +17 -7
- package/serialization/resources/accounts/types/CountApiRequestsResponse.js +17 -7
- package/serialization/resources/accounts/types/CreateApiKeyResponse.js +17 -7
- package/serialization/resources/accounts/types/CreateEnvironmentRequestBodyEnvironmentType.js +17 -7
- package/serialization/resources/accounts/types/CreateEnvironmentResponse.js +17 -7
- package/serialization/resources/accounts/types/DeleteApiKeyResponse.js +17 -7
- package/serialization/resources/accounts/types/DeleteEnvironmentResponse.js +17 -7
- package/serialization/resources/accounts/types/GetApiKeyResponse.js +17 -7
- package/serialization/resources/accounts/types/GetApiRequestResponse.js +17 -7
- package/serialization/resources/accounts/types/GetEnvironmentResponse.js +17 -7
- package/serialization/resources/accounts/types/ListApiKeysParams.js +17 -7
- package/serialization/resources/accounts/types/ListApiKeysResponse.js +17 -7
- package/serialization/resources/accounts/types/ListApiRequestsParams.js +17 -7
- package/serialization/resources/accounts/types/ListApiRequestsResponse.js +17 -7
- package/serialization/resources/accounts/types/ListEnvironmentsParams.js +17 -7
- package/serialization/resources/accounts/types/ListEnvironmentsResponse.js +17 -7
- package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
- package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
- package/serialization/resources/accounts/types/UpdateApiKeyResponse.js +17 -7
- package/serialization/resources/accounts/types/UpdateEnvironmentRequestBodyEnvironmentType.js +17 -7
- package/serialization/resources/accounts/types/UpdateEnvironmentResponse.js +17 -7
- package/serialization/resources/accounts/types/index.d.ts +1 -0
- package/serialization/resources/accounts/types/index.js +1 -0
- package/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.d.ts +1 -0
- package/serialization/resources/billing/client/requests/CreateBillingCustomerRequestBody.js +18 -7
- package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +11 -1
- package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +28 -8
- package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -2
- package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +18 -9
- package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.d.ts +5 -1
- package/serialization/resources/billing/client/requests/CreateBillingSubscriptionsRequestBody.js +22 -8
- package/serialization/resources/billing/client/requests/CreateCouponRequestBody.js +17 -7
- package/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.js +17 -7
- package/serialization/resources/billing/client/requests/CreateMeterRequestBody.js +17 -7
- package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.d.ts +0 -1
- package/serialization/resources/billing/client/requests/CreatePaymentMethodRequestBody.js +17 -8
- package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +4 -1
- package/serialization/resources/billing/types/CountBillingProductsParams.js +21 -8
- package/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/CountBillingProductsRequestPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/CountBillingProductsResponse.js +17 -7
- package/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/CountBillingProductsResponseParamsPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/serialization/resources/billing/types/CountCustomersParams.js +18 -7
- package/serialization/resources/billing/types/CountCustomersResponse.js +17 -7
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js +41 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyUsageType.js +41 -0
- package/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.js +41 -0
- package/serialization/resources/billing/types/DeleteBillingProductResponse.d.ts +14 -0
- package/serialization/resources/billing/types/DeleteBillingProductResponse.js +45 -0
- package/serialization/resources/billing/types/DeleteProductPriceResponse.js +17 -7
- package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +4 -1
- package/serialization/resources/billing/types/ListBillingProductsParams.js +21 -8
- package/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/ListBillingProductsRequestPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/ListBillingProductsResponse.js +17 -7
- package/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/ListBillingProductsResponseParamsPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/ListCouponsParams.d.ts +15 -0
- package/serialization/resources/billing/types/ListCouponsParams.js +46 -0
- package/serialization/resources/billing/types/ListCouponsResponse.d.ts +15 -0
- package/serialization/resources/billing/types/ListCouponsResponse.js +46 -0
- package/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
- package/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +20 -9
- package/{dist/serialization/resources/billing/types/ListCustomersResponse.d.ts → serialization/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
- package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +21 -11
- package/serialization/resources/billing/types/ListInvoicesParams.js +17 -7
- package/serialization/resources/billing/types/ListInvoicesResponse.js +17 -7
- package/serialization/resources/billing/types/ListMetersParams.js +17 -7
- package/serialization/resources/billing/types/ListMetersResponse.js +17 -7
- package/serialization/resources/billing/types/ListPaymentMethodsParams.d.ts +0 -1
- package/serialization/resources/billing/types/ListPaymentMethodsParams.js +17 -8
- package/serialization/resources/billing/types/ListPaymentMethodsResponse.js +17 -7
- package/serialization/resources/billing/types/ListProductPricesParams.d.ts +4 -1
- package/serialization/resources/billing/types/ListProductPricesParams.js +21 -8
- package/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/ListProductPricesRequestPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/ListProductPricesResponse.js +17 -7
- package/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/ListProductPricesResponseParamsPriceUsageType.js +41 -0
- package/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +3 -1
- package/serialization/resources/billing/types/SearchBillingPricesParams.js +20 -8
- package/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/SearchBillingPricesRequestUsageType.js +41 -0
- package/serialization/resources/billing/types/SearchBillingPricesResponse.js +17 -7
- package/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.d.ts +10 -0
- package/serialization/resources/billing/types/SearchBillingPricesResponseParamsUsageType.js +41 -0
- package/serialization/resources/billing/types/UpsertBillingCouponResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertBillingCustomerResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertBillingMeterResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertBillingPriceResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertBillingProductResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertBillingSubscriptionResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertInvoiceResponse.js +17 -7
- package/serialization/resources/billing/types/UpsertPaymentMethodResponse.js +17 -7
- package/serialization/resources/billing/types/index.d.ts +17 -2
- package/serialization/resources/billing/types/index.js +17 -2
- package/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.d.ts +13 -0
- package/serialization/resources/checkout/client/requests/CheckoutDataRequestBody.js +44 -0
- package/serialization/resources/checkout/client/requests/UpdateTrialEndRequestBody.js +17 -7
- package/serialization/resources/checkout/client/requests/index.d.ts +1 -0
- package/serialization/resources/checkout/client/requests/index.js +3 -1
- package/serialization/resources/checkout/types/CheckoutInternalResponse.js +17 -7
- package/serialization/resources/checkout/types/GetCheckoutDataResponse.js +17 -7
- package/serialization/resources/checkout/types/PreviewCheckoutInternalResponse.js +17 -7
- package/serialization/resources/checkout/types/UpdateCustomerSubscriptionTrialEndResponse.js +17 -7
- package/serialization/resources/companies/client/requests/CreateEntityTraitDefinitionRequestBody.js +17 -7
- package/serialization/resources/companies/client/requests/GetOrCreateCompanyMembershipRequestBody.js +17 -7
- package/serialization/resources/companies/client/requests/UpdateEntityTraitDefinitionRequestBody.js +17 -7
- package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/serialization/resources/companies/types/CountCompaniesParams.js +18 -7
- package/serialization/resources/companies/types/CountCompaniesResponse.js +17 -7
- package/serialization/resources/companies/types/CountEntityKeyDefinitionsParams.js +17 -7
- package/serialization/resources/companies/types/CountEntityKeyDefinitionsRequestEntityType.js +17 -7
- package/serialization/resources/companies/types/CountEntityKeyDefinitionsResponse.js +17 -7
- package/serialization/resources/companies/types/CountEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsParams.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestEntityType.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsRequestTraitType.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponse.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
- package/serialization/resources/companies/types/CountEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
- package/serialization/resources/companies/types/CountUsersParams.js +17 -7
- package/serialization/resources/companies/types/CountUsersResponse.js +17 -7
- package/serialization/resources/companies/types/CreateCompanyResponse.js +17 -7
- package/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyEntityType.js +17 -7
- package/serialization/resources/companies/types/CreateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
- package/serialization/resources/companies/types/CreateUserResponse.js +17 -7
- package/serialization/resources/companies/types/DeleteCompanyByKeysResponse.js +17 -7
- package/serialization/resources/companies/types/DeleteCompanyMembershipResponse.js +17 -7
- package/serialization/resources/companies/types/DeleteCompanyResponse.js +17 -7
- package/serialization/resources/companies/types/DeleteUserByKeysResponse.js +17 -7
- package/serialization/resources/companies/types/DeleteUserResponse.js +17 -7
- package/serialization/resources/companies/types/GetActiveCompanySubscriptionParams.js +17 -7
- package/serialization/resources/companies/types/GetActiveCompanySubscriptionResponse.js +17 -7
- package/serialization/resources/companies/types/GetActiveDealsParams.js +17 -7
- package/serialization/resources/companies/types/GetActiveDealsResponse.js +17 -7
- package/serialization/resources/companies/types/GetCompanyResponse.js +17 -7
- package/serialization/resources/companies/types/GetEntityTraitDefinitionResponse.js +17 -7
- package/serialization/resources/companies/types/GetEntityTraitValuesParams.js +17 -7
- package/serialization/resources/companies/types/GetEntityTraitValuesResponse.js +17 -7
- package/serialization/resources/companies/types/GetOrCreateCompanyMembershipResponse.js +17 -7
- package/serialization/resources/companies/types/GetOrCreateEntityTraitDefinitionResponse.js +17 -7
- package/serialization/resources/companies/types/GetUserResponse.js +17 -7
- package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
- package/serialization/resources/companies/types/ListCompaniesParams.js +18 -7
- package/serialization/resources/companies/types/ListCompaniesResponse.js +17 -7
- package/serialization/resources/companies/types/ListCompanyMembershipsParams.js +17 -7
- package/serialization/resources/companies/types/ListCompanyMembershipsResponse.js +17 -7
- package/serialization/resources/companies/types/ListEntityKeyDefinitionsParams.js +17 -7
- package/serialization/resources/companies/types/ListEntityKeyDefinitionsRequestEntityType.js +17 -7
- package/serialization/resources/companies/types/ListEntityKeyDefinitionsResponse.js +17 -7
- package/serialization/resources/companies/types/ListEntityKeyDefinitionsResponseParamsEntityType.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsParams.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestEntityType.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsRequestTraitType.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponse.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsEntityType.js +17 -7
- package/serialization/resources/companies/types/ListEntityTraitDefinitionsResponseParamsTraitType.js +17 -7
- package/serialization/resources/companies/types/ListUsersParams.js +17 -7
- package/serialization/resources/companies/types/ListUsersResponse.js +17 -7
- package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/serialization/resources/companies/types/LookupCompanyParams.js +18 -8
- package/serialization/resources/companies/types/LookupCompanyResponse.js +17 -7
- package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/serialization/resources/companies/types/LookupUserParams.js +18 -8
- package/serialization/resources/companies/types/LookupUserResponse.js +17 -7
- package/serialization/resources/companies/types/UpdateEntityTraitDefinitionRequestBodyTraitType.js +17 -7
- package/serialization/resources/companies/types/UpdateEntityTraitDefinitionResponse.js +17 -7
- package/serialization/resources/companies/types/UpsertCompanyResponse.js +17 -7
- package/serialization/resources/companies/types/UpsertCompanyTraitResponse.js +17 -7
- package/serialization/resources/companies/types/UpsertUserResponse.js +17 -7
- package/serialization/resources/companies/types/UpsertUserTraitResponse.js +17 -7
- package/serialization/resources/components/client/requests/CreateComponentRequestBody.js +17 -7
- package/serialization/resources/components/client/requests/UpdateComponentRequestBody.js +17 -7
- package/serialization/resources/components/types/CountComponentsParams.js +17 -7
- package/serialization/resources/components/types/CountComponentsResponse.js +17 -7
- package/serialization/resources/components/types/CreateComponentRequestBodyEntityType.js +17 -7
- package/serialization/resources/components/types/CreateComponentResponse.js +17 -7
- package/serialization/resources/components/types/DeleteComponentResponse.js +17 -7
- package/serialization/resources/components/types/GetComponentResponse.js +17 -7
- package/serialization/resources/components/types/ListComponentsParams.js +17 -7
- package/serialization/resources/components/types/ListComponentsResponse.js +17 -7
- package/serialization/resources/components/types/PreviewComponentDataParams.js +17 -7
- package/serialization/resources/components/types/PreviewComponentDataResponse.js +17 -7
- package/serialization/resources/components/types/UpdateComponentRequestBodyEntityType.js +17 -7
- package/serialization/resources/components/types/UpdateComponentRequestBodyState.js +17 -7
- package/serialization/resources/components/types/UpdateComponentResponse.js +17 -7
- package/serialization/resources/crm/client/requests/CreateCrmDealLineItemAssociationRequestBody.js +17 -7
- package/serialization/resources/crm/client/requests/CreateCrmDealRequestBody.js +17 -7
- package/serialization/resources/crm/client/requests/CreateCrmLineItemRequestBody.js +17 -7
- package/serialization/resources/crm/client/requests/CreateCrmProductRequestBody.js +17 -7
- package/serialization/resources/crm/types/ListCrmProductsParams.js +17 -7
- package/serialization/resources/crm/types/ListCrmProductsResponse.js +17 -7
- package/serialization/resources/crm/types/UpsertCrmDealResponse.js +17 -7
- package/serialization/resources/crm/types/UpsertCrmProductResponse.js +17 -7
- package/serialization/resources/crm/types/UpsertDealLineItemAssociationResponse.js +17 -7
- package/serialization/resources/crm/types/UpsertLineItemResponse.js +17 -7
- package/serialization/resources/dataexports/client/index.d.ts +1 -0
- package/serialization/resources/dataexports/client/index.js +17 -0
- package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
- package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
- package/serialization/resources/dataexports/client/requests/index.js +5 -0
- package/serialization/resources/dataexports/index.d.ts +2 -0
- package/serialization/resources/dataexports/index.js +18 -0
- package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
- package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
- package/serialization/resources/dataexports/types/index.d.ts +1 -0
- package/serialization/resources/dataexports/types/index.js +17 -0
- package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +17 -7
- package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +7 -0
- package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +24 -7
- package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +17 -7
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +7 -0
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +24 -7
- package/serialization/resources/entitlements/types/CountCompanyOverridesParams.js +17 -7
- package/serialization/resources/entitlements/types/CountCompanyOverridesResponse.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureCompaniesParams.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureCompaniesResponse.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureUsageParams.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureUsageResponse.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureUsersParams.js +17 -7
- package/serialization/resources/entitlements/types/CountFeatureUsersResponse.js +17 -7
- package/serialization/resources/entitlements/types/CountPlanEntitlementsParams.js +17 -7
- package/serialization/resources/entitlements/types/CountPlanEntitlementsResponse.js +17 -7
- package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
- package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
- package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +17 -7
- package/serialization/resources/entitlements/types/CreateCompanyOverrideResponse.js +17 -7
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +17 -7
- package/serialization/resources/entitlements/types/CreatePlanEntitlementResponse.js +17 -7
- package/serialization/resources/entitlements/types/DeleteCompanyOverrideResponse.js +17 -7
- package/serialization/resources/entitlements/types/DeletePlanEntitlementResponse.js +17 -7
- package/serialization/resources/entitlements/types/GetCompanyOverrideResponse.js +17 -7
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +18 -8
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyResponse.js +17 -7
- package/serialization/resources/entitlements/types/GetPlanEntitlementResponse.js +17 -7
- package/serialization/resources/entitlements/types/ListCompanyOverridesParams.js +17 -7
- package/serialization/resources/entitlements/types/ListCompanyOverridesResponse.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureCompaniesParams.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureCompaniesResponse.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureUsageParams.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureUsageResponse.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureUsersParams.js +17 -7
- package/serialization/resources/entitlements/types/ListFeatureUsersResponse.js +17 -7
- package/serialization/resources/entitlements/types/ListPlanEntitlementsParams.js +17 -7
- package/serialization/resources/entitlements/types/ListPlanEntitlementsResponse.js +17 -7
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriod.js +17 -7
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyMetricPeriodMonthReset.js +17 -7
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +17 -7
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideResponse.js +17 -7
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriod.js +17 -7
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyMetricPeriodMonthReset.js +17 -7
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +17 -7
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementResponse.js +17 -7
- package/serialization/resources/events/client/requests/CreateEventBatchRequestBody.js +17 -7
- package/serialization/resources/events/types/CreateEventBatchResponse.js +17 -7
- package/serialization/resources/events/types/CreateEventResponse.js +17 -7
- package/serialization/resources/events/types/GetEventResponse.js +17 -7
- package/serialization/resources/events/types/GetEventSummariesParams.js +17 -7
- package/serialization/resources/events/types/GetEventSummariesResponse.js +17 -7
- package/serialization/resources/events/types/GetSegmentIntegrationStatusResponse.js +17 -7
- package/serialization/resources/events/types/ListEventsParams.js +17 -7
- package/serialization/resources/events/types/ListEventsResponse.js +17 -7
- package/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -0
- package/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +19 -7
- package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -0
- package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +19 -7
- package/serialization/resources/features/client/requests/UpdateFlagRulesRequestBody.js +17 -7
- package/serialization/resources/features/types/CheckFlagResponse.js +17 -7
- package/serialization/resources/features/types/CheckFlagsResponse.js +17 -7
- package/serialization/resources/features/types/CountAudienceCompaniesResponse.js +17 -7
- package/serialization/resources/features/types/CountAudienceUsersResponse.js +17 -7
- package/serialization/resources/features/types/CountFeaturesParams.js +17 -7
- package/serialization/resources/features/types/CountFeaturesResponse.js +17 -7
- package/serialization/resources/features/types/CountFlagsParams.js +17 -7
- package/serialization/resources/features/types/CountFlagsResponse.js +17 -7
- package/serialization/resources/features/types/CreateFeatureRequestBodyFeatureType.js +17 -7
- package/serialization/resources/features/types/CreateFeatureResponse.js +17 -7
- package/serialization/resources/features/types/CreateFlagResponse.js +17 -7
- package/serialization/resources/features/types/DeleteFeatureResponse.js +17 -7
- package/serialization/resources/features/types/DeleteFlagResponse.js +17 -7
- package/serialization/resources/features/types/GetFeatureResponse.js +17 -7
- package/serialization/resources/features/types/GetFlagResponse.js +17 -7
- package/serialization/resources/features/types/ListAudienceCompaniesResponse.js +17 -7
- package/serialization/resources/features/types/ListAudienceUsersResponse.js +17 -7
- package/serialization/resources/features/types/ListFeaturesParams.js +17 -7
- package/serialization/resources/features/types/ListFeaturesResponse.js +17 -7
- package/serialization/resources/features/types/ListFlagsParams.js +17 -7
- package/serialization/resources/features/types/ListFlagsResponse.js +17 -7
- package/serialization/resources/features/types/UpdateFeatureRequestBodyFeatureType.js +17 -7
- package/serialization/resources/features/types/UpdateFeatureResponse.js +17 -7
- package/serialization/resources/features/types/UpdateFlagResponse.js +17 -7
- package/serialization/resources/features/types/UpdateFlagRulesResponse.js +17 -7
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +21 -8
- package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +5 -1
- package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +22 -8
- package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +5 -1
- package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +22 -8
- package/serialization/resources/plangroups/types/CreatePlanGroupResponse.js +17 -7
- package/serialization/resources/plangroups/types/GetPlanGroupResponse.js +17 -7
- package/serialization/resources/plangroups/types/UpdatePlanGroupResponse.js +17 -7
- package/serialization/resources/plans/client/requests/CreatePlanRequestBody.js +17 -7
- package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.d.ts +14 -0
- package/serialization/resources/plans/client/requests/CreatePlanTraitRequestBody.js +45 -0
- package/serialization/resources/plans/client/requests/UpdateAudienceRequestBody.js +17 -7
- package/serialization/resources/plans/client/requests/UpdateCompanyPlansRequestBody.js +17 -7
- package/serialization/resources/plans/client/requests/UpdatePlanRequestBody.js +17 -7
- package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.d.ts +13 -0
- package/serialization/resources/plans/client/requests/UpdatePlanTraitRequestBody.js +44 -0
- package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.d.ts +2 -0
- package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +19 -7
- package/serialization/resources/plans/client/requests/index.d.ts +2 -0
- package/serialization/resources/plans/client/requests/index.js +5 -1
- package/serialization/resources/plans/types/CountPlanTraitsParams.d.ts +16 -0
- package/serialization/resources/plans/types/CountPlanTraitsParams.js +47 -0
- package/serialization/resources/plans/types/CountPlanTraitsResponse.d.ts +15 -0
- package/serialization/resources/plans/types/CountPlanTraitsResponse.js +46 -0
- package/serialization/resources/plans/types/CountPlansParams.js +17 -7
- package/serialization/resources/plans/types/CountPlansRequestPlanType.js +17 -7
- package/serialization/resources/plans/types/CountPlansResponse.js +17 -7
- package/serialization/resources/plans/types/CountPlansResponseParamsPlanType.js +17 -7
- package/serialization/resources/plans/types/CreatePlanRequestBodyPlanType.js +17 -7
- package/serialization/resources/plans/types/CreatePlanResponse.js +17 -7
- package/serialization/resources/plans/types/CreatePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
- package/serialization/resources/plans/types/DeleteAudienceResponse.js +17 -7
- package/serialization/resources/plans/types/DeletePlanResponse.js +17 -7
- package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
- package/serialization/resources/plans/types/GetAudienceResponse.js +17 -7
- package/serialization/resources/plans/types/GetPlanResponse.js +17 -7
- package/serialization/resources/plans/types/GetPlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/GetPlanTraitResponse.js +45 -0
- package/serialization/resources/plans/types/ListPlanTraitsParams.d.ts +16 -0
- package/serialization/resources/plans/types/ListPlanTraitsParams.js +47 -0
- package/serialization/resources/plans/types/ListPlanTraitsResponse.d.ts +15 -0
- package/serialization/resources/plans/types/ListPlanTraitsResponse.js +46 -0
- package/serialization/resources/plans/types/ListPlansParams.js +17 -7
- package/serialization/resources/plans/types/ListPlansRequestPlanType.js +17 -7
- package/serialization/resources/plans/types/ListPlansResponse.js +17 -7
- package/serialization/resources/plans/types/ListPlansResponseParamsPlanType.js +17 -7
- package/serialization/resources/plans/types/UpdateAudienceResponse.js +17 -7
- package/serialization/resources/plans/types/UpdateCompanyPlansResponse.js +17 -7
- package/serialization/resources/plans/types/UpdatePlanResponse.js +17 -7
- package/serialization/resources/plans/types/UpdatePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
- package/serialization/resources/plans/types/UpsertBillingProductPlanResponse.js +17 -7
- package/serialization/resources/plans/types/index.d.ts +8 -0
- package/serialization/resources/plans/types/index.js +8 -0
- package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.d.ts +2 -0
- package/serialization/resources/webhooks/client/requests/CreateWebhookRequestBody.js +19 -7
- package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
- package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +19 -7
- package/serialization/resources/webhooks/types/CountWebhookEventsParams.js +17 -7
- package/serialization/resources/webhooks/types/CountWebhookEventsResponse.js +17 -7
- package/serialization/resources/webhooks/types/CountWebhooksParams.js +17 -7
- package/serialization/resources/webhooks/types/CountWebhooksResponse.js +17 -7
- package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +21 -7
- package/serialization/resources/webhooks/types/CreateWebhookResponse.js +17 -7
- package/serialization/resources/webhooks/types/DeleteWebhookResponse.js +17 -7
- package/serialization/resources/webhooks/types/GetWebhookEventResponse.js +17 -7
- package/serialization/resources/webhooks/types/GetWebhookResponse.js +17 -7
- package/serialization/resources/webhooks/types/ListWebhookEventsParams.js +17 -7
- package/serialization/resources/webhooks/types/ListWebhookEventsResponse.js +17 -7
- package/serialization/resources/webhooks/types/ListWebhooksParams.js +17 -7
- package/serialization/resources/webhooks/types/ListWebhooksResponse.js +17 -7
- package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +21 -7
- package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyStatus.js +17 -7
- package/serialization/resources/webhooks/types/UpdateWebhookResponse.js +17 -7
- package/serialization/types/ApiError.js +17 -7
- package/serialization/types/ApiKeyCreateResponseData.js +17 -7
- package/serialization/types/ApiKeyRequestListResponseData.js +17 -7
- package/serialization/types/ApiKeyRequestResponseData.js +17 -7
- package/serialization/types/ApiKeyResponseData.js +17 -7
- package/serialization/types/AudienceRequestBody.js +17 -7
- package/serialization/types/BillingCouponResponseData.js +17 -7
- package/serialization/types/BillingCustomerResponseData.js +17 -7
- package/serialization/types/BillingCustomerSubscription.js +17 -7
- package/serialization/types/BillingCustomerWithSubscriptionsResponseData.js +17 -7
- package/serialization/types/BillingMeterResponseData.js +17 -7
- package/serialization/types/BillingPriceResponseData.d.ts +2 -0
- package/serialization/types/BillingPriceResponseData.js +19 -7
- package/serialization/types/BillingPriceView.d.ts +7 -0
- package/serialization/types/BillingPriceView.js +24 -7
- package/serialization/types/BillingProductDetailResponseData.d.ts +3 -0
- package/serialization/types/BillingProductDetailResponseData.js +20 -7
- package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/serialization/types/BillingProductForSubscriptionResponseData.js +22 -7
- package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
- package/serialization/types/BillingProductPlanResponseData.js +19 -7
- package/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
- package/serialization/types/BillingProductPriceResponseData.js +20 -7
- package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
- package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
- package/serialization/types/BillingProductPricing.d.ts +4 -1
- package/serialization/types/BillingProductPricing.js +21 -8
- package/serialization/types/BillingProductPricingUsageType.d.ts +10 -0
- package/serialization/types/BillingProductPricingUsageType.js +41 -0
- package/serialization/types/BillingProductResponseData.d.ts +2 -0
- package/serialization/types/BillingProductResponseData.js +19 -7
- package/serialization/types/BillingSubscriptionDiscount.js +17 -7
- package/serialization/types/BillingSubscriptionDiscountView.js +17 -7
- package/serialization/types/BillingSubscriptionResponseData.d.ts +3 -0
- package/serialization/types/BillingSubscriptionResponseData.js +20 -7
- package/serialization/types/BillingSubscriptionView.d.ts +3 -0
- package/serialization/types/BillingSubscriptionView.js +20 -7
- package/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/serialization/types/ChangeSubscriptionInternalRequestBody.js +18 -7
- package/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/serialization/types/ChangeSubscriptionRequestBody.js +18 -7
- package/serialization/types/CheckFlagRequestBody.js +17 -7
- package/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/serialization/types/CheckFlagResponseData.js +18 -7
- package/serialization/types/CheckFlagsResponseData.js +17 -7
- package/serialization/types/CheckoutDataResponseData.d.ts +2 -0
- package/serialization/types/CheckoutDataResponseData.js +19 -7
- package/serialization/types/CompanyCrmDealsResponseData.js +17 -7
- package/serialization/types/CompanyDetailResponseData.d.ts +3 -0
- package/serialization/types/CompanyDetailResponseData.js +20 -7
- package/serialization/types/CompanyEventPeriodMetricsResponseData.js +17 -7
- package/serialization/types/CompanyMembershipDetailResponseData.js +17 -7
- package/serialization/types/CompanyMembershipResponseData.js +17 -7
- package/serialization/types/CompanyOverrideResponseData.js +17 -7
- package/serialization/types/CompanyPlanDetailResponseData.d.ts +6 -0
- package/serialization/types/CompanyPlanDetailResponseData.js +23 -7
- package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/serialization/types/CompanyPlanWithBillingSubView.js +19 -7
- package/serialization/types/CompanyResponseData.js +17 -7
- package/serialization/types/CompanySubscriptionResponseData.d.ts +2 -0
- package/serialization/types/CompanySubscriptionResponseData.js +19 -7
- package/serialization/types/ComponentCapabilities.d.ts +1 -0
- package/serialization/types/ComponentCapabilities.js +18 -7
- package/serialization/types/ComponentHydrateResponseData.js +17 -7
- package/serialization/types/ComponentPreviewResponseData.js +17 -7
- package/serialization/types/ComponentResponseData.js +17 -7
- package/serialization/types/CountResponse.js +17 -7
- package/serialization/types/CouponRequestBody.js +17 -7
- package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +16 -0
- package/serialization/types/CreateBillingPriceTierRequestBody.js +47 -0
- package/serialization/types/CreateEntitlementReqCommon.js +17 -7
- package/serialization/types/CreateEntitlementReqCommonMetricPeriod.js +17 -7
- package/serialization/types/CreateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
- package/serialization/types/CreateEntitlementReqCommonValueType.js +17 -7
- package/serialization/types/CreateEventRequestBody.js +17 -7
- package/serialization/types/CreateEventRequestBodyEventType.js +17 -7
- package/serialization/types/CreateFlagRequestBody.js +17 -7
- package/serialization/types/CreateOrUpdateConditionGroupRequestBody.js +17 -7
- package/serialization/types/CreateOrUpdateConditionRequestBody.js +17 -7
- package/serialization/types/CreateOrUpdateConditionRequestBodyConditionType.js +17 -7
- package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriod.js +17 -7
- package/serialization/types/CreateOrUpdateConditionRequestBodyMetricPeriodMonthReset.js +17 -7
- package/serialization/types/CreateOrUpdateConditionRequestBodyOperator.js +17 -7
- package/serialization/types/CreateOrUpdateFlagRequestBody.js +17 -7
- package/serialization/types/CreateOrUpdateRuleRequestBody.js +17 -7
- package/serialization/types/CreateOrUpdateRuleRequestBodyRuleType.js +17 -7
- package/serialization/types/CrmDealLineItem.js +17 -7
- package/serialization/types/CrmDealResponseData.js +17 -7
- package/serialization/types/CrmLineItemResponseData.js +17 -7
- package/serialization/types/CrmProductResponseData.js +17 -7
- package/serialization/types/CustomPlanConfig.d.ts +14 -0
- package/serialization/types/CustomPlanConfig.js +45 -0
- package/serialization/types/CustomPlanViewConfigResponseData.d.ts +14 -0
- package/serialization/types/CustomPlanViewConfigResponseData.js +45 -0
- package/serialization/types/DataExportResponseData.d.ts +20 -0
- package/serialization/types/DataExportResponseData.js +51 -0
- package/serialization/types/Decimal.js +17 -7
- package/serialization/types/DeleteResponse.js +17 -7
- package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
- package/serialization/types/EntitlementTriggerConfig.js +43 -0
- package/serialization/types/EntitlementsInPlan.d.ts +13 -0
- package/serialization/types/EntitlementsInPlan.js +44 -0
- package/serialization/types/EntityKeyDefinitionResponseData.js +17 -7
- package/serialization/types/EntityKeyDetailResponseData.js +17 -7
- package/serialization/types/EntityKeyResponseData.js +17 -7
- package/serialization/types/EntityTraitDefinitionResponseData.js +17 -7
- package/serialization/types/EntityTraitDetailResponseData.js +17 -7
- package/serialization/types/EntityTraitResponseData.js +17 -7
- package/serialization/types/EntityTraitValue.js +17 -7
- package/serialization/types/EnvironmentDetailResponseData.js +17 -7
- package/serialization/types/EnvironmentResponseData.js +17 -7
- package/serialization/types/EventBody.js +17 -7
- package/serialization/types/EventBodyFlagCheck.js +17 -7
- package/serialization/types/EventBodyIdentify.js +17 -7
- package/serialization/types/EventBodyIdentifyCompany.js +17 -7
- package/serialization/types/EventBodyTrack.js +17 -7
- package/serialization/types/EventDetailResponseData.js +17 -7
- package/serialization/types/EventResponseData.js +17 -7
- package/serialization/types/EventSummaryResponseData.d.ts +2 -2
- package/serialization/types/EventSummaryResponseData.js +19 -9
- package/serialization/types/FeatureCompanyResponseData.js +17 -7
- package/serialization/types/FeatureCompanyResponseDataAllocationType.js +17 -7
- package/serialization/types/FeatureCompanyUserResponseData.js +17 -7
- package/serialization/types/FeatureCompanyUserResponseDataAllocationType.js +17 -7
- package/serialization/types/FeatureDetailResponseData.d.ts +2 -0
- package/serialization/types/FeatureDetailResponseData.js +19 -7
- package/serialization/types/FeatureResponseData.d.ts +2 -0
- package/serialization/types/FeatureResponseData.js +19 -7
- package/serialization/types/FeatureUsageDetailResponseData.js +17 -7
- package/serialization/types/FeatureUsageResponseData.d.ts +1 -0
- package/serialization/types/FeatureUsageResponseData.js +18 -7
- package/serialization/types/FeatureUsageResponseDataAllocationType.js +17 -7
- package/serialization/types/FlagDetailResponseData.js +17 -7
- package/serialization/types/FlagResponseData.js +17 -7
- package/serialization/types/GenericPreviewObject.js +17 -7
- package/serialization/types/InvoiceRequestBody.js +17 -7
- package/serialization/types/InvoiceResponseData.js +17 -7
- package/serialization/types/IssueTemporaryAccessTokenResponseData.js +17 -7
- package/serialization/types/KeysRequestBody.js +17 -7
- package/serialization/types/MeterRequestBody.js +17 -7
- package/serialization/types/OrderedPlansInGroup.d.ts +14 -0
- package/serialization/types/OrderedPlansInGroup.js +45 -0
- package/serialization/types/PaginationFilter.js +17 -7
- package/serialization/types/PaymentMethodRequestBody.d.ts +0 -1
- package/serialization/types/PaymentMethodRequestBody.js +17 -8
- package/serialization/types/PaymentMethodResponseData.d.ts +0 -1
- package/serialization/types/PaymentMethodResponseData.js +17 -8
- package/serialization/types/PlanAudienceDetailResponseData.js +17 -7
- package/serialization/types/PlanAudienceResponseData.js +17 -7
- package/serialization/types/PlanDetailResponseData.d.ts +2 -0
- package/serialization/types/PlanDetailResponseData.js +19 -7
- package/serialization/types/PlanEntitlementResponseData.d.ts +3 -0
- package/serialization/types/PlanEntitlementResponseData.js +20 -7
- package/serialization/types/PlanEntitlementsOrder.d.ts +13 -0
- package/serialization/types/PlanEntitlementsOrder.js +44 -0
- package/serialization/types/PlanGroupDetailResponseData.d.ts +5 -0
- package/serialization/types/PlanGroupDetailResponseData.js +22 -7
- package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +5 -0
- package/serialization/types/PlanGroupPlanDetailResponseData.js +22 -7
- package/serialization/types/PlanGroupPlanEntitlementsOrder.d.ts +14 -0
- package/serialization/types/PlanGroupPlanEntitlementsOrder.js +45 -0
- package/serialization/types/PlanGroupResponseData.d.ts +2 -1
- package/serialization/types/PlanGroupResponseData.js +19 -8
- package/serialization/types/PlanResponseData.js +17 -7
- package/serialization/types/PlanTraitResponseData.d.ts +19 -0
- package/serialization/types/PlanTraitResponseData.js +50 -0
- package/serialization/types/PreviewObject.js +17 -7
- package/serialization/types/PreviewObjectResponseData.js +17 -7
- package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
- package/serialization/types/PreviewSubscriptionChangeResponseData.js +21 -7
- package/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +21 -0
- package/serialization/types/PreviewSubscriptionFinanceResponseData.js +52 -0
- package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.d.ts +16 -0
- package/serialization/types/PreviewSubscriptionUpcomingInvoiceLineItems.js +47 -0
- package/serialization/types/QuickstartResp.d.ts +12 -0
- package/serialization/types/QuickstartResp.js +43 -0
- package/serialization/types/RawEventBatchResponseData.js +17 -7
- package/serialization/types/RawEventResponseData.js +17 -7
- package/serialization/types/RuleConditionDetailResponseData.js +17 -7
- package/serialization/types/RuleConditionGroupDetailResponseData.js +17 -7
- package/serialization/types/RuleConditionGroupResponseData.js +17 -7
- package/serialization/types/RuleConditionResponseData.js +17 -7
- package/serialization/types/RuleDetailResponseData.js +17 -7
- package/serialization/types/RuleResponseData.js +17 -7
- package/serialization/types/RulesDetailResponseData.js +17 -7
- package/serialization/types/SegmentStatusResp.js +17 -7
- package/serialization/types/StripeEmbedInfo.js +17 -7
- package/serialization/types/TemporaryAccessTokenResponseData.js +17 -7
- package/serialization/types/UpdateAddOnRequestBody.js +17 -7
- package/serialization/types/UpdateEntitlementReqCommon.js +17 -7
- package/serialization/types/UpdateEntitlementReqCommonMetricPeriod.js +17 -7
- package/serialization/types/UpdateEntitlementReqCommonMetricPeriodMonthReset.js +17 -7
- package/serialization/types/UpdateEntitlementReqCommonValueType.js +17 -7
- package/serialization/types/UpdatePayInAdvanceRequestBody.js +17 -7
- package/serialization/types/UpdateRuleRequestBody.js +17 -7
- package/serialization/types/UpsertCompanyRequestBody.js +17 -7
- package/serialization/types/UpsertTraitRequestBody.js +17 -7
- package/serialization/types/UpsertUserRequestBody.d.ts +2 -0
- package/serialization/types/UpsertUserRequestBody.js +19 -7
- package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/serialization/types/UpsertUserSubRequestBody.js +18 -7
- package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +7 -0
- package/serialization/types/UsageBasedEntitlementRequestBody.js +24 -7
- package/serialization/types/UsageBasedEntitlementResponseData.js +17 -7
- package/serialization/types/UserDetailResponseData.js +17 -7
- package/serialization/types/UserResponseData.js +17 -7
- package/serialization/types/WebhookEventDetailResponseData.js +17 -7
- package/serialization/types/WebhookEventResponseData.js +17 -7
- package/serialization/types/WebhookResponseData.d.ts +3 -0
- package/serialization/types/WebhookResponseData.js +20 -7
- package/serialization/types/index.d.ts +15 -0
- package/serialization/types/index.js +15 -0
- package/webhooks.d.ts +76 -0
- package/webhooks.js +170 -0
- /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
- /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCouponsRequest.js} +0 -0
- /package/api/resources/billing/{types/ListCustomersResponse.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
- /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/DeleteBillingProductResponse.js} +0 -0
- /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/billing/types/ListCouponsParams.js} +0 -0
- /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/billing/types/ListCouponsResponse.js} +0 -0
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -42,13 +52,136 @@ exports.Billing = void 0;
|
|
|
42
52
|
const environments = __importStar(require("../../../../environments"));
|
|
43
53
|
const core = __importStar(require("../../../../core"));
|
|
44
54
|
const Schematic = __importStar(require("../../../index"));
|
|
45
|
-
const serializers = __importStar(require("../../../../serialization/index"));
|
|
46
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
56
|
+
const serializers = __importStar(require("../../../../serialization/index"));
|
|
47
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
48
58
|
class Billing {
|
|
49
59
|
constructor(_options) {
|
|
50
60
|
this._options = _options;
|
|
51
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* @param {Schematic.ListCouponsRequest} request
|
|
64
|
+
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Schematic.BadRequestError}
|
|
67
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
68
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
69
|
+
* @throws {@link Schematic.NotFoundError}
|
|
70
|
+
* @throws {@link Schematic.InternalServerError}
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* await client.billing.listCoupons()
|
|
74
|
+
*/
|
|
75
|
+
listCoupons(request = {}, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__listCoupons(request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__listCoupons() {
|
|
79
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
80
|
+
var _a, _b, _c;
|
|
81
|
+
const { isActive, q, limit, offset } = request;
|
|
82
|
+
const _queryParams = {};
|
|
83
|
+
if (isActive != null) {
|
|
84
|
+
_queryParams["is_active"] = isActive.toString();
|
|
85
|
+
}
|
|
86
|
+
if (q != null) {
|
|
87
|
+
_queryParams["q"] = q;
|
|
88
|
+
}
|
|
89
|
+
if (limit != null) {
|
|
90
|
+
_queryParams["limit"] = limit.toString();
|
|
91
|
+
}
|
|
92
|
+
if (offset != null) {
|
|
93
|
+
_queryParams["offset"] = offset.toString();
|
|
94
|
+
}
|
|
95
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
96
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/coupons"),
|
|
97
|
+
method: "GET",
|
|
98
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
99
|
+
contentType: "application/json",
|
|
100
|
+
queryParameters: _queryParams,
|
|
101
|
+
requestType: "json",
|
|
102
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
103
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
104
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
|
+
});
|
|
106
|
+
if (_response.ok) {
|
|
107
|
+
return {
|
|
108
|
+
data: serializers.ListCouponsResponse.parseOrThrow(_response.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}),
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (_response.error.reason === "status-code") {
|
|
119
|
+
switch (_response.error.statusCode) {
|
|
120
|
+
case 400:
|
|
121
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
122
|
+
unrecognizedObjectKeys: "passthrough",
|
|
123
|
+
allowUnrecognizedUnionMembers: true,
|
|
124
|
+
allowUnrecognizedEnumValues: true,
|
|
125
|
+
skipValidation: true,
|
|
126
|
+
breadcrumbsPrefix: ["response"],
|
|
127
|
+
}), _response.rawResponse);
|
|
128
|
+
case 401:
|
|
129
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
130
|
+
unrecognizedObjectKeys: "passthrough",
|
|
131
|
+
allowUnrecognizedUnionMembers: true,
|
|
132
|
+
allowUnrecognizedEnumValues: true,
|
|
133
|
+
skipValidation: true,
|
|
134
|
+
breadcrumbsPrefix: ["response"],
|
|
135
|
+
}), _response.rawResponse);
|
|
136
|
+
case 403:
|
|
137
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
138
|
+
unrecognizedObjectKeys: "passthrough",
|
|
139
|
+
allowUnrecognizedUnionMembers: true,
|
|
140
|
+
allowUnrecognizedEnumValues: true,
|
|
141
|
+
skipValidation: true,
|
|
142
|
+
breadcrumbsPrefix: ["response"],
|
|
143
|
+
}), _response.rawResponse);
|
|
144
|
+
case 404:
|
|
145
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
146
|
+
unrecognizedObjectKeys: "passthrough",
|
|
147
|
+
allowUnrecognizedUnionMembers: true,
|
|
148
|
+
allowUnrecognizedEnumValues: true,
|
|
149
|
+
skipValidation: true,
|
|
150
|
+
breadcrumbsPrefix: ["response"],
|
|
151
|
+
}), _response.rawResponse);
|
|
152
|
+
case 500:
|
|
153
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
154
|
+
unrecognizedObjectKeys: "passthrough",
|
|
155
|
+
allowUnrecognizedUnionMembers: true,
|
|
156
|
+
allowUnrecognizedEnumValues: true,
|
|
157
|
+
skipValidation: true,
|
|
158
|
+
breadcrumbsPrefix: ["response"],
|
|
159
|
+
}), _response.rawResponse);
|
|
160
|
+
default:
|
|
161
|
+
throw new errors.SchematicError({
|
|
162
|
+
statusCode: _response.error.statusCode,
|
|
163
|
+
body: _response.error.body,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
switch (_response.error.reason) {
|
|
169
|
+
case "non-json":
|
|
170
|
+
throw new errors.SchematicError({
|
|
171
|
+
statusCode: _response.error.statusCode,
|
|
172
|
+
body: _response.error.rawBody,
|
|
173
|
+
rawResponse: _response.rawResponse,
|
|
174
|
+
});
|
|
175
|
+
case "timeout":
|
|
176
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/coupons.");
|
|
177
|
+
case "unknown":
|
|
178
|
+
throw new errors.SchematicError({
|
|
179
|
+
message: _response.error.errorMessage,
|
|
180
|
+
rawResponse: _response.rawResponse,
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
52
185
|
/**
|
|
53
186
|
* @param {Schematic.CreateCouponRequestBody} request
|
|
54
187
|
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -56,6 +189,7 @@ class Billing {
|
|
|
56
189
|
* @throws {@link Schematic.BadRequestError}
|
|
57
190
|
* @throws {@link Schematic.UnauthorizedError}
|
|
58
191
|
* @throws {@link Schematic.ForbiddenError}
|
|
192
|
+
* @throws {@link Schematic.NotFoundError}
|
|
59
193
|
* @throws {@link Schematic.InternalServerError}
|
|
60
194
|
*
|
|
61
195
|
* @example
|
|
@@ -71,12 +205,15 @@ class Billing {
|
|
|
71
205
|
* })
|
|
72
206
|
*/
|
|
73
207
|
upsertBillingCoupon(request, requestOptions) {
|
|
74
|
-
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingCoupon(request, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__upsertBillingCoupon(request, requestOptions) {
|
|
75
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
+
var _a, _b, _c;
|
|
76
213
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
77
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
214
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/coupons"),
|
|
78
215
|
method: "POST",
|
|
79
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
216
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
80
217
|
contentType: "application/json",
|
|
81
218
|
requestType: "json",
|
|
82
219
|
body: serializers.CreateCouponRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -85,13 +222,16 @@ class Billing {
|
|
|
85
222
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
86
223
|
});
|
|
87
224
|
if (_response.ok) {
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
225
|
+
return {
|
|
226
|
+
data: serializers.UpsertBillingCouponResponse.parseOrThrow(_response.body, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
skipValidation: true,
|
|
231
|
+
breadcrumbsPrefix: ["response"],
|
|
232
|
+
}),
|
|
233
|
+
rawResponse: _response.rawResponse,
|
|
234
|
+
};
|
|
95
235
|
}
|
|
96
236
|
if (_response.error.reason === "status-code") {
|
|
97
237
|
switch (_response.error.statusCode) {
|
|
@@ -102,7 +242,7 @@ class Billing {
|
|
|
102
242
|
allowUnrecognizedEnumValues: true,
|
|
103
243
|
skipValidation: true,
|
|
104
244
|
breadcrumbsPrefix: ["response"],
|
|
105
|
-
}));
|
|
245
|
+
}), _response.rawResponse);
|
|
106
246
|
case 401:
|
|
107
247
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
108
248
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -110,7 +250,7 @@ class Billing {
|
|
|
110
250
|
allowUnrecognizedEnumValues: true,
|
|
111
251
|
skipValidation: true,
|
|
112
252
|
breadcrumbsPrefix: ["response"],
|
|
113
|
-
}));
|
|
253
|
+
}), _response.rawResponse);
|
|
114
254
|
case 403:
|
|
115
255
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
116
256
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -118,7 +258,15 @@ class Billing {
|
|
|
118
258
|
allowUnrecognizedEnumValues: true,
|
|
119
259
|
skipValidation: true,
|
|
120
260
|
breadcrumbsPrefix: ["response"],
|
|
121
|
-
}));
|
|
261
|
+
}), _response.rawResponse);
|
|
262
|
+
case 404:
|
|
263
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
264
|
+
unrecognizedObjectKeys: "passthrough",
|
|
265
|
+
allowUnrecognizedUnionMembers: true,
|
|
266
|
+
allowUnrecognizedEnumValues: true,
|
|
267
|
+
skipValidation: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}), _response.rawResponse);
|
|
122
270
|
case 500:
|
|
123
271
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
124
272
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -126,11 +274,12 @@ class Billing {
|
|
|
126
274
|
allowUnrecognizedEnumValues: true,
|
|
127
275
|
skipValidation: true,
|
|
128
276
|
breadcrumbsPrefix: ["response"],
|
|
129
|
-
}));
|
|
277
|
+
}), _response.rawResponse);
|
|
130
278
|
default:
|
|
131
279
|
throw new errors.SchematicError({
|
|
132
280
|
statusCode: _response.error.statusCode,
|
|
133
281
|
body: _response.error.body,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
134
283
|
});
|
|
135
284
|
}
|
|
136
285
|
}
|
|
@@ -139,12 +288,14 @@ class Billing {
|
|
|
139
288
|
throw new errors.SchematicError({
|
|
140
289
|
statusCode: _response.error.statusCode,
|
|
141
290
|
body: _response.error.rawBody,
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
142
292
|
});
|
|
143
293
|
case "timeout":
|
|
144
|
-
throw new errors.SchematicTimeoutError();
|
|
294
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/coupons.");
|
|
145
295
|
case "unknown":
|
|
146
296
|
throw new errors.SchematicError({
|
|
147
297
|
message: _response.error.errorMessage,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
148
299
|
});
|
|
149
300
|
}
|
|
150
301
|
});
|
|
@@ -156,6 +307,7 @@ class Billing {
|
|
|
156
307
|
* @throws {@link Schematic.BadRequestError}
|
|
157
308
|
* @throws {@link Schematic.UnauthorizedError}
|
|
158
309
|
* @throws {@link Schematic.ForbiddenError}
|
|
310
|
+
* @throws {@link Schematic.NotFoundError}
|
|
159
311
|
* @throws {@link Schematic.InternalServerError}
|
|
160
312
|
*
|
|
161
313
|
* @example
|
|
@@ -170,12 +322,15 @@ class Billing {
|
|
|
170
322
|
* })
|
|
171
323
|
*/
|
|
172
324
|
upsertBillingCustomer(request, requestOptions) {
|
|
173
|
-
|
|
325
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingCustomer(request, requestOptions));
|
|
326
|
+
}
|
|
327
|
+
__upsertBillingCustomer(request, requestOptions) {
|
|
174
328
|
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
var _a, _b, _c;
|
|
175
330
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
176
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
331
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customer/upsert"),
|
|
177
332
|
method: "POST",
|
|
178
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
333
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
179
334
|
contentType: "application/json",
|
|
180
335
|
requestType: "json",
|
|
181
336
|
body: serializers.CreateBillingCustomerRequestBody.jsonOrThrow(request, {
|
|
@@ -186,13 +341,16 @@ class Billing {
|
|
|
186
341
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
187
342
|
});
|
|
188
343
|
if (_response.ok) {
|
|
189
|
-
return
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
344
|
+
return {
|
|
345
|
+
data: serializers.UpsertBillingCustomerResponse.parseOrThrow(_response.body, {
|
|
346
|
+
unrecognizedObjectKeys: "passthrough",
|
|
347
|
+
allowUnrecognizedUnionMembers: true,
|
|
348
|
+
allowUnrecognizedEnumValues: true,
|
|
349
|
+
skipValidation: true,
|
|
350
|
+
breadcrumbsPrefix: ["response"],
|
|
351
|
+
}),
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
};
|
|
196
354
|
}
|
|
197
355
|
if (_response.error.reason === "status-code") {
|
|
198
356
|
switch (_response.error.statusCode) {
|
|
@@ -203,7 +361,7 @@ class Billing {
|
|
|
203
361
|
allowUnrecognizedEnumValues: true,
|
|
204
362
|
skipValidation: true,
|
|
205
363
|
breadcrumbsPrefix: ["response"],
|
|
206
|
-
}));
|
|
364
|
+
}), _response.rawResponse);
|
|
207
365
|
case 401:
|
|
208
366
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
209
367
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -211,7 +369,7 @@ class Billing {
|
|
|
211
369
|
allowUnrecognizedEnumValues: true,
|
|
212
370
|
skipValidation: true,
|
|
213
371
|
breadcrumbsPrefix: ["response"],
|
|
214
|
-
}));
|
|
372
|
+
}), _response.rawResponse);
|
|
215
373
|
case 403:
|
|
216
374
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
217
375
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -219,7 +377,15 @@ class Billing {
|
|
|
219
377
|
allowUnrecognizedEnumValues: true,
|
|
220
378
|
skipValidation: true,
|
|
221
379
|
breadcrumbsPrefix: ["response"],
|
|
222
|
-
}));
|
|
380
|
+
}), _response.rawResponse);
|
|
381
|
+
case 404:
|
|
382
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
383
|
+
unrecognizedObjectKeys: "passthrough",
|
|
384
|
+
allowUnrecognizedUnionMembers: true,
|
|
385
|
+
allowUnrecognizedEnumValues: true,
|
|
386
|
+
skipValidation: true,
|
|
387
|
+
breadcrumbsPrefix: ["response"],
|
|
388
|
+
}), _response.rawResponse);
|
|
223
389
|
case 500:
|
|
224
390
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
225
391
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -227,11 +393,12 @@ class Billing {
|
|
|
227
393
|
allowUnrecognizedEnumValues: true,
|
|
228
394
|
skipValidation: true,
|
|
229
395
|
breadcrumbsPrefix: ["response"],
|
|
230
|
-
}));
|
|
396
|
+
}), _response.rawResponse);
|
|
231
397
|
default:
|
|
232
398
|
throw new errors.SchematicError({
|
|
233
399
|
statusCode: _response.error.statusCode,
|
|
234
400
|
body: _response.error.body,
|
|
401
|
+
rawResponse: _response.rawResponse,
|
|
235
402
|
});
|
|
236
403
|
}
|
|
237
404
|
}
|
|
@@ -240,33 +407,47 @@ class Billing {
|
|
|
240
407
|
throw new errors.SchematicError({
|
|
241
408
|
statusCode: _response.error.statusCode,
|
|
242
409
|
body: _response.error.rawBody,
|
|
410
|
+
rawResponse: _response.rawResponse,
|
|
243
411
|
});
|
|
244
412
|
case "timeout":
|
|
245
|
-
throw new errors.SchematicTimeoutError();
|
|
413
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/customer/upsert.");
|
|
246
414
|
case "unknown":
|
|
247
415
|
throw new errors.SchematicError({
|
|
248
416
|
message: _response.error.errorMessage,
|
|
417
|
+
rawResponse: _response.rawResponse,
|
|
249
418
|
});
|
|
250
419
|
}
|
|
251
420
|
});
|
|
252
421
|
}
|
|
253
422
|
/**
|
|
254
|
-
* @param {Schematic.
|
|
423
|
+
* @param {Schematic.ListCustomersWithSubscriptionsRequest} request
|
|
255
424
|
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
256
425
|
*
|
|
257
426
|
* @throws {@link Schematic.BadRequestError}
|
|
258
427
|
* @throws {@link Schematic.UnauthorizedError}
|
|
259
428
|
* @throws {@link Schematic.ForbiddenError}
|
|
429
|
+
* @throws {@link Schematic.NotFoundError}
|
|
260
430
|
* @throws {@link Schematic.InternalServerError}
|
|
261
431
|
*
|
|
262
432
|
* @example
|
|
263
|
-
* await client.billing.
|
|
433
|
+
* await client.billing.listCustomersWithSubscriptions()
|
|
264
434
|
*/
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
435
|
+
listCustomersWithSubscriptions(request = {}, requestOptions) {
|
|
436
|
+
return core.HttpResponsePromise.fromPromise(this.__listCustomersWithSubscriptions(request, requestOptions));
|
|
437
|
+
}
|
|
438
|
+
__listCustomersWithSubscriptions() {
|
|
439
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
440
|
+
var _a, _b, _c;
|
|
441
|
+
const { companyIds, name, failedToImport, q, limit, offset } = request;
|
|
269
442
|
const _queryParams = {};
|
|
443
|
+
if (companyIds != null) {
|
|
444
|
+
if (Array.isArray(companyIds)) {
|
|
445
|
+
_queryParams["company_ids"] = companyIds.map((item) => item);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
_queryParams["company_ids"] = companyIds;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
270
451
|
if (name != null) {
|
|
271
452
|
_queryParams["name"] = name;
|
|
272
453
|
}
|
|
@@ -283,9 +464,9 @@ class Billing {
|
|
|
283
464
|
_queryParams["offset"] = offset.toString();
|
|
284
465
|
}
|
|
285
466
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
286
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
467
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customers"),
|
|
287
468
|
method: "GET",
|
|
288
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
469
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
289
470
|
contentType: "application/json",
|
|
290
471
|
queryParameters: _queryParams,
|
|
291
472
|
requestType: "json",
|
|
@@ -294,13 +475,16 @@ class Billing {
|
|
|
294
475
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
295
476
|
});
|
|
296
477
|
if (_response.ok) {
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
478
|
+
return {
|
|
479
|
+
data: serializers.ListCustomersWithSubscriptionsResponse.parseOrThrow(_response.body, {
|
|
480
|
+
unrecognizedObjectKeys: "passthrough",
|
|
481
|
+
allowUnrecognizedUnionMembers: true,
|
|
482
|
+
allowUnrecognizedEnumValues: true,
|
|
483
|
+
skipValidation: true,
|
|
484
|
+
breadcrumbsPrefix: ["response"],
|
|
485
|
+
}),
|
|
486
|
+
rawResponse: _response.rawResponse,
|
|
487
|
+
};
|
|
304
488
|
}
|
|
305
489
|
if (_response.error.reason === "status-code") {
|
|
306
490
|
switch (_response.error.statusCode) {
|
|
@@ -311,7 +495,7 @@ class Billing {
|
|
|
311
495
|
allowUnrecognizedEnumValues: true,
|
|
312
496
|
skipValidation: true,
|
|
313
497
|
breadcrumbsPrefix: ["response"],
|
|
314
|
-
}));
|
|
498
|
+
}), _response.rawResponse);
|
|
315
499
|
case 401:
|
|
316
500
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
317
501
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -319,7 +503,7 @@ class Billing {
|
|
|
319
503
|
allowUnrecognizedEnumValues: true,
|
|
320
504
|
skipValidation: true,
|
|
321
505
|
breadcrumbsPrefix: ["response"],
|
|
322
|
-
}));
|
|
506
|
+
}), _response.rawResponse);
|
|
323
507
|
case 403:
|
|
324
508
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
325
509
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -327,7 +511,15 @@ class Billing {
|
|
|
327
511
|
allowUnrecognizedEnumValues: true,
|
|
328
512
|
skipValidation: true,
|
|
329
513
|
breadcrumbsPrefix: ["response"],
|
|
330
|
-
}));
|
|
514
|
+
}), _response.rawResponse);
|
|
515
|
+
case 404:
|
|
516
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
517
|
+
unrecognizedObjectKeys: "passthrough",
|
|
518
|
+
allowUnrecognizedUnionMembers: true,
|
|
519
|
+
allowUnrecognizedEnumValues: true,
|
|
520
|
+
skipValidation: true,
|
|
521
|
+
breadcrumbsPrefix: ["response"],
|
|
522
|
+
}), _response.rawResponse);
|
|
331
523
|
case 500:
|
|
332
524
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
333
525
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -335,11 +527,12 @@ class Billing {
|
|
|
335
527
|
allowUnrecognizedEnumValues: true,
|
|
336
528
|
skipValidation: true,
|
|
337
529
|
breadcrumbsPrefix: ["response"],
|
|
338
|
-
}));
|
|
530
|
+
}), _response.rawResponse);
|
|
339
531
|
default:
|
|
340
532
|
throw new errors.SchematicError({
|
|
341
533
|
statusCode: _response.error.statusCode,
|
|
342
534
|
body: _response.error.body,
|
|
535
|
+
rawResponse: _response.rawResponse,
|
|
343
536
|
});
|
|
344
537
|
}
|
|
345
538
|
}
|
|
@@ -348,12 +541,14 @@ class Billing {
|
|
|
348
541
|
throw new errors.SchematicError({
|
|
349
542
|
statusCode: _response.error.statusCode,
|
|
350
543
|
body: _response.error.rawBody,
|
|
544
|
+
rawResponse: _response.rawResponse,
|
|
351
545
|
});
|
|
352
546
|
case "timeout":
|
|
353
|
-
throw new errors.SchematicTimeoutError();
|
|
547
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers.");
|
|
354
548
|
case "unknown":
|
|
355
549
|
throw new errors.SchematicError({
|
|
356
550
|
message: _response.error.errorMessage,
|
|
551
|
+
rawResponse: _response.rawResponse,
|
|
357
552
|
});
|
|
358
553
|
}
|
|
359
554
|
});
|
|
@@ -365,16 +560,28 @@ class Billing {
|
|
|
365
560
|
* @throws {@link Schematic.BadRequestError}
|
|
366
561
|
* @throws {@link Schematic.UnauthorizedError}
|
|
367
562
|
* @throws {@link Schematic.ForbiddenError}
|
|
563
|
+
* @throws {@link Schematic.NotFoundError}
|
|
368
564
|
* @throws {@link Schematic.InternalServerError}
|
|
369
565
|
*
|
|
370
566
|
* @example
|
|
371
567
|
* await client.billing.countCustomers()
|
|
372
568
|
*/
|
|
373
569
|
countCustomers(request = {}, requestOptions) {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
570
|
+
return core.HttpResponsePromise.fromPromise(this.__countCustomers(request, requestOptions));
|
|
571
|
+
}
|
|
572
|
+
__countCustomers() {
|
|
573
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
574
|
+
var _a, _b, _c;
|
|
575
|
+
const { companyIds, name, failedToImport, q, limit, offset } = request;
|
|
377
576
|
const _queryParams = {};
|
|
577
|
+
if (companyIds != null) {
|
|
578
|
+
if (Array.isArray(companyIds)) {
|
|
579
|
+
_queryParams["company_ids"] = companyIds.map((item) => item);
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
_queryParams["company_ids"] = companyIds;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
378
585
|
if (name != null) {
|
|
379
586
|
_queryParams["name"] = name;
|
|
380
587
|
}
|
|
@@ -391,9 +598,9 @@ class Billing {
|
|
|
391
598
|
_queryParams["offset"] = offset.toString();
|
|
392
599
|
}
|
|
393
600
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
394
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
601
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/customers/count"),
|
|
395
602
|
method: "GET",
|
|
396
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
603
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
397
604
|
contentType: "application/json",
|
|
398
605
|
queryParameters: _queryParams,
|
|
399
606
|
requestType: "json",
|
|
@@ -402,13 +609,16 @@ class Billing {
|
|
|
402
609
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
403
610
|
});
|
|
404
611
|
if (_response.ok) {
|
|
405
|
-
return
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
612
|
+
return {
|
|
613
|
+
data: serializers.CountCustomersResponse.parseOrThrow(_response.body, {
|
|
614
|
+
unrecognizedObjectKeys: "passthrough",
|
|
615
|
+
allowUnrecognizedUnionMembers: true,
|
|
616
|
+
allowUnrecognizedEnumValues: true,
|
|
617
|
+
skipValidation: true,
|
|
618
|
+
breadcrumbsPrefix: ["response"],
|
|
619
|
+
}),
|
|
620
|
+
rawResponse: _response.rawResponse,
|
|
621
|
+
};
|
|
412
622
|
}
|
|
413
623
|
if (_response.error.reason === "status-code") {
|
|
414
624
|
switch (_response.error.statusCode) {
|
|
@@ -419,7 +629,7 @@ class Billing {
|
|
|
419
629
|
allowUnrecognizedEnumValues: true,
|
|
420
630
|
skipValidation: true,
|
|
421
631
|
breadcrumbsPrefix: ["response"],
|
|
422
|
-
}));
|
|
632
|
+
}), _response.rawResponse);
|
|
423
633
|
case 401:
|
|
424
634
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
425
635
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -427,7 +637,7 @@ class Billing {
|
|
|
427
637
|
allowUnrecognizedEnumValues: true,
|
|
428
638
|
skipValidation: true,
|
|
429
639
|
breadcrumbsPrefix: ["response"],
|
|
430
|
-
}));
|
|
640
|
+
}), _response.rawResponse);
|
|
431
641
|
case 403:
|
|
432
642
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
433
643
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -435,7 +645,15 @@ class Billing {
|
|
|
435
645
|
allowUnrecognizedEnumValues: true,
|
|
436
646
|
skipValidation: true,
|
|
437
647
|
breadcrumbsPrefix: ["response"],
|
|
438
|
-
}));
|
|
648
|
+
}), _response.rawResponse);
|
|
649
|
+
case 404:
|
|
650
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
651
|
+
unrecognizedObjectKeys: "passthrough",
|
|
652
|
+
allowUnrecognizedUnionMembers: true,
|
|
653
|
+
allowUnrecognizedEnumValues: true,
|
|
654
|
+
skipValidation: true,
|
|
655
|
+
breadcrumbsPrefix: ["response"],
|
|
656
|
+
}), _response.rawResponse);
|
|
439
657
|
case 500:
|
|
440
658
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
441
659
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -443,11 +661,12 @@ class Billing {
|
|
|
443
661
|
allowUnrecognizedEnumValues: true,
|
|
444
662
|
skipValidation: true,
|
|
445
663
|
breadcrumbsPrefix: ["response"],
|
|
446
|
-
}));
|
|
664
|
+
}), _response.rawResponse);
|
|
447
665
|
default:
|
|
448
666
|
throw new errors.SchematicError({
|
|
449
667
|
statusCode: _response.error.statusCode,
|
|
450
668
|
body: _response.error.body,
|
|
669
|
+
rawResponse: _response.rawResponse,
|
|
451
670
|
});
|
|
452
671
|
}
|
|
453
672
|
}
|
|
@@ -456,12 +675,14 @@ class Billing {
|
|
|
456
675
|
throw new errors.SchematicError({
|
|
457
676
|
statusCode: _response.error.statusCode,
|
|
458
677
|
body: _response.error.rawBody,
|
|
678
|
+
rawResponse: _response.rawResponse,
|
|
459
679
|
});
|
|
460
680
|
case "timeout":
|
|
461
|
-
throw new errors.SchematicTimeoutError();
|
|
681
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers/count.");
|
|
462
682
|
case "unknown":
|
|
463
683
|
throw new errors.SchematicError({
|
|
464
684
|
message: _response.error.errorMessage,
|
|
685
|
+
rawResponse: _response.rawResponse,
|
|
465
686
|
});
|
|
466
687
|
}
|
|
467
688
|
});
|
|
@@ -473,6 +694,7 @@ class Billing {
|
|
|
473
694
|
* @throws {@link Schematic.BadRequestError}
|
|
474
695
|
* @throws {@link Schematic.UnauthorizedError}
|
|
475
696
|
* @throws {@link Schematic.ForbiddenError}
|
|
697
|
+
* @throws {@link Schematic.NotFoundError}
|
|
476
698
|
* @throws {@link Schematic.InternalServerError}
|
|
477
699
|
*
|
|
478
700
|
* @example
|
|
@@ -481,8 +703,11 @@ class Billing {
|
|
|
481
703
|
* })
|
|
482
704
|
*/
|
|
483
705
|
listInvoices(request, requestOptions) {
|
|
484
|
-
|
|
706
|
+
return core.HttpResponsePromise.fromPromise(this.__listInvoices(request, requestOptions));
|
|
707
|
+
}
|
|
708
|
+
__listInvoices(request, requestOptions) {
|
|
485
709
|
return __awaiter(this, void 0, void 0, function* () {
|
|
710
|
+
var _a, _b, _c;
|
|
486
711
|
const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
|
|
487
712
|
const _queryParams = {};
|
|
488
713
|
if (companyId != null) {
|
|
@@ -499,9 +724,9 @@ class Billing {
|
|
|
499
724
|
_queryParams["offset"] = offset.toString();
|
|
500
725
|
}
|
|
501
726
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
502
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
727
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/invoices"),
|
|
503
728
|
method: "GET",
|
|
504
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
729
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
505
730
|
contentType: "application/json",
|
|
506
731
|
queryParameters: _queryParams,
|
|
507
732
|
requestType: "json",
|
|
@@ -510,13 +735,16 @@ class Billing {
|
|
|
510
735
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
511
736
|
});
|
|
512
737
|
if (_response.ok) {
|
|
513
|
-
return
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
738
|
+
return {
|
|
739
|
+
data: serializers.ListInvoicesResponse.parseOrThrow(_response.body, {
|
|
740
|
+
unrecognizedObjectKeys: "passthrough",
|
|
741
|
+
allowUnrecognizedUnionMembers: true,
|
|
742
|
+
allowUnrecognizedEnumValues: true,
|
|
743
|
+
skipValidation: true,
|
|
744
|
+
breadcrumbsPrefix: ["response"],
|
|
745
|
+
}),
|
|
746
|
+
rawResponse: _response.rawResponse,
|
|
747
|
+
};
|
|
520
748
|
}
|
|
521
749
|
if (_response.error.reason === "status-code") {
|
|
522
750
|
switch (_response.error.statusCode) {
|
|
@@ -527,7 +755,7 @@ class Billing {
|
|
|
527
755
|
allowUnrecognizedEnumValues: true,
|
|
528
756
|
skipValidation: true,
|
|
529
757
|
breadcrumbsPrefix: ["response"],
|
|
530
|
-
}));
|
|
758
|
+
}), _response.rawResponse);
|
|
531
759
|
case 401:
|
|
532
760
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
533
761
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -535,7 +763,7 @@ class Billing {
|
|
|
535
763
|
allowUnrecognizedEnumValues: true,
|
|
536
764
|
skipValidation: true,
|
|
537
765
|
breadcrumbsPrefix: ["response"],
|
|
538
|
-
}));
|
|
766
|
+
}), _response.rawResponse);
|
|
539
767
|
case 403:
|
|
540
768
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
541
769
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -543,7 +771,15 @@ class Billing {
|
|
|
543
771
|
allowUnrecognizedEnumValues: true,
|
|
544
772
|
skipValidation: true,
|
|
545
773
|
breadcrumbsPrefix: ["response"],
|
|
546
|
-
}));
|
|
774
|
+
}), _response.rawResponse);
|
|
775
|
+
case 404:
|
|
776
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
777
|
+
unrecognizedObjectKeys: "passthrough",
|
|
778
|
+
allowUnrecognizedUnionMembers: true,
|
|
779
|
+
allowUnrecognizedEnumValues: true,
|
|
780
|
+
skipValidation: true,
|
|
781
|
+
breadcrumbsPrefix: ["response"],
|
|
782
|
+
}), _response.rawResponse);
|
|
547
783
|
case 500:
|
|
548
784
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
549
785
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -551,11 +787,12 @@ class Billing {
|
|
|
551
787
|
allowUnrecognizedEnumValues: true,
|
|
552
788
|
skipValidation: true,
|
|
553
789
|
breadcrumbsPrefix: ["response"],
|
|
554
|
-
}));
|
|
790
|
+
}), _response.rawResponse);
|
|
555
791
|
default:
|
|
556
792
|
throw new errors.SchematicError({
|
|
557
793
|
statusCode: _response.error.statusCode,
|
|
558
794
|
body: _response.error.body,
|
|
795
|
+
rawResponse: _response.rawResponse,
|
|
559
796
|
});
|
|
560
797
|
}
|
|
561
798
|
}
|
|
@@ -564,12 +801,14 @@ class Billing {
|
|
|
564
801
|
throw new errors.SchematicError({
|
|
565
802
|
statusCode: _response.error.statusCode,
|
|
566
803
|
body: _response.error.rawBody,
|
|
804
|
+
rawResponse: _response.rawResponse,
|
|
567
805
|
});
|
|
568
806
|
case "timeout":
|
|
569
|
-
throw new errors.SchematicTimeoutError();
|
|
807
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/invoices.");
|
|
570
808
|
case "unknown":
|
|
571
809
|
throw new errors.SchematicError({
|
|
572
810
|
message: _response.error.errorMessage,
|
|
811
|
+
rawResponse: _response.rawResponse,
|
|
573
812
|
});
|
|
574
813
|
}
|
|
575
814
|
});
|
|
@@ -581,6 +820,7 @@ class Billing {
|
|
|
581
820
|
* @throws {@link Schematic.BadRequestError}
|
|
582
821
|
* @throws {@link Schematic.UnauthorizedError}
|
|
583
822
|
* @throws {@link Schematic.ForbiddenError}
|
|
823
|
+
* @throws {@link Schematic.NotFoundError}
|
|
584
824
|
* @throws {@link Schematic.InternalServerError}
|
|
585
825
|
*
|
|
586
826
|
* @example
|
|
@@ -595,12 +835,15 @@ class Billing {
|
|
|
595
835
|
* })
|
|
596
836
|
*/
|
|
597
837
|
upsertInvoice(request, requestOptions) {
|
|
598
|
-
|
|
838
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertInvoice(request, requestOptions));
|
|
839
|
+
}
|
|
840
|
+
__upsertInvoice(request, requestOptions) {
|
|
599
841
|
return __awaiter(this, void 0, void 0, function* () {
|
|
842
|
+
var _a, _b, _c;
|
|
600
843
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
601
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
844
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/invoices"),
|
|
602
845
|
method: "POST",
|
|
603
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
846
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
604
847
|
contentType: "application/json",
|
|
605
848
|
requestType: "json",
|
|
606
849
|
body: serializers.CreateInvoiceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -609,13 +852,16 @@ class Billing {
|
|
|
609
852
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
610
853
|
});
|
|
611
854
|
if (_response.ok) {
|
|
612
|
-
return
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
855
|
+
return {
|
|
856
|
+
data: serializers.UpsertInvoiceResponse.parseOrThrow(_response.body, {
|
|
857
|
+
unrecognizedObjectKeys: "passthrough",
|
|
858
|
+
allowUnrecognizedUnionMembers: true,
|
|
859
|
+
allowUnrecognizedEnumValues: true,
|
|
860
|
+
skipValidation: true,
|
|
861
|
+
breadcrumbsPrefix: ["response"],
|
|
862
|
+
}),
|
|
863
|
+
rawResponse: _response.rawResponse,
|
|
864
|
+
};
|
|
619
865
|
}
|
|
620
866
|
if (_response.error.reason === "status-code") {
|
|
621
867
|
switch (_response.error.statusCode) {
|
|
@@ -626,7 +872,7 @@ class Billing {
|
|
|
626
872
|
allowUnrecognizedEnumValues: true,
|
|
627
873
|
skipValidation: true,
|
|
628
874
|
breadcrumbsPrefix: ["response"],
|
|
629
|
-
}));
|
|
875
|
+
}), _response.rawResponse);
|
|
630
876
|
case 401:
|
|
631
877
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
632
878
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -634,7 +880,7 @@ class Billing {
|
|
|
634
880
|
allowUnrecognizedEnumValues: true,
|
|
635
881
|
skipValidation: true,
|
|
636
882
|
breadcrumbsPrefix: ["response"],
|
|
637
|
-
}));
|
|
883
|
+
}), _response.rawResponse);
|
|
638
884
|
case 403:
|
|
639
885
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
640
886
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -642,7 +888,15 @@ class Billing {
|
|
|
642
888
|
allowUnrecognizedEnumValues: true,
|
|
643
889
|
skipValidation: true,
|
|
644
890
|
breadcrumbsPrefix: ["response"],
|
|
645
|
-
}));
|
|
891
|
+
}), _response.rawResponse);
|
|
892
|
+
case 404:
|
|
893
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
894
|
+
unrecognizedObjectKeys: "passthrough",
|
|
895
|
+
allowUnrecognizedUnionMembers: true,
|
|
896
|
+
allowUnrecognizedEnumValues: true,
|
|
897
|
+
skipValidation: true,
|
|
898
|
+
breadcrumbsPrefix: ["response"],
|
|
899
|
+
}), _response.rawResponse);
|
|
646
900
|
case 500:
|
|
647
901
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
648
902
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -650,11 +904,12 @@ class Billing {
|
|
|
650
904
|
allowUnrecognizedEnumValues: true,
|
|
651
905
|
skipValidation: true,
|
|
652
906
|
breadcrumbsPrefix: ["response"],
|
|
653
|
-
}));
|
|
907
|
+
}), _response.rawResponse);
|
|
654
908
|
default:
|
|
655
909
|
throw new errors.SchematicError({
|
|
656
910
|
statusCode: _response.error.statusCode,
|
|
657
911
|
body: _response.error.body,
|
|
912
|
+
rawResponse: _response.rawResponse,
|
|
658
913
|
});
|
|
659
914
|
}
|
|
660
915
|
}
|
|
@@ -663,12 +918,14 @@ class Billing {
|
|
|
663
918
|
throw new errors.SchematicError({
|
|
664
919
|
statusCode: _response.error.statusCode,
|
|
665
920
|
body: _response.error.rawBody,
|
|
921
|
+
rawResponse: _response.rawResponse,
|
|
666
922
|
});
|
|
667
923
|
case "timeout":
|
|
668
|
-
throw new errors.SchematicTimeoutError();
|
|
924
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/invoices.");
|
|
669
925
|
case "unknown":
|
|
670
926
|
throw new errors.SchematicError({
|
|
671
927
|
message: _response.error.errorMessage,
|
|
928
|
+
rawResponse: _response.rawResponse,
|
|
672
929
|
});
|
|
673
930
|
}
|
|
674
931
|
});
|
|
@@ -680,14 +937,18 @@ class Billing {
|
|
|
680
937
|
* @throws {@link Schematic.BadRequestError}
|
|
681
938
|
* @throws {@link Schematic.UnauthorizedError}
|
|
682
939
|
* @throws {@link Schematic.ForbiddenError}
|
|
940
|
+
* @throws {@link Schematic.NotFoundError}
|
|
683
941
|
* @throws {@link Schematic.InternalServerError}
|
|
684
942
|
*
|
|
685
943
|
* @example
|
|
686
944
|
* await client.billing.listMeters()
|
|
687
945
|
*/
|
|
688
946
|
listMeters(request = {}, requestOptions) {
|
|
689
|
-
|
|
690
|
-
|
|
947
|
+
return core.HttpResponsePromise.fromPromise(this.__listMeters(request, requestOptions));
|
|
948
|
+
}
|
|
949
|
+
__listMeters() {
|
|
950
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
951
|
+
var _a, _b, _c;
|
|
691
952
|
const { displayName, limit, offset } = request;
|
|
692
953
|
const _queryParams = {};
|
|
693
954
|
if (displayName != null) {
|
|
@@ -700,9 +961,9 @@ class Billing {
|
|
|
700
961
|
_queryParams["offset"] = offset.toString();
|
|
701
962
|
}
|
|
702
963
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
703
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
964
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/meter"),
|
|
704
965
|
method: "GET",
|
|
705
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
966
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
706
967
|
contentType: "application/json",
|
|
707
968
|
queryParameters: _queryParams,
|
|
708
969
|
requestType: "json",
|
|
@@ -711,13 +972,16 @@ class Billing {
|
|
|
711
972
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
712
973
|
});
|
|
713
974
|
if (_response.ok) {
|
|
714
|
-
return
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
975
|
+
return {
|
|
976
|
+
data: serializers.ListMetersResponse.parseOrThrow(_response.body, {
|
|
977
|
+
unrecognizedObjectKeys: "passthrough",
|
|
978
|
+
allowUnrecognizedUnionMembers: true,
|
|
979
|
+
allowUnrecognizedEnumValues: true,
|
|
980
|
+
skipValidation: true,
|
|
981
|
+
breadcrumbsPrefix: ["response"],
|
|
982
|
+
}),
|
|
983
|
+
rawResponse: _response.rawResponse,
|
|
984
|
+
};
|
|
721
985
|
}
|
|
722
986
|
if (_response.error.reason === "status-code") {
|
|
723
987
|
switch (_response.error.statusCode) {
|
|
@@ -728,7 +992,7 @@ class Billing {
|
|
|
728
992
|
allowUnrecognizedEnumValues: true,
|
|
729
993
|
skipValidation: true,
|
|
730
994
|
breadcrumbsPrefix: ["response"],
|
|
731
|
-
}));
|
|
995
|
+
}), _response.rawResponse);
|
|
732
996
|
case 401:
|
|
733
997
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
734
998
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -736,7 +1000,7 @@ class Billing {
|
|
|
736
1000
|
allowUnrecognizedEnumValues: true,
|
|
737
1001
|
skipValidation: true,
|
|
738
1002
|
breadcrumbsPrefix: ["response"],
|
|
739
|
-
}));
|
|
1003
|
+
}), _response.rawResponse);
|
|
740
1004
|
case 403:
|
|
741
1005
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
742
1006
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -744,7 +1008,15 @@ class Billing {
|
|
|
744
1008
|
allowUnrecognizedEnumValues: true,
|
|
745
1009
|
skipValidation: true,
|
|
746
1010
|
breadcrumbsPrefix: ["response"],
|
|
747
|
-
}));
|
|
1011
|
+
}), _response.rawResponse);
|
|
1012
|
+
case 404:
|
|
1013
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1014
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1015
|
+
allowUnrecognizedUnionMembers: true,
|
|
1016
|
+
allowUnrecognizedEnumValues: true,
|
|
1017
|
+
skipValidation: true,
|
|
1018
|
+
breadcrumbsPrefix: ["response"],
|
|
1019
|
+
}), _response.rawResponse);
|
|
748
1020
|
case 500:
|
|
749
1021
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
750
1022
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -752,11 +1024,12 @@ class Billing {
|
|
|
752
1024
|
allowUnrecognizedEnumValues: true,
|
|
753
1025
|
skipValidation: true,
|
|
754
1026
|
breadcrumbsPrefix: ["response"],
|
|
755
|
-
}));
|
|
1027
|
+
}), _response.rawResponse);
|
|
756
1028
|
default:
|
|
757
1029
|
throw new errors.SchematicError({
|
|
758
1030
|
statusCode: _response.error.statusCode,
|
|
759
1031
|
body: _response.error.body,
|
|
1032
|
+
rawResponse: _response.rawResponse,
|
|
760
1033
|
});
|
|
761
1034
|
}
|
|
762
1035
|
}
|
|
@@ -765,12 +1038,14 @@ class Billing {
|
|
|
765
1038
|
throw new errors.SchematicError({
|
|
766
1039
|
statusCode: _response.error.statusCode,
|
|
767
1040
|
body: _response.error.rawBody,
|
|
1041
|
+
rawResponse: _response.rawResponse,
|
|
768
1042
|
});
|
|
769
1043
|
case "timeout":
|
|
770
|
-
throw new errors.SchematicTimeoutError();
|
|
1044
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/meter.");
|
|
771
1045
|
case "unknown":
|
|
772
1046
|
throw new errors.SchematicError({
|
|
773
1047
|
message: _response.error.errorMessage,
|
|
1048
|
+
rawResponse: _response.rawResponse,
|
|
774
1049
|
});
|
|
775
1050
|
}
|
|
776
1051
|
});
|
|
@@ -782,6 +1057,7 @@ class Billing {
|
|
|
782
1057
|
* @throws {@link Schematic.BadRequestError}
|
|
783
1058
|
* @throws {@link Schematic.UnauthorizedError}
|
|
784
1059
|
* @throws {@link Schematic.ForbiddenError}
|
|
1060
|
+
* @throws {@link Schematic.NotFoundError}
|
|
785
1061
|
* @throws {@link Schematic.InternalServerError}
|
|
786
1062
|
*
|
|
787
1063
|
* @example
|
|
@@ -793,12 +1069,15 @@ class Billing {
|
|
|
793
1069
|
* })
|
|
794
1070
|
*/
|
|
795
1071
|
upsertBillingMeter(request, requestOptions) {
|
|
796
|
-
|
|
1072
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingMeter(request, requestOptions));
|
|
1073
|
+
}
|
|
1074
|
+
__upsertBillingMeter(request, requestOptions) {
|
|
797
1075
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1076
|
+
var _a, _b, _c;
|
|
798
1077
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
799
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1078
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/meter/upsert"),
|
|
800
1079
|
method: "POST",
|
|
801
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1080
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
802
1081
|
contentType: "application/json",
|
|
803
1082
|
requestType: "json",
|
|
804
1083
|
body: serializers.CreateMeterRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -807,13 +1086,16 @@ class Billing {
|
|
|
807
1086
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
808
1087
|
});
|
|
809
1088
|
if (_response.ok) {
|
|
810
|
-
return
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
1089
|
+
return {
|
|
1090
|
+
data: serializers.UpsertBillingMeterResponse.parseOrThrow(_response.body, {
|
|
1091
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1092
|
+
allowUnrecognizedUnionMembers: true,
|
|
1093
|
+
allowUnrecognizedEnumValues: true,
|
|
1094
|
+
skipValidation: true,
|
|
1095
|
+
breadcrumbsPrefix: ["response"],
|
|
1096
|
+
}),
|
|
1097
|
+
rawResponse: _response.rawResponse,
|
|
1098
|
+
};
|
|
817
1099
|
}
|
|
818
1100
|
if (_response.error.reason === "status-code") {
|
|
819
1101
|
switch (_response.error.statusCode) {
|
|
@@ -824,7 +1106,7 @@ class Billing {
|
|
|
824
1106
|
allowUnrecognizedEnumValues: true,
|
|
825
1107
|
skipValidation: true,
|
|
826
1108
|
breadcrumbsPrefix: ["response"],
|
|
827
|
-
}));
|
|
1109
|
+
}), _response.rawResponse);
|
|
828
1110
|
case 401:
|
|
829
1111
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
830
1112
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -832,7 +1114,7 @@ class Billing {
|
|
|
832
1114
|
allowUnrecognizedEnumValues: true,
|
|
833
1115
|
skipValidation: true,
|
|
834
1116
|
breadcrumbsPrefix: ["response"],
|
|
835
|
-
}));
|
|
1117
|
+
}), _response.rawResponse);
|
|
836
1118
|
case 403:
|
|
837
1119
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
838
1120
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -840,7 +1122,15 @@ class Billing {
|
|
|
840
1122
|
allowUnrecognizedEnumValues: true,
|
|
841
1123
|
skipValidation: true,
|
|
842
1124
|
breadcrumbsPrefix: ["response"],
|
|
843
|
-
}));
|
|
1125
|
+
}), _response.rawResponse);
|
|
1126
|
+
case 404:
|
|
1127
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1128
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1129
|
+
allowUnrecognizedUnionMembers: true,
|
|
1130
|
+
allowUnrecognizedEnumValues: true,
|
|
1131
|
+
skipValidation: true,
|
|
1132
|
+
breadcrumbsPrefix: ["response"],
|
|
1133
|
+
}), _response.rawResponse);
|
|
844
1134
|
case 500:
|
|
845
1135
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
846
1136
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -848,11 +1138,12 @@ class Billing {
|
|
|
848
1138
|
allowUnrecognizedEnumValues: true,
|
|
849
1139
|
skipValidation: true,
|
|
850
1140
|
breadcrumbsPrefix: ["response"],
|
|
851
|
-
}));
|
|
1141
|
+
}), _response.rawResponse);
|
|
852
1142
|
default:
|
|
853
1143
|
throw new errors.SchematicError({
|
|
854
1144
|
statusCode: _response.error.statusCode,
|
|
855
1145
|
body: _response.error.body,
|
|
1146
|
+
rawResponse: _response.rawResponse,
|
|
856
1147
|
});
|
|
857
1148
|
}
|
|
858
1149
|
}
|
|
@@ -861,12 +1152,14 @@ class Billing {
|
|
|
861
1152
|
throw new errors.SchematicError({
|
|
862
1153
|
statusCode: _response.error.statusCode,
|
|
863
1154
|
body: _response.error.rawBody,
|
|
1155
|
+
rawResponse: _response.rawResponse,
|
|
864
1156
|
});
|
|
865
1157
|
case "timeout":
|
|
866
|
-
throw new errors.SchematicTimeoutError();
|
|
1158
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/meter/upsert.");
|
|
867
1159
|
case "unknown":
|
|
868
1160
|
throw new errors.SchematicError({
|
|
869
1161
|
message: _response.error.errorMessage,
|
|
1162
|
+
rawResponse: _response.rawResponse,
|
|
870
1163
|
});
|
|
871
1164
|
}
|
|
872
1165
|
});
|
|
@@ -878,6 +1171,7 @@ class Billing {
|
|
|
878
1171
|
* @throws {@link Schematic.BadRequestError}
|
|
879
1172
|
* @throws {@link Schematic.UnauthorizedError}
|
|
880
1173
|
* @throws {@link Schematic.ForbiddenError}
|
|
1174
|
+
* @throws {@link Schematic.NotFoundError}
|
|
881
1175
|
* @throws {@link Schematic.InternalServerError}
|
|
882
1176
|
*
|
|
883
1177
|
* @example
|
|
@@ -886,17 +1180,17 @@ class Billing {
|
|
|
886
1180
|
* })
|
|
887
1181
|
*/
|
|
888
1182
|
listPaymentMethods(request, requestOptions) {
|
|
889
|
-
|
|
1183
|
+
return core.HttpResponsePromise.fromPromise(this.__listPaymentMethods(request, requestOptions));
|
|
1184
|
+
}
|
|
1185
|
+
__listPaymentMethods(request, requestOptions) {
|
|
890
1186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
891
|
-
|
|
1187
|
+
var _a, _b, _c;
|
|
1188
|
+
const { companyId, customerExternalId, limit, offset } = request;
|
|
892
1189
|
const _queryParams = {};
|
|
893
1190
|
if (companyId != null) {
|
|
894
1191
|
_queryParams["company_id"] = companyId;
|
|
895
1192
|
}
|
|
896
1193
|
_queryParams["customer_external_id"] = customerExternalId;
|
|
897
|
-
if (subscriptionExternalId != null) {
|
|
898
|
-
_queryParams["subscription_external_id"] = subscriptionExternalId;
|
|
899
|
-
}
|
|
900
1194
|
if (limit != null) {
|
|
901
1195
|
_queryParams["limit"] = limit.toString();
|
|
902
1196
|
}
|
|
@@ -904,9 +1198,9 @@ class Billing {
|
|
|
904
1198
|
_queryParams["offset"] = offset.toString();
|
|
905
1199
|
}
|
|
906
1200
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
907
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1201
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/payment-methods"),
|
|
908
1202
|
method: "GET",
|
|
909
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1203
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
910
1204
|
contentType: "application/json",
|
|
911
1205
|
queryParameters: _queryParams,
|
|
912
1206
|
requestType: "json",
|
|
@@ -915,13 +1209,16 @@ class Billing {
|
|
|
915
1209
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
916
1210
|
});
|
|
917
1211
|
if (_response.ok) {
|
|
918
|
-
return
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1212
|
+
return {
|
|
1213
|
+
data: serializers.ListPaymentMethodsResponse.parseOrThrow(_response.body, {
|
|
1214
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1215
|
+
allowUnrecognizedUnionMembers: true,
|
|
1216
|
+
allowUnrecognizedEnumValues: true,
|
|
1217
|
+
skipValidation: true,
|
|
1218
|
+
breadcrumbsPrefix: ["response"],
|
|
1219
|
+
}),
|
|
1220
|
+
rawResponse: _response.rawResponse,
|
|
1221
|
+
};
|
|
925
1222
|
}
|
|
926
1223
|
if (_response.error.reason === "status-code") {
|
|
927
1224
|
switch (_response.error.statusCode) {
|
|
@@ -932,7 +1229,7 @@ class Billing {
|
|
|
932
1229
|
allowUnrecognizedEnumValues: true,
|
|
933
1230
|
skipValidation: true,
|
|
934
1231
|
breadcrumbsPrefix: ["response"],
|
|
935
|
-
}));
|
|
1232
|
+
}), _response.rawResponse);
|
|
936
1233
|
case 401:
|
|
937
1234
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
938
1235
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -940,7 +1237,7 @@ class Billing {
|
|
|
940
1237
|
allowUnrecognizedEnumValues: true,
|
|
941
1238
|
skipValidation: true,
|
|
942
1239
|
breadcrumbsPrefix: ["response"],
|
|
943
|
-
}));
|
|
1240
|
+
}), _response.rawResponse);
|
|
944
1241
|
case 403:
|
|
945
1242
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
946
1243
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -948,7 +1245,15 @@ class Billing {
|
|
|
948
1245
|
allowUnrecognizedEnumValues: true,
|
|
949
1246
|
skipValidation: true,
|
|
950
1247
|
breadcrumbsPrefix: ["response"],
|
|
951
|
-
}));
|
|
1248
|
+
}), _response.rawResponse);
|
|
1249
|
+
case 404:
|
|
1250
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1251
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1252
|
+
allowUnrecognizedUnionMembers: true,
|
|
1253
|
+
allowUnrecognizedEnumValues: true,
|
|
1254
|
+
skipValidation: true,
|
|
1255
|
+
breadcrumbsPrefix: ["response"],
|
|
1256
|
+
}), _response.rawResponse);
|
|
952
1257
|
case 500:
|
|
953
1258
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
954
1259
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -956,11 +1261,12 @@ class Billing {
|
|
|
956
1261
|
allowUnrecognizedEnumValues: true,
|
|
957
1262
|
skipValidation: true,
|
|
958
1263
|
breadcrumbsPrefix: ["response"],
|
|
959
|
-
}));
|
|
1264
|
+
}), _response.rawResponse);
|
|
960
1265
|
default:
|
|
961
1266
|
throw new errors.SchematicError({
|
|
962
1267
|
statusCode: _response.error.statusCode,
|
|
963
1268
|
body: _response.error.body,
|
|
1269
|
+
rawResponse: _response.rawResponse,
|
|
964
1270
|
});
|
|
965
1271
|
}
|
|
966
1272
|
}
|
|
@@ -969,12 +1275,14 @@ class Billing {
|
|
|
969
1275
|
throw new errors.SchematicError({
|
|
970
1276
|
statusCode: _response.error.statusCode,
|
|
971
1277
|
body: _response.error.rawBody,
|
|
1278
|
+
rawResponse: _response.rawResponse,
|
|
972
1279
|
});
|
|
973
1280
|
case "timeout":
|
|
974
|
-
throw new errors.SchematicTimeoutError();
|
|
1281
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/payment-methods.");
|
|
975
1282
|
case "unknown":
|
|
976
1283
|
throw new errors.SchematicError({
|
|
977
1284
|
message: _response.error.errorMessage,
|
|
1285
|
+
rawResponse: _response.rawResponse,
|
|
978
1286
|
});
|
|
979
1287
|
}
|
|
980
1288
|
});
|
|
@@ -986,6 +1294,7 @@ class Billing {
|
|
|
986
1294
|
* @throws {@link Schematic.BadRequestError}
|
|
987
1295
|
* @throws {@link Schematic.UnauthorizedError}
|
|
988
1296
|
* @throws {@link Schematic.ForbiddenError}
|
|
1297
|
+
* @throws {@link Schematic.NotFoundError}
|
|
989
1298
|
* @throws {@link Schematic.InternalServerError}
|
|
990
1299
|
*
|
|
991
1300
|
* @example
|
|
@@ -996,12 +1305,15 @@ class Billing {
|
|
|
996
1305
|
* })
|
|
997
1306
|
*/
|
|
998
1307
|
upsertPaymentMethod(request, requestOptions) {
|
|
999
|
-
|
|
1308
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertPaymentMethod(request, requestOptions));
|
|
1309
|
+
}
|
|
1310
|
+
__upsertPaymentMethod(request, requestOptions) {
|
|
1000
1311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1312
|
+
var _a, _b, _c;
|
|
1001
1313
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1002
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1314
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/payment-methods"),
|
|
1003
1315
|
method: "POST",
|
|
1004
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1316
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1005
1317
|
contentType: "application/json",
|
|
1006
1318
|
requestType: "json",
|
|
1007
1319
|
body: serializers.CreatePaymentMethodRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1010,13 +1322,16 @@ class Billing {
|
|
|
1010
1322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1011
1323
|
});
|
|
1012
1324
|
if (_response.ok) {
|
|
1013
|
-
return
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1325
|
+
return {
|
|
1326
|
+
data: serializers.UpsertPaymentMethodResponse.parseOrThrow(_response.body, {
|
|
1327
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1328
|
+
allowUnrecognizedUnionMembers: true,
|
|
1329
|
+
allowUnrecognizedEnumValues: true,
|
|
1330
|
+
skipValidation: true,
|
|
1331
|
+
breadcrumbsPrefix: ["response"],
|
|
1332
|
+
}),
|
|
1333
|
+
rawResponse: _response.rawResponse,
|
|
1334
|
+
};
|
|
1020
1335
|
}
|
|
1021
1336
|
if (_response.error.reason === "status-code") {
|
|
1022
1337
|
switch (_response.error.statusCode) {
|
|
@@ -1027,7 +1342,7 @@ class Billing {
|
|
|
1027
1342
|
allowUnrecognizedEnumValues: true,
|
|
1028
1343
|
skipValidation: true,
|
|
1029
1344
|
breadcrumbsPrefix: ["response"],
|
|
1030
|
-
}));
|
|
1345
|
+
}), _response.rawResponse);
|
|
1031
1346
|
case 401:
|
|
1032
1347
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1033
1348
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1035,7 +1350,7 @@ class Billing {
|
|
|
1035
1350
|
allowUnrecognizedEnumValues: true,
|
|
1036
1351
|
skipValidation: true,
|
|
1037
1352
|
breadcrumbsPrefix: ["response"],
|
|
1038
|
-
}));
|
|
1353
|
+
}), _response.rawResponse);
|
|
1039
1354
|
case 403:
|
|
1040
1355
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1041
1356
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1043,7 +1358,15 @@ class Billing {
|
|
|
1043
1358
|
allowUnrecognizedEnumValues: true,
|
|
1044
1359
|
skipValidation: true,
|
|
1045
1360
|
breadcrumbsPrefix: ["response"],
|
|
1046
|
-
}));
|
|
1361
|
+
}), _response.rawResponse);
|
|
1362
|
+
case 404:
|
|
1363
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1365
|
+
allowUnrecognizedUnionMembers: true,
|
|
1366
|
+
allowUnrecognizedEnumValues: true,
|
|
1367
|
+
skipValidation: true,
|
|
1368
|
+
breadcrumbsPrefix: ["response"],
|
|
1369
|
+
}), _response.rawResponse);
|
|
1047
1370
|
case 500:
|
|
1048
1371
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1049
1372
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1051,11 +1374,12 @@ class Billing {
|
|
|
1051
1374
|
allowUnrecognizedEnumValues: true,
|
|
1052
1375
|
skipValidation: true,
|
|
1053
1376
|
breadcrumbsPrefix: ["response"],
|
|
1054
|
-
}));
|
|
1377
|
+
}), _response.rawResponse);
|
|
1055
1378
|
default:
|
|
1056
1379
|
throw new errors.SchematicError({
|
|
1057
1380
|
statusCode: _response.error.statusCode,
|
|
1058
1381
|
body: _response.error.body,
|
|
1382
|
+
rawResponse: _response.rawResponse,
|
|
1059
1383
|
});
|
|
1060
1384
|
}
|
|
1061
1385
|
}
|
|
@@ -1064,12 +1388,14 @@ class Billing {
|
|
|
1064
1388
|
throw new errors.SchematicError({
|
|
1065
1389
|
statusCode: _response.error.statusCode,
|
|
1066
1390
|
body: _response.error.rawBody,
|
|
1391
|
+
rawResponse: _response.rawResponse,
|
|
1067
1392
|
});
|
|
1068
1393
|
case "timeout":
|
|
1069
|
-
throw new errors.SchematicTimeoutError();
|
|
1394
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/payment-methods.");
|
|
1070
1395
|
case "unknown":
|
|
1071
1396
|
throw new errors.SchematicError({
|
|
1072
1397
|
message: _response.error.errorMessage,
|
|
1398
|
+
rawResponse: _response.rawResponse,
|
|
1073
1399
|
});
|
|
1074
1400
|
}
|
|
1075
1401
|
});
|
|
@@ -1081,15 +1407,19 @@ class Billing {
|
|
|
1081
1407
|
* @throws {@link Schematic.BadRequestError}
|
|
1082
1408
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1083
1409
|
* @throws {@link Schematic.ForbiddenError}
|
|
1410
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1084
1411
|
* @throws {@link Schematic.InternalServerError}
|
|
1085
1412
|
*
|
|
1086
1413
|
* @example
|
|
1087
1414
|
* await client.billing.searchBillingPrices()
|
|
1088
1415
|
*/
|
|
1089
1416
|
searchBillingPrices(request = {}, requestOptions) {
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1417
|
+
return core.HttpResponsePromise.fromPromise(this.__searchBillingPrices(request, requestOptions));
|
|
1418
|
+
}
|
|
1419
|
+
__searchBillingPrices() {
|
|
1420
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1421
|
+
var _a, _b, _c;
|
|
1422
|
+
const { ids, q, interval, usageType, price, limit, offset } = request;
|
|
1093
1423
|
const _queryParams = {};
|
|
1094
1424
|
if (ids != null) {
|
|
1095
1425
|
if (Array.isArray(ids)) {
|
|
@@ -1099,11 +1429,16 @@ class Billing {
|
|
|
1099
1429
|
_queryParams["ids"] = ids;
|
|
1100
1430
|
}
|
|
1101
1431
|
}
|
|
1432
|
+
if (q != null) {
|
|
1433
|
+
_queryParams["q"] = q;
|
|
1434
|
+
}
|
|
1102
1435
|
if (interval != null) {
|
|
1103
1436
|
_queryParams["interval"] = interval;
|
|
1104
1437
|
}
|
|
1105
1438
|
if (usageType != null) {
|
|
1106
|
-
_queryParams["usage_type"] = usageType
|
|
1439
|
+
_queryParams["usage_type"] = serializers.SearchBillingPricesRequestUsageType.jsonOrThrow(usageType, {
|
|
1440
|
+
unrecognizedObjectKeys: "strip",
|
|
1441
|
+
});
|
|
1107
1442
|
}
|
|
1108
1443
|
if (price != null) {
|
|
1109
1444
|
_queryParams["price"] = price.toString();
|
|
@@ -1115,9 +1450,9 @@ class Billing {
|
|
|
1115
1450
|
_queryParams["offset"] = offset.toString();
|
|
1116
1451
|
}
|
|
1117
1452
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1118
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1453
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/price"),
|
|
1119
1454
|
method: "GET",
|
|
1120
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1455
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1121
1456
|
contentType: "application/json",
|
|
1122
1457
|
queryParameters: _queryParams,
|
|
1123
1458
|
requestType: "json",
|
|
@@ -1126,13 +1461,16 @@ class Billing {
|
|
|
1126
1461
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1127
1462
|
});
|
|
1128
1463
|
if (_response.ok) {
|
|
1129
|
-
return
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1464
|
+
return {
|
|
1465
|
+
data: serializers.SearchBillingPricesResponse.parseOrThrow(_response.body, {
|
|
1466
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1467
|
+
allowUnrecognizedUnionMembers: true,
|
|
1468
|
+
allowUnrecognizedEnumValues: true,
|
|
1469
|
+
skipValidation: true,
|
|
1470
|
+
breadcrumbsPrefix: ["response"],
|
|
1471
|
+
}),
|
|
1472
|
+
rawResponse: _response.rawResponse,
|
|
1473
|
+
};
|
|
1136
1474
|
}
|
|
1137
1475
|
if (_response.error.reason === "status-code") {
|
|
1138
1476
|
switch (_response.error.statusCode) {
|
|
@@ -1143,7 +1481,7 @@ class Billing {
|
|
|
1143
1481
|
allowUnrecognizedEnumValues: true,
|
|
1144
1482
|
skipValidation: true,
|
|
1145
1483
|
breadcrumbsPrefix: ["response"],
|
|
1146
|
-
}));
|
|
1484
|
+
}), _response.rawResponse);
|
|
1147
1485
|
case 401:
|
|
1148
1486
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1149
1487
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1151,7 +1489,7 @@ class Billing {
|
|
|
1151
1489
|
allowUnrecognizedEnumValues: true,
|
|
1152
1490
|
skipValidation: true,
|
|
1153
1491
|
breadcrumbsPrefix: ["response"],
|
|
1154
|
-
}));
|
|
1492
|
+
}), _response.rawResponse);
|
|
1155
1493
|
case 403:
|
|
1156
1494
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1157
1495
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1159,7 +1497,15 @@ class Billing {
|
|
|
1159
1497
|
allowUnrecognizedEnumValues: true,
|
|
1160
1498
|
skipValidation: true,
|
|
1161
1499
|
breadcrumbsPrefix: ["response"],
|
|
1162
|
-
}));
|
|
1500
|
+
}), _response.rawResponse);
|
|
1501
|
+
case 404:
|
|
1502
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1503
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1504
|
+
allowUnrecognizedUnionMembers: true,
|
|
1505
|
+
allowUnrecognizedEnumValues: true,
|
|
1506
|
+
skipValidation: true,
|
|
1507
|
+
breadcrumbsPrefix: ["response"],
|
|
1508
|
+
}), _response.rawResponse);
|
|
1163
1509
|
case 500:
|
|
1164
1510
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1165
1511
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1167,11 +1513,12 @@ class Billing {
|
|
|
1167
1513
|
allowUnrecognizedEnumValues: true,
|
|
1168
1514
|
skipValidation: true,
|
|
1169
1515
|
breadcrumbsPrefix: ["response"],
|
|
1170
|
-
}));
|
|
1516
|
+
}), _response.rawResponse);
|
|
1171
1517
|
default:
|
|
1172
1518
|
throw new errors.SchematicError({
|
|
1173
1519
|
statusCode: _response.error.statusCode,
|
|
1174
1520
|
body: _response.error.body,
|
|
1521
|
+
rawResponse: _response.rawResponse,
|
|
1175
1522
|
});
|
|
1176
1523
|
}
|
|
1177
1524
|
}
|
|
@@ -1180,12 +1527,14 @@ class Billing {
|
|
|
1180
1527
|
throw new errors.SchematicError({
|
|
1181
1528
|
statusCode: _response.error.statusCode,
|
|
1182
1529
|
body: _response.error.rawBody,
|
|
1530
|
+
rawResponse: _response.rawResponse,
|
|
1183
1531
|
});
|
|
1184
1532
|
case "timeout":
|
|
1185
|
-
throw new errors.SchematicTimeoutError();
|
|
1533
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/price.");
|
|
1186
1534
|
case "unknown":
|
|
1187
1535
|
throw new errors.SchematicError({
|
|
1188
1536
|
message: _response.error.errorMessage,
|
|
1537
|
+
rawResponse: _response.rawResponse,
|
|
1189
1538
|
});
|
|
1190
1539
|
}
|
|
1191
1540
|
});
|
|
@@ -1197,26 +1546,35 @@ class Billing {
|
|
|
1197
1546
|
* @throws {@link Schematic.BadRequestError}
|
|
1198
1547
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1199
1548
|
* @throws {@link Schematic.ForbiddenError}
|
|
1549
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1200
1550
|
* @throws {@link Schematic.InternalServerError}
|
|
1201
1551
|
*
|
|
1202
1552
|
* @example
|
|
1203
1553
|
* await client.billing.upsertBillingPrice({
|
|
1554
|
+
* billingScheme: "per_unit",
|
|
1204
1555
|
* currency: "currency",
|
|
1556
|
+
* externalAccountId: "external_account_id",
|
|
1205
1557
|
* interval: "interval",
|
|
1206
1558
|
* isActive: true,
|
|
1207
1559
|
* price: 1,
|
|
1208
1560
|
* priceExternalId: "price_external_id",
|
|
1561
|
+
* priceTiers: [{
|
|
1562
|
+
* priceExternalId: "price_external_id"
|
|
1563
|
+
* }],
|
|
1209
1564
|
* productExternalId: "product_external_id",
|
|
1210
|
-
* usageType: "
|
|
1565
|
+
* usageType: "licensed"
|
|
1211
1566
|
* })
|
|
1212
1567
|
*/
|
|
1213
1568
|
upsertBillingPrice(request, requestOptions) {
|
|
1214
|
-
|
|
1569
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingPrice(request, requestOptions));
|
|
1570
|
+
}
|
|
1571
|
+
__upsertBillingPrice(request, requestOptions) {
|
|
1215
1572
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1573
|
+
var _a, _b, _c;
|
|
1216
1574
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1217
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1575
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/price/upsert"),
|
|
1218
1576
|
method: "POST",
|
|
1219
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1577
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1220
1578
|
contentType: "application/json",
|
|
1221
1579
|
requestType: "json",
|
|
1222
1580
|
body: serializers.CreateBillingPriceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1225,13 +1583,124 @@ class Billing {
|
|
|
1225
1583
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1226
1584
|
});
|
|
1227
1585
|
if (_response.ok) {
|
|
1228
|
-
return
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1586
|
+
return {
|
|
1587
|
+
data: serializers.UpsertBillingPriceResponse.parseOrThrow(_response.body, {
|
|
1588
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1589
|
+
allowUnrecognizedUnionMembers: true,
|
|
1590
|
+
allowUnrecognizedEnumValues: true,
|
|
1591
|
+
skipValidation: true,
|
|
1592
|
+
breadcrumbsPrefix: ["response"],
|
|
1593
|
+
}),
|
|
1594
|
+
rawResponse: _response.rawResponse,
|
|
1595
|
+
};
|
|
1596
|
+
}
|
|
1597
|
+
if (_response.error.reason === "status-code") {
|
|
1598
|
+
switch (_response.error.statusCode) {
|
|
1599
|
+
case 400:
|
|
1600
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1601
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1602
|
+
allowUnrecognizedUnionMembers: true,
|
|
1603
|
+
allowUnrecognizedEnumValues: true,
|
|
1604
|
+
skipValidation: true,
|
|
1605
|
+
breadcrumbsPrefix: ["response"],
|
|
1606
|
+
}), _response.rawResponse);
|
|
1607
|
+
case 401:
|
|
1608
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1609
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1610
|
+
allowUnrecognizedUnionMembers: true,
|
|
1611
|
+
allowUnrecognizedEnumValues: true,
|
|
1612
|
+
skipValidation: true,
|
|
1613
|
+
breadcrumbsPrefix: ["response"],
|
|
1614
|
+
}), _response.rawResponse);
|
|
1615
|
+
case 403:
|
|
1616
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1617
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1618
|
+
allowUnrecognizedUnionMembers: true,
|
|
1619
|
+
allowUnrecognizedEnumValues: true,
|
|
1620
|
+
skipValidation: true,
|
|
1621
|
+
breadcrumbsPrefix: ["response"],
|
|
1622
|
+
}), _response.rawResponse);
|
|
1623
|
+
case 404:
|
|
1624
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1625
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1626
|
+
allowUnrecognizedUnionMembers: true,
|
|
1627
|
+
allowUnrecognizedEnumValues: true,
|
|
1628
|
+
skipValidation: true,
|
|
1629
|
+
breadcrumbsPrefix: ["response"],
|
|
1630
|
+
}), _response.rawResponse);
|
|
1631
|
+
case 500:
|
|
1632
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1633
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1634
|
+
allowUnrecognizedUnionMembers: true,
|
|
1635
|
+
allowUnrecognizedEnumValues: true,
|
|
1636
|
+
skipValidation: true,
|
|
1637
|
+
breadcrumbsPrefix: ["response"],
|
|
1638
|
+
}), _response.rawResponse);
|
|
1639
|
+
default:
|
|
1640
|
+
throw new errors.SchematicError({
|
|
1641
|
+
statusCode: _response.error.statusCode,
|
|
1642
|
+
body: _response.error.body,
|
|
1643
|
+
rawResponse: _response.rawResponse,
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
switch (_response.error.reason) {
|
|
1648
|
+
case "non-json":
|
|
1649
|
+
throw new errors.SchematicError({
|
|
1650
|
+
statusCode: _response.error.statusCode,
|
|
1651
|
+
body: _response.error.rawBody,
|
|
1652
|
+
rawResponse: _response.rawResponse,
|
|
1653
|
+
});
|
|
1654
|
+
case "timeout":
|
|
1655
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/price/upsert.");
|
|
1656
|
+
case "unknown":
|
|
1657
|
+
throw new errors.SchematicError({
|
|
1658
|
+
message: _response.error.errorMessage,
|
|
1659
|
+
rawResponse: _response.rawResponse,
|
|
1660
|
+
});
|
|
1661
|
+
}
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
/**
|
|
1665
|
+
* @param {string} billingId - billing_id
|
|
1666
|
+
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
1667
|
+
*
|
|
1668
|
+
* @throws {@link Schematic.BadRequestError}
|
|
1669
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
1670
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
1671
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1672
|
+
* @throws {@link Schematic.InternalServerError}
|
|
1673
|
+
*
|
|
1674
|
+
* @example
|
|
1675
|
+
* await client.billing.deleteBillingProduct("billing_id")
|
|
1676
|
+
*/
|
|
1677
|
+
deleteBillingProduct(billingId, requestOptions) {
|
|
1678
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteBillingProduct(billingId, requestOptions));
|
|
1679
|
+
}
|
|
1680
|
+
__deleteBillingProduct(billingId, requestOptions) {
|
|
1681
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1682
|
+
var _a, _b, _c;
|
|
1683
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1684
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `billing/product/${encodeURIComponent(billingId)}`),
|
|
1685
|
+
method: "DELETE",
|
|
1686
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1687
|
+
contentType: "application/json",
|
|
1688
|
+
requestType: "json",
|
|
1689
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1690
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1691
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1692
|
+
});
|
|
1693
|
+
if (_response.ok) {
|
|
1694
|
+
return {
|
|
1695
|
+
data: serializers.DeleteBillingProductResponse.parseOrThrow(_response.body, {
|
|
1696
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1697
|
+
allowUnrecognizedUnionMembers: true,
|
|
1698
|
+
allowUnrecognizedEnumValues: true,
|
|
1699
|
+
skipValidation: true,
|
|
1700
|
+
breadcrumbsPrefix: ["response"],
|
|
1701
|
+
}),
|
|
1702
|
+
rawResponse: _response.rawResponse,
|
|
1703
|
+
};
|
|
1235
1704
|
}
|
|
1236
1705
|
if (_response.error.reason === "status-code") {
|
|
1237
1706
|
switch (_response.error.statusCode) {
|
|
@@ -1242,7 +1711,7 @@ class Billing {
|
|
|
1242
1711
|
allowUnrecognizedEnumValues: true,
|
|
1243
1712
|
skipValidation: true,
|
|
1244
1713
|
breadcrumbsPrefix: ["response"],
|
|
1245
|
-
}));
|
|
1714
|
+
}), _response.rawResponse);
|
|
1246
1715
|
case 401:
|
|
1247
1716
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1248
1717
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1250,7 +1719,7 @@ class Billing {
|
|
|
1250
1719
|
allowUnrecognizedEnumValues: true,
|
|
1251
1720
|
skipValidation: true,
|
|
1252
1721
|
breadcrumbsPrefix: ["response"],
|
|
1253
|
-
}));
|
|
1722
|
+
}), _response.rawResponse);
|
|
1254
1723
|
case 403:
|
|
1255
1724
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1256
1725
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1258,7 +1727,15 @@ class Billing {
|
|
|
1258
1727
|
allowUnrecognizedEnumValues: true,
|
|
1259
1728
|
skipValidation: true,
|
|
1260
1729
|
breadcrumbsPrefix: ["response"],
|
|
1261
|
-
}));
|
|
1730
|
+
}), _response.rawResponse);
|
|
1731
|
+
case 404:
|
|
1732
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1733
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1734
|
+
allowUnrecognizedUnionMembers: true,
|
|
1735
|
+
allowUnrecognizedEnumValues: true,
|
|
1736
|
+
skipValidation: true,
|
|
1737
|
+
breadcrumbsPrefix: ["response"],
|
|
1738
|
+
}), _response.rawResponse);
|
|
1262
1739
|
case 500:
|
|
1263
1740
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1264
1741
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1266,11 +1743,12 @@ class Billing {
|
|
|
1266
1743
|
allowUnrecognizedEnumValues: true,
|
|
1267
1744
|
skipValidation: true,
|
|
1268
1745
|
breadcrumbsPrefix: ["response"],
|
|
1269
|
-
}));
|
|
1746
|
+
}), _response.rawResponse);
|
|
1270
1747
|
default:
|
|
1271
1748
|
throw new errors.SchematicError({
|
|
1272
1749
|
statusCode: _response.error.statusCode,
|
|
1273
1750
|
body: _response.error.body,
|
|
1751
|
+
rawResponse: _response.rawResponse,
|
|
1274
1752
|
});
|
|
1275
1753
|
}
|
|
1276
1754
|
}
|
|
@@ -1279,12 +1757,14 @@ class Billing {
|
|
|
1279
1757
|
throw new errors.SchematicError({
|
|
1280
1758
|
statusCode: _response.error.statusCode,
|
|
1281
1759
|
body: _response.error.rawBody,
|
|
1760
|
+
rawResponse: _response.rawResponse,
|
|
1282
1761
|
});
|
|
1283
1762
|
case "timeout":
|
|
1284
|
-
throw new errors.SchematicTimeoutError();
|
|
1763
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/{billing_id}.");
|
|
1285
1764
|
case "unknown":
|
|
1286
1765
|
throw new errors.SchematicError({
|
|
1287
1766
|
message: _response.error.errorMessage,
|
|
1767
|
+
rawResponse: _response.rawResponse,
|
|
1288
1768
|
});
|
|
1289
1769
|
}
|
|
1290
1770
|
});
|
|
@@ -1296,15 +1776,19 @@ class Billing {
|
|
|
1296
1776
|
* @throws {@link Schematic.BadRequestError}
|
|
1297
1777
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1298
1778
|
* @throws {@link Schematic.ForbiddenError}
|
|
1779
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1299
1780
|
* @throws {@link Schematic.InternalServerError}
|
|
1300
1781
|
*
|
|
1301
1782
|
* @example
|
|
1302
1783
|
* await client.billing.listProductPrices()
|
|
1303
1784
|
*/
|
|
1304
1785
|
listProductPrices(request = {}, requestOptions) {
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1786
|
+
return core.HttpResponsePromise.fromPromise(this.__listProductPrices(request, requestOptions));
|
|
1787
|
+
}
|
|
1788
|
+
__listProductPrices() {
|
|
1789
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1790
|
+
var _a, _b, _c;
|
|
1791
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1308
1792
|
const _queryParams = {};
|
|
1309
1793
|
if (ids != null) {
|
|
1310
1794
|
if (Array.isArray(ids)) {
|
|
@@ -1321,17 +1805,23 @@ class Billing {
|
|
|
1321
1805
|
_queryParams["q"] = q;
|
|
1322
1806
|
}
|
|
1323
1807
|
if (priceUsageType != null) {
|
|
1324
|
-
_queryParams["price_usage_type"] = priceUsageType;
|
|
1808
|
+
_queryParams["price_usage_type"] = serializers.ListProductPricesRequestPriceUsageType.jsonOrThrow(priceUsageType, { unrecognizedObjectKeys: "strip" });
|
|
1325
1809
|
}
|
|
1326
1810
|
if (withoutLinkedToPlan != null) {
|
|
1327
1811
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1328
1812
|
}
|
|
1813
|
+
if (withOneTimeCharges != null) {
|
|
1814
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
1815
|
+
}
|
|
1329
1816
|
if (withZeroPrice != null) {
|
|
1330
1817
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1331
1818
|
}
|
|
1332
1819
|
if (withPricesOnly != null) {
|
|
1333
1820
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1334
1821
|
}
|
|
1822
|
+
if (isActive != null) {
|
|
1823
|
+
_queryParams["is_active"] = isActive.toString();
|
|
1824
|
+
}
|
|
1335
1825
|
if (limit != null) {
|
|
1336
1826
|
_queryParams["limit"] = limit.toString();
|
|
1337
1827
|
}
|
|
@@ -1339,9 +1829,9 @@ class Billing {
|
|
|
1339
1829
|
_queryParams["offset"] = offset.toString();
|
|
1340
1830
|
}
|
|
1341
1831
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1342
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1832
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/product/prices"),
|
|
1343
1833
|
method: "GET",
|
|
1344
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1834
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1345
1835
|
contentType: "application/json",
|
|
1346
1836
|
queryParameters: _queryParams,
|
|
1347
1837
|
requestType: "json",
|
|
@@ -1350,13 +1840,16 @@ class Billing {
|
|
|
1350
1840
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1351
1841
|
});
|
|
1352
1842
|
if (_response.ok) {
|
|
1353
|
-
return
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1843
|
+
return {
|
|
1844
|
+
data: serializers.ListProductPricesResponse.parseOrThrow(_response.body, {
|
|
1845
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1846
|
+
allowUnrecognizedUnionMembers: true,
|
|
1847
|
+
allowUnrecognizedEnumValues: true,
|
|
1848
|
+
skipValidation: true,
|
|
1849
|
+
breadcrumbsPrefix: ["response"],
|
|
1850
|
+
}),
|
|
1851
|
+
rawResponse: _response.rawResponse,
|
|
1852
|
+
};
|
|
1360
1853
|
}
|
|
1361
1854
|
if (_response.error.reason === "status-code") {
|
|
1362
1855
|
switch (_response.error.statusCode) {
|
|
@@ -1367,7 +1860,7 @@ class Billing {
|
|
|
1367
1860
|
allowUnrecognizedEnumValues: true,
|
|
1368
1861
|
skipValidation: true,
|
|
1369
1862
|
breadcrumbsPrefix: ["response"],
|
|
1370
|
-
}));
|
|
1863
|
+
}), _response.rawResponse);
|
|
1371
1864
|
case 401:
|
|
1372
1865
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1373
1866
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1375,7 +1868,7 @@ class Billing {
|
|
|
1375
1868
|
allowUnrecognizedEnumValues: true,
|
|
1376
1869
|
skipValidation: true,
|
|
1377
1870
|
breadcrumbsPrefix: ["response"],
|
|
1378
|
-
}));
|
|
1871
|
+
}), _response.rawResponse);
|
|
1379
1872
|
case 403:
|
|
1380
1873
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1381
1874
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1383,7 +1876,15 @@ class Billing {
|
|
|
1383
1876
|
allowUnrecognizedEnumValues: true,
|
|
1384
1877
|
skipValidation: true,
|
|
1385
1878
|
breadcrumbsPrefix: ["response"],
|
|
1386
|
-
}));
|
|
1879
|
+
}), _response.rawResponse);
|
|
1880
|
+
case 404:
|
|
1881
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1882
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1883
|
+
allowUnrecognizedUnionMembers: true,
|
|
1884
|
+
allowUnrecognizedEnumValues: true,
|
|
1885
|
+
skipValidation: true,
|
|
1886
|
+
breadcrumbsPrefix: ["response"],
|
|
1887
|
+
}), _response.rawResponse);
|
|
1387
1888
|
case 500:
|
|
1388
1889
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1389
1890
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1391,11 +1892,12 @@ class Billing {
|
|
|
1391
1892
|
allowUnrecognizedEnumValues: true,
|
|
1392
1893
|
skipValidation: true,
|
|
1393
1894
|
breadcrumbsPrefix: ["response"],
|
|
1394
|
-
}));
|
|
1895
|
+
}), _response.rawResponse);
|
|
1395
1896
|
default:
|
|
1396
1897
|
throw new errors.SchematicError({
|
|
1397
1898
|
statusCode: _response.error.statusCode,
|
|
1398
1899
|
body: _response.error.body,
|
|
1900
|
+
rawResponse: _response.rawResponse,
|
|
1399
1901
|
});
|
|
1400
1902
|
}
|
|
1401
1903
|
}
|
|
@@ -1404,12 +1906,14 @@ class Billing {
|
|
|
1404
1906
|
throw new errors.SchematicError({
|
|
1405
1907
|
statusCode: _response.error.statusCode,
|
|
1406
1908
|
body: _response.error.rawBody,
|
|
1909
|
+
rawResponse: _response.rawResponse,
|
|
1407
1910
|
});
|
|
1408
1911
|
case "timeout":
|
|
1409
|
-
throw new errors.SchematicTimeoutError();
|
|
1912
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/product/prices.");
|
|
1410
1913
|
case "unknown":
|
|
1411
1914
|
throw new errors.SchematicError({
|
|
1412
1915
|
message: _response.error.errorMessage,
|
|
1916
|
+
rawResponse: _response.rawResponse,
|
|
1413
1917
|
});
|
|
1414
1918
|
}
|
|
1415
1919
|
});
|
|
@@ -1421,18 +1925,22 @@ class Billing {
|
|
|
1421
1925
|
* @throws {@link Schematic.BadRequestError}
|
|
1422
1926
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1423
1927
|
* @throws {@link Schematic.ForbiddenError}
|
|
1928
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1424
1929
|
* @throws {@link Schematic.InternalServerError}
|
|
1425
1930
|
*
|
|
1426
1931
|
* @example
|
|
1427
1932
|
* await client.billing.deleteProductPrice("billing_id")
|
|
1428
1933
|
*/
|
|
1429
1934
|
deleteProductPrice(billingId, requestOptions) {
|
|
1430
|
-
|
|
1935
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteProductPrice(billingId, requestOptions));
|
|
1936
|
+
}
|
|
1937
|
+
__deleteProductPrice(billingId, requestOptions) {
|
|
1431
1938
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1939
|
+
var _a, _b, _c;
|
|
1432
1940
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1433
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1941
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `billing/product/prices/${encodeURIComponent(billingId)}`),
|
|
1434
1942
|
method: "DELETE",
|
|
1435
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1943
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1436
1944
|
contentType: "application/json",
|
|
1437
1945
|
requestType: "json",
|
|
1438
1946
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1440,13 +1948,16 @@ class Billing {
|
|
|
1440
1948
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1441
1949
|
});
|
|
1442
1950
|
if (_response.ok) {
|
|
1443
|
-
return
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1951
|
+
return {
|
|
1952
|
+
data: serializers.DeleteProductPriceResponse.parseOrThrow(_response.body, {
|
|
1953
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1954
|
+
allowUnrecognizedUnionMembers: true,
|
|
1955
|
+
allowUnrecognizedEnumValues: true,
|
|
1956
|
+
skipValidation: true,
|
|
1957
|
+
breadcrumbsPrefix: ["response"],
|
|
1958
|
+
}),
|
|
1959
|
+
rawResponse: _response.rawResponse,
|
|
1960
|
+
};
|
|
1450
1961
|
}
|
|
1451
1962
|
if (_response.error.reason === "status-code") {
|
|
1452
1963
|
switch (_response.error.statusCode) {
|
|
@@ -1457,7 +1968,7 @@ class Billing {
|
|
|
1457
1968
|
allowUnrecognizedEnumValues: true,
|
|
1458
1969
|
skipValidation: true,
|
|
1459
1970
|
breadcrumbsPrefix: ["response"],
|
|
1460
|
-
}));
|
|
1971
|
+
}), _response.rawResponse);
|
|
1461
1972
|
case 401:
|
|
1462
1973
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1463
1974
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1465,7 +1976,7 @@ class Billing {
|
|
|
1465
1976
|
allowUnrecognizedEnumValues: true,
|
|
1466
1977
|
skipValidation: true,
|
|
1467
1978
|
breadcrumbsPrefix: ["response"],
|
|
1468
|
-
}));
|
|
1979
|
+
}), _response.rawResponse);
|
|
1469
1980
|
case 403:
|
|
1470
1981
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1471
1982
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1473,7 +1984,15 @@ class Billing {
|
|
|
1473
1984
|
allowUnrecognizedEnumValues: true,
|
|
1474
1985
|
skipValidation: true,
|
|
1475
1986
|
breadcrumbsPrefix: ["response"],
|
|
1476
|
-
}));
|
|
1987
|
+
}), _response.rawResponse);
|
|
1988
|
+
case 404:
|
|
1989
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1990
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1991
|
+
allowUnrecognizedUnionMembers: true,
|
|
1992
|
+
allowUnrecognizedEnumValues: true,
|
|
1993
|
+
skipValidation: true,
|
|
1994
|
+
breadcrumbsPrefix: ["response"],
|
|
1995
|
+
}), _response.rawResponse);
|
|
1477
1996
|
case 500:
|
|
1478
1997
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1479
1998
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1481,11 +2000,12 @@ class Billing {
|
|
|
1481
2000
|
allowUnrecognizedEnumValues: true,
|
|
1482
2001
|
skipValidation: true,
|
|
1483
2002
|
breadcrumbsPrefix: ["response"],
|
|
1484
|
-
}));
|
|
2003
|
+
}), _response.rawResponse);
|
|
1485
2004
|
default:
|
|
1486
2005
|
throw new errors.SchematicError({
|
|
1487
2006
|
statusCode: _response.error.statusCode,
|
|
1488
2007
|
body: _response.error.body,
|
|
2008
|
+
rawResponse: _response.rawResponse,
|
|
1489
2009
|
});
|
|
1490
2010
|
}
|
|
1491
2011
|
}
|
|
@@ -1494,12 +2014,14 @@ class Billing {
|
|
|
1494
2014
|
throw new errors.SchematicError({
|
|
1495
2015
|
statusCode: _response.error.statusCode,
|
|
1496
2016
|
body: _response.error.rawBody,
|
|
2017
|
+
rawResponse: _response.rawResponse,
|
|
1497
2018
|
});
|
|
1498
2019
|
case "timeout":
|
|
1499
|
-
throw new errors.SchematicTimeoutError();
|
|
2020
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/prices/{billing_id}.");
|
|
1500
2021
|
case "unknown":
|
|
1501
2022
|
throw new errors.SchematicError({
|
|
1502
2023
|
message: _response.error.errorMessage,
|
|
2024
|
+
rawResponse: _response.rawResponse,
|
|
1503
2025
|
});
|
|
1504
2026
|
}
|
|
1505
2027
|
});
|
|
@@ -1511,24 +2033,26 @@ class Billing {
|
|
|
1511
2033
|
* @throws {@link Schematic.BadRequestError}
|
|
1512
2034
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1513
2035
|
* @throws {@link Schematic.ForbiddenError}
|
|
2036
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1514
2037
|
* @throws {@link Schematic.InternalServerError}
|
|
1515
2038
|
*
|
|
1516
2039
|
* @example
|
|
1517
2040
|
* await client.billing.upsertBillingProduct({
|
|
1518
|
-
* currency: "currency",
|
|
1519
2041
|
* externalId: "external_id",
|
|
1520
2042
|
* name: "name",
|
|
1521
|
-
* price: 1.1
|
|
1522
|
-
* quantity: 1
|
|
2043
|
+
* price: 1.1
|
|
1523
2044
|
* })
|
|
1524
2045
|
*/
|
|
1525
2046
|
upsertBillingProduct(request, requestOptions) {
|
|
1526
|
-
|
|
2047
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingProduct(request, requestOptions));
|
|
2048
|
+
}
|
|
2049
|
+
__upsertBillingProduct(request, requestOptions) {
|
|
1527
2050
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2051
|
+
var _a, _b, _c;
|
|
1528
2052
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1529
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2053
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/product/upsert"),
|
|
1530
2054
|
method: "POST",
|
|
1531
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2055
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1532
2056
|
contentType: "application/json",
|
|
1533
2057
|
requestType: "json",
|
|
1534
2058
|
body: serializers.CreateBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1537,13 +2061,16 @@ class Billing {
|
|
|
1537
2061
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1538
2062
|
});
|
|
1539
2063
|
if (_response.ok) {
|
|
1540
|
-
return
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
2064
|
+
return {
|
|
2065
|
+
data: serializers.UpsertBillingProductResponse.parseOrThrow(_response.body, {
|
|
2066
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2067
|
+
allowUnrecognizedUnionMembers: true,
|
|
2068
|
+
allowUnrecognizedEnumValues: true,
|
|
2069
|
+
skipValidation: true,
|
|
2070
|
+
breadcrumbsPrefix: ["response"],
|
|
2071
|
+
}),
|
|
2072
|
+
rawResponse: _response.rawResponse,
|
|
2073
|
+
};
|
|
1547
2074
|
}
|
|
1548
2075
|
if (_response.error.reason === "status-code") {
|
|
1549
2076
|
switch (_response.error.statusCode) {
|
|
@@ -1554,7 +2081,7 @@ class Billing {
|
|
|
1554
2081
|
allowUnrecognizedEnumValues: true,
|
|
1555
2082
|
skipValidation: true,
|
|
1556
2083
|
breadcrumbsPrefix: ["response"],
|
|
1557
|
-
}));
|
|
2084
|
+
}), _response.rawResponse);
|
|
1558
2085
|
case 401:
|
|
1559
2086
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1560
2087
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1562,7 +2089,7 @@ class Billing {
|
|
|
1562
2089
|
allowUnrecognizedEnumValues: true,
|
|
1563
2090
|
skipValidation: true,
|
|
1564
2091
|
breadcrumbsPrefix: ["response"],
|
|
1565
|
-
}));
|
|
2092
|
+
}), _response.rawResponse);
|
|
1566
2093
|
case 403:
|
|
1567
2094
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1568
2095
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1570,7 +2097,15 @@ class Billing {
|
|
|
1570
2097
|
allowUnrecognizedEnumValues: true,
|
|
1571
2098
|
skipValidation: true,
|
|
1572
2099
|
breadcrumbsPrefix: ["response"],
|
|
1573
|
-
}));
|
|
2100
|
+
}), _response.rawResponse);
|
|
2101
|
+
case 404:
|
|
2102
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2103
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2104
|
+
allowUnrecognizedUnionMembers: true,
|
|
2105
|
+
allowUnrecognizedEnumValues: true,
|
|
2106
|
+
skipValidation: true,
|
|
2107
|
+
breadcrumbsPrefix: ["response"],
|
|
2108
|
+
}), _response.rawResponse);
|
|
1574
2109
|
case 500:
|
|
1575
2110
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1576
2111
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1578,11 +2113,12 @@ class Billing {
|
|
|
1578
2113
|
allowUnrecognizedEnumValues: true,
|
|
1579
2114
|
skipValidation: true,
|
|
1580
2115
|
breadcrumbsPrefix: ["response"],
|
|
1581
|
-
}));
|
|
2116
|
+
}), _response.rawResponse);
|
|
1582
2117
|
default:
|
|
1583
2118
|
throw new errors.SchematicError({
|
|
1584
2119
|
statusCode: _response.error.statusCode,
|
|
1585
2120
|
body: _response.error.body,
|
|
2121
|
+
rawResponse: _response.rawResponse,
|
|
1586
2122
|
});
|
|
1587
2123
|
}
|
|
1588
2124
|
}
|
|
@@ -1591,12 +2127,14 @@ class Billing {
|
|
|
1591
2127
|
throw new errors.SchematicError({
|
|
1592
2128
|
statusCode: _response.error.statusCode,
|
|
1593
2129
|
body: _response.error.rawBody,
|
|
2130
|
+
rawResponse: _response.rawResponse,
|
|
1594
2131
|
});
|
|
1595
2132
|
case "timeout":
|
|
1596
|
-
throw new errors.SchematicTimeoutError();
|
|
2133
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/product/upsert.");
|
|
1597
2134
|
case "unknown":
|
|
1598
2135
|
throw new errors.SchematicError({
|
|
1599
2136
|
message: _response.error.errorMessage,
|
|
2137
|
+
rawResponse: _response.rawResponse,
|
|
1600
2138
|
});
|
|
1601
2139
|
}
|
|
1602
2140
|
});
|
|
@@ -1608,15 +2146,19 @@ class Billing {
|
|
|
1608
2146
|
* @throws {@link Schematic.BadRequestError}
|
|
1609
2147
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1610
2148
|
* @throws {@link Schematic.ForbiddenError}
|
|
2149
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1611
2150
|
* @throws {@link Schematic.InternalServerError}
|
|
1612
2151
|
*
|
|
1613
2152
|
* @example
|
|
1614
2153
|
* await client.billing.listBillingProducts()
|
|
1615
2154
|
*/
|
|
1616
2155
|
listBillingProducts(request = {}, requestOptions) {
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
2156
|
+
return core.HttpResponsePromise.fromPromise(this.__listBillingProducts(request, requestOptions));
|
|
2157
|
+
}
|
|
2158
|
+
__listBillingProducts() {
|
|
2159
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
2160
|
+
var _a, _b, _c;
|
|
2161
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1620
2162
|
const _queryParams = {};
|
|
1621
2163
|
if (ids != null) {
|
|
1622
2164
|
if (Array.isArray(ids)) {
|
|
@@ -1633,17 +2175,23 @@ class Billing {
|
|
|
1633
2175
|
_queryParams["q"] = q;
|
|
1634
2176
|
}
|
|
1635
2177
|
if (priceUsageType != null) {
|
|
1636
|
-
_queryParams["price_usage_type"] = priceUsageType;
|
|
2178
|
+
_queryParams["price_usage_type"] = serializers.ListBillingProductsRequestPriceUsageType.jsonOrThrow(priceUsageType, { unrecognizedObjectKeys: "strip" });
|
|
1637
2179
|
}
|
|
1638
2180
|
if (withoutLinkedToPlan != null) {
|
|
1639
2181
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1640
2182
|
}
|
|
2183
|
+
if (withOneTimeCharges != null) {
|
|
2184
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
2185
|
+
}
|
|
1641
2186
|
if (withZeroPrice != null) {
|
|
1642
2187
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1643
2188
|
}
|
|
1644
2189
|
if (withPricesOnly != null) {
|
|
1645
2190
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1646
2191
|
}
|
|
2192
|
+
if (isActive != null) {
|
|
2193
|
+
_queryParams["is_active"] = isActive.toString();
|
|
2194
|
+
}
|
|
1647
2195
|
if (limit != null) {
|
|
1648
2196
|
_queryParams["limit"] = limit.toString();
|
|
1649
2197
|
}
|
|
@@ -1651,9 +2199,9 @@ class Billing {
|
|
|
1651
2199
|
_queryParams["offset"] = offset.toString();
|
|
1652
2200
|
}
|
|
1653
2201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1654
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2202
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/products"),
|
|
1655
2203
|
method: "GET",
|
|
1656
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2204
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1657
2205
|
contentType: "application/json",
|
|
1658
2206
|
queryParameters: _queryParams,
|
|
1659
2207
|
requestType: "json",
|
|
@@ -1662,13 +2210,16 @@ class Billing {
|
|
|
1662
2210
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1663
2211
|
});
|
|
1664
2212
|
if (_response.ok) {
|
|
1665
|
-
return
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
2213
|
+
return {
|
|
2214
|
+
data: serializers.ListBillingProductsResponse.parseOrThrow(_response.body, {
|
|
2215
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2216
|
+
allowUnrecognizedUnionMembers: true,
|
|
2217
|
+
allowUnrecognizedEnumValues: true,
|
|
2218
|
+
skipValidation: true,
|
|
2219
|
+
breadcrumbsPrefix: ["response"],
|
|
2220
|
+
}),
|
|
2221
|
+
rawResponse: _response.rawResponse,
|
|
2222
|
+
};
|
|
1672
2223
|
}
|
|
1673
2224
|
if (_response.error.reason === "status-code") {
|
|
1674
2225
|
switch (_response.error.statusCode) {
|
|
@@ -1679,7 +2230,7 @@ class Billing {
|
|
|
1679
2230
|
allowUnrecognizedEnumValues: true,
|
|
1680
2231
|
skipValidation: true,
|
|
1681
2232
|
breadcrumbsPrefix: ["response"],
|
|
1682
|
-
}));
|
|
2233
|
+
}), _response.rawResponse);
|
|
1683
2234
|
case 401:
|
|
1684
2235
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1685
2236
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1687,7 +2238,7 @@ class Billing {
|
|
|
1687
2238
|
allowUnrecognizedEnumValues: true,
|
|
1688
2239
|
skipValidation: true,
|
|
1689
2240
|
breadcrumbsPrefix: ["response"],
|
|
1690
|
-
}));
|
|
2241
|
+
}), _response.rawResponse);
|
|
1691
2242
|
case 403:
|
|
1692
2243
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1693
2244
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1695,7 +2246,15 @@ class Billing {
|
|
|
1695
2246
|
allowUnrecognizedEnumValues: true,
|
|
1696
2247
|
skipValidation: true,
|
|
1697
2248
|
breadcrumbsPrefix: ["response"],
|
|
1698
|
-
}));
|
|
2249
|
+
}), _response.rawResponse);
|
|
2250
|
+
case 404:
|
|
2251
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2252
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2253
|
+
allowUnrecognizedUnionMembers: true,
|
|
2254
|
+
allowUnrecognizedEnumValues: true,
|
|
2255
|
+
skipValidation: true,
|
|
2256
|
+
breadcrumbsPrefix: ["response"],
|
|
2257
|
+
}), _response.rawResponse);
|
|
1699
2258
|
case 500:
|
|
1700
2259
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1701
2260
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1703,11 +2262,12 @@ class Billing {
|
|
|
1703
2262
|
allowUnrecognizedEnumValues: true,
|
|
1704
2263
|
skipValidation: true,
|
|
1705
2264
|
breadcrumbsPrefix: ["response"],
|
|
1706
|
-
}));
|
|
2265
|
+
}), _response.rawResponse);
|
|
1707
2266
|
default:
|
|
1708
2267
|
throw new errors.SchematicError({
|
|
1709
2268
|
statusCode: _response.error.statusCode,
|
|
1710
2269
|
body: _response.error.body,
|
|
2270
|
+
rawResponse: _response.rawResponse,
|
|
1711
2271
|
});
|
|
1712
2272
|
}
|
|
1713
2273
|
}
|
|
@@ -1716,12 +2276,14 @@ class Billing {
|
|
|
1716
2276
|
throw new errors.SchematicError({
|
|
1717
2277
|
statusCode: _response.error.statusCode,
|
|
1718
2278
|
body: _response.error.rawBody,
|
|
2279
|
+
rawResponse: _response.rawResponse,
|
|
1719
2280
|
});
|
|
1720
2281
|
case "timeout":
|
|
1721
|
-
throw new errors.SchematicTimeoutError();
|
|
2282
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products.");
|
|
1722
2283
|
case "unknown":
|
|
1723
2284
|
throw new errors.SchematicError({
|
|
1724
2285
|
message: _response.error.errorMessage,
|
|
2286
|
+
rawResponse: _response.rawResponse,
|
|
1725
2287
|
});
|
|
1726
2288
|
}
|
|
1727
2289
|
});
|
|
@@ -1733,15 +2295,19 @@ class Billing {
|
|
|
1733
2295
|
* @throws {@link Schematic.BadRequestError}
|
|
1734
2296
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1735
2297
|
* @throws {@link Schematic.ForbiddenError}
|
|
2298
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1736
2299
|
* @throws {@link Schematic.InternalServerError}
|
|
1737
2300
|
*
|
|
1738
2301
|
* @example
|
|
1739
2302
|
* await client.billing.countBillingProducts()
|
|
1740
2303
|
*/
|
|
1741
2304
|
countBillingProducts(request = {}, requestOptions) {
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
2305
|
+
return core.HttpResponsePromise.fromPromise(this.__countBillingProducts(request, requestOptions));
|
|
2306
|
+
}
|
|
2307
|
+
__countBillingProducts() {
|
|
2308
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
2309
|
+
var _a, _b, _c;
|
|
2310
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1745
2311
|
const _queryParams = {};
|
|
1746
2312
|
if (ids != null) {
|
|
1747
2313
|
if (Array.isArray(ids)) {
|
|
@@ -1758,17 +2324,23 @@ class Billing {
|
|
|
1758
2324
|
_queryParams["q"] = q;
|
|
1759
2325
|
}
|
|
1760
2326
|
if (priceUsageType != null) {
|
|
1761
|
-
_queryParams["price_usage_type"] = priceUsageType;
|
|
2327
|
+
_queryParams["price_usage_type"] = serializers.CountBillingProductsRequestPriceUsageType.jsonOrThrow(priceUsageType, { unrecognizedObjectKeys: "strip" });
|
|
1762
2328
|
}
|
|
1763
2329
|
if (withoutLinkedToPlan != null) {
|
|
1764
2330
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1765
2331
|
}
|
|
2332
|
+
if (withOneTimeCharges != null) {
|
|
2333
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
2334
|
+
}
|
|
1766
2335
|
if (withZeroPrice != null) {
|
|
1767
2336
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1768
2337
|
}
|
|
1769
2338
|
if (withPricesOnly != null) {
|
|
1770
2339
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1771
2340
|
}
|
|
2341
|
+
if (isActive != null) {
|
|
2342
|
+
_queryParams["is_active"] = isActive.toString();
|
|
2343
|
+
}
|
|
1772
2344
|
if (limit != null) {
|
|
1773
2345
|
_queryParams["limit"] = limit.toString();
|
|
1774
2346
|
}
|
|
@@ -1776,9 +2348,9 @@ class Billing {
|
|
|
1776
2348
|
_queryParams["offset"] = offset.toString();
|
|
1777
2349
|
}
|
|
1778
2350
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1779
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2351
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/products/count"),
|
|
1780
2352
|
method: "GET",
|
|
1781
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2353
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1782
2354
|
contentType: "application/json",
|
|
1783
2355
|
queryParameters: _queryParams,
|
|
1784
2356
|
requestType: "json",
|
|
@@ -1787,13 +2359,16 @@ class Billing {
|
|
|
1787
2359
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1788
2360
|
});
|
|
1789
2361
|
if (_response.ok) {
|
|
1790
|
-
return
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
2362
|
+
return {
|
|
2363
|
+
data: serializers.CountBillingProductsResponse.parseOrThrow(_response.body, {
|
|
2364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2365
|
+
allowUnrecognizedUnionMembers: true,
|
|
2366
|
+
allowUnrecognizedEnumValues: true,
|
|
2367
|
+
skipValidation: true,
|
|
2368
|
+
breadcrumbsPrefix: ["response"],
|
|
2369
|
+
}),
|
|
2370
|
+
rawResponse: _response.rawResponse,
|
|
2371
|
+
};
|
|
1797
2372
|
}
|
|
1798
2373
|
if (_response.error.reason === "status-code") {
|
|
1799
2374
|
switch (_response.error.statusCode) {
|
|
@@ -1804,7 +2379,7 @@ class Billing {
|
|
|
1804
2379
|
allowUnrecognizedEnumValues: true,
|
|
1805
2380
|
skipValidation: true,
|
|
1806
2381
|
breadcrumbsPrefix: ["response"],
|
|
1807
|
-
}));
|
|
2382
|
+
}), _response.rawResponse);
|
|
1808
2383
|
case 401:
|
|
1809
2384
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1810
2385
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1812,7 +2387,7 @@ class Billing {
|
|
|
1812
2387
|
allowUnrecognizedEnumValues: true,
|
|
1813
2388
|
skipValidation: true,
|
|
1814
2389
|
breadcrumbsPrefix: ["response"],
|
|
1815
|
-
}));
|
|
2390
|
+
}), _response.rawResponse);
|
|
1816
2391
|
case 403:
|
|
1817
2392
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1818
2393
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1820,7 +2395,15 @@ class Billing {
|
|
|
1820
2395
|
allowUnrecognizedEnumValues: true,
|
|
1821
2396
|
skipValidation: true,
|
|
1822
2397
|
breadcrumbsPrefix: ["response"],
|
|
1823
|
-
}));
|
|
2398
|
+
}), _response.rawResponse);
|
|
2399
|
+
case 404:
|
|
2400
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2401
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2402
|
+
allowUnrecognizedUnionMembers: true,
|
|
2403
|
+
allowUnrecognizedEnumValues: true,
|
|
2404
|
+
skipValidation: true,
|
|
2405
|
+
breadcrumbsPrefix: ["response"],
|
|
2406
|
+
}), _response.rawResponse);
|
|
1824
2407
|
case 500:
|
|
1825
2408
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1826
2409
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1828,11 +2411,12 @@ class Billing {
|
|
|
1828
2411
|
allowUnrecognizedEnumValues: true,
|
|
1829
2412
|
skipValidation: true,
|
|
1830
2413
|
breadcrumbsPrefix: ["response"],
|
|
1831
|
-
}));
|
|
2414
|
+
}), _response.rawResponse);
|
|
1832
2415
|
default:
|
|
1833
2416
|
throw new errors.SchematicError({
|
|
1834
2417
|
statusCode: _response.error.statusCode,
|
|
1835
2418
|
body: _response.error.body,
|
|
2419
|
+
rawResponse: _response.rawResponse,
|
|
1836
2420
|
});
|
|
1837
2421
|
}
|
|
1838
2422
|
}
|
|
@@ -1841,12 +2425,14 @@ class Billing {
|
|
|
1841
2425
|
throw new errors.SchematicError({
|
|
1842
2426
|
statusCode: _response.error.statusCode,
|
|
1843
2427
|
body: _response.error.rawBody,
|
|
2428
|
+
rawResponse: _response.rawResponse,
|
|
1844
2429
|
});
|
|
1845
2430
|
case "timeout":
|
|
1846
|
-
throw new errors.SchematicTimeoutError();
|
|
2431
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products/count.");
|
|
1847
2432
|
case "unknown":
|
|
1848
2433
|
throw new errors.SchematicError({
|
|
1849
2434
|
message: _response.error.errorMessage,
|
|
2435
|
+
rawResponse: _response.rawResponse,
|
|
1850
2436
|
});
|
|
1851
2437
|
}
|
|
1852
2438
|
});
|
|
@@ -1858,10 +2444,12 @@ class Billing {
|
|
|
1858
2444
|
* @throws {@link Schematic.BadRequestError}
|
|
1859
2445
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1860
2446
|
* @throws {@link Schematic.ForbiddenError}
|
|
2447
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1861
2448
|
* @throws {@link Schematic.InternalServerError}
|
|
1862
2449
|
*
|
|
1863
2450
|
* @example
|
|
1864
2451
|
* await client.billing.upsertBillingSubscription({
|
|
2452
|
+
* cancelAtPeriodEnd: true,
|
|
1865
2453
|
* currency: "currency",
|
|
1866
2454
|
* customerExternalId: "customer_external_id",
|
|
1867
2455
|
* discounts: [{
|
|
@@ -1878,19 +2466,22 @@ class Billing {
|
|
|
1878
2466
|
* priceExternalId: "price_external_id",
|
|
1879
2467
|
* productExternalId: "product_external_id",
|
|
1880
2468
|
* quantity: 1,
|
|
1881
|
-
* usageType: "
|
|
2469
|
+
* usageType: "licensed"
|
|
1882
2470
|
* }],
|
|
1883
2471
|
* subscriptionExternalId: "subscription_external_id",
|
|
1884
2472
|
* totalPrice: 1
|
|
1885
2473
|
* })
|
|
1886
2474
|
*/
|
|
1887
2475
|
upsertBillingSubscription(request, requestOptions) {
|
|
1888
|
-
|
|
2476
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingSubscription(request, requestOptions));
|
|
2477
|
+
}
|
|
2478
|
+
__upsertBillingSubscription(request, requestOptions) {
|
|
1889
2479
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2480
|
+
var _a, _b, _c;
|
|
1890
2481
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1891
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2482
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/subscription/upsert"),
|
|
1892
2483
|
method: "POST",
|
|
1893
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2484
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
1894
2485
|
contentType: "application/json",
|
|
1895
2486
|
requestType: "json",
|
|
1896
2487
|
body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {
|
|
@@ -1901,13 +2492,16 @@ class Billing {
|
|
|
1901
2492
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1902
2493
|
});
|
|
1903
2494
|
if (_response.ok) {
|
|
1904
|
-
return
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
2495
|
+
return {
|
|
2496
|
+
data: serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
|
|
2497
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2498
|
+
allowUnrecognizedUnionMembers: true,
|
|
2499
|
+
allowUnrecognizedEnumValues: true,
|
|
2500
|
+
skipValidation: true,
|
|
2501
|
+
breadcrumbsPrefix: ["response"],
|
|
2502
|
+
}),
|
|
2503
|
+
rawResponse: _response.rawResponse,
|
|
2504
|
+
};
|
|
1911
2505
|
}
|
|
1912
2506
|
if (_response.error.reason === "status-code") {
|
|
1913
2507
|
switch (_response.error.statusCode) {
|
|
@@ -1918,7 +2512,7 @@ class Billing {
|
|
|
1918
2512
|
allowUnrecognizedEnumValues: true,
|
|
1919
2513
|
skipValidation: true,
|
|
1920
2514
|
breadcrumbsPrefix: ["response"],
|
|
1921
|
-
}));
|
|
2515
|
+
}), _response.rawResponse);
|
|
1922
2516
|
case 401:
|
|
1923
2517
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1924
2518
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1926,7 +2520,7 @@ class Billing {
|
|
|
1926
2520
|
allowUnrecognizedEnumValues: true,
|
|
1927
2521
|
skipValidation: true,
|
|
1928
2522
|
breadcrumbsPrefix: ["response"],
|
|
1929
|
-
}));
|
|
2523
|
+
}), _response.rawResponse);
|
|
1930
2524
|
case 403:
|
|
1931
2525
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1932
2526
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1934,7 +2528,15 @@ class Billing {
|
|
|
1934
2528
|
allowUnrecognizedEnumValues: true,
|
|
1935
2529
|
skipValidation: true,
|
|
1936
2530
|
breadcrumbsPrefix: ["response"],
|
|
1937
|
-
}));
|
|
2531
|
+
}), _response.rawResponse);
|
|
2532
|
+
case 404:
|
|
2533
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2534
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2535
|
+
allowUnrecognizedUnionMembers: true,
|
|
2536
|
+
allowUnrecognizedEnumValues: true,
|
|
2537
|
+
skipValidation: true,
|
|
2538
|
+
breadcrumbsPrefix: ["response"],
|
|
2539
|
+
}), _response.rawResponse);
|
|
1938
2540
|
case 500:
|
|
1939
2541
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1940
2542
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1942,11 +2544,12 @@ class Billing {
|
|
|
1942
2544
|
allowUnrecognizedEnumValues: true,
|
|
1943
2545
|
skipValidation: true,
|
|
1944
2546
|
breadcrumbsPrefix: ["response"],
|
|
1945
|
-
}));
|
|
2547
|
+
}), _response.rawResponse);
|
|
1946
2548
|
default:
|
|
1947
2549
|
throw new errors.SchematicError({
|
|
1948
2550
|
statusCode: _response.error.statusCode,
|
|
1949
2551
|
body: _response.error.body,
|
|
2552
|
+
rawResponse: _response.rawResponse,
|
|
1950
2553
|
});
|
|
1951
2554
|
}
|
|
1952
2555
|
}
|
|
@@ -1955,12 +2558,14 @@ class Billing {
|
|
|
1955
2558
|
throw new errors.SchematicError({
|
|
1956
2559
|
statusCode: _response.error.statusCode,
|
|
1957
2560
|
body: _response.error.rawBody,
|
|
2561
|
+
rawResponse: _response.rawResponse,
|
|
1958
2562
|
});
|
|
1959
2563
|
case "timeout":
|
|
1960
|
-
throw new errors.SchematicTimeoutError();
|
|
2564
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/subscription/upsert.");
|
|
1961
2565
|
case "unknown":
|
|
1962
2566
|
throw new errors.SchematicError({
|
|
1963
2567
|
message: _response.error.errorMessage,
|
|
2568
|
+
rawResponse: _response.rawResponse,
|
|
1964
2569
|
});
|
|
1965
2570
|
}
|
|
1966
2571
|
});
|