@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) {
|
|
@@ -50,8 +60,580 @@ class Plans {
|
|
|
50
60
|
this._options = _options;
|
|
51
61
|
}
|
|
52
62
|
/**
|
|
53
|
-
* @param {string} companyPlanId - company_plan_id
|
|
54
|
-
* @param {Schematic.UpdateCompanyPlansRequestBody} request
|
|
63
|
+
* @param {string} companyPlanId - company_plan_id
|
|
64
|
+
* @param {Schematic.UpdateCompanyPlansRequestBody} request
|
|
65
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link Schematic.BadRequestError}
|
|
68
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
69
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
70
|
+
* @throws {@link Schematic.NotFoundError}
|
|
71
|
+
* @throws {@link Schematic.InternalServerError}
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* await client.plans.updateCompanyPlans("company_plan_id", {
|
|
75
|
+
* addOnIds: ["add_on_ids"]
|
|
76
|
+
* })
|
|
77
|
+
*/
|
|
78
|
+
updateCompanyPlans(companyPlanId, request, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCompanyPlans(companyPlanId, request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__updateCompanyPlans(companyPlanId, request, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
|
+
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, `company-plans/${encodeURIComponent(companyPlanId)}`),
|
|
86
|
+
method: "PUT",
|
|
87
|
+
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),
|
|
88
|
+
contentType: "application/json",
|
|
89
|
+
requestType: "json",
|
|
90
|
+
body: serializers.UpdateCompanyPlansRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
91
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
92
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
});
|
|
95
|
+
if (_response.ok) {
|
|
96
|
+
return {
|
|
97
|
+
data: serializers.UpdateCompanyPlansResponse.parseOrThrow(_response.body, {
|
|
98
|
+
unrecognizedObjectKeys: "passthrough",
|
|
99
|
+
allowUnrecognizedUnionMembers: true,
|
|
100
|
+
allowUnrecognizedEnumValues: true,
|
|
101
|
+
skipValidation: true,
|
|
102
|
+
breadcrumbsPrefix: ["response"],
|
|
103
|
+
}),
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 400:
|
|
110
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}), _response.rawResponse);
|
|
117
|
+
case 401:
|
|
118
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
119
|
+
unrecognizedObjectKeys: "passthrough",
|
|
120
|
+
allowUnrecognizedUnionMembers: true,
|
|
121
|
+
allowUnrecognizedEnumValues: true,
|
|
122
|
+
skipValidation: true,
|
|
123
|
+
breadcrumbsPrefix: ["response"],
|
|
124
|
+
}), _response.rawResponse);
|
|
125
|
+
case 403:
|
|
126
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
127
|
+
unrecognizedObjectKeys: "passthrough",
|
|
128
|
+
allowUnrecognizedUnionMembers: true,
|
|
129
|
+
allowUnrecognizedEnumValues: true,
|
|
130
|
+
skipValidation: true,
|
|
131
|
+
breadcrumbsPrefix: ["response"],
|
|
132
|
+
}), _response.rawResponse);
|
|
133
|
+
case 404:
|
|
134
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
135
|
+
unrecognizedObjectKeys: "passthrough",
|
|
136
|
+
allowUnrecognizedUnionMembers: true,
|
|
137
|
+
allowUnrecognizedEnumValues: true,
|
|
138
|
+
skipValidation: true,
|
|
139
|
+
breadcrumbsPrefix: ["response"],
|
|
140
|
+
}), _response.rawResponse);
|
|
141
|
+
case 500:
|
|
142
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
143
|
+
unrecognizedObjectKeys: "passthrough",
|
|
144
|
+
allowUnrecognizedUnionMembers: true,
|
|
145
|
+
allowUnrecognizedEnumValues: true,
|
|
146
|
+
skipValidation: true,
|
|
147
|
+
breadcrumbsPrefix: ["response"],
|
|
148
|
+
}), _response.rawResponse);
|
|
149
|
+
default:
|
|
150
|
+
throw new errors.SchematicError({
|
|
151
|
+
statusCode: _response.error.statusCode,
|
|
152
|
+
body: _response.error.body,
|
|
153
|
+
rawResponse: _response.rawResponse,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
switch (_response.error.reason) {
|
|
158
|
+
case "non-json":
|
|
159
|
+
throw new errors.SchematicError({
|
|
160
|
+
statusCode: _response.error.statusCode,
|
|
161
|
+
body: _response.error.rawBody,
|
|
162
|
+
rawResponse: _response.rawResponse,
|
|
163
|
+
});
|
|
164
|
+
case "timeout":
|
|
165
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /company-plans/{company_plan_id}.");
|
|
166
|
+
case "unknown":
|
|
167
|
+
throw new errors.SchematicError({
|
|
168
|
+
message: _response.error.errorMessage,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
176
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
179
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
180
|
+
* @throws {@link Schematic.NotFoundError}
|
|
181
|
+
* @throws {@link Schematic.InternalServerError}
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* await client.plans.getAudience("plan_audience_id")
|
|
185
|
+
*/
|
|
186
|
+
getAudience(planAudienceId, requestOptions) {
|
|
187
|
+
return core.HttpResponsePromise.fromPromise(this.__getAudience(planAudienceId, requestOptions));
|
|
188
|
+
}
|
|
189
|
+
__getAudience(planAudienceId, requestOptions) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
var _a, _b, _c;
|
|
192
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
193
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
194
|
+
method: "GET",
|
|
195
|
+
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),
|
|
196
|
+
contentType: "application/json",
|
|
197
|
+
requestType: "json",
|
|
198
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
199
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
200
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
|
+
});
|
|
202
|
+
if (_response.ok) {
|
|
203
|
+
return {
|
|
204
|
+
data: serializers.GetAudienceResponse.parseOrThrow(_response.body, {
|
|
205
|
+
unrecognizedObjectKeys: "passthrough",
|
|
206
|
+
allowUnrecognizedUnionMembers: true,
|
|
207
|
+
allowUnrecognizedEnumValues: true,
|
|
208
|
+
skipValidation: true,
|
|
209
|
+
breadcrumbsPrefix: ["response"],
|
|
210
|
+
}),
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (_response.error.reason === "status-code") {
|
|
215
|
+
switch (_response.error.statusCode) {
|
|
216
|
+
case 401:
|
|
217
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
218
|
+
unrecognizedObjectKeys: "passthrough",
|
|
219
|
+
allowUnrecognizedUnionMembers: true,
|
|
220
|
+
allowUnrecognizedEnumValues: true,
|
|
221
|
+
skipValidation: true,
|
|
222
|
+
breadcrumbsPrefix: ["response"],
|
|
223
|
+
}), _response.rawResponse);
|
|
224
|
+
case 403:
|
|
225
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
226
|
+
unrecognizedObjectKeys: "passthrough",
|
|
227
|
+
allowUnrecognizedUnionMembers: true,
|
|
228
|
+
allowUnrecognizedEnumValues: true,
|
|
229
|
+
skipValidation: true,
|
|
230
|
+
breadcrumbsPrefix: ["response"],
|
|
231
|
+
}), _response.rawResponse);
|
|
232
|
+
case 404:
|
|
233
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
234
|
+
unrecognizedObjectKeys: "passthrough",
|
|
235
|
+
allowUnrecognizedUnionMembers: true,
|
|
236
|
+
allowUnrecognizedEnumValues: true,
|
|
237
|
+
skipValidation: true,
|
|
238
|
+
breadcrumbsPrefix: ["response"],
|
|
239
|
+
}), _response.rawResponse);
|
|
240
|
+
case 500:
|
|
241
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
242
|
+
unrecognizedObjectKeys: "passthrough",
|
|
243
|
+
allowUnrecognizedUnionMembers: true,
|
|
244
|
+
allowUnrecognizedEnumValues: true,
|
|
245
|
+
skipValidation: true,
|
|
246
|
+
breadcrumbsPrefix: ["response"],
|
|
247
|
+
}), _response.rawResponse);
|
|
248
|
+
default:
|
|
249
|
+
throw new errors.SchematicError({
|
|
250
|
+
statusCode: _response.error.statusCode,
|
|
251
|
+
body: _response.error.body,
|
|
252
|
+
rawResponse: _response.rawResponse,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
switch (_response.error.reason) {
|
|
257
|
+
case "non-json":
|
|
258
|
+
throw new errors.SchematicError({
|
|
259
|
+
statusCode: _response.error.statusCode,
|
|
260
|
+
body: _response.error.rawBody,
|
|
261
|
+
rawResponse: _response.rawResponse,
|
|
262
|
+
});
|
|
263
|
+
case "timeout":
|
|
264
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-audiences/{plan_audience_id}.");
|
|
265
|
+
case "unknown":
|
|
266
|
+
throw new errors.SchematicError({
|
|
267
|
+
message: _response.error.errorMessage,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
275
|
+
* @param {Schematic.UpdateAudienceRequestBody} request
|
|
276
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
+
*
|
|
278
|
+
* @throws {@link Schematic.BadRequestError}
|
|
279
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
280
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
281
|
+
* @throws {@link Schematic.NotFoundError}
|
|
282
|
+
* @throws {@link Schematic.InternalServerError}
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* await client.plans.updateAudience("plan_audience_id", {
|
|
286
|
+
* conditionGroups: [{
|
|
287
|
+
* conditions: [{
|
|
288
|
+
* conditionType: "company",
|
|
289
|
+
* operator: "eq",
|
|
290
|
+
* resourceIds: ["resource_ids"]
|
|
291
|
+
* }]
|
|
292
|
+
* }],
|
|
293
|
+
* conditions: [{
|
|
294
|
+
* conditionType: "company",
|
|
295
|
+
* operator: "eq",
|
|
296
|
+
* resourceIds: ["resource_ids"]
|
|
297
|
+
* }]
|
|
298
|
+
* })
|
|
299
|
+
*/
|
|
300
|
+
updateAudience(planAudienceId, request, requestOptions) {
|
|
301
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAudience(planAudienceId, request, requestOptions));
|
|
302
|
+
}
|
|
303
|
+
__updateAudience(planAudienceId, request, requestOptions) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
var _a, _b, _c;
|
|
306
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
308
|
+
method: "PUT",
|
|
309
|
+
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),
|
|
310
|
+
contentType: "application/json",
|
|
311
|
+
requestType: "json",
|
|
312
|
+
body: serializers.UpdateAudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
313
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
314
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
315
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
316
|
+
});
|
|
317
|
+
if (_response.ok) {
|
|
318
|
+
return {
|
|
319
|
+
data: serializers.UpdateAudienceResponse.parseOrThrow(_response.body, {
|
|
320
|
+
unrecognizedObjectKeys: "passthrough",
|
|
321
|
+
allowUnrecognizedUnionMembers: true,
|
|
322
|
+
allowUnrecognizedEnumValues: true,
|
|
323
|
+
skipValidation: true,
|
|
324
|
+
breadcrumbsPrefix: ["response"],
|
|
325
|
+
}),
|
|
326
|
+
rawResponse: _response.rawResponse,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
if (_response.error.reason === "status-code") {
|
|
330
|
+
switch (_response.error.statusCode) {
|
|
331
|
+
case 400:
|
|
332
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
333
|
+
unrecognizedObjectKeys: "passthrough",
|
|
334
|
+
allowUnrecognizedUnionMembers: true,
|
|
335
|
+
allowUnrecognizedEnumValues: true,
|
|
336
|
+
skipValidation: true,
|
|
337
|
+
breadcrumbsPrefix: ["response"],
|
|
338
|
+
}), _response.rawResponse);
|
|
339
|
+
case 401:
|
|
340
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
341
|
+
unrecognizedObjectKeys: "passthrough",
|
|
342
|
+
allowUnrecognizedUnionMembers: true,
|
|
343
|
+
allowUnrecognizedEnumValues: true,
|
|
344
|
+
skipValidation: true,
|
|
345
|
+
breadcrumbsPrefix: ["response"],
|
|
346
|
+
}), _response.rawResponse);
|
|
347
|
+
case 403:
|
|
348
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
349
|
+
unrecognizedObjectKeys: "passthrough",
|
|
350
|
+
allowUnrecognizedUnionMembers: true,
|
|
351
|
+
allowUnrecognizedEnumValues: true,
|
|
352
|
+
skipValidation: true,
|
|
353
|
+
breadcrumbsPrefix: ["response"],
|
|
354
|
+
}), _response.rawResponse);
|
|
355
|
+
case 404:
|
|
356
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
357
|
+
unrecognizedObjectKeys: "passthrough",
|
|
358
|
+
allowUnrecognizedUnionMembers: true,
|
|
359
|
+
allowUnrecognizedEnumValues: true,
|
|
360
|
+
skipValidation: true,
|
|
361
|
+
breadcrumbsPrefix: ["response"],
|
|
362
|
+
}), _response.rawResponse);
|
|
363
|
+
case 500:
|
|
364
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
365
|
+
unrecognizedObjectKeys: "passthrough",
|
|
366
|
+
allowUnrecognizedUnionMembers: true,
|
|
367
|
+
allowUnrecognizedEnumValues: true,
|
|
368
|
+
skipValidation: true,
|
|
369
|
+
breadcrumbsPrefix: ["response"],
|
|
370
|
+
}), _response.rawResponse);
|
|
371
|
+
default:
|
|
372
|
+
throw new errors.SchematicError({
|
|
373
|
+
statusCode: _response.error.statusCode,
|
|
374
|
+
body: _response.error.body,
|
|
375
|
+
rawResponse: _response.rawResponse,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
switch (_response.error.reason) {
|
|
380
|
+
case "non-json":
|
|
381
|
+
throw new errors.SchematicError({
|
|
382
|
+
statusCode: _response.error.statusCode,
|
|
383
|
+
body: _response.error.rawBody,
|
|
384
|
+
rawResponse: _response.rawResponse,
|
|
385
|
+
});
|
|
386
|
+
case "timeout":
|
|
387
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-audiences/{plan_audience_id}.");
|
|
388
|
+
case "unknown":
|
|
389
|
+
throw new errors.SchematicError({
|
|
390
|
+
message: _response.error.errorMessage,
|
|
391
|
+
rawResponse: _response.rawResponse,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
398
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
399
|
+
*
|
|
400
|
+
* @throws {@link Schematic.BadRequestError}
|
|
401
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
402
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
403
|
+
* @throws {@link Schematic.NotFoundError}
|
|
404
|
+
* @throws {@link Schematic.InternalServerError}
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* await client.plans.deleteAudience("plan_audience_id")
|
|
408
|
+
*/
|
|
409
|
+
deleteAudience(planAudienceId, requestOptions) {
|
|
410
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteAudience(planAudienceId, requestOptions));
|
|
411
|
+
}
|
|
412
|
+
__deleteAudience(planAudienceId, requestOptions) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
var _a, _b, _c;
|
|
415
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
416
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
417
|
+
method: "DELETE",
|
|
418
|
+
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),
|
|
419
|
+
contentType: "application/json",
|
|
420
|
+
requestType: "json",
|
|
421
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
422
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
423
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
424
|
+
});
|
|
425
|
+
if (_response.ok) {
|
|
426
|
+
return {
|
|
427
|
+
data: serializers.DeleteAudienceResponse.parseOrThrow(_response.body, {
|
|
428
|
+
unrecognizedObjectKeys: "passthrough",
|
|
429
|
+
allowUnrecognizedUnionMembers: true,
|
|
430
|
+
allowUnrecognizedEnumValues: true,
|
|
431
|
+
skipValidation: true,
|
|
432
|
+
breadcrumbsPrefix: ["response"],
|
|
433
|
+
}),
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
if (_response.error.reason === "status-code") {
|
|
438
|
+
switch (_response.error.statusCode) {
|
|
439
|
+
case 400:
|
|
440
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
441
|
+
unrecognizedObjectKeys: "passthrough",
|
|
442
|
+
allowUnrecognizedUnionMembers: true,
|
|
443
|
+
allowUnrecognizedEnumValues: true,
|
|
444
|
+
skipValidation: true,
|
|
445
|
+
breadcrumbsPrefix: ["response"],
|
|
446
|
+
}), _response.rawResponse);
|
|
447
|
+
case 401:
|
|
448
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
449
|
+
unrecognizedObjectKeys: "passthrough",
|
|
450
|
+
allowUnrecognizedUnionMembers: true,
|
|
451
|
+
allowUnrecognizedEnumValues: true,
|
|
452
|
+
skipValidation: true,
|
|
453
|
+
breadcrumbsPrefix: ["response"],
|
|
454
|
+
}), _response.rawResponse);
|
|
455
|
+
case 403:
|
|
456
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
457
|
+
unrecognizedObjectKeys: "passthrough",
|
|
458
|
+
allowUnrecognizedUnionMembers: true,
|
|
459
|
+
allowUnrecognizedEnumValues: true,
|
|
460
|
+
skipValidation: true,
|
|
461
|
+
breadcrumbsPrefix: ["response"],
|
|
462
|
+
}), _response.rawResponse);
|
|
463
|
+
case 404:
|
|
464
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
465
|
+
unrecognizedObjectKeys: "passthrough",
|
|
466
|
+
allowUnrecognizedUnionMembers: true,
|
|
467
|
+
allowUnrecognizedEnumValues: true,
|
|
468
|
+
skipValidation: true,
|
|
469
|
+
breadcrumbsPrefix: ["response"],
|
|
470
|
+
}), _response.rawResponse);
|
|
471
|
+
case 500:
|
|
472
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
473
|
+
unrecognizedObjectKeys: "passthrough",
|
|
474
|
+
allowUnrecognizedUnionMembers: true,
|
|
475
|
+
allowUnrecognizedEnumValues: true,
|
|
476
|
+
skipValidation: true,
|
|
477
|
+
breadcrumbsPrefix: ["response"],
|
|
478
|
+
}), _response.rawResponse);
|
|
479
|
+
default:
|
|
480
|
+
throw new errors.SchematicError({
|
|
481
|
+
statusCode: _response.error.statusCode,
|
|
482
|
+
body: _response.error.body,
|
|
483
|
+
rawResponse: _response.rawResponse,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
switch (_response.error.reason) {
|
|
488
|
+
case "non-json":
|
|
489
|
+
throw new errors.SchematicError({
|
|
490
|
+
statusCode: _response.error.statusCode,
|
|
491
|
+
body: _response.error.rawBody,
|
|
492
|
+
rawResponse: _response.rawResponse,
|
|
493
|
+
});
|
|
494
|
+
case "timeout":
|
|
495
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-audiences/{plan_audience_id}.");
|
|
496
|
+
case "unknown":
|
|
497
|
+
throw new errors.SchematicError({
|
|
498
|
+
message: _response.error.errorMessage,
|
|
499
|
+
rawResponse: _response.rawResponse,
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* @param {Schematic.ListPlanTraitsRequest} request
|
|
506
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
507
|
+
*
|
|
508
|
+
* @throws {@link Schematic.BadRequestError}
|
|
509
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
510
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
511
|
+
* @throws {@link Schematic.NotFoundError}
|
|
512
|
+
* @throws {@link Schematic.InternalServerError}
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* await client.plans.listPlanTraits()
|
|
516
|
+
*/
|
|
517
|
+
listPlanTraits(request = {}, requestOptions) {
|
|
518
|
+
return core.HttpResponsePromise.fromPromise(this.__listPlanTraits(request, requestOptions));
|
|
519
|
+
}
|
|
520
|
+
__listPlanTraits() {
|
|
521
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
522
|
+
var _a, _b, _c;
|
|
523
|
+
const { ids, planId, traitId, limit, offset } = request;
|
|
524
|
+
const _queryParams = {};
|
|
525
|
+
if (ids != null) {
|
|
526
|
+
if (Array.isArray(ids)) {
|
|
527
|
+
_queryParams["ids"] = ids.map((item) => item);
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
_queryParams["ids"] = ids;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (planId != null) {
|
|
534
|
+
_queryParams["plan_id"] = planId;
|
|
535
|
+
}
|
|
536
|
+
if (traitId != null) {
|
|
537
|
+
_queryParams["trait_id"] = traitId;
|
|
538
|
+
}
|
|
539
|
+
if (limit != null) {
|
|
540
|
+
_queryParams["limit"] = limit.toString();
|
|
541
|
+
}
|
|
542
|
+
if (offset != null) {
|
|
543
|
+
_queryParams["offset"] = offset.toString();
|
|
544
|
+
}
|
|
545
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
546
|
+
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, "plan-traits"),
|
|
547
|
+
method: "GET",
|
|
548
|
+
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),
|
|
549
|
+
contentType: "application/json",
|
|
550
|
+
queryParameters: _queryParams,
|
|
551
|
+
requestType: "json",
|
|
552
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
553
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
554
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
555
|
+
});
|
|
556
|
+
if (_response.ok) {
|
|
557
|
+
return {
|
|
558
|
+
data: serializers.ListPlanTraitsResponse.parseOrThrow(_response.body, {
|
|
559
|
+
unrecognizedObjectKeys: "passthrough",
|
|
560
|
+
allowUnrecognizedUnionMembers: true,
|
|
561
|
+
allowUnrecognizedEnumValues: true,
|
|
562
|
+
skipValidation: true,
|
|
563
|
+
breadcrumbsPrefix: ["response"],
|
|
564
|
+
}),
|
|
565
|
+
rawResponse: _response.rawResponse,
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
if (_response.error.reason === "status-code") {
|
|
569
|
+
switch (_response.error.statusCode) {
|
|
570
|
+
case 400:
|
|
571
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
572
|
+
unrecognizedObjectKeys: "passthrough",
|
|
573
|
+
allowUnrecognizedUnionMembers: true,
|
|
574
|
+
allowUnrecognizedEnumValues: true,
|
|
575
|
+
skipValidation: true,
|
|
576
|
+
breadcrumbsPrefix: ["response"],
|
|
577
|
+
}), _response.rawResponse);
|
|
578
|
+
case 401:
|
|
579
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
580
|
+
unrecognizedObjectKeys: "passthrough",
|
|
581
|
+
allowUnrecognizedUnionMembers: true,
|
|
582
|
+
allowUnrecognizedEnumValues: true,
|
|
583
|
+
skipValidation: true,
|
|
584
|
+
breadcrumbsPrefix: ["response"],
|
|
585
|
+
}), _response.rawResponse);
|
|
586
|
+
case 403:
|
|
587
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
588
|
+
unrecognizedObjectKeys: "passthrough",
|
|
589
|
+
allowUnrecognizedUnionMembers: true,
|
|
590
|
+
allowUnrecognizedEnumValues: true,
|
|
591
|
+
skipValidation: true,
|
|
592
|
+
breadcrumbsPrefix: ["response"],
|
|
593
|
+
}), _response.rawResponse);
|
|
594
|
+
case 404:
|
|
595
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
596
|
+
unrecognizedObjectKeys: "passthrough",
|
|
597
|
+
allowUnrecognizedUnionMembers: true,
|
|
598
|
+
allowUnrecognizedEnumValues: true,
|
|
599
|
+
skipValidation: true,
|
|
600
|
+
breadcrumbsPrefix: ["response"],
|
|
601
|
+
}), _response.rawResponse);
|
|
602
|
+
case 500:
|
|
603
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
604
|
+
unrecognizedObjectKeys: "passthrough",
|
|
605
|
+
allowUnrecognizedUnionMembers: true,
|
|
606
|
+
allowUnrecognizedEnumValues: true,
|
|
607
|
+
skipValidation: true,
|
|
608
|
+
breadcrumbsPrefix: ["response"],
|
|
609
|
+
}), _response.rawResponse);
|
|
610
|
+
default:
|
|
611
|
+
throw new errors.SchematicError({
|
|
612
|
+
statusCode: _response.error.statusCode,
|
|
613
|
+
body: _response.error.body,
|
|
614
|
+
rawResponse: _response.rawResponse,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
switch (_response.error.reason) {
|
|
619
|
+
case "non-json":
|
|
620
|
+
throw new errors.SchematicError({
|
|
621
|
+
statusCode: _response.error.statusCode,
|
|
622
|
+
body: _response.error.rawBody,
|
|
623
|
+
rawResponse: _response.rawResponse,
|
|
624
|
+
});
|
|
625
|
+
case "timeout":
|
|
626
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits.");
|
|
627
|
+
case "unknown":
|
|
628
|
+
throw new errors.SchematicError({
|
|
629
|
+
message: _response.error.errorMessage,
|
|
630
|
+
rawResponse: _response.rawResponse,
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* @param {Schematic.CreatePlanTraitRequestBody} request
|
|
55
637
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
638
|
*
|
|
57
639
|
* @throws {@link Schematic.BadRequestError}
|
|
@@ -61,32 +643,40 @@ class Plans {
|
|
|
61
643
|
* @throws {@link Schematic.InternalServerError}
|
|
62
644
|
*
|
|
63
645
|
* @example
|
|
64
|
-
* await client.plans.
|
|
65
|
-
*
|
|
646
|
+
* await client.plans.createPlanTrait({
|
|
647
|
+
* planId: "plan_id",
|
|
648
|
+
* traitId: "trait_id",
|
|
649
|
+
* traitValue: "trait_value"
|
|
66
650
|
* })
|
|
67
651
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
652
|
+
createPlanTrait(request, requestOptions) {
|
|
653
|
+
return core.HttpResponsePromise.fromPromise(this.__createPlanTrait(request, requestOptions));
|
|
654
|
+
}
|
|
655
|
+
__createPlanTrait(request, requestOptions) {
|
|
70
656
|
return __awaiter(this, void 0, void 0, function* () {
|
|
657
|
+
var _a, _b, _c;
|
|
71
658
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
72
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
73
|
-
method: "
|
|
74
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
659
|
+
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, "plan-traits"),
|
|
660
|
+
method: "POST",
|
|
661
|
+
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),
|
|
75
662
|
contentType: "application/json",
|
|
76
663
|
requestType: "json",
|
|
77
|
-
body: serializers.
|
|
664
|
+
body: serializers.CreatePlanTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
78
665
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
79
666
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
80
667
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
81
668
|
});
|
|
82
669
|
if (_response.ok) {
|
|
83
|
-
return
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
670
|
+
return {
|
|
671
|
+
data: serializers.CreatePlanTraitResponse.parseOrThrow(_response.body, {
|
|
672
|
+
unrecognizedObjectKeys: "passthrough",
|
|
673
|
+
allowUnrecognizedUnionMembers: true,
|
|
674
|
+
allowUnrecognizedEnumValues: true,
|
|
675
|
+
skipValidation: true,
|
|
676
|
+
breadcrumbsPrefix: ["response"],
|
|
677
|
+
}),
|
|
678
|
+
rawResponse: _response.rawResponse,
|
|
679
|
+
};
|
|
90
680
|
}
|
|
91
681
|
if (_response.error.reason === "status-code") {
|
|
92
682
|
switch (_response.error.statusCode) {
|
|
@@ -97,7 +687,7 @@ class Plans {
|
|
|
97
687
|
allowUnrecognizedEnumValues: true,
|
|
98
688
|
skipValidation: true,
|
|
99
689
|
breadcrumbsPrefix: ["response"],
|
|
100
|
-
}));
|
|
690
|
+
}), _response.rawResponse);
|
|
101
691
|
case 401:
|
|
102
692
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
103
693
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -105,7 +695,7 @@ class Plans {
|
|
|
105
695
|
allowUnrecognizedEnumValues: true,
|
|
106
696
|
skipValidation: true,
|
|
107
697
|
breadcrumbsPrefix: ["response"],
|
|
108
|
-
}));
|
|
698
|
+
}), _response.rawResponse);
|
|
109
699
|
case 403:
|
|
110
700
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
111
701
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -113,7 +703,7 @@ class Plans {
|
|
|
113
703
|
allowUnrecognizedEnumValues: true,
|
|
114
704
|
skipValidation: true,
|
|
115
705
|
breadcrumbsPrefix: ["response"],
|
|
116
|
-
}));
|
|
706
|
+
}), _response.rawResponse);
|
|
117
707
|
case 404:
|
|
118
708
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
119
709
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -121,7 +711,7 @@ class Plans {
|
|
|
121
711
|
allowUnrecognizedEnumValues: true,
|
|
122
712
|
skipValidation: true,
|
|
123
713
|
breadcrumbsPrefix: ["response"],
|
|
124
|
-
}));
|
|
714
|
+
}), _response.rawResponse);
|
|
125
715
|
case 500:
|
|
126
716
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
127
717
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -129,11 +719,12 @@ class Plans {
|
|
|
129
719
|
allowUnrecognizedEnumValues: true,
|
|
130
720
|
skipValidation: true,
|
|
131
721
|
breadcrumbsPrefix: ["response"],
|
|
132
|
-
}));
|
|
722
|
+
}), _response.rawResponse);
|
|
133
723
|
default:
|
|
134
724
|
throw new errors.SchematicError({
|
|
135
725
|
statusCode: _response.error.statusCode,
|
|
136
726
|
body: _response.error.body,
|
|
727
|
+
rawResponse: _response.rawResponse,
|
|
137
728
|
});
|
|
138
729
|
}
|
|
139
730
|
}
|
|
@@ -142,18 +733,20 @@ class Plans {
|
|
|
142
733
|
throw new errors.SchematicError({
|
|
143
734
|
statusCode: _response.error.statusCode,
|
|
144
735
|
body: _response.error.rawBody,
|
|
736
|
+
rawResponse: _response.rawResponse,
|
|
145
737
|
});
|
|
146
738
|
case "timeout":
|
|
147
|
-
throw new errors.SchematicTimeoutError();
|
|
739
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plan-traits.");
|
|
148
740
|
case "unknown":
|
|
149
741
|
throw new errors.SchematicError({
|
|
150
742
|
message: _response.error.errorMessage,
|
|
743
|
+
rawResponse: _response.rawResponse,
|
|
151
744
|
});
|
|
152
745
|
}
|
|
153
746
|
});
|
|
154
747
|
}
|
|
155
748
|
/**
|
|
156
|
-
* @param {string}
|
|
749
|
+
* @param {string} planTraitId - plan_trait_id
|
|
157
750
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
158
751
|
*
|
|
159
752
|
* @throws {@link Schematic.UnauthorizedError}
|
|
@@ -162,15 +755,18 @@ class Plans {
|
|
|
162
755
|
* @throws {@link Schematic.InternalServerError}
|
|
163
756
|
*
|
|
164
757
|
* @example
|
|
165
|
-
* await client.plans.
|
|
758
|
+
* await client.plans.getPlanTrait("plan_trait_id")
|
|
166
759
|
*/
|
|
167
|
-
|
|
168
|
-
|
|
760
|
+
getPlanTrait(planTraitId, requestOptions) {
|
|
761
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlanTrait(planTraitId, requestOptions));
|
|
762
|
+
}
|
|
763
|
+
__getPlanTrait(planTraitId, requestOptions) {
|
|
169
764
|
return __awaiter(this, void 0, void 0, function* () {
|
|
765
|
+
var _a, _b, _c;
|
|
170
766
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
171
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
767
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
172
768
|
method: "GET",
|
|
173
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
769
|
+
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),
|
|
174
770
|
contentType: "application/json",
|
|
175
771
|
requestType: "json",
|
|
176
772
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -178,13 +774,16 @@ class Plans {
|
|
|
178
774
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
179
775
|
});
|
|
180
776
|
if (_response.ok) {
|
|
181
|
-
return
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
777
|
+
return {
|
|
778
|
+
data: serializers.GetPlanTraitResponse.parseOrThrow(_response.body, {
|
|
779
|
+
unrecognizedObjectKeys: "passthrough",
|
|
780
|
+
allowUnrecognizedUnionMembers: true,
|
|
781
|
+
allowUnrecognizedEnumValues: true,
|
|
782
|
+
skipValidation: true,
|
|
783
|
+
breadcrumbsPrefix: ["response"],
|
|
784
|
+
}),
|
|
785
|
+
rawResponse: _response.rawResponse,
|
|
786
|
+
};
|
|
188
787
|
}
|
|
189
788
|
if (_response.error.reason === "status-code") {
|
|
190
789
|
switch (_response.error.statusCode) {
|
|
@@ -195,7 +794,7 @@ class Plans {
|
|
|
195
794
|
allowUnrecognizedEnumValues: true,
|
|
196
795
|
skipValidation: true,
|
|
197
796
|
breadcrumbsPrefix: ["response"],
|
|
198
|
-
}));
|
|
797
|
+
}), _response.rawResponse);
|
|
199
798
|
case 403:
|
|
200
799
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
201
800
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -203,7 +802,7 @@ class Plans {
|
|
|
203
802
|
allowUnrecognizedEnumValues: true,
|
|
204
803
|
skipValidation: true,
|
|
205
804
|
breadcrumbsPrefix: ["response"],
|
|
206
|
-
}));
|
|
805
|
+
}), _response.rawResponse);
|
|
207
806
|
case 404:
|
|
208
807
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
209
808
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -211,7 +810,7 @@ class Plans {
|
|
|
211
810
|
allowUnrecognizedEnumValues: true,
|
|
212
811
|
skipValidation: true,
|
|
213
812
|
breadcrumbsPrefix: ["response"],
|
|
214
|
-
}));
|
|
813
|
+
}), _response.rawResponse);
|
|
215
814
|
case 500:
|
|
216
815
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
217
816
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -219,11 +818,12 @@ class Plans {
|
|
|
219
818
|
allowUnrecognizedEnumValues: true,
|
|
220
819
|
skipValidation: true,
|
|
221
820
|
breadcrumbsPrefix: ["response"],
|
|
222
|
-
}));
|
|
821
|
+
}), _response.rawResponse);
|
|
223
822
|
default:
|
|
224
823
|
throw new errors.SchematicError({
|
|
225
824
|
statusCode: _response.error.statusCode,
|
|
226
825
|
body: _response.error.body,
|
|
826
|
+
rawResponse: _response.rawResponse,
|
|
227
827
|
});
|
|
228
828
|
}
|
|
229
829
|
}
|
|
@@ -232,19 +832,21 @@ class Plans {
|
|
|
232
832
|
throw new errors.SchematicError({
|
|
233
833
|
statusCode: _response.error.statusCode,
|
|
234
834
|
body: _response.error.rawBody,
|
|
835
|
+
rawResponse: _response.rawResponse,
|
|
235
836
|
});
|
|
236
837
|
case "timeout":
|
|
237
|
-
throw new errors.SchematicTimeoutError();
|
|
838
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits/{plan_trait_id}.");
|
|
238
839
|
case "unknown":
|
|
239
840
|
throw new errors.SchematicError({
|
|
240
841
|
message: _response.error.errorMessage,
|
|
842
|
+
rawResponse: _response.rawResponse,
|
|
241
843
|
});
|
|
242
844
|
}
|
|
243
845
|
});
|
|
244
846
|
}
|
|
245
847
|
/**
|
|
246
|
-
* @param {string}
|
|
247
|
-
* @param {Schematic.
|
|
848
|
+
* @param {string} planTraitId - plan_trait_id
|
|
849
|
+
* @param {Schematic.UpdatePlanTraitRequestBody} request
|
|
248
850
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
851
|
*
|
|
250
852
|
* @throws {@link Schematic.BadRequestError}
|
|
@@ -254,43 +856,39 @@ class Plans {
|
|
|
254
856
|
* @throws {@link Schematic.InternalServerError}
|
|
255
857
|
*
|
|
256
858
|
* @example
|
|
257
|
-
* await client.plans.
|
|
258
|
-
*
|
|
259
|
-
*
|
|
260
|
-
* conditionType: "company",
|
|
261
|
-
* operator: "eq",
|
|
262
|
-
* resourceIds: ["resource_ids"]
|
|
263
|
-
* }]
|
|
264
|
-
* }],
|
|
265
|
-
* conditions: [{
|
|
266
|
-
* conditionType: "company",
|
|
267
|
-
* operator: "eq",
|
|
268
|
-
* resourceIds: ["resource_ids"]
|
|
269
|
-
* }]
|
|
859
|
+
* await client.plans.updatePlanTrait("plan_trait_id", {
|
|
860
|
+
* planId: "plan_id",
|
|
861
|
+
* traitValue: "trait_value"
|
|
270
862
|
* })
|
|
271
863
|
*/
|
|
272
|
-
|
|
273
|
-
|
|
864
|
+
updatePlanTrait(planTraitId, request, requestOptions) {
|
|
865
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePlanTrait(planTraitId, request, requestOptions));
|
|
866
|
+
}
|
|
867
|
+
__updatePlanTrait(planTraitId, request, requestOptions) {
|
|
274
868
|
return __awaiter(this, void 0, void 0, function* () {
|
|
869
|
+
var _a, _b, _c;
|
|
275
870
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
276
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
871
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
277
872
|
method: "PUT",
|
|
278
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
873
|
+
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),
|
|
279
874
|
contentType: "application/json",
|
|
280
875
|
requestType: "json",
|
|
281
|
-
body: serializers.
|
|
876
|
+
body: serializers.UpdatePlanTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
282
877
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
283
878
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
284
879
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
285
880
|
});
|
|
286
881
|
if (_response.ok) {
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
882
|
+
return {
|
|
883
|
+
data: serializers.UpdatePlanTraitResponse.parseOrThrow(_response.body, {
|
|
884
|
+
unrecognizedObjectKeys: "passthrough",
|
|
885
|
+
allowUnrecognizedUnionMembers: true,
|
|
886
|
+
allowUnrecognizedEnumValues: true,
|
|
887
|
+
skipValidation: true,
|
|
888
|
+
breadcrumbsPrefix: ["response"],
|
|
889
|
+
}),
|
|
890
|
+
rawResponse: _response.rawResponse,
|
|
891
|
+
};
|
|
294
892
|
}
|
|
295
893
|
if (_response.error.reason === "status-code") {
|
|
296
894
|
switch (_response.error.statusCode) {
|
|
@@ -301,7 +899,7 @@ class Plans {
|
|
|
301
899
|
allowUnrecognizedEnumValues: true,
|
|
302
900
|
skipValidation: true,
|
|
303
901
|
breadcrumbsPrefix: ["response"],
|
|
304
|
-
}));
|
|
902
|
+
}), _response.rawResponse);
|
|
305
903
|
case 401:
|
|
306
904
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
307
905
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -309,7 +907,7 @@ class Plans {
|
|
|
309
907
|
allowUnrecognizedEnumValues: true,
|
|
310
908
|
skipValidation: true,
|
|
311
909
|
breadcrumbsPrefix: ["response"],
|
|
312
|
-
}));
|
|
910
|
+
}), _response.rawResponse);
|
|
313
911
|
case 403:
|
|
314
912
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
315
913
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -317,7 +915,7 @@ class Plans {
|
|
|
317
915
|
allowUnrecognizedEnumValues: true,
|
|
318
916
|
skipValidation: true,
|
|
319
917
|
breadcrumbsPrefix: ["response"],
|
|
320
|
-
}));
|
|
918
|
+
}), _response.rawResponse);
|
|
321
919
|
case 404:
|
|
322
920
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
323
921
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -325,7 +923,7 @@ class Plans {
|
|
|
325
923
|
allowUnrecognizedEnumValues: true,
|
|
326
924
|
skipValidation: true,
|
|
327
925
|
breadcrumbsPrefix: ["response"],
|
|
328
|
-
}));
|
|
926
|
+
}), _response.rawResponse);
|
|
329
927
|
case 500:
|
|
330
928
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
331
929
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -333,11 +931,12 @@ class Plans {
|
|
|
333
931
|
allowUnrecognizedEnumValues: true,
|
|
334
932
|
skipValidation: true,
|
|
335
933
|
breadcrumbsPrefix: ["response"],
|
|
336
|
-
}));
|
|
934
|
+
}), _response.rawResponse);
|
|
337
935
|
default:
|
|
338
936
|
throw new errors.SchematicError({
|
|
339
937
|
statusCode: _response.error.statusCode,
|
|
340
938
|
body: _response.error.body,
|
|
939
|
+
rawResponse: _response.rawResponse,
|
|
341
940
|
});
|
|
342
941
|
}
|
|
343
942
|
}
|
|
@@ -346,35 +945,41 @@ class Plans {
|
|
|
346
945
|
throw new errors.SchematicError({
|
|
347
946
|
statusCode: _response.error.statusCode,
|
|
348
947
|
body: _response.error.rawBody,
|
|
948
|
+
rawResponse: _response.rawResponse,
|
|
349
949
|
});
|
|
350
950
|
case "timeout":
|
|
351
|
-
throw new errors.SchematicTimeoutError();
|
|
951
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-traits/{plan_trait_id}.");
|
|
352
952
|
case "unknown":
|
|
353
953
|
throw new errors.SchematicError({
|
|
354
954
|
message: _response.error.errorMessage,
|
|
955
|
+
rawResponse: _response.rawResponse,
|
|
355
956
|
});
|
|
356
957
|
}
|
|
357
958
|
});
|
|
358
959
|
}
|
|
359
960
|
/**
|
|
360
|
-
* @param {string}
|
|
961
|
+
* @param {string} planTraitId - plan_trait_id
|
|
361
962
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
362
963
|
*
|
|
363
964
|
* @throws {@link Schematic.BadRequestError}
|
|
364
965
|
* @throws {@link Schematic.UnauthorizedError}
|
|
365
966
|
* @throws {@link Schematic.ForbiddenError}
|
|
967
|
+
* @throws {@link Schematic.NotFoundError}
|
|
366
968
|
* @throws {@link Schematic.InternalServerError}
|
|
367
969
|
*
|
|
368
970
|
* @example
|
|
369
|
-
* await client.plans.
|
|
971
|
+
* await client.plans.deletePlanTrait("plan_trait_id")
|
|
370
972
|
*/
|
|
371
|
-
|
|
372
|
-
|
|
973
|
+
deletePlanTrait(planTraitId, requestOptions) {
|
|
974
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePlanTrait(planTraitId, requestOptions));
|
|
975
|
+
}
|
|
976
|
+
__deletePlanTrait(planTraitId, requestOptions) {
|
|
373
977
|
return __awaiter(this, void 0, void 0, function* () {
|
|
978
|
+
var _a, _b, _c;
|
|
374
979
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
375
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
980
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
376
981
|
method: "DELETE",
|
|
377
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
982
|
+
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),
|
|
378
983
|
contentType: "application/json",
|
|
379
984
|
requestType: "json",
|
|
380
985
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -382,13 +987,147 @@ class Plans {
|
|
|
382
987
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
383
988
|
});
|
|
384
989
|
if (_response.ok) {
|
|
385
|
-
return
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
990
|
+
return {
|
|
991
|
+
data: serializers.DeletePlanTraitResponse.parseOrThrow(_response.body, {
|
|
992
|
+
unrecognizedObjectKeys: "passthrough",
|
|
993
|
+
allowUnrecognizedUnionMembers: true,
|
|
994
|
+
allowUnrecognizedEnumValues: true,
|
|
995
|
+
skipValidation: true,
|
|
996
|
+
breadcrumbsPrefix: ["response"],
|
|
997
|
+
}),
|
|
998
|
+
rawResponse: _response.rawResponse,
|
|
999
|
+
};
|
|
1000
|
+
}
|
|
1001
|
+
if (_response.error.reason === "status-code") {
|
|
1002
|
+
switch (_response.error.statusCode) {
|
|
1003
|
+
case 400:
|
|
1004
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1005
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1006
|
+
allowUnrecognizedUnionMembers: true,
|
|
1007
|
+
allowUnrecognizedEnumValues: true,
|
|
1008
|
+
skipValidation: true,
|
|
1009
|
+
breadcrumbsPrefix: ["response"],
|
|
1010
|
+
}), _response.rawResponse);
|
|
1011
|
+
case 401:
|
|
1012
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1013
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1014
|
+
allowUnrecognizedUnionMembers: true,
|
|
1015
|
+
allowUnrecognizedEnumValues: true,
|
|
1016
|
+
skipValidation: true,
|
|
1017
|
+
breadcrumbsPrefix: ["response"],
|
|
1018
|
+
}), _response.rawResponse);
|
|
1019
|
+
case 403:
|
|
1020
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1021
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1022
|
+
allowUnrecognizedUnionMembers: true,
|
|
1023
|
+
allowUnrecognizedEnumValues: true,
|
|
1024
|
+
skipValidation: true,
|
|
1025
|
+
breadcrumbsPrefix: ["response"],
|
|
1026
|
+
}), _response.rawResponse);
|
|
1027
|
+
case 404:
|
|
1028
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1029
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1030
|
+
allowUnrecognizedUnionMembers: true,
|
|
1031
|
+
allowUnrecognizedEnumValues: true,
|
|
1032
|
+
skipValidation: true,
|
|
1033
|
+
breadcrumbsPrefix: ["response"],
|
|
1034
|
+
}), _response.rawResponse);
|
|
1035
|
+
case 500:
|
|
1036
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1037
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1038
|
+
allowUnrecognizedUnionMembers: true,
|
|
1039
|
+
allowUnrecognizedEnumValues: true,
|
|
1040
|
+
skipValidation: true,
|
|
1041
|
+
breadcrumbsPrefix: ["response"],
|
|
1042
|
+
}), _response.rawResponse);
|
|
1043
|
+
default:
|
|
1044
|
+
throw new errors.SchematicError({
|
|
1045
|
+
statusCode: _response.error.statusCode,
|
|
1046
|
+
body: _response.error.body,
|
|
1047
|
+
rawResponse: _response.rawResponse,
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
switch (_response.error.reason) {
|
|
1052
|
+
case "non-json":
|
|
1053
|
+
throw new errors.SchematicError({
|
|
1054
|
+
statusCode: _response.error.statusCode,
|
|
1055
|
+
body: _response.error.rawBody,
|
|
1056
|
+
rawResponse: _response.rawResponse,
|
|
1057
|
+
});
|
|
1058
|
+
case "timeout":
|
|
1059
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-traits/{plan_trait_id}.");
|
|
1060
|
+
case "unknown":
|
|
1061
|
+
throw new errors.SchematicError({
|
|
1062
|
+
message: _response.error.errorMessage,
|
|
1063
|
+
rawResponse: _response.rawResponse,
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* @param {Schematic.CountPlanTraitsRequest} request
|
|
1070
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
1071
|
+
*
|
|
1072
|
+
* @throws {@link Schematic.BadRequestError}
|
|
1073
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
1074
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
1075
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1076
|
+
* @throws {@link Schematic.InternalServerError}
|
|
1077
|
+
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* await client.plans.countPlanTraits()
|
|
1080
|
+
*/
|
|
1081
|
+
countPlanTraits(request = {}, requestOptions) {
|
|
1082
|
+
return core.HttpResponsePromise.fromPromise(this.__countPlanTraits(request, requestOptions));
|
|
1083
|
+
}
|
|
1084
|
+
__countPlanTraits() {
|
|
1085
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1086
|
+
var _a, _b, _c;
|
|
1087
|
+
const { ids, planId, traitId, limit, offset } = request;
|
|
1088
|
+
const _queryParams = {};
|
|
1089
|
+
if (ids != null) {
|
|
1090
|
+
if (Array.isArray(ids)) {
|
|
1091
|
+
_queryParams["ids"] = ids.map((item) => item);
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
_queryParams["ids"] = ids;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
if (planId != null) {
|
|
1098
|
+
_queryParams["plan_id"] = planId;
|
|
1099
|
+
}
|
|
1100
|
+
if (traitId != null) {
|
|
1101
|
+
_queryParams["trait_id"] = traitId;
|
|
1102
|
+
}
|
|
1103
|
+
if (limit != null) {
|
|
1104
|
+
_queryParams["limit"] = limit.toString();
|
|
1105
|
+
}
|
|
1106
|
+
if (offset != null) {
|
|
1107
|
+
_queryParams["offset"] = offset.toString();
|
|
1108
|
+
}
|
|
1109
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1110
|
+
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, "plan-traits/count"),
|
|
1111
|
+
method: "GET",
|
|
1112
|
+
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),
|
|
1113
|
+
contentType: "application/json",
|
|
1114
|
+
queryParameters: _queryParams,
|
|
1115
|
+
requestType: "json",
|
|
1116
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1117
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1118
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1119
|
+
});
|
|
1120
|
+
if (_response.ok) {
|
|
1121
|
+
return {
|
|
1122
|
+
data: serializers.CountPlanTraitsResponse.parseOrThrow(_response.body, {
|
|
1123
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1124
|
+
allowUnrecognizedUnionMembers: true,
|
|
1125
|
+
allowUnrecognizedEnumValues: true,
|
|
1126
|
+
skipValidation: true,
|
|
1127
|
+
breadcrumbsPrefix: ["response"],
|
|
1128
|
+
}),
|
|
1129
|
+
rawResponse: _response.rawResponse,
|
|
1130
|
+
};
|
|
392
1131
|
}
|
|
393
1132
|
if (_response.error.reason === "status-code") {
|
|
394
1133
|
switch (_response.error.statusCode) {
|
|
@@ -399,7 +1138,7 @@ class Plans {
|
|
|
399
1138
|
allowUnrecognizedEnumValues: true,
|
|
400
1139
|
skipValidation: true,
|
|
401
1140
|
breadcrumbsPrefix: ["response"],
|
|
402
|
-
}));
|
|
1141
|
+
}), _response.rawResponse);
|
|
403
1142
|
case 401:
|
|
404
1143
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
405
1144
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -407,7 +1146,7 @@ class Plans {
|
|
|
407
1146
|
allowUnrecognizedEnumValues: true,
|
|
408
1147
|
skipValidation: true,
|
|
409
1148
|
breadcrumbsPrefix: ["response"],
|
|
410
|
-
}));
|
|
1149
|
+
}), _response.rawResponse);
|
|
411
1150
|
case 403:
|
|
412
1151
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
413
1152
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -415,7 +1154,15 @@ class Plans {
|
|
|
415
1154
|
allowUnrecognizedEnumValues: true,
|
|
416
1155
|
skipValidation: true,
|
|
417
1156
|
breadcrumbsPrefix: ["response"],
|
|
418
|
-
}));
|
|
1157
|
+
}), _response.rawResponse);
|
|
1158
|
+
case 404:
|
|
1159
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1160
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1161
|
+
allowUnrecognizedUnionMembers: true,
|
|
1162
|
+
allowUnrecognizedEnumValues: true,
|
|
1163
|
+
skipValidation: true,
|
|
1164
|
+
breadcrumbsPrefix: ["response"],
|
|
1165
|
+
}), _response.rawResponse);
|
|
419
1166
|
case 500:
|
|
420
1167
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
421
1168
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -423,11 +1170,12 @@ class Plans {
|
|
|
423
1170
|
allowUnrecognizedEnumValues: true,
|
|
424
1171
|
skipValidation: true,
|
|
425
1172
|
breadcrumbsPrefix: ["response"],
|
|
426
|
-
}));
|
|
1173
|
+
}), _response.rawResponse);
|
|
427
1174
|
default:
|
|
428
1175
|
throw new errors.SchematicError({
|
|
429
1176
|
statusCode: _response.error.statusCode,
|
|
430
1177
|
body: _response.error.body,
|
|
1178
|
+
rawResponse: _response.rawResponse,
|
|
431
1179
|
});
|
|
432
1180
|
}
|
|
433
1181
|
}
|
|
@@ -436,12 +1184,14 @@ class Plans {
|
|
|
436
1184
|
throw new errors.SchematicError({
|
|
437
1185
|
statusCode: _response.error.statusCode,
|
|
438
1186
|
body: _response.error.rawBody,
|
|
1187
|
+
rawResponse: _response.rawResponse,
|
|
439
1188
|
});
|
|
440
1189
|
case "timeout":
|
|
441
|
-
throw new errors.SchematicTimeoutError();
|
|
1190
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits/count.");
|
|
442
1191
|
case "unknown":
|
|
443
1192
|
throw new errors.SchematicError({
|
|
444
1193
|
message: _response.error.errorMessage,
|
|
1194
|
+
rawResponse: _response.rawResponse,
|
|
445
1195
|
});
|
|
446
1196
|
}
|
|
447
1197
|
});
|
|
@@ -453,14 +1203,18 @@ class Plans {
|
|
|
453
1203
|
* @throws {@link Schematic.BadRequestError}
|
|
454
1204
|
* @throws {@link Schematic.UnauthorizedError}
|
|
455
1205
|
* @throws {@link Schematic.ForbiddenError}
|
|
1206
|
+
* @throws {@link Schematic.NotFoundError}
|
|
456
1207
|
* @throws {@link Schematic.InternalServerError}
|
|
457
1208
|
*
|
|
458
1209
|
* @example
|
|
459
1210
|
* await client.plans.listPlans()
|
|
460
1211
|
*/
|
|
461
1212
|
listPlans(request = {}, requestOptions) {
|
|
462
|
-
|
|
463
|
-
|
|
1213
|
+
return core.HttpResponsePromise.fromPromise(this.__listPlans(request, requestOptions));
|
|
1214
|
+
}
|
|
1215
|
+
__listPlans() {
|
|
1216
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1217
|
+
var _a, _b, _c;
|
|
464
1218
|
const { companyId, hasProductId, ids, planType, q, withoutEntitlementFor, withoutProductId, withoutPaidProductId, limit, offset, } = request;
|
|
465
1219
|
const _queryParams = {};
|
|
466
1220
|
if (companyId != null) {
|
|
@@ -478,7 +1232,9 @@ class Plans {
|
|
|
478
1232
|
}
|
|
479
1233
|
}
|
|
480
1234
|
if (planType != null) {
|
|
481
|
-
_queryParams["plan_type"] = planType
|
|
1235
|
+
_queryParams["plan_type"] = serializers.ListPlansRequestPlanType.jsonOrThrow(planType, {
|
|
1236
|
+
unrecognizedObjectKeys: "strip",
|
|
1237
|
+
});
|
|
482
1238
|
}
|
|
483
1239
|
if (q != null) {
|
|
484
1240
|
_queryParams["q"] = q;
|
|
@@ -499,9 +1255,9 @@ class Plans {
|
|
|
499
1255
|
_queryParams["offset"] = offset.toString();
|
|
500
1256
|
}
|
|
501
1257
|
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.
|
|
1258
|
+
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, "plans"),
|
|
503
1259
|
method: "GET",
|
|
504
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1260
|
+
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
1261
|
contentType: "application/json",
|
|
506
1262
|
queryParameters: _queryParams,
|
|
507
1263
|
requestType: "json",
|
|
@@ -510,13 +1266,16 @@ class Plans {
|
|
|
510
1266
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
511
1267
|
});
|
|
512
1268
|
if (_response.ok) {
|
|
513
|
-
return
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
1269
|
+
return {
|
|
1270
|
+
data: serializers.ListPlansResponse.parseOrThrow(_response.body, {
|
|
1271
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1272
|
+
allowUnrecognizedUnionMembers: true,
|
|
1273
|
+
allowUnrecognizedEnumValues: true,
|
|
1274
|
+
skipValidation: true,
|
|
1275
|
+
breadcrumbsPrefix: ["response"],
|
|
1276
|
+
}),
|
|
1277
|
+
rawResponse: _response.rawResponse,
|
|
1278
|
+
};
|
|
520
1279
|
}
|
|
521
1280
|
if (_response.error.reason === "status-code") {
|
|
522
1281
|
switch (_response.error.statusCode) {
|
|
@@ -527,7 +1286,7 @@ class Plans {
|
|
|
527
1286
|
allowUnrecognizedEnumValues: true,
|
|
528
1287
|
skipValidation: true,
|
|
529
1288
|
breadcrumbsPrefix: ["response"],
|
|
530
|
-
}));
|
|
1289
|
+
}), _response.rawResponse);
|
|
531
1290
|
case 401:
|
|
532
1291
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
533
1292
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -535,7 +1294,7 @@ class Plans {
|
|
|
535
1294
|
allowUnrecognizedEnumValues: true,
|
|
536
1295
|
skipValidation: true,
|
|
537
1296
|
breadcrumbsPrefix: ["response"],
|
|
538
|
-
}));
|
|
1297
|
+
}), _response.rawResponse);
|
|
539
1298
|
case 403:
|
|
540
1299
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
541
1300
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -543,7 +1302,15 @@ class Plans {
|
|
|
543
1302
|
allowUnrecognizedEnumValues: true,
|
|
544
1303
|
skipValidation: true,
|
|
545
1304
|
breadcrumbsPrefix: ["response"],
|
|
546
|
-
}));
|
|
1305
|
+
}), _response.rawResponse);
|
|
1306
|
+
case 404:
|
|
1307
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1308
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1309
|
+
allowUnrecognizedUnionMembers: true,
|
|
1310
|
+
allowUnrecognizedEnumValues: true,
|
|
1311
|
+
skipValidation: true,
|
|
1312
|
+
breadcrumbsPrefix: ["response"],
|
|
1313
|
+
}), _response.rawResponse);
|
|
547
1314
|
case 500:
|
|
548
1315
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
549
1316
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -551,11 +1318,12 @@ class Plans {
|
|
|
551
1318
|
allowUnrecognizedEnumValues: true,
|
|
552
1319
|
skipValidation: true,
|
|
553
1320
|
breadcrumbsPrefix: ["response"],
|
|
554
|
-
}));
|
|
1321
|
+
}), _response.rawResponse);
|
|
555
1322
|
default:
|
|
556
1323
|
throw new errors.SchematicError({
|
|
557
1324
|
statusCode: _response.error.statusCode,
|
|
558
1325
|
body: _response.error.body,
|
|
1326
|
+
rawResponse: _response.rawResponse,
|
|
559
1327
|
});
|
|
560
1328
|
}
|
|
561
1329
|
}
|
|
@@ -564,12 +1332,14 @@ class Plans {
|
|
|
564
1332
|
throw new errors.SchematicError({
|
|
565
1333
|
statusCode: _response.error.statusCode,
|
|
566
1334
|
body: _response.error.rawBody,
|
|
1335
|
+
rawResponse: _response.rawResponse,
|
|
567
1336
|
});
|
|
568
1337
|
case "timeout":
|
|
569
|
-
throw new errors.SchematicTimeoutError();
|
|
1338
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans.");
|
|
570
1339
|
case "unknown":
|
|
571
1340
|
throw new errors.SchematicError({
|
|
572
1341
|
message: _response.error.errorMessage,
|
|
1342
|
+
rawResponse: _response.rawResponse,
|
|
573
1343
|
});
|
|
574
1344
|
}
|
|
575
1345
|
});
|
|
@@ -581,6 +1351,7 @@ class Plans {
|
|
|
581
1351
|
* @throws {@link Schematic.BadRequestError}
|
|
582
1352
|
* @throws {@link Schematic.UnauthorizedError}
|
|
583
1353
|
* @throws {@link Schematic.ForbiddenError}
|
|
1354
|
+
* @throws {@link Schematic.NotFoundError}
|
|
584
1355
|
* @throws {@link Schematic.InternalServerError}
|
|
585
1356
|
*
|
|
586
1357
|
* @example
|
|
@@ -591,12 +1362,15 @@ class Plans {
|
|
|
591
1362
|
* })
|
|
592
1363
|
*/
|
|
593
1364
|
createPlan(request, requestOptions) {
|
|
594
|
-
|
|
1365
|
+
return core.HttpResponsePromise.fromPromise(this.__createPlan(request, requestOptions));
|
|
1366
|
+
}
|
|
1367
|
+
__createPlan(request, requestOptions) {
|
|
595
1368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1369
|
+
var _a, _b, _c;
|
|
596
1370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
597
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1371
|
+
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, "plans"),
|
|
598
1372
|
method: "POST",
|
|
599
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1373
|
+
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),
|
|
600
1374
|
contentType: "application/json",
|
|
601
1375
|
requestType: "json",
|
|
602
1376
|
body: serializers.CreatePlanRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -605,13 +1379,16 @@ class Plans {
|
|
|
605
1379
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
606
1380
|
});
|
|
607
1381
|
if (_response.ok) {
|
|
608
|
-
return
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1382
|
+
return {
|
|
1383
|
+
data: serializers.CreatePlanResponse.parseOrThrow(_response.body, {
|
|
1384
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1385
|
+
allowUnrecognizedUnionMembers: true,
|
|
1386
|
+
allowUnrecognizedEnumValues: true,
|
|
1387
|
+
skipValidation: true,
|
|
1388
|
+
breadcrumbsPrefix: ["response"],
|
|
1389
|
+
}),
|
|
1390
|
+
rawResponse: _response.rawResponse,
|
|
1391
|
+
};
|
|
615
1392
|
}
|
|
616
1393
|
if (_response.error.reason === "status-code") {
|
|
617
1394
|
switch (_response.error.statusCode) {
|
|
@@ -622,7 +1399,7 @@ class Plans {
|
|
|
622
1399
|
allowUnrecognizedEnumValues: true,
|
|
623
1400
|
skipValidation: true,
|
|
624
1401
|
breadcrumbsPrefix: ["response"],
|
|
625
|
-
}));
|
|
1402
|
+
}), _response.rawResponse);
|
|
626
1403
|
case 401:
|
|
627
1404
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
628
1405
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -630,7 +1407,7 @@ class Plans {
|
|
|
630
1407
|
allowUnrecognizedEnumValues: true,
|
|
631
1408
|
skipValidation: true,
|
|
632
1409
|
breadcrumbsPrefix: ["response"],
|
|
633
|
-
}));
|
|
1410
|
+
}), _response.rawResponse);
|
|
634
1411
|
case 403:
|
|
635
1412
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
636
1413
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -638,7 +1415,15 @@ class Plans {
|
|
|
638
1415
|
allowUnrecognizedEnumValues: true,
|
|
639
1416
|
skipValidation: true,
|
|
640
1417
|
breadcrumbsPrefix: ["response"],
|
|
641
|
-
}));
|
|
1418
|
+
}), _response.rawResponse);
|
|
1419
|
+
case 404:
|
|
1420
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1421
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1422
|
+
allowUnrecognizedUnionMembers: true,
|
|
1423
|
+
allowUnrecognizedEnumValues: true,
|
|
1424
|
+
skipValidation: true,
|
|
1425
|
+
breadcrumbsPrefix: ["response"],
|
|
1426
|
+
}), _response.rawResponse);
|
|
642
1427
|
case 500:
|
|
643
1428
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
644
1429
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -646,11 +1431,12 @@ class Plans {
|
|
|
646
1431
|
allowUnrecognizedEnumValues: true,
|
|
647
1432
|
skipValidation: true,
|
|
648
1433
|
breadcrumbsPrefix: ["response"],
|
|
649
|
-
}));
|
|
1434
|
+
}), _response.rawResponse);
|
|
650
1435
|
default:
|
|
651
1436
|
throw new errors.SchematicError({
|
|
652
1437
|
statusCode: _response.error.statusCode,
|
|
653
1438
|
body: _response.error.body,
|
|
1439
|
+
rawResponse: _response.rawResponse,
|
|
654
1440
|
});
|
|
655
1441
|
}
|
|
656
1442
|
}
|
|
@@ -659,12 +1445,14 @@ class Plans {
|
|
|
659
1445
|
throw new errors.SchematicError({
|
|
660
1446
|
statusCode: _response.error.statusCode,
|
|
661
1447
|
body: _response.error.rawBody,
|
|
1448
|
+
rawResponse: _response.rawResponse,
|
|
662
1449
|
});
|
|
663
1450
|
case "timeout":
|
|
664
|
-
throw new errors.SchematicTimeoutError();
|
|
1451
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plans.");
|
|
665
1452
|
case "unknown":
|
|
666
1453
|
throw new errors.SchematicError({
|
|
667
1454
|
message: _response.error.errorMessage,
|
|
1455
|
+
rawResponse: _response.rawResponse,
|
|
668
1456
|
});
|
|
669
1457
|
}
|
|
670
1458
|
});
|
|
@@ -682,12 +1470,15 @@ class Plans {
|
|
|
682
1470
|
* await client.plans.getPlan("plan_id")
|
|
683
1471
|
*/
|
|
684
1472
|
getPlan(planId, requestOptions) {
|
|
685
|
-
|
|
1473
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlan(planId, requestOptions));
|
|
1474
|
+
}
|
|
1475
|
+
__getPlan(planId, requestOptions) {
|
|
686
1476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1477
|
+
var _a, _b, _c;
|
|
687
1478
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
688
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1479
|
+
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, `plans/${encodeURIComponent(planId)}`),
|
|
689
1480
|
method: "GET",
|
|
690
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1481
|
+
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),
|
|
691
1482
|
contentType: "application/json",
|
|
692
1483
|
requestType: "json",
|
|
693
1484
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -695,13 +1486,16 @@ class Plans {
|
|
|
695
1486
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
696
1487
|
});
|
|
697
1488
|
if (_response.ok) {
|
|
698
|
-
return
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
1489
|
+
return {
|
|
1490
|
+
data: serializers.GetPlanResponse.parseOrThrow(_response.body, {
|
|
1491
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1492
|
+
allowUnrecognizedUnionMembers: true,
|
|
1493
|
+
allowUnrecognizedEnumValues: true,
|
|
1494
|
+
skipValidation: true,
|
|
1495
|
+
breadcrumbsPrefix: ["response"],
|
|
1496
|
+
}),
|
|
1497
|
+
rawResponse: _response.rawResponse,
|
|
1498
|
+
};
|
|
705
1499
|
}
|
|
706
1500
|
if (_response.error.reason === "status-code") {
|
|
707
1501
|
switch (_response.error.statusCode) {
|
|
@@ -712,7 +1506,7 @@ class Plans {
|
|
|
712
1506
|
allowUnrecognizedEnumValues: true,
|
|
713
1507
|
skipValidation: true,
|
|
714
1508
|
breadcrumbsPrefix: ["response"],
|
|
715
|
-
}));
|
|
1509
|
+
}), _response.rawResponse);
|
|
716
1510
|
case 403:
|
|
717
1511
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
718
1512
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -720,7 +1514,7 @@ class Plans {
|
|
|
720
1514
|
allowUnrecognizedEnumValues: true,
|
|
721
1515
|
skipValidation: true,
|
|
722
1516
|
breadcrumbsPrefix: ["response"],
|
|
723
|
-
}));
|
|
1517
|
+
}), _response.rawResponse);
|
|
724
1518
|
case 404:
|
|
725
1519
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
726
1520
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -728,7 +1522,7 @@ class Plans {
|
|
|
728
1522
|
allowUnrecognizedEnumValues: true,
|
|
729
1523
|
skipValidation: true,
|
|
730
1524
|
breadcrumbsPrefix: ["response"],
|
|
731
|
-
}));
|
|
1525
|
+
}), _response.rawResponse);
|
|
732
1526
|
case 500:
|
|
733
1527
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
734
1528
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -736,11 +1530,12 @@ class Plans {
|
|
|
736
1530
|
allowUnrecognizedEnumValues: true,
|
|
737
1531
|
skipValidation: true,
|
|
738
1532
|
breadcrumbsPrefix: ["response"],
|
|
739
|
-
}));
|
|
1533
|
+
}), _response.rawResponse);
|
|
740
1534
|
default:
|
|
741
1535
|
throw new errors.SchematicError({
|
|
742
1536
|
statusCode: _response.error.statusCode,
|
|
743
1537
|
body: _response.error.body,
|
|
1538
|
+
rawResponse: _response.rawResponse,
|
|
744
1539
|
});
|
|
745
1540
|
}
|
|
746
1541
|
}
|
|
@@ -749,12 +1544,14 @@ class Plans {
|
|
|
749
1544
|
throw new errors.SchematicError({
|
|
750
1545
|
statusCode: _response.error.statusCode,
|
|
751
1546
|
body: _response.error.rawBody,
|
|
1547
|
+
rawResponse: _response.rawResponse,
|
|
752
1548
|
});
|
|
753
1549
|
case "timeout":
|
|
754
|
-
throw new errors.SchematicTimeoutError();
|
|
1550
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans/{plan_id}.");
|
|
755
1551
|
case "unknown":
|
|
756
1552
|
throw new errors.SchematicError({
|
|
757
1553
|
message: _response.error.errorMessage,
|
|
1554
|
+
rawResponse: _response.rawResponse,
|
|
758
1555
|
});
|
|
759
1556
|
}
|
|
760
1557
|
});
|
|
@@ -776,12 +1573,15 @@ class Plans {
|
|
|
776
1573
|
* })
|
|
777
1574
|
*/
|
|
778
1575
|
updatePlan(planId, request, requestOptions) {
|
|
779
|
-
|
|
1576
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePlan(planId, request, requestOptions));
|
|
1577
|
+
}
|
|
1578
|
+
__updatePlan(planId, request, requestOptions) {
|
|
780
1579
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1580
|
+
var _a, _b, _c;
|
|
781
1581
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
782
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1582
|
+
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, `plans/${encodeURIComponent(planId)}`),
|
|
783
1583
|
method: "PUT",
|
|
784
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1584
|
+
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),
|
|
785
1585
|
contentType: "application/json",
|
|
786
1586
|
requestType: "json",
|
|
787
1587
|
body: serializers.UpdatePlanRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -790,13 +1590,16 @@ class Plans {
|
|
|
790
1590
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
791
1591
|
});
|
|
792
1592
|
if (_response.ok) {
|
|
793
|
-
return
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
1593
|
+
return {
|
|
1594
|
+
data: serializers.UpdatePlanResponse.parseOrThrow(_response.body, {
|
|
1595
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1596
|
+
allowUnrecognizedUnionMembers: true,
|
|
1597
|
+
allowUnrecognizedEnumValues: true,
|
|
1598
|
+
skipValidation: true,
|
|
1599
|
+
breadcrumbsPrefix: ["response"],
|
|
1600
|
+
}),
|
|
1601
|
+
rawResponse: _response.rawResponse,
|
|
1602
|
+
};
|
|
800
1603
|
}
|
|
801
1604
|
if (_response.error.reason === "status-code") {
|
|
802
1605
|
switch (_response.error.statusCode) {
|
|
@@ -807,7 +1610,7 @@ class Plans {
|
|
|
807
1610
|
allowUnrecognizedEnumValues: true,
|
|
808
1611
|
skipValidation: true,
|
|
809
1612
|
breadcrumbsPrefix: ["response"],
|
|
810
|
-
}));
|
|
1613
|
+
}), _response.rawResponse);
|
|
811
1614
|
case 401:
|
|
812
1615
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
813
1616
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -815,7 +1618,7 @@ class Plans {
|
|
|
815
1618
|
allowUnrecognizedEnumValues: true,
|
|
816
1619
|
skipValidation: true,
|
|
817
1620
|
breadcrumbsPrefix: ["response"],
|
|
818
|
-
}));
|
|
1621
|
+
}), _response.rawResponse);
|
|
819
1622
|
case 403:
|
|
820
1623
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
821
1624
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -823,7 +1626,7 @@ class Plans {
|
|
|
823
1626
|
allowUnrecognizedEnumValues: true,
|
|
824
1627
|
skipValidation: true,
|
|
825
1628
|
breadcrumbsPrefix: ["response"],
|
|
826
|
-
}));
|
|
1629
|
+
}), _response.rawResponse);
|
|
827
1630
|
case 404:
|
|
828
1631
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
829
1632
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -831,7 +1634,7 @@ class Plans {
|
|
|
831
1634
|
allowUnrecognizedEnumValues: true,
|
|
832
1635
|
skipValidation: true,
|
|
833
1636
|
breadcrumbsPrefix: ["response"],
|
|
834
|
-
}));
|
|
1637
|
+
}), _response.rawResponse);
|
|
835
1638
|
case 500:
|
|
836
1639
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
837
1640
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -839,11 +1642,12 @@ class Plans {
|
|
|
839
1642
|
allowUnrecognizedEnumValues: true,
|
|
840
1643
|
skipValidation: true,
|
|
841
1644
|
breadcrumbsPrefix: ["response"],
|
|
842
|
-
}));
|
|
1645
|
+
}), _response.rawResponse);
|
|
843
1646
|
default:
|
|
844
1647
|
throw new errors.SchematicError({
|
|
845
1648
|
statusCode: _response.error.statusCode,
|
|
846
1649
|
body: _response.error.body,
|
|
1650
|
+
rawResponse: _response.rawResponse,
|
|
847
1651
|
});
|
|
848
1652
|
}
|
|
849
1653
|
}
|
|
@@ -852,12 +1656,14 @@ class Plans {
|
|
|
852
1656
|
throw new errors.SchematicError({
|
|
853
1657
|
statusCode: _response.error.statusCode,
|
|
854
1658
|
body: _response.error.rawBody,
|
|
1659
|
+
rawResponse: _response.rawResponse,
|
|
855
1660
|
});
|
|
856
1661
|
case "timeout":
|
|
857
|
-
throw new errors.SchematicTimeoutError();
|
|
1662
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plans/{plan_id}.");
|
|
858
1663
|
case "unknown":
|
|
859
1664
|
throw new errors.SchematicError({
|
|
860
1665
|
message: _response.error.errorMessage,
|
|
1666
|
+
rawResponse: _response.rawResponse,
|
|
861
1667
|
});
|
|
862
1668
|
}
|
|
863
1669
|
});
|
|
@@ -869,18 +1675,22 @@ class Plans {
|
|
|
869
1675
|
* @throws {@link Schematic.BadRequestError}
|
|
870
1676
|
* @throws {@link Schematic.UnauthorizedError}
|
|
871
1677
|
* @throws {@link Schematic.ForbiddenError}
|
|
1678
|
+
* @throws {@link Schematic.NotFoundError}
|
|
872
1679
|
* @throws {@link Schematic.InternalServerError}
|
|
873
1680
|
*
|
|
874
1681
|
* @example
|
|
875
1682
|
* await client.plans.deletePlan("plan_id")
|
|
876
1683
|
*/
|
|
877
1684
|
deletePlan(planId, requestOptions) {
|
|
878
|
-
|
|
1685
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePlan(planId, requestOptions));
|
|
1686
|
+
}
|
|
1687
|
+
__deletePlan(planId, requestOptions) {
|
|
879
1688
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1689
|
+
var _a, _b, _c;
|
|
880
1690
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
881
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1691
|
+
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, `plans/${encodeURIComponent(planId)}`),
|
|
882
1692
|
method: "DELETE",
|
|
883
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1693
|
+
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),
|
|
884
1694
|
contentType: "application/json",
|
|
885
1695
|
requestType: "json",
|
|
886
1696
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -888,13 +1698,16 @@ class Plans {
|
|
|
888
1698
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
889
1699
|
});
|
|
890
1700
|
if (_response.ok) {
|
|
891
|
-
return
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
1701
|
+
return {
|
|
1702
|
+
data: serializers.DeletePlanResponse.parseOrThrow(_response.body, {
|
|
1703
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1704
|
+
allowUnrecognizedUnionMembers: true,
|
|
1705
|
+
allowUnrecognizedEnumValues: true,
|
|
1706
|
+
skipValidation: true,
|
|
1707
|
+
breadcrumbsPrefix: ["response"],
|
|
1708
|
+
}),
|
|
1709
|
+
rawResponse: _response.rawResponse,
|
|
1710
|
+
};
|
|
898
1711
|
}
|
|
899
1712
|
if (_response.error.reason === "status-code") {
|
|
900
1713
|
switch (_response.error.statusCode) {
|
|
@@ -905,7 +1718,7 @@ class Plans {
|
|
|
905
1718
|
allowUnrecognizedEnumValues: true,
|
|
906
1719
|
skipValidation: true,
|
|
907
1720
|
breadcrumbsPrefix: ["response"],
|
|
908
|
-
}));
|
|
1721
|
+
}), _response.rawResponse);
|
|
909
1722
|
case 401:
|
|
910
1723
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
911
1724
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -913,7 +1726,7 @@ class Plans {
|
|
|
913
1726
|
allowUnrecognizedEnumValues: true,
|
|
914
1727
|
skipValidation: true,
|
|
915
1728
|
breadcrumbsPrefix: ["response"],
|
|
916
|
-
}));
|
|
1729
|
+
}), _response.rawResponse);
|
|
917
1730
|
case 403:
|
|
918
1731
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
919
1732
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -921,7 +1734,15 @@ class Plans {
|
|
|
921
1734
|
allowUnrecognizedEnumValues: true,
|
|
922
1735
|
skipValidation: true,
|
|
923
1736
|
breadcrumbsPrefix: ["response"],
|
|
924
|
-
}));
|
|
1737
|
+
}), _response.rawResponse);
|
|
1738
|
+
case 404:
|
|
1739
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1740
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1741
|
+
allowUnrecognizedUnionMembers: true,
|
|
1742
|
+
allowUnrecognizedEnumValues: true,
|
|
1743
|
+
skipValidation: true,
|
|
1744
|
+
breadcrumbsPrefix: ["response"],
|
|
1745
|
+
}), _response.rawResponse);
|
|
925
1746
|
case 500:
|
|
926
1747
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
927
1748
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -929,11 +1750,12 @@ class Plans {
|
|
|
929
1750
|
allowUnrecognizedEnumValues: true,
|
|
930
1751
|
skipValidation: true,
|
|
931
1752
|
breadcrumbsPrefix: ["response"],
|
|
932
|
-
}));
|
|
1753
|
+
}), _response.rawResponse);
|
|
933
1754
|
default:
|
|
934
1755
|
throw new errors.SchematicError({
|
|
935
1756
|
statusCode: _response.error.statusCode,
|
|
936
1757
|
body: _response.error.body,
|
|
1758
|
+
rawResponse: _response.rawResponse,
|
|
937
1759
|
});
|
|
938
1760
|
}
|
|
939
1761
|
}
|
|
@@ -942,12 +1764,14 @@ class Plans {
|
|
|
942
1764
|
throw new errors.SchematicError({
|
|
943
1765
|
statusCode: _response.error.statusCode,
|
|
944
1766
|
body: _response.error.rawBody,
|
|
1767
|
+
rawResponse: _response.rawResponse,
|
|
945
1768
|
});
|
|
946
1769
|
case "timeout":
|
|
947
|
-
throw new errors.SchematicTimeoutError();
|
|
1770
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plans/{plan_id}.");
|
|
948
1771
|
case "unknown":
|
|
949
1772
|
throw new errors.SchematicError({
|
|
950
1773
|
message: _response.error.errorMessage,
|
|
1774
|
+
rawResponse: _response.rawResponse,
|
|
951
1775
|
});
|
|
952
1776
|
}
|
|
953
1777
|
});
|
|
@@ -970,12 +1794,15 @@ class Plans {
|
|
|
970
1794
|
* })
|
|
971
1795
|
*/
|
|
972
1796
|
upsertBillingProductPlan(planId, request, requestOptions) {
|
|
973
|
-
|
|
1797
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingProductPlan(planId, request, requestOptions));
|
|
1798
|
+
}
|
|
1799
|
+
__upsertBillingProductPlan(planId, request, requestOptions) {
|
|
974
1800
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1801
|
+
var _a, _b, _c;
|
|
975
1802
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
976
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1803
|
+
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, `plans/${encodeURIComponent(planId)}/billing_products`),
|
|
977
1804
|
method: "PUT",
|
|
978
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1805
|
+
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),
|
|
979
1806
|
contentType: "application/json",
|
|
980
1807
|
requestType: "json",
|
|
981
1808
|
body: serializers.UpsertBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -984,13 +1811,16 @@ class Plans {
|
|
|
984
1811
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
985
1812
|
});
|
|
986
1813
|
if (_response.ok) {
|
|
987
|
-
return
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
1814
|
+
return {
|
|
1815
|
+
data: serializers.UpsertBillingProductPlanResponse.parseOrThrow(_response.body, {
|
|
1816
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1817
|
+
allowUnrecognizedUnionMembers: true,
|
|
1818
|
+
allowUnrecognizedEnumValues: true,
|
|
1819
|
+
skipValidation: true,
|
|
1820
|
+
breadcrumbsPrefix: ["response"],
|
|
1821
|
+
}),
|
|
1822
|
+
rawResponse: _response.rawResponse,
|
|
1823
|
+
};
|
|
994
1824
|
}
|
|
995
1825
|
if (_response.error.reason === "status-code") {
|
|
996
1826
|
switch (_response.error.statusCode) {
|
|
@@ -1001,7 +1831,7 @@ class Plans {
|
|
|
1001
1831
|
allowUnrecognizedEnumValues: true,
|
|
1002
1832
|
skipValidation: true,
|
|
1003
1833
|
breadcrumbsPrefix: ["response"],
|
|
1004
|
-
}));
|
|
1834
|
+
}), _response.rawResponse);
|
|
1005
1835
|
case 401:
|
|
1006
1836
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1007
1837
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1009,7 +1839,7 @@ class Plans {
|
|
|
1009
1839
|
allowUnrecognizedEnumValues: true,
|
|
1010
1840
|
skipValidation: true,
|
|
1011
1841
|
breadcrumbsPrefix: ["response"],
|
|
1012
|
-
}));
|
|
1842
|
+
}), _response.rawResponse);
|
|
1013
1843
|
case 403:
|
|
1014
1844
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1015
1845
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1017,7 +1847,7 @@ class Plans {
|
|
|
1017
1847
|
allowUnrecognizedEnumValues: true,
|
|
1018
1848
|
skipValidation: true,
|
|
1019
1849
|
breadcrumbsPrefix: ["response"],
|
|
1020
|
-
}));
|
|
1850
|
+
}), _response.rawResponse);
|
|
1021
1851
|
case 404:
|
|
1022
1852
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1023
1853
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1025,7 +1855,7 @@ class Plans {
|
|
|
1025
1855
|
allowUnrecognizedEnumValues: true,
|
|
1026
1856
|
skipValidation: true,
|
|
1027
1857
|
breadcrumbsPrefix: ["response"],
|
|
1028
|
-
}));
|
|
1858
|
+
}), _response.rawResponse);
|
|
1029
1859
|
case 500:
|
|
1030
1860
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1031
1861
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1033,11 +1863,12 @@ class Plans {
|
|
|
1033
1863
|
allowUnrecognizedEnumValues: true,
|
|
1034
1864
|
skipValidation: true,
|
|
1035
1865
|
breadcrumbsPrefix: ["response"],
|
|
1036
|
-
}));
|
|
1866
|
+
}), _response.rawResponse);
|
|
1037
1867
|
default:
|
|
1038
1868
|
throw new errors.SchematicError({
|
|
1039
1869
|
statusCode: _response.error.statusCode,
|
|
1040
1870
|
body: _response.error.body,
|
|
1871
|
+
rawResponse: _response.rawResponse,
|
|
1041
1872
|
});
|
|
1042
1873
|
}
|
|
1043
1874
|
}
|
|
@@ -1046,12 +1877,14 @@ class Plans {
|
|
|
1046
1877
|
throw new errors.SchematicError({
|
|
1047
1878
|
statusCode: _response.error.statusCode,
|
|
1048
1879
|
body: _response.error.rawBody,
|
|
1880
|
+
rawResponse: _response.rawResponse,
|
|
1049
1881
|
});
|
|
1050
1882
|
case "timeout":
|
|
1051
|
-
throw new errors.SchematicTimeoutError();
|
|
1883
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plans/{plan_id}/billing_products.");
|
|
1052
1884
|
case "unknown":
|
|
1053
1885
|
throw new errors.SchematicError({
|
|
1054
1886
|
message: _response.error.errorMessage,
|
|
1887
|
+
rawResponse: _response.rawResponse,
|
|
1055
1888
|
});
|
|
1056
1889
|
}
|
|
1057
1890
|
});
|
|
@@ -1063,14 +1896,18 @@ class Plans {
|
|
|
1063
1896
|
* @throws {@link Schematic.BadRequestError}
|
|
1064
1897
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1065
1898
|
* @throws {@link Schematic.ForbiddenError}
|
|
1899
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1066
1900
|
* @throws {@link Schematic.InternalServerError}
|
|
1067
1901
|
*
|
|
1068
1902
|
* @example
|
|
1069
1903
|
* await client.plans.countPlans()
|
|
1070
1904
|
*/
|
|
1071
1905
|
countPlans(request = {}, requestOptions) {
|
|
1072
|
-
|
|
1073
|
-
|
|
1906
|
+
return core.HttpResponsePromise.fromPromise(this.__countPlans(request, requestOptions));
|
|
1907
|
+
}
|
|
1908
|
+
__countPlans() {
|
|
1909
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1910
|
+
var _a, _b, _c;
|
|
1074
1911
|
const { companyId, hasProductId, ids, planType, q, withoutEntitlementFor, withoutProductId, withoutPaidProductId, limit, offset, } = request;
|
|
1075
1912
|
const _queryParams = {};
|
|
1076
1913
|
if (companyId != null) {
|
|
@@ -1088,7 +1925,9 @@ class Plans {
|
|
|
1088
1925
|
}
|
|
1089
1926
|
}
|
|
1090
1927
|
if (planType != null) {
|
|
1091
|
-
_queryParams["plan_type"] = planType
|
|
1928
|
+
_queryParams["plan_type"] = serializers.CountPlansRequestPlanType.jsonOrThrow(planType, {
|
|
1929
|
+
unrecognizedObjectKeys: "strip",
|
|
1930
|
+
});
|
|
1092
1931
|
}
|
|
1093
1932
|
if (q != null) {
|
|
1094
1933
|
_queryParams["q"] = q;
|
|
@@ -1109,9 +1948,9 @@ class Plans {
|
|
|
1109
1948
|
_queryParams["offset"] = offset.toString();
|
|
1110
1949
|
}
|
|
1111
1950
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1112
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1951
|
+
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, "plans/count"),
|
|
1113
1952
|
method: "GET",
|
|
1114
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1953
|
+
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),
|
|
1115
1954
|
contentType: "application/json",
|
|
1116
1955
|
queryParameters: _queryParams,
|
|
1117
1956
|
requestType: "json",
|
|
@@ -1120,13 +1959,16 @@ class Plans {
|
|
|
1120
1959
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1121
1960
|
});
|
|
1122
1961
|
if (_response.ok) {
|
|
1123
|
-
return
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1962
|
+
return {
|
|
1963
|
+
data: serializers.CountPlansResponse.parseOrThrow(_response.body, {
|
|
1964
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1965
|
+
allowUnrecognizedUnionMembers: true,
|
|
1966
|
+
allowUnrecognizedEnumValues: true,
|
|
1967
|
+
skipValidation: true,
|
|
1968
|
+
breadcrumbsPrefix: ["response"],
|
|
1969
|
+
}),
|
|
1970
|
+
rawResponse: _response.rawResponse,
|
|
1971
|
+
};
|
|
1130
1972
|
}
|
|
1131
1973
|
if (_response.error.reason === "status-code") {
|
|
1132
1974
|
switch (_response.error.statusCode) {
|
|
@@ -1137,7 +1979,7 @@ class Plans {
|
|
|
1137
1979
|
allowUnrecognizedEnumValues: true,
|
|
1138
1980
|
skipValidation: true,
|
|
1139
1981
|
breadcrumbsPrefix: ["response"],
|
|
1140
|
-
}));
|
|
1982
|
+
}), _response.rawResponse);
|
|
1141
1983
|
case 401:
|
|
1142
1984
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1143
1985
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1145,7 +1987,7 @@ class Plans {
|
|
|
1145
1987
|
allowUnrecognizedEnumValues: true,
|
|
1146
1988
|
skipValidation: true,
|
|
1147
1989
|
breadcrumbsPrefix: ["response"],
|
|
1148
|
-
}));
|
|
1990
|
+
}), _response.rawResponse);
|
|
1149
1991
|
case 403:
|
|
1150
1992
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1151
1993
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1153,7 +1995,15 @@ class Plans {
|
|
|
1153
1995
|
allowUnrecognizedEnumValues: true,
|
|
1154
1996
|
skipValidation: true,
|
|
1155
1997
|
breadcrumbsPrefix: ["response"],
|
|
1156
|
-
}));
|
|
1998
|
+
}), _response.rawResponse);
|
|
1999
|
+
case 404:
|
|
2000
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2001
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2002
|
+
allowUnrecognizedUnionMembers: true,
|
|
2003
|
+
allowUnrecognizedEnumValues: true,
|
|
2004
|
+
skipValidation: true,
|
|
2005
|
+
breadcrumbsPrefix: ["response"],
|
|
2006
|
+
}), _response.rawResponse);
|
|
1157
2007
|
case 500:
|
|
1158
2008
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1159
2009
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1161,11 +2011,12 @@ class Plans {
|
|
|
1161
2011
|
allowUnrecognizedEnumValues: true,
|
|
1162
2012
|
skipValidation: true,
|
|
1163
2013
|
breadcrumbsPrefix: ["response"],
|
|
1164
|
-
}));
|
|
2014
|
+
}), _response.rawResponse);
|
|
1165
2015
|
default:
|
|
1166
2016
|
throw new errors.SchematicError({
|
|
1167
2017
|
statusCode: _response.error.statusCode,
|
|
1168
2018
|
body: _response.error.body,
|
|
2019
|
+
rawResponse: _response.rawResponse,
|
|
1169
2020
|
});
|
|
1170
2021
|
}
|
|
1171
2022
|
}
|
|
@@ -1174,12 +2025,14 @@ class Plans {
|
|
|
1174
2025
|
throw new errors.SchematicError({
|
|
1175
2026
|
statusCode: _response.error.statusCode,
|
|
1176
2027
|
body: _response.error.rawBody,
|
|
2028
|
+
rawResponse: _response.rawResponse,
|
|
1177
2029
|
});
|
|
1178
2030
|
case "timeout":
|
|
1179
|
-
throw new errors.SchematicTimeoutError();
|
|
2031
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans/count.");
|
|
1180
2032
|
case "unknown":
|
|
1181
2033
|
throw new errors.SchematicError({
|
|
1182
2034
|
message: _response.error.errorMessage,
|
|
2035
|
+
rawResponse: _response.rawResponse,
|
|
1183
2036
|
});
|
|
1184
2037
|
}
|
|
1185
2038
|
});
|