@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) {
|
|
@@ -45,6 +55,7 @@ const Schematic = __importStar(require("../../../index"));
|
|
|
45
55
|
const url_join_1 = __importDefault(require("url-join"));
|
|
46
56
|
const serializers = __importStar(require("../../../../serialization/index"));
|
|
47
57
|
const errors = __importStar(require("../../../../errors/index"));
|
|
58
|
+
const json_1 = require("../../../../core/json");
|
|
48
59
|
class Companies {
|
|
49
60
|
constructor(_options) {
|
|
50
61
|
this._options = _options;
|
|
@@ -56,15 +67,19 @@ class Companies {
|
|
|
56
67
|
* @throws {@link Schematic.BadRequestError}
|
|
57
68
|
* @throws {@link Schematic.UnauthorizedError}
|
|
58
69
|
* @throws {@link Schematic.ForbiddenError}
|
|
70
|
+
* @throws {@link Schematic.NotFoundError}
|
|
59
71
|
* @throws {@link Schematic.InternalServerError}
|
|
60
72
|
*
|
|
61
73
|
* @example
|
|
62
74
|
* await client.companies.listCompanies()
|
|
63
75
|
*/
|
|
64
76
|
listCompanies(request = {}, requestOptions) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
77
|
+
return core.HttpResponsePromise.fromPromise(this.__listCompanies(request, requestOptions));
|
|
78
|
+
}
|
|
79
|
+
__listCompanies() {
|
|
80
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
81
|
+
var _a, _b, _c;
|
|
82
|
+
const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
|
|
68
83
|
const _queryParams = {};
|
|
69
84
|
if (ids != null) {
|
|
70
85
|
if (Array.isArray(ids)) {
|
|
@@ -86,6 +101,9 @@ class Companies {
|
|
|
86
101
|
if (withoutPlan != null) {
|
|
87
102
|
_queryParams["without_plan"] = withoutPlan.toString();
|
|
88
103
|
}
|
|
104
|
+
if (withSubscription != null) {
|
|
105
|
+
_queryParams["with_subscription"] = withSubscription.toString();
|
|
106
|
+
}
|
|
89
107
|
if (limit != null) {
|
|
90
108
|
_queryParams["limit"] = limit.toString();
|
|
91
109
|
}
|
|
@@ -93,9 +111,9 @@ class Companies {
|
|
|
93
111
|
_queryParams["offset"] = offset.toString();
|
|
94
112
|
}
|
|
95
113
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
96
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
114
|
+
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, "companies"),
|
|
97
115
|
method: "GET",
|
|
98
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
116
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
99
117
|
contentType: "application/json",
|
|
100
118
|
queryParameters: _queryParams,
|
|
101
119
|
requestType: "json",
|
|
@@ -104,13 +122,16 @@ class Companies {
|
|
|
104
122
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
105
123
|
});
|
|
106
124
|
if (_response.ok) {
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
125
|
+
return {
|
|
126
|
+
data: serializers.ListCompaniesResponse.parseOrThrow(_response.body, {
|
|
127
|
+
unrecognizedObjectKeys: "passthrough",
|
|
128
|
+
allowUnrecognizedUnionMembers: true,
|
|
129
|
+
allowUnrecognizedEnumValues: true,
|
|
130
|
+
skipValidation: true,
|
|
131
|
+
breadcrumbsPrefix: ["response"],
|
|
132
|
+
}),
|
|
133
|
+
rawResponse: _response.rawResponse,
|
|
134
|
+
};
|
|
114
135
|
}
|
|
115
136
|
if (_response.error.reason === "status-code") {
|
|
116
137
|
switch (_response.error.statusCode) {
|
|
@@ -121,7 +142,7 @@ class Companies {
|
|
|
121
142
|
allowUnrecognizedEnumValues: true,
|
|
122
143
|
skipValidation: true,
|
|
123
144
|
breadcrumbsPrefix: ["response"],
|
|
124
|
-
}));
|
|
145
|
+
}), _response.rawResponse);
|
|
125
146
|
case 401:
|
|
126
147
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
127
148
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -129,7 +150,7 @@ class Companies {
|
|
|
129
150
|
allowUnrecognizedEnumValues: true,
|
|
130
151
|
skipValidation: true,
|
|
131
152
|
breadcrumbsPrefix: ["response"],
|
|
132
|
-
}));
|
|
153
|
+
}), _response.rawResponse);
|
|
133
154
|
case 403:
|
|
134
155
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
135
156
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -137,7 +158,15 @@ class Companies {
|
|
|
137
158
|
allowUnrecognizedEnumValues: true,
|
|
138
159
|
skipValidation: true,
|
|
139
160
|
breadcrumbsPrefix: ["response"],
|
|
140
|
-
}));
|
|
161
|
+
}), _response.rawResponse);
|
|
162
|
+
case 404:
|
|
163
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
164
|
+
unrecognizedObjectKeys: "passthrough",
|
|
165
|
+
allowUnrecognizedUnionMembers: true,
|
|
166
|
+
allowUnrecognizedEnumValues: true,
|
|
167
|
+
skipValidation: true,
|
|
168
|
+
breadcrumbsPrefix: ["response"],
|
|
169
|
+
}), _response.rawResponse);
|
|
141
170
|
case 500:
|
|
142
171
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
143
172
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -145,11 +174,12 @@ class Companies {
|
|
|
145
174
|
allowUnrecognizedEnumValues: true,
|
|
146
175
|
skipValidation: true,
|
|
147
176
|
breadcrumbsPrefix: ["response"],
|
|
148
|
-
}));
|
|
177
|
+
}), _response.rawResponse);
|
|
149
178
|
default:
|
|
150
179
|
throw new errors.SchematicError({
|
|
151
180
|
statusCode: _response.error.statusCode,
|
|
152
181
|
body: _response.error.body,
|
|
182
|
+
rawResponse: _response.rawResponse,
|
|
153
183
|
});
|
|
154
184
|
}
|
|
155
185
|
}
|
|
@@ -158,12 +188,14 @@ class Companies {
|
|
|
158
188
|
throw new errors.SchematicError({
|
|
159
189
|
statusCode: _response.error.statusCode,
|
|
160
190
|
body: _response.error.rawBody,
|
|
191
|
+
rawResponse: _response.rawResponse,
|
|
161
192
|
});
|
|
162
193
|
case "timeout":
|
|
163
|
-
throw new errors.SchematicTimeoutError();
|
|
194
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies.");
|
|
164
195
|
case "unknown":
|
|
165
196
|
throw new errors.SchematicError({
|
|
166
197
|
message: _response.error.errorMessage,
|
|
198
|
+
rawResponse: _response.rawResponse,
|
|
167
199
|
});
|
|
168
200
|
}
|
|
169
201
|
});
|
|
@@ -175,6 +207,7 @@ class Companies {
|
|
|
175
207
|
* @throws {@link Schematic.BadRequestError}
|
|
176
208
|
* @throws {@link Schematic.UnauthorizedError}
|
|
177
209
|
* @throws {@link Schematic.ForbiddenError}
|
|
210
|
+
* @throws {@link Schematic.NotFoundError}
|
|
178
211
|
* @throws {@link Schematic.InternalServerError}
|
|
179
212
|
*
|
|
180
213
|
* @example
|
|
@@ -185,12 +218,15 @@ class Companies {
|
|
|
185
218
|
* })
|
|
186
219
|
*/
|
|
187
220
|
upsertCompany(request, requestOptions) {
|
|
188
|
-
|
|
221
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertCompany(request, requestOptions));
|
|
222
|
+
}
|
|
223
|
+
__upsertCompany(request, requestOptions) {
|
|
189
224
|
return __awaiter(this, void 0, void 0, function* () {
|
|
225
|
+
var _a, _b, _c;
|
|
190
226
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
191
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
227
|
+
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, "companies"),
|
|
192
228
|
method: "POST",
|
|
193
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
229
|
+
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),
|
|
194
230
|
contentType: "application/json",
|
|
195
231
|
requestType: "json",
|
|
196
232
|
body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -199,13 +235,16 @@ class Companies {
|
|
|
199
235
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
200
236
|
});
|
|
201
237
|
if (_response.ok) {
|
|
202
|
-
return
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
238
|
+
return {
|
|
239
|
+
data: serializers.UpsertCompanyResponse.parseOrThrow(_response.body, {
|
|
240
|
+
unrecognizedObjectKeys: "passthrough",
|
|
241
|
+
allowUnrecognizedUnionMembers: true,
|
|
242
|
+
allowUnrecognizedEnumValues: true,
|
|
243
|
+
skipValidation: true,
|
|
244
|
+
breadcrumbsPrefix: ["response"],
|
|
245
|
+
}),
|
|
246
|
+
rawResponse: _response.rawResponse,
|
|
247
|
+
};
|
|
209
248
|
}
|
|
210
249
|
if (_response.error.reason === "status-code") {
|
|
211
250
|
switch (_response.error.statusCode) {
|
|
@@ -216,7 +255,7 @@ class Companies {
|
|
|
216
255
|
allowUnrecognizedEnumValues: true,
|
|
217
256
|
skipValidation: true,
|
|
218
257
|
breadcrumbsPrefix: ["response"],
|
|
219
|
-
}));
|
|
258
|
+
}), _response.rawResponse);
|
|
220
259
|
case 401:
|
|
221
260
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
222
261
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -224,7 +263,7 @@ class Companies {
|
|
|
224
263
|
allowUnrecognizedEnumValues: true,
|
|
225
264
|
skipValidation: true,
|
|
226
265
|
breadcrumbsPrefix: ["response"],
|
|
227
|
-
}));
|
|
266
|
+
}), _response.rawResponse);
|
|
228
267
|
case 403:
|
|
229
268
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
230
269
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -232,7 +271,15 @@ class Companies {
|
|
|
232
271
|
allowUnrecognizedEnumValues: true,
|
|
233
272
|
skipValidation: true,
|
|
234
273
|
breadcrumbsPrefix: ["response"],
|
|
235
|
-
}));
|
|
274
|
+
}), _response.rawResponse);
|
|
275
|
+
case 404:
|
|
276
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
277
|
+
unrecognizedObjectKeys: "passthrough",
|
|
278
|
+
allowUnrecognizedUnionMembers: true,
|
|
279
|
+
allowUnrecognizedEnumValues: true,
|
|
280
|
+
skipValidation: true,
|
|
281
|
+
breadcrumbsPrefix: ["response"],
|
|
282
|
+
}), _response.rawResponse);
|
|
236
283
|
case 500:
|
|
237
284
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
238
285
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -240,11 +287,12 @@ class Companies {
|
|
|
240
287
|
allowUnrecognizedEnumValues: true,
|
|
241
288
|
skipValidation: true,
|
|
242
289
|
breadcrumbsPrefix: ["response"],
|
|
243
|
-
}));
|
|
290
|
+
}), _response.rawResponse);
|
|
244
291
|
default:
|
|
245
292
|
throw new errors.SchematicError({
|
|
246
293
|
statusCode: _response.error.statusCode,
|
|
247
294
|
body: _response.error.body,
|
|
295
|
+
rawResponse: _response.rawResponse,
|
|
248
296
|
});
|
|
249
297
|
}
|
|
250
298
|
}
|
|
@@ -253,12 +301,14 @@ class Companies {
|
|
|
253
301
|
throw new errors.SchematicError({
|
|
254
302
|
statusCode: _response.error.statusCode,
|
|
255
303
|
body: _response.error.rawBody,
|
|
304
|
+
rawResponse: _response.rawResponse,
|
|
256
305
|
});
|
|
257
306
|
case "timeout":
|
|
258
|
-
throw new errors.SchematicTimeoutError();
|
|
307
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies.");
|
|
259
308
|
case "unknown":
|
|
260
309
|
throw new errors.SchematicError({
|
|
261
310
|
message: _response.error.errorMessage,
|
|
311
|
+
rawResponse: _response.rawResponse,
|
|
262
312
|
});
|
|
263
313
|
}
|
|
264
314
|
});
|
|
@@ -276,12 +326,15 @@ class Companies {
|
|
|
276
326
|
* await client.companies.getCompany("company_id")
|
|
277
327
|
*/
|
|
278
328
|
getCompany(companyId, requestOptions) {
|
|
279
|
-
|
|
329
|
+
return core.HttpResponsePromise.fromPromise(this.__getCompany(companyId, requestOptions));
|
|
330
|
+
}
|
|
331
|
+
__getCompany(companyId, requestOptions) {
|
|
280
332
|
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
var _a, _b, _c;
|
|
281
334
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
282
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
335
|
+
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, `companies/${encodeURIComponent(companyId)}`),
|
|
283
336
|
method: "GET",
|
|
284
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
337
|
+
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),
|
|
285
338
|
contentType: "application/json",
|
|
286
339
|
requestType: "json",
|
|
287
340
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -289,13 +342,16 @@ class Companies {
|
|
|
289
342
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
290
343
|
});
|
|
291
344
|
if (_response.ok) {
|
|
292
|
-
return
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
345
|
+
return {
|
|
346
|
+
data: serializers.GetCompanyResponse.parseOrThrow(_response.body, {
|
|
347
|
+
unrecognizedObjectKeys: "passthrough",
|
|
348
|
+
allowUnrecognizedUnionMembers: true,
|
|
349
|
+
allowUnrecognizedEnumValues: true,
|
|
350
|
+
skipValidation: true,
|
|
351
|
+
breadcrumbsPrefix: ["response"],
|
|
352
|
+
}),
|
|
353
|
+
rawResponse: _response.rawResponse,
|
|
354
|
+
};
|
|
299
355
|
}
|
|
300
356
|
if (_response.error.reason === "status-code") {
|
|
301
357
|
switch (_response.error.statusCode) {
|
|
@@ -306,7 +362,7 @@ class Companies {
|
|
|
306
362
|
allowUnrecognizedEnumValues: true,
|
|
307
363
|
skipValidation: true,
|
|
308
364
|
breadcrumbsPrefix: ["response"],
|
|
309
|
-
}));
|
|
365
|
+
}), _response.rawResponse);
|
|
310
366
|
case 403:
|
|
311
367
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
312
368
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -314,7 +370,7 @@ class Companies {
|
|
|
314
370
|
allowUnrecognizedEnumValues: true,
|
|
315
371
|
skipValidation: true,
|
|
316
372
|
breadcrumbsPrefix: ["response"],
|
|
317
|
-
}));
|
|
373
|
+
}), _response.rawResponse);
|
|
318
374
|
case 404:
|
|
319
375
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
320
376
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -322,7 +378,7 @@ class Companies {
|
|
|
322
378
|
allowUnrecognizedEnumValues: true,
|
|
323
379
|
skipValidation: true,
|
|
324
380
|
breadcrumbsPrefix: ["response"],
|
|
325
|
-
}));
|
|
381
|
+
}), _response.rawResponse);
|
|
326
382
|
case 500:
|
|
327
383
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
328
384
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -330,11 +386,12 @@ class Companies {
|
|
|
330
386
|
allowUnrecognizedEnumValues: true,
|
|
331
387
|
skipValidation: true,
|
|
332
388
|
breadcrumbsPrefix: ["response"],
|
|
333
|
-
}));
|
|
389
|
+
}), _response.rawResponse);
|
|
334
390
|
default:
|
|
335
391
|
throw new errors.SchematicError({
|
|
336
392
|
statusCode: _response.error.statusCode,
|
|
337
393
|
body: _response.error.body,
|
|
394
|
+
rawResponse: _response.rawResponse,
|
|
338
395
|
});
|
|
339
396
|
}
|
|
340
397
|
}
|
|
@@ -343,12 +400,14 @@ class Companies {
|
|
|
343
400
|
throw new errors.SchematicError({
|
|
344
401
|
statusCode: _response.error.statusCode,
|
|
345
402
|
body: _response.error.rawBody,
|
|
403
|
+
rawResponse: _response.rawResponse,
|
|
346
404
|
});
|
|
347
405
|
case "timeout":
|
|
348
|
-
throw new errors.SchematicTimeoutError();
|
|
406
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/{company_id}.");
|
|
349
407
|
case "unknown":
|
|
350
408
|
throw new errors.SchematicError({
|
|
351
409
|
message: _response.error.errorMessage,
|
|
410
|
+
rawResponse: _response.rawResponse,
|
|
352
411
|
});
|
|
353
412
|
}
|
|
354
413
|
});
|
|
@@ -360,18 +419,22 @@ class Companies {
|
|
|
360
419
|
* @throws {@link Schematic.BadRequestError}
|
|
361
420
|
* @throws {@link Schematic.UnauthorizedError}
|
|
362
421
|
* @throws {@link Schematic.ForbiddenError}
|
|
422
|
+
* @throws {@link Schematic.NotFoundError}
|
|
363
423
|
* @throws {@link Schematic.InternalServerError}
|
|
364
424
|
*
|
|
365
425
|
* @example
|
|
366
426
|
* await client.companies.deleteCompany("company_id")
|
|
367
427
|
*/
|
|
368
428
|
deleteCompany(companyId, requestOptions) {
|
|
369
|
-
|
|
429
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteCompany(companyId, requestOptions));
|
|
430
|
+
}
|
|
431
|
+
__deleteCompany(companyId, requestOptions) {
|
|
370
432
|
return __awaiter(this, void 0, void 0, function* () {
|
|
433
|
+
var _a, _b, _c;
|
|
371
434
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
372
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
435
|
+
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, `companies/${encodeURIComponent(companyId)}`),
|
|
373
436
|
method: "DELETE",
|
|
374
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
437
|
+
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),
|
|
375
438
|
contentType: "application/json",
|
|
376
439
|
requestType: "json",
|
|
377
440
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -379,13 +442,16 @@ class Companies {
|
|
|
379
442
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
380
443
|
});
|
|
381
444
|
if (_response.ok) {
|
|
382
|
-
return
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
445
|
+
return {
|
|
446
|
+
data: serializers.DeleteCompanyResponse.parseOrThrow(_response.body, {
|
|
447
|
+
unrecognizedObjectKeys: "passthrough",
|
|
448
|
+
allowUnrecognizedUnionMembers: true,
|
|
449
|
+
allowUnrecognizedEnumValues: true,
|
|
450
|
+
skipValidation: true,
|
|
451
|
+
breadcrumbsPrefix: ["response"],
|
|
452
|
+
}),
|
|
453
|
+
rawResponse: _response.rawResponse,
|
|
454
|
+
};
|
|
389
455
|
}
|
|
390
456
|
if (_response.error.reason === "status-code") {
|
|
391
457
|
switch (_response.error.statusCode) {
|
|
@@ -396,7 +462,7 @@ class Companies {
|
|
|
396
462
|
allowUnrecognizedEnumValues: true,
|
|
397
463
|
skipValidation: true,
|
|
398
464
|
breadcrumbsPrefix: ["response"],
|
|
399
|
-
}));
|
|
465
|
+
}), _response.rawResponse);
|
|
400
466
|
case 401:
|
|
401
467
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
402
468
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -404,7 +470,7 @@ class Companies {
|
|
|
404
470
|
allowUnrecognizedEnumValues: true,
|
|
405
471
|
skipValidation: true,
|
|
406
472
|
breadcrumbsPrefix: ["response"],
|
|
407
|
-
}));
|
|
473
|
+
}), _response.rawResponse);
|
|
408
474
|
case 403:
|
|
409
475
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
410
476
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -412,7 +478,15 @@ class Companies {
|
|
|
412
478
|
allowUnrecognizedEnumValues: true,
|
|
413
479
|
skipValidation: true,
|
|
414
480
|
breadcrumbsPrefix: ["response"],
|
|
415
|
-
}));
|
|
481
|
+
}), _response.rawResponse);
|
|
482
|
+
case 404:
|
|
483
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
484
|
+
unrecognizedObjectKeys: "passthrough",
|
|
485
|
+
allowUnrecognizedUnionMembers: true,
|
|
486
|
+
allowUnrecognizedEnumValues: true,
|
|
487
|
+
skipValidation: true,
|
|
488
|
+
breadcrumbsPrefix: ["response"],
|
|
489
|
+
}), _response.rawResponse);
|
|
416
490
|
case 500:
|
|
417
491
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
418
492
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -420,11 +494,12 @@ class Companies {
|
|
|
420
494
|
allowUnrecognizedEnumValues: true,
|
|
421
495
|
skipValidation: true,
|
|
422
496
|
breadcrumbsPrefix: ["response"],
|
|
423
|
-
}));
|
|
497
|
+
}), _response.rawResponse);
|
|
424
498
|
default:
|
|
425
499
|
throw new errors.SchematicError({
|
|
426
500
|
statusCode: _response.error.statusCode,
|
|
427
501
|
body: _response.error.body,
|
|
502
|
+
rawResponse: _response.rawResponse,
|
|
428
503
|
});
|
|
429
504
|
}
|
|
430
505
|
}
|
|
@@ -433,12 +508,14 @@ class Companies {
|
|
|
433
508
|
throw new errors.SchematicError({
|
|
434
509
|
statusCode: _response.error.statusCode,
|
|
435
510
|
body: _response.error.rawBody,
|
|
511
|
+
rawResponse: _response.rawResponse,
|
|
436
512
|
});
|
|
437
513
|
case "timeout":
|
|
438
|
-
throw new errors.SchematicTimeoutError();
|
|
514
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /companies/{company_id}.");
|
|
439
515
|
case "unknown":
|
|
440
516
|
throw new errors.SchematicError({
|
|
441
517
|
message: _response.error.errorMessage,
|
|
518
|
+
rawResponse: _response.rawResponse,
|
|
442
519
|
});
|
|
443
520
|
}
|
|
444
521
|
});
|
|
@@ -450,15 +527,19 @@ class Companies {
|
|
|
450
527
|
* @throws {@link Schematic.BadRequestError}
|
|
451
528
|
* @throws {@link Schematic.UnauthorizedError}
|
|
452
529
|
* @throws {@link Schematic.ForbiddenError}
|
|
530
|
+
* @throws {@link Schematic.NotFoundError}
|
|
453
531
|
* @throws {@link Schematic.InternalServerError}
|
|
454
532
|
*
|
|
455
533
|
* @example
|
|
456
534
|
* await client.companies.countCompanies()
|
|
457
535
|
*/
|
|
458
536
|
countCompanies(request = {}, requestOptions) {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
537
|
+
return core.HttpResponsePromise.fromPromise(this.__countCompanies(request, requestOptions));
|
|
538
|
+
}
|
|
539
|
+
__countCompanies() {
|
|
540
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
541
|
+
var _a, _b, _c;
|
|
542
|
+
const { ids, planId, q, withoutFeatureOverrideFor, withoutPlan, withSubscription, limit, offset } = request;
|
|
462
543
|
const _queryParams = {};
|
|
463
544
|
if (ids != null) {
|
|
464
545
|
if (Array.isArray(ids)) {
|
|
@@ -480,6 +561,9 @@ class Companies {
|
|
|
480
561
|
if (withoutPlan != null) {
|
|
481
562
|
_queryParams["without_plan"] = withoutPlan.toString();
|
|
482
563
|
}
|
|
564
|
+
if (withSubscription != null) {
|
|
565
|
+
_queryParams["with_subscription"] = withSubscription.toString();
|
|
566
|
+
}
|
|
483
567
|
if (limit != null) {
|
|
484
568
|
_queryParams["limit"] = limit.toString();
|
|
485
569
|
}
|
|
@@ -487,9 +571,9 @@ class Companies {
|
|
|
487
571
|
_queryParams["offset"] = offset.toString();
|
|
488
572
|
}
|
|
489
573
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
490
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
574
|
+
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, "companies/count"),
|
|
491
575
|
method: "GET",
|
|
492
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
576
|
+
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),
|
|
493
577
|
contentType: "application/json",
|
|
494
578
|
queryParameters: _queryParams,
|
|
495
579
|
requestType: "json",
|
|
@@ -498,13 +582,16 @@ class Companies {
|
|
|
498
582
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
499
583
|
});
|
|
500
584
|
if (_response.ok) {
|
|
501
|
-
return
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
585
|
+
return {
|
|
586
|
+
data: serializers.CountCompaniesResponse.parseOrThrow(_response.body, {
|
|
587
|
+
unrecognizedObjectKeys: "passthrough",
|
|
588
|
+
allowUnrecognizedUnionMembers: true,
|
|
589
|
+
allowUnrecognizedEnumValues: true,
|
|
590
|
+
skipValidation: true,
|
|
591
|
+
breadcrumbsPrefix: ["response"],
|
|
592
|
+
}),
|
|
593
|
+
rawResponse: _response.rawResponse,
|
|
594
|
+
};
|
|
508
595
|
}
|
|
509
596
|
if (_response.error.reason === "status-code") {
|
|
510
597
|
switch (_response.error.statusCode) {
|
|
@@ -515,7 +602,7 @@ class Companies {
|
|
|
515
602
|
allowUnrecognizedEnumValues: true,
|
|
516
603
|
skipValidation: true,
|
|
517
604
|
breadcrumbsPrefix: ["response"],
|
|
518
|
-
}));
|
|
605
|
+
}), _response.rawResponse);
|
|
519
606
|
case 401:
|
|
520
607
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
521
608
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -523,7 +610,7 @@ class Companies {
|
|
|
523
610
|
allowUnrecognizedEnumValues: true,
|
|
524
611
|
skipValidation: true,
|
|
525
612
|
breadcrumbsPrefix: ["response"],
|
|
526
|
-
}));
|
|
613
|
+
}), _response.rawResponse);
|
|
527
614
|
case 403:
|
|
528
615
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
529
616
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -531,7 +618,15 @@ class Companies {
|
|
|
531
618
|
allowUnrecognizedEnumValues: true,
|
|
532
619
|
skipValidation: true,
|
|
533
620
|
breadcrumbsPrefix: ["response"],
|
|
534
|
-
}));
|
|
621
|
+
}), _response.rawResponse);
|
|
622
|
+
case 404:
|
|
623
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
624
|
+
unrecognizedObjectKeys: "passthrough",
|
|
625
|
+
allowUnrecognizedUnionMembers: true,
|
|
626
|
+
allowUnrecognizedEnumValues: true,
|
|
627
|
+
skipValidation: true,
|
|
628
|
+
breadcrumbsPrefix: ["response"],
|
|
629
|
+
}), _response.rawResponse);
|
|
535
630
|
case 500:
|
|
536
631
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
537
632
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -539,11 +634,12 @@ class Companies {
|
|
|
539
634
|
allowUnrecognizedEnumValues: true,
|
|
540
635
|
skipValidation: true,
|
|
541
636
|
breadcrumbsPrefix: ["response"],
|
|
542
|
-
}));
|
|
637
|
+
}), _response.rawResponse);
|
|
543
638
|
default:
|
|
544
639
|
throw new errors.SchematicError({
|
|
545
640
|
statusCode: _response.error.statusCode,
|
|
546
641
|
body: _response.error.body,
|
|
642
|
+
rawResponse: _response.rawResponse,
|
|
547
643
|
});
|
|
548
644
|
}
|
|
549
645
|
}
|
|
@@ -552,12 +648,14 @@ class Companies {
|
|
|
552
648
|
throw new errors.SchematicError({
|
|
553
649
|
statusCode: _response.error.statusCode,
|
|
554
650
|
body: _response.error.rawBody,
|
|
651
|
+
rawResponse: _response.rawResponse,
|
|
555
652
|
});
|
|
556
653
|
case "timeout":
|
|
557
|
-
throw new errors.SchematicTimeoutError();
|
|
654
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/count.");
|
|
558
655
|
case "unknown":
|
|
559
656
|
throw new errors.SchematicError({
|
|
560
657
|
message: _response.error.errorMessage,
|
|
658
|
+
rawResponse: _response.rawResponse,
|
|
561
659
|
});
|
|
562
660
|
}
|
|
563
661
|
});
|
|
@@ -569,6 +667,7 @@ class Companies {
|
|
|
569
667
|
* @throws {@link Schematic.BadRequestError}
|
|
570
668
|
* @throws {@link Schematic.UnauthorizedError}
|
|
571
669
|
* @throws {@link Schematic.ForbiddenError}
|
|
670
|
+
* @throws {@link Schematic.NotFoundError}
|
|
572
671
|
* @throws {@link Schematic.InternalServerError}
|
|
573
672
|
*
|
|
574
673
|
* @example
|
|
@@ -579,12 +678,15 @@ class Companies {
|
|
|
579
678
|
* })
|
|
580
679
|
*/
|
|
581
680
|
createCompany(request, requestOptions) {
|
|
582
|
-
|
|
681
|
+
return core.HttpResponsePromise.fromPromise(this.__createCompany(request, requestOptions));
|
|
682
|
+
}
|
|
683
|
+
__createCompany(request, requestOptions) {
|
|
583
684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
685
|
+
var _a, _b, _c;
|
|
584
686
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
585
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
687
|
+
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, "companies/create"),
|
|
586
688
|
method: "POST",
|
|
587
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
689
|
+
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),
|
|
588
690
|
contentType: "application/json",
|
|
589
691
|
requestType: "json",
|
|
590
692
|
body: serializers.UpsertCompanyRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -593,13 +695,16 @@ class Companies {
|
|
|
593
695
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
594
696
|
});
|
|
595
697
|
if (_response.ok) {
|
|
596
|
-
return
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
698
|
+
return {
|
|
699
|
+
data: serializers.CreateCompanyResponse.parseOrThrow(_response.body, {
|
|
700
|
+
unrecognizedObjectKeys: "passthrough",
|
|
701
|
+
allowUnrecognizedUnionMembers: true,
|
|
702
|
+
allowUnrecognizedEnumValues: true,
|
|
703
|
+
skipValidation: true,
|
|
704
|
+
breadcrumbsPrefix: ["response"],
|
|
705
|
+
}),
|
|
706
|
+
rawResponse: _response.rawResponse,
|
|
707
|
+
};
|
|
603
708
|
}
|
|
604
709
|
if (_response.error.reason === "status-code") {
|
|
605
710
|
switch (_response.error.statusCode) {
|
|
@@ -610,7 +715,7 @@ class Companies {
|
|
|
610
715
|
allowUnrecognizedEnumValues: true,
|
|
611
716
|
skipValidation: true,
|
|
612
717
|
breadcrumbsPrefix: ["response"],
|
|
613
|
-
}));
|
|
718
|
+
}), _response.rawResponse);
|
|
614
719
|
case 401:
|
|
615
720
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
616
721
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -618,7 +723,7 @@ class Companies {
|
|
|
618
723
|
allowUnrecognizedEnumValues: true,
|
|
619
724
|
skipValidation: true,
|
|
620
725
|
breadcrumbsPrefix: ["response"],
|
|
621
|
-
}));
|
|
726
|
+
}), _response.rawResponse);
|
|
622
727
|
case 403:
|
|
623
728
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
624
729
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -626,7 +731,15 @@ class Companies {
|
|
|
626
731
|
allowUnrecognizedEnumValues: true,
|
|
627
732
|
skipValidation: true,
|
|
628
733
|
breadcrumbsPrefix: ["response"],
|
|
629
|
-
}));
|
|
734
|
+
}), _response.rawResponse);
|
|
735
|
+
case 404:
|
|
736
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
737
|
+
unrecognizedObjectKeys: "passthrough",
|
|
738
|
+
allowUnrecognizedUnionMembers: true,
|
|
739
|
+
allowUnrecognizedEnumValues: true,
|
|
740
|
+
skipValidation: true,
|
|
741
|
+
breadcrumbsPrefix: ["response"],
|
|
742
|
+
}), _response.rawResponse);
|
|
630
743
|
case 500:
|
|
631
744
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
632
745
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -634,11 +747,12 @@ class Companies {
|
|
|
634
747
|
allowUnrecognizedEnumValues: true,
|
|
635
748
|
skipValidation: true,
|
|
636
749
|
breadcrumbsPrefix: ["response"],
|
|
637
|
-
}));
|
|
750
|
+
}), _response.rawResponse);
|
|
638
751
|
default:
|
|
639
752
|
throw new errors.SchematicError({
|
|
640
753
|
statusCode: _response.error.statusCode,
|
|
641
754
|
body: _response.error.body,
|
|
755
|
+
rawResponse: _response.rawResponse,
|
|
642
756
|
});
|
|
643
757
|
}
|
|
644
758
|
}
|
|
@@ -647,12 +761,14 @@ class Companies {
|
|
|
647
761
|
throw new errors.SchematicError({
|
|
648
762
|
statusCode: _response.error.statusCode,
|
|
649
763
|
body: _response.error.rawBody,
|
|
764
|
+
rawResponse: _response.rawResponse,
|
|
650
765
|
});
|
|
651
766
|
case "timeout":
|
|
652
|
-
throw new errors.SchematicTimeoutError();
|
|
767
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/create.");
|
|
653
768
|
case "unknown":
|
|
654
769
|
throw new errors.SchematicError({
|
|
655
770
|
message: _response.error.errorMessage,
|
|
771
|
+
rawResponse: _response.rawResponse,
|
|
656
772
|
});
|
|
657
773
|
}
|
|
658
774
|
});
|
|
@@ -664,6 +780,7 @@ class Companies {
|
|
|
664
780
|
* @throws {@link Schematic.BadRequestError}
|
|
665
781
|
* @throws {@link Schematic.UnauthorizedError}
|
|
666
782
|
* @throws {@link Schematic.ForbiddenError}
|
|
783
|
+
* @throws {@link Schematic.NotFoundError}
|
|
667
784
|
* @throws {@link Schematic.InternalServerError}
|
|
668
785
|
*
|
|
669
786
|
* @example
|
|
@@ -674,12 +791,15 @@ class Companies {
|
|
|
674
791
|
* })
|
|
675
792
|
*/
|
|
676
793
|
deleteCompanyByKeys(request, requestOptions) {
|
|
677
|
-
|
|
794
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteCompanyByKeys(request, requestOptions));
|
|
795
|
+
}
|
|
796
|
+
__deleteCompanyByKeys(request, requestOptions) {
|
|
678
797
|
return __awaiter(this, void 0, void 0, function* () {
|
|
798
|
+
var _a, _b, _c;
|
|
679
799
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
680
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
800
|
+
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, "companies/delete"),
|
|
681
801
|
method: "POST",
|
|
682
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
802
|
+
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),
|
|
683
803
|
contentType: "application/json",
|
|
684
804
|
requestType: "json",
|
|
685
805
|
body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -688,13 +808,16 @@ class Companies {
|
|
|
688
808
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
689
809
|
});
|
|
690
810
|
if (_response.ok) {
|
|
691
|
-
return
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
811
|
+
return {
|
|
812
|
+
data: serializers.DeleteCompanyByKeysResponse.parseOrThrow(_response.body, {
|
|
813
|
+
unrecognizedObjectKeys: "passthrough",
|
|
814
|
+
allowUnrecognizedUnionMembers: true,
|
|
815
|
+
allowUnrecognizedEnumValues: true,
|
|
816
|
+
skipValidation: true,
|
|
817
|
+
breadcrumbsPrefix: ["response"],
|
|
818
|
+
}),
|
|
819
|
+
rawResponse: _response.rawResponse,
|
|
820
|
+
};
|
|
698
821
|
}
|
|
699
822
|
if (_response.error.reason === "status-code") {
|
|
700
823
|
switch (_response.error.statusCode) {
|
|
@@ -705,7 +828,7 @@ class Companies {
|
|
|
705
828
|
allowUnrecognizedEnumValues: true,
|
|
706
829
|
skipValidation: true,
|
|
707
830
|
breadcrumbsPrefix: ["response"],
|
|
708
|
-
}));
|
|
831
|
+
}), _response.rawResponse);
|
|
709
832
|
case 401:
|
|
710
833
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
711
834
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -713,7 +836,7 @@ class Companies {
|
|
|
713
836
|
allowUnrecognizedEnumValues: true,
|
|
714
837
|
skipValidation: true,
|
|
715
838
|
breadcrumbsPrefix: ["response"],
|
|
716
|
-
}));
|
|
839
|
+
}), _response.rawResponse);
|
|
717
840
|
case 403:
|
|
718
841
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
719
842
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -721,7 +844,15 @@ class Companies {
|
|
|
721
844
|
allowUnrecognizedEnumValues: true,
|
|
722
845
|
skipValidation: true,
|
|
723
846
|
breadcrumbsPrefix: ["response"],
|
|
724
|
-
}));
|
|
847
|
+
}), _response.rawResponse);
|
|
848
|
+
case 404:
|
|
849
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
850
|
+
unrecognizedObjectKeys: "passthrough",
|
|
851
|
+
allowUnrecognizedUnionMembers: true,
|
|
852
|
+
allowUnrecognizedEnumValues: true,
|
|
853
|
+
skipValidation: true,
|
|
854
|
+
breadcrumbsPrefix: ["response"],
|
|
855
|
+
}), _response.rawResponse);
|
|
725
856
|
case 500:
|
|
726
857
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
727
858
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -729,11 +860,12 @@ class Companies {
|
|
|
729
860
|
allowUnrecognizedEnumValues: true,
|
|
730
861
|
skipValidation: true,
|
|
731
862
|
breadcrumbsPrefix: ["response"],
|
|
732
|
-
}));
|
|
863
|
+
}), _response.rawResponse);
|
|
733
864
|
default:
|
|
734
865
|
throw new errors.SchematicError({
|
|
735
866
|
statusCode: _response.error.statusCode,
|
|
736
867
|
body: _response.error.body,
|
|
868
|
+
rawResponse: _response.rawResponse,
|
|
737
869
|
});
|
|
738
870
|
}
|
|
739
871
|
}
|
|
@@ -742,12 +874,14 @@ class Companies {
|
|
|
742
874
|
throw new errors.SchematicError({
|
|
743
875
|
statusCode: _response.error.statusCode,
|
|
744
876
|
body: _response.error.rawBody,
|
|
877
|
+
rawResponse: _response.rawResponse,
|
|
745
878
|
});
|
|
746
879
|
case "timeout":
|
|
747
|
-
throw new errors.SchematicTimeoutError();
|
|
880
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /companies/delete.");
|
|
748
881
|
case "unknown":
|
|
749
882
|
throw new errors.SchematicError({
|
|
750
883
|
message: _response.error.errorMessage,
|
|
884
|
+
rawResponse: _response.rawResponse,
|
|
751
885
|
});
|
|
752
886
|
}
|
|
753
887
|
});
|
|
@@ -764,22 +898,23 @@ class Companies {
|
|
|
764
898
|
* @example
|
|
765
899
|
* await client.companies.lookupCompany({
|
|
766
900
|
* keys: {
|
|
767
|
-
* "keys":
|
|
768
|
-
* "key": "value"
|
|
769
|
-
* }
|
|
901
|
+
* "keys": "keys"
|
|
770
902
|
* }
|
|
771
903
|
* })
|
|
772
904
|
*/
|
|
773
905
|
lookupCompany(request, requestOptions) {
|
|
774
|
-
|
|
906
|
+
return core.HttpResponsePromise.fromPromise(this.__lookupCompany(request, requestOptions));
|
|
907
|
+
}
|
|
908
|
+
__lookupCompany(request, requestOptions) {
|
|
775
909
|
return __awaiter(this, void 0, void 0, function* () {
|
|
910
|
+
var _a, _b, _c;
|
|
776
911
|
const { keys } = request;
|
|
777
912
|
const _queryParams = {};
|
|
778
|
-
_queryParams["keys"] =
|
|
913
|
+
_queryParams["keys"] = (0, json_1.toJson)(keys);
|
|
779
914
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
780
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
915
|
+
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, "companies/lookup"),
|
|
781
916
|
method: "GET",
|
|
782
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
917
|
+
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),
|
|
783
918
|
contentType: "application/json",
|
|
784
919
|
queryParameters: _queryParams,
|
|
785
920
|
requestType: "json",
|
|
@@ -788,13 +923,16 @@ class Companies {
|
|
|
788
923
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
789
924
|
});
|
|
790
925
|
if (_response.ok) {
|
|
791
|
-
return
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
926
|
+
return {
|
|
927
|
+
data: serializers.LookupCompanyResponse.parseOrThrow(_response.body, {
|
|
928
|
+
unrecognizedObjectKeys: "passthrough",
|
|
929
|
+
allowUnrecognizedUnionMembers: true,
|
|
930
|
+
allowUnrecognizedEnumValues: true,
|
|
931
|
+
skipValidation: true,
|
|
932
|
+
breadcrumbsPrefix: ["response"],
|
|
933
|
+
}),
|
|
934
|
+
rawResponse: _response.rawResponse,
|
|
935
|
+
};
|
|
798
936
|
}
|
|
799
937
|
if (_response.error.reason === "status-code") {
|
|
800
938
|
switch (_response.error.statusCode) {
|
|
@@ -805,7 +943,7 @@ class Companies {
|
|
|
805
943
|
allowUnrecognizedEnumValues: true,
|
|
806
944
|
skipValidation: true,
|
|
807
945
|
breadcrumbsPrefix: ["response"],
|
|
808
|
-
}));
|
|
946
|
+
}), _response.rawResponse);
|
|
809
947
|
case 403:
|
|
810
948
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
811
949
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -813,7 +951,7 @@ class Companies {
|
|
|
813
951
|
allowUnrecognizedEnumValues: true,
|
|
814
952
|
skipValidation: true,
|
|
815
953
|
breadcrumbsPrefix: ["response"],
|
|
816
|
-
}));
|
|
954
|
+
}), _response.rawResponse);
|
|
817
955
|
case 404:
|
|
818
956
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
819
957
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -821,7 +959,7 @@ class Companies {
|
|
|
821
959
|
allowUnrecognizedEnumValues: true,
|
|
822
960
|
skipValidation: true,
|
|
823
961
|
breadcrumbsPrefix: ["response"],
|
|
824
|
-
}));
|
|
962
|
+
}), _response.rawResponse);
|
|
825
963
|
case 500:
|
|
826
964
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
827
965
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -829,11 +967,12 @@ class Companies {
|
|
|
829
967
|
allowUnrecognizedEnumValues: true,
|
|
830
968
|
skipValidation: true,
|
|
831
969
|
breadcrumbsPrefix: ["response"],
|
|
832
|
-
}));
|
|
970
|
+
}), _response.rawResponse);
|
|
833
971
|
default:
|
|
834
972
|
throw new errors.SchematicError({
|
|
835
973
|
statusCode: _response.error.statusCode,
|
|
836
974
|
body: _response.error.body,
|
|
975
|
+
rawResponse: _response.rawResponse,
|
|
837
976
|
});
|
|
838
977
|
}
|
|
839
978
|
}
|
|
@@ -842,12 +981,14 @@ class Companies {
|
|
|
842
981
|
throw new errors.SchematicError({
|
|
843
982
|
statusCode: _response.error.statusCode,
|
|
844
983
|
body: _response.error.rawBody,
|
|
984
|
+
rawResponse: _response.rawResponse,
|
|
845
985
|
});
|
|
846
986
|
case "timeout":
|
|
847
|
-
throw new errors.SchematicTimeoutError();
|
|
987
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /companies/lookup.");
|
|
848
988
|
case "unknown":
|
|
849
989
|
throw new errors.SchematicError({
|
|
850
990
|
message: _response.error.errorMessage,
|
|
991
|
+
rawResponse: _response.rawResponse,
|
|
851
992
|
});
|
|
852
993
|
}
|
|
853
994
|
});
|
|
@@ -859,6 +1000,7 @@ class Companies {
|
|
|
859
1000
|
* @throws {@link Schematic.BadRequestError}
|
|
860
1001
|
* @throws {@link Schematic.UnauthorizedError}
|
|
861
1002
|
* @throws {@link Schematic.ForbiddenError}
|
|
1003
|
+
* @throws {@link Schematic.NotFoundError}
|
|
862
1004
|
* @throws {@link Schematic.InternalServerError}
|
|
863
1005
|
*
|
|
864
1006
|
* @example
|
|
@@ -868,8 +1010,11 @@ class Companies {
|
|
|
868
1010
|
* })
|
|
869
1011
|
*/
|
|
870
1012
|
getActiveDeals(request, requestOptions) {
|
|
871
|
-
|
|
1013
|
+
return core.HttpResponsePromise.fromPromise(this.__getActiveDeals(request, requestOptions));
|
|
1014
|
+
}
|
|
1015
|
+
__getActiveDeals(request, requestOptions) {
|
|
872
1016
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1017
|
+
var _a, _b, _c;
|
|
873
1018
|
const { companyId, dealStage, limit, offset } = request;
|
|
874
1019
|
const _queryParams = {};
|
|
875
1020
|
_queryParams["company_id"] = companyId;
|
|
@@ -881,9 +1026,9 @@ class Companies {
|
|
|
881
1026
|
_queryParams["offset"] = offset.toString();
|
|
882
1027
|
}
|
|
883
1028
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
884
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1029
|
+
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-crm-deals"),
|
|
885
1030
|
method: "GET",
|
|
886
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1031
|
+
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),
|
|
887
1032
|
contentType: "application/json",
|
|
888
1033
|
queryParameters: _queryParams,
|
|
889
1034
|
requestType: "json",
|
|
@@ -892,13 +1037,16 @@ class Companies {
|
|
|
892
1037
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
893
1038
|
});
|
|
894
1039
|
if (_response.ok) {
|
|
895
|
-
return
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
1040
|
+
return {
|
|
1041
|
+
data: serializers.GetActiveDealsResponse.parseOrThrow(_response.body, {
|
|
1042
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1043
|
+
allowUnrecognizedUnionMembers: true,
|
|
1044
|
+
allowUnrecognizedEnumValues: true,
|
|
1045
|
+
skipValidation: true,
|
|
1046
|
+
breadcrumbsPrefix: ["response"],
|
|
1047
|
+
}),
|
|
1048
|
+
rawResponse: _response.rawResponse,
|
|
1049
|
+
};
|
|
902
1050
|
}
|
|
903
1051
|
if (_response.error.reason === "status-code") {
|
|
904
1052
|
switch (_response.error.statusCode) {
|
|
@@ -909,7 +1057,7 @@ class Companies {
|
|
|
909
1057
|
allowUnrecognizedEnumValues: true,
|
|
910
1058
|
skipValidation: true,
|
|
911
1059
|
breadcrumbsPrefix: ["response"],
|
|
912
|
-
}));
|
|
1060
|
+
}), _response.rawResponse);
|
|
913
1061
|
case 401:
|
|
914
1062
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
915
1063
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -917,7 +1065,7 @@ class Companies {
|
|
|
917
1065
|
allowUnrecognizedEnumValues: true,
|
|
918
1066
|
skipValidation: true,
|
|
919
1067
|
breadcrumbsPrefix: ["response"],
|
|
920
|
-
}));
|
|
1068
|
+
}), _response.rawResponse);
|
|
921
1069
|
case 403:
|
|
922
1070
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
923
1071
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -925,7 +1073,15 @@ class Companies {
|
|
|
925
1073
|
allowUnrecognizedEnumValues: true,
|
|
926
1074
|
skipValidation: true,
|
|
927
1075
|
breadcrumbsPrefix: ["response"],
|
|
928
|
-
}));
|
|
1076
|
+
}), _response.rawResponse);
|
|
1077
|
+
case 404:
|
|
1078
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1079
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1080
|
+
allowUnrecognizedUnionMembers: true,
|
|
1081
|
+
allowUnrecognizedEnumValues: true,
|
|
1082
|
+
skipValidation: true,
|
|
1083
|
+
breadcrumbsPrefix: ["response"],
|
|
1084
|
+
}), _response.rawResponse);
|
|
929
1085
|
case 500:
|
|
930
1086
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
931
1087
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -933,11 +1089,12 @@ class Companies {
|
|
|
933
1089
|
allowUnrecognizedEnumValues: true,
|
|
934
1090
|
skipValidation: true,
|
|
935
1091
|
breadcrumbsPrefix: ["response"],
|
|
936
|
-
}));
|
|
1092
|
+
}), _response.rawResponse);
|
|
937
1093
|
default:
|
|
938
1094
|
throw new errors.SchematicError({
|
|
939
1095
|
statusCode: _response.error.statusCode,
|
|
940
1096
|
body: _response.error.body,
|
|
1097
|
+
rawResponse: _response.rawResponse,
|
|
941
1098
|
});
|
|
942
1099
|
}
|
|
943
1100
|
}
|
|
@@ -946,12 +1103,14 @@ class Companies {
|
|
|
946
1103
|
throw new errors.SchematicError({
|
|
947
1104
|
statusCode: _response.error.statusCode,
|
|
948
1105
|
body: _response.error.rawBody,
|
|
1106
|
+
rawResponse: _response.rawResponse,
|
|
949
1107
|
});
|
|
950
1108
|
case "timeout":
|
|
951
|
-
throw new errors.SchematicTimeoutError();
|
|
1109
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-crm-deals.");
|
|
952
1110
|
case "unknown":
|
|
953
1111
|
throw new errors.SchematicError({
|
|
954
1112
|
message: _response.error.errorMessage,
|
|
1113
|
+
rawResponse: _response.rawResponse,
|
|
955
1114
|
});
|
|
956
1115
|
}
|
|
957
1116
|
});
|
|
@@ -963,14 +1122,18 @@ class Companies {
|
|
|
963
1122
|
* @throws {@link Schematic.BadRequestError}
|
|
964
1123
|
* @throws {@link Schematic.UnauthorizedError}
|
|
965
1124
|
* @throws {@link Schematic.ForbiddenError}
|
|
1125
|
+
* @throws {@link Schematic.NotFoundError}
|
|
966
1126
|
* @throws {@link Schematic.InternalServerError}
|
|
967
1127
|
*
|
|
968
1128
|
* @example
|
|
969
1129
|
* await client.companies.listCompanyMemberships()
|
|
970
1130
|
*/
|
|
971
1131
|
listCompanyMemberships(request = {}, requestOptions) {
|
|
972
|
-
|
|
973
|
-
|
|
1132
|
+
return core.HttpResponsePromise.fromPromise(this.__listCompanyMemberships(request, requestOptions));
|
|
1133
|
+
}
|
|
1134
|
+
__listCompanyMemberships() {
|
|
1135
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1136
|
+
var _a, _b, _c;
|
|
974
1137
|
const { companyId, userId, limit, offset } = request;
|
|
975
1138
|
const _queryParams = {};
|
|
976
1139
|
if (companyId != null) {
|
|
@@ -986,9 +1149,9 @@ class Companies {
|
|
|
986
1149
|
_queryParams["offset"] = offset.toString();
|
|
987
1150
|
}
|
|
988
1151
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
989
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1152
|
+
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-memberships"),
|
|
990
1153
|
method: "GET",
|
|
991
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1154
|
+
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),
|
|
992
1155
|
contentType: "application/json",
|
|
993
1156
|
queryParameters: _queryParams,
|
|
994
1157
|
requestType: "json",
|
|
@@ -997,13 +1160,16 @@ class Companies {
|
|
|
997
1160
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
998
1161
|
});
|
|
999
1162
|
if (_response.ok) {
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1163
|
+
return {
|
|
1164
|
+
data: serializers.ListCompanyMembershipsResponse.parseOrThrow(_response.body, {
|
|
1165
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1166
|
+
allowUnrecognizedUnionMembers: true,
|
|
1167
|
+
allowUnrecognizedEnumValues: true,
|
|
1168
|
+
skipValidation: true,
|
|
1169
|
+
breadcrumbsPrefix: ["response"],
|
|
1170
|
+
}),
|
|
1171
|
+
rawResponse: _response.rawResponse,
|
|
1172
|
+
};
|
|
1007
1173
|
}
|
|
1008
1174
|
if (_response.error.reason === "status-code") {
|
|
1009
1175
|
switch (_response.error.statusCode) {
|
|
@@ -1014,7 +1180,7 @@ class Companies {
|
|
|
1014
1180
|
allowUnrecognizedEnumValues: true,
|
|
1015
1181
|
skipValidation: true,
|
|
1016
1182
|
breadcrumbsPrefix: ["response"],
|
|
1017
|
-
}));
|
|
1183
|
+
}), _response.rawResponse);
|
|
1018
1184
|
case 401:
|
|
1019
1185
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1020
1186
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1022,7 +1188,7 @@ class Companies {
|
|
|
1022
1188
|
allowUnrecognizedEnumValues: true,
|
|
1023
1189
|
skipValidation: true,
|
|
1024
1190
|
breadcrumbsPrefix: ["response"],
|
|
1025
|
-
}));
|
|
1191
|
+
}), _response.rawResponse);
|
|
1026
1192
|
case 403:
|
|
1027
1193
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1028
1194
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1030,7 +1196,15 @@ class Companies {
|
|
|
1030
1196
|
allowUnrecognizedEnumValues: true,
|
|
1031
1197
|
skipValidation: true,
|
|
1032
1198
|
breadcrumbsPrefix: ["response"],
|
|
1033
|
-
}));
|
|
1199
|
+
}), _response.rawResponse);
|
|
1200
|
+
case 404:
|
|
1201
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1202
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1203
|
+
allowUnrecognizedUnionMembers: true,
|
|
1204
|
+
allowUnrecognizedEnumValues: true,
|
|
1205
|
+
skipValidation: true,
|
|
1206
|
+
breadcrumbsPrefix: ["response"],
|
|
1207
|
+
}), _response.rawResponse);
|
|
1034
1208
|
case 500:
|
|
1035
1209
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1036
1210
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1038,11 +1212,12 @@ class Companies {
|
|
|
1038
1212
|
allowUnrecognizedEnumValues: true,
|
|
1039
1213
|
skipValidation: true,
|
|
1040
1214
|
breadcrumbsPrefix: ["response"],
|
|
1041
|
-
}));
|
|
1215
|
+
}), _response.rawResponse);
|
|
1042
1216
|
default:
|
|
1043
1217
|
throw new errors.SchematicError({
|
|
1044
1218
|
statusCode: _response.error.statusCode,
|
|
1045
1219
|
body: _response.error.body,
|
|
1220
|
+
rawResponse: _response.rawResponse,
|
|
1046
1221
|
});
|
|
1047
1222
|
}
|
|
1048
1223
|
}
|
|
@@ -1051,12 +1226,14 @@ class Companies {
|
|
|
1051
1226
|
throw new errors.SchematicError({
|
|
1052
1227
|
statusCode: _response.error.statusCode,
|
|
1053
1228
|
body: _response.error.rawBody,
|
|
1229
|
+
rawResponse: _response.rawResponse,
|
|
1054
1230
|
});
|
|
1055
1231
|
case "timeout":
|
|
1056
|
-
throw new errors.SchematicTimeoutError();
|
|
1232
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-memberships.");
|
|
1057
1233
|
case "unknown":
|
|
1058
1234
|
throw new errors.SchematicError({
|
|
1059
1235
|
message: _response.error.errorMessage,
|
|
1236
|
+
rawResponse: _response.rawResponse,
|
|
1060
1237
|
});
|
|
1061
1238
|
}
|
|
1062
1239
|
});
|
|
@@ -1068,6 +1245,7 @@ class Companies {
|
|
|
1068
1245
|
* @throws {@link Schematic.BadRequestError}
|
|
1069
1246
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1070
1247
|
* @throws {@link Schematic.ForbiddenError}
|
|
1248
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1071
1249
|
* @throws {@link Schematic.InternalServerError}
|
|
1072
1250
|
*
|
|
1073
1251
|
* @example
|
|
@@ -1077,12 +1255,15 @@ class Companies {
|
|
|
1077
1255
|
* })
|
|
1078
1256
|
*/
|
|
1079
1257
|
getOrCreateCompanyMembership(request, requestOptions) {
|
|
1080
|
-
|
|
1258
|
+
return core.HttpResponsePromise.fromPromise(this.__getOrCreateCompanyMembership(request, requestOptions));
|
|
1259
|
+
}
|
|
1260
|
+
__getOrCreateCompanyMembership(request, requestOptions) {
|
|
1081
1261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1262
|
+
var _a, _b, _c;
|
|
1082
1263
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1083
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1264
|
+
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-memberships"),
|
|
1084
1265
|
method: "POST",
|
|
1085
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1266
|
+
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),
|
|
1086
1267
|
contentType: "application/json",
|
|
1087
1268
|
requestType: "json",
|
|
1088
1269
|
body: serializers.GetOrCreateCompanyMembershipRequestBody.jsonOrThrow(request, {
|
|
@@ -1093,13 +1274,16 @@ class Companies {
|
|
|
1093
1274
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1094
1275
|
});
|
|
1095
1276
|
if (_response.ok) {
|
|
1096
|
-
return
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1277
|
+
return {
|
|
1278
|
+
data: serializers.GetOrCreateCompanyMembershipResponse.parseOrThrow(_response.body, {
|
|
1279
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1280
|
+
allowUnrecognizedUnionMembers: true,
|
|
1281
|
+
allowUnrecognizedEnumValues: true,
|
|
1282
|
+
skipValidation: true,
|
|
1283
|
+
breadcrumbsPrefix: ["response"],
|
|
1284
|
+
}),
|
|
1285
|
+
rawResponse: _response.rawResponse,
|
|
1286
|
+
};
|
|
1103
1287
|
}
|
|
1104
1288
|
if (_response.error.reason === "status-code") {
|
|
1105
1289
|
switch (_response.error.statusCode) {
|
|
@@ -1110,7 +1294,7 @@ class Companies {
|
|
|
1110
1294
|
allowUnrecognizedEnumValues: true,
|
|
1111
1295
|
skipValidation: true,
|
|
1112
1296
|
breadcrumbsPrefix: ["response"],
|
|
1113
|
-
}));
|
|
1297
|
+
}), _response.rawResponse);
|
|
1114
1298
|
case 401:
|
|
1115
1299
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1116
1300
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1118,7 +1302,7 @@ class Companies {
|
|
|
1118
1302
|
allowUnrecognizedEnumValues: true,
|
|
1119
1303
|
skipValidation: true,
|
|
1120
1304
|
breadcrumbsPrefix: ["response"],
|
|
1121
|
-
}));
|
|
1305
|
+
}), _response.rawResponse);
|
|
1122
1306
|
case 403:
|
|
1123
1307
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1124
1308
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1126,7 +1310,15 @@ class Companies {
|
|
|
1126
1310
|
allowUnrecognizedEnumValues: true,
|
|
1127
1311
|
skipValidation: true,
|
|
1128
1312
|
breadcrumbsPrefix: ["response"],
|
|
1129
|
-
}));
|
|
1313
|
+
}), _response.rawResponse);
|
|
1314
|
+
case 404:
|
|
1315
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1316
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1317
|
+
allowUnrecognizedUnionMembers: true,
|
|
1318
|
+
allowUnrecognizedEnumValues: true,
|
|
1319
|
+
skipValidation: true,
|
|
1320
|
+
breadcrumbsPrefix: ["response"],
|
|
1321
|
+
}), _response.rawResponse);
|
|
1130
1322
|
case 500:
|
|
1131
1323
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1132
1324
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1134,11 +1326,12 @@ class Companies {
|
|
|
1134
1326
|
allowUnrecognizedEnumValues: true,
|
|
1135
1327
|
skipValidation: true,
|
|
1136
1328
|
breadcrumbsPrefix: ["response"],
|
|
1137
|
-
}));
|
|
1329
|
+
}), _response.rawResponse);
|
|
1138
1330
|
default:
|
|
1139
1331
|
throw new errors.SchematicError({
|
|
1140
1332
|
statusCode: _response.error.statusCode,
|
|
1141
1333
|
body: _response.error.body,
|
|
1334
|
+
rawResponse: _response.rawResponse,
|
|
1142
1335
|
});
|
|
1143
1336
|
}
|
|
1144
1337
|
}
|
|
@@ -1147,12 +1340,14 @@ class Companies {
|
|
|
1147
1340
|
throw new errors.SchematicError({
|
|
1148
1341
|
statusCode: _response.error.statusCode,
|
|
1149
1342
|
body: _response.error.rawBody,
|
|
1343
|
+
rawResponse: _response.rawResponse,
|
|
1150
1344
|
});
|
|
1151
1345
|
case "timeout":
|
|
1152
|
-
throw new errors.SchematicTimeoutError();
|
|
1346
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-memberships.");
|
|
1153
1347
|
case "unknown":
|
|
1154
1348
|
throw new errors.SchematicError({
|
|
1155
1349
|
message: _response.error.errorMessage,
|
|
1350
|
+
rawResponse: _response.rawResponse,
|
|
1156
1351
|
});
|
|
1157
1352
|
}
|
|
1158
1353
|
});
|
|
@@ -1164,18 +1359,22 @@ class Companies {
|
|
|
1164
1359
|
* @throws {@link Schematic.BadRequestError}
|
|
1165
1360
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1166
1361
|
* @throws {@link Schematic.ForbiddenError}
|
|
1362
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1167
1363
|
* @throws {@link Schematic.InternalServerError}
|
|
1168
1364
|
*
|
|
1169
1365
|
* @example
|
|
1170
1366
|
* await client.companies.deleteCompanyMembership("company_membership_id")
|
|
1171
1367
|
*/
|
|
1172
1368
|
deleteCompanyMembership(companyMembershipId, requestOptions) {
|
|
1173
|
-
|
|
1369
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteCompanyMembership(companyMembershipId, requestOptions));
|
|
1370
|
+
}
|
|
1371
|
+
__deleteCompanyMembership(companyMembershipId, requestOptions) {
|
|
1174
1372
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1373
|
+
var _a, _b, _c;
|
|
1175
1374
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1176
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1375
|
+
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-memberships/${encodeURIComponent(companyMembershipId)}`),
|
|
1177
1376
|
method: "DELETE",
|
|
1178
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1377
|
+
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),
|
|
1179
1378
|
contentType: "application/json",
|
|
1180
1379
|
requestType: "json",
|
|
1181
1380
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1183,13 +1382,16 @@ class Companies {
|
|
|
1183
1382
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1184
1383
|
});
|
|
1185
1384
|
if (_response.ok) {
|
|
1186
|
-
return
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1385
|
+
return {
|
|
1386
|
+
data: serializers.DeleteCompanyMembershipResponse.parseOrThrow(_response.body, {
|
|
1387
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1388
|
+
allowUnrecognizedUnionMembers: true,
|
|
1389
|
+
allowUnrecognizedEnumValues: true,
|
|
1390
|
+
skipValidation: true,
|
|
1391
|
+
breadcrumbsPrefix: ["response"],
|
|
1392
|
+
}),
|
|
1393
|
+
rawResponse: _response.rawResponse,
|
|
1394
|
+
};
|
|
1193
1395
|
}
|
|
1194
1396
|
if (_response.error.reason === "status-code") {
|
|
1195
1397
|
switch (_response.error.statusCode) {
|
|
@@ -1200,7 +1402,7 @@ class Companies {
|
|
|
1200
1402
|
allowUnrecognizedEnumValues: true,
|
|
1201
1403
|
skipValidation: true,
|
|
1202
1404
|
breadcrumbsPrefix: ["response"],
|
|
1203
|
-
}));
|
|
1405
|
+
}), _response.rawResponse);
|
|
1204
1406
|
case 401:
|
|
1205
1407
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1206
1408
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1208,7 +1410,7 @@ class Companies {
|
|
|
1208
1410
|
allowUnrecognizedEnumValues: true,
|
|
1209
1411
|
skipValidation: true,
|
|
1210
1412
|
breadcrumbsPrefix: ["response"],
|
|
1211
|
-
}));
|
|
1413
|
+
}), _response.rawResponse);
|
|
1212
1414
|
case 403:
|
|
1213
1415
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1214
1416
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1216,7 +1418,15 @@ class Companies {
|
|
|
1216
1418
|
allowUnrecognizedEnumValues: true,
|
|
1217
1419
|
skipValidation: true,
|
|
1218
1420
|
breadcrumbsPrefix: ["response"],
|
|
1219
|
-
}));
|
|
1421
|
+
}), _response.rawResponse);
|
|
1422
|
+
case 404:
|
|
1423
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1424
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1425
|
+
allowUnrecognizedUnionMembers: true,
|
|
1426
|
+
allowUnrecognizedEnumValues: true,
|
|
1427
|
+
skipValidation: true,
|
|
1428
|
+
breadcrumbsPrefix: ["response"],
|
|
1429
|
+
}), _response.rawResponse);
|
|
1220
1430
|
case 500:
|
|
1221
1431
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1222
1432
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1224,11 +1434,12 @@ class Companies {
|
|
|
1224
1434
|
allowUnrecognizedEnumValues: true,
|
|
1225
1435
|
skipValidation: true,
|
|
1226
1436
|
breadcrumbsPrefix: ["response"],
|
|
1227
|
-
}));
|
|
1437
|
+
}), _response.rawResponse);
|
|
1228
1438
|
default:
|
|
1229
1439
|
throw new errors.SchematicError({
|
|
1230
1440
|
statusCode: _response.error.statusCode,
|
|
1231
1441
|
body: _response.error.body,
|
|
1442
|
+
rawResponse: _response.rawResponse,
|
|
1232
1443
|
});
|
|
1233
1444
|
}
|
|
1234
1445
|
}
|
|
@@ -1237,12 +1448,14 @@ class Companies {
|
|
|
1237
1448
|
throw new errors.SchematicError({
|
|
1238
1449
|
statusCode: _response.error.statusCode,
|
|
1239
1450
|
body: _response.error.rawBody,
|
|
1451
|
+
rawResponse: _response.rawResponse,
|
|
1240
1452
|
});
|
|
1241
1453
|
case "timeout":
|
|
1242
|
-
throw new errors.SchematicTimeoutError();
|
|
1454
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /company-memberships/{company_membership_id}.");
|
|
1243
1455
|
case "unknown":
|
|
1244
1456
|
throw new errors.SchematicError({
|
|
1245
1457
|
message: _response.error.errorMessage,
|
|
1458
|
+
rawResponse: _response.rawResponse,
|
|
1246
1459
|
});
|
|
1247
1460
|
}
|
|
1248
1461
|
});
|
|
@@ -1254,14 +1467,18 @@ class Companies {
|
|
|
1254
1467
|
* @throws {@link Schematic.BadRequestError}
|
|
1255
1468
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1256
1469
|
* @throws {@link Schematic.ForbiddenError}
|
|
1470
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1257
1471
|
* @throws {@link Schematic.InternalServerError}
|
|
1258
1472
|
*
|
|
1259
1473
|
* @example
|
|
1260
1474
|
* await client.companies.getActiveCompanySubscription()
|
|
1261
1475
|
*/
|
|
1262
1476
|
getActiveCompanySubscription(request = {}, requestOptions) {
|
|
1263
|
-
|
|
1264
|
-
|
|
1477
|
+
return core.HttpResponsePromise.fromPromise(this.__getActiveCompanySubscription(request, requestOptions));
|
|
1478
|
+
}
|
|
1479
|
+
__getActiveCompanySubscription() {
|
|
1480
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1481
|
+
var _a, _b, _c;
|
|
1265
1482
|
const { companyId, companyIds, limit, offset } = request;
|
|
1266
1483
|
const _queryParams = {};
|
|
1267
1484
|
if (companyId != null) {
|
|
@@ -1282,9 +1499,9 @@ class Companies {
|
|
|
1282
1499
|
_queryParams["offset"] = offset.toString();
|
|
1283
1500
|
}
|
|
1284
1501
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1285
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1502
|
+
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-subscriptions"),
|
|
1286
1503
|
method: "GET",
|
|
1287
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1504
|
+
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),
|
|
1288
1505
|
contentType: "application/json",
|
|
1289
1506
|
queryParameters: _queryParams,
|
|
1290
1507
|
requestType: "json",
|
|
@@ -1293,13 +1510,16 @@ class Companies {
|
|
|
1293
1510
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1294
1511
|
});
|
|
1295
1512
|
if (_response.ok) {
|
|
1296
|
-
return
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1513
|
+
return {
|
|
1514
|
+
data: serializers.GetActiveCompanySubscriptionResponse.parseOrThrow(_response.body, {
|
|
1515
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1516
|
+
allowUnrecognizedUnionMembers: true,
|
|
1517
|
+
allowUnrecognizedEnumValues: true,
|
|
1518
|
+
skipValidation: true,
|
|
1519
|
+
breadcrumbsPrefix: ["response"],
|
|
1520
|
+
}),
|
|
1521
|
+
rawResponse: _response.rawResponse,
|
|
1522
|
+
};
|
|
1303
1523
|
}
|
|
1304
1524
|
if (_response.error.reason === "status-code") {
|
|
1305
1525
|
switch (_response.error.statusCode) {
|
|
@@ -1310,7 +1530,7 @@ class Companies {
|
|
|
1310
1530
|
allowUnrecognizedEnumValues: true,
|
|
1311
1531
|
skipValidation: true,
|
|
1312
1532
|
breadcrumbsPrefix: ["response"],
|
|
1313
|
-
}));
|
|
1533
|
+
}), _response.rawResponse);
|
|
1314
1534
|
case 401:
|
|
1315
1535
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1316
1536
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1318,7 +1538,7 @@ class Companies {
|
|
|
1318
1538
|
allowUnrecognizedEnumValues: true,
|
|
1319
1539
|
skipValidation: true,
|
|
1320
1540
|
breadcrumbsPrefix: ["response"],
|
|
1321
|
-
}));
|
|
1541
|
+
}), _response.rawResponse);
|
|
1322
1542
|
case 403:
|
|
1323
1543
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1324
1544
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1326,7 +1546,15 @@ class Companies {
|
|
|
1326
1546
|
allowUnrecognizedEnumValues: true,
|
|
1327
1547
|
skipValidation: true,
|
|
1328
1548
|
breadcrumbsPrefix: ["response"],
|
|
1329
|
-
}));
|
|
1549
|
+
}), _response.rawResponse);
|
|
1550
|
+
case 404:
|
|
1551
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1552
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1553
|
+
allowUnrecognizedUnionMembers: true,
|
|
1554
|
+
allowUnrecognizedEnumValues: true,
|
|
1555
|
+
skipValidation: true,
|
|
1556
|
+
breadcrumbsPrefix: ["response"],
|
|
1557
|
+
}), _response.rawResponse);
|
|
1330
1558
|
case 500:
|
|
1331
1559
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1332
1560
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1334,11 +1562,12 @@ class Companies {
|
|
|
1334
1562
|
allowUnrecognizedEnumValues: true,
|
|
1335
1563
|
skipValidation: true,
|
|
1336
1564
|
breadcrumbsPrefix: ["response"],
|
|
1337
|
-
}));
|
|
1565
|
+
}), _response.rawResponse);
|
|
1338
1566
|
default:
|
|
1339
1567
|
throw new errors.SchematicError({
|
|
1340
1568
|
statusCode: _response.error.statusCode,
|
|
1341
1569
|
body: _response.error.body,
|
|
1570
|
+
rawResponse: _response.rawResponse,
|
|
1342
1571
|
});
|
|
1343
1572
|
}
|
|
1344
1573
|
}
|
|
@@ -1347,12 +1576,14 @@ class Companies {
|
|
|
1347
1576
|
throw new errors.SchematicError({
|
|
1348
1577
|
statusCode: _response.error.statusCode,
|
|
1349
1578
|
body: _response.error.rawBody,
|
|
1579
|
+
rawResponse: _response.rawResponse,
|
|
1350
1580
|
});
|
|
1351
1581
|
case "timeout":
|
|
1352
|
-
throw new errors.SchematicTimeoutError();
|
|
1582
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /company-subscriptions.");
|
|
1353
1583
|
case "unknown":
|
|
1354
1584
|
throw new errors.SchematicError({
|
|
1355
1585
|
message: _response.error.errorMessage,
|
|
1586
|
+
rawResponse: _response.rawResponse,
|
|
1356
1587
|
});
|
|
1357
1588
|
}
|
|
1358
1589
|
});
|
|
@@ -1364,6 +1595,7 @@ class Companies {
|
|
|
1364
1595
|
* @throws {@link Schematic.BadRequestError}
|
|
1365
1596
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1366
1597
|
* @throws {@link Schematic.ForbiddenError}
|
|
1598
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1367
1599
|
* @throws {@link Schematic.InternalServerError}
|
|
1368
1600
|
*
|
|
1369
1601
|
* @example
|
|
@@ -1375,12 +1607,15 @@ class Companies {
|
|
|
1375
1607
|
* })
|
|
1376
1608
|
*/
|
|
1377
1609
|
upsertCompanyTrait(request, requestOptions) {
|
|
1378
|
-
|
|
1610
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertCompanyTrait(request, requestOptions));
|
|
1611
|
+
}
|
|
1612
|
+
__upsertCompanyTrait(request, requestOptions) {
|
|
1379
1613
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1614
|
+
var _a, _b, _c;
|
|
1380
1615
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1381
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1616
|
+
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-traits"),
|
|
1382
1617
|
method: "POST",
|
|
1383
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1618
|
+
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),
|
|
1384
1619
|
contentType: "application/json",
|
|
1385
1620
|
requestType: "json",
|
|
1386
1621
|
body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1389,13 +1624,16 @@ class Companies {
|
|
|
1389
1624
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1390
1625
|
});
|
|
1391
1626
|
if (_response.ok) {
|
|
1392
|
-
return
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1627
|
+
return {
|
|
1628
|
+
data: serializers.UpsertCompanyTraitResponse.parseOrThrow(_response.body, {
|
|
1629
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1630
|
+
allowUnrecognizedUnionMembers: true,
|
|
1631
|
+
allowUnrecognizedEnumValues: true,
|
|
1632
|
+
skipValidation: true,
|
|
1633
|
+
breadcrumbsPrefix: ["response"],
|
|
1634
|
+
}),
|
|
1635
|
+
rawResponse: _response.rawResponse,
|
|
1636
|
+
};
|
|
1399
1637
|
}
|
|
1400
1638
|
if (_response.error.reason === "status-code") {
|
|
1401
1639
|
switch (_response.error.statusCode) {
|
|
@@ -1406,7 +1644,7 @@ class Companies {
|
|
|
1406
1644
|
allowUnrecognizedEnumValues: true,
|
|
1407
1645
|
skipValidation: true,
|
|
1408
1646
|
breadcrumbsPrefix: ["response"],
|
|
1409
|
-
}));
|
|
1647
|
+
}), _response.rawResponse);
|
|
1410
1648
|
case 401:
|
|
1411
1649
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1412
1650
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1414,7 +1652,7 @@ class Companies {
|
|
|
1414
1652
|
allowUnrecognizedEnumValues: true,
|
|
1415
1653
|
skipValidation: true,
|
|
1416
1654
|
breadcrumbsPrefix: ["response"],
|
|
1417
|
-
}));
|
|
1655
|
+
}), _response.rawResponse);
|
|
1418
1656
|
case 403:
|
|
1419
1657
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1420
1658
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1422,7 +1660,15 @@ class Companies {
|
|
|
1422
1660
|
allowUnrecognizedEnumValues: true,
|
|
1423
1661
|
skipValidation: true,
|
|
1424
1662
|
breadcrumbsPrefix: ["response"],
|
|
1425
|
-
}));
|
|
1663
|
+
}), _response.rawResponse);
|
|
1664
|
+
case 404:
|
|
1665
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1666
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1667
|
+
allowUnrecognizedUnionMembers: true,
|
|
1668
|
+
allowUnrecognizedEnumValues: true,
|
|
1669
|
+
skipValidation: true,
|
|
1670
|
+
breadcrumbsPrefix: ["response"],
|
|
1671
|
+
}), _response.rawResponse);
|
|
1426
1672
|
case 500:
|
|
1427
1673
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1428
1674
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1430,11 +1676,12 @@ class Companies {
|
|
|
1430
1676
|
allowUnrecognizedEnumValues: true,
|
|
1431
1677
|
skipValidation: true,
|
|
1432
1678
|
breadcrumbsPrefix: ["response"],
|
|
1433
|
-
}));
|
|
1679
|
+
}), _response.rawResponse);
|
|
1434
1680
|
default:
|
|
1435
1681
|
throw new errors.SchematicError({
|
|
1436
1682
|
statusCode: _response.error.statusCode,
|
|
1437
1683
|
body: _response.error.body,
|
|
1684
|
+
rawResponse: _response.rawResponse,
|
|
1438
1685
|
});
|
|
1439
1686
|
}
|
|
1440
1687
|
}
|
|
@@ -1443,12 +1690,14 @@ class Companies {
|
|
|
1443
1690
|
throw new errors.SchematicError({
|
|
1444
1691
|
statusCode: _response.error.statusCode,
|
|
1445
1692
|
body: _response.error.rawBody,
|
|
1693
|
+
rawResponse: _response.rawResponse,
|
|
1446
1694
|
});
|
|
1447
1695
|
case "timeout":
|
|
1448
|
-
throw new errors.SchematicTimeoutError();
|
|
1696
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /company-traits.");
|
|
1449
1697
|
case "unknown":
|
|
1450
1698
|
throw new errors.SchematicError({
|
|
1451
1699
|
message: _response.error.errorMessage,
|
|
1700
|
+
rawResponse: _response.rawResponse,
|
|
1452
1701
|
});
|
|
1453
1702
|
}
|
|
1454
1703
|
});
|
|
@@ -1460,18 +1709,22 @@ class Companies {
|
|
|
1460
1709
|
* @throws {@link Schematic.BadRequestError}
|
|
1461
1710
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1462
1711
|
* @throws {@link Schematic.ForbiddenError}
|
|
1712
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1463
1713
|
* @throws {@link Schematic.InternalServerError}
|
|
1464
1714
|
*
|
|
1465
1715
|
* @example
|
|
1466
1716
|
* await client.companies.listEntityKeyDefinitions()
|
|
1467
1717
|
*/
|
|
1468
1718
|
listEntityKeyDefinitions(request = {}, requestOptions) {
|
|
1469
|
-
|
|
1470
|
-
|
|
1719
|
+
return core.HttpResponsePromise.fromPromise(this.__listEntityKeyDefinitions(request, requestOptions));
|
|
1720
|
+
}
|
|
1721
|
+
__listEntityKeyDefinitions() {
|
|
1722
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1723
|
+
var _a, _b, _c;
|
|
1471
1724
|
const { entityType, ids, q, limit, offset } = request;
|
|
1472
1725
|
const _queryParams = {};
|
|
1473
1726
|
if (entityType != null) {
|
|
1474
|
-
_queryParams["entity_type"] = entityType;
|
|
1727
|
+
_queryParams["entity_type"] = serializers.ListEntityKeyDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
|
|
1475
1728
|
}
|
|
1476
1729
|
if (ids != null) {
|
|
1477
1730
|
if (Array.isArray(ids)) {
|
|
@@ -1491,9 +1744,9 @@ class Companies {
|
|
|
1491
1744
|
_queryParams["offset"] = offset.toString();
|
|
1492
1745
|
}
|
|
1493
1746
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1494
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1747
|
+
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, "entity-key-definitions"),
|
|
1495
1748
|
method: "GET",
|
|
1496
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1749
|
+
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),
|
|
1497
1750
|
contentType: "application/json",
|
|
1498
1751
|
queryParameters: _queryParams,
|
|
1499
1752
|
requestType: "json",
|
|
@@ -1502,13 +1755,16 @@ class Companies {
|
|
|
1502
1755
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1503
1756
|
});
|
|
1504
1757
|
if (_response.ok) {
|
|
1505
|
-
return
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1758
|
+
return {
|
|
1759
|
+
data: serializers.ListEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
|
|
1760
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1761
|
+
allowUnrecognizedUnionMembers: true,
|
|
1762
|
+
allowUnrecognizedEnumValues: true,
|
|
1763
|
+
skipValidation: true,
|
|
1764
|
+
breadcrumbsPrefix: ["response"],
|
|
1765
|
+
}),
|
|
1766
|
+
rawResponse: _response.rawResponse,
|
|
1767
|
+
};
|
|
1512
1768
|
}
|
|
1513
1769
|
if (_response.error.reason === "status-code") {
|
|
1514
1770
|
switch (_response.error.statusCode) {
|
|
@@ -1519,7 +1775,7 @@ class Companies {
|
|
|
1519
1775
|
allowUnrecognizedEnumValues: true,
|
|
1520
1776
|
skipValidation: true,
|
|
1521
1777
|
breadcrumbsPrefix: ["response"],
|
|
1522
|
-
}));
|
|
1778
|
+
}), _response.rawResponse);
|
|
1523
1779
|
case 401:
|
|
1524
1780
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1525
1781
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1527,7 +1783,7 @@ class Companies {
|
|
|
1527
1783
|
allowUnrecognizedEnumValues: true,
|
|
1528
1784
|
skipValidation: true,
|
|
1529
1785
|
breadcrumbsPrefix: ["response"],
|
|
1530
|
-
}));
|
|
1786
|
+
}), _response.rawResponse);
|
|
1531
1787
|
case 403:
|
|
1532
1788
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1533
1789
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1535,7 +1791,15 @@ class Companies {
|
|
|
1535
1791
|
allowUnrecognizedEnumValues: true,
|
|
1536
1792
|
skipValidation: true,
|
|
1537
1793
|
breadcrumbsPrefix: ["response"],
|
|
1538
|
-
}));
|
|
1794
|
+
}), _response.rawResponse);
|
|
1795
|
+
case 404:
|
|
1796
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1797
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1798
|
+
allowUnrecognizedUnionMembers: true,
|
|
1799
|
+
allowUnrecognizedEnumValues: true,
|
|
1800
|
+
skipValidation: true,
|
|
1801
|
+
breadcrumbsPrefix: ["response"],
|
|
1802
|
+
}), _response.rawResponse);
|
|
1539
1803
|
case 500:
|
|
1540
1804
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1541
1805
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1543,11 +1807,12 @@ class Companies {
|
|
|
1543
1807
|
allowUnrecognizedEnumValues: true,
|
|
1544
1808
|
skipValidation: true,
|
|
1545
1809
|
breadcrumbsPrefix: ["response"],
|
|
1546
|
-
}));
|
|
1810
|
+
}), _response.rawResponse);
|
|
1547
1811
|
default:
|
|
1548
1812
|
throw new errors.SchematicError({
|
|
1549
1813
|
statusCode: _response.error.statusCode,
|
|
1550
1814
|
body: _response.error.body,
|
|
1815
|
+
rawResponse: _response.rawResponse,
|
|
1551
1816
|
});
|
|
1552
1817
|
}
|
|
1553
1818
|
}
|
|
@@ -1556,12 +1821,14 @@ class Companies {
|
|
|
1556
1821
|
throw new errors.SchematicError({
|
|
1557
1822
|
statusCode: _response.error.statusCode,
|
|
1558
1823
|
body: _response.error.rawBody,
|
|
1824
|
+
rawResponse: _response.rawResponse,
|
|
1559
1825
|
});
|
|
1560
1826
|
case "timeout":
|
|
1561
|
-
throw new errors.SchematicTimeoutError();
|
|
1827
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions.");
|
|
1562
1828
|
case "unknown":
|
|
1563
1829
|
throw new errors.SchematicError({
|
|
1564
1830
|
message: _response.error.errorMessage,
|
|
1831
|
+
rawResponse: _response.rawResponse,
|
|
1565
1832
|
});
|
|
1566
1833
|
}
|
|
1567
1834
|
});
|
|
@@ -1573,18 +1840,22 @@ class Companies {
|
|
|
1573
1840
|
* @throws {@link Schematic.BadRequestError}
|
|
1574
1841
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1575
1842
|
* @throws {@link Schematic.ForbiddenError}
|
|
1843
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1576
1844
|
* @throws {@link Schematic.InternalServerError}
|
|
1577
1845
|
*
|
|
1578
1846
|
* @example
|
|
1579
1847
|
* await client.companies.countEntityKeyDefinitions()
|
|
1580
1848
|
*/
|
|
1581
1849
|
countEntityKeyDefinitions(request = {}, requestOptions) {
|
|
1582
|
-
|
|
1583
|
-
|
|
1850
|
+
return core.HttpResponsePromise.fromPromise(this.__countEntityKeyDefinitions(request, requestOptions));
|
|
1851
|
+
}
|
|
1852
|
+
__countEntityKeyDefinitions() {
|
|
1853
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1854
|
+
var _a, _b, _c;
|
|
1584
1855
|
const { entityType, ids, q, limit, offset } = request;
|
|
1585
1856
|
const _queryParams = {};
|
|
1586
1857
|
if (entityType != null) {
|
|
1587
|
-
_queryParams["entity_type"] = entityType;
|
|
1858
|
+
_queryParams["entity_type"] = serializers.CountEntityKeyDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
|
|
1588
1859
|
}
|
|
1589
1860
|
if (ids != null) {
|
|
1590
1861
|
if (Array.isArray(ids)) {
|
|
@@ -1604,9 +1875,9 @@ class Companies {
|
|
|
1604
1875
|
_queryParams["offset"] = offset.toString();
|
|
1605
1876
|
}
|
|
1606
1877
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1607
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
1878
|
+
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, "entity-key-definitions/count"),
|
|
1608
1879
|
method: "GET",
|
|
1609
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1880
|
+
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),
|
|
1610
1881
|
contentType: "application/json",
|
|
1611
1882
|
queryParameters: _queryParams,
|
|
1612
1883
|
requestType: "json",
|
|
@@ -1615,13 +1886,16 @@ class Companies {
|
|
|
1615
1886
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1616
1887
|
});
|
|
1617
1888
|
if (_response.ok) {
|
|
1618
|
-
return
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1889
|
+
return {
|
|
1890
|
+
data: serializers.CountEntityKeyDefinitionsResponse.parseOrThrow(_response.body, {
|
|
1891
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1892
|
+
allowUnrecognizedUnionMembers: true,
|
|
1893
|
+
allowUnrecognizedEnumValues: true,
|
|
1894
|
+
skipValidation: true,
|
|
1895
|
+
breadcrumbsPrefix: ["response"],
|
|
1896
|
+
}),
|
|
1897
|
+
rawResponse: _response.rawResponse,
|
|
1898
|
+
};
|
|
1625
1899
|
}
|
|
1626
1900
|
if (_response.error.reason === "status-code") {
|
|
1627
1901
|
switch (_response.error.statusCode) {
|
|
@@ -1632,7 +1906,7 @@ class Companies {
|
|
|
1632
1906
|
allowUnrecognizedEnumValues: true,
|
|
1633
1907
|
skipValidation: true,
|
|
1634
1908
|
breadcrumbsPrefix: ["response"],
|
|
1635
|
-
}));
|
|
1909
|
+
}), _response.rawResponse);
|
|
1636
1910
|
case 401:
|
|
1637
1911
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1638
1912
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1640,7 +1914,7 @@ class Companies {
|
|
|
1640
1914
|
allowUnrecognizedEnumValues: true,
|
|
1641
1915
|
skipValidation: true,
|
|
1642
1916
|
breadcrumbsPrefix: ["response"],
|
|
1643
|
-
}));
|
|
1917
|
+
}), _response.rawResponse);
|
|
1644
1918
|
case 403:
|
|
1645
1919
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1646
1920
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1648,7 +1922,15 @@ class Companies {
|
|
|
1648
1922
|
allowUnrecognizedEnumValues: true,
|
|
1649
1923
|
skipValidation: true,
|
|
1650
1924
|
breadcrumbsPrefix: ["response"],
|
|
1651
|
-
}));
|
|
1925
|
+
}), _response.rawResponse);
|
|
1926
|
+
case 404:
|
|
1927
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1928
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1929
|
+
allowUnrecognizedUnionMembers: true,
|
|
1930
|
+
allowUnrecognizedEnumValues: true,
|
|
1931
|
+
skipValidation: true,
|
|
1932
|
+
breadcrumbsPrefix: ["response"],
|
|
1933
|
+
}), _response.rawResponse);
|
|
1652
1934
|
case 500:
|
|
1653
1935
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1654
1936
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1656,11 +1938,12 @@ class Companies {
|
|
|
1656
1938
|
allowUnrecognizedEnumValues: true,
|
|
1657
1939
|
skipValidation: true,
|
|
1658
1940
|
breadcrumbsPrefix: ["response"],
|
|
1659
|
-
}));
|
|
1941
|
+
}), _response.rawResponse);
|
|
1660
1942
|
default:
|
|
1661
1943
|
throw new errors.SchematicError({
|
|
1662
1944
|
statusCode: _response.error.statusCode,
|
|
1663
1945
|
body: _response.error.body,
|
|
1946
|
+
rawResponse: _response.rawResponse,
|
|
1664
1947
|
});
|
|
1665
1948
|
}
|
|
1666
1949
|
}
|
|
@@ -1669,12 +1952,14 @@ class Companies {
|
|
|
1669
1952
|
throw new errors.SchematicError({
|
|
1670
1953
|
statusCode: _response.error.statusCode,
|
|
1671
1954
|
body: _response.error.rawBody,
|
|
1955
|
+
rawResponse: _response.rawResponse,
|
|
1672
1956
|
});
|
|
1673
1957
|
case "timeout":
|
|
1674
|
-
throw new errors.SchematicTimeoutError();
|
|
1958
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-key-definitions/count.");
|
|
1675
1959
|
case "unknown":
|
|
1676
1960
|
throw new errors.SchematicError({
|
|
1677
1961
|
message: _response.error.errorMessage,
|
|
1962
|
+
rawResponse: _response.rawResponse,
|
|
1678
1963
|
});
|
|
1679
1964
|
}
|
|
1680
1965
|
});
|
|
@@ -1686,18 +1971,22 @@ class Companies {
|
|
|
1686
1971
|
* @throws {@link Schematic.BadRequestError}
|
|
1687
1972
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1688
1973
|
* @throws {@link Schematic.ForbiddenError}
|
|
1974
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1689
1975
|
* @throws {@link Schematic.InternalServerError}
|
|
1690
1976
|
*
|
|
1691
1977
|
* @example
|
|
1692
1978
|
* await client.companies.listEntityTraitDefinitions()
|
|
1693
1979
|
*/
|
|
1694
1980
|
listEntityTraitDefinitions(request = {}, requestOptions) {
|
|
1695
|
-
|
|
1696
|
-
|
|
1981
|
+
return core.HttpResponsePromise.fromPromise(this.__listEntityTraitDefinitions(request, requestOptions));
|
|
1982
|
+
}
|
|
1983
|
+
__listEntityTraitDefinitions() {
|
|
1984
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1985
|
+
var _a, _b, _c;
|
|
1697
1986
|
const { entityType, ids, q, traitType, limit, offset } = request;
|
|
1698
1987
|
const _queryParams = {};
|
|
1699
1988
|
if (entityType != null) {
|
|
1700
|
-
_queryParams["entity_type"] = entityType;
|
|
1989
|
+
_queryParams["entity_type"] = serializers.ListEntityTraitDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
|
|
1701
1990
|
}
|
|
1702
1991
|
if (ids != null) {
|
|
1703
1992
|
if (Array.isArray(ids)) {
|
|
@@ -1711,7 +2000,9 @@ class Companies {
|
|
|
1711
2000
|
_queryParams["q"] = q;
|
|
1712
2001
|
}
|
|
1713
2002
|
if (traitType != null) {
|
|
1714
|
-
_queryParams["trait_type"] = traitType
|
|
2003
|
+
_queryParams["trait_type"] = serializers.ListEntityTraitDefinitionsRequestTraitType.jsonOrThrow(traitType, {
|
|
2004
|
+
unrecognizedObjectKeys: "strip",
|
|
2005
|
+
});
|
|
1715
2006
|
}
|
|
1716
2007
|
if (limit != null) {
|
|
1717
2008
|
_queryParams["limit"] = limit.toString();
|
|
@@ -1720,9 +2011,9 @@ class Companies {
|
|
|
1720
2011
|
_queryParams["offset"] = offset.toString();
|
|
1721
2012
|
}
|
|
1722
2013
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1723
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2014
|
+
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, "entity-trait-definitions"),
|
|
1724
2015
|
method: "GET",
|
|
1725
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2016
|
+
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),
|
|
1726
2017
|
contentType: "application/json",
|
|
1727
2018
|
queryParameters: _queryParams,
|
|
1728
2019
|
requestType: "json",
|
|
@@ -1731,13 +2022,16 @@ class Companies {
|
|
|
1731
2022
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1732
2023
|
});
|
|
1733
2024
|
if (_response.ok) {
|
|
1734
|
-
return
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
2025
|
+
return {
|
|
2026
|
+
data: serializers.ListEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
|
|
2027
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2028
|
+
allowUnrecognizedUnionMembers: true,
|
|
2029
|
+
allowUnrecognizedEnumValues: true,
|
|
2030
|
+
skipValidation: true,
|
|
2031
|
+
breadcrumbsPrefix: ["response"],
|
|
2032
|
+
}),
|
|
2033
|
+
rawResponse: _response.rawResponse,
|
|
2034
|
+
};
|
|
1741
2035
|
}
|
|
1742
2036
|
if (_response.error.reason === "status-code") {
|
|
1743
2037
|
switch (_response.error.statusCode) {
|
|
@@ -1748,7 +2042,7 @@ class Companies {
|
|
|
1748
2042
|
allowUnrecognizedEnumValues: true,
|
|
1749
2043
|
skipValidation: true,
|
|
1750
2044
|
breadcrumbsPrefix: ["response"],
|
|
1751
|
-
}));
|
|
2045
|
+
}), _response.rawResponse);
|
|
1752
2046
|
case 401:
|
|
1753
2047
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1754
2048
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1756,7 +2050,7 @@ class Companies {
|
|
|
1756
2050
|
allowUnrecognizedEnumValues: true,
|
|
1757
2051
|
skipValidation: true,
|
|
1758
2052
|
breadcrumbsPrefix: ["response"],
|
|
1759
|
-
}));
|
|
2053
|
+
}), _response.rawResponse);
|
|
1760
2054
|
case 403:
|
|
1761
2055
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1762
2056
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1764,7 +2058,15 @@ class Companies {
|
|
|
1764
2058
|
allowUnrecognizedEnumValues: true,
|
|
1765
2059
|
skipValidation: true,
|
|
1766
2060
|
breadcrumbsPrefix: ["response"],
|
|
1767
|
-
}));
|
|
2061
|
+
}), _response.rawResponse);
|
|
2062
|
+
case 404:
|
|
2063
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2064
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2065
|
+
allowUnrecognizedUnionMembers: true,
|
|
2066
|
+
allowUnrecognizedEnumValues: true,
|
|
2067
|
+
skipValidation: true,
|
|
2068
|
+
breadcrumbsPrefix: ["response"],
|
|
2069
|
+
}), _response.rawResponse);
|
|
1768
2070
|
case 500:
|
|
1769
2071
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1770
2072
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1772,11 +2074,12 @@ class Companies {
|
|
|
1772
2074
|
allowUnrecognizedEnumValues: true,
|
|
1773
2075
|
skipValidation: true,
|
|
1774
2076
|
breadcrumbsPrefix: ["response"],
|
|
1775
|
-
}));
|
|
2077
|
+
}), _response.rawResponse);
|
|
1776
2078
|
default:
|
|
1777
2079
|
throw new errors.SchematicError({
|
|
1778
2080
|
statusCode: _response.error.statusCode,
|
|
1779
2081
|
body: _response.error.body,
|
|
2082
|
+
rawResponse: _response.rawResponse,
|
|
1780
2083
|
});
|
|
1781
2084
|
}
|
|
1782
2085
|
}
|
|
@@ -1785,12 +2088,14 @@ class Companies {
|
|
|
1785
2088
|
throw new errors.SchematicError({
|
|
1786
2089
|
statusCode: _response.error.statusCode,
|
|
1787
2090
|
body: _response.error.rawBody,
|
|
2091
|
+
rawResponse: _response.rawResponse,
|
|
1788
2092
|
});
|
|
1789
2093
|
case "timeout":
|
|
1790
|
-
throw new errors.SchematicTimeoutError();
|
|
2094
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions.");
|
|
1791
2095
|
case "unknown":
|
|
1792
2096
|
throw new errors.SchematicError({
|
|
1793
2097
|
message: _response.error.errorMessage,
|
|
2098
|
+
rawResponse: _response.rawResponse,
|
|
1794
2099
|
});
|
|
1795
2100
|
}
|
|
1796
2101
|
});
|
|
@@ -1802,6 +2107,7 @@ class Companies {
|
|
|
1802
2107
|
* @throws {@link Schematic.BadRequestError}
|
|
1803
2108
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1804
2109
|
* @throws {@link Schematic.ForbiddenError}
|
|
2110
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1805
2111
|
* @throws {@link Schematic.InternalServerError}
|
|
1806
2112
|
*
|
|
1807
2113
|
* @example
|
|
@@ -1812,12 +2118,15 @@ class Companies {
|
|
|
1812
2118
|
* })
|
|
1813
2119
|
*/
|
|
1814
2120
|
getOrCreateEntityTraitDefinition(request, requestOptions) {
|
|
1815
|
-
|
|
2121
|
+
return core.HttpResponsePromise.fromPromise(this.__getOrCreateEntityTraitDefinition(request, requestOptions));
|
|
2122
|
+
}
|
|
2123
|
+
__getOrCreateEntityTraitDefinition(request, requestOptions) {
|
|
1816
2124
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2125
|
+
var _a, _b, _c;
|
|
1817
2126
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1818
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2127
|
+
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, "entity-trait-definitions"),
|
|
1819
2128
|
method: "POST",
|
|
1820
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2129
|
+
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),
|
|
1821
2130
|
contentType: "application/json",
|
|
1822
2131
|
requestType: "json",
|
|
1823
2132
|
body: serializers.CreateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
|
|
@@ -1828,13 +2137,16 @@ class Companies {
|
|
|
1828
2137
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1829
2138
|
});
|
|
1830
2139
|
if (_response.ok) {
|
|
1831
|
-
return
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
2140
|
+
return {
|
|
2141
|
+
data: serializers.GetOrCreateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
|
|
2142
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2143
|
+
allowUnrecognizedUnionMembers: true,
|
|
2144
|
+
allowUnrecognizedEnumValues: true,
|
|
2145
|
+
skipValidation: true,
|
|
2146
|
+
breadcrumbsPrefix: ["response"],
|
|
2147
|
+
}),
|
|
2148
|
+
rawResponse: _response.rawResponse,
|
|
2149
|
+
};
|
|
1838
2150
|
}
|
|
1839
2151
|
if (_response.error.reason === "status-code") {
|
|
1840
2152
|
switch (_response.error.statusCode) {
|
|
@@ -1845,7 +2157,7 @@ class Companies {
|
|
|
1845
2157
|
allowUnrecognizedEnumValues: true,
|
|
1846
2158
|
skipValidation: true,
|
|
1847
2159
|
breadcrumbsPrefix: ["response"],
|
|
1848
|
-
}));
|
|
2160
|
+
}), _response.rawResponse);
|
|
1849
2161
|
case 401:
|
|
1850
2162
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1851
2163
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1853,7 +2165,7 @@ class Companies {
|
|
|
1853
2165
|
allowUnrecognizedEnumValues: true,
|
|
1854
2166
|
skipValidation: true,
|
|
1855
2167
|
breadcrumbsPrefix: ["response"],
|
|
1856
|
-
}));
|
|
2168
|
+
}), _response.rawResponse);
|
|
1857
2169
|
case 403:
|
|
1858
2170
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1859
2171
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1861,7 +2173,15 @@ class Companies {
|
|
|
1861
2173
|
allowUnrecognizedEnumValues: true,
|
|
1862
2174
|
skipValidation: true,
|
|
1863
2175
|
breadcrumbsPrefix: ["response"],
|
|
1864
|
-
}));
|
|
2176
|
+
}), _response.rawResponse);
|
|
2177
|
+
case 404:
|
|
2178
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2179
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2180
|
+
allowUnrecognizedUnionMembers: true,
|
|
2181
|
+
allowUnrecognizedEnumValues: true,
|
|
2182
|
+
skipValidation: true,
|
|
2183
|
+
breadcrumbsPrefix: ["response"],
|
|
2184
|
+
}), _response.rawResponse);
|
|
1865
2185
|
case 500:
|
|
1866
2186
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1867
2187
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1869,11 +2189,12 @@ class Companies {
|
|
|
1869
2189
|
allowUnrecognizedEnumValues: true,
|
|
1870
2190
|
skipValidation: true,
|
|
1871
2191
|
breadcrumbsPrefix: ["response"],
|
|
1872
|
-
}));
|
|
2192
|
+
}), _response.rawResponse);
|
|
1873
2193
|
default:
|
|
1874
2194
|
throw new errors.SchematicError({
|
|
1875
2195
|
statusCode: _response.error.statusCode,
|
|
1876
2196
|
body: _response.error.body,
|
|
2197
|
+
rawResponse: _response.rawResponse,
|
|
1877
2198
|
});
|
|
1878
2199
|
}
|
|
1879
2200
|
}
|
|
@@ -1882,12 +2203,14 @@ class Companies {
|
|
|
1882
2203
|
throw new errors.SchematicError({
|
|
1883
2204
|
statusCode: _response.error.statusCode,
|
|
1884
2205
|
body: _response.error.rawBody,
|
|
2206
|
+
rawResponse: _response.rawResponse,
|
|
1885
2207
|
});
|
|
1886
2208
|
case "timeout":
|
|
1887
|
-
throw new errors.SchematicTimeoutError();
|
|
2209
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /entity-trait-definitions.");
|
|
1888
2210
|
case "unknown":
|
|
1889
2211
|
throw new errors.SchematicError({
|
|
1890
2212
|
message: _response.error.errorMessage,
|
|
2213
|
+
rawResponse: _response.rawResponse,
|
|
1891
2214
|
});
|
|
1892
2215
|
}
|
|
1893
2216
|
});
|
|
@@ -1905,12 +2228,15 @@ class Companies {
|
|
|
1905
2228
|
* await client.companies.getEntityTraitDefinition("entity_trait_definition_id")
|
|
1906
2229
|
*/
|
|
1907
2230
|
getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
|
|
1908
|
-
|
|
2231
|
+
return core.HttpResponsePromise.fromPromise(this.__getEntityTraitDefinition(entityTraitDefinitionId, requestOptions));
|
|
2232
|
+
}
|
|
2233
|
+
__getEntityTraitDefinition(entityTraitDefinitionId, requestOptions) {
|
|
1909
2234
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2235
|
+
var _a, _b, _c;
|
|
1910
2236
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1911
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2237
|
+
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, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
|
|
1912
2238
|
method: "GET",
|
|
1913
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2239
|
+
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),
|
|
1914
2240
|
contentType: "application/json",
|
|
1915
2241
|
requestType: "json",
|
|
1916
2242
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1918,13 +2244,16 @@ class Companies {
|
|
|
1918
2244
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1919
2245
|
});
|
|
1920
2246
|
if (_response.ok) {
|
|
1921
|
-
return
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
2247
|
+
return {
|
|
2248
|
+
data: serializers.GetEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
|
|
2249
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2250
|
+
allowUnrecognizedUnionMembers: true,
|
|
2251
|
+
allowUnrecognizedEnumValues: true,
|
|
2252
|
+
skipValidation: true,
|
|
2253
|
+
breadcrumbsPrefix: ["response"],
|
|
2254
|
+
}),
|
|
2255
|
+
rawResponse: _response.rawResponse,
|
|
2256
|
+
};
|
|
1928
2257
|
}
|
|
1929
2258
|
if (_response.error.reason === "status-code") {
|
|
1930
2259
|
switch (_response.error.statusCode) {
|
|
@@ -1935,7 +2264,7 @@ class Companies {
|
|
|
1935
2264
|
allowUnrecognizedEnumValues: true,
|
|
1936
2265
|
skipValidation: true,
|
|
1937
2266
|
breadcrumbsPrefix: ["response"],
|
|
1938
|
-
}));
|
|
2267
|
+
}), _response.rawResponse);
|
|
1939
2268
|
case 403:
|
|
1940
2269
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1941
2270
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1943,7 +2272,7 @@ class Companies {
|
|
|
1943
2272
|
allowUnrecognizedEnumValues: true,
|
|
1944
2273
|
skipValidation: true,
|
|
1945
2274
|
breadcrumbsPrefix: ["response"],
|
|
1946
|
-
}));
|
|
2275
|
+
}), _response.rawResponse);
|
|
1947
2276
|
case 404:
|
|
1948
2277
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1949
2278
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1951,7 +2280,7 @@ class Companies {
|
|
|
1951
2280
|
allowUnrecognizedEnumValues: true,
|
|
1952
2281
|
skipValidation: true,
|
|
1953
2282
|
breadcrumbsPrefix: ["response"],
|
|
1954
|
-
}));
|
|
2283
|
+
}), _response.rawResponse);
|
|
1955
2284
|
case 500:
|
|
1956
2285
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1957
2286
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1959,11 +2288,12 @@ class Companies {
|
|
|
1959
2288
|
allowUnrecognizedEnumValues: true,
|
|
1960
2289
|
skipValidation: true,
|
|
1961
2290
|
breadcrumbsPrefix: ["response"],
|
|
1962
|
-
}));
|
|
2291
|
+
}), _response.rawResponse);
|
|
1963
2292
|
default:
|
|
1964
2293
|
throw new errors.SchematicError({
|
|
1965
2294
|
statusCode: _response.error.statusCode,
|
|
1966
2295
|
body: _response.error.body,
|
|
2296
|
+
rawResponse: _response.rawResponse,
|
|
1967
2297
|
});
|
|
1968
2298
|
}
|
|
1969
2299
|
}
|
|
@@ -1972,12 +2302,14 @@ class Companies {
|
|
|
1972
2302
|
throw new errors.SchematicError({
|
|
1973
2303
|
statusCode: _response.error.statusCode,
|
|
1974
2304
|
body: _response.error.rawBody,
|
|
2305
|
+
rawResponse: _response.rawResponse,
|
|
1975
2306
|
});
|
|
1976
2307
|
case "timeout":
|
|
1977
|
-
throw new errors.SchematicTimeoutError();
|
|
2308
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/{entity_trait_definition_id}.");
|
|
1978
2309
|
case "unknown":
|
|
1979
2310
|
throw new errors.SchematicError({
|
|
1980
2311
|
message: _response.error.errorMessage,
|
|
2312
|
+
rawResponse: _response.rawResponse,
|
|
1981
2313
|
});
|
|
1982
2314
|
}
|
|
1983
2315
|
});
|
|
@@ -1999,12 +2331,15 @@ class Companies {
|
|
|
1999
2331
|
* })
|
|
2000
2332
|
*/
|
|
2001
2333
|
updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
|
|
2002
|
-
|
|
2334
|
+
return core.HttpResponsePromise.fromPromise(this.__updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions));
|
|
2335
|
+
}
|
|
2336
|
+
__updateEntityTraitDefinition(entityTraitDefinitionId, request, requestOptions) {
|
|
2003
2337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2338
|
+
var _a, _b, _c;
|
|
2004
2339
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2005
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2340
|
+
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, `entity-trait-definitions/${encodeURIComponent(entityTraitDefinitionId)}`),
|
|
2006
2341
|
method: "PUT",
|
|
2007
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2342
|
+
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),
|
|
2008
2343
|
contentType: "application/json",
|
|
2009
2344
|
requestType: "json",
|
|
2010
2345
|
body: serializers.UpdateEntityTraitDefinitionRequestBody.jsonOrThrow(request, {
|
|
@@ -2015,13 +2350,16 @@ class Companies {
|
|
|
2015
2350
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2016
2351
|
});
|
|
2017
2352
|
if (_response.ok) {
|
|
2018
|
-
return
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2353
|
+
return {
|
|
2354
|
+
data: serializers.UpdateEntityTraitDefinitionResponse.parseOrThrow(_response.body, {
|
|
2355
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2356
|
+
allowUnrecognizedUnionMembers: true,
|
|
2357
|
+
allowUnrecognizedEnumValues: true,
|
|
2358
|
+
skipValidation: true,
|
|
2359
|
+
breadcrumbsPrefix: ["response"],
|
|
2360
|
+
}),
|
|
2361
|
+
rawResponse: _response.rawResponse,
|
|
2362
|
+
};
|
|
2025
2363
|
}
|
|
2026
2364
|
if (_response.error.reason === "status-code") {
|
|
2027
2365
|
switch (_response.error.statusCode) {
|
|
@@ -2032,7 +2370,7 @@ class Companies {
|
|
|
2032
2370
|
allowUnrecognizedEnumValues: true,
|
|
2033
2371
|
skipValidation: true,
|
|
2034
2372
|
breadcrumbsPrefix: ["response"],
|
|
2035
|
-
}));
|
|
2373
|
+
}), _response.rawResponse);
|
|
2036
2374
|
case 401:
|
|
2037
2375
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2038
2376
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2040,7 +2378,7 @@ class Companies {
|
|
|
2040
2378
|
allowUnrecognizedEnumValues: true,
|
|
2041
2379
|
skipValidation: true,
|
|
2042
2380
|
breadcrumbsPrefix: ["response"],
|
|
2043
|
-
}));
|
|
2381
|
+
}), _response.rawResponse);
|
|
2044
2382
|
case 403:
|
|
2045
2383
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2046
2384
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2048,7 +2386,7 @@ class Companies {
|
|
|
2048
2386
|
allowUnrecognizedEnumValues: true,
|
|
2049
2387
|
skipValidation: true,
|
|
2050
2388
|
breadcrumbsPrefix: ["response"],
|
|
2051
|
-
}));
|
|
2389
|
+
}), _response.rawResponse);
|
|
2052
2390
|
case 404:
|
|
2053
2391
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2054
2392
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2056,7 +2394,7 @@ class Companies {
|
|
|
2056
2394
|
allowUnrecognizedEnumValues: true,
|
|
2057
2395
|
skipValidation: true,
|
|
2058
2396
|
breadcrumbsPrefix: ["response"],
|
|
2059
|
-
}));
|
|
2397
|
+
}), _response.rawResponse);
|
|
2060
2398
|
case 500:
|
|
2061
2399
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2062
2400
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2064,11 +2402,12 @@ class Companies {
|
|
|
2064
2402
|
allowUnrecognizedEnumValues: true,
|
|
2065
2403
|
skipValidation: true,
|
|
2066
2404
|
breadcrumbsPrefix: ["response"],
|
|
2067
|
-
}));
|
|
2405
|
+
}), _response.rawResponse);
|
|
2068
2406
|
default:
|
|
2069
2407
|
throw new errors.SchematicError({
|
|
2070
2408
|
statusCode: _response.error.statusCode,
|
|
2071
2409
|
body: _response.error.body,
|
|
2410
|
+
rawResponse: _response.rawResponse,
|
|
2072
2411
|
});
|
|
2073
2412
|
}
|
|
2074
2413
|
}
|
|
@@ -2077,12 +2416,14 @@ class Companies {
|
|
|
2077
2416
|
throw new errors.SchematicError({
|
|
2078
2417
|
statusCode: _response.error.statusCode,
|
|
2079
2418
|
body: _response.error.rawBody,
|
|
2419
|
+
rawResponse: _response.rawResponse,
|
|
2080
2420
|
});
|
|
2081
2421
|
case "timeout":
|
|
2082
|
-
throw new errors.SchematicTimeoutError();
|
|
2422
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /entity-trait-definitions/{entity_trait_definition_id}.");
|
|
2083
2423
|
case "unknown":
|
|
2084
2424
|
throw new errors.SchematicError({
|
|
2085
2425
|
message: _response.error.errorMessage,
|
|
2426
|
+
rawResponse: _response.rawResponse,
|
|
2086
2427
|
});
|
|
2087
2428
|
}
|
|
2088
2429
|
});
|
|
@@ -2094,18 +2435,22 @@ class Companies {
|
|
|
2094
2435
|
* @throws {@link Schematic.BadRequestError}
|
|
2095
2436
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2096
2437
|
* @throws {@link Schematic.ForbiddenError}
|
|
2438
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2097
2439
|
* @throws {@link Schematic.InternalServerError}
|
|
2098
2440
|
*
|
|
2099
2441
|
* @example
|
|
2100
2442
|
* await client.companies.countEntityTraitDefinitions()
|
|
2101
2443
|
*/
|
|
2102
2444
|
countEntityTraitDefinitions(request = {}, requestOptions) {
|
|
2103
|
-
|
|
2104
|
-
|
|
2445
|
+
return core.HttpResponsePromise.fromPromise(this.__countEntityTraitDefinitions(request, requestOptions));
|
|
2446
|
+
}
|
|
2447
|
+
__countEntityTraitDefinitions() {
|
|
2448
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
2449
|
+
var _a, _b, _c;
|
|
2105
2450
|
const { entityType, ids, q, traitType, limit, offset } = request;
|
|
2106
2451
|
const _queryParams = {};
|
|
2107
2452
|
if (entityType != null) {
|
|
2108
|
-
_queryParams["entity_type"] = entityType;
|
|
2453
|
+
_queryParams["entity_type"] = serializers.CountEntityTraitDefinitionsRequestEntityType.jsonOrThrow(entityType, { unrecognizedObjectKeys: "strip" });
|
|
2109
2454
|
}
|
|
2110
2455
|
if (ids != null) {
|
|
2111
2456
|
if (Array.isArray(ids)) {
|
|
@@ -2119,7 +2464,7 @@ class Companies {
|
|
|
2119
2464
|
_queryParams["q"] = q;
|
|
2120
2465
|
}
|
|
2121
2466
|
if (traitType != null) {
|
|
2122
|
-
_queryParams["trait_type"] = traitType;
|
|
2467
|
+
_queryParams["trait_type"] = serializers.CountEntityTraitDefinitionsRequestTraitType.jsonOrThrow(traitType, { unrecognizedObjectKeys: "strip" });
|
|
2123
2468
|
}
|
|
2124
2469
|
if (limit != null) {
|
|
2125
2470
|
_queryParams["limit"] = limit.toString();
|
|
@@ -2128,9 +2473,9 @@ class Companies {
|
|
|
2128
2473
|
_queryParams["offset"] = offset.toString();
|
|
2129
2474
|
}
|
|
2130
2475
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2131
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2476
|
+
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, "entity-trait-definitions/count"),
|
|
2132
2477
|
method: "GET",
|
|
2133
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2478
|
+
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),
|
|
2134
2479
|
contentType: "application/json",
|
|
2135
2480
|
queryParameters: _queryParams,
|
|
2136
2481
|
requestType: "json",
|
|
@@ -2139,13 +2484,16 @@ class Companies {
|
|
|
2139
2484
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2140
2485
|
});
|
|
2141
2486
|
if (_response.ok) {
|
|
2142
|
-
return
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2487
|
+
return {
|
|
2488
|
+
data: serializers.CountEntityTraitDefinitionsResponse.parseOrThrow(_response.body, {
|
|
2489
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2490
|
+
allowUnrecognizedUnionMembers: true,
|
|
2491
|
+
allowUnrecognizedEnumValues: true,
|
|
2492
|
+
skipValidation: true,
|
|
2493
|
+
breadcrumbsPrefix: ["response"],
|
|
2494
|
+
}),
|
|
2495
|
+
rawResponse: _response.rawResponse,
|
|
2496
|
+
};
|
|
2149
2497
|
}
|
|
2150
2498
|
if (_response.error.reason === "status-code") {
|
|
2151
2499
|
switch (_response.error.statusCode) {
|
|
@@ -2156,7 +2504,7 @@ class Companies {
|
|
|
2156
2504
|
allowUnrecognizedEnumValues: true,
|
|
2157
2505
|
skipValidation: true,
|
|
2158
2506
|
breadcrumbsPrefix: ["response"],
|
|
2159
|
-
}));
|
|
2507
|
+
}), _response.rawResponse);
|
|
2160
2508
|
case 401:
|
|
2161
2509
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2162
2510
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2164,7 +2512,7 @@ class Companies {
|
|
|
2164
2512
|
allowUnrecognizedEnumValues: true,
|
|
2165
2513
|
skipValidation: true,
|
|
2166
2514
|
breadcrumbsPrefix: ["response"],
|
|
2167
|
-
}));
|
|
2515
|
+
}), _response.rawResponse);
|
|
2168
2516
|
case 403:
|
|
2169
2517
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2170
2518
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2172,7 +2520,15 @@ class Companies {
|
|
|
2172
2520
|
allowUnrecognizedEnumValues: true,
|
|
2173
2521
|
skipValidation: true,
|
|
2174
2522
|
breadcrumbsPrefix: ["response"],
|
|
2175
|
-
}));
|
|
2523
|
+
}), _response.rawResponse);
|
|
2524
|
+
case 404:
|
|
2525
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2526
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2527
|
+
allowUnrecognizedUnionMembers: true,
|
|
2528
|
+
allowUnrecognizedEnumValues: true,
|
|
2529
|
+
skipValidation: true,
|
|
2530
|
+
breadcrumbsPrefix: ["response"],
|
|
2531
|
+
}), _response.rawResponse);
|
|
2176
2532
|
case 500:
|
|
2177
2533
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2178
2534
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2180,11 +2536,12 @@ class Companies {
|
|
|
2180
2536
|
allowUnrecognizedEnumValues: true,
|
|
2181
2537
|
skipValidation: true,
|
|
2182
2538
|
breadcrumbsPrefix: ["response"],
|
|
2183
|
-
}));
|
|
2539
|
+
}), _response.rawResponse);
|
|
2184
2540
|
default:
|
|
2185
2541
|
throw new errors.SchematicError({
|
|
2186
2542
|
statusCode: _response.error.statusCode,
|
|
2187
2543
|
body: _response.error.body,
|
|
2544
|
+
rawResponse: _response.rawResponse,
|
|
2188
2545
|
});
|
|
2189
2546
|
}
|
|
2190
2547
|
}
|
|
@@ -2193,12 +2550,14 @@ class Companies {
|
|
|
2193
2550
|
throw new errors.SchematicError({
|
|
2194
2551
|
statusCode: _response.error.statusCode,
|
|
2195
2552
|
body: _response.error.rawBody,
|
|
2553
|
+
rawResponse: _response.rawResponse,
|
|
2196
2554
|
});
|
|
2197
2555
|
case "timeout":
|
|
2198
|
-
throw new errors.SchematicTimeoutError();
|
|
2556
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-definitions/count.");
|
|
2199
2557
|
case "unknown":
|
|
2200
2558
|
throw new errors.SchematicError({
|
|
2201
2559
|
message: _response.error.errorMessage,
|
|
2560
|
+
rawResponse: _response.rawResponse,
|
|
2202
2561
|
});
|
|
2203
2562
|
}
|
|
2204
2563
|
});
|
|
@@ -2210,6 +2569,7 @@ class Companies {
|
|
|
2210
2569
|
* @throws {@link Schematic.BadRequestError}
|
|
2211
2570
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2212
2571
|
* @throws {@link Schematic.ForbiddenError}
|
|
2572
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2213
2573
|
* @throws {@link Schematic.InternalServerError}
|
|
2214
2574
|
*
|
|
2215
2575
|
* @example
|
|
@@ -2218,8 +2578,11 @@ class Companies {
|
|
|
2218
2578
|
* })
|
|
2219
2579
|
*/
|
|
2220
2580
|
getEntityTraitValues(request, requestOptions) {
|
|
2221
|
-
|
|
2581
|
+
return core.HttpResponsePromise.fromPromise(this.__getEntityTraitValues(request, requestOptions));
|
|
2582
|
+
}
|
|
2583
|
+
__getEntityTraitValues(request, requestOptions) {
|
|
2222
2584
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2585
|
+
var _a, _b, _c;
|
|
2223
2586
|
const { definitionId, q, limit, offset } = request;
|
|
2224
2587
|
const _queryParams = {};
|
|
2225
2588
|
_queryParams["definition_id"] = definitionId;
|
|
@@ -2233,9 +2596,9 @@ class Companies {
|
|
|
2233
2596
|
_queryParams["offset"] = offset.toString();
|
|
2234
2597
|
}
|
|
2235
2598
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2236
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2599
|
+
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, "entity-trait-values"),
|
|
2237
2600
|
method: "GET",
|
|
2238
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2601
|
+
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),
|
|
2239
2602
|
contentType: "application/json",
|
|
2240
2603
|
queryParameters: _queryParams,
|
|
2241
2604
|
requestType: "json",
|
|
@@ -2244,13 +2607,16 @@ class Companies {
|
|
|
2244
2607
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2245
2608
|
});
|
|
2246
2609
|
if (_response.ok) {
|
|
2247
|
-
return
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2610
|
+
return {
|
|
2611
|
+
data: serializers.GetEntityTraitValuesResponse.parseOrThrow(_response.body, {
|
|
2612
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2613
|
+
allowUnrecognizedUnionMembers: true,
|
|
2614
|
+
allowUnrecognizedEnumValues: true,
|
|
2615
|
+
skipValidation: true,
|
|
2616
|
+
breadcrumbsPrefix: ["response"],
|
|
2617
|
+
}),
|
|
2618
|
+
rawResponse: _response.rawResponse,
|
|
2619
|
+
};
|
|
2254
2620
|
}
|
|
2255
2621
|
if (_response.error.reason === "status-code") {
|
|
2256
2622
|
switch (_response.error.statusCode) {
|
|
@@ -2261,7 +2627,7 @@ class Companies {
|
|
|
2261
2627
|
allowUnrecognizedEnumValues: true,
|
|
2262
2628
|
skipValidation: true,
|
|
2263
2629
|
breadcrumbsPrefix: ["response"],
|
|
2264
|
-
}));
|
|
2630
|
+
}), _response.rawResponse);
|
|
2265
2631
|
case 401:
|
|
2266
2632
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2267
2633
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2269,7 +2635,7 @@ class Companies {
|
|
|
2269
2635
|
allowUnrecognizedEnumValues: true,
|
|
2270
2636
|
skipValidation: true,
|
|
2271
2637
|
breadcrumbsPrefix: ["response"],
|
|
2272
|
-
}));
|
|
2638
|
+
}), _response.rawResponse);
|
|
2273
2639
|
case 403:
|
|
2274
2640
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2275
2641
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2277,7 +2643,15 @@ class Companies {
|
|
|
2277
2643
|
allowUnrecognizedEnumValues: true,
|
|
2278
2644
|
skipValidation: true,
|
|
2279
2645
|
breadcrumbsPrefix: ["response"],
|
|
2280
|
-
}));
|
|
2646
|
+
}), _response.rawResponse);
|
|
2647
|
+
case 404:
|
|
2648
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2649
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2650
|
+
allowUnrecognizedUnionMembers: true,
|
|
2651
|
+
allowUnrecognizedEnumValues: true,
|
|
2652
|
+
skipValidation: true,
|
|
2653
|
+
breadcrumbsPrefix: ["response"],
|
|
2654
|
+
}), _response.rawResponse);
|
|
2281
2655
|
case 500:
|
|
2282
2656
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2283
2657
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2285,11 +2659,12 @@ class Companies {
|
|
|
2285
2659
|
allowUnrecognizedEnumValues: true,
|
|
2286
2660
|
skipValidation: true,
|
|
2287
2661
|
breadcrumbsPrefix: ["response"],
|
|
2288
|
-
}));
|
|
2662
|
+
}), _response.rawResponse);
|
|
2289
2663
|
default:
|
|
2290
2664
|
throw new errors.SchematicError({
|
|
2291
2665
|
statusCode: _response.error.statusCode,
|
|
2292
2666
|
body: _response.error.body,
|
|
2667
|
+
rawResponse: _response.rawResponse,
|
|
2293
2668
|
});
|
|
2294
2669
|
}
|
|
2295
2670
|
}
|
|
@@ -2298,12 +2673,14 @@ class Companies {
|
|
|
2298
2673
|
throw new errors.SchematicError({
|
|
2299
2674
|
statusCode: _response.error.statusCode,
|
|
2300
2675
|
body: _response.error.rawBody,
|
|
2676
|
+
rawResponse: _response.rawResponse,
|
|
2301
2677
|
});
|
|
2302
2678
|
case "timeout":
|
|
2303
|
-
throw new errors.SchematicTimeoutError();
|
|
2679
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /entity-trait-values.");
|
|
2304
2680
|
case "unknown":
|
|
2305
2681
|
throw new errors.SchematicError({
|
|
2306
2682
|
message: _response.error.errorMessage,
|
|
2683
|
+
rawResponse: _response.rawResponse,
|
|
2307
2684
|
});
|
|
2308
2685
|
}
|
|
2309
2686
|
});
|
|
@@ -2315,6 +2692,7 @@ class Companies {
|
|
|
2315
2692
|
* @throws {@link Schematic.BadRequestError}
|
|
2316
2693
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2317
2694
|
* @throws {@link Schematic.ForbiddenError}
|
|
2695
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2318
2696
|
* @throws {@link Schematic.InternalServerError}
|
|
2319
2697
|
*
|
|
2320
2698
|
* @example
|
|
@@ -2326,12 +2704,15 @@ class Companies {
|
|
|
2326
2704
|
* })
|
|
2327
2705
|
*/
|
|
2328
2706
|
upsertUserTrait(request, requestOptions) {
|
|
2329
|
-
|
|
2707
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertUserTrait(request, requestOptions));
|
|
2708
|
+
}
|
|
2709
|
+
__upsertUserTrait(request, requestOptions) {
|
|
2330
2710
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2711
|
+
var _a, _b, _c;
|
|
2331
2712
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2332
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2713
|
+
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, "user-traits"),
|
|
2333
2714
|
method: "POST",
|
|
2334
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2715
|
+
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),
|
|
2335
2716
|
contentType: "application/json",
|
|
2336
2717
|
requestType: "json",
|
|
2337
2718
|
body: serializers.UpsertTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -2340,13 +2721,16 @@ class Companies {
|
|
|
2340
2721
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2341
2722
|
});
|
|
2342
2723
|
if (_response.ok) {
|
|
2343
|
-
return
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2724
|
+
return {
|
|
2725
|
+
data: serializers.UpsertUserTraitResponse.parseOrThrow(_response.body, {
|
|
2726
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2727
|
+
allowUnrecognizedUnionMembers: true,
|
|
2728
|
+
allowUnrecognizedEnumValues: true,
|
|
2729
|
+
skipValidation: true,
|
|
2730
|
+
breadcrumbsPrefix: ["response"],
|
|
2731
|
+
}),
|
|
2732
|
+
rawResponse: _response.rawResponse,
|
|
2733
|
+
};
|
|
2350
2734
|
}
|
|
2351
2735
|
if (_response.error.reason === "status-code") {
|
|
2352
2736
|
switch (_response.error.statusCode) {
|
|
@@ -2357,7 +2741,7 @@ class Companies {
|
|
|
2357
2741
|
allowUnrecognizedEnumValues: true,
|
|
2358
2742
|
skipValidation: true,
|
|
2359
2743
|
breadcrumbsPrefix: ["response"],
|
|
2360
|
-
}));
|
|
2744
|
+
}), _response.rawResponse);
|
|
2361
2745
|
case 401:
|
|
2362
2746
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2363
2747
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2365,7 +2749,7 @@ class Companies {
|
|
|
2365
2749
|
allowUnrecognizedEnumValues: true,
|
|
2366
2750
|
skipValidation: true,
|
|
2367
2751
|
breadcrumbsPrefix: ["response"],
|
|
2368
|
-
}));
|
|
2752
|
+
}), _response.rawResponse);
|
|
2369
2753
|
case 403:
|
|
2370
2754
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2371
2755
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2373,7 +2757,15 @@ class Companies {
|
|
|
2373
2757
|
allowUnrecognizedEnumValues: true,
|
|
2374
2758
|
skipValidation: true,
|
|
2375
2759
|
breadcrumbsPrefix: ["response"],
|
|
2376
|
-
}));
|
|
2760
|
+
}), _response.rawResponse);
|
|
2761
|
+
case 404:
|
|
2762
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2763
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2764
|
+
allowUnrecognizedUnionMembers: true,
|
|
2765
|
+
allowUnrecognizedEnumValues: true,
|
|
2766
|
+
skipValidation: true,
|
|
2767
|
+
breadcrumbsPrefix: ["response"],
|
|
2768
|
+
}), _response.rawResponse);
|
|
2377
2769
|
case 500:
|
|
2378
2770
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2379
2771
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2381,11 +2773,12 @@ class Companies {
|
|
|
2381
2773
|
allowUnrecognizedEnumValues: true,
|
|
2382
2774
|
skipValidation: true,
|
|
2383
2775
|
breadcrumbsPrefix: ["response"],
|
|
2384
|
-
}));
|
|
2776
|
+
}), _response.rawResponse);
|
|
2385
2777
|
default:
|
|
2386
2778
|
throw new errors.SchematicError({
|
|
2387
2779
|
statusCode: _response.error.statusCode,
|
|
2388
2780
|
body: _response.error.body,
|
|
2781
|
+
rawResponse: _response.rawResponse,
|
|
2389
2782
|
});
|
|
2390
2783
|
}
|
|
2391
2784
|
}
|
|
@@ -2394,12 +2787,14 @@ class Companies {
|
|
|
2394
2787
|
throw new errors.SchematicError({
|
|
2395
2788
|
statusCode: _response.error.statusCode,
|
|
2396
2789
|
body: _response.error.rawBody,
|
|
2790
|
+
rawResponse: _response.rawResponse,
|
|
2397
2791
|
});
|
|
2398
2792
|
case "timeout":
|
|
2399
|
-
throw new errors.SchematicTimeoutError();
|
|
2793
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /user-traits.");
|
|
2400
2794
|
case "unknown":
|
|
2401
2795
|
throw new errors.SchematicError({
|
|
2402
2796
|
message: _response.error.errorMessage,
|
|
2797
|
+
rawResponse: _response.rawResponse,
|
|
2403
2798
|
});
|
|
2404
2799
|
}
|
|
2405
2800
|
});
|
|
@@ -2411,14 +2806,18 @@ class Companies {
|
|
|
2411
2806
|
* @throws {@link Schematic.BadRequestError}
|
|
2412
2807
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2413
2808
|
* @throws {@link Schematic.ForbiddenError}
|
|
2809
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2414
2810
|
* @throws {@link Schematic.InternalServerError}
|
|
2415
2811
|
*
|
|
2416
2812
|
* @example
|
|
2417
2813
|
* await client.companies.listUsers()
|
|
2418
2814
|
*/
|
|
2419
2815
|
listUsers(request = {}, requestOptions) {
|
|
2420
|
-
|
|
2421
|
-
|
|
2816
|
+
return core.HttpResponsePromise.fromPromise(this.__listUsers(request, requestOptions));
|
|
2817
|
+
}
|
|
2818
|
+
__listUsers() {
|
|
2819
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
2820
|
+
var _a, _b, _c;
|
|
2422
2821
|
const { companyId, ids, planId, q, limit, offset } = request;
|
|
2423
2822
|
const _queryParams = {};
|
|
2424
2823
|
if (companyId != null) {
|
|
@@ -2445,9 +2844,9 @@ class Companies {
|
|
|
2445
2844
|
_queryParams["offset"] = offset.toString();
|
|
2446
2845
|
}
|
|
2447
2846
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2448
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2847
|
+
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, "users"),
|
|
2449
2848
|
method: "GET",
|
|
2450
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2849
|
+
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),
|
|
2451
2850
|
contentType: "application/json",
|
|
2452
2851
|
queryParameters: _queryParams,
|
|
2453
2852
|
requestType: "json",
|
|
@@ -2456,13 +2855,16 @@ class Companies {
|
|
|
2456
2855
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2457
2856
|
});
|
|
2458
2857
|
if (_response.ok) {
|
|
2459
|
-
return
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2858
|
+
return {
|
|
2859
|
+
data: serializers.ListUsersResponse.parseOrThrow(_response.body, {
|
|
2860
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2861
|
+
allowUnrecognizedUnionMembers: true,
|
|
2862
|
+
allowUnrecognizedEnumValues: true,
|
|
2863
|
+
skipValidation: true,
|
|
2864
|
+
breadcrumbsPrefix: ["response"],
|
|
2865
|
+
}),
|
|
2866
|
+
rawResponse: _response.rawResponse,
|
|
2867
|
+
};
|
|
2466
2868
|
}
|
|
2467
2869
|
if (_response.error.reason === "status-code") {
|
|
2468
2870
|
switch (_response.error.statusCode) {
|
|
@@ -2473,7 +2875,7 @@ class Companies {
|
|
|
2473
2875
|
allowUnrecognizedEnumValues: true,
|
|
2474
2876
|
skipValidation: true,
|
|
2475
2877
|
breadcrumbsPrefix: ["response"],
|
|
2476
|
-
}));
|
|
2878
|
+
}), _response.rawResponse);
|
|
2477
2879
|
case 401:
|
|
2478
2880
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2479
2881
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2481,7 +2883,7 @@ class Companies {
|
|
|
2481
2883
|
allowUnrecognizedEnumValues: true,
|
|
2482
2884
|
skipValidation: true,
|
|
2483
2885
|
breadcrumbsPrefix: ["response"],
|
|
2484
|
-
}));
|
|
2886
|
+
}), _response.rawResponse);
|
|
2485
2887
|
case 403:
|
|
2486
2888
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2487
2889
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2489,7 +2891,15 @@ class Companies {
|
|
|
2489
2891
|
allowUnrecognizedEnumValues: true,
|
|
2490
2892
|
skipValidation: true,
|
|
2491
2893
|
breadcrumbsPrefix: ["response"],
|
|
2492
|
-
}));
|
|
2894
|
+
}), _response.rawResponse);
|
|
2895
|
+
case 404:
|
|
2896
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2897
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2898
|
+
allowUnrecognizedUnionMembers: true,
|
|
2899
|
+
allowUnrecognizedEnumValues: true,
|
|
2900
|
+
skipValidation: true,
|
|
2901
|
+
breadcrumbsPrefix: ["response"],
|
|
2902
|
+
}), _response.rawResponse);
|
|
2493
2903
|
case 500:
|
|
2494
2904
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2495
2905
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2497,11 +2907,12 @@ class Companies {
|
|
|
2497
2907
|
allowUnrecognizedEnumValues: true,
|
|
2498
2908
|
skipValidation: true,
|
|
2499
2909
|
breadcrumbsPrefix: ["response"],
|
|
2500
|
-
}));
|
|
2910
|
+
}), _response.rawResponse);
|
|
2501
2911
|
default:
|
|
2502
2912
|
throw new errors.SchematicError({
|
|
2503
2913
|
statusCode: _response.error.statusCode,
|
|
2504
2914
|
body: _response.error.body,
|
|
2915
|
+
rawResponse: _response.rawResponse,
|
|
2505
2916
|
});
|
|
2506
2917
|
}
|
|
2507
2918
|
}
|
|
@@ -2510,12 +2921,14 @@ class Companies {
|
|
|
2510
2921
|
throw new errors.SchematicError({
|
|
2511
2922
|
statusCode: _response.error.statusCode,
|
|
2512
2923
|
body: _response.error.rawBody,
|
|
2924
|
+
rawResponse: _response.rawResponse,
|
|
2513
2925
|
});
|
|
2514
2926
|
case "timeout":
|
|
2515
|
-
throw new errors.SchematicTimeoutError();
|
|
2927
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users.");
|
|
2516
2928
|
case "unknown":
|
|
2517
2929
|
throw new errors.SchematicError({
|
|
2518
2930
|
message: _response.error.errorMessage,
|
|
2931
|
+
rawResponse: _response.rawResponse,
|
|
2519
2932
|
});
|
|
2520
2933
|
}
|
|
2521
2934
|
});
|
|
@@ -2527,10 +2940,14 @@ class Companies {
|
|
|
2527
2940
|
* @throws {@link Schematic.BadRequestError}
|
|
2528
2941
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2529
2942
|
* @throws {@link Schematic.ForbiddenError}
|
|
2943
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2530
2944
|
* @throws {@link Schematic.InternalServerError}
|
|
2531
2945
|
*
|
|
2532
2946
|
* @example
|
|
2533
2947
|
* await client.companies.upsertUser({
|
|
2948
|
+
* companies: [{
|
|
2949
|
+
* "key": "value"
|
|
2950
|
+
* }],
|
|
2534
2951
|
* company: {
|
|
2535
2952
|
* "key": "value"
|
|
2536
2953
|
* },
|
|
@@ -2540,12 +2957,15 @@ class Companies {
|
|
|
2540
2957
|
* })
|
|
2541
2958
|
*/
|
|
2542
2959
|
upsertUser(request, requestOptions) {
|
|
2543
|
-
|
|
2960
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertUser(request, requestOptions));
|
|
2961
|
+
}
|
|
2962
|
+
__upsertUser(request, requestOptions) {
|
|
2544
2963
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2964
|
+
var _a, _b, _c;
|
|
2545
2965
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2546
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
2966
|
+
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, "users"),
|
|
2547
2967
|
method: "POST",
|
|
2548
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2968
|
+
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),
|
|
2549
2969
|
contentType: "application/json",
|
|
2550
2970
|
requestType: "json",
|
|
2551
2971
|
body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -2554,13 +2974,16 @@ class Companies {
|
|
|
2554
2974
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2555
2975
|
});
|
|
2556
2976
|
if (_response.ok) {
|
|
2557
|
-
return
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2977
|
+
return {
|
|
2978
|
+
data: serializers.UpsertUserResponse.parseOrThrow(_response.body, {
|
|
2979
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2980
|
+
allowUnrecognizedUnionMembers: true,
|
|
2981
|
+
allowUnrecognizedEnumValues: true,
|
|
2982
|
+
skipValidation: true,
|
|
2983
|
+
breadcrumbsPrefix: ["response"],
|
|
2984
|
+
}),
|
|
2985
|
+
rawResponse: _response.rawResponse,
|
|
2986
|
+
};
|
|
2564
2987
|
}
|
|
2565
2988
|
if (_response.error.reason === "status-code") {
|
|
2566
2989
|
switch (_response.error.statusCode) {
|
|
@@ -2571,7 +2994,7 @@ class Companies {
|
|
|
2571
2994
|
allowUnrecognizedEnumValues: true,
|
|
2572
2995
|
skipValidation: true,
|
|
2573
2996
|
breadcrumbsPrefix: ["response"],
|
|
2574
|
-
}));
|
|
2997
|
+
}), _response.rawResponse);
|
|
2575
2998
|
case 401:
|
|
2576
2999
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2577
3000
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2579,7 +3002,7 @@ class Companies {
|
|
|
2579
3002
|
allowUnrecognizedEnumValues: true,
|
|
2580
3003
|
skipValidation: true,
|
|
2581
3004
|
breadcrumbsPrefix: ["response"],
|
|
2582
|
-
}));
|
|
3005
|
+
}), _response.rawResponse);
|
|
2583
3006
|
case 403:
|
|
2584
3007
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2585
3008
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2587,7 +3010,15 @@ class Companies {
|
|
|
2587
3010
|
allowUnrecognizedEnumValues: true,
|
|
2588
3011
|
skipValidation: true,
|
|
2589
3012
|
breadcrumbsPrefix: ["response"],
|
|
2590
|
-
}));
|
|
3013
|
+
}), _response.rawResponse);
|
|
3014
|
+
case 404:
|
|
3015
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3016
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3017
|
+
allowUnrecognizedUnionMembers: true,
|
|
3018
|
+
allowUnrecognizedEnumValues: true,
|
|
3019
|
+
skipValidation: true,
|
|
3020
|
+
breadcrumbsPrefix: ["response"],
|
|
3021
|
+
}), _response.rawResponse);
|
|
2591
3022
|
case 500:
|
|
2592
3023
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2593
3024
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2595,11 +3026,12 @@ class Companies {
|
|
|
2595
3026
|
allowUnrecognizedEnumValues: true,
|
|
2596
3027
|
skipValidation: true,
|
|
2597
3028
|
breadcrumbsPrefix: ["response"],
|
|
2598
|
-
}));
|
|
3029
|
+
}), _response.rawResponse);
|
|
2599
3030
|
default:
|
|
2600
3031
|
throw new errors.SchematicError({
|
|
2601
3032
|
statusCode: _response.error.statusCode,
|
|
2602
3033
|
body: _response.error.body,
|
|
3034
|
+
rawResponse: _response.rawResponse,
|
|
2603
3035
|
});
|
|
2604
3036
|
}
|
|
2605
3037
|
}
|
|
@@ -2608,12 +3040,14 @@ class Companies {
|
|
|
2608
3040
|
throw new errors.SchematicError({
|
|
2609
3041
|
statusCode: _response.error.statusCode,
|
|
2610
3042
|
body: _response.error.rawBody,
|
|
3043
|
+
rawResponse: _response.rawResponse,
|
|
2611
3044
|
});
|
|
2612
3045
|
case "timeout":
|
|
2613
|
-
throw new errors.SchematicTimeoutError();
|
|
3046
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users.");
|
|
2614
3047
|
case "unknown":
|
|
2615
3048
|
throw new errors.SchematicError({
|
|
2616
3049
|
message: _response.error.errorMessage,
|
|
3050
|
+
rawResponse: _response.rawResponse,
|
|
2617
3051
|
});
|
|
2618
3052
|
}
|
|
2619
3053
|
});
|
|
@@ -2631,12 +3065,15 @@ class Companies {
|
|
|
2631
3065
|
* await client.companies.getUser("user_id")
|
|
2632
3066
|
*/
|
|
2633
3067
|
getUser(userId, requestOptions) {
|
|
2634
|
-
|
|
3068
|
+
return core.HttpResponsePromise.fromPromise(this.__getUser(userId, requestOptions));
|
|
3069
|
+
}
|
|
3070
|
+
__getUser(userId, requestOptions) {
|
|
2635
3071
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3072
|
+
var _a, _b, _c;
|
|
2636
3073
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2637
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3074
|
+
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, `users/${encodeURIComponent(userId)}`),
|
|
2638
3075
|
method: "GET",
|
|
2639
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3076
|
+
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),
|
|
2640
3077
|
contentType: "application/json",
|
|
2641
3078
|
requestType: "json",
|
|
2642
3079
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2644,13 +3081,16 @@ class Companies {
|
|
|
2644
3081
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2645
3082
|
});
|
|
2646
3083
|
if (_response.ok) {
|
|
2647
|
-
return
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
3084
|
+
return {
|
|
3085
|
+
data: serializers.GetUserResponse.parseOrThrow(_response.body, {
|
|
3086
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3087
|
+
allowUnrecognizedUnionMembers: true,
|
|
3088
|
+
allowUnrecognizedEnumValues: true,
|
|
3089
|
+
skipValidation: true,
|
|
3090
|
+
breadcrumbsPrefix: ["response"],
|
|
3091
|
+
}),
|
|
3092
|
+
rawResponse: _response.rawResponse,
|
|
3093
|
+
};
|
|
2654
3094
|
}
|
|
2655
3095
|
if (_response.error.reason === "status-code") {
|
|
2656
3096
|
switch (_response.error.statusCode) {
|
|
@@ -2661,7 +3101,7 @@ class Companies {
|
|
|
2661
3101
|
allowUnrecognizedEnumValues: true,
|
|
2662
3102
|
skipValidation: true,
|
|
2663
3103
|
breadcrumbsPrefix: ["response"],
|
|
2664
|
-
}));
|
|
3104
|
+
}), _response.rawResponse);
|
|
2665
3105
|
case 403:
|
|
2666
3106
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2667
3107
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2669,7 +3109,7 @@ class Companies {
|
|
|
2669
3109
|
allowUnrecognizedEnumValues: true,
|
|
2670
3110
|
skipValidation: true,
|
|
2671
3111
|
breadcrumbsPrefix: ["response"],
|
|
2672
|
-
}));
|
|
3112
|
+
}), _response.rawResponse);
|
|
2673
3113
|
case 404:
|
|
2674
3114
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2675
3115
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2677,7 +3117,7 @@ class Companies {
|
|
|
2677
3117
|
allowUnrecognizedEnumValues: true,
|
|
2678
3118
|
skipValidation: true,
|
|
2679
3119
|
breadcrumbsPrefix: ["response"],
|
|
2680
|
-
}));
|
|
3120
|
+
}), _response.rawResponse);
|
|
2681
3121
|
case 500:
|
|
2682
3122
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2683
3123
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2685,11 +3125,12 @@ class Companies {
|
|
|
2685
3125
|
allowUnrecognizedEnumValues: true,
|
|
2686
3126
|
skipValidation: true,
|
|
2687
3127
|
breadcrumbsPrefix: ["response"],
|
|
2688
|
-
}));
|
|
3128
|
+
}), _response.rawResponse);
|
|
2689
3129
|
default:
|
|
2690
3130
|
throw new errors.SchematicError({
|
|
2691
3131
|
statusCode: _response.error.statusCode,
|
|
2692
3132
|
body: _response.error.body,
|
|
3133
|
+
rawResponse: _response.rawResponse,
|
|
2693
3134
|
});
|
|
2694
3135
|
}
|
|
2695
3136
|
}
|
|
@@ -2698,12 +3139,14 @@ class Companies {
|
|
|
2698
3139
|
throw new errors.SchematicError({
|
|
2699
3140
|
statusCode: _response.error.statusCode,
|
|
2700
3141
|
body: _response.error.rawBody,
|
|
3142
|
+
rawResponse: _response.rawResponse,
|
|
2701
3143
|
});
|
|
2702
3144
|
case "timeout":
|
|
2703
|
-
throw new errors.SchematicTimeoutError();
|
|
3145
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/{user_id}.");
|
|
2704
3146
|
case "unknown":
|
|
2705
3147
|
throw new errors.SchematicError({
|
|
2706
3148
|
message: _response.error.errorMessage,
|
|
3149
|
+
rawResponse: _response.rawResponse,
|
|
2707
3150
|
});
|
|
2708
3151
|
}
|
|
2709
3152
|
});
|
|
@@ -2715,18 +3158,22 @@ class Companies {
|
|
|
2715
3158
|
* @throws {@link Schematic.BadRequestError}
|
|
2716
3159
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2717
3160
|
* @throws {@link Schematic.ForbiddenError}
|
|
3161
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2718
3162
|
* @throws {@link Schematic.InternalServerError}
|
|
2719
3163
|
*
|
|
2720
3164
|
* @example
|
|
2721
3165
|
* await client.companies.deleteUser("user_id")
|
|
2722
3166
|
*/
|
|
2723
3167
|
deleteUser(userId, requestOptions) {
|
|
2724
|
-
|
|
3168
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteUser(userId, requestOptions));
|
|
3169
|
+
}
|
|
3170
|
+
__deleteUser(userId, requestOptions) {
|
|
2725
3171
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3172
|
+
var _a, _b, _c;
|
|
2726
3173
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2727
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3174
|
+
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, `users/${encodeURIComponent(userId)}`),
|
|
2728
3175
|
method: "DELETE",
|
|
2729
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3176
|
+
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),
|
|
2730
3177
|
contentType: "application/json",
|
|
2731
3178
|
requestType: "json",
|
|
2732
3179
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -2734,13 +3181,16 @@ class Companies {
|
|
|
2734
3181
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2735
3182
|
});
|
|
2736
3183
|
if (_response.ok) {
|
|
2737
|
-
return
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
3184
|
+
return {
|
|
3185
|
+
data: serializers.DeleteUserResponse.parseOrThrow(_response.body, {
|
|
3186
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3187
|
+
allowUnrecognizedUnionMembers: true,
|
|
3188
|
+
allowUnrecognizedEnumValues: true,
|
|
3189
|
+
skipValidation: true,
|
|
3190
|
+
breadcrumbsPrefix: ["response"],
|
|
3191
|
+
}),
|
|
3192
|
+
rawResponse: _response.rawResponse,
|
|
3193
|
+
};
|
|
2744
3194
|
}
|
|
2745
3195
|
if (_response.error.reason === "status-code") {
|
|
2746
3196
|
switch (_response.error.statusCode) {
|
|
@@ -2751,7 +3201,7 @@ class Companies {
|
|
|
2751
3201
|
allowUnrecognizedEnumValues: true,
|
|
2752
3202
|
skipValidation: true,
|
|
2753
3203
|
breadcrumbsPrefix: ["response"],
|
|
2754
|
-
}));
|
|
3204
|
+
}), _response.rawResponse);
|
|
2755
3205
|
case 401:
|
|
2756
3206
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2757
3207
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2759,7 +3209,7 @@ class Companies {
|
|
|
2759
3209
|
allowUnrecognizedEnumValues: true,
|
|
2760
3210
|
skipValidation: true,
|
|
2761
3211
|
breadcrumbsPrefix: ["response"],
|
|
2762
|
-
}));
|
|
3212
|
+
}), _response.rawResponse);
|
|
2763
3213
|
case 403:
|
|
2764
3214
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2765
3215
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2767,7 +3217,15 @@ class Companies {
|
|
|
2767
3217
|
allowUnrecognizedEnumValues: true,
|
|
2768
3218
|
skipValidation: true,
|
|
2769
3219
|
breadcrumbsPrefix: ["response"],
|
|
2770
|
-
}));
|
|
3220
|
+
}), _response.rawResponse);
|
|
3221
|
+
case 404:
|
|
3222
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3223
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3224
|
+
allowUnrecognizedUnionMembers: true,
|
|
3225
|
+
allowUnrecognizedEnumValues: true,
|
|
3226
|
+
skipValidation: true,
|
|
3227
|
+
breadcrumbsPrefix: ["response"],
|
|
3228
|
+
}), _response.rawResponse);
|
|
2771
3229
|
case 500:
|
|
2772
3230
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2773
3231
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2775,11 +3233,12 @@ class Companies {
|
|
|
2775
3233
|
allowUnrecognizedEnumValues: true,
|
|
2776
3234
|
skipValidation: true,
|
|
2777
3235
|
breadcrumbsPrefix: ["response"],
|
|
2778
|
-
}));
|
|
3236
|
+
}), _response.rawResponse);
|
|
2779
3237
|
default:
|
|
2780
3238
|
throw new errors.SchematicError({
|
|
2781
3239
|
statusCode: _response.error.statusCode,
|
|
2782
3240
|
body: _response.error.body,
|
|
3241
|
+
rawResponse: _response.rawResponse,
|
|
2783
3242
|
});
|
|
2784
3243
|
}
|
|
2785
3244
|
}
|
|
@@ -2788,12 +3247,14 @@ class Companies {
|
|
|
2788
3247
|
throw new errors.SchematicError({
|
|
2789
3248
|
statusCode: _response.error.statusCode,
|
|
2790
3249
|
body: _response.error.rawBody,
|
|
3250
|
+
rawResponse: _response.rawResponse,
|
|
2791
3251
|
});
|
|
2792
3252
|
case "timeout":
|
|
2793
|
-
throw new errors.SchematicTimeoutError();
|
|
3253
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /users/{user_id}.");
|
|
2794
3254
|
case "unknown":
|
|
2795
3255
|
throw new errors.SchematicError({
|
|
2796
3256
|
message: _response.error.errorMessage,
|
|
3257
|
+
rawResponse: _response.rawResponse,
|
|
2797
3258
|
});
|
|
2798
3259
|
}
|
|
2799
3260
|
});
|
|
@@ -2805,14 +3266,18 @@ class Companies {
|
|
|
2805
3266
|
* @throws {@link Schematic.BadRequestError}
|
|
2806
3267
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2807
3268
|
* @throws {@link Schematic.ForbiddenError}
|
|
3269
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2808
3270
|
* @throws {@link Schematic.InternalServerError}
|
|
2809
3271
|
*
|
|
2810
3272
|
* @example
|
|
2811
3273
|
* await client.companies.countUsers()
|
|
2812
3274
|
*/
|
|
2813
3275
|
countUsers(request = {}, requestOptions) {
|
|
2814
|
-
|
|
2815
|
-
|
|
3276
|
+
return core.HttpResponsePromise.fromPromise(this.__countUsers(request, requestOptions));
|
|
3277
|
+
}
|
|
3278
|
+
__countUsers() {
|
|
3279
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
3280
|
+
var _a, _b, _c;
|
|
2816
3281
|
const { companyId, ids, planId, q, limit, offset } = request;
|
|
2817
3282
|
const _queryParams = {};
|
|
2818
3283
|
if (companyId != null) {
|
|
@@ -2839,9 +3304,9 @@ class Companies {
|
|
|
2839
3304
|
_queryParams["offset"] = offset.toString();
|
|
2840
3305
|
}
|
|
2841
3306
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2842
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3307
|
+
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, "users/count"),
|
|
2843
3308
|
method: "GET",
|
|
2844
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3309
|
+
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),
|
|
2845
3310
|
contentType: "application/json",
|
|
2846
3311
|
queryParameters: _queryParams,
|
|
2847
3312
|
requestType: "json",
|
|
@@ -2850,13 +3315,16 @@ class Companies {
|
|
|
2850
3315
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2851
3316
|
});
|
|
2852
3317
|
if (_response.ok) {
|
|
2853
|
-
return
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
3318
|
+
return {
|
|
3319
|
+
data: serializers.CountUsersResponse.parseOrThrow(_response.body, {
|
|
3320
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3321
|
+
allowUnrecognizedUnionMembers: true,
|
|
3322
|
+
allowUnrecognizedEnumValues: true,
|
|
3323
|
+
skipValidation: true,
|
|
3324
|
+
breadcrumbsPrefix: ["response"],
|
|
3325
|
+
}),
|
|
3326
|
+
rawResponse: _response.rawResponse,
|
|
3327
|
+
};
|
|
2860
3328
|
}
|
|
2861
3329
|
if (_response.error.reason === "status-code") {
|
|
2862
3330
|
switch (_response.error.statusCode) {
|
|
@@ -2867,7 +3335,7 @@ class Companies {
|
|
|
2867
3335
|
allowUnrecognizedEnumValues: true,
|
|
2868
3336
|
skipValidation: true,
|
|
2869
3337
|
breadcrumbsPrefix: ["response"],
|
|
2870
|
-
}));
|
|
3338
|
+
}), _response.rawResponse);
|
|
2871
3339
|
case 401:
|
|
2872
3340
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2873
3341
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2875,7 +3343,7 @@ class Companies {
|
|
|
2875
3343
|
allowUnrecognizedEnumValues: true,
|
|
2876
3344
|
skipValidation: true,
|
|
2877
3345
|
breadcrumbsPrefix: ["response"],
|
|
2878
|
-
}));
|
|
3346
|
+
}), _response.rawResponse);
|
|
2879
3347
|
case 403:
|
|
2880
3348
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2881
3349
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2883,7 +3351,15 @@ class Companies {
|
|
|
2883
3351
|
allowUnrecognizedEnumValues: true,
|
|
2884
3352
|
skipValidation: true,
|
|
2885
3353
|
breadcrumbsPrefix: ["response"],
|
|
2886
|
-
}));
|
|
3354
|
+
}), _response.rawResponse);
|
|
3355
|
+
case 404:
|
|
3356
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3357
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3358
|
+
allowUnrecognizedUnionMembers: true,
|
|
3359
|
+
allowUnrecognizedEnumValues: true,
|
|
3360
|
+
skipValidation: true,
|
|
3361
|
+
breadcrumbsPrefix: ["response"],
|
|
3362
|
+
}), _response.rawResponse);
|
|
2887
3363
|
case 500:
|
|
2888
3364
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2889
3365
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2891,11 +3367,12 @@ class Companies {
|
|
|
2891
3367
|
allowUnrecognizedEnumValues: true,
|
|
2892
3368
|
skipValidation: true,
|
|
2893
3369
|
breadcrumbsPrefix: ["response"],
|
|
2894
|
-
}));
|
|
3370
|
+
}), _response.rawResponse);
|
|
2895
3371
|
default:
|
|
2896
3372
|
throw new errors.SchematicError({
|
|
2897
3373
|
statusCode: _response.error.statusCode,
|
|
2898
3374
|
body: _response.error.body,
|
|
3375
|
+
rawResponse: _response.rawResponse,
|
|
2899
3376
|
});
|
|
2900
3377
|
}
|
|
2901
3378
|
}
|
|
@@ -2904,12 +3381,14 @@ class Companies {
|
|
|
2904
3381
|
throw new errors.SchematicError({
|
|
2905
3382
|
statusCode: _response.error.statusCode,
|
|
2906
3383
|
body: _response.error.rawBody,
|
|
3384
|
+
rawResponse: _response.rawResponse,
|
|
2907
3385
|
});
|
|
2908
3386
|
case "timeout":
|
|
2909
|
-
throw new errors.SchematicTimeoutError();
|
|
3387
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/count.");
|
|
2910
3388
|
case "unknown":
|
|
2911
3389
|
throw new errors.SchematicError({
|
|
2912
3390
|
message: _response.error.errorMessage,
|
|
3391
|
+
rawResponse: _response.rawResponse,
|
|
2913
3392
|
});
|
|
2914
3393
|
}
|
|
2915
3394
|
});
|
|
@@ -2921,10 +3400,14 @@ class Companies {
|
|
|
2921
3400
|
* @throws {@link Schematic.BadRequestError}
|
|
2922
3401
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2923
3402
|
* @throws {@link Schematic.ForbiddenError}
|
|
3403
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2924
3404
|
* @throws {@link Schematic.InternalServerError}
|
|
2925
3405
|
*
|
|
2926
3406
|
* @example
|
|
2927
3407
|
* await client.companies.createUser({
|
|
3408
|
+
* companies: [{
|
|
3409
|
+
* "key": "value"
|
|
3410
|
+
* }],
|
|
2928
3411
|
* company: {
|
|
2929
3412
|
* "key": "value"
|
|
2930
3413
|
* },
|
|
@@ -2934,12 +3417,15 @@ class Companies {
|
|
|
2934
3417
|
* })
|
|
2935
3418
|
*/
|
|
2936
3419
|
createUser(request, requestOptions) {
|
|
2937
|
-
|
|
3420
|
+
return core.HttpResponsePromise.fromPromise(this.__createUser(request, requestOptions));
|
|
3421
|
+
}
|
|
3422
|
+
__createUser(request, requestOptions) {
|
|
2938
3423
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3424
|
+
var _a, _b, _c;
|
|
2939
3425
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2940
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3426
|
+
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, "users/create"),
|
|
2941
3427
|
method: "POST",
|
|
2942
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3428
|
+
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),
|
|
2943
3429
|
contentType: "application/json",
|
|
2944
3430
|
requestType: "json",
|
|
2945
3431
|
body: serializers.UpsertUserRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -2948,13 +3434,16 @@ class Companies {
|
|
|
2948
3434
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2949
3435
|
});
|
|
2950
3436
|
if (_response.ok) {
|
|
2951
|
-
return
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
3437
|
+
return {
|
|
3438
|
+
data: serializers.CreateUserResponse.parseOrThrow(_response.body, {
|
|
3439
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3440
|
+
allowUnrecognizedUnionMembers: true,
|
|
3441
|
+
allowUnrecognizedEnumValues: true,
|
|
3442
|
+
skipValidation: true,
|
|
3443
|
+
breadcrumbsPrefix: ["response"],
|
|
3444
|
+
}),
|
|
3445
|
+
rawResponse: _response.rawResponse,
|
|
3446
|
+
};
|
|
2958
3447
|
}
|
|
2959
3448
|
if (_response.error.reason === "status-code") {
|
|
2960
3449
|
switch (_response.error.statusCode) {
|
|
@@ -2965,7 +3454,7 @@ class Companies {
|
|
|
2965
3454
|
allowUnrecognizedEnumValues: true,
|
|
2966
3455
|
skipValidation: true,
|
|
2967
3456
|
breadcrumbsPrefix: ["response"],
|
|
2968
|
-
}));
|
|
3457
|
+
}), _response.rawResponse);
|
|
2969
3458
|
case 401:
|
|
2970
3459
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2971
3460
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2973,7 +3462,7 @@ class Companies {
|
|
|
2973
3462
|
allowUnrecognizedEnumValues: true,
|
|
2974
3463
|
skipValidation: true,
|
|
2975
3464
|
breadcrumbsPrefix: ["response"],
|
|
2976
|
-
}));
|
|
3465
|
+
}), _response.rawResponse);
|
|
2977
3466
|
case 403:
|
|
2978
3467
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2979
3468
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2981,7 +3470,15 @@ class Companies {
|
|
|
2981
3470
|
allowUnrecognizedEnumValues: true,
|
|
2982
3471
|
skipValidation: true,
|
|
2983
3472
|
breadcrumbsPrefix: ["response"],
|
|
2984
|
-
}));
|
|
3473
|
+
}), _response.rawResponse);
|
|
3474
|
+
case 404:
|
|
3475
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3476
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3477
|
+
allowUnrecognizedUnionMembers: true,
|
|
3478
|
+
allowUnrecognizedEnumValues: true,
|
|
3479
|
+
skipValidation: true,
|
|
3480
|
+
breadcrumbsPrefix: ["response"],
|
|
3481
|
+
}), _response.rawResponse);
|
|
2985
3482
|
case 500:
|
|
2986
3483
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2987
3484
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2989,11 +3486,12 @@ class Companies {
|
|
|
2989
3486
|
allowUnrecognizedEnumValues: true,
|
|
2990
3487
|
skipValidation: true,
|
|
2991
3488
|
breadcrumbsPrefix: ["response"],
|
|
2992
|
-
}));
|
|
3489
|
+
}), _response.rawResponse);
|
|
2993
3490
|
default:
|
|
2994
3491
|
throw new errors.SchematicError({
|
|
2995
3492
|
statusCode: _response.error.statusCode,
|
|
2996
3493
|
body: _response.error.body,
|
|
3494
|
+
rawResponse: _response.rawResponse,
|
|
2997
3495
|
});
|
|
2998
3496
|
}
|
|
2999
3497
|
}
|
|
@@ -3002,12 +3500,14 @@ class Companies {
|
|
|
3002
3500
|
throw new errors.SchematicError({
|
|
3003
3501
|
statusCode: _response.error.statusCode,
|
|
3004
3502
|
body: _response.error.rawBody,
|
|
3503
|
+
rawResponse: _response.rawResponse,
|
|
3005
3504
|
});
|
|
3006
3505
|
case "timeout":
|
|
3007
|
-
throw new errors.SchematicTimeoutError();
|
|
3506
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/create.");
|
|
3008
3507
|
case "unknown":
|
|
3009
3508
|
throw new errors.SchematicError({
|
|
3010
3509
|
message: _response.error.errorMessage,
|
|
3510
|
+
rawResponse: _response.rawResponse,
|
|
3011
3511
|
});
|
|
3012
3512
|
}
|
|
3013
3513
|
});
|
|
@@ -3019,6 +3519,7 @@ class Companies {
|
|
|
3019
3519
|
* @throws {@link Schematic.BadRequestError}
|
|
3020
3520
|
* @throws {@link Schematic.UnauthorizedError}
|
|
3021
3521
|
* @throws {@link Schematic.ForbiddenError}
|
|
3522
|
+
* @throws {@link Schematic.NotFoundError}
|
|
3022
3523
|
* @throws {@link Schematic.InternalServerError}
|
|
3023
3524
|
*
|
|
3024
3525
|
* @example
|
|
@@ -3029,12 +3530,15 @@ class Companies {
|
|
|
3029
3530
|
* })
|
|
3030
3531
|
*/
|
|
3031
3532
|
deleteUserByKeys(request, requestOptions) {
|
|
3032
|
-
|
|
3533
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteUserByKeys(request, requestOptions));
|
|
3534
|
+
}
|
|
3535
|
+
__deleteUserByKeys(request, requestOptions) {
|
|
3033
3536
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3537
|
+
var _a, _b, _c;
|
|
3034
3538
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
3035
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3539
|
+
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, "users/delete"),
|
|
3036
3540
|
method: "POST",
|
|
3037
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3541
|
+
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),
|
|
3038
3542
|
contentType: "application/json",
|
|
3039
3543
|
requestType: "json",
|
|
3040
3544
|
body: serializers.KeysRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -3043,13 +3547,16 @@ class Companies {
|
|
|
3043
3547
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
3044
3548
|
});
|
|
3045
3549
|
if (_response.ok) {
|
|
3046
|
-
return
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3550
|
+
return {
|
|
3551
|
+
data: serializers.DeleteUserByKeysResponse.parseOrThrow(_response.body, {
|
|
3552
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3553
|
+
allowUnrecognizedUnionMembers: true,
|
|
3554
|
+
allowUnrecognizedEnumValues: true,
|
|
3555
|
+
skipValidation: true,
|
|
3556
|
+
breadcrumbsPrefix: ["response"],
|
|
3557
|
+
}),
|
|
3558
|
+
rawResponse: _response.rawResponse,
|
|
3559
|
+
};
|
|
3053
3560
|
}
|
|
3054
3561
|
if (_response.error.reason === "status-code") {
|
|
3055
3562
|
switch (_response.error.statusCode) {
|
|
@@ -3060,7 +3567,7 @@ class Companies {
|
|
|
3060
3567
|
allowUnrecognizedEnumValues: true,
|
|
3061
3568
|
skipValidation: true,
|
|
3062
3569
|
breadcrumbsPrefix: ["response"],
|
|
3063
|
-
}));
|
|
3570
|
+
}), _response.rawResponse);
|
|
3064
3571
|
case 401:
|
|
3065
3572
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3066
3573
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3068,7 +3575,7 @@ class Companies {
|
|
|
3068
3575
|
allowUnrecognizedEnumValues: true,
|
|
3069
3576
|
skipValidation: true,
|
|
3070
3577
|
breadcrumbsPrefix: ["response"],
|
|
3071
|
-
}));
|
|
3578
|
+
}), _response.rawResponse);
|
|
3072
3579
|
case 403:
|
|
3073
3580
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3074
3581
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3076,7 +3583,15 @@ class Companies {
|
|
|
3076
3583
|
allowUnrecognizedEnumValues: true,
|
|
3077
3584
|
skipValidation: true,
|
|
3078
3585
|
breadcrumbsPrefix: ["response"],
|
|
3079
|
-
}));
|
|
3586
|
+
}), _response.rawResponse);
|
|
3587
|
+
case 404:
|
|
3588
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3589
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3590
|
+
allowUnrecognizedUnionMembers: true,
|
|
3591
|
+
allowUnrecognizedEnumValues: true,
|
|
3592
|
+
skipValidation: true,
|
|
3593
|
+
breadcrumbsPrefix: ["response"],
|
|
3594
|
+
}), _response.rawResponse);
|
|
3080
3595
|
case 500:
|
|
3081
3596
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3082
3597
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3084,11 +3599,12 @@ class Companies {
|
|
|
3084
3599
|
allowUnrecognizedEnumValues: true,
|
|
3085
3600
|
skipValidation: true,
|
|
3086
3601
|
breadcrumbsPrefix: ["response"],
|
|
3087
|
-
}));
|
|
3602
|
+
}), _response.rawResponse);
|
|
3088
3603
|
default:
|
|
3089
3604
|
throw new errors.SchematicError({
|
|
3090
3605
|
statusCode: _response.error.statusCode,
|
|
3091
3606
|
body: _response.error.body,
|
|
3607
|
+
rawResponse: _response.rawResponse,
|
|
3092
3608
|
});
|
|
3093
3609
|
}
|
|
3094
3610
|
}
|
|
@@ -3097,12 +3613,14 @@ class Companies {
|
|
|
3097
3613
|
throw new errors.SchematicError({
|
|
3098
3614
|
statusCode: _response.error.statusCode,
|
|
3099
3615
|
body: _response.error.rawBody,
|
|
3616
|
+
rawResponse: _response.rawResponse,
|
|
3100
3617
|
});
|
|
3101
3618
|
case "timeout":
|
|
3102
|
-
throw new errors.SchematicTimeoutError();
|
|
3619
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /users/delete.");
|
|
3103
3620
|
case "unknown":
|
|
3104
3621
|
throw new errors.SchematicError({
|
|
3105
3622
|
message: _response.error.errorMessage,
|
|
3623
|
+
rawResponse: _response.rawResponse,
|
|
3106
3624
|
});
|
|
3107
3625
|
}
|
|
3108
3626
|
});
|
|
@@ -3119,22 +3637,23 @@ class Companies {
|
|
|
3119
3637
|
* @example
|
|
3120
3638
|
* await client.companies.lookupUser({
|
|
3121
3639
|
* keys: {
|
|
3122
|
-
* "keys":
|
|
3123
|
-
* "key": "value"
|
|
3124
|
-
* }
|
|
3640
|
+
* "keys": "keys"
|
|
3125
3641
|
* }
|
|
3126
3642
|
* })
|
|
3127
3643
|
*/
|
|
3128
3644
|
lookupUser(request, requestOptions) {
|
|
3129
|
-
|
|
3645
|
+
return core.HttpResponsePromise.fromPromise(this.__lookupUser(request, requestOptions));
|
|
3646
|
+
}
|
|
3647
|
+
__lookupUser(request, requestOptions) {
|
|
3130
3648
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3649
|
+
var _a, _b, _c;
|
|
3131
3650
|
const { keys } = request;
|
|
3132
3651
|
const _queryParams = {};
|
|
3133
|
-
_queryParams["keys"] =
|
|
3652
|
+
_queryParams["keys"] = (0, json_1.toJson)(keys);
|
|
3134
3653
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
3135
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.
|
|
3654
|
+
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, "users/lookup"),
|
|
3136
3655
|
method: "GET",
|
|
3137
|
-
headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
3656
|
+
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),
|
|
3138
3657
|
contentType: "application/json",
|
|
3139
3658
|
queryParameters: _queryParams,
|
|
3140
3659
|
requestType: "json",
|
|
@@ -3143,13 +3662,16 @@ class Companies {
|
|
|
3143
3662
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
3144
3663
|
});
|
|
3145
3664
|
if (_response.ok) {
|
|
3146
|
-
return
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3665
|
+
return {
|
|
3666
|
+
data: serializers.LookupUserResponse.parseOrThrow(_response.body, {
|
|
3667
|
+
unrecognizedObjectKeys: "passthrough",
|
|
3668
|
+
allowUnrecognizedUnionMembers: true,
|
|
3669
|
+
allowUnrecognizedEnumValues: true,
|
|
3670
|
+
skipValidation: true,
|
|
3671
|
+
breadcrumbsPrefix: ["response"],
|
|
3672
|
+
}),
|
|
3673
|
+
rawResponse: _response.rawResponse,
|
|
3674
|
+
};
|
|
3153
3675
|
}
|
|
3154
3676
|
if (_response.error.reason === "status-code") {
|
|
3155
3677
|
switch (_response.error.statusCode) {
|
|
@@ -3160,7 +3682,7 @@ class Companies {
|
|
|
3160
3682
|
allowUnrecognizedEnumValues: true,
|
|
3161
3683
|
skipValidation: true,
|
|
3162
3684
|
breadcrumbsPrefix: ["response"],
|
|
3163
|
-
}));
|
|
3685
|
+
}), _response.rawResponse);
|
|
3164
3686
|
case 403:
|
|
3165
3687
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3166
3688
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3168,7 +3690,7 @@ class Companies {
|
|
|
3168
3690
|
allowUnrecognizedEnumValues: true,
|
|
3169
3691
|
skipValidation: true,
|
|
3170
3692
|
breadcrumbsPrefix: ["response"],
|
|
3171
|
-
}));
|
|
3693
|
+
}), _response.rawResponse);
|
|
3172
3694
|
case 404:
|
|
3173
3695
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3174
3696
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3176,7 +3698,7 @@ class Companies {
|
|
|
3176
3698
|
allowUnrecognizedEnumValues: true,
|
|
3177
3699
|
skipValidation: true,
|
|
3178
3700
|
breadcrumbsPrefix: ["response"],
|
|
3179
|
-
}));
|
|
3701
|
+
}), _response.rawResponse);
|
|
3180
3702
|
case 500:
|
|
3181
3703
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
3182
3704
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -3184,11 +3706,12 @@ class Companies {
|
|
|
3184
3706
|
allowUnrecognizedEnumValues: true,
|
|
3185
3707
|
skipValidation: true,
|
|
3186
3708
|
breadcrumbsPrefix: ["response"],
|
|
3187
|
-
}));
|
|
3709
|
+
}), _response.rawResponse);
|
|
3188
3710
|
default:
|
|
3189
3711
|
throw new errors.SchematicError({
|
|
3190
3712
|
statusCode: _response.error.statusCode,
|
|
3191
3713
|
body: _response.error.body,
|
|
3714
|
+
rawResponse: _response.rawResponse,
|
|
3192
3715
|
});
|
|
3193
3716
|
}
|
|
3194
3717
|
}
|
|
@@ -3197,12 +3720,14 @@ class Companies {
|
|
|
3197
3720
|
throw new errors.SchematicError({
|
|
3198
3721
|
statusCode: _response.error.statusCode,
|
|
3199
3722
|
body: _response.error.rawBody,
|
|
3723
|
+
rawResponse: _response.rawResponse,
|
|
3200
3724
|
});
|
|
3201
3725
|
case "timeout":
|
|
3202
|
-
throw new errors.SchematicTimeoutError();
|
|
3726
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /users/lookup.");
|
|
3203
3727
|
case "unknown":
|
|
3204
3728
|
throw new errors.SchematicError({
|
|
3205
3729
|
message: _response.error.errorMessage,
|
|
3730
|
+
rawResponse: _response.rawResponse,
|
|
3206
3731
|
});
|
|
3207
3732
|
}
|
|
3208
3733
|
});
|