@schematichq/schematic-typescript-node 1.1.10 → 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 +3 -0
- package/Client.js +13 -8
- package/README.md +2 -0
- package/api/errors/BadRequestError.d.ts +2 -1
- package/api/errors/BadRequestError.js +2 -1
- package/api/errors/ForbiddenError.d.ts +2 -1
- package/api/errors/ForbiddenError.js +2 -1
- package/api/errors/InternalServerError.d.ts +2 -1
- package/api/errors/InternalServerError.js +2 -1
- package/api/errors/NotFoundError.d.ts +2 -1
- package/api/errors/NotFoundError.js +2 -1
- package/api/errors/UnauthorizedError.d.ts +2 -1
- package/api/errors/UnauthorizedError.js +2 -1
- package/api/errors/index.d.ts +1 -1
- package/api/errors/index.js +1 -1
- package/api/resources/accesstokens/client/Client.d.ts +3 -1
- package/api/resources/accesstokens/client/Client.js +30 -12
- package/api/resources/accounts/client/Client.d.ts +51 -14
- package/api/resources/accounts/client/Client.js +489 -175
- package/api/resources/accounts/types/QuickstartResponse.d.ts +9 -0
- 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 +64 -26
- package/api/resources/billing/client/Client.js +651 -259
- package/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
- package/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
- package/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
- package/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
- package/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -0
- package/api/resources/billing/client/requests/{ListCustomersRequest.d.ts → ListCustomersWithSubscriptionsRequest.d.ts} +2 -1
- package/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +8 -0
- package/api/resources/billing/client/requests/index.d.ts +1 -1
- package/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -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/ListBillingProductsParams.d.ts +4 -0
- package/{dist/api/resources/billing/types/ListCustomersParams.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +2 -1
- package/{dist/api/resources/billing/types/ListCustomersResponse.d.ts → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts} +2 -2
- package/api/resources/billing/types/ListProductPricesParams.d.ts +4 -0
- package/api/resources/billing/types/index.d.ts +3 -2
- package/api/resources/billing/types/index.js +3 -2
- package/api/resources/checkout/client/Client.d.ts +11 -4
- package/api/resources/checkout/client/Client.js +113 -50
- package/api/resources/companies/client/Client.d.ts +95 -37
- package/api/resources/companies/client/Client.js +903 -391
- 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/ListCompaniesParams.d.ts +2 -0
- package/api/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/api/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/api/resources/components/client/Client.d.ts +18 -7
- package/api/resources/components/client/Client.js +188 -89
- package/api/resources/crm/client/Client.d.ts +15 -5
- package/api/resources/crm/client/Client.js +151 -61
- 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/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/index.d.ts +1 -0
- package/api/resources/dataexports/types/index.js +17 -0
- package/api/resources/entitlements/client/Client.d.ts +53 -22
- package/api/resources/entitlements/client/Client.js +534 -239
- package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
- package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
- package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/api/resources/events/client/Client.d.ts +16 -6
- package/api/resources/events/client/Client.js +164 -74
- package/api/resources/features/client/Client.d.ts +52 -19
- package/api/resources/features/client/Client.js +533 -236
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/plangroups/client/Client.d.ts +7 -3
- package/api/resources/plangroups/client/Client.js +73 -37
- package/api/resources/plans/client/Client.d.ts +124 -11
- package/api/resources/plans/client/Client.js +1010 -171
- 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/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/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 +24 -9
- package/api/resources/webhooks/client/Client.js +249 -114
- 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/types/BillingPriceResponseData.d.ts +2 -0
- package/api/types/BillingPriceView.d.ts +7 -0
- package/api/types/BillingProductDetailResponseData.d.ts +2 -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 +2 -0
- package/api/types/BillingProductResponseData.d.ts +2 -0
- package/api/types/CheckFlagResponseData.d.ts +2 -0
- package/api/types/CompanyDetailResponseData.d.ts +1 -0
- package/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
- package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/api/types/DataExportResponseData.d.ts +17 -0
- package/api/types/DataExportResponseData.js +5 -0
- package/api/types/EntitlementTriggerConfig.d.ts +6 -0
- package/api/types/EntitlementTriggerConfig.js +5 -0
- package/api/types/EventSummaryResponseData.d.ts +2 -2
- package/api/types/PlanDetailResponseData.d.ts +2 -0
- package/api/types/PlanEntitlementResponseData.d.ts +1 -0
- package/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
- 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/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 +6 -0
- package/api/types/WebhookResponseData.d.ts +2 -0
- package/api/types/index.d.ts +7 -0
- package/api/types/index.js +7 -0
- package/core/fetcher/APIResponse.d.ts +10 -0
- package/core/fetcher/Fetcher.js +7 -0
- 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/custom.js +17 -0
- package/core/fetcher/index.d.ts +3 -0
- package/core/fetcher/index.js +7 -1
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +13 -8
- package/dist/api/errors/BadRequestError.d.ts +2 -1
- package/dist/api/errors/BadRequestError.js +2 -1
- package/dist/api/errors/ForbiddenError.d.ts +2 -1
- package/dist/api/errors/ForbiddenError.js +2 -1
- package/dist/api/errors/InternalServerError.d.ts +2 -1
- package/dist/api/errors/InternalServerError.js +2 -1
- package/dist/api/errors/NotFoundError.d.ts +2 -1
- package/dist/api/errors/NotFoundError.js +2 -1
- package/dist/api/errors/UnauthorizedError.d.ts +2 -1
- package/dist/api/errors/UnauthorizedError.js +2 -1
- 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 +3 -1
- package/dist/api/resources/accesstokens/client/Client.js +30 -12
- package/dist/api/resources/accounts/client/Client.d.ts +51 -14
- package/dist/api/resources/accounts/client/Client.js +489 -175
- 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/index.d.ts +1 -0
- package/dist/api/resources/accounts/types/index.js +1 -0
- package/dist/api/resources/billing/client/Client.d.ts +64 -26
- package/dist/api/resources/billing/client/Client.js +651 -259
- package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +8 -0
- package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +1 -0
- package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
- package/dist/api/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +2 -7
- package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +8 -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/ListProductPricesRequest.d.ts +8 -0
- package/dist/api/resources/billing/client/requests/index.d.ts +1 -1
- package/dist/api/resources/billing/types/CountBillingProductsParams.d.ts +4 -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/ListBillingProductsParams.d.ts +4 -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/ListProductPricesParams.d.ts +4 -0
- package/dist/api/resources/billing/types/index.d.ts +3 -2
- package/dist/api/resources/billing/types/index.js +3 -2
- package/dist/api/resources/checkout/client/Client.d.ts +11 -4
- package/dist/api/resources/checkout/client/Client.js +113 -50
- package/dist/api/resources/companies/client/Client.d.ts +95 -37
- package/dist/api/resources/companies/client/Client.js +903 -391
- 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/ListCompaniesParams.d.ts +2 -0
- 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/components/client/Client.d.ts +18 -7
- package/dist/api/resources/components/client/Client.js +188 -89
- package/dist/api/resources/crm/client/Client.d.ts +15 -5
- package/dist/api/resources/crm/client/Client.js +151 -61
- 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 +53 -22
- package/dist/api/resources/entitlements/client/Client.js +534 -239
- package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +6 -0
- package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
- package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/dist/api/resources/events/client/Client.d.ts +16 -6
- package/dist/api/resources/events/client/Client.js +164 -74
- package/dist/api/resources/features/client/Client.d.ts +52 -19
- package/dist/api/resources/features/client/Client.js +533 -236
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/plangroups/client/Client.d.ts +7 -3
- package/dist/api/resources/plangroups/client/Client.js +73 -37
- package/dist/api/resources/plans/client/Client.d.ts +124 -11
- package/dist/api/resources/plans/client/Client.js +1010 -171
- 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/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/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 +24 -9
- package/dist/api/resources/webhooks/client/Client.js +249 -114
- 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/types/BillingPriceResponseData.d.ts +2 -0
- package/dist/api/types/BillingPriceView.d.ts +7 -0
- package/dist/api/types/BillingProductDetailResponseData.d.ts +2 -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 +2 -0
- package/dist/api/types/BillingProductResponseData.d.ts +2 -0
- package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
- package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
- package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
- package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/dist/api/types/DataExportResponseData.d.ts +17 -0
- package/dist/api/types/DataExportResponseData.js +5 -0
- package/dist/api/types/EntitlementTriggerConfig.d.ts +6 -0
- package/dist/api/types/EntitlementTriggerConfig.js +5 -0
- package/dist/api/types/EventSummaryResponseData.d.ts +2 -2
- package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
- package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
- package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
- 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/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 +6 -0
- package/dist/api/types/WebhookResponseData.d.ts +2 -0
- package/dist/api/types/index.d.ts +7 -0
- package/dist/api/types/index.js +7 -0
- package/dist/core/fetcher/APIResponse.d.ts +10 -0
- package/dist/core/fetcher/Fetcher.js +7 -0
- 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/custom.js +17 -0
- package/dist/core/fetcher/index.d.ts +3 -0
- package/dist/core/fetcher/index.js +7 -1
- package/dist/errors/SchematicError.d.ts +4 -1
- package/dist/errors/SchematicError.js +4 -7
- package/dist/events.d.ts +4 -0
- package/dist/events.js +41 -5
- package/dist/events.test.js +50 -3
- 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/index.d.ts +1 -0
- package/dist/serialization/resources/accounts/types/index.js +1 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +4 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
- package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
- package/dist/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
- package/dist/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
- package/dist/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
- package/dist/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/dist/serialization/resources/billing/types/CountCustomersParams.js +1 -0
- 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/ListBillingProductsParams.d.ts +2 -0
- package/dist/serialization/resources/billing/types/ListBillingProductsParams.js +2 -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} +3 -2
- package/dist/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
- package/dist/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
- package/dist/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
- package/dist/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
- package/dist/serialization/resources/billing/types/index.d.ts +3 -2
- package/dist/serialization/resources/billing/types/index.js +3 -2
- package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
- package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
- package/dist/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/dist/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
- package/dist/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/dist/serialization/resources/companies/types/LookupUserParams.js +1 -1
- 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/CreatePlanEntitlementRequestBody.d.ts +6 -0
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
- package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- 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/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 +2 -0
- 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/CreatePlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
- 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/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/UpdatePlanTraitResponse.d.ts +14 -0
- package/dist/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
- 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 +2 -0
- package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
- package/dist/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/dist/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/dist/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/dist/serialization/types/BillingPriceResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingPriceResponseData.js +2 -0
- package/dist/serialization/types/BillingPriceView.d.ts +7 -0
- package/dist/serialization/types/BillingPriceView.js +7 -0
- package/dist/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductDetailResponseData.js +2 -0
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
- package/dist/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductPlanResponseData.js +2 -0
- package/dist/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
- package/dist/serialization/types/BillingProductPriceResponseData.js +3 -0
- package/dist/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
- package/dist/serialization/types/BillingProductPriceTierResponseData.js +46 -0
- package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
- package/dist/serialization/types/BillingProductPricing.js +2 -0
- package/dist/serialization/types/BillingProductResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductResponseData.js +2 -0
- package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/dist/serialization/types/CheckFlagResponseData.js +1 -0
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
- package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanyPlanDetailResponseData.js +2 -0
- package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
- package/dist/serialization/types/DataExportResponseData.d.ts +20 -0
- package/dist/serialization/types/DataExportResponseData.js +51 -0
- package/dist/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
- package/dist/serialization/types/EntitlementTriggerConfig.js +43 -0
- package/dist/serialization/types/EventSummaryResponseData.d.ts +2 -2
- package/dist/serialization/types/EventSummaryResponseData.js +2 -2
- package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanDetailResponseData.js +2 -0
- package/dist/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanEntitlementResponseData.js +2 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
- package/dist/serialization/types/PlanTraitResponseData.d.ts +19 -0
- package/dist/serialization/types/PlanTraitResponseData.js +50 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
- 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/UpsertUserRequestBody.d.ts +2 -0
- package/dist/serialization/types/UpsertUserRequestBody.js +2 -0
- package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertUserSubRequestBody.js +1 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
- package/dist/serialization/types/WebhookResponseData.d.ts +2 -0
- package/dist/serialization/types/WebhookResponseData.js +2 -0
- package/dist/serialization/types/index.d.ts +7 -0
- package/dist/serialization/types/index.js +7 -0
- package/errors/SchematicError.d.ts +4 -1
- package/errors/SchematicError.js +4 -7
- package/events.d.ts +4 -0
- package/events.js +41 -5
- package/events.test.js +50 -3
- package/package.json +3 -2
- package/reference.md +412 -15
- package/serialization/resources/accounts/types/QuickstartResponse.d.ts +14 -0
- package/serialization/resources/accounts/types/QuickstartResponse.js +45 -0
- 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/CreateBillingPriceRequestBody.d.ts +4 -0
- package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +4 -0
- package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.d.ts +1 -3
- package/serialization/resources/billing/client/requests/CreateBillingProductRequestBody.js +1 -3
- package/serialization/resources/billing/types/CountBillingProductsParams.d.ts +2 -0
- package/serialization/resources/billing/types/CountBillingProductsParams.js +2 -0
- package/serialization/resources/billing/types/CountCustomersParams.d.ts +1 -0
- package/serialization/resources/billing/types/CountCustomersParams.js +1 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyBillingScheme.js +41 -0
- package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
- package/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
- package/serialization/resources/billing/types/{ListCustomersParams.d.ts → ListCustomersWithSubscriptionsParams.d.ts} +3 -2
- package/serialization/resources/billing/types/{ListCustomersParams.js → ListCustomersWithSubscriptionsParams.js} +3 -2
- package/serialization/resources/billing/types/{ListCustomersResponse.d.ts → ListCustomersWithSubscriptionsResponse.d.ts} +4 -4
- package/serialization/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsResponse.js} +4 -4
- package/serialization/resources/billing/types/ListProductPricesParams.d.ts +2 -0
- package/serialization/resources/billing/types/ListProductPricesParams.js +2 -0
- package/serialization/resources/billing/types/index.d.ts +3 -2
- package/serialization/resources/billing/types/index.js +3 -2
- package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
- package/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
- package/serialization/resources/companies/types/ListCompaniesParams.js +1 -0
- package/serialization/resources/companies/types/LookupCompanyParams.d.ts +1 -1
- package/serialization/resources/companies/types/LookupCompanyParams.js +1 -1
- package/serialization/resources/companies/types/LookupUserParams.d.ts +1 -1
- package/serialization/resources/companies/types/LookupUserParams.js +1 -1
- 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/CreatePlanEntitlementRequestBody.d.ts +6 -0
- package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +6 -0
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +6 -0
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +6 -0
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- 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/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 +2 -0
- 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/CreatePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/CreatePlanTraitResponse.js +45 -0
- package/serialization/resources/plans/types/DeletePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/DeletePlanTraitResponse.js +45 -0
- 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/UpdatePlanTraitResponse.d.ts +14 -0
- package/serialization/resources/plans/types/UpdatePlanTraitResponse.js +45 -0
- 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 +2 -0
- package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.d.ts +2 -0
- package/serialization/resources/webhooks/client/requests/UpdateWebhookRequestBody.js +2 -0
- package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/serialization/resources/webhooks/types/CreateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.d.ts +1 -1
- package/serialization/resources/webhooks/types/UpdateWebhookRequestBodyRequestTypesItem.js +4 -0
- package/serialization/types/BillingPriceResponseData.d.ts +2 -0
- package/serialization/types/BillingPriceResponseData.js +2 -0
- package/serialization/types/BillingPriceView.d.ts +7 -0
- package/serialization/types/BillingPriceView.js +7 -0
- package/serialization/types/BillingProductDetailResponseData.d.ts +2 -0
- package/serialization/types/BillingProductDetailResponseData.js +2 -0
- package/serialization/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/serialization/types/BillingProductForSubscriptionResponseData.js +5 -0
- package/serialization/types/BillingProductPlanResponseData.d.ts +2 -0
- package/serialization/types/BillingProductPlanResponseData.js +2 -0
- package/serialization/types/BillingProductPriceResponseData.d.ts +3 -0
- package/serialization/types/BillingProductPriceResponseData.js +3 -0
- package/serialization/types/BillingProductPriceTierResponseData.d.ts +15 -0
- package/serialization/types/BillingProductPriceTierResponseData.js +46 -0
- package/serialization/types/BillingProductPricing.d.ts +2 -0
- package/serialization/types/BillingProductPricing.js +2 -0
- package/serialization/types/BillingProductResponseData.d.ts +2 -0
- package/serialization/types/BillingProductResponseData.js +2 -0
- package/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/serialization/types/CheckFlagResponseData.js +1 -0
- package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/serialization/types/CompanyDetailResponseData.js +2 -1
- package/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
- package/serialization/types/CompanyPlanDetailResponseData.js +2 -0
- package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
- package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
- package/serialization/types/DataExportResponseData.d.ts +20 -0
- package/serialization/types/DataExportResponseData.js +51 -0
- package/serialization/types/EntitlementTriggerConfig.d.ts +12 -0
- package/serialization/types/EntitlementTriggerConfig.js +43 -0
- package/serialization/types/EventSummaryResponseData.d.ts +2 -2
- package/serialization/types/EventSummaryResponseData.js +2 -2
- package/serialization/types/PlanDetailResponseData.d.ts +2 -0
- package/serialization/types/PlanDetailResponseData.js +2 -0
- package/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
- package/serialization/types/PlanEntitlementResponseData.js +2 -0
- package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
- package/serialization/types/PlanGroupPlanDetailResponseData.js +2 -0
- package/serialization/types/PlanTraitResponseData.d.ts +19 -0
- package/serialization/types/PlanTraitResponseData.js +50 -0
- package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +4 -0
- package/serialization/types/PreviewSubscriptionChangeResponseData.js +4 -0
- 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/UpsertUserRequestBody.d.ts +2 -0
- package/serialization/types/UpsertUserRequestBody.js +2 -0
- package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/serialization/types/UpsertUserSubRequestBody.js +1 -0
- package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +6 -0
- package/serialization/types/UsageBasedEntitlementRequestBody.js +6 -0
- package/serialization/types/WebhookResponseData.d.ts +2 -0
- package/serialization/types/WebhookResponseData.js +2 -0
- package/serialization/types/index.d.ts +7 -0
- package/serialization/types/index.js +7 -0
- /package/api/resources/{billing/client/requests/ListCustomersRequest.js → accounts/types/QuickstartResponse.js} +0 -0
- /package/api/resources/billing/{types/ListCustomersParams.js → client/requests/ListCustomersWithSubscriptionsRequest.js} +0 -0
- /package/api/resources/billing/types/{ListCustomersResponse.js → ListCustomersWithSubscriptionsParams.js} +0 -0
- /package/{dist/api/resources/billing/client/requests/ListCustomersRequest.js → api/resources/billing/types/ListCustomersWithSubscriptionsResponse.js} +0 -0
- /package/{dist/api/resources/billing/types/ListCustomersParams.js → api/resources/dataexports/client/requests/CreateDataExportRequestBody.js} +0 -0
- /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/dataexports/types/CreateDataExportResponse.js} +0 -0
|
@@ -66,6 +66,7 @@ class Events {
|
|
|
66
66
|
* @throws {@link Schematic.BadRequestError}
|
|
67
67
|
* @throws {@link Schematic.UnauthorizedError}
|
|
68
68
|
* @throws {@link Schematic.ForbiddenError}
|
|
69
|
+
* @throws {@link Schematic.NotFoundError}
|
|
69
70
|
* @throws {@link Schematic.InternalServerError}
|
|
70
71
|
*
|
|
71
72
|
* @example
|
|
@@ -76,12 +77,15 @@ class Events {
|
|
|
76
77
|
* })
|
|
77
78
|
*/
|
|
78
79
|
createEventBatch(request, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__createEventBatch(request, requestOptions));
|
|
81
|
+
}
|
|
82
|
+
__createEventBatch(request, requestOptions) {
|
|
79
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
84
|
var _a, _b, _c;
|
|
81
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
86
|
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, "event-batch"),
|
|
83
87
|
method: "POST",
|
|
84
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
88
|
+
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),
|
|
85
89
|
contentType: "application/json",
|
|
86
90
|
requestType: "json",
|
|
87
91
|
body: serializers.CreateEventBatchRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -90,13 +94,16 @@ class Events {
|
|
|
90
94
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
95
|
});
|
|
92
96
|
if (_response.ok) {
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
return {
|
|
98
|
+
data: serializers.CreateEventBatchResponse.parseOrThrow(_response.body, {
|
|
99
|
+
unrecognizedObjectKeys: "passthrough",
|
|
100
|
+
allowUnrecognizedUnionMembers: true,
|
|
101
|
+
allowUnrecognizedEnumValues: true,
|
|
102
|
+
skipValidation: true,
|
|
103
|
+
breadcrumbsPrefix: ["response"],
|
|
104
|
+
}),
|
|
105
|
+
rawResponse: _response.rawResponse,
|
|
106
|
+
};
|
|
100
107
|
}
|
|
101
108
|
if (_response.error.reason === "status-code") {
|
|
102
109
|
switch (_response.error.statusCode) {
|
|
@@ -107,7 +114,7 @@ class Events {
|
|
|
107
114
|
allowUnrecognizedEnumValues: true,
|
|
108
115
|
skipValidation: true,
|
|
109
116
|
breadcrumbsPrefix: ["response"],
|
|
110
|
-
}));
|
|
117
|
+
}), _response.rawResponse);
|
|
111
118
|
case 401:
|
|
112
119
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
113
120
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -115,7 +122,7 @@ class Events {
|
|
|
115
122
|
allowUnrecognizedEnumValues: true,
|
|
116
123
|
skipValidation: true,
|
|
117
124
|
breadcrumbsPrefix: ["response"],
|
|
118
|
-
}));
|
|
125
|
+
}), _response.rawResponse);
|
|
119
126
|
case 403:
|
|
120
127
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
121
128
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -123,7 +130,15 @@ class Events {
|
|
|
123
130
|
allowUnrecognizedEnumValues: true,
|
|
124
131
|
skipValidation: true,
|
|
125
132
|
breadcrumbsPrefix: ["response"],
|
|
126
|
-
}));
|
|
133
|
+
}), _response.rawResponse);
|
|
134
|
+
case 404:
|
|
135
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
136
|
+
unrecognizedObjectKeys: "passthrough",
|
|
137
|
+
allowUnrecognizedUnionMembers: true,
|
|
138
|
+
allowUnrecognizedEnumValues: true,
|
|
139
|
+
skipValidation: true,
|
|
140
|
+
breadcrumbsPrefix: ["response"],
|
|
141
|
+
}), _response.rawResponse);
|
|
127
142
|
case 500:
|
|
128
143
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
129
144
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -131,11 +146,12 @@ class Events {
|
|
|
131
146
|
allowUnrecognizedEnumValues: true,
|
|
132
147
|
skipValidation: true,
|
|
133
148
|
breadcrumbsPrefix: ["response"],
|
|
134
|
-
}));
|
|
149
|
+
}), _response.rawResponse);
|
|
135
150
|
default:
|
|
136
151
|
throw new errors.SchematicError({
|
|
137
152
|
statusCode: _response.error.statusCode,
|
|
138
153
|
body: _response.error.body,
|
|
154
|
+
rawResponse: _response.rawResponse,
|
|
139
155
|
});
|
|
140
156
|
}
|
|
141
157
|
}
|
|
@@ -144,12 +160,14 @@ class Events {
|
|
|
144
160
|
throw new errors.SchematicError({
|
|
145
161
|
statusCode: _response.error.statusCode,
|
|
146
162
|
body: _response.error.rawBody,
|
|
163
|
+
rawResponse: _response.rawResponse,
|
|
147
164
|
});
|
|
148
165
|
case "timeout":
|
|
149
166
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /event-batch.");
|
|
150
167
|
case "unknown":
|
|
151
168
|
throw new errors.SchematicError({
|
|
152
169
|
message: _response.error.errorMessage,
|
|
170
|
+
rawResponse: _response.rawResponse,
|
|
153
171
|
});
|
|
154
172
|
}
|
|
155
173
|
});
|
|
@@ -161,12 +179,16 @@ class Events {
|
|
|
161
179
|
* @throws {@link Schematic.BadRequestError}
|
|
162
180
|
* @throws {@link Schematic.UnauthorizedError}
|
|
163
181
|
* @throws {@link Schematic.ForbiddenError}
|
|
182
|
+
* @throws {@link Schematic.NotFoundError}
|
|
164
183
|
* @throws {@link Schematic.InternalServerError}
|
|
165
184
|
*
|
|
166
185
|
* @example
|
|
167
186
|
* await client.events.getEventSummaries()
|
|
168
187
|
*/
|
|
169
|
-
getEventSummaries() {
|
|
188
|
+
getEventSummaries(request = {}, requestOptions) {
|
|
189
|
+
return core.HttpResponsePromise.fromPromise(this.__getEventSummaries(request, requestOptions));
|
|
190
|
+
}
|
|
191
|
+
__getEventSummaries() {
|
|
170
192
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
171
193
|
var _a, _b, _c;
|
|
172
194
|
const { q, eventSubtypes, limit, offset } = request;
|
|
@@ -191,7 +213,7 @@ class Events {
|
|
|
191
213
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
192
214
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "event-types"),
|
|
193
215
|
method: "GET",
|
|
194
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
216
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
195
217
|
contentType: "application/json",
|
|
196
218
|
queryParameters: _queryParams,
|
|
197
219
|
requestType: "json",
|
|
@@ -200,13 +222,16 @@ class Events {
|
|
|
200
222
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
223
|
});
|
|
202
224
|
if (_response.ok) {
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
225
|
+
return {
|
|
226
|
+
data: serializers.GetEventSummariesResponse.parseOrThrow(_response.body, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
skipValidation: true,
|
|
231
|
+
breadcrumbsPrefix: ["response"],
|
|
232
|
+
}),
|
|
233
|
+
rawResponse: _response.rawResponse,
|
|
234
|
+
};
|
|
210
235
|
}
|
|
211
236
|
if (_response.error.reason === "status-code") {
|
|
212
237
|
switch (_response.error.statusCode) {
|
|
@@ -217,7 +242,7 @@ class Events {
|
|
|
217
242
|
allowUnrecognizedEnumValues: true,
|
|
218
243
|
skipValidation: true,
|
|
219
244
|
breadcrumbsPrefix: ["response"],
|
|
220
|
-
}));
|
|
245
|
+
}), _response.rawResponse);
|
|
221
246
|
case 401:
|
|
222
247
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
223
248
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -225,7 +250,7 @@ class Events {
|
|
|
225
250
|
allowUnrecognizedEnumValues: true,
|
|
226
251
|
skipValidation: true,
|
|
227
252
|
breadcrumbsPrefix: ["response"],
|
|
228
|
-
}));
|
|
253
|
+
}), _response.rawResponse);
|
|
229
254
|
case 403:
|
|
230
255
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
231
256
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -233,7 +258,15 @@ class Events {
|
|
|
233
258
|
allowUnrecognizedEnumValues: true,
|
|
234
259
|
skipValidation: true,
|
|
235
260
|
breadcrumbsPrefix: ["response"],
|
|
236
|
-
}));
|
|
261
|
+
}), _response.rawResponse);
|
|
262
|
+
case 404:
|
|
263
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
264
|
+
unrecognizedObjectKeys: "passthrough",
|
|
265
|
+
allowUnrecognizedUnionMembers: true,
|
|
266
|
+
allowUnrecognizedEnumValues: true,
|
|
267
|
+
skipValidation: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}), _response.rawResponse);
|
|
237
270
|
case 500:
|
|
238
271
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
239
272
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -241,11 +274,12 @@ class Events {
|
|
|
241
274
|
allowUnrecognizedEnumValues: true,
|
|
242
275
|
skipValidation: true,
|
|
243
276
|
breadcrumbsPrefix: ["response"],
|
|
244
|
-
}));
|
|
277
|
+
}), _response.rawResponse);
|
|
245
278
|
default:
|
|
246
279
|
throw new errors.SchematicError({
|
|
247
280
|
statusCode: _response.error.statusCode,
|
|
248
281
|
body: _response.error.body,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
249
283
|
});
|
|
250
284
|
}
|
|
251
285
|
}
|
|
@@ -254,12 +288,14 @@ class Events {
|
|
|
254
288
|
throw new errors.SchematicError({
|
|
255
289
|
statusCode: _response.error.statusCode,
|
|
256
290
|
body: _response.error.rawBody,
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
257
292
|
});
|
|
258
293
|
case "timeout":
|
|
259
294
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /event-types.");
|
|
260
295
|
case "unknown":
|
|
261
296
|
throw new errors.SchematicError({
|
|
262
297
|
message: _response.error.errorMessage,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
263
299
|
});
|
|
264
300
|
}
|
|
265
301
|
});
|
|
@@ -271,12 +307,16 @@ class Events {
|
|
|
271
307
|
* @throws {@link Schematic.BadRequestError}
|
|
272
308
|
* @throws {@link Schematic.UnauthorizedError}
|
|
273
309
|
* @throws {@link Schematic.ForbiddenError}
|
|
310
|
+
* @throws {@link Schematic.NotFoundError}
|
|
274
311
|
* @throws {@link Schematic.InternalServerError}
|
|
275
312
|
*
|
|
276
313
|
* @example
|
|
277
314
|
* await client.events.listEvents()
|
|
278
315
|
*/
|
|
279
|
-
listEvents() {
|
|
316
|
+
listEvents(request = {}, requestOptions) {
|
|
317
|
+
return core.HttpResponsePromise.fromPromise(this.__listEvents(request, requestOptions));
|
|
318
|
+
}
|
|
319
|
+
__listEvents() {
|
|
280
320
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
281
321
|
var _a, _b, _c;
|
|
282
322
|
const { companyId, eventSubtype, eventTypes, flagId, userId, limit, offset } = request;
|
|
@@ -310,7 +350,7 @@ class Events {
|
|
|
310
350
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
311
351
|
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, "events"),
|
|
312
352
|
method: "GET",
|
|
313
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
353
|
+
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),
|
|
314
354
|
contentType: "application/json",
|
|
315
355
|
queryParameters: _queryParams,
|
|
316
356
|
requestType: "json",
|
|
@@ -319,13 +359,16 @@ class Events {
|
|
|
319
359
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
320
360
|
});
|
|
321
361
|
if (_response.ok) {
|
|
322
|
-
return
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
362
|
+
return {
|
|
363
|
+
data: serializers.ListEventsResponse.parseOrThrow(_response.body, {
|
|
364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
365
|
+
allowUnrecognizedUnionMembers: true,
|
|
366
|
+
allowUnrecognizedEnumValues: true,
|
|
367
|
+
skipValidation: true,
|
|
368
|
+
breadcrumbsPrefix: ["response"],
|
|
369
|
+
}),
|
|
370
|
+
rawResponse: _response.rawResponse,
|
|
371
|
+
};
|
|
329
372
|
}
|
|
330
373
|
if (_response.error.reason === "status-code") {
|
|
331
374
|
switch (_response.error.statusCode) {
|
|
@@ -336,7 +379,7 @@ class Events {
|
|
|
336
379
|
allowUnrecognizedEnumValues: true,
|
|
337
380
|
skipValidation: true,
|
|
338
381
|
breadcrumbsPrefix: ["response"],
|
|
339
|
-
}));
|
|
382
|
+
}), _response.rawResponse);
|
|
340
383
|
case 401:
|
|
341
384
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
342
385
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -344,7 +387,7 @@ class Events {
|
|
|
344
387
|
allowUnrecognizedEnumValues: true,
|
|
345
388
|
skipValidation: true,
|
|
346
389
|
breadcrumbsPrefix: ["response"],
|
|
347
|
-
}));
|
|
390
|
+
}), _response.rawResponse);
|
|
348
391
|
case 403:
|
|
349
392
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
350
393
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -352,7 +395,15 @@ class Events {
|
|
|
352
395
|
allowUnrecognizedEnumValues: true,
|
|
353
396
|
skipValidation: true,
|
|
354
397
|
breadcrumbsPrefix: ["response"],
|
|
355
|
-
}));
|
|
398
|
+
}), _response.rawResponse);
|
|
399
|
+
case 404:
|
|
400
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
401
|
+
unrecognizedObjectKeys: "passthrough",
|
|
402
|
+
allowUnrecognizedUnionMembers: true,
|
|
403
|
+
allowUnrecognizedEnumValues: true,
|
|
404
|
+
skipValidation: true,
|
|
405
|
+
breadcrumbsPrefix: ["response"],
|
|
406
|
+
}), _response.rawResponse);
|
|
356
407
|
case 500:
|
|
357
408
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
358
409
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -360,11 +411,12 @@ class Events {
|
|
|
360
411
|
allowUnrecognizedEnumValues: true,
|
|
361
412
|
skipValidation: true,
|
|
362
413
|
breadcrumbsPrefix: ["response"],
|
|
363
|
-
}));
|
|
414
|
+
}), _response.rawResponse);
|
|
364
415
|
default:
|
|
365
416
|
throw new errors.SchematicError({
|
|
366
417
|
statusCode: _response.error.statusCode,
|
|
367
418
|
body: _response.error.body,
|
|
419
|
+
rawResponse: _response.rawResponse,
|
|
368
420
|
});
|
|
369
421
|
}
|
|
370
422
|
}
|
|
@@ -373,12 +425,14 @@ class Events {
|
|
|
373
425
|
throw new errors.SchematicError({
|
|
374
426
|
statusCode: _response.error.statusCode,
|
|
375
427
|
body: _response.error.rawBody,
|
|
428
|
+
rawResponse: _response.rawResponse,
|
|
376
429
|
});
|
|
377
430
|
case "timeout":
|
|
378
431
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /events.");
|
|
379
432
|
case "unknown":
|
|
380
433
|
throw new errors.SchematicError({
|
|
381
434
|
message: _response.error.errorMessage,
|
|
435
|
+
rawResponse: _response.rawResponse,
|
|
382
436
|
});
|
|
383
437
|
}
|
|
384
438
|
});
|
|
@@ -390,6 +444,7 @@ class Events {
|
|
|
390
444
|
* @throws {@link Schematic.BadRequestError}
|
|
391
445
|
* @throws {@link Schematic.UnauthorizedError}
|
|
392
446
|
* @throws {@link Schematic.ForbiddenError}
|
|
447
|
+
* @throws {@link Schematic.NotFoundError}
|
|
393
448
|
* @throws {@link Schematic.InternalServerError}
|
|
394
449
|
*
|
|
395
450
|
* @example
|
|
@@ -398,12 +453,15 @@ class Events {
|
|
|
398
453
|
* })
|
|
399
454
|
*/
|
|
400
455
|
createEvent(request, requestOptions) {
|
|
456
|
+
return core.HttpResponsePromise.fromPromise(this.__createEvent(request, requestOptions));
|
|
457
|
+
}
|
|
458
|
+
__createEvent(request, requestOptions) {
|
|
401
459
|
return __awaiter(this, void 0, void 0, function* () {
|
|
402
460
|
var _a, _b, _c;
|
|
403
461
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
404
462
|
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, "events"),
|
|
405
463
|
method: "POST",
|
|
406
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
464
|
+
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),
|
|
407
465
|
contentType: "application/json",
|
|
408
466
|
requestType: "json",
|
|
409
467
|
body: serializers.CreateEventRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -412,13 +470,16 @@ class Events {
|
|
|
412
470
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
413
471
|
});
|
|
414
472
|
if (_response.ok) {
|
|
415
|
-
return
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
473
|
+
return {
|
|
474
|
+
data: serializers.CreateEventResponse.parseOrThrow(_response.body, {
|
|
475
|
+
unrecognizedObjectKeys: "passthrough",
|
|
476
|
+
allowUnrecognizedUnionMembers: true,
|
|
477
|
+
allowUnrecognizedEnumValues: true,
|
|
478
|
+
skipValidation: true,
|
|
479
|
+
breadcrumbsPrefix: ["response"],
|
|
480
|
+
}),
|
|
481
|
+
rawResponse: _response.rawResponse,
|
|
482
|
+
};
|
|
422
483
|
}
|
|
423
484
|
if (_response.error.reason === "status-code") {
|
|
424
485
|
switch (_response.error.statusCode) {
|
|
@@ -429,7 +490,7 @@ class Events {
|
|
|
429
490
|
allowUnrecognizedEnumValues: true,
|
|
430
491
|
skipValidation: true,
|
|
431
492
|
breadcrumbsPrefix: ["response"],
|
|
432
|
-
}));
|
|
493
|
+
}), _response.rawResponse);
|
|
433
494
|
case 401:
|
|
434
495
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
435
496
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -437,7 +498,7 @@ class Events {
|
|
|
437
498
|
allowUnrecognizedEnumValues: true,
|
|
438
499
|
skipValidation: true,
|
|
439
500
|
breadcrumbsPrefix: ["response"],
|
|
440
|
-
}));
|
|
501
|
+
}), _response.rawResponse);
|
|
441
502
|
case 403:
|
|
442
503
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
443
504
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -445,7 +506,15 @@ class Events {
|
|
|
445
506
|
allowUnrecognizedEnumValues: true,
|
|
446
507
|
skipValidation: true,
|
|
447
508
|
breadcrumbsPrefix: ["response"],
|
|
448
|
-
}));
|
|
509
|
+
}), _response.rawResponse);
|
|
510
|
+
case 404:
|
|
511
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
512
|
+
unrecognizedObjectKeys: "passthrough",
|
|
513
|
+
allowUnrecognizedUnionMembers: true,
|
|
514
|
+
allowUnrecognizedEnumValues: true,
|
|
515
|
+
skipValidation: true,
|
|
516
|
+
breadcrumbsPrefix: ["response"],
|
|
517
|
+
}), _response.rawResponse);
|
|
449
518
|
case 500:
|
|
450
519
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
451
520
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -453,11 +522,12 @@ class Events {
|
|
|
453
522
|
allowUnrecognizedEnumValues: true,
|
|
454
523
|
skipValidation: true,
|
|
455
524
|
breadcrumbsPrefix: ["response"],
|
|
456
|
-
}));
|
|
525
|
+
}), _response.rawResponse);
|
|
457
526
|
default:
|
|
458
527
|
throw new errors.SchematicError({
|
|
459
528
|
statusCode: _response.error.statusCode,
|
|
460
529
|
body: _response.error.body,
|
|
530
|
+
rawResponse: _response.rawResponse,
|
|
461
531
|
});
|
|
462
532
|
}
|
|
463
533
|
}
|
|
@@ -466,12 +536,14 @@ class Events {
|
|
|
466
536
|
throw new errors.SchematicError({
|
|
467
537
|
statusCode: _response.error.statusCode,
|
|
468
538
|
body: _response.error.rawBody,
|
|
539
|
+
rawResponse: _response.rawResponse,
|
|
469
540
|
});
|
|
470
541
|
case "timeout":
|
|
471
542
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /events.");
|
|
472
543
|
case "unknown":
|
|
473
544
|
throw new errors.SchematicError({
|
|
474
545
|
message: _response.error.errorMessage,
|
|
546
|
+
rawResponse: _response.rawResponse,
|
|
475
547
|
});
|
|
476
548
|
}
|
|
477
549
|
});
|
|
@@ -489,12 +561,15 @@ class Events {
|
|
|
489
561
|
* await client.events.getEvent("event_id")
|
|
490
562
|
*/
|
|
491
563
|
getEvent(eventId, requestOptions) {
|
|
564
|
+
return core.HttpResponsePromise.fromPromise(this.__getEvent(eventId, requestOptions));
|
|
565
|
+
}
|
|
566
|
+
__getEvent(eventId, requestOptions) {
|
|
492
567
|
return __awaiter(this, void 0, void 0, function* () {
|
|
493
568
|
var _a, _b, _c;
|
|
494
569
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
495
570
|
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, `events/${encodeURIComponent(eventId)}`),
|
|
496
571
|
method: "GET",
|
|
497
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
572
|
+
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),
|
|
498
573
|
contentType: "application/json",
|
|
499
574
|
requestType: "json",
|
|
500
575
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -502,13 +577,16 @@ class Events {
|
|
|
502
577
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
503
578
|
});
|
|
504
579
|
if (_response.ok) {
|
|
505
|
-
return
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
580
|
+
return {
|
|
581
|
+
data: serializers.GetEventResponse.parseOrThrow(_response.body, {
|
|
582
|
+
unrecognizedObjectKeys: "passthrough",
|
|
583
|
+
allowUnrecognizedUnionMembers: true,
|
|
584
|
+
allowUnrecognizedEnumValues: true,
|
|
585
|
+
skipValidation: true,
|
|
586
|
+
breadcrumbsPrefix: ["response"],
|
|
587
|
+
}),
|
|
588
|
+
rawResponse: _response.rawResponse,
|
|
589
|
+
};
|
|
512
590
|
}
|
|
513
591
|
if (_response.error.reason === "status-code") {
|
|
514
592
|
switch (_response.error.statusCode) {
|
|
@@ -519,7 +597,7 @@ class Events {
|
|
|
519
597
|
allowUnrecognizedEnumValues: true,
|
|
520
598
|
skipValidation: true,
|
|
521
599
|
breadcrumbsPrefix: ["response"],
|
|
522
|
-
}));
|
|
600
|
+
}), _response.rawResponse);
|
|
523
601
|
case 403:
|
|
524
602
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
525
603
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -527,7 +605,7 @@ class Events {
|
|
|
527
605
|
allowUnrecognizedEnumValues: true,
|
|
528
606
|
skipValidation: true,
|
|
529
607
|
breadcrumbsPrefix: ["response"],
|
|
530
|
-
}));
|
|
608
|
+
}), _response.rawResponse);
|
|
531
609
|
case 404:
|
|
532
610
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
533
611
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -535,7 +613,7 @@ class Events {
|
|
|
535
613
|
allowUnrecognizedEnumValues: true,
|
|
536
614
|
skipValidation: true,
|
|
537
615
|
breadcrumbsPrefix: ["response"],
|
|
538
|
-
}));
|
|
616
|
+
}), _response.rawResponse);
|
|
539
617
|
case 500:
|
|
540
618
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
541
619
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -543,11 +621,12 @@ class Events {
|
|
|
543
621
|
allowUnrecognizedEnumValues: true,
|
|
544
622
|
skipValidation: true,
|
|
545
623
|
breadcrumbsPrefix: ["response"],
|
|
546
|
-
}));
|
|
624
|
+
}), _response.rawResponse);
|
|
547
625
|
default:
|
|
548
626
|
throw new errors.SchematicError({
|
|
549
627
|
statusCode: _response.error.statusCode,
|
|
550
628
|
body: _response.error.body,
|
|
629
|
+
rawResponse: _response.rawResponse,
|
|
551
630
|
});
|
|
552
631
|
}
|
|
553
632
|
}
|
|
@@ -556,12 +635,14 @@ class Events {
|
|
|
556
635
|
throw new errors.SchematicError({
|
|
557
636
|
statusCode: _response.error.statusCode,
|
|
558
637
|
body: _response.error.rawBody,
|
|
638
|
+
rawResponse: _response.rawResponse,
|
|
559
639
|
});
|
|
560
640
|
case "timeout":
|
|
561
641
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /events/{event_id}.");
|
|
562
642
|
case "unknown":
|
|
563
643
|
throw new errors.SchematicError({
|
|
564
644
|
message: _response.error.errorMessage,
|
|
645
|
+
rawResponse: _response.rawResponse,
|
|
565
646
|
});
|
|
566
647
|
}
|
|
567
648
|
});
|
|
@@ -578,12 +659,15 @@ class Events {
|
|
|
578
659
|
* await client.events.getSegmentIntegrationStatus()
|
|
579
660
|
*/
|
|
580
661
|
getSegmentIntegrationStatus(requestOptions) {
|
|
662
|
+
return core.HttpResponsePromise.fromPromise(this.__getSegmentIntegrationStatus(requestOptions));
|
|
663
|
+
}
|
|
664
|
+
__getSegmentIntegrationStatus(requestOptions) {
|
|
581
665
|
return __awaiter(this, void 0, void 0, function* () {
|
|
582
666
|
var _a, _b, _c;
|
|
583
667
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
584
668
|
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, "segment-integration"),
|
|
585
669
|
method: "GET",
|
|
586
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
670
|
+
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),
|
|
587
671
|
contentType: "application/json",
|
|
588
672
|
requestType: "json",
|
|
589
673
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -591,13 +675,16 @@ class Events {
|
|
|
591
675
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
592
676
|
});
|
|
593
677
|
if (_response.ok) {
|
|
594
|
-
return
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
678
|
+
return {
|
|
679
|
+
data: serializers.GetSegmentIntegrationStatusResponse.parseOrThrow(_response.body, {
|
|
680
|
+
unrecognizedObjectKeys: "passthrough",
|
|
681
|
+
allowUnrecognizedUnionMembers: true,
|
|
682
|
+
allowUnrecognizedEnumValues: true,
|
|
683
|
+
skipValidation: true,
|
|
684
|
+
breadcrumbsPrefix: ["response"],
|
|
685
|
+
}),
|
|
686
|
+
rawResponse: _response.rawResponse,
|
|
687
|
+
};
|
|
601
688
|
}
|
|
602
689
|
if (_response.error.reason === "status-code") {
|
|
603
690
|
switch (_response.error.statusCode) {
|
|
@@ -608,7 +695,7 @@ class Events {
|
|
|
608
695
|
allowUnrecognizedEnumValues: true,
|
|
609
696
|
skipValidation: true,
|
|
610
697
|
breadcrumbsPrefix: ["response"],
|
|
611
|
-
}));
|
|
698
|
+
}), _response.rawResponse);
|
|
612
699
|
case 403:
|
|
613
700
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
614
701
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -616,7 +703,7 @@ class Events {
|
|
|
616
703
|
allowUnrecognizedEnumValues: true,
|
|
617
704
|
skipValidation: true,
|
|
618
705
|
breadcrumbsPrefix: ["response"],
|
|
619
|
-
}));
|
|
706
|
+
}), _response.rawResponse);
|
|
620
707
|
case 404:
|
|
621
708
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
622
709
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -624,7 +711,7 @@ class Events {
|
|
|
624
711
|
allowUnrecognizedEnumValues: true,
|
|
625
712
|
skipValidation: true,
|
|
626
713
|
breadcrumbsPrefix: ["response"],
|
|
627
|
-
}));
|
|
714
|
+
}), _response.rawResponse);
|
|
628
715
|
case 500:
|
|
629
716
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
630
717
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -632,11 +719,12 @@ class Events {
|
|
|
632
719
|
allowUnrecognizedEnumValues: true,
|
|
633
720
|
skipValidation: true,
|
|
634
721
|
breadcrumbsPrefix: ["response"],
|
|
635
|
-
}));
|
|
722
|
+
}), _response.rawResponse);
|
|
636
723
|
default:
|
|
637
724
|
throw new errors.SchematicError({
|
|
638
725
|
statusCode: _response.error.statusCode,
|
|
639
726
|
body: _response.error.body,
|
|
727
|
+
rawResponse: _response.rawResponse,
|
|
640
728
|
});
|
|
641
729
|
}
|
|
642
730
|
}
|
|
@@ -645,12 +733,14 @@ class Events {
|
|
|
645
733
|
throw new errors.SchematicError({
|
|
646
734
|
statusCode: _response.error.statusCode,
|
|
647
735
|
body: _response.error.rawBody,
|
|
736
|
+
rawResponse: _response.rawResponse,
|
|
648
737
|
});
|
|
649
738
|
case "timeout":
|
|
650
739
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /segment-integration.");
|
|
651
740
|
case "unknown":
|
|
652
741
|
throw new errors.SchematicError({
|
|
653
742
|
message: _response.error.errorMessage,
|
|
743
|
+
rawResponse: _response.rawResponse,
|
|
654
744
|
});
|
|
655
745
|
}
|
|
656
746
|
});
|