@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
|
@@ -33,6 +33,7 @@ export declare class Crm {
|
|
|
33
33
|
* @throws {@link Schematic.BadRequestError}
|
|
34
34
|
* @throws {@link Schematic.UnauthorizedError}
|
|
35
35
|
* @throws {@link Schematic.ForbiddenError}
|
|
36
|
+
* @throws {@link Schematic.NotFoundError}
|
|
36
37
|
* @throws {@link Schematic.InternalServerError}
|
|
37
38
|
*
|
|
38
39
|
* @example
|
|
@@ -41,7 +42,8 @@ export declare class Crm {
|
|
|
41
42
|
* lineItemExternalId: "line_item_external_id"
|
|
42
43
|
* })
|
|
43
44
|
*/
|
|
44
|
-
upsertDealLineItemAssociation(request: Schematic.CreateCrmDealLineItemAssociationRequestBody, requestOptions?: Crm.RequestOptions):
|
|
45
|
+
upsertDealLineItemAssociation(request: Schematic.CreateCrmDealLineItemAssociationRequestBody, requestOptions?: Crm.RequestOptions): core.HttpResponsePromise<Schematic.UpsertDealLineItemAssociationResponse>;
|
|
46
|
+
private __upsertDealLineItemAssociation;
|
|
45
47
|
/**
|
|
46
48
|
* @param {Schematic.CreateCrmLineItemRequestBody} request
|
|
47
49
|
* @param {Crm.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -49,6 +51,7 @@ export declare class Crm {
|
|
|
49
51
|
* @throws {@link Schematic.BadRequestError}
|
|
50
52
|
* @throws {@link Schematic.UnauthorizedError}
|
|
51
53
|
* @throws {@link Schematic.ForbiddenError}
|
|
54
|
+
* @throws {@link Schematic.NotFoundError}
|
|
52
55
|
* @throws {@link Schematic.InternalServerError}
|
|
53
56
|
*
|
|
54
57
|
* @example
|
|
@@ -60,7 +63,8 @@ export declare class Crm {
|
|
|
60
63
|
* quantity: 1
|
|
61
64
|
* })
|
|
62
65
|
*/
|
|
63
|
-
upsertLineItem(request: Schematic.CreateCrmLineItemRequestBody, requestOptions?: Crm.RequestOptions):
|
|
66
|
+
upsertLineItem(request: Schematic.CreateCrmLineItemRequestBody, requestOptions?: Crm.RequestOptions): core.HttpResponsePromise<Schematic.UpsertLineItemResponse>;
|
|
67
|
+
private __upsertLineItem;
|
|
64
68
|
/**
|
|
65
69
|
* @param {Schematic.CreateCrmDealRequestBody} request
|
|
66
70
|
* @param {Crm.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -68,6 +72,7 @@ export declare class Crm {
|
|
|
68
72
|
* @throws {@link Schematic.BadRequestError}
|
|
69
73
|
* @throws {@link Schematic.UnauthorizedError}
|
|
70
74
|
* @throws {@link Schematic.ForbiddenError}
|
|
75
|
+
* @throws {@link Schematic.NotFoundError}
|
|
71
76
|
* @throws {@link Schematic.InternalServerError}
|
|
72
77
|
*
|
|
73
78
|
* @example
|
|
@@ -77,7 +82,8 @@ export declare class Crm {
|
|
|
77
82
|
* dealExternalId: "deal_external_id"
|
|
78
83
|
* })
|
|
79
84
|
*/
|
|
80
|
-
upsertCrmDeal(request: Schematic.CreateCrmDealRequestBody, requestOptions?: Crm.RequestOptions):
|
|
85
|
+
upsertCrmDeal(request: Schematic.CreateCrmDealRequestBody, requestOptions?: Crm.RequestOptions): core.HttpResponsePromise<Schematic.UpsertCrmDealResponse>;
|
|
86
|
+
private __upsertCrmDeal;
|
|
81
87
|
/**
|
|
82
88
|
* @param {Schematic.ListCrmProductsRequest} request
|
|
83
89
|
* @param {Crm.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -85,12 +91,14 @@ export declare class Crm {
|
|
|
85
91
|
* @throws {@link Schematic.BadRequestError}
|
|
86
92
|
* @throws {@link Schematic.UnauthorizedError}
|
|
87
93
|
* @throws {@link Schematic.ForbiddenError}
|
|
94
|
+
* @throws {@link Schematic.NotFoundError}
|
|
88
95
|
* @throws {@link Schematic.InternalServerError}
|
|
89
96
|
*
|
|
90
97
|
* @example
|
|
91
98
|
* await client.crm.listCrmProducts()
|
|
92
99
|
*/
|
|
93
|
-
listCrmProducts(request?: Schematic.ListCrmProductsRequest, requestOptions?: Crm.RequestOptions):
|
|
100
|
+
listCrmProducts(request?: Schematic.ListCrmProductsRequest, requestOptions?: Crm.RequestOptions): core.HttpResponsePromise<Schematic.ListCrmProductsResponse>;
|
|
101
|
+
private __listCrmProducts;
|
|
94
102
|
/**
|
|
95
103
|
* @param {Schematic.CreateCrmProductRequestBody} request
|
|
96
104
|
* @param {Crm.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -98,6 +106,7 @@ export declare class Crm {
|
|
|
98
106
|
* @throws {@link Schematic.BadRequestError}
|
|
99
107
|
* @throws {@link Schematic.UnauthorizedError}
|
|
100
108
|
* @throws {@link Schematic.ForbiddenError}
|
|
109
|
+
* @throws {@link Schematic.NotFoundError}
|
|
101
110
|
* @throws {@link Schematic.InternalServerError}
|
|
102
111
|
*
|
|
103
112
|
* @example
|
|
@@ -112,7 +121,8 @@ export declare class Crm {
|
|
|
112
121
|
* sku: "sku"
|
|
113
122
|
* })
|
|
114
123
|
*/
|
|
115
|
-
upsertCrmProduct(request: Schematic.CreateCrmProductRequestBody, requestOptions?: Crm.RequestOptions):
|
|
124
|
+
upsertCrmProduct(request: Schematic.CreateCrmProductRequestBody, requestOptions?: Crm.RequestOptions): core.HttpResponsePromise<Schematic.UpsertCrmProductResponse>;
|
|
125
|
+
private __upsertCrmProduct;
|
|
116
126
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
117
127
|
"X-Schematic-Api-Key": string;
|
|
118
128
|
}>;
|
|
@@ -66,6 +66,7 @@ class Crm {
|
|
|
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
|
|
@@ -75,12 +76,15 @@ class Crm {
|
|
|
75
76
|
* })
|
|
76
77
|
*/
|
|
77
78
|
upsertDealLineItemAssociation(request, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertDealLineItemAssociation(request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__upsertDealLineItemAssociation(request, requestOptions) {
|
|
78
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
79
83
|
var _a, _b, _c;
|
|
80
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
85
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "crm/associations/deal-line-item"),
|
|
82
86
|
method: "POST",
|
|
83
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
87
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.11", "User-Agent": "@schematichq/schematic-typescript-node/1.1.11", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
88
|
contentType: "application/json",
|
|
85
89
|
requestType: "json",
|
|
86
90
|
body: serializers.CreateCrmDealLineItemAssociationRequestBody.jsonOrThrow(request, {
|
|
@@ -91,13 +95,16 @@ class Crm {
|
|
|
91
95
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
92
96
|
});
|
|
93
97
|
if (_response.ok) {
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
return {
|
|
99
|
+
data: serializers.UpsertDealLineItemAssociationResponse.parseOrThrow(_response.body, {
|
|
100
|
+
unrecognizedObjectKeys: "passthrough",
|
|
101
|
+
allowUnrecognizedUnionMembers: true,
|
|
102
|
+
allowUnrecognizedEnumValues: true,
|
|
103
|
+
skipValidation: true,
|
|
104
|
+
breadcrumbsPrefix: ["response"],
|
|
105
|
+
}),
|
|
106
|
+
rawResponse: _response.rawResponse,
|
|
107
|
+
};
|
|
101
108
|
}
|
|
102
109
|
if (_response.error.reason === "status-code") {
|
|
103
110
|
switch (_response.error.statusCode) {
|
|
@@ -108,7 +115,7 @@ class Crm {
|
|
|
108
115
|
allowUnrecognizedEnumValues: true,
|
|
109
116
|
skipValidation: true,
|
|
110
117
|
breadcrumbsPrefix: ["response"],
|
|
111
|
-
}));
|
|
118
|
+
}), _response.rawResponse);
|
|
112
119
|
case 401:
|
|
113
120
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
114
121
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -116,7 +123,7 @@ class Crm {
|
|
|
116
123
|
allowUnrecognizedEnumValues: true,
|
|
117
124
|
skipValidation: true,
|
|
118
125
|
breadcrumbsPrefix: ["response"],
|
|
119
|
-
}));
|
|
126
|
+
}), _response.rawResponse);
|
|
120
127
|
case 403:
|
|
121
128
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
122
129
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -124,7 +131,15 @@ class Crm {
|
|
|
124
131
|
allowUnrecognizedEnumValues: true,
|
|
125
132
|
skipValidation: true,
|
|
126
133
|
breadcrumbsPrefix: ["response"],
|
|
127
|
-
}));
|
|
134
|
+
}), _response.rawResponse);
|
|
135
|
+
case 404:
|
|
136
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
137
|
+
unrecognizedObjectKeys: "passthrough",
|
|
138
|
+
allowUnrecognizedUnionMembers: true,
|
|
139
|
+
allowUnrecognizedEnumValues: true,
|
|
140
|
+
skipValidation: true,
|
|
141
|
+
breadcrumbsPrefix: ["response"],
|
|
142
|
+
}), _response.rawResponse);
|
|
128
143
|
case 500:
|
|
129
144
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
130
145
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -132,11 +147,12 @@ class Crm {
|
|
|
132
147
|
allowUnrecognizedEnumValues: true,
|
|
133
148
|
skipValidation: true,
|
|
134
149
|
breadcrumbsPrefix: ["response"],
|
|
135
|
-
}));
|
|
150
|
+
}), _response.rawResponse);
|
|
136
151
|
default:
|
|
137
152
|
throw new errors.SchematicError({
|
|
138
153
|
statusCode: _response.error.statusCode,
|
|
139
154
|
body: _response.error.body,
|
|
155
|
+
rawResponse: _response.rawResponse,
|
|
140
156
|
});
|
|
141
157
|
}
|
|
142
158
|
}
|
|
@@ -145,12 +161,14 @@ class Crm {
|
|
|
145
161
|
throw new errors.SchematicError({
|
|
146
162
|
statusCode: _response.error.statusCode,
|
|
147
163
|
body: _response.error.rawBody,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
148
165
|
});
|
|
149
166
|
case "timeout":
|
|
150
167
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /crm/associations/deal-line-item.");
|
|
151
168
|
case "unknown":
|
|
152
169
|
throw new errors.SchematicError({
|
|
153
170
|
message: _response.error.errorMessage,
|
|
171
|
+
rawResponse: _response.rawResponse,
|
|
154
172
|
});
|
|
155
173
|
}
|
|
156
174
|
});
|
|
@@ -162,6 +180,7 @@ class Crm {
|
|
|
162
180
|
* @throws {@link Schematic.BadRequestError}
|
|
163
181
|
* @throws {@link Schematic.UnauthorizedError}
|
|
164
182
|
* @throws {@link Schematic.ForbiddenError}
|
|
183
|
+
* @throws {@link Schematic.NotFoundError}
|
|
165
184
|
* @throws {@link Schematic.InternalServerError}
|
|
166
185
|
*
|
|
167
186
|
* @example
|
|
@@ -174,12 +193,15 @@ class Crm {
|
|
|
174
193
|
* })
|
|
175
194
|
*/
|
|
176
195
|
upsertLineItem(request, requestOptions) {
|
|
196
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertLineItem(request, requestOptions));
|
|
197
|
+
}
|
|
198
|
+
__upsertLineItem(request, requestOptions) {
|
|
177
199
|
return __awaiter(this, void 0, void 0, function* () {
|
|
178
200
|
var _a, _b, _c;
|
|
179
201
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
180
202
|
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, "crm/deal-line-item/upsert"),
|
|
181
203
|
method: "POST",
|
|
182
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
204
|
+
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),
|
|
183
205
|
contentType: "application/json",
|
|
184
206
|
requestType: "json",
|
|
185
207
|
body: serializers.CreateCrmLineItemRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -188,13 +210,16 @@ class Crm {
|
|
|
188
210
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
189
211
|
});
|
|
190
212
|
if (_response.ok) {
|
|
191
|
-
return
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
213
|
+
return {
|
|
214
|
+
data: serializers.UpsertLineItemResponse.parseOrThrow(_response.body, {
|
|
215
|
+
unrecognizedObjectKeys: "passthrough",
|
|
216
|
+
allowUnrecognizedUnionMembers: true,
|
|
217
|
+
allowUnrecognizedEnumValues: true,
|
|
218
|
+
skipValidation: true,
|
|
219
|
+
breadcrumbsPrefix: ["response"],
|
|
220
|
+
}),
|
|
221
|
+
rawResponse: _response.rawResponse,
|
|
222
|
+
};
|
|
198
223
|
}
|
|
199
224
|
if (_response.error.reason === "status-code") {
|
|
200
225
|
switch (_response.error.statusCode) {
|
|
@@ -205,7 +230,7 @@ class Crm {
|
|
|
205
230
|
allowUnrecognizedEnumValues: true,
|
|
206
231
|
skipValidation: true,
|
|
207
232
|
breadcrumbsPrefix: ["response"],
|
|
208
|
-
}));
|
|
233
|
+
}), _response.rawResponse);
|
|
209
234
|
case 401:
|
|
210
235
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
211
236
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -213,7 +238,7 @@ class Crm {
|
|
|
213
238
|
allowUnrecognizedEnumValues: true,
|
|
214
239
|
skipValidation: true,
|
|
215
240
|
breadcrumbsPrefix: ["response"],
|
|
216
|
-
}));
|
|
241
|
+
}), _response.rawResponse);
|
|
217
242
|
case 403:
|
|
218
243
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
219
244
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -221,7 +246,15 @@ class Crm {
|
|
|
221
246
|
allowUnrecognizedEnumValues: true,
|
|
222
247
|
skipValidation: true,
|
|
223
248
|
breadcrumbsPrefix: ["response"],
|
|
224
|
-
}));
|
|
249
|
+
}), _response.rawResponse);
|
|
250
|
+
case 404:
|
|
251
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
252
|
+
unrecognizedObjectKeys: "passthrough",
|
|
253
|
+
allowUnrecognizedUnionMembers: true,
|
|
254
|
+
allowUnrecognizedEnumValues: true,
|
|
255
|
+
skipValidation: true,
|
|
256
|
+
breadcrumbsPrefix: ["response"],
|
|
257
|
+
}), _response.rawResponse);
|
|
225
258
|
case 500:
|
|
226
259
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
227
260
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -229,11 +262,12 @@ class Crm {
|
|
|
229
262
|
allowUnrecognizedEnumValues: true,
|
|
230
263
|
skipValidation: true,
|
|
231
264
|
breadcrumbsPrefix: ["response"],
|
|
232
|
-
}));
|
|
265
|
+
}), _response.rawResponse);
|
|
233
266
|
default:
|
|
234
267
|
throw new errors.SchematicError({
|
|
235
268
|
statusCode: _response.error.statusCode,
|
|
236
269
|
body: _response.error.body,
|
|
270
|
+
rawResponse: _response.rawResponse,
|
|
237
271
|
});
|
|
238
272
|
}
|
|
239
273
|
}
|
|
@@ -242,12 +276,14 @@ class Crm {
|
|
|
242
276
|
throw new errors.SchematicError({
|
|
243
277
|
statusCode: _response.error.statusCode,
|
|
244
278
|
body: _response.error.rawBody,
|
|
279
|
+
rawResponse: _response.rawResponse,
|
|
245
280
|
});
|
|
246
281
|
case "timeout":
|
|
247
282
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /crm/deal-line-item/upsert.");
|
|
248
283
|
case "unknown":
|
|
249
284
|
throw new errors.SchematicError({
|
|
250
285
|
message: _response.error.errorMessage,
|
|
286
|
+
rawResponse: _response.rawResponse,
|
|
251
287
|
});
|
|
252
288
|
}
|
|
253
289
|
});
|
|
@@ -259,6 +295,7 @@ class Crm {
|
|
|
259
295
|
* @throws {@link Schematic.BadRequestError}
|
|
260
296
|
* @throws {@link Schematic.UnauthorizedError}
|
|
261
297
|
* @throws {@link Schematic.ForbiddenError}
|
|
298
|
+
* @throws {@link Schematic.NotFoundError}
|
|
262
299
|
* @throws {@link Schematic.InternalServerError}
|
|
263
300
|
*
|
|
264
301
|
* @example
|
|
@@ -269,12 +306,15 @@ class Crm {
|
|
|
269
306
|
* })
|
|
270
307
|
*/
|
|
271
308
|
upsertCrmDeal(request, requestOptions) {
|
|
309
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertCrmDeal(request, requestOptions));
|
|
310
|
+
}
|
|
311
|
+
__upsertCrmDeal(request, requestOptions) {
|
|
272
312
|
return __awaiter(this, void 0, void 0, function* () {
|
|
273
313
|
var _a, _b, _c;
|
|
274
314
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
275
315
|
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, "crm/deals/upsert"),
|
|
276
316
|
method: "POST",
|
|
277
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
317
|
+
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),
|
|
278
318
|
contentType: "application/json",
|
|
279
319
|
requestType: "json",
|
|
280
320
|
body: serializers.CreateCrmDealRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -283,13 +323,16 @@ class Crm {
|
|
|
283
323
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
284
324
|
});
|
|
285
325
|
if (_response.ok) {
|
|
286
|
-
return
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
326
|
+
return {
|
|
327
|
+
data: serializers.UpsertCrmDealResponse.parseOrThrow(_response.body, {
|
|
328
|
+
unrecognizedObjectKeys: "passthrough",
|
|
329
|
+
allowUnrecognizedUnionMembers: true,
|
|
330
|
+
allowUnrecognizedEnumValues: true,
|
|
331
|
+
skipValidation: true,
|
|
332
|
+
breadcrumbsPrefix: ["response"],
|
|
333
|
+
}),
|
|
334
|
+
rawResponse: _response.rawResponse,
|
|
335
|
+
};
|
|
293
336
|
}
|
|
294
337
|
if (_response.error.reason === "status-code") {
|
|
295
338
|
switch (_response.error.statusCode) {
|
|
@@ -300,7 +343,7 @@ class Crm {
|
|
|
300
343
|
allowUnrecognizedEnumValues: true,
|
|
301
344
|
skipValidation: true,
|
|
302
345
|
breadcrumbsPrefix: ["response"],
|
|
303
|
-
}));
|
|
346
|
+
}), _response.rawResponse);
|
|
304
347
|
case 401:
|
|
305
348
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
306
349
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -308,7 +351,7 @@ class Crm {
|
|
|
308
351
|
allowUnrecognizedEnumValues: true,
|
|
309
352
|
skipValidation: true,
|
|
310
353
|
breadcrumbsPrefix: ["response"],
|
|
311
|
-
}));
|
|
354
|
+
}), _response.rawResponse);
|
|
312
355
|
case 403:
|
|
313
356
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
314
357
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -316,7 +359,15 @@ class Crm {
|
|
|
316
359
|
allowUnrecognizedEnumValues: true,
|
|
317
360
|
skipValidation: true,
|
|
318
361
|
breadcrumbsPrefix: ["response"],
|
|
319
|
-
}));
|
|
362
|
+
}), _response.rawResponse);
|
|
363
|
+
case 404:
|
|
364
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
365
|
+
unrecognizedObjectKeys: "passthrough",
|
|
366
|
+
allowUnrecognizedUnionMembers: true,
|
|
367
|
+
allowUnrecognizedEnumValues: true,
|
|
368
|
+
skipValidation: true,
|
|
369
|
+
breadcrumbsPrefix: ["response"],
|
|
370
|
+
}), _response.rawResponse);
|
|
320
371
|
case 500:
|
|
321
372
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
322
373
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -324,11 +375,12 @@ class Crm {
|
|
|
324
375
|
allowUnrecognizedEnumValues: true,
|
|
325
376
|
skipValidation: true,
|
|
326
377
|
breadcrumbsPrefix: ["response"],
|
|
327
|
-
}));
|
|
378
|
+
}), _response.rawResponse);
|
|
328
379
|
default:
|
|
329
380
|
throw new errors.SchematicError({
|
|
330
381
|
statusCode: _response.error.statusCode,
|
|
331
382
|
body: _response.error.body,
|
|
383
|
+
rawResponse: _response.rawResponse,
|
|
332
384
|
});
|
|
333
385
|
}
|
|
334
386
|
}
|
|
@@ -337,12 +389,14 @@ class Crm {
|
|
|
337
389
|
throw new errors.SchematicError({
|
|
338
390
|
statusCode: _response.error.statusCode,
|
|
339
391
|
body: _response.error.rawBody,
|
|
392
|
+
rawResponse: _response.rawResponse,
|
|
340
393
|
});
|
|
341
394
|
case "timeout":
|
|
342
395
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /crm/deals/upsert.");
|
|
343
396
|
case "unknown":
|
|
344
397
|
throw new errors.SchematicError({
|
|
345
398
|
message: _response.error.errorMessage,
|
|
399
|
+
rawResponse: _response.rawResponse,
|
|
346
400
|
});
|
|
347
401
|
}
|
|
348
402
|
});
|
|
@@ -354,12 +408,16 @@ class Crm {
|
|
|
354
408
|
* @throws {@link Schematic.BadRequestError}
|
|
355
409
|
* @throws {@link Schematic.UnauthorizedError}
|
|
356
410
|
* @throws {@link Schematic.ForbiddenError}
|
|
411
|
+
* @throws {@link Schematic.NotFoundError}
|
|
357
412
|
* @throws {@link Schematic.InternalServerError}
|
|
358
413
|
*
|
|
359
414
|
* @example
|
|
360
415
|
* await client.crm.listCrmProducts()
|
|
361
416
|
*/
|
|
362
|
-
listCrmProducts() {
|
|
417
|
+
listCrmProducts(request = {}, requestOptions) {
|
|
418
|
+
return core.HttpResponsePromise.fromPromise(this.__listCrmProducts(request, requestOptions));
|
|
419
|
+
}
|
|
420
|
+
__listCrmProducts() {
|
|
363
421
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
364
422
|
var _a, _b, _c;
|
|
365
423
|
const { ids, name, limit, offset } = request;
|
|
@@ -384,7 +442,7 @@ class Crm {
|
|
|
384
442
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
385
443
|
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, "crm/products"),
|
|
386
444
|
method: "GET",
|
|
387
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
445
|
+
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),
|
|
388
446
|
contentType: "application/json",
|
|
389
447
|
queryParameters: _queryParams,
|
|
390
448
|
requestType: "json",
|
|
@@ -393,13 +451,16 @@ class Crm {
|
|
|
393
451
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
394
452
|
});
|
|
395
453
|
if (_response.ok) {
|
|
396
|
-
return
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
454
|
+
return {
|
|
455
|
+
data: serializers.ListCrmProductsResponse.parseOrThrow(_response.body, {
|
|
456
|
+
unrecognizedObjectKeys: "passthrough",
|
|
457
|
+
allowUnrecognizedUnionMembers: true,
|
|
458
|
+
allowUnrecognizedEnumValues: true,
|
|
459
|
+
skipValidation: true,
|
|
460
|
+
breadcrumbsPrefix: ["response"],
|
|
461
|
+
}),
|
|
462
|
+
rawResponse: _response.rawResponse,
|
|
463
|
+
};
|
|
403
464
|
}
|
|
404
465
|
if (_response.error.reason === "status-code") {
|
|
405
466
|
switch (_response.error.statusCode) {
|
|
@@ -410,7 +471,7 @@ class Crm {
|
|
|
410
471
|
allowUnrecognizedEnumValues: true,
|
|
411
472
|
skipValidation: true,
|
|
412
473
|
breadcrumbsPrefix: ["response"],
|
|
413
|
-
}));
|
|
474
|
+
}), _response.rawResponse);
|
|
414
475
|
case 401:
|
|
415
476
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
416
477
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -418,7 +479,7 @@ class Crm {
|
|
|
418
479
|
allowUnrecognizedEnumValues: true,
|
|
419
480
|
skipValidation: true,
|
|
420
481
|
breadcrumbsPrefix: ["response"],
|
|
421
|
-
}));
|
|
482
|
+
}), _response.rawResponse);
|
|
422
483
|
case 403:
|
|
423
484
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
424
485
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -426,7 +487,15 @@ class Crm {
|
|
|
426
487
|
allowUnrecognizedEnumValues: true,
|
|
427
488
|
skipValidation: true,
|
|
428
489
|
breadcrumbsPrefix: ["response"],
|
|
429
|
-
}));
|
|
490
|
+
}), _response.rawResponse);
|
|
491
|
+
case 404:
|
|
492
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
493
|
+
unrecognizedObjectKeys: "passthrough",
|
|
494
|
+
allowUnrecognizedUnionMembers: true,
|
|
495
|
+
allowUnrecognizedEnumValues: true,
|
|
496
|
+
skipValidation: true,
|
|
497
|
+
breadcrumbsPrefix: ["response"],
|
|
498
|
+
}), _response.rawResponse);
|
|
430
499
|
case 500:
|
|
431
500
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
432
501
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -434,11 +503,12 @@ class Crm {
|
|
|
434
503
|
allowUnrecognizedEnumValues: true,
|
|
435
504
|
skipValidation: true,
|
|
436
505
|
breadcrumbsPrefix: ["response"],
|
|
437
|
-
}));
|
|
506
|
+
}), _response.rawResponse);
|
|
438
507
|
default:
|
|
439
508
|
throw new errors.SchematicError({
|
|
440
509
|
statusCode: _response.error.statusCode,
|
|
441
510
|
body: _response.error.body,
|
|
511
|
+
rawResponse: _response.rawResponse,
|
|
442
512
|
});
|
|
443
513
|
}
|
|
444
514
|
}
|
|
@@ -447,12 +517,14 @@ class Crm {
|
|
|
447
517
|
throw new errors.SchematicError({
|
|
448
518
|
statusCode: _response.error.statusCode,
|
|
449
519
|
body: _response.error.rawBody,
|
|
520
|
+
rawResponse: _response.rawResponse,
|
|
450
521
|
});
|
|
451
522
|
case "timeout":
|
|
452
523
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /crm/products.");
|
|
453
524
|
case "unknown":
|
|
454
525
|
throw new errors.SchematicError({
|
|
455
526
|
message: _response.error.errorMessage,
|
|
527
|
+
rawResponse: _response.rawResponse,
|
|
456
528
|
});
|
|
457
529
|
}
|
|
458
530
|
});
|
|
@@ -464,6 +536,7 @@ class Crm {
|
|
|
464
536
|
* @throws {@link Schematic.BadRequestError}
|
|
465
537
|
* @throws {@link Schematic.UnauthorizedError}
|
|
466
538
|
* @throws {@link Schematic.ForbiddenError}
|
|
539
|
+
* @throws {@link Schematic.NotFoundError}
|
|
467
540
|
* @throws {@link Schematic.InternalServerError}
|
|
468
541
|
*
|
|
469
542
|
* @example
|
|
@@ -479,12 +552,15 @@ class Crm {
|
|
|
479
552
|
* })
|
|
480
553
|
*/
|
|
481
554
|
upsertCrmProduct(request, requestOptions) {
|
|
555
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertCrmProduct(request, requestOptions));
|
|
556
|
+
}
|
|
557
|
+
__upsertCrmProduct(request, requestOptions) {
|
|
482
558
|
return __awaiter(this, void 0, void 0, function* () {
|
|
483
559
|
var _a, _b, _c;
|
|
484
560
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
485
561
|
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, "crm/products/upsert"),
|
|
486
562
|
method: "POST",
|
|
487
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
563
|
+
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),
|
|
488
564
|
contentType: "application/json",
|
|
489
565
|
requestType: "json",
|
|
490
566
|
body: serializers.CreateCrmProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -493,13 +569,16 @@ class Crm {
|
|
|
493
569
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
494
570
|
});
|
|
495
571
|
if (_response.ok) {
|
|
496
|
-
return
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
572
|
+
return {
|
|
573
|
+
data: serializers.UpsertCrmProductResponse.parseOrThrow(_response.body, {
|
|
574
|
+
unrecognizedObjectKeys: "passthrough",
|
|
575
|
+
allowUnrecognizedUnionMembers: true,
|
|
576
|
+
allowUnrecognizedEnumValues: true,
|
|
577
|
+
skipValidation: true,
|
|
578
|
+
breadcrumbsPrefix: ["response"],
|
|
579
|
+
}),
|
|
580
|
+
rawResponse: _response.rawResponse,
|
|
581
|
+
};
|
|
503
582
|
}
|
|
504
583
|
if (_response.error.reason === "status-code") {
|
|
505
584
|
switch (_response.error.statusCode) {
|
|
@@ -510,7 +589,7 @@ class Crm {
|
|
|
510
589
|
allowUnrecognizedEnumValues: true,
|
|
511
590
|
skipValidation: true,
|
|
512
591
|
breadcrumbsPrefix: ["response"],
|
|
513
|
-
}));
|
|
592
|
+
}), _response.rawResponse);
|
|
514
593
|
case 401:
|
|
515
594
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
516
595
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -518,7 +597,7 @@ class Crm {
|
|
|
518
597
|
allowUnrecognizedEnumValues: true,
|
|
519
598
|
skipValidation: true,
|
|
520
599
|
breadcrumbsPrefix: ["response"],
|
|
521
|
-
}));
|
|
600
|
+
}), _response.rawResponse);
|
|
522
601
|
case 403:
|
|
523
602
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
524
603
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -526,7 +605,15 @@ class Crm {
|
|
|
526
605
|
allowUnrecognizedEnumValues: true,
|
|
527
606
|
skipValidation: true,
|
|
528
607
|
breadcrumbsPrefix: ["response"],
|
|
529
|
-
}));
|
|
608
|
+
}), _response.rawResponse);
|
|
609
|
+
case 404:
|
|
610
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
611
|
+
unrecognizedObjectKeys: "passthrough",
|
|
612
|
+
allowUnrecognizedUnionMembers: true,
|
|
613
|
+
allowUnrecognizedEnumValues: true,
|
|
614
|
+
skipValidation: true,
|
|
615
|
+
breadcrumbsPrefix: ["response"],
|
|
616
|
+
}), _response.rawResponse);
|
|
530
617
|
case 500:
|
|
531
618
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
532
619
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -534,11 +621,12 @@ class Crm {
|
|
|
534
621
|
allowUnrecognizedEnumValues: true,
|
|
535
622
|
skipValidation: true,
|
|
536
623
|
breadcrumbsPrefix: ["response"],
|
|
537
|
-
}));
|
|
624
|
+
}), _response.rawResponse);
|
|
538
625
|
default:
|
|
539
626
|
throw new errors.SchematicError({
|
|
540
627
|
statusCode: _response.error.statusCode,
|
|
541
628
|
body: _response.error.body,
|
|
629
|
+
rawResponse: _response.rawResponse,
|
|
542
630
|
});
|
|
543
631
|
}
|
|
544
632
|
}
|
|
@@ -547,12 +635,14 @@ class Crm {
|
|
|
547
635
|
throw new errors.SchematicError({
|
|
548
636
|
statusCode: _response.error.statusCode,
|
|
549
637
|
body: _response.error.rawBody,
|
|
638
|
+
rawResponse: _response.rawResponse,
|
|
550
639
|
});
|
|
551
640
|
case "timeout":
|
|
552
641
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /crm/products/upsert.");
|
|
553
642
|
case "unknown":
|
|
554
643
|
throw new errors.SchematicError({
|
|
555
644
|
message: _response.error.errorMessage,
|
|
645
|
+
rawResponse: _response.rawResponse,
|
|
556
646
|
});
|
|
557
647
|
}
|
|
558
648
|
});
|