@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,12 +66,16 @@ class Webhooks {
|
|
|
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
|
|
72
73
|
* await client.webhooks.listWebhookEvents()
|
|
73
74
|
*/
|
|
74
|
-
listWebhookEvents() {
|
|
75
|
+
listWebhookEvents(request = {}, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__listWebhookEvents(request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__listWebhookEvents() {
|
|
75
79
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
80
|
var _a, _b, _c;
|
|
77
81
|
const { ids, q, webhookId, limit, offset } = request;
|
|
@@ -99,7 +103,7 @@ class Webhooks {
|
|
|
99
103
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
100
104
|
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, "webhook-events"),
|
|
101
105
|
method: "GET",
|
|
102
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
106
|
+
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),
|
|
103
107
|
contentType: "application/json",
|
|
104
108
|
queryParameters: _queryParams,
|
|
105
109
|
requestType: "json",
|
|
@@ -108,13 +112,16 @@ class Webhooks {
|
|
|
108
112
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
113
|
});
|
|
110
114
|
if (_response.ok) {
|
|
111
|
-
return
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
return {
|
|
116
|
+
data: serializers.ListWebhookEventsResponse.parseOrThrow(_response.body, {
|
|
117
|
+
unrecognizedObjectKeys: "passthrough",
|
|
118
|
+
allowUnrecognizedUnionMembers: true,
|
|
119
|
+
allowUnrecognizedEnumValues: true,
|
|
120
|
+
skipValidation: true,
|
|
121
|
+
breadcrumbsPrefix: ["response"],
|
|
122
|
+
}),
|
|
123
|
+
rawResponse: _response.rawResponse,
|
|
124
|
+
};
|
|
118
125
|
}
|
|
119
126
|
if (_response.error.reason === "status-code") {
|
|
120
127
|
switch (_response.error.statusCode) {
|
|
@@ -125,7 +132,7 @@ class Webhooks {
|
|
|
125
132
|
allowUnrecognizedEnumValues: true,
|
|
126
133
|
skipValidation: true,
|
|
127
134
|
breadcrumbsPrefix: ["response"],
|
|
128
|
-
}));
|
|
135
|
+
}), _response.rawResponse);
|
|
129
136
|
case 401:
|
|
130
137
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
131
138
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -133,7 +140,7 @@ class Webhooks {
|
|
|
133
140
|
allowUnrecognizedEnumValues: true,
|
|
134
141
|
skipValidation: true,
|
|
135
142
|
breadcrumbsPrefix: ["response"],
|
|
136
|
-
}));
|
|
143
|
+
}), _response.rawResponse);
|
|
137
144
|
case 403:
|
|
138
145
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
139
146
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -141,7 +148,15 @@ class Webhooks {
|
|
|
141
148
|
allowUnrecognizedEnumValues: true,
|
|
142
149
|
skipValidation: true,
|
|
143
150
|
breadcrumbsPrefix: ["response"],
|
|
144
|
-
}));
|
|
151
|
+
}), _response.rawResponse);
|
|
152
|
+
case 404:
|
|
153
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
154
|
+
unrecognizedObjectKeys: "passthrough",
|
|
155
|
+
allowUnrecognizedUnionMembers: true,
|
|
156
|
+
allowUnrecognizedEnumValues: true,
|
|
157
|
+
skipValidation: true,
|
|
158
|
+
breadcrumbsPrefix: ["response"],
|
|
159
|
+
}), _response.rawResponse);
|
|
145
160
|
case 500:
|
|
146
161
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
147
162
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -149,11 +164,12 @@ class Webhooks {
|
|
|
149
164
|
allowUnrecognizedEnumValues: true,
|
|
150
165
|
skipValidation: true,
|
|
151
166
|
breadcrumbsPrefix: ["response"],
|
|
152
|
-
}));
|
|
167
|
+
}), _response.rawResponse);
|
|
153
168
|
default:
|
|
154
169
|
throw new errors.SchematicError({
|
|
155
170
|
statusCode: _response.error.statusCode,
|
|
156
171
|
body: _response.error.body,
|
|
172
|
+
rawResponse: _response.rawResponse,
|
|
157
173
|
});
|
|
158
174
|
}
|
|
159
175
|
}
|
|
@@ -162,12 +178,14 @@ class Webhooks {
|
|
|
162
178
|
throw new errors.SchematicError({
|
|
163
179
|
statusCode: _response.error.statusCode,
|
|
164
180
|
body: _response.error.rawBody,
|
|
181
|
+
rawResponse: _response.rawResponse,
|
|
165
182
|
});
|
|
166
183
|
case "timeout":
|
|
167
184
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhook-events.");
|
|
168
185
|
case "unknown":
|
|
169
186
|
throw new errors.SchematicError({
|
|
170
187
|
message: _response.error.errorMessage,
|
|
188
|
+
rawResponse: _response.rawResponse,
|
|
171
189
|
});
|
|
172
190
|
}
|
|
173
191
|
});
|
|
@@ -185,12 +203,15 @@ class Webhooks {
|
|
|
185
203
|
* await client.webhooks.getWebhookEvent("webhook_event_id")
|
|
186
204
|
*/
|
|
187
205
|
getWebhookEvent(webhookEventId, requestOptions) {
|
|
206
|
+
return core.HttpResponsePromise.fromPromise(this.__getWebhookEvent(webhookEventId, requestOptions));
|
|
207
|
+
}
|
|
208
|
+
__getWebhookEvent(webhookEventId, requestOptions) {
|
|
188
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
189
210
|
var _a, _b, _c;
|
|
190
211
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
191
212
|
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, `webhook-events/${encodeURIComponent(webhookEventId)}`),
|
|
192
213
|
method: "GET",
|
|
193
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
214
|
+
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
215
|
contentType: "application/json",
|
|
195
216
|
requestType: "json",
|
|
196
217
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -198,13 +219,16 @@ class Webhooks {
|
|
|
198
219
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
199
220
|
});
|
|
200
221
|
if (_response.ok) {
|
|
201
|
-
return
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
222
|
+
return {
|
|
223
|
+
data: serializers.GetWebhookEventResponse.parseOrThrow(_response.body, {
|
|
224
|
+
unrecognizedObjectKeys: "passthrough",
|
|
225
|
+
allowUnrecognizedUnionMembers: true,
|
|
226
|
+
allowUnrecognizedEnumValues: true,
|
|
227
|
+
skipValidation: true,
|
|
228
|
+
breadcrumbsPrefix: ["response"],
|
|
229
|
+
}),
|
|
230
|
+
rawResponse: _response.rawResponse,
|
|
231
|
+
};
|
|
208
232
|
}
|
|
209
233
|
if (_response.error.reason === "status-code") {
|
|
210
234
|
switch (_response.error.statusCode) {
|
|
@@ -215,7 +239,7 @@ class Webhooks {
|
|
|
215
239
|
allowUnrecognizedEnumValues: true,
|
|
216
240
|
skipValidation: true,
|
|
217
241
|
breadcrumbsPrefix: ["response"],
|
|
218
|
-
}));
|
|
242
|
+
}), _response.rawResponse);
|
|
219
243
|
case 403:
|
|
220
244
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
221
245
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -223,7 +247,7 @@ class Webhooks {
|
|
|
223
247
|
allowUnrecognizedEnumValues: true,
|
|
224
248
|
skipValidation: true,
|
|
225
249
|
breadcrumbsPrefix: ["response"],
|
|
226
|
-
}));
|
|
250
|
+
}), _response.rawResponse);
|
|
227
251
|
case 404:
|
|
228
252
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
229
253
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -231,7 +255,7 @@ class Webhooks {
|
|
|
231
255
|
allowUnrecognizedEnumValues: true,
|
|
232
256
|
skipValidation: true,
|
|
233
257
|
breadcrumbsPrefix: ["response"],
|
|
234
|
-
}));
|
|
258
|
+
}), _response.rawResponse);
|
|
235
259
|
case 500:
|
|
236
260
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
237
261
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -239,11 +263,12 @@ class Webhooks {
|
|
|
239
263
|
allowUnrecognizedEnumValues: true,
|
|
240
264
|
skipValidation: true,
|
|
241
265
|
breadcrumbsPrefix: ["response"],
|
|
242
|
-
}));
|
|
266
|
+
}), _response.rawResponse);
|
|
243
267
|
default:
|
|
244
268
|
throw new errors.SchematicError({
|
|
245
269
|
statusCode: _response.error.statusCode,
|
|
246
270
|
body: _response.error.body,
|
|
271
|
+
rawResponse: _response.rawResponse,
|
|
247
272
|
});
|
|
248
273
|
}
|
|
249
274
|
}
|
|
@@ -252,12 +277,14 @@ class Webhooks {
|
|
|
252
277
|
throw new errors.SchematicError({
|
|
253
278
|
statusCode: _response.error.statusCode,
|
|
254
279
|
body: _response.error.rawBody,
|
|
280
|
+
rawResponse: _response.rawResponse,
|
|
255
281
|
});
|
|
256
282
|
case "timeout":
|
|
257
283
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhook-events/{webhook_event_id}.");
|
|
258
284
|
case "unknown":
|
|
259
285
|
throw new errors.SchematicError({
|
|
260
286
|
message: _response.error.errorMessage,
|
|
287
|
+
rawResponse: _response.rawResponse,
|
|
261
288
|
});
|
|
262
289
|
}
|
|
263
290
|
});
|
|
@@ -269,12 +296,16 @@ class Webhooks {
|
|
|
269
296
|
* @throws {@link Schematic.BadRequestError}
|
|
270
297
|
* @throws {@link Schematic.UnauthorizedError}
|
|
271
298
|
* @throws {@link Schematic.ForbiddenError}
|
|
299
|
+
* @throws {@link Schematic.NotFoundError}
|
|
272
300
|
* @throws {@link Schematic.InternalServerError}
|
|
273
301
|
*
|
|
274
302
|
* @example
|
|
275
303
|
* await client.webhooks.countWebhookEvents()
|
|
276
304
|
*/
|
|
277
|
-
countWebhookEvents() {
|
|
305
|
+
countWebhookEvents(request = {}, requestOptions) {
|
|
306
|
+
return core.HttpResponsePromise.fromPromise(this.__countWebhookEvents(request, requestOptions));
|
|
307
|
+
}
|
|
308
|
+
__countWebhookEvents() {
|
|
278
309
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
279
310
|
var _a, _b, _c;
|
|
280
311
|
const { ids, q, webhookId, limit, offset } = request;
|
|
@@ -302,7 +333,7 @@ class Webhooks {
|
|
|
302
333
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
303
334
|
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, "webhook-events/count"),
|
|
304
335
|
method: "GET",
|
|
305
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
336
|
+
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),
|
|
306
337
|
contentType: "application/json",
|
|
307
338
|
queryParameters: _queryParams,
|
|
308
339
|
requestType: "json",
|
|
@@ -311,13 +342,16 @@ class Webhooks {
|
|
|
311
342
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
312
343
|
});
|
|
313
344
|
if (_response.ok) {
|
|
314
|
-
return
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
345
|
+
return {
|
|
346
|
+
data: serializers.CountWebhookEventsResponse.parseOrThrow(_response.body, {
|
|
347
|
+
unrecognizedObjectKeys: "passthrough",
|
|
348
|
+
allowUnrecognizedUnionMembers: true,
|
|
349
|
+
allowUnrecognizedEnumValues: true,
|
|
350
|
+
skipValidation: true,
|
|
351
|
+
breadcrumbsPrefix: ["response"],
|
|
352
|
+
}),
|
|
353
|
+
rawResponse: _response.rawResponse,
|
|
354
|
+
};
|
|
321
355
|
}
|
|
322
356
|
if (_response.error.reason === "status-code") {
|
|
323
357
|
switch (_response.error.statusCode) {
|
|
@@ -328,7 +362,7 @@ class Webhooks {
|
|
|
328
362
|
allowUnrecognizedEnumValues: true,
|
|
329
363
|
skipValidation: true,
|
|
330
364
|
breadcrumbsPrefix: ["response"],
|
|
331
|
-
}));
|
|
365
|
+
}), _response.rawResponse);
|
|
332
366
|
case 401:
|
|
333
367
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
334
368
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -336,7 +370,7 @@ class Webhooks {
|
|
|
336
370
|
allowUnrecognizedEnumValues: true,
|
|
337
371
|
skipValidation: true,
|
|
338
372
|
breadcrumbsPrefix: ["response"],
|
|
339
|
-
}));
|
|
373
|
+
}), _response.rawResponse);
|
|
340
374
|
case 403:
|
|
341
375
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
342
376
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -344,7 +378,15 @@ class Webhooks {
|
|
|
344
378
|
allowUnrecognizedEnumValues: true,
|
|
345
379
|
skipValidation: true,
|
|
346
380
|
breadcrumbsPrefix: ["response"],
|
|
347
|
-
}));
|
|
381
|
+
}), _response.rawResponse);
|
|
382
|
+
case 404:
|
|
383
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
384
|
+
unrecognizedObjectKeys: "passthrough",
|
|
385
|
+
allowUnrecognizedUnionMembers: true,
|
|
386
|
+
allowUnrecognizedEnumValues: true,
|
|
387
|
+
skipValidation: true,
|
|
388
|
+
breadcrumbsPrefix: ["response"],
|
|
389
|
+
}), _response.rawResponse);
|
|
348
390
|
case 500:
|
|
349
391
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
350
392
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -352,11 +394,12 @@ class Webhooks {
|
|
|
352
394
|
allowUnrecognizedEnumValues: true,
|
|
353
395
|
skipValidation: true,
|
|
354
396
|
breadcrumbsPrefix: ["response"],
|
|
355
|
-
}));
|
|
397
|
+
}), _response.rawResponse);
|
|
356
398
|
default:
|
|
357
399
|
throw new errors.SchematicError({
|
|
358
400
|
statusCode: _response.error.statusCode,
|
|
359
401
|
body: _response.error.body,
|
|
402
|
+
rawResponse: _response.rawResponse,
|
|
360
403
|
});
|
|
361
404
|
}
|
|
362
405
|
}
|
|
@@ -365,12 +408,14 @@ class Webhooks {
|
|
|
365
408
|
throw new errors.SchematicError({
|
|
366
409
|
statusCode: _response.error.statusCode,
|
|
367
410
|
body: _response.error.rawBody,
|
|
411
|
+
rawResponse: _response.rawResponse,
|
|
368
412
|
});
|
|
369
413
|
case "timeout":
|
|
370
414
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhook-events/count.");
|
|
371
415
|
case "unknown":
|
|
372
416
|
throw new errors.SchematicError({
|
|
373
417
|
message: _response.error.errorMessage,
|
|
418
|
+
rawResponse: _response.rawResponse,
|
|
374
419
|
});
|
|
375
420
|
}
|
|
376
421
|
});
|
|
@@ -382,12 +427,16 @@ class Webhooks {
|
|
|
382
427
|
* @throws {@link Schematic.BadRequestError}
|
|
383
428
|
* @throws {@link Schematic.UnauthorizedError}
|
|
384
429
|
* @throws {@link Schematic.ForbiddenError}
|
|
430
|
+
* @throws {@link Schematic.NotFoundError}
|
|
385
431
|
* @throws {@link Schematic.InternalServerError}
|
|
386
432
|
*
|
|
387
433
|
* @example
|
|
388
434
|
* await client.webhooks.listWebhooks()
|
|
389
435
|
*/
|
|
390
|
-
listWebhooks() {
|
|
436
|
+
listWebhooks(request = {}, requestOptions) {
|
|
437
|
+
return core.HttpResponsePromise.fromPromise(this.__listWebhooks(request, requestOptions));
|
|
438
|
+
}
|
|
439
|
+
__listWebhooks() {
|
|
391
440
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
392
441
|
var _a, _b, _c;
|
|
393
442
|
const { q, limit, offset } = request;
|
|
@@ -404,7 +453,7 @@ class Webhooks {
|
|
|
404
453
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
405
454
|
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, "webhooks"),
|
|
406
455
|
method: "GET",
|
|
407
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
456
|
+
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),
|
|
408
457
|
contentType: "application/json",
|
|
409
458
|
queryParameters: _queryParams,
|
|
410
459
|
requestType: "json",
|
|
@@ -413,13 +462,16 @@ class Webhooks {
|
|
|
413
462
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
414
463
|
});
|
|
415
464
|
if (_response.ok) {
|
|
416
|
-
return
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
465
|
+
return {
|
|
466
|
+
data: serializers.ListWebhooksResponse.parseOrThrow(_response.body, {
|
|
467
|
+
unrecognizedObjectKeys: "passthrough",
|
|
468
|
+
allowUnrecognizedUnionMembers: true,
|
|
469
|
+
allowUnrecognizedEnumValues: true,
|
|
470
|
+
skipValidation: true,
|
|
471
|
+
breadcrumbsPrefix: ["response"],
|
|
472
|
+
}),
|
|
473
|
+
rawResponse: _response.rawResponse,
|
|
474
|
+
};
|
|
423
475
|
}
|
|
424
476
|
if (_response.error.reason === "status-code") {
|
|
425
477
|
switch (_response.error.statusCode) {
|
|
@@ -430,7 +482,7 @@ class Webhooks {
|
|
|
430
482
|
allowUnrecognizedEnumValues: true,
|
|
431
483
|
skipValidation: true,
|
|
432
484
|
breadcrumbsPrefix: ["response"],
|
|
433
|
-
}));
|
|
485
|
+
}), _response.rawResponse);
|
|
434
486
|
case 401:
|
|
435
487
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
436
488
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -438,7 +490,7 @@ class Webhooks {
|
|
|
438
490
|
allowUnrecognizedEnumValues: true,
|
|
439
491
|
skipValidation: true,
|
|
440
492
|
breadcrumbsPrefix: ["response"],
|
|
441
|
-
}));
|
|
493
|
+
}), _response.rawResponse);
|
|
442
494
|
case 403:
|
|
443
495
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
444
496
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -446,7 +498,15 @@ class Webhooks {
|
|
|
446
498
|
allowUnrecognizedEnumValues: true,
|
|
447
499
|
skipValidation: true,
|
|
448
500
|
breadcrumbsPrefix: ["response"],
|
|
449
|
-
}));
|
|
501
|
+
}), _response.rawResponse);
|
|
502
|
+
case 404:
|
|
503
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
504
|
+
unrecognizedObjectKeys: "passthrough",
|
|
505
|
+
allowUnrecognizedUnionMembers: true,
|
|
506
|
+
allowUnrecognizedEnumValues: true,
|
|
507
|
+
skipValidation: true,
|
|
508
|
+
breadcrumbsPrefix: ["response"],
|
|
509
|
+
}), _response.rawResponse);
|
|
450
510
|
case 500:
|
|
451
511
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
452
512
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -454,11 +514,12 @@ class Webhooks {
|
|
|
454
514
|
allowUnrecognizedEnumValues: true,
|
|
455
515
|
skipValidation: true,
|
|
456
516
|
breadcrumbsPrefix: ["response"],
|
|
457
|
-
}));
|
|
517
|
+
}), _response.rawResponse);
|
|
458
518
|
default:
|
|
459
519
|
throw new errors.SchematicError({
|
|
460
520
|
statusCode: _response.error.statusCode,
|
|
461
521
|
body: _response.error.body,
|
|
522
|
+
rawResponse: _response.rawResponse,
|
|
462
523
|
});
|
|
463
524
|
}
|
|
464
525
|
}
|
|
@@ -467,12 +528,14 @@ class Webhooks {
|
|
|
467
528
|
throw new errors.SchematicError({
|
|
468
529
|
statusCode: _response.error.statusCode,
|
|
469
530
|
body: _response.error.rawBody,
|
|
531
|
+
rawResponse: _response.rawResponse,
|
|
470
532
|
});
|
|
471
533
|
case "timeout":
|
|
472
534
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhooks.");
|
|
473
535
|
case "unknown":
|
|
474
536
|
throw new errors.SchematicError({
|
|
475
537
|
message: _response.error.errorMessage,
|
|
538
|
+
rawResponse: _response.rawResponse,
|
|
476
539
|
});
|
|
477
540
|
}
|
|
478
541
|
});
|
|
@@ -484,6 +547,7 @@ class Webhooks {
|
|
|
484
547
|
* @throws {@link Schematic.BadRequestError}
|
|
485
548
|
* @throws {@link Schematic.UnauthorizedError}
|
|
486
549
|
* @throws {@link Schematic.ForbiddenError}
|
|
550
|
+
* @throws {@link Schematic.NotFoundError}
|
|
487
551
|
* @throws {@link Schematic.InternalServerError}
|
|
488
552
|
*
|
|
489
553
|
* @example
|
|
@@ -494,12 +558,15 @@ class Webhooks {
|
|
|
494
558
|
* })
|
|
495
559
|
*/
|
|
496
560
|
createWebhook(request, requestOptions) {
|
|
561
|
+
return core.HttpResponsePromise.fromPromise(this.__createWebhook(request, requestOptions));
|
|
562
|
+
}
|
|
563
|
+
__createWebhook(request, requestOptions) {
|
|
497
564
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
565
|
var _a, _b, _c;
|
|
499
566
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
500
567
|
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, "webhooks"),
|
|
501
568
|
method: "POST",
|
|
502
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
569
|
+
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),
|
|
503
570
|
contentType: "application/json",
|
|
504
571
|
requestType: "json",
|
|
505
572
|
body: serializers.CreateWebhookRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -508,13 +575,16 @@ class Webhooks {
|
|
|
508
575
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
509
576
|
});
|
|
510
577
|
if (_response.ok) {
|
|
511
|
-
return
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
578
|
+
return {
|
|
579
|
+
data: serializers.CreateWebhookResponse.parseOrThrow(_response.body, {
|
|
580
|
+
unrecognizedObjectKeys: "passthrough",
|
|
581
|
+
allowUnrecognizedUnionMembers: true,
|
|
582
|
+
allowUnrecognizedEnumValues: true,
|
|
583
|
+
skipValidation: true,
|
|
584
|
+
breadcrumbsPrefix: ["response"],
|
|
585
|
+
}),
|
|
586
|
+
rawResponse: _response.rawResponse,
|
|
587
|
+
};
|
|
518
588
|
}
|
|
519
589
|
if (_response.error.reason === "status-code") {
|
|
520
590
|
switch (_response.error.statusCode) {
|
|
@@ -525,7 +595,7 @@ class Webhooks {
|
|
|
525
595
|
allowUnrecognizedEnumValues: true,
|
|
526
596
|
skipValidation: true,
|
|
527
597
|
breadcrumbsPrefix: ["response"],
|
|
528
|
-
}));
|
|
598
|
+
}), _response.rawResponse);
|
|
529
599
|
case 401:
|
|
530
600
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
531
601
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -533,7 +603,7 @@ class Webhooks {
|
|
|
533
603
|
allowUnrecognizedEnumValues: true,
|
|
534
604
|
skipValidation: true,
|
|
535
605
|
breadcrumbsPrefix: ["response"],
|
|
536
|
-
}));
|
|
606
|
+
}), _response.rawResponse);
|
|
537
607
|
case 403:
|
|
538
608
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
539
609
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -541,7 +611,15 @@ class Webhooks {
|
|
|
541
611
|
allowUnrecognizedEnumValues: true,
|
|
542
612
|
skipValidation: true,
|
|
543
613
|
breadcrumbsPrefix: ["response"],
|
|
544
|
-
}));
|
|
614
|
+
}), _response.rawResponse);
|
|
615
|
+
case 404:
|
|
616
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
617
|
+
unrecognizedObjectKeys: "passthrough",
|
|
618
|
+
allowUnrecognizedUnionMembers: true,
|
|
619
|
+
allowUnrecognizedEnumValues: true,
|
|
620
|
+
skipValidation: true,
|
|
621
|
+
breadcrumbsPrefix: ["response"],
|
|
622
|
+
}), _response.rawResponse);
|
|
545
623
|
case 500:
|
|
546
624
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
547
625
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -549,11 +627,12 @@ class Webhooks {
|
|
|
549
627
|
allowUnrecognizedEnumValues: true,
|
|
550
628
|
skipValidation: true,
|
|
551
629
|
breadcrumbsPrefix: ["response"],
|
|
552
|
-
}));
|
|
630
|
+
}), _response.rawResponse);
|
|
553
631
|
default:
|
|
554
632
|
throw new errors.SchematicError({
|
|
555
633
|
statusCode: _response.error.statusCode,
|
|
556
634
|
body: _response.error.body,
|
|
635
|
+
rawResponse: _response.rawResponse,
|
|
557
636
|
});
|
|
558
637
|
}
|
|
559
638
|
}
|
|
@@ -562,12 +641,14 @@ class Webhooks {
|
|
|
562
641
|
throw new errors.SchematicError({
|
|
563
642
|
statusCode: _response.error.statusCode,
|
|
564
643
|
body: _response.error.rawBody,
|
|
644
|
+
rawResponse: _response.rawResponse,
|
|
565
645
|
});
|
|
566
646
|
case "timeout":
|
|
567
647
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /webhooks.");
|
|
568
648
|
case "unknown":
|
|
569
649
|
throw new errors.SchematicError({
|
|
570
650
|
message: _response.error.errorMessage,
|
|
651
|
+
rawResponse: _response.rawResponse,
|
|
571
652
|
});
|
|
572
653
|
}
|
|
573
654
|
});
|
|
@@ -585,12 +666,15 @@ class Webhooks {
|
|
|
585
666
|
* await client.webhooks.getWebhook("webhook_id")
|
|
586
667
|
*/
|
|
587
668
|
getWebhook(webhookId, requestOptions) {
|
|
669
|
+
return core.HttpResponsePromise.fromPromise(this.__getWebhook(webhookId, requestOptions));
|
|
670
|
+
}
|
|
671
|
+
__getWebhook(webhookId, requestOptions) {
|
|
588
672
|
return __awaiter(this, void 0, void 0, function* () {
|
|
589
673
|
var _a, _b, _c;
|
|
590
674
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
591
675
|
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, `webhooks/${encodeURIComponent(webhookId)}`),
|
|
592
676
|
method: "GET",
|
|
593
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
677
|
+
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),
|
|
594
678
|
contentType: "application/json",
|
|
595
679
|
requestType: "json",
|
|
596
680
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -598,13 +682,16 @@ class Webhooks {
|
|
|
598
682
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
599
683
|
});
|
|
600
684
|
if (_response.ok) {
|
|
601
|
-
return
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
685
|
+
return {
|
|
686
|
+
data: serializers.GetWebhookResponse.parseOrThrow(_response.body, {
|
|
687
|
+
unrecognizedObjectKeys: "passthrough",
|
|
688
|
+
allowUnrecognizedUnionMembers: true,
|
|
689
|
+
allowUnrecognizedEnumValues: true,
|
|
690
|
+
skipValidation: true,
|
|
691
|
+
breadcrumbsPrefix: ["response"],
|
|
692
|
+
}),
|
|
693
|
+
rawResponse: _response.rawResponse,
|
|
694
|
+
};
|
|
608
695
|
}
|
|
609
696
|
if (_response.error.reason === "status-code") {
|
|
610
697
|
switch (_response.error.statusCode) {
|
|
@@ -615,7 +702,7 @@ class Webhooks {
|
|
|
615
702
|
allowUnrecognizedEnumValues: true,
|
|
616
703
|
skipValidation: true,
|
|
617
704
|
breadcrumbsPrefix: ["response"],
|
|
618
|
-
}));
|
|
705
|
+
}), _response.rawResponse);
|
|
619
706
|
case 403:
|
|
620
707
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
621
708
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -623,7 +710,7 @@ class Webhooks {
|
|
|
623
710
|
allowUnrecognizedEnumValues: true,
|
|
624
711
|
skipValidation: true,
|
|
625
712
|
breadcrumbsPrefix: ["response"],
|
|
626
|
-
}));
|
|
713
|
+
}), _response.rawResponse);
|
|
627
714
|
case 404:
|
|
628
715
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
629
716
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -631,7 +718,7 @@ class Webhooks {
|
|
|
631
718
|
allowUnrecognizedEnumValues: true,
|
|
632
719
|
skipValidation: true,
|
|
633
720
|
breadcrumbsPrefix: ["response"],
|
|
634
|
-
}));
|
|
721
|
+
}), _response.rawResponse);
|
|
635
722
|
case 500:
|
|
636
723
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
637
724
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -639,11 +726,12 @@ class Webhooks {
|
|
|
639
726
|
allowUnrecognizedEnumValues: true,
|
|
640
727
|
skipValidation: true,
|
|
641
728
|
breadcrumbsPrefix: ["response"],
|
|
642
|
-
}));
|
|
729
|
+
}), _response.rawResponse);
|
|
643
730
|
default:
|
|
644
731
|
throw new errors.SchematicError({
|
|
645
732
|
statusCode: _response.error.statusCode,
|
|
646
733
|
body: _response.error.body,
|
|
734
|
+
rawResponse: _response.rawResponse,
|
|
647
735
|
});
|
|
648
736
|
}
|
|
649
737
|
}
|
|
@@ -652,12 +740,14 @@ class Webhooks {
|
|
|
652
740
|
throw new errors.SchematicError({
|
|
653
741
|
statusCode: _response.error.statusCode,
|
|
654
742
|
body: _response.error.rawBody,
|
|
743
|
+
rawResponse: _response.rawResponse,
|
|
655
744
|
});
|
|
656
745
|
case "timeout":
|
|
657
746
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhooks/{webhook_id}.");
|
|
658
747
|
case "unknown":
|
|
659
748
|
throw new errors.SchematicError({
|
|
660
749
|
message: _response.error.errorMessage,
|
|
750
|
+
rawResponse: _response.rawResponse,
|
|
661
751
|
});
|
|
662
752
|
}
|
|
663
753
|
});
|
|
@@ -676,13 +766,16 @@ class Webhooks {
|
|
|
676
766
|
* @example
|
|
677
767
|
* await client.webhooks.updateWebhook("webhook_id")
|
|
678
768
|
*/
|
|
679
|
-
updateWebhook(
|
|
769
|
+
updateWebhook(webhookId, request = {}, requestOptions) {
|
|
770
|
+
return core.HttpResponsePromise.fromPromise(this.__updateWebhook(webhookId, request, requestOptions));
|
|
771
|
+
}
|
|
772
|
+
__updateWebhook(webhookId_1) {
|
|
680
773
|
return __awaiter(this, arguments, void 0, function* (webhookId, request = {}, requestOptions) {
|
|
681
774
|
var _a, _b, _c;
|
|
682
775
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
683
776
|
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, `webhooks/${encodeURIComponent(webhookId)}`),
|
|
684
777
|
method: "PUT",
|
|
685
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
778
|
+
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),
|
|
686
779
|
contentType: "application/json",
|
|
687
780
|
requestType: "json",
|
|
688
781
|
body: serializers.UpdateWebhookRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -691,13 +784,16 @@ class Webhooks {
|
|
|
691
784
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
692
785
|
});
|
|
693
786
|
if (_response.ok) {
|
|
694
|
-
return
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
787
|
+
return {
|
|
788
|
+
data: serializers.UpdateWebhookResponse.parseOrThrow(_response.body, {
|
|
789
|
+
unrecognizedObjectKeys: "passthrough",
|
|
790
|
+
allowUnrecognizedUnionMembers: true,
|
|
791
|
+
allowUnrecognizedEnumValues: true,
|
|
792
|
+
skipValidation: true,
|
|
793
|
+
breadcrumbsPrefix: ["response"],
|
|
794
|
+
}),
|
|
795
|
+
rawResponse: _response.rawResponse,
|
|
796
|
+
};
|
|
701
797
|
}
|
|
702
798
|
if (_response.error.reason === "status-code") {
|
|
703
799
|
switch (_response.error.statusCode) {
|
|
@@ -708,7 +804,7 @@ class Webhooks {
|
|
|
708
804
|
allowUnrecognizedEnumValues: true,
|
|
709
805
|
skipValidation: true,
|
|
710
806
|
breadcrumbsPrefix: ["response"],
|
|
711
|
-
}));
|
|
807
|
+
}), _response.rawResponse);
|
|
712
808
|
case 401:
|
|
713
809
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
714
810
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -716,7 +812,7 @@ class Webhooks {
|
|
|
716
812
|
allowUnrecognizedEnumValues: true,
|
|
717
813
|
skipValidation: true,
|
|
718
814
|
breadcrumbsPrefix: ["response"],
|
|
719
|
-
}));
|
|
815
|
+
}), _response.rawResponse);
|
|
720
816
|
case 403:
|
|
721
817
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
722
818
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -724,7 +820,7 @@ class Webhooks {
|
|
|
724
820
|
allowUnrecognizedEnumValues: true,
|
|
725
821
|
skipValidation: true,
|
|
726
822
|
breadcrumbsPrefix: ["response"],
|
|
727
|
-
}));
|
|
823
|
+
}), _response.rawResponse);
|
|
728
824
|
case 404:
|
|
729
825
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
730
826
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -732,7 +828,7 @@ class Webhooks {
|
|
|
732
828
|
allowUnrecognizedEnumValues: true,
|
|
733
829
|
skipValidation: true,
|
|
734
830
|
breadcrumbsPrefix: ["response"],
|
|
735
|
-
}));
|
|
831
|
+
}), _response.rawResponse);
|
|
736
832
|
case 500:
|
|
737
833
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
738
834
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -740,11 +836,12 @@ class Webhooks {
|
|
|
740
836
|
allowUnrecognizedEnumValues: true,
|
|
741
837
|
skipValidation: true,
|
|
742
838
|
breadcrumbsPrefix: ["response"],
|
|
743
|
-
}));
|
|
839
|
+
}), _response.rawResponse);
|
|
744
840
|
default:
|
|
745
841
|
throw new errors.SchematicError({
|
|
746
842
|
statusCode: _response.error.statusCode,
|
|
747
843
|
body: _response.error.body,
|
|
844
|
+
rawResponse: _response.rawResponse,
|
|
748
845
|
});
|
|
749
846
|
}
|
|
750
847
|
}
|
|
@@ -753,12 +850,14 @@ class Webhooks {
|
|
|
753
850
|
throw new errors.SchematicError({
|
|
754
851
|
statusCode: _response.error.statusCode,
|
|
755
852
|
body: _response.error.rawBody,
|
|
853
|
+
rawResponse: _response.rawResponse,
|
|
756
854
|
});
|
|
757
855
|
case "timeout":
|
|
758
856
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /webhooks/{webhook_id}.");
|
|
759
857
|
case "unknown":
|
|
760
858
|
throw new errors.SchematicError({
|
|
761
859
|
message: _response.error.errorMessage,
|
|
860
|
+
rawResponse: _response.rawResponse,
|
|
762
861
|
});
|
|
763
862
|
}
|
|
764
863
|
});
|
|
@@ -770,18 +869,22 @@ class Webhooks {
|
|
|
770
869
|
* @throws {@link Schematic.BadRequestError}
|
|
771
870
|
* @throws {@link Schematic.UnauthorizedError}
|
|
772
871
|
* @throws {@link Schematic.ForbiddenError}
|
|
872
|
+
* @throws {@link Schematic.NotFoundError}
|
|
773
873
|
* @throws {@link Schematic.InternalServerError}
|
|
774
874
|
*
|
|
775
875
|
* @example
|
|
776
876
|
* await client.webhooks.deleteWebhook("webhook_id")
|
|
777
877
|
*/
|
|
778
878
|
deleteWebhook(webhookId, requestOptions) {
|
|
879
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteWebhook(webhookId, requestOptions));
|
|
880
|
+
}
|
|
881
|
+
__deleteWebhook(webhookId, requestOptions) {
|
|
779
882
|
return __awaiter(this, void 0, void 0, function* () {
|
|
780
883
|
var _a, _b, _c;
|
|
781
884
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
782
885
|
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, `webhooks/${encodeURIComponent(webhookId)}`),
|
|
783
886
|
method: "DELETE",
|
|
784
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
887
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
785
888
|
contentType: "application/json",
|
|
786
889
|
requestType: "json",
|
|
787
890
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -789,13 +892,16 @@ class Webhooks {
|
|
|
789
892
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
790
893
|
});
|
|
791
894
|
if (_response.ok) {
|
|
792
|
-
return
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
895
|
+
return {
|
|
896
|
+
data: serializers.DeleteWebhookResponse.parseOrThrow(_response.body, {
|
|
897
|
+
unrecognizedObjectKeys: "passthrough",
|
|
898
|
+
allowUnrecognizedUnionMembers: true,
|
|
899
|
+
allowUnrecognizedEnumValues: true,
|
|
900
|
+
skipValidation: true,
|
|
901
|
+
breadcrumbsPrefix: ["response"],
|
|
902
|
+
}),
|
|
903
|
+
rawResponse: _response.rawResponse,
|
|
904
|
+
};
|
|
799
905
|
}
|
|
800
906
|
if (_response.error.reason === "status-code") {
|
|
801
907
|
switch (_response.error.statusCode) {
|
|
@@ -806,7 +912,7 @@ class Webhooks {
|
|
|
806
912
|
allowUnrecognizedEnumValues: true,
|
|
807
913
|
skipValidation: true,
|
|
808
914
|
breadcrumbsPrefix: ["response"],
|
|
809
|
-
}));
|
|
915
|
+
}), _response.rawResponse);
|
|
810
916
|
case 401:
|
|
811
917
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
812
918
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -814,7 +920,7 @@ class Webhooks {
|
|
|
814
920
|
allowUnrecognizedEnumValues: true,
|
|
815
921
|
skipValidation: true,
|
|
816
922
|
breadcrumbsPrefix: ["response"],
|
|
817
|
-
}));
|
|
923
|
+
}), _response.rawResponse);
|
|
818
924
|
case 403:
|
|
819
925
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
820
926
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -822,7 +928,15 @@ class Webhooks {
|
|
|
822
928
|
allowUnrecognizedEnumValues: true,
|
|
823
929
|
skipValidation: true,
|
|
824
930
|
breadcrumbsPrefix: ["response"],
|
|
825
|
-
}));
|
|
931
|
+
}), _response.rawResponse);
|
|
932
|
+
case 404:
|
|
933
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
934
|
+
unrecognizedObjectKeys: "passthrough",
|
|
935
|
+
allowUnrecognizedUnionMembers: true,
|
|
936
|
+
allowUnrecognizedEnumValues: true,
|
|
937
|
+
skipValidation: true,
|
|
938
|
+
breadcrumbsPrefix: ["response"],
|
|
939
|
+
}), _response.rawResponse);
|
|
826
940
|
case 500:
|
|
827
941
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
828
942
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -830,11 +944,12 @@ class Webhooks {
|
|
|
830
944
|
allowUnrecognizedEnumValues: true,
|
|
831
945
|
skipValidation: true,
|
|
832
946
|
breadcrumbsPrefix: ["response"],
|
|
833
|
-
}));
|
|
947
|
+
}), _response.rawResponse);
|
|
834
948
|
default:
|
|
835
949
|
throw new errors.SchematicError({
|
|
836
950
|
statusCode: _response.error.statusCode,
|
|
837
951
|
body: _response.error.body,
|
|
952
|
+
rawResponse: _response.rawResponse,
|
|
838
953
|
});
|
|
839
954
|
}
|
|
840
955
|
}
|
|
@@ -843,12 +958,14 @@ class Webhooks {
|
|
|
843
958
|
throw new errors.SchematicError({
|
|
844
959
|
statusCode: _response.error.statusCode,
|
|
845
960
|
body: _response.error.rawBody,
|
|
961
|
+
rawResponse: _response.rawResponse,
|
|
846
962
|
});
|
|
847
963
|
case "timeout":
|
|
848
964
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /webhooks/{webhook_id}.");
|
|
849
965
|
case "unknown":
|
|
850
966
|
throw new errors.SchematicError({
|
|
851
967
|
message: _response.error.errorMessage,
|
|
968
|
+
rawResponse: _response.rawResponse,
|
|
852
969
|
});
|
|
853
970
|
}
|
|
854
971
|
});
|
|
@@ -860,12 +977,16 @@ class Webhooks {
|
|
|
860
977
|
* @throws {@link Schematic.BadRequestError}
|
|
861
978
|
* @throws {@link Schematic.UnauthorizedError}
|
|
862
979
|
* @throws {@link Schematic.ForbiddenError}
|
|
980
|
+
* @throws {@link Schematic.NotFoundError}
|
|
863
981
|
* @throws {@link Schematic.InternalServerError}
|
|
864
982
|
*
|
|
865
983
|
* @example
|
|
866
984
|
* await client.webhooks.countWebhooks()
|
|
867
985
|
*/
|
|
868
|
-
countWebhooks() {
|
|
986
|
+
countWebhooks(request = {}, requestOptions) {
|
|
987
|
+
return core.HttpResponsePromise.fromPromise(this.__countWebhooks(request, requestOptions));
|
|
988
|
+
}
|
|
989
|
+
__countWebhooks() {
|
|
869
990
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
870
991
|
var _a, _b, _c;
|
|
871
992
|
const { q, limit, offset } = request;
|
|
@@ -882,7 +1003,7 @@ class Webhooks {
|
|
|
882
1003
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
883
1004
|
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, "webhooks/count"),
|
|
884
1005
|
method: "GET",
|
|
885
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1006
|
+
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),
|
|
886
1007
|
contentType: "application/json",
|
|
887
1008
|
queryParameters: _queryParams,
|
|
888
1009
|
requestType: "json",
|
|
@@ -891,13 +1012,16 @@ class Webhooks {
|
|
|
891
1012
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
892
1013
|
});
|
|
893
1014
|
if (_response.ok) {
|
|
894
|
-
return
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
1015
|
+
return {
|
|
1016
|
+
data: serializers.CountWebhooksResponse.parseOrThrow(_response.body, {
|
|
1017
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1018
|
+
allowUnrecognizedUnionMembers: true,
|
|
1019
|
+
allowUnrecognizedEnumValues: true,
|
|
1020
|
+
skipValidation: true,
|
|
1021
|
+
breadcrumbsPrefix: ["response"],
|
|
1022
|
+
}),
|
|
1023
|
+
rawResponse: _response.rawResponse,
|
|
1024
|
+
};
|
|
901
1025
|
}
|
|
902
1026
|
if (_response.error.reason === "status-code") {
|
|
903
1027
|
switch (_response.error.statusCode) {
|
|
@@ -908,7 +1032,7 @@ class Webhooks {
|
|
|
908
1032
|
allowUnrecognizedEnumValues: true,
|
|
909
1033
|
skipValidation: true,
|
|
910
1034
|
breadcrumbsPrefix: ["response"],
|
|
911
|
-
}));
|
|
1035
|
+
}), _response.rawResponse);
|
|
912
1036
|
case 401:
|
|
913
1037
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
914
1038
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -916,7 +1040,7 @@ class Webhooks {
|
|
|
916
1040
|
allowUnrecognizedEnumValues: true,
|
|
917
1041
|
skipValidation: true,
|
|
918
1042
|
breadcrumbsPrefix: ["response"],
|
|
919
|
-
}));
|
|
1043
|
+
}), _response.rawResponse);
|
|
920
1044
|
case 403:
|
|
921
1045
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
922
1046
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -924,7 +1048,15 @@ class Webhooks {
|
|
|
924
1048
|
allowUnrecognizedEnumValues: true,
|
|
925
1049
|
skipValidation: true,
|
|
926
1050
|
breadcrumbsPrefix: ["response"],
|
|
927
|
-
}));
|
|
1051
|
+
}), _response.rawResponse);
|
|
1052
|
+
case 404:
|
|
1053
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1054
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1055
|
+
allowUnrecognizedUnionMembers: true,
|
|
1056
|
+
allowUnrecognizedEnumValues: true,
|
|
1057
|
+
skipValidation: true,
|
|
1058
|
+
breadcrumbsPrefix: ["response"],
|
|
1059
|
+
}), _response.rawResponse);
|
|
928
1060
|
case 500:
|
|
929
1061
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
930
1062
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -932,11 +1064,12 @@ class Webhooks {
|
|
|
932
1064
|
allowUnrecognizedEnumValues: true,
|
|
933
1065
|
skipValidation: true,
|
|
934
1066
|
breadcrumbsPrefix: ["response"],
|
|
935
|
-
}));
|
|
1067
|
+
}), _response.rawResponse);
|
|
936
1068
|
default:
|
|
937
1069
|
throw new errors.SchematicError({
|
|
938
1070
|
statusCode: _response.error.statusCode,
|
|
939
1071
|
body: _response.error.body,
|
|
1072
|
+
rawResponse: _response.rawResponse,
|
|
940
1073
|
});
|
|
941
1074
|
}
|
|
942
1075
|
}
|
|
@@ -945,12 +1078,14 @@ class Webhooks {
|
|
|
945
1078
|
throw new errors.SchematicError({
|
|
946
1079
|
statusCode: _response.error.statusCode,
|
|
947
1080
|
body: _response.error.rawBody,
|
|
1081
|
+
rawResponse: _response.rawResponse,
|
|
948
1082
|
});
|
|
949
1083
|
case "timeout":
|
|
950
1084
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /webhooks/count.");
|
|
951
1085
|
case "unknown":
|
|
952
1086
|
throw new errors.SchematicError({
|
|
953
1087
|
message: _response.error.errorMessage,
|
|
1088
|
+
rawResponse: _response.rawResponse,
|
|
954
1089
|
});
|
|
955
1090
|
}
|
|
956
1091
|
});
|