@schematichq/schematic-typescript-node 1.1.10 → 1.1.12
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 +6 -0
- package/Client.js +30 -20
- 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 +4 -3
- package/api/resources/accesstokens/client/Client.js +33 -16
- package/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +1 -3
- 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 +657 -260
- 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 +5 -1
- 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/SearchBillingPricesRequest.d.ts +1 -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/CreateBillingPriceRequestBodyTiersMode.d.ts +8 -0
- package/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +10 -0
- package/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
- package/api/resources/billing/types/{ListCustomersParams.d.ts → 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/SearchBillingPricesParams.d.ts +1 -0
- package/{dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts → api/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts} +2 -2
- package/{dist/api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → api/resources/billing/types/SearchBillingPricesRequestTiersMode.js} +2 -2
- package/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +8 -0
- package/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +10 -0
- package/api/resources/billing/types/index.d.ts +6 -3
- package/api/resources/billing/types/index.js +6 -3
- package/api/resources/checkout/client/Client.d.ts +23 -6
- package/api/resources/checkout/client/Client.js +125 -52
- package/api/resources/companies/client/Client.d.ts +119 -43
- package/api/resources/companies/client/Client.js +1306 -434
- package/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.d.ts +66 -0
- package/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
- package/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.d.ts +66 -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/client/requests/index.d.ts +2 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +37 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +5 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +9 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +5 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
- package/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
- package/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +37 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +5 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +10 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +5 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
- package/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -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/companies/types/index.d.ts +8 -0
- package/api/resources/companies/types/index.js +8 -0
- package/api/resources/components/client/Client.d.ts +18 -7
- package/api/resources/components/client/Client.js +188 -89
- package/api/resources/credits/client/Client.d.ts +338 -0
- package/api/resources/credits/client/Client.js +2338 -0
- package/api/resources/credits/client/index.d.ts +1 -0
- package/api/resources/credits/client/index.js +17 -0
- package/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +19 -0
- package/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.js +5 -0
- package/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +19 -0
- package/api/resources/credits/client/requests/CountBillingCreditsRequest.js +5 -0
- package/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +20 -0
- package/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.js +5 -0
- package/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +22 -0
- package/api/resources/credits/client/requests/CountCreditBundlesRequest.js +5 -0
- package/api/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +26 -0
- package/api/resources/credits/client/requests/CreateBillingCreditRequestBody.js +5 -0
- package/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +21 -0
- package/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +5 -0
- package/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +24 -0
- package/api/resources/credits/client/requests/CreateCreditBundleRequestBody.js +5 -0
- package/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +19 -0
- package/api/resources/credits/client/requests/ListBillingCreditsRequest.js +5 -0
- package/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +20 -0
- package/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.js +5 -0
- package/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +21 -0
- package/api/resources/credits/client/requests/ListCompanyGrantsRequest.js +5 -0
- package/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +22 -0
- package/api/resources/credits/client/requests/ListCreditBundlesRequest.js +5 -0
- package/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +19 -0
- package/api/resources/credits/client/requests/ListGrantsForCreditRequest.js +5 -0
- package/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
- package/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +5 -0
- package/api/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +11 -0
- package/api/resources/credits/client/requests/ZeroOutGrantRequestBody.js +5 -0
- package/api/resources/credits/client/requests/index.d.ts +14 -0
- package/api/resources/credits/client/requests/index.js +2 -0
- package/api/resources/credits/index.d.ts +2 -0
- package/api/resources/credits/index.js +18 -0
- package/api/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +14 -0
- package/api/resources/credits/types/CountBillingCreditsGrantsParams.js +5 -0
- package/api/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +9 -0
- package/api/resources/credits/types/CountBillingCreditsGrantsResponse.js +5 -0
- package/api/resources/credits/types/CountBillingCreditsParams.d.ts +14 -0
- package/api/resources/credits/types/CountBillingCreditsParams.js +5 -0
- package/api/resources/credits/types/CountBillingCreditsResponse.d.ts +9 -0
- package/api/resources/credits/types/CountBillingCreditsResponse.js +5 -0
- package/api/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +15 -0
- package/api/resources/credits/types/CountBillingPlanCreditGrantsParams.js +5 -0
- package/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +9 -0
- package/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +5 -0
- package/api/resources/credits/types/CountCreditBundlesParams.d.ts +17 -0
- package/api/resources/credits/types/CountCreditBundlesParams.js +5 -0
- package/api/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +8 -0
- package/api/resources/credits/types/CountCreditBundlesRequestStatus.js +10 -0
- package/api/resources/credits/types/CountCreditBundlesResponse.d.ts +9 -0
- package/api/resources/credits/types/CountCreditBundlesResponse.js +5 -0
- package/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +8 -0
- package/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +10 -0
- package/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +12 -0
- package/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
- package/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
- package/api/resources/credits/types/CreateBillingCreditResponse.d.ts +9 -0
- package/api/resources/credits/types/CreateBillingCreditResponse.js +5 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +12 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +10 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +9 -0
- package/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +5 -0
- package/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +8 -0
- package/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +10 -0
- package/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +8 -0
- package/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +10 -0
- package/api/resources/credits/types/CreateCreditBundleResponse.d.ts +9 -0
- package/api/resources/credits/types/CreateCreditBundleResponse.js +5 -0
- package/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +9 -0
- package/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +5 -0
- package/api/resources/credits/types/DeleteCreditBundleResponse.d.ts +9 -0
- package/api/resources/credits/types/DeleteCreditBundleResponse.js +5 -0
- package/api/resources/credits/types/GetCreditBundleResponse.d.ts +9 -0
- package/api/resources/credits/types/GetCreditBundleResponse.js +5 -0
- package/api/resources/credits/types/GetSingleBillingCreditResponse.d.ts +9 -0
- package/api/resources/credits/types/GetSingleBillingCreditResponse.js +5 -0
- package/api/resources/credits/types/ListBillingCreditsParams.d.ts +14 -0
- package/api/resources/credits/types/ListBillingCreditsParams.js +5 -0
- package/api/resources/credits/types/ListBillingCreditsResponse.d.ts +10 -0
- package/api/resources/credits/types/ListBillingCreditsResponse.js +5 -0
- package/api/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +15 -0
- package/api/resources/credits/types/ListBillingPlanCreditGrantsParams.js +5 -0
- package/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +10 -0
- package/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +5 -0
- package/api/resources/credits/types/ListCompanyGrantsParams.d.ts +16 -0
- package/api/resources/credits/types/ListCompanyGrantsParams.js +5 -0
- package/api/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +8 -0
- package/api/resources/credits/types/ListCompanyGrantsRequestDir.js +10 -0
- package/api/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
- package/api/resources/credits/types/ListCompanyGrantsRequestOrder.js +12 -0
- package/api/resources/credits/types/ListCompanyGrantsResponse.d.ts +10 -0
- package/api/resources/credits/types/ListCompanyGrantsResponse.js +5 -0
- package/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +8 -0
- package/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +10 -0
- package/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
- package/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +12 -0
- package/api/resources/credits/types/ListCreditBundlesParams.d.ts +17 -0
- package/api/resources/credits/types/ListCreditBundlesParams.js +5 -0
- package/api/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +8 -0
- package/api/resources/credits/types/ListCreditBundlesRequestStatus.js +10 -0
- package/api/resources/credits/types/ListCreditBundlesResponse.d.ts +10 -0
- package/api/resources/credits/types/ListCreditBundlesResponse.js +5 -0
- package/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +8 -0
- package/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +10 -0
- package/api/resources/credits/types/ListGrantsForCreditParams.d.ts +14 -0
- package/api/resources/credits/types/ListGrantsForCreditParams.js +5 -0
- package/api/resources/credits/types/ListGrantsForCreditResponse.d.ts +10 -0
- package/api/resources/credits/types/ListGrantsForCreditResponse.js +5 -0
- package/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +12 -0
- package/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
- package/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
- package/api/resources/credits/types/UpdateBillingCreditResponse.d.ts +9 -0
- package/api/resources/credits/types/UpdateBillingCreditResponse.js +5 -0
- package/api/resources/credits/types/UpdateCreditBundleResponse.d.ts +9 -0
- package/api/resources/credits/types/UpdateCreditBundleResponse.js +5 -0
- package/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +8 -0
- package/api/resources/credits/types/ZeroOutGrantRequestBodyReason.js +10 -0
- package/api/resources/credits/types/ZeroOutGrantResponse.d.ts +9 -0
- package/api/resources/credits/types/ZeroOutGrantResponse.js +5 -0
- package/api/resources/credits/types/index.d.ts +45 -0
- package/api/resources/credits/types/index.js +61 -0
- 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/CreateDataExportRequestBody.js +5 -0
- package/api/resources/dataexports/client/requests/index.d.ts +1 -0
- package/api/resources/dataexports/client/requests/index.js +2 -0
- package/api/resources/dataexports/index.d.ts +2 -0
- package/api/resources/dataexports/index.js +18 -0
- package/api/resources/dataexports/types/CreateDataExportResponse.d.ts +9 -0
- package/api/resources/dataexports/types/CreateDataExportResponse.js +5 -0
- package/api/resources/dataexports/types/index.d.ts +1 -0
- package/api/resources/dataexports/types/index.js +17 -0
- package/api/resources/entitlements/client/Client.d.ts +57 -22
- package/api/resources/entitlements/client/Client.js +538 -239
- package/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
- package/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
- package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +2 -1
- package/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -0
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +2 -1
- package/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -0
- package/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +2 -1
- package/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -0
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +2 -1
- package/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -0
- package/api/resources/entitlements/types/index.d.ts +2 -0
- package/api/resources/entitlements/types/index.js +2 -0
- package/api/resources/events/client/Client.d.ts +16 -6
- package/api/resources/events/client/Client.js +168 -76
- package/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -1
- package/api/resources/events/types/ListEventsParams.d.ts +2 -1
- package/api/resources/events/types/ListEventsRequestEventTypesItem.d.ts +9 -0
- package/api/resources/events/types/ListEventsRequestEventTypesItem.js +11 -0
- package/api/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +9 -0
- package/api/resources/events/types/ListEventsResponseParamsEventTypesItem.js +11 -0
- package/api/resources/events/types/index.d.ts +2 -0
- package/api/resources/events/types/index.js +2 -0
- package/api/resources/features/client/Client.d.ts +54 -21
- package/api/resources/features/client/Client.js +559 -240
- package/api/resources/features/client/requests/CountFeaturesRequest.d.ts +8 -0
- package/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
- package/api/resources/features/client/requests/ListFeaturesRequest.d.ts +8 -0
- package/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +1 -1
- package/api/resources/features/types/CountFeaturesParams.d.ts +4 -0
- package/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
- package/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +17 -0
- package/api/resources/features/types/ListFeaturesParams.d.ts +4 -0
- package/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
- package/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +17 -0
- package/api/resources/features/types/index.d.ts +2 -0
- package/api/resources/features/types/index.js +2 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/plangroups/client/Client.d.ts +7 -3
- package/api/resources/plangroups/client/Client.js +73 -37
- package/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
- package/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
- package/api/resources/plans/client/Client.d.ts +125 -12
- package/api/resources/plans/client/Client.js +1011 -172
- 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 +8 -2
- 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/UpsertBillingProductRequestBodyChargeType.d.ts +9 -0
- package/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +11 -0
- package/api/resources/plans/types/index.d.ts +9 -0
- package/api/resources/plans/types/index.js +9 -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/BillingCreditBundleResponseData.d.ts +18 -0
- package/api/types/BillingCreditBundleResponseData.js +5 -0
- package/api/types/BillingCreditGrantResponseData.d.ts +23 -0
- package/api/types/BillingCreditGrantResponseData.js +5 -0
- package/api/types/BillingCreditResponseData.d.ts +21 -0
- package/api/types/BillingCreditResponseData.js +5 -0
- package/api/types/BillingPlanCreditGrantResponseData.d.ts +14 -0
- package/api/types/BillingPlanCreditGrantResponseData.js +5 -0
- package/api/types/BillingPriceResponseData.d.ts +2 -0
- package/api/types/BillingPriceView.d.ts +8 -0
- package/api/types/BillingProductDetailResponseData.d.ts +2 -0
- package/api/types/BillingProductForSubscriptionResponseData.d.ts +5 -0
- package/api/types/BillingProductPlanResponseData.d.ts +3 -0
- package/api/types/BillingProductPriceResponseData.d.ts +4 -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/ChangeSubscriptionInternalRequestBody.d.ts +2 -0
- package/api/types/ChangeSubscriptionRequestBody.d.ts +2 -0
- package/api/types/CheckFlagResponseData.d.ts +2 -0
- package/api/types/CheckoutDataResponseData.d.ts +2 -0
- package/api/types/CompanyDetailResponseData.d.ts +1 -0
- package/api/types/CompanyOverrideResponseData.d.ts +1 -0
- package/api/types/CompanyPlanDetailResponseData.d.ts +4 -0
- package/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/api/types/CompanyViewWithFeatureUsageResponseData.d.ts +27 -0
- package/api/types/CompanyViewWithFeatureUsageResponseData.js +5 -0
- package/api/types/CompatiblePlans.d.ts +7 -0
- package/api/types/CompatiblePlans.js +5 -0
- package/api/types/CompatiblePlansResponseData.d.ts +7 -0
- package/api/types/CompatiblePlansResponseData.js +5 -0
- package/api/types/ComponentHydrateResponseData.d.ts +1 -0
- package/api/types/ComponentPreviewResponseData.d.ts +1 -0
- package/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/api/types/CreateEntitlementReqCommon.d.ts +1 -0
- package/api/types/CreateEntitlementReqCommonValueType.d.ts +2 -1
- package/api/types/CreateEntitlementReqCommonValueType.js +1 -0
- package/api/types/CreateFlagRequestBody.d.ts +1 -1
- package/api/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
- package/api/types/CreatePriceTierRequestBody.d.ts +9 -0
- package/api/types/CreatePriceTierRequestBody.js +5 -0
- package/api/types/CreditBundlePurchaseResponseData.d.ts +9 -0
- package/api/types/CreditBundlePurchaseResponseData.js +5 -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/FeatureUsageDataResponseData.d.ts +14 -0
- package/api/types/FeatureUsageDataResponseData.js +5 -0
- package/api/types/PlanDetailResponseData.d.ts +3 -0
- package/api/types/PlanEntitlementResponseData.d.ts +3 -0
- package/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/api/types/PlanGroupResponseData.d.ts +1 -0
- package/api/types/PlanTraitResponseData.d.ts +16 -0
- package/api/types/PlanTraitResponseData.js +5 -0
- package/api/types/PreviewSubscriptionChangeResponseData.d.ts +4 -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/UpdateCreditBundleRequestBody.d.ts +7 -0
- package/api/types/UpdateCreditBundleRequestBody.js +5 -0
- package/api/types/UpdateEntitlementReqCommon.d.ts +1 -0
- package/api/types/UpdateEntitlementReqCommonValueType.d.ts +2 -1
- package/api/types/UpdateEntitlementReqCommonValueType.js +1 -0
- package/api/types/UpsertCompanyRequestBody.d.ts +1 -0
- package/api/types/UpsertTraitRequestBody.d.ts +1 -1
- package/api/types/UpsertUserRequestBody.d.ts +8 -3
- package/api/types/UpsertUserSubRequestBody.d.ts +4 -1
- package/api/types/UsageBasedEntitlementRequestBody.d.ts +11 -1
- package/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +13 -0
- package/api/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/api/types/WebhookResponseData.d.ts +2 -0
- package/api/types/index.d.ts +19 -0
- package/api/types/index.js +19 -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 +6 -0
- package/dist/Client.js +30 -20
- 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 +4 -3
- package/dist/api/resources/accesstokens/client/Client.js +33 -16
- package/dist/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +1 -3
- 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 +657 -260
- 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 +5 -1
- 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/SearchBillingPricesRequest.d.ts +1 -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/CreateBillingPriceRequestBodyTiersMode.d.ts +8 -0
- package/dist/api/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +10 -0
- package/dist/api/resources/billing/types/ListBillingProductsParams.d.ts +4 -0
- package/dist/api/resources/billing/types/{ListCustomersParams.d.ts → 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/SearchBillingPricesParams.d.ts +1 -0
- package/{api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts → dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts} +2 -2
- package/{api/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → dist/api/resources/billing/types/SearchBillingPricesRequestTiersMode.js} +2 -2
- package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +8 -0
- package/dist/api/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +10 -0
- package/dist/api/resources/billing/types/index.d.ts +6 -3
- package/dist/api/resources/billing/types/index.js +6 -3
- package/dist/api/resources/checkout/client/Client.d.ts +23 -6
- package/dist/api/resources/checkout/client/Client.js +125 -52
- package/dist/api/resources/companies/client/Client.d.ts +119 -43
- package/dist/api/resources/companies/client/Client.js +1306 -434
- package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.d.ts +66 -0
- package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.js +5 -0
- package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +4 -0
- package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.d.ts +66 -0
- package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.js +5 -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/client/requests/index.d.ts +2 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +37 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +5 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +9 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +5 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -0
- package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +37 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +5 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +11 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +10 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +10 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +5 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +11 -0
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +10 -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/companies/types/index.d.ts +8 -0
- package/dist/api/resources/companies/types/index.js +8 -0
- 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/credits/client/Client.d.ts +338 -0
- package/dist/api/resources/credits/client/Client.js +2338 -0
- package/dist/api/resources/credits/client/index.d.ts +1 -0
- package/dist/api/resources/credits/client/index.js +17 -0
- package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +19 -0
- package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +19 -0
- package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +20 -0
- package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +22 -0
- package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +26 -0
- package/dist/api/resources/credits/client/requests/CreateBillingCreditRequestBody.js +5 -0
- package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +21 -0
- package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +5 -0
- package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +24 -0
- package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.js +5 -0
- package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +19 -0
- package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +20 -0
- package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +21 -0
- package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +22 -0
- package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +19 -0
- package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.js +5 -0
- package/dist/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
- package/dist/api/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +5 -0
- package/dist/api/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +11 -0
- package/dist/api/resources/credits/client/requests/ZeroOutGrantRequestBody.js +5 -0
- package/dist/api/resources/credits/client/requests/index.d.ts +14 -0
- package/dist/api/resources/credits/client/requests/index.js +2 -0
- package/dist/api/resources/credits/index.d.ts +2 -0
- package/dist/api/resources/credits/index.js +18 -0
- package/dist/api/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +14 -0
- package/dist/api/resources/credits/types/CountBillingCreditsGrantsParams.js +5 -0
- package/dist/api/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CountBillingCreditsGrantsResponse.js +5 -0
- package/dist/api/resources/credits/types/CountBillingCreditsParams.d.ts +14 -0
- package/dist/api/resources/credits/types/CountBillingCreditsParams.js +5 -0
- package/dist/api/resources/credits/types/CountBillingCreditsResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CountBillingCreditsResponse.js +5 -0
- package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +15 -0
- package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsParams.js +5 -0
- package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +5 -0
- package/dist/api/resources/credits/types/CountCreditBundlesParams.d.ts +17 -0
- package/dist/api/resources/credits/types/CountCreditBundlesParams.js +5 -0
- package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +8 -0
- package/dist/api/resources/credits/types/CountCreditBundlesRequestStatus.js +10 -0
- package/dist/api/resources/credits/types/CountCreditBundlesResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CountCreditBundlesResponse.js +5 -0
- package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +8 -0
- package/dist/api/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +10 -0
- package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +12 -0
- package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
- package/dist/api/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
- package/dist/api/resources/credits/types/CreateBillingCreditResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CreateBillingCreditResponse.js +5 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +12 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +10 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +5 -0
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +10 -0
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +10 -0
- package/dist/api/resources/credits/types/CreateCreditBundleResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CreateCreditBundleResponse.js +5 -0
- package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +5 -0
- package/dist/api/resources/credits/types/DeleteCreditBundleResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/DeleteCreditBundleResponse.js +5 -0
- package/dist/api/resources/credits/types/GetCreditBundleResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/GetCreditBundleResponse.js +5 -0
- package/dist/api/resources/credits/types/GetSingleBillingCreditResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/GetSingleBillingCreditResponse.js +5 -0
- package/dist/api/resources/credits/types/ListBillingCreditsParams.d.ts +14 -0
- package/dist/api/resources/credits/types/ListBillingCreditsParams.js +5 -0
- package/dist/api/resources/credits/types/ListBillingCreditsResponse.d.ts +10 -0
- package/dist/api/resources/credits/types/ListBillingCreditsResponse.js +5 -0
- package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +15 -0
- package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsParams.js +5 -0
- package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +10 -0
- package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +5 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsParams.d.ts +16 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsParams.js +5 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +8 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsRequestDir.js +10 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsRequestOrder.js +12 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponse.d.ts +10 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponse.js +5 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +8 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +10 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
- package/dist/api/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +12 -0
- package/dist/api/resources/credits/types/ListCreditBundlesParams.d.ts +17 -0
- package/dist/api/resources/credits/types/ListCreditBundlesParams.js +5 -0
- package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +8 -0
- package/dist/api/resources/credits/types/ListCreditBundlesRequestStatus.js +10 -0
- package/dist/api/resources/credits/types/ListCreditBundlesResponse.d.ts +10 -0
- package/dist/api/resources/credits/types/ListCreditBundlesResponse.js +5 -0
- package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +8 -0
- package/dist/api/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +10 -0
- package/dist/api/resources/credits/types/ListGrantsForCreditParams.d.ts +14 -0
- package/dist/api/resources/credits/types/ListGrantsForCreditParams.js +5 -0
- package/dist/api/resources/credits/types/ListGrantsForCreditResponse.d.ts +10 -0
- package/dist/api/resources/credits/types/ListGrantsForCreditResponse.js +5 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +12 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +9 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +11 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/UpdateBillingCreditResponse.js +5 -0
- package/dist/api/resources/credits/types/UpdateCreditBundleResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/UpdateCreditBundleResponse.js +5 -0
- package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +8 -0
- package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.js +10 -0
- package/dist/api/resources/credits/types/ZeroOutGrantResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/ZeroOutGrantResponse.js +5 -0
- package/dist/api/resources/credits/types/index.d.ts +45 -0
- package/dist/api/resources/credits/types/index.js +61 -0
- 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 +57 -22
- package/dist/api/resources/entitlements/client/Client.js +538 -239
- package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
- package/dist/api/resources/entitlements/client/requests/GetFeatureUsageByCompanyRequest.d.ts +2 -4
- package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
- package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +2 -1
- package/dist/api/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -0
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +2 -1
- package/dist/api/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -0
- package/dist/api/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +2 -1
- package/dist/api/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -0
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +13 -0
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +2 -1
- package/dist/api/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -0
- package/dist/api/resources/entitlements/types/index.d.ts +2 -0
- package/dist/api/resources/entitlements/types/index.js +2 -0
- package/dist/api/resources/events/client/Client.d.ts +16 -6
- package/dist/api/resources/events/client/Client.js +168 -76
- package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -1
- package/dist/api/resources/events/types/ListEventsParams.d.ts +2 -1
- package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.d.ts +9 -0
- package/dist/api/resources/events/types/ListEventsRequestEventTypesItem.js +11 -0
- package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +9 -0
- package/dist/api/resources/events/types/ListEventsResponseParamsEventTypesItem.js +11 -0
- package/dist/api/resources/events/types/index.d.ts +2 -0
- package/dist/api/resources/events/types/index.js +2 -0
- package/dist/api/resources/features/client/Client.d.ts +54 -21
- package/dist/api/resources/features/client/Client.js +559 -240
- package/dist/api/resources/features/client/requests/CountFeaturesRequest.d.ts +8 -0
- package/dist/api/resources/features/client/requests/CreateFeatureRequestBody.d.ts +1 -1
- package/dist/api/resources/features/client/requests/ListFeaturesRequest.d.ts +8 -0
- package/dist/api/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +1 -1
- package/dist/api/resources/features/types/CountFeaturesParams.d.ts +4 -0
- package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
- package/dist/api/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +17 -0
- package/dist/api/resources/features/types/ListFeaturesParams.d.ts +4 -0
- package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +15 -0
- package/dist/api/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +17 -0
- package/dist/api/resources/features/types/index.d.ts +2 -0
- package/dist/api/resources/features/types/index.js +2 -0
- package/dist/api/resources/index.d.ts +6 -0
- package/dist/api/resources/index.js +7 -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/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
- package/dist/api/resources/plans/client/Client.d.ts +125 -12
- package/dist/api/resources/plans/client/Client.js +1011 -172
- 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 +8 -2
- 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/UpsertBillingProductRequestBodyChargeType.d.ts +9 -0
- package/dist/api/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +11 -0
- package/dist/api/resources/plans/types/index.d.ts +9 -0
- package/dist/api/resources/plans/types/index.js +9 -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/BillingCreditBundleResponseData.d.ts +18 -0
- package/dist/api/types/BillingCreditBundleResponseData.js +5 -0
- package/dist/api/types/BillingCreditGrantResponseData.d.ts +23 -0
- package/dist/api/types/BillingCreditGrantResponseData.js +5 -0
- package/dist/api/types/BillingCreditResponseData.d.ts +21 -0
- package/dist/api/types/BillingCreditResponseData.js +5 -0
- package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +14 -0
- package/dist/api/types/BillingPlanCreditGrantResponseData.js +5 -0
- package/dist/api/types/BillingPriceResponseData.d.ts +2 -0
- package/dist/api/types/BillingPriceView.d.ts +8 -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 +3 -0
- package/dist/api/types/BillingProductPriceResponseData.d.ts +4 -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/ChangeSubscriptionInternalRequestBody.d.ts +2 -0
- package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +2 -0
- package/dist/api/types/CheckFlagResponseData.d.ts +2 -0
- package/dist/api/types/CheckoutDataResponseData.d.ts +2 -0
- package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
- package/dist/api/types/CompanyOverrideResponseData.d.ts +1 -0
- package/dist/api/types/CompanyPlanDetailResponseData.d.ts +4 -0
- package/dist/api/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/api/types/CompanyViewWithFeatureUsageResponseData.d.ts +27 -0
- package/dist/api/types/CompanyViewWithFeatureUsageResponseData.js +5 -0
- package/dist/api/types/CompatiblePlans.d.ts +7 -0
- package/dist/api/types/CompatiblePlans.js +5 -0
- package/dist/api/types/CompatiblePlansResponseData.d.ts +7 -0
- package/dist/api/types/CompatiblePlansResponseData.js +5 -0
- package/dist/api/types/ComponentHydrateResponseData.d.ts +1 -0
- package/dist/api/types/ComponentPreviewResponseData.d.ts +1 -0
- package/dist/api/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/dist/api/types/CreateEntitlementReqCommon.d.ts +1 -0
- package/dist/api/types/CreateEntitlementReqCommonValueType.d.ts +2 -1
- package/dist/api/types/CreateEntitlementReqCommonValueType.js +1 -0
- package/dist/api/types/CreateFlagRequestBody.d.ts +1 -1
- package/dist/api/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
- package/dist/api/types/CreatePriceTierRequestBody.d.ts +9 -0
- package/dist/api/types/CreatePriceTierRequestBody.js +5 -0
- package/dist/api/types/CreditBundlePurchaseResponseData.d.ts +9 -0
- package/dist/api/types/CreditBundlePurchaseResponseData.js +5 -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/FeatureUsageDataResponseData.d.ts +14 -0
- package/dist/api/types/FeatureUsageDataResponseData.js +5 -0
- package/dist/api/types/PlanDetailResponseData.d.ts +3 -0
- package/dist/api/types/PlanEntitlementResponseData.d.ts +3 -0
- package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/dist/api/types/PlanGroupResponseData.d.ts +1 -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 +4 -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/UpdateCreditBundleRequestBody.d.ts +7 -0
- package/dist/api/types/UpdateCreditBundleRequestBody.js +5 -0
- package/dist/api/types/UpdateEntitlementReqCommon.d.ts +1 -0
- package/dist/api/types/UpdateEntitlementReqCommonValueType.d.ts +2 -1
- package/dist/api/types/UpdateEntitlementReqCommonValueType.js +1 -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 +8 -3
- package/dist/api/types/UpsertUserSubRequestBody.d.ts +4 -1
- package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +11 -1
- package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +11 -0
- package/dist/api/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +13 -0
- package/dist/api/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/dist/api/types/WebhookResponseData.d.ts +2 -0
- package/dist/api/types/index.d.ts +19 -0
- package/dist/api/types/index.js +19 -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/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +0 -1
- package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +0 -1
- 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 +6 -2
- package/dist/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +6 -2
- 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/CreateBillingPriceRequestBodyTiersMode.d.ts +10 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.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/{serialization/resources/billing/types/ListCustomersParams.d.ts → dist/serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +3 -2
- package/{serialization/resources/billing/types/ListCustomersParams.js → dist/serialization/resources/billing/types/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/SearchBillingPricesParams.d.ts +2 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesParams.js +2 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +10 -0
- package/dist/serialization/resources/billing/types/{CreateBillingPriceRequestBodyTierMode.js → SearchBillingPricesRequestTiersMode.js} +2 -2
- package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +10 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +41 -0
- package/dist/serialization/resources/billing/types/index.d.ts +6 -3
- package/dist/serialization/resources/billing/types/index.js +6 -3
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +26 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +57 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +15 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +46 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
- 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/ListCompaniesForAdvancedFilterParams.d.ts +26 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +57 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +15 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +46 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -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/companies/types/index.d.ts +8 -0
- package/dist/serialization/resources/companies/types/index.js +8 -0
- package/dist/serialization/resources/credits/client/index.d.ts +1 -0
- package/dist/serialization/resources/credits/client/index.js +17 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +25 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.js +56 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +18 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +49 -0
- package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +23 -0
- package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.js +54 -0
- package/dist/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
- package/dist/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +55 -0
- package/dist/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +13 -0
- package/dist/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.js +44 -0
- package/dist/serialization/resources/credits/client/requests/index.d.ts +5 -0
- package/dist/serialization/resources/credits/client/requests/index.js +13 -0
- package/dist/serialization/resources/credits/index.d.ts +2 -0
- package/dist/serialization/resources/credits/index.js +18 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsParams.js +46 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsParams.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsParams.js +46 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountBillingCreditsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +16 -0
- package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.js +47 -0
- package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesParams.d.ts +18 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesParams.js +49 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +10 -0
- package/{serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.js → dist/serialization/resources/credits/types/CountCreditBundlesRequestStatus.js} +2 -2
- package/dist/serialization/resources/credits/types/CountCreditBundlesResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesResponse.js +46 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +41 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +46 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/CreateBillingCreditResponse.js +45 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +41 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +41 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +45 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +41 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +41 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleResponse.js +45 -0
- package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +45 -0
- package/dist/serialization/resources/credits/types/DeleteCreditBundleResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/DeleteCreditBundleResponse.js +45 -0
- package/dist/serialization/resources/credits/types/GetCreditBundleResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/GetCreditBundleResponse.js +45 -0
- package/dist/serialization/resources/credits/types/GetSingleBillingCreditResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/GetSingleBillingCreditResponse.js +45 -0
- package/dist/serialization/resources/credits/types/ListBillingCreditsParams.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListBillingCreditsParams.js +46 -0
- package/dist/serialization/resources/credits/types/ListBillingCreditsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListBillingCreditsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +16 -0
- package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.js +47 -0
- package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsParams.d.ts +18 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsParams.js +49 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestDir.js +41 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.js +41 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponse.js +46 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +41 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +41 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesParams.d.ts +18 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesParams.js +49 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesRequestStatus.js +41 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesResponse.js +46 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +41 -0
- package/dist/serialization/resources/credits/types/ListGrantsForCreditParams.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListGrantsForCreditParams.js +46 -0
- package/dist/serialization/resources/credits/types/ListGrantsForCreditResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/ListGrantsForCreditResponse.js +46 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +46 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/UpdateBillingCreditResponse.js +45 -0
- package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/UpdateCreditBundleResponse.js +45 -0
- package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.js +41 -0
- package/dist/serialization/resources/credits/types/ZeroOutGrantResponse.d.ts +14 -0
- package/dist/serialization/resources/credits/types/ZeroOutGrantResponse.js +45 -0
- package/dist/serialization/resources/credits/types/index.d.ts +45 -0
- package/dist/serialization/resources/credits/types/index.js +61 -0
- package/dist/serialization/resources/dataexports/client/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/client/index.js +17 -0
- package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/dist/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
- package/dist/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/client/requests/index.js +5 -0
- package/dist/serialization/resources/dataexports/index.d.ts +2 -0
- package/dist/serialization/resources/dataexports/index.js +18 -0
- package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
- package/dist/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
- package/dist/serialization/resources/dataexports/types/index.d.ts +1 -0
- package/dist/serialization/resources/dataexports/types/index.js +17 -0
- package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +1 -0
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +13 -1
- package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +1 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +13 -1
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -1
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -1
- 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/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -1
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/dist/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -1
- package/dist/serialization/resources/entitlements/types/index.d.ts +2 -0
- package/dist/serialization/resources/entitlements/types/index.js +2 -0
- package/dist/serialization/resources/events/types/ListEventsParams.d.ts +2 -1
- package/dist/serialization/resources/events/types/ListEventsParams.js +2 -1
- package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.d.ts +10 -0
- package/dist/serialization/resources/events/types/ListEventsRequestEventTypesItem.js +41 -0
- package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +10 -0
- package/dist/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.js +41 -0
- package/dist/serialization/resources/events/types/index.d.ts +2 -0
- package/dist/serialization/resources/events/types/index.js +2 -0
- package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -1
- package/dist/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +2 -1
- package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -1
- package/dist/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +2 -1
- package/dist/serialization/resources/features/types/CountFeaturesParams.d.ts +2 -0
- package/dist/serialization/resources/features/types/CountFeaturesParams.js +2 -0
- package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
- package/dist/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +51 -0
- package/dist/serialization/resources/features/types/ListFeaturesParams.d.ts +2 -0
- package/dist/serialization/resources/features/types/ListFeaturesParams.js +2 -0
- package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
- package/dist/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +51 -0
- package/dist/serialization/resources/features/types/index.d.ts +2 -0
- package/dist/serialization/resources/features/types/index.js +2 -0
- package/dist/serialization/resources/index.d.ts +6 -0
- package/dist/serialization/resources/index.js +7 -1
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +2 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +2 -0
- 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 +7 -1
- package/dist/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +7 -1
- 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/UpsertBillingProductRequestBodyChargeType.d.ts +10 -0
- package/dist/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +41 -0
- package/dist/serialization/resources/plans/types/index.d.ts +9 -0
- package/dist/serialization/resources/plans/types/index.js +9 -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/BillingCreditBundleResponseData.d.ts +24 -0
- package/dist/serialization/types/BillingCreditBundleResponseData.js +55 -0
- package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +29 -0
- package/dist/serialization/types/BillingCreditGrantResponseData.js +60 -0
- package/dist/serialization/types/BillingCreditResponseData.d.ts +28 -0
- package/dist/serialization/types/BillingCreditResponseData.js +59 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +20 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.js +51 -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 +8 -0
- package/dist/serialization/types/BillingPriceView.js +8 -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 +3 -0
- package/dist/serialization/types/BillingProductPlanResponseData.js +3 -0
- package/dist/serialization/types/BillingProductPriceResponseData.d.ts +4 -0
- package/dist/serialization/types/BillingProductPriceResponseData.js +4 -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/ChangeSubscriptionInternalRequestBody.d.ts +3 -0
- package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.js +3 -0
- package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +3 -0
- package/dist/serialization/types/ChangeSubscriptionRequestBody.js +3 -0
- package/dist/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/dist/serialization/types/CheckFlagResponseData.js +1 -0
- package/dist/serialization/types/CheckoutDataResponseData.d.ts +4 -0
- package/dist/serialization/types/CheckoutDataResponseData.js +4 -0
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/dist/serialization/types/CompanyDetailResponseData.js +2 -1
- package/dist/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
- package/dist/serialization/types/CompanyOverrideResponseData.js +1 -0
- package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +4 -0
- package/dist/serialization/types/CompanyPlanDetailResponseData.js +4 -0
- package/dist/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/dist/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
- package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.d.ts +39 -0
- package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.js +70 -0
- package/dist/serialization/types/CompatiblePlans.d.ts +13 -0
- package/dist/serialization/types/CompatiblePlans.js +44 -0
- package/dist/serialization/types/CompatiblePlansResponseData.d.ts +13 -0
- package/dist/serialization/types/CompatiblePlansResponseData.js +44 -0
- package/dist/serialization/types/ComponentHydrateResponseData.d.ts +2 -0
- package/dist/serialization/types/ComponentHydrateResponseData.js +2 -0
- package/dist/serialization/types/ComponentPreviewResponseData.d.ts +2 -0
- package/dist/serialization/types/ComponentPreviewResponseData.js +2 -0
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/dist/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
- package/dist/serialization/types/CreateEntitlementReqCommon.d.ts +1 -0
- package/dist/serialization/types/CreateEntitlementReqCommon.js +1 -0
- package/dist/serialization/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
- package/dist/serialization/types/CreateEntitlementReqCommonValueType.js +1 -1
- package/dist/serialization/types/CreateFlagRequestBody.d.ts +1 -1
- package/dist/serialization/types/CreateFlagRequestBody.js +1 -1
- package/dist/serialization/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
- package/dist/serialization/types/CreateOrUpdateFlagRequestBody.js +1 -1
- package/dist/serialization/types/CreatePriceTierRequestBody.d.ts +15 -0
- package/dist/serialization/types/CreatePriceTierRequestBody.js +46 -0
- package/dist/serialization/types/CreditBundlePurchaseResponseData.d.ts +15 -0
- package/dist/serialization/types/CreditBundlePurchaseResponseData.js +46 -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/FeatureUsageDataResponseData.d.ts +20 -0
- package/dist/serialization/types/FeatureUsageDataResponseData.js +51 -0
- package/dist/serialization/types/PlanDetailResponseData.d.ts +3 -0
- package/dist/serialization/types/PlanDetailResponseData.js +3 -0
- package/dist/serialization/types/PlanEntitlementResponseData.d.ts +5 -0
- package/dist/serialization/types/PlanEntitlementResponseData.js +5 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.js +4 -0
- package/dist/serialization/types/PlanGroupResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanGroupResponseData.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 +5 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.js +5 -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/UpdateCreditBundleRequestBody.d.ts +13 -0
- package/dist/serialization/types/UpdateCreditBundleRequestBody.js +44 -0
- package/dist/serialization/types/UpdateEntitlementReqCommon.d.ts +1 -0
- package/dist/serialization/types/UpdateEntitlementReqCommon.js +1 -0
- package/dist/serialization/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
- package/dist/serialization/types/UpdateEntitlementReqCommonValueType.js +1 -1
- package/dist/serialization/types/UpsertUserRequestBody.d.ts +3 -1
- package/dist/serialization/types/UpsertUserRequestBody.js +5 -1
- package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/dist/serialization/types/UpsertUserSubRequestBody.js +1 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +12 -1
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.js +12 -1
- package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +41 -0
- package/dist/serialization/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/dist/serialization/types/UsageBasedEntitlementResponseData.js +1 -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 +19 -0
- package/dist/serialization/types/index.js +19 -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 +4 -3
- package/reference.md +1830 -378
- package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +0 -1
- package/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.js +0 -1
- 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 +6 -2
- package/serialization/resources/billing/client/requests/CreateBillingPriceRequestBody.js +6 -2
- 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/CreateBillingPriceRequestBodyTiersMode.d.ts +10 -0
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTiersMode.js +41 -0
- package/serialization/resources/billing/types/ListBillingProductsParams.d.ts +2 -0
- package/serialization/resources/billing/types/ListBillingProductsParams.js +2 -0
- package/{dist/serialization/resources/billing/types/ListCustomersParams.d.ts → serialization/resources/billing/types/ListCustomersWithSubscriptionsParams.d.ts} +3 -2
- package/{dist/serialization/resources/billing/types/ListCustomersParams.js → serialization/resources/billing/types/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/SearchBillingPricesParams.d.ts +2 -0
- package/serialization/resources/billing/types/SearchBillingPricesParams.js +2 -0
- package/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.d.ts +10 -0
- package/serialization/resources/billing/types/SearchBillingPricesRequestTiersMode.js +41 -0
- package/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.d.ts +10 -0
- package/serialization/resources/billing/types/SearchBillingPricesResponseParamsTiersMode.js +41 -0
- package/serialization/resources/billing/types/index.d.ts +6 -3
- package/serialization/resources/billing/types/index.js +6 -3
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +26 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.js +57 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.d.ts +15 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponse.js +46 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
- package/serialization/resources/companies/types/CountCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -0
- package/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
- package/serialization/resources/companies/types/CountCompaniesParams.js +1 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +26 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.js +57 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.d.ts +10 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterRequestSortOrderDirection.js +41 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +15 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponse.js +46 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.d.ts +10 -0
- package/serialization/resources/companies/types/ListCompaniesForAdvancedFilterResponseParamsSortOrderDirection.js +41 -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/companies/types/index.d.ts +8 -0
- package/serialization/resources/companies/types/index.js +8 -0
- package/serialization/resources/credits/client/index.d.ts +1 -0
- package/serialization/resources/credits/client/index.js +17 -0
- package/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.d.ts +25 -0
- package/serialization/resources/credits/client/requests/CreateBillingCreditRequestBody.js +56 -0
- package/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +18 -0
- package/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.js +49 -0
- package/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +23 -0
- package/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.js +54 -0
- package/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.d.ts +24 -0
- package/serialization/resources/credits/client/requests/UpdateBillingCreditRequestBody.js +55 -0
- package/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.d.ts +13 -0
- package/serialization/resources/credits/client/requests/ZeroOutGrantRequestBody.js +44 -0
- package/serialization/resources/credits/client/requests/index.d.ts +5 -0
- package/serialization/resources/credits/client/requests/index.js +13 -0
- package/serialization/resources/credits/index.d.ts +2 -0
- package/serialization/resources/credits/index.js +18 -0
- package/serialization/resources/credits/types/CountBillingCreditsGrantsParams.d.ts +15 -0
- package/serialization/resources/credits/types/CountBillingCreditsGrantsParams.js +46 -0
- package/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/CountBillingCreditsGrantsResponse.js +46 -0
- package/serialization/resources/credits/types/CountBillingCreditsParams.d.ts +15 -0
- package/serialization/resources/credits/types/CountBillingCreditsParams.js +46 -0
- package/serialization/resources/credits/types/CountBillingCreditsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/CountBillingCreditsResponse.js +46 -0
- package/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.d.ts +16 -0
- package/serialization/resources/credits/types/CountBillingPlanCreditGrantsParams.js +47 -0
- package/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/CountBillingPlanCreditGrantsResponse.js +46 -0
- package/serialization/resources/credits/types/CountCreditBundlesParams.d.ts +18 -0
- package/serialization/resources/credits/types/CountCreditBundlesParams.js +49 -0
- package/serialization/resources/credits/types/CountCreditBundlesRequestStatus.d.ts +10 -0
- package/serialization/resources/credits/types/CountCreditBundlesRequestStatus.js +41 -0
- package/serialization/resources/credits/types/CountCreditBundlesResponse.d.ts +15 -0
- package/serialization/resources/credits/types/CountCreditBundlesResponse.js +46 -0
- package/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.d.ts +10 -0
- package/serialization/resources/credits/types/CountCreditBundlesResponseParamsStatus.js +41 -0
- package/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/serialization/resources/credits/types/CreateBillingCreditRequestBodyBurnStrategy.js +46 -0
- package/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
- package/serialization/resources/credits/types/CreateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
- package/serialization/resources/credits/types/CreateBillingCreditResponse.d.ts +14 -0
- package/serialization/resources/credits/types/CreateBillingCreditResponse.js +45 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.d.ts +10 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetCadence.js +41 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.d.ts +10 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetStart.js +41 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.d.ts +14 -0
- package/serialization/resources/credits/types/CreateBillingPlanCreditGrantResponse.js +45 -0
- package/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +10 -0
- package/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.js +41 -0
- package/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.d.ts +10 -0
- package/serialization/resources/credits/types/CreateCreditBundleRequestBodyStatus.js +41 -0
- package/serialization/resources/credits/types/CreateCreditBundleResponse.d.ts +14 -0
- package/serialization/resources/credits/types/CreateCreditBundleResponse.js +45 -0
- package/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.d.ts +14 -0
- package/serialization/resources/credits/types/DeleteBillingPlanCreditGrantResponse.js +45 -0
- package/serialization/resources/credits/types/DeleteCreditBundleResponse.d.ts +14 -0
- package/serialization/resources/credits/types/DeleteCreditBundleResponse.js +45 -0
- package/serialization/resources/credits/types/GetCreditBundleResponse.d.ts +14 -0
- package/serialization/resources/credits/types/GetCreditBundleResponse.js +45 -0
- package/serialization/resources/credits/types/GetSingleBillingCreditResponse.d.ts +14 -0
- package/serialization/resources/credits/types/GetSingleBillingCreditResponse.js +45 -0
- package/serialization/resources/credits/types/ListBillingCreditsParams.d.ts +15 -0
- package/serialization/resources/credits/types/ListBillingCreditsParams.js +46 -0
- package/serialization/resources/credits/types/ListBillingCreditsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/ListBillingCreditsResponse.js +46 -0
- package/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.d.ts +16 -0
- package/serialization/resources/credits/types/ListBillingPlanCreditGrantsParams.js +47 -0
- package/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/ListBillingPlanCreditGrantsResponse.js +46 -0
- package/serialization/resources/credits/types/ListCompanyGrantsParams.d.ts +18 -0
- package/serialization/resources/credits/types/ListCompanyGrantsParams.js +49 -0
- package/serialization/resources/credits/types/ListCompanyGrantsRequestDir.d.ts +10 -0
- package/serialization/resources/credits/types/ListCompanyGrantsRequestDir.js +41 -0
- package/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.d.ts +10 -0
- package/serialization/resources/credits/types/ListCompanyGrantsRequestOrder.js +41 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponse.d.ts +15 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponse.js +46 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.d.ts +10 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsDir.js +41 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.d.ts +10 -0
- package/serialization/resources/credits/types/ListCompanyGrantsResponseParamsOrder.js +41 -0
- package/serialization/resources/credits/types/ListCreditBundlesParams.d.ts +18 -0
- package/serialization/resources/credits/types/ListCreditBundlesParams.js +49 -0
- package/serialization/resources/credits/types/ListCreditBundlesRequestStatus.d.ts +10 -0
- package/serialization/resources/credits/types/ListCreditBundlesRequestStatus.js +41 -0
- package/serialization/resources/credits/types/ListCreditBundlesResponse.d.ts +15 -0
- package/serialization/resources/credits/types/ListCreditBundlesResponse.js +46 -0
- package/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.d.ts +10 -0
- package/serialization/resources/credits/types/ListCreditBundlesResponseParamsStatus.js +41 -0
- package/serialization/resources/credits/types/ListGrantsForCreditParams.d.ts +15 -0
- package/serialization/resources/credits/types/ListGrantsForCreditParams.js +46 -0
- package/serialization/resources/credits/types/ListGrantsForCreditResponse.d.ts +15 -0
- package/serialization/resources/credits/types/ListGrantsForCreditResponse.js +46 -0
- package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.d.ts +10 -0
- package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyBurnStrategy.js +46 -0
- package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.d.ts +10 -0
- package/serialization/resources/credits/types/UpdateBillingCreditRequestBodyDefaultRolloverPolicy.js +41 -0
- package/serialization/resources/credits/types/UpdateBillingCreditResponse.d.ts +14 -0
- package/serialization/resources/credits/types/UpdateBillingCreditResponse.js +45 -0
- package/serialization/resources/credits/types/UpdateCreditBundleResponse.d.ts +14 -0
- package/serialization/resources/credits/types/UpdateCreditBundleResponse.js +45 -0
- package/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +10 -0
- package/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.js +41 -0
- package/serialization/resources/credits/types/ZeroOutGrantResponse.d.ts +14 -0
- package/serialization/resources/credits/types/ZeroOutGrantResponse.js +45 -0
- package/serialization/resources/credits/types/index.d.ts +45 -0
- package/serialization/resources/credits/types/index.js +61 -0
- package/serialization/resources/dataexports/client/index.d.ts +1 -0
- package/serialization/resources/dataexports/client/index.js +17 -0
- package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.d.ts +12 -0
- package/serialization/resources/dataexports/client/requests/CreateDataExportRequestBody.js +43 -0
- package/serialization/resources/dataexports/client/requests/index.d.ts +1 -0
- package/serialization/resources/dataexports/client/requests/index.js +5 -0
- package/serialization/resources/dataexports/index.d.ts +2 -0
- package/serialization/resources/dataexports/index.js +18 -0
- package/serialization/resources/dataexports/types/CreateDataExportResponse.d.ts +14 -0
- package/serialization/resources/dataexports/types/CreateDataExportResponse.js +45 -0
- package/serialization/resources/dataexports/types/index.d.ts +1 -0
- package/serialization/resources/dataexports/types/index.js +17 -0
- package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.js +1 -0
- package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +13 -1
- package/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.js +13 -1
- package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.js +1 -0
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +13 -1
- package/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.js +13 -1
- package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/serialization/resources/entitlements/types/CreateCompanyOverrideRequestBodyValueType.js +1 -1
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/serialization/resources/entitlements/types/CreatePlanEntitlementRequestBodyValueType.js +1 -1
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.d.ts +1 -1
- package/serialization/resources/entitlements/types/GetFeatureUsageByCompanyParams.js +1 -1
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.d.ts +1 -1
- package/serialization/resources/entitlements/types/UpdateCompanyOverrideRequestBodyValueType.js +1 -1
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyPriceBehavior.js +41 -0
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.d.ts +1 -1
- package/serialization/resources/entitlements/types/UpdatePlanEntitlementRequestBodyValueType.js +1 -1
- package/serialization/resources/entitlements/types/index.d.ts +2 -0
- package/serialization/resources/entitlements/types/index.js +2 -0
- package/serialization/resources/events/types/ListEventsParams.d.ts +2 -1
- package/serialization/resources/events/types/ListEventsParams.js +2 -1
- package/serialization/resources/events/types/ListEventsRequestEventTypesItem.d.ts +10 -0
- package/serialization/resources/events/types/ListEventsRequestEventTypesItem.js +41 -0
- package/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.d.ts +10 -0
- package/serialization/resources/events/types/ListEventsResponseParamsEventTypesItem.js +41 -0
- package/serialization/resources/events/types/index.d.ts +2 -0
- package/serialization/resources/events/types/index.js +2 -0
- package/serialization/resources/features/client/requests/CreateFeatureRequestBody.d.ts +2 -1
- package/serialization/resources/features/client/requests/CreateFeatureRequestBody.js +2 -1
- package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.d.ts +2 -1
- package/serialization/resources/features/client/requests/UpdateFeatureRequestBody.js +2 -1
- package/serialization/resources/features/types/CountFeaturesParams.d.ts +2 -0
- package/serialization/resources/features/types/CountFeaturesParams.js +2 -0
- package/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
- package/serialization/resources/features/types/CreateFeatureRequestBodyLifecyclePhase.js +51 -0
- package/serialization/resources/features/types/ListFeaturesParams.d.ts +2 -0
- package/serialization/resources/features/types/ListFeaturesParams.js +2 -0
- package/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.d.ts +10 -0
- package/serialization/resources/features/types/UpdateFeatureRequestBodyLifecyclePhase.js +51 -0
- package/serialization/resources/features/types/index.d.ts +2 -0
- package/serialization/resources/features/types/index.js +2 -0
- package/serialization/resources/index.d.ts +6 -0
- package/serialization/resources/index.js +7 -1
- package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
- package/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.js +2 -0
- package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
- package/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.js +2 -0
- 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 +7 -1
- package/serialization/resources/plans/client/requests/UpsertBillingProductRequestBody.js +7 -1
- 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/UpsertBillingProductRequestBodyChargeType.d.ts +10 -0
- package/serialization/resources/plans/types/UpsertBillingProductRequestBodyChargeType.js +41 -0
- package/serialization/resources/plans/types/index.d.ts +9 -0
- package/serialization/resources/plans/types/index.js +9 -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/BillingCreditBundleResponseData.d.ts +24 -0
- package/serialization/types/BillingCreditBundleResponseData.js +55 -0
- package/serialization/types/BillingCreditGrantResponseData.d.ts +29 -0
- package/serialization/types/BillingCreditGrantResponseData.js +60 -0
- package/serialization/types/BillingCreditResponseData.d.ts +28 -0
- package/serialization/types/BillingCreditResponseData.js +59 -0
- package/serialization/types/BillingPlanCreditGrantResponseData.d.ts +20 -0
- package/serialization/types/BillingPlanCreditGrantResponseData.js +51 -0
- package/serialization/types/BillingPriceResponseData.d.ts +2 -0
- package/serialization/types/BillingPriceResponseData.js +2 -0
- package/serialization/types/BillingPriceView.d.ts +8 -0
- package/serialization/types/BillingPriceView.js +8 -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 +3 -0
- package/serialization/types/BillingProductPlanResponseData.js +3 -0
- package/serialization/types/BillingProductPriceResponseData.d.ts +4 -0
- package/serialization/types/BillingProductPriceResponseData.js +4 -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/ChangeSubscriptionInternalRequestBody.d.ts +3 -0
- package/serialization/types/ChangeSubscriptionInternalRequestBody.js +3 -0
- package/serialization/types/ChangeSubscriptionRequestBody.d.ts +3 -0
- package/serialization/types/ChangeSubscriptionRequestBody.js +3 -0
- package/serialization/types/CheckFlagResponseData.d.ts +1 -0
- package/serialization/types/CheckFlagResponseData.js +1 -0
- package/serialization/types/CheckoutDataResponseData.d.ts +4 -0
- package/serialization/types/CheckoutDataResponseData.js +4 -0
- package/serialization/types/CompanyDetailResponseData.d.ts +2 -1
- package/serialization/types/CompanyDetailResponseData.js +2 -1
- package/serialization/types/CompanyOverrideResponseData.d.ts +1 -0
- package/serialization/types/CompanyOverrideResponseData.js +1 -0
- package/serialization/types/CompanyPlanDetailResponseData.d.ts +4 -0
- package/serialization/types/CompanyPlanDetailResponseData.js +4 -0
- package/serialization/types/CompanyPlanWithBillingSubView.d.ts +2 -0
- package/serialization/types/CompanyPlanWithBillingSubView.js +2 -0
- package/serialization/types/CompanyViewWithFeatureUsageResponseData.d.ts +39 -0
- package/serialization/types/CompanyViewWithFeatureUsageResponseData.js +70 -0
- package/serialization/types/CompatiblePlans.d.ts +13 -0
- package/serialization/types/CompatiblePlans.js +44 -0
- package/serialization/types/CompatiblePlansResponseData.d.ts +13 -0
- package/serialization/types/CompatiblePlansResponseData.js +44 -0
- package/serialization/types/ComponentHydrateResponseData.d.ts +2 -0
- package/serialization/types/ComponentHydrateResponseData.js +2 -0
- package/serialization/types/ComponentPreviewResponseData.d.ts +2 -0
- package/serialization/types/ComponentPreviewResponseData.js +2 -0
- package/serialization/types/CreateBillingPriceTierRequestBody.d.ts +1 -0
- package/serialization/types/CreateBillingPriceTierRequestBody.js +1 -0
- package/serialization/types/CreateEntitlementReqCommon.d.ts +1 -0
- package/serialization/types/CreateEntitlementReqCommon.js +1 -0
- package/serialization/types/CreateEntitlementReqCommonValueType.d.ts +1 -1
- package/serialization/types/CreateEntitlementReqCommonValueType.js +1 -1
- package/serialization/types/CreateFlagRequestBody.d.ts +1 -1
- package/serialization/types/CreateFlagRequestBody.js +1 -1
- package/serialization/types/CreateOrUpdateFlagRequestBody.d.ts +1 -1
- package/serialization/types/CreateOrUpdateFlagRequestBody.js +1 -1
- package/serialization/types/CreatePriceTierRequestBody.d.ts +15 -0
- package/serialization/types/CreatePriceTierRequestBody.js +46 -0
- package/serialization/types/CreditBundlePurchaseResponseData.d.ts +15 -0
- package/serialization/types/CreditBundlePurchaseResponseData.js +46 -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/FeatureUsageDataResponseData.d.ts +20 -0
- package/serialization/types/FeatureUsageDataResponseData.js +51 -0
- package/serialization/types/PlanDetailResponseData.d.ts +3 -0
- package/serialization/types/PlanDetailResponseData.js +3 -0
- package/serialization/types/PlanEntitlementResponseData.d.ts +5 -0
- package/serialization/types/PlanEntitlementResponseData.js +5 -0
- package/serialization/types/PlanGroupPlanDetailResponseData.d.ts +4 -0
- package/serialization/types/PlanGroupPlanDetailResponseData.js +4 -0
- package/serialization/types/PlanGroupResponseData.d.ts +2 -0
- package/serialization/types/PlanGroupResponseData.js +2 -0
- package/serialization/types/PlanTraitResponseData.d.ts +19 -0
- package/serialization/types/PlanTraitResponseData.js +50 -0
- package/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +5 -0
- package/serialization/types/PreviewSubscriptionChangeResponseData.js +5 -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/UpdateCreditBundleRequestBody.d.ts +13 -0
- package/serialization/types/UpdateCreditBundleRequestBody.js +44 -0
- package/serialization/types/UpdateEntitlementReqCommon.d.ts +1 -0
- package/serialization/types/UpdateEntitlementReqCommon.js +1 -0
- package/serialization/types/UpdateEntitlementReqCommonValueType.d.ts +1 -1
- package/serialization/types/UpdateEntitlementReqCommonValueType.js +1 -1
- package/serialization/types/UpsertUserRequestBody.d.ts +3 -1
- package/serialization/types/UpsertUserRequestBody.js +5 -1
- package/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
- package/serialization/types/UpsertUserSubRequestBody.js +1 -0
- package/serialization/types/UsageBasedEntitlementRequestBody.d.ts +12 -1
- package/serialization/types/UsageBasedEntitlementRequestBody.js +12 -1
- package/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.d.ts +10 -0
- package/serialization/types/UsageBasedEntitlementRequestBodyPriceBehavior.js +41 -0
- package/serialization/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/serialization/types/UsageBasedEntitlementResponseData.js +1 -0
- package/serialization/types/WebhookResponseData.d.ts +2 -0
- package/serialization/types/WebhookResponseData.js +2 -0
- package/serialization/types/index.d.ts +19 -0
- package/serialization/types/index.js +19 -0
- package/dist/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +0 -10
- package/serialization/resources/billing/types/CreateBillingPriceRequestBodyTierMode.d.ts +0 -10
- /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/companies/client/requests/CountCompaniesForAdvancedFilterRequest.js} +0 -0
- /package/{dist/api/resources/billing/types/ListCustomersResponse.js → api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.js} +0 -0
|
@@ -66,12 +66,16 @@ class Billing {
|
|
|
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.billing.listCoupons()
|
|
73
74
|
*/
|
|
74
|
-
listCoupons() {
|
|
75
|
+
listCoupons(request = {}, requestOptions) {
|
|
76
|
+
return core.HttpResponsePromise.fromPromise(this.__listCoupons(request, requestOptions));
|
|
77
|
+
}
|
|
78
|
+
__listCoupons() {
|
|
75
79
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
76
80
|
var _a, _b, _c;
|
|
77
81
|
const { isActive, q, limit, offset } = request;
|
|
@@ -91,7 +95,7 @@ class Billing {
|
|
|
91
95
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
92
96
|
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, "billing/coupons"),
|
|
93
97
|
method: "GET",
|
|
94
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
98
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
95
99
|
contentType: "application/json",
|
|
96
100
|
queryParameters: _queryParams,
|
|
97
101
|
requestType: "json",
|
|
@@ -100,13 +104,16 @@ class Billing {
|
|
|
100
104
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
101
105
|
});
|
|
102
106
|
if (_response.ok) {
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
return {
|
|
108
|
+
data: serializers.ListCouponsResponse.parseOrThrow(_response.body, {
|
|
109
|
+
unrecognizedObjectKeys: "passthrough",
|
|
110
|
+
allowUnrecognizedUnionMembers: true,
|
|
111
|
+
allowUnrecognizedEnumValues: true,
|
|
112
|
+
skipValidation: true,
|
|
113
|
+
breadcrumbsPrefix: ["response"],
|
|
114
|
+
}),
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
};
|
|
110
117
|
}
|
|
111
118
|
if (_response.error.reason === "status-code") {
|
|
112
119
|
switch (_response.error.statusCode) {
|
|
@@ -117,7 +124,7 @@ class Billing {
|
|
|
117
124
|
allowUnrecognizedEnumValues: true,
|
|
118
125
|
skipValidation: true,
|
|
119
126
|
breadcrumbsPrefix: ["response"],
|
|
120
|
-
}));
|
|
127
|
+
}), _response.rawResponse);
|
|
121
128
|
case 401:
|
|
122
129
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
123
130
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -125,7 +132,7 @@ class Billing {
|
|
|
125
132
|
allowUnrecognizedEnumValues: true,
|
|
126
133
|
skipValidation: true,
|
|
127
134
|
breadcrumbsPrefix: ["response"],
|
|
128
|
-
}));
|
|
135
|
+
}), _response.rawResponse);
|
|
129
136
|
case 403:
|
|
130
137
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
131
138
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -133,7 +140,15 @@ class Billing {
|
|
|
133
140
|
allowUnrecognizedEnumValues: true,
|
|
134
141
|
skipValidation: true,
|
|
135
142
|
breadcrumbsPrefix: ["response"],
|
|
136
|
-
}));
|
|
143
|
+
}), _response.rawResponse);
|
|
144
|
+
case 404:
|
|
145
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
146
|
+
unrecognizedObjectKeys: "passthrough",
|
|
147
|
+
allowUnrecognizedUnionMembers: true,
|
|
148
|
+
allowUnrecognizedEnumValues: true,
|
|
149
|
+
skipValidation: true,
|
|
150
|
+
breadcrumbsPrefix: ["response"],
|
|
151
|
+
}), _response.rawResponse);
|
|
137
152
|
case 500:
|
|
138
153
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
139
154
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -141,11 +156,12 @@ class Billing {
|
|
|
141
156
|
allowUnrecognizedEnumValues: true,
|
|
142
157
|
skipValidation: true,
|
|
143
158
|
breadcrumbsPrefix: ["response"],
|
|
144
|
-
}));
|
|
159
|
+
}), _response.rawResponse);
|
|
145
160
|
default:
|
|
146
161
|
throw new errors.SchematicError({
|
|
147
162
|
statusCode: _response.error.statusCode,
|
|
148
163
|
body: _response.error.body,
|
|
164
|
+
rawResponse: _response.rawResponse,
|
|
149
165
|
});
|
|
150
166
|
}
|
|
151
167
|
}
|
|
@@ -154,12 +170,14 @@ class Billing {
|
|
|
154
170
|
throw new errors.SchematicError({
|
|
155
171
|
statusCode: _response.error.statusCode,
|
|
156
172
|
body: _response.error.rawBody,
|
|
173
|
+
rawResponse: _response.rawResponse,
|
|
157
174
|
});
|
|
158
175
|
case "timeout":
|
|
159
176
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/coupons.");
|
|
160
177
|
case "unknown":
|
|
161
178
|
throw new errors.SchematicError({
|
|
162
179
|
message: _response.error.errorMessage,
|
|
180
|
+
rawResponse: _response.rawResponse,
|
|
163
181
|
});
|
|
164
182
|
}
|
|
165
183
|
});
|
|
@@ -171,6 +189,7 @@ class Billing {
|
|
|
171
189
|
* @throws {@link Schematic.BadRequestError}
|
|
172
190
|
* @throws {@link Schematic.UnauthorizedError}
|
|
173
191
|
* @throws {@link Schematic.ForbiddenError}
|
|
192
|
+
* @throws {@link Schematic.NotFoundError}
|
|
174
193
|
* @throws {@link Schematic.InternalServerError}
|
|
175
194
|
*
|
|
176
195
|
* @example
|
|
@@ -186,12 +205,15 @@ class Billing {
|
|
|
186
205
|
* })
|
|
187
206
|
*/
|
|
188
207
|
upsertBillingCoupon(request, requestOptions) {
|
|
208
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingCoupon(request, requestOptions));
|
|
209
|
+
}
|
|
210
|
+
__upsertBillingCoupon(request, requestOptions) {
|
|
189
211
|
return __awaiter(this, void 0, void 0, function* () {
|
|
190
212
|
var _a, _b, _c;
|
|
191
213
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
192
214
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, "billing/coupons"),
|
|
193
215
|
method: "POST",
|
|
194
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
216
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
195
217
|
contentType: "application/json",
|
|
196
218
|
requestType: "json",
|
|
197
219
|
body: serializers.CreateCouponRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -200,13 +222,16 @@ class Billing {
|
|
|
200
222
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
223
|
});
|
|
202
224
|
if (_response.ok) {
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
225
|
+
return {
|
|
226
|
+
data: serializers.UpsertBillingCouponResponse.parseOrThrow(_response.body, {
|
|
227
|
+
unrecognizedObjectKeys: "passthrough",
|
|
228
|
+
allowUnrecognizedUnionMembers: true,
|
|
229
|
+
allowUnrecognizedEnumValues: true,
|
|
230
|
+
skipValidation: true,
|
|
231
|
+
breadcrumbsPrefix: ["response"],
|
|
232
|
+
}),
|
|
233
|
+
rawResponse: _response.rawResponse,
|
|
234
|
+
};
|
|
210
235
|
}
|
|
211
236
|
if (_response.error.reason === "status-code") {
|
|
212
237
|
switch (_response.error.statusCode) {
|
|
@@ -217,7 +242,7 @@ class Billing {
|
|
|
217
242
|
allowUnrecognizedEnumValues: true,
|
|
218
243
|
skipValidation: true,
|
|
219
244
|
breadcrumbsPrefix: ["response"],
|
|
220
|
-
}));
|
|
245
|
+
}), _response.rawResponse);
|
|
221
246
|
case 401:
|
|
222
247
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
223
248
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -225,7 +250,7 @@ class Billing {
|
|
|
225
250
|
allowUnrecognizedEnumValues: true,
|
|
226
251
|
skipValidation: true,
|
|
227
252
|
breadcrumbsPrefix: ["response"],
|
|
228
|
-
}));
|
|
253
|
+
}), _response.rawResponse);
|
|
229
254
|
case 403:
|
|
230
255
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
231
256
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -233,7 +258,15 @@ class Billing {
|
|
|
233
258
|
allowUnrecognizedEnumValues: true,
|
|
234
259
|
skipValidation: true,
|
|
235
260
|
breadcrumbsPrefix: ["response"],
|
|
236
|
-
}));
|
|
261
|
+
}), _response.rawResponse);
|
|
262
|
+
case 404:
|
|
263
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
264
|
+
unrecognizedObjectKeys: "passthrough",
|
|
265
|
+
allowUnrecognizedUnionMembers: true,
|
|
266
|
+
allowUnrecognizedEnumValues: true,
|
|
267
|
+
skipValidation: true,
|
|
268
|
+
breadcrumbsPrefix: ["response"],
|
|
269
|
+
}), _response.rawResponse);
|
|
237
270
|
case 500:
|
|
238
271
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
239
272
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -241,11 +274,12 @@ class Billing {
|
|
|
241
274
|
allowUnrecognizedEnumValues: true,
|
|
242
275
|
skipValidation: true,
|
|
243
276
|
breadcrumbsPrefix: ["response"],
|
|
244
|
-
}));
|
|
277
|
+
}), _response.rawResponse);
|
|
245
278
|
default:
|
|
246
279
|
throw new errors.SchematicError({
|
|
247
280
|
statusCode: _response.error.statusCode,
|
|
248
281
|
body: _response.error.body,
|
|
282
|
+
rawResponse: _response.rawResponse,
|
|
249
283
|
});
|
|
250
284
|
}
|
|
251
285
|
}
|
|
@@ -254,12 +288,14 @@ class Billing {
|
|
|
254
288
|
throw new errors.SchematicError({
|
|
255
289
|
statusCode: _response.error.statusCode,
|
|
256
290
|
body: _response.error.rawBody,
|
|
291
|
+
rawResponse: _response.rawResponse,
|
|
257
292
|
});
|
|
258
293
|
case "timeout":
|
|
259
294
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/coupons.");
|
|
260
295
|
case "unknown":
|
|
261
296
|
throw new errors.SchematicError({
|
|
262
297
|
message: _response.error.errorMessage,
|
|
298
|
+
rawResponse: _response.rawResponse,
|
|
263
299
|
});
|
|
264
300
|
}
|
|
265
301
|
});
|
|
@@ -271,6 +307,7 @@ class Billing {
|
|
|
271
307
|
* @throws {@link Schematic.BadRequestError}
|
|
272
308
|
* @throws {@link Schematic.UnauthorizedError}
|
|
273
309
|
* @throws {@link Schematic.ForbiddenError}
|
|
310
|
+
* @throws {@link Schematic.NotFoundError}
|
|
274
311
|
* @throws {@link Schematic.InternalServerError}
|
|
275
312
|
*
|
|
276
313
|
* @example
|
|
@@ -285,12 +322,15 @@ class Billing {
|
|
|
285
322
|
* })
|
|
286
323
|
*/
|
|
287
324
|
upsertBillingCustomer(request, requestOptions) {
|
|
325
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingCustomer(request, requestOptions));
|
|
326
|
+
}
|
|
327
|
+
__upsertBillingCustomer(request, requestOptions) {
|
|
288
328
|
return __awaiter(this, void 0, void 0, function* () {
|
|
289
329
|
var _a, _b, _c;
|
|
290
330
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
291
331
|
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, "billing/customer/upsert"),
|
|
292
332
|
method: "POST",
|
|
293
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
333
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
294
334
|
contentType: "application/json",
|
|
295
335
|
requestType: "json",
|
|
296
336
|
body: serializers.CreateBillingCustomerRequestBody.jsonOrThrow(request, {
|
|
@@ -301,13 +341,16 @@ class Billing {
|
|
|
301
341
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
302
342
|
});
|
|
303
343
|
if (_response.ok) {
|
|
304
|
-
return
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
344
|
+
return {
|
|
345
|
+
data: serializers.UpsertBillingCustomerResponse.parseOrThrow(_response.body, {
|
|
346
|
+
unrecognizedObjectKeys: "passthrough",
|
|
347
|
+
allowUnrecognizedUnionMembers: true,
|
|
348
|
+
allowUnrecognizedEnumValues: true,
|
|
349
|
+
skipValidation: true,
|
|
350
|
+
breadcrumbsPrefix: ["response"],
|
|
351
|
+
}),
|
|
352
|
+
rawResponse: _response.rawResponse,
|
|
353
|
+
};
|
|
311
354
|
}
|
|
312
355
|
if (_response.error.reason === "status-code") {
|
|
313
356
|
switch (_response.error.statusCode) {
|
|
@@ -318,7 +361,7 @@ class Billing {
|
|
|
318
361
|
allowUnrecognizedEnumValues: true,
|
|
319
362
|
skipValidation: true,
|
|
320
363
|
breadcrumbsPrefix: ["response"],
|
|
321
|
-
}));
|
|
364
|
+
}), _response.rawResponse);
|
|
322
365
|
case 401:
|
|
323
366
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
324
367
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -326,7 +369,7 @@ class Billing {
|
|
|
326
369
|
allowUnrecognizedEnumValues: true,
|
|
327
370
|
skipValidation: true,
|
|
328
371
|
breadcrumbsPrefix: ["response"],
|
|
329
|
-
}));
|
|
372
|
+
}), _response.rawResponse);
|
|
330
373
|
case 403:
|
|
331
374
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
332
375
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -334,7 +377,15 @@ class Billing {
|
|
|
334
377
|
allowUnrecognizedEnumValues: true,
|
|
335
378
|
skipValidation: true,
|
|
336
379
|
breadcrumbsPrefix: ["response"],
|
|
337
|
-
}));
|
|
380
|
+
}), _response.rawResponse);
|
|
381
|
+
case 404:
|
|
382
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
383
|
+
unrecognizedObjectKeys: "passthrough",
|
|
384
|
+
allowUnrecognizedUnionMembers: true,
|
|
385
|
+
allowUnrecognizedEnumValues: true,
|
|
386
|
+
skipValidation: true,
|
|
387
|
+
breadcrumbsPrefix: ["response"],
|
|
388
|
+
}), _response.rawResponse);
|
|
338
389
|
case 500:
|
|
339
390
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
340
391
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -342,11 +393,12 @@ class Billing {
|
|
|
342
393
|
allowUnrecognizedEnumValues: true,
|
|
343
394
|
skipValidation: true,
|
|
344
395
|
breadcrumbsPrefix: ["response"],
|
|
345
|
-
}));
|
|
396
|
+
}), _response.rawResponse);
|
|
346
397
|
default:
|
|
347
398
|
throw new errors.SchematicError({
|
|
348
399
|
statusCode: _response.error.statusCode,
|
|
349
400
|
body: _response.error.body,
|
|
401
|
+
rawResponse: _response.rawResponse,
|
|
350
402
|
});
|
|
351
403
|
}
|
|
352
404
|
}
|
|
@@ -355,33 +407,47 @@ class Billing {
|
|
|
355
407
|
throw new errors.SchematicError({
|
|
356
408
|
statusCode: _response.error.statusCode,
|
|
357
409
|
body: _response.error.rawBody,
|
|
410
|
+
rawResponse: _response.rawResponse,
|
|
358
411
|
});
|
|
359
412
|
case "timeout":
|
|
360
413
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/customer/upsert.");
|
|
361
414
|
case "unknown":
|
|
362
415
|
throw new errors.SchematicError({
|
|
363
416
|
message: _response.error.errorMessage,
|
|
417
|
+
rawResponse: _response.rawResponse,
|
|
364
418
|
});
|
|
365
419
|
}
|
|
366
420
|
});
|
|
367
421
|
}
|
|
368
422
|
/**
|
|
369
|
-
* @param {Schematic.
|
|
423
|
+
* @param {Schematic.ListCustomersWithSubscriptionsRequest} request
|
|
370
424
|
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
371
425
|
*
|
|
372
426
|
* @throws {@link Schematic.BadRequestError}
|
|
373
427
|
* @throws {@link Schematic.UnauthorizedError}
|
|
374
428
|
* @throws {@link Schematic.ForbiddenError}
|
|
429
|
+
* @throws {@link Schematic.NotFoundError}
|
|
375
430
|
* @throws {@link Schematic.InternalServerError}
|
|
376
431
|
*
|
|
377
432
|
* @example
|
|
378
|
-
* await client.billing.
|
|
433
|
+
* await client.billing.listCustomersWithSubscriptions()
|
|
379
434
|
*/
|
|
380
|
-
|
|
435
|
+
listCustomersWithSubscriptions(request = {}, requestOptions) {
|
|
436
|
+
return core.HttpResponsePromise.fromPromise(this.__listCustomersWithSubscriptions(request, requestOptions));
|
|
437
|
+
}
|
|
438
|
+
__listCustomersWithSubscriptions() {
|
|
381
439
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
382
440
|
var _a, _b, _c;
|
|
383
|
-
const { name, failedToImport, q, limit, offset } = request;
|
|
441
|
+
const { companyIds, name, failedToImport, q, limit, offset } = request;
|
|
384
442
|
const _queryParams = {};
|
|
443
|
+
if (companyIds != null) {
|
|
444
|
+
if (Array.isArray(companyIds)) {
|
|
445
|
+
_queryParams["company_ids"] = companyIds.map((item) => item);
|
|
446
|
+
}
|
|
447
|
+
else {
|
|
448
|
+
_queryParams["company_ids"] = companyIds;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
385
451
|
if (name != null) {
|
|
386
452
|
_queryParams["name"] = name;
|
|
387
453
|
}
|
|
@@ -400,7 +466,7 @@ class Billing {
|
|
|
400
466
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
401
467
|
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, "billing/customers"),
|
|
402
468
|
method: "GET",
|
|
403
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
469
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
404
470
|
contentType: "application/json",
|
|
405
471
|
queryParameters: _queryParams,
|
|
406
472
|
requestType: "json",
|
|
@@ -409,13 +475,16 @@ class Billing {
|
|
|
409
475
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
410
476
|
});
|
|
411
477
|
if (_response.ok) {
|
|
412
|
-
return
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
478
|
+
return {
|
|
479
|
+
data: serializers.ListCustomersWithSubscriptionsResponse.parseOrThrow(_response.body, {
|
|
480
|
+
unrecognizedObjectKeys: "passthrough",
|
|
481
|
+
allowUnrecognizedUnionMembers: true,
|
|
482
|
+
allowUnrecognizedEnumValues: true,
|
|
483
|
+
skipValidation: true,
|
|
484
|
+
breadcrumbsPrefix: ["response"],
|
|
485
|
+
}),
|
|
486
|
+
rawResponse: _response.rawResponse,
|
|
487
|
+
};
|
|
419
488
|
}
|
|
420
489
|
if (_response.error.reason === "status-code") {
|
|
421
490
|
switch (_response.error.statusCode) {
|
|
@@ -426,7 +495,7 @@ class Billing {
|
|
|
426
495
|
allowUnrecognizedEnumValues: true,
|
|
427
496
|
skipValidation: true,
|
|
428
497
|
breadcrumbsPrefix: ["response"],
|
|
429
|
-
}));
|
|
498
|
+
}), _response.rawResponse);
|
|
430
499
|
case 401:
|
|
431
500
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
432
501
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -434,7 +503,7 @@ class Billing {
|
|
|
434
503
|
allowUnrecognizedEnumValues: true,
|
|
435
504
|
skipValidation: true,
|
|
436
505
|
breadcrumbsPrefix: ["response"],
|
|
437
|
-
}));
|
|
506
|
+
}), _response.rawResponse);
|
|
438
507
|
case 403:
|
|
439
508
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
440
509
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -442,7 +511,15 @@ class Billing {
|
|
|
442
511
|
allowUnrecognizedEnumValues: true,
|
|
443
512
|
skipValidation: true,
|
|
444
513
|
breadcrumbsPrefix: ["response"],
|
|
445
|
-
}));
|
|
514
|
+
}), _response.rawResponse);
|
|
515
|
+
case 404:
|
|
516
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
517
|
+
unrecognizedObjectKeys: "passthrough",
|
|
518
|
+
allowUnrecognizedUnionMembers: true,
|
|
519
|
+
allowUnrecognizedEnumValues: true,
|
|
520
|
+
skipValidation: true,
|
|
521
|
+
breadcrumbsPrefix: ["response"],
|
|
522
|
+
}), _response.rawResponse);
|
|
446
523
|
case 500:
|
|
447
524
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
448
525
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -450,11 +527,12 @@ class Billing {
|
|
|
450
527
|
allowUnrecognizedEnumValues: true,
|
|
451
528
|
skipValidation: true,
|
|
452
529
|
breadcrumbsPrefix: ["response"],
|
|
453
|
-
}));
|
|
530
|
+
}), _response.rawResponse);
|
|
454
531
|
default:
|
|
455
532
|
throw new errors.SchematicError({
|
|
456
533
|
statusCode: _response.error.statusCode,
|
|
457
534
|
body: _response.error.body,
|
|
535
|
+
rawResponse: _response.rawResponse,
|
|
458
536
|
});
|
|
459
537
|
}
|
|
460
538
|
}
|
|
@@ -463,12 +541,14 @@ class Billing {
|
|
|
463
541
|
throw new errors.SchematicError({
|
|
464
542
|
statusCode: _response.error.statusCode,
|
|
465
543
|
body: _response.error.rawBody,
|
|
544
|
+
rawResponse: _response.rawResponse,
|
|
466
545
|
});
|
|
467
546
|
case "timeout":
|
|
468
547
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers.");
|
|
469
548
|
case "unknown":
|
|
470
549
|
throw new errors.SchematicError({
|
|
471
550
|
message: _response.error.errorMessage,
|
|
551
|
+
rawResponse: _response.rawResponse,
|
|
472
552
|
});
|
|
473
553
|
}
|
|
474
554
|
});
|
|
@@ -480,16 +560,28 @@ class Billing {
|
|
|
480
560
|
* @throws {@link Schematic.BadRequestError}
|
|
481
561
|
* @throws {@link Schematic.UnauthorizedError}
|
|
482
562
|
* @throws {@link Schematic.ForbiddenError}
|
|
563
|
+
* @throws {@link Schematic.NotFoundError}
|
|
483
564
|
* @throws {@link Schematic.InternalServerError}
|
|
484
565
|
*
|
|
485
566
|
* @example
|
|
486
567
|
* await client.billing.countCustomers()
|
|
487
568
|
*/
|
|
488
|
-
countCustomers() {
|
|
569
|
+
countCustomers(request = {}, requestOptions) {
|
|
570
|
+
return core.HttpResponsePromise.fromPromise(this.__countCustomers(request, requestOptions));
|
|
571
|
+
}
|
|
572
|
+
__countCustomers() {
|
|
489
573
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
490
574
|
var _a, _b, _c;
|
|
491
|
-
const { name, failedToImport, q, limit, offset } = request;
|
|
575
|
+
const { companyIds, name, failedToImport, q, limit, offset } = request;
|
|
492
576
|
const _queryParams = {};
|
|
577
|
+
if (companyIds != null) {
|
|
578
|
+
if (Array.isArray(companyIds)) {
|
|
579
|
+
_queryParams["company_ids"] = companyIds.map((item) => item);
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
_queryParams["company_ids"] = companyIds;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
493
585
|
if (name != null) {
|
|
494
586
|
_queryParams["name"] = name;
|
|
495
587
|
}
|
|
@@ -508,7 +600,7 @@ class Billing {
|
|
|
508
600
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
509
601
|
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, "billing/customers/count"),
|
|
510
602
|
method: "GET",
|
|
511
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
603
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
512
604
|
contentType: "application/json",
|
|
513
605
|
queryParameters: _queryParams,
|
|
514
606
|
requestType: "json",
|
|
@@ -517,13 +609,16 @@ class Billing {
|
|
|
517
609
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
518
610
|
});
|
|
519
611
|
if (_response.ok) {
|
|
520
|
-
return
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
612
|
+
return {
|
|
613
|
+
data: serializers.CountCustomersResponse.parseOrThrow(_response.body, {
|
|
614
|
+
unrecognizedObjectKeys: "passthrough",
|
|
615
|
+
allowUnrecognizedUnionMembers: true,
|
|
616
|
+
allowUnrecognizedEnumValues: true,
|
|
617
|
+
skipValidation: true,
|
|
618
|
+
breadcrumbsPrefix: ["response"],
|
|
619
|
+
}),
|
|
620
|
+
rawResponse: _response.rawResponse,
|
|
621
|
+
};
|
|
527
622
|
}
|
|
528
623
|
if (_response.error.reason === "status-code") {
|
|
529
624
|
switch (_response.error.statusCode) {
|
|
@@ -534,7 +629,7 @@ class Billing {
|
|
|
534
629
|
allowUnrecognizedEnumValues: true,
|
|
535
630
|
skipValidation: true,
|
|
536
631
|
breadcrumbsPrefix: ["response"],
|
|
537
|
-
}));
|
|
632
|
+
}), _response.rawResponse);
|
|
538
633
|
case 401:
|
|
539
634
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
540
635
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -542,7 +637,7 @@ class Billing {
|
|
|
542
637
|
allowUnrecognizedEnumValues: true,
|
|
543
638
|
skipValidation: true,
|
|
544
639
|
breadcrumbsPrefix: ["response"],
|
|
545
|
-
}));
|
|
640
|
+
}), _response.rawResponse);
|
|
546
641
|
case 403:
|
|
547
642
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
548
643
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -550,7 +645,15 @@ class Billing {
|
|
|
550
645
|
allowUnrecognizedEnumValues: true,
|
|
551
646
|
skipValidation: true,
|
|
552
647
|
breadcrumbsPrefix: ["response"],
|
|
553
|
-
}));
|
|
648
|
+
}), _response.rawResponse);
|
|
649
|
+
case 404:
|
|
650
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
651
|
+
unrecognizedObjectKeys: "passthrough",
|
|
652
|
+
allowUnrecognizedUnionMembers: true,
|
|
653
|
+
allowUnrecognizedEnumValues: true,
|
|
654
|
+
skipValidation: true,
|
|
655
|
+
breadcrumbsPrefix: ["response"],
|
|
656
|
+
}), _response.rawResponse);
|
|
554
657
|
case 500:
|
|
555
658
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
556
659
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -558,11 +661,12 @@ class Billing {
|
|
|
558
661
|
allowUnrecognizedEnumValues: true,
|
|
559
662
|
skipValidation: true,
|
|
560
663
|
breadcrumbsPrefix: ["response"],
|
|
561
|
-
}));
|
|
664
|
+
}), _response.rawResponse);
|
|
562
665
|
default:
|
|
563
666
|
throw new errors.SchematicError({
|
|
564
667
|
statusCode: _response.error.statusCode,
|
|
565
668
|
body: _response.error.body,
|
|
669
|
+
rawResponse: _response.rawResponse,
|
|
566
670
|
});
|
|
567
671
|
}
|
|
568
672
|
}
|
|
@@ -571,12 +675,14 @@ class Billing {
|
|
|
571
675
|
throw new errors.SchematicError({
|
|
572
676
|
statusCode: _response.error.statusCode,
|
|
573
677
|
body: _response.error.rawBody,
|
|
678
|
+
rawResponse: _response.rawResponse,
|
|
574
679
|
});
|
|
575
680
|
case "timeout":
|
|
576
681
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/customers/count.");
|
|
577
682
|
case "unknown":
|
|
578
683
|
throw new errors.SchematicError({
|
|
579
684
|
message: _response.error.errorMessage,
|
|
685
|
+
rawResponse: _response.rawResponse,
|
|
580
686
|
});
|
|
581
687
|
}
|
|
582
688
|
});
|
|
@@ -588,6 +694,7 @@ class Billing {
|
|
|
588
694
|
* @throws {@link Schematic.BadRequestError}
|
|
589
695
|
* @throws {@link Schematic.UnauthorizedError}
|
|
590
696
|
* @throws {@link Schematic.ForbiddenError}
|
|
697
|
+
* @throws {@link Schematic.NotFoundError}
|
|
591
698
|
* @throws {@link Schematic.InternalServerError}
|
|
592
699
|
*
|
|
593
700
|
* @example
|
|
@@ -596,6 +703,9 @@ class Billing {
|
|
|
596
703
|
* })
|
|
597
704
|
*/
|
|
598
705
|
listInvoices(request, requestOptions) {
|
|
706
|
+
return core.HttpResponsePromise.fromPromise(this.__listInvoices(request, requestOptions));
|
|
707
|
+
}
|
|
708
|
+
__listInvoices(request, requestOptions) {
|
|
599
709
|
return __awaiter(this, void 0, void 0, function* () {
|
|
600
710
|
var _a, _b, _c;
|
|
601
711
|
const { companyId, customerExternalId, subscriptionExternalId, limit, offset } = request;
|
|
@@ -616,7 +726,7 @@ class Billing {
|
|
|
616
726
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
617
727
|
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, "billing/invoices"),
|
|
618
728
|
method: "GET",
|
|
619
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
729
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
620
730
|
contentType: "application/json",
|
|
621
731
|
queryParameters: _queryParams,
|
|
622
732
|
requestType: "json",
|
|
@@ -625,13 +735,16 @@ class Billing {
|
|
|
625
735
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
626
736
|
});
|
|
627
737
|
if (_response.ok) {
|
|
628
|
-
return
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
738
|
+
return {
|
|
739
|
+
data: serializers.ListInvoicesResponse.parseOrThrow(_response.body, {
|
|
740
|
+
unrecognizedObjectKeys: "passthrough",
|
|
741
|
+
allowUnrecognizedUnionMembers: true,
|
|
742
|
+
allowUnrecognizedEnumValues: true,
|
|
743
|
+
skipValidation: true,
|
|
744
|
+
breadcrumbsPrefix: ["response"],
|
|
745
|
+
}),
|
|
746
|
+
rawResponse: _response.rawResponse,
|
|
747
|
+
};
|
|
635
748
|
}
|
|
636
749
|
if (_response.error.reason === "status-code") {
|
|
637
750
|
switch (_response.error.statusCode) {
|
|
@@ -642,7 +755,7 @@ class Billing {
|
|
|
642
755
|
allowUnrecognizedEnumValues: true,
|
|
643
756
|
skipValidation: true,
|
|
644
757
|
breadcrumbsPrefix: ["response"],
|
|
645
|
-
}));
|
|
758
|
+
}), _response.rawResponse);
|
|
646
759
|
case 401:
|
|
647
760
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
648
761
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -650,7 +763,7 @@ class Billing {
|
|
|
650
763
|
allowUnrecognizedEnumValues: true,
|
|
651
764
|
skipValidation: true,
|
|
652
765
|
breadcrumbsPrefix: ["response"],
|
|
653
|
-
}));
|
|
766
|
+
}), _response.rawResponse);
|
|
654
767
|
case 403:
|
|
655
768
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
656
769
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -658,7 +771,15 @@ class Billing {
|
|
|
658
771
|
allowUnrecognizedEnumValues: true,
|
|
659
772
|
skipValidation: true,
|
|
660
773
|
breadcrumbsPrefix: ["response"],
|
|
661
|
-
}));
|
|
774
|
+
}), _response.rawResponse);
|
|
775
|
+
case 404:
|
|
776
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
777
|
+
unrecognizedObjectKeys: "passthrough",
|
|
778
|
+
allowUnrecognizedUnionMembers: true,
|
|
779
|
+
allowUnrecognizedEnumValues: true,
|
|
780
|
+
skipValidation: true,
|
|
781
|
+
breadcrumbsPrefix: ["response"],
|
|
782
|
+
}), _response.rawResponse);
|
|
662
783
|
case 500:
|
|
663
784
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
664
785
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -666,11 +787,12 @@ class Billing {
|
|
|
666
787
|
allowUnrecognizedEnumValues: true,
|
|
667
788
|
skipValidation: true,
|
|
668
789
|
breadcrumbsPrefix: ["response"],
|
|
669
|
-
}));
|
|
790
|
+
}), _response.rawResponse);
|
|
670
791
|
default:
|
|
671
792
|
throw new errors.SchematicError({
|
|
672
793
|
statusCode: _response.error.statusCode,
|
|
673
794
|
body: _response.error.body,
|
|
795
|
+
rawResponse: _response.rawResponse,
|
|
674
796
|
});
|
|
675
797
|
}
|
|
676
798
|
}
|
|
@@ -679,12 +801,14 @@ class Billing {
|
|
|
679
801
|
throw new errors.SchematicError({
|
|
680
802
|
statusCode: _response.error.statusCode,
|
|
681
803
|
body: _response.error.rawBody,
|
|
804
|
+
rawResponse: _response.rawResponse,
|
|
682
805
|
});
|
|
683
806
|
case "timeout":
|
|
684
807
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/invoices.");
|
|
685
808
|
case "unknown":
|
|
686
809
|
throw new errors.SchematicError({
|
|
687
810
|
message: _response.error.errorMessage,
|
|
811
|
+
rawResponse: _response.rawResponse,
|
|
688
812
|
});
|
|
689
813
|
}
|
|
690
814
|
});
|
|
@@ -696,6 +820,7 @@ class Billing {
|
|
|
696
820
|
* @throws {@link Schematic.BadRequestError}
|
|
697
821
|
* @throws {@link Schematic.UnauthorizedError}
|
|
698
822
|
* @throws {@link Schematic.ForbiddenError}
|
|
823
|
+
* @throws {@link Schematic.NotFoundError}
|
|
699
824
|
* @throws {@link Schematic.InternalServerError}
|
|
700
825
|
*
|
|
701
826
|
* @example
|
|
@@ -710,12 +835,15 @@ class Billing {
|
|
|
710
835
|
* })
|
|
711
836
|
*/
|
|
712
837
|
upsertInvoice(request, requestOptions) {
|
|
838
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertInvoice(request, requestOptions));
|
|
839
|
+
}
|
|
840
|
+
__upsertInvoice(request, requestOptions) {
|
|
713
841
|
return __awaiter(this, void 0, void 0, function* () {
|
|
714
842
|
var _a, _b, _c;
|
|
715
843
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
716
844
|
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, "billing/invoices"),
|
|
717
845
|
method: "POST",
|
|
718
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
846
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
719
847
|
contentType: "application/json",
|
|
720
848
|
requestType: "json",
|
|
721
849
|
body: serializers.CreateInvoiceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -724,13 +852,16 @@ class Billing {
|
|
|
724
852
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
725
853
|
});
|
|
726
854
|
if (_response.ok) {
|
|
727
|
-
return
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
855
|
+
return {
|
|
856
|
+
data: serializers.UpsertInvoiceResponse.parseOrThrow(_response.body, {
|
|
857
|
+
unrecognizedObjectKeys: "passthrough",
|
|
858
|
+
allowUnrecognizedUnionMembers: true,
|
|
859
|
+
allowUnrecognizedEnumValues: true,
|
|
860
|
+
skipValidation: true,
|
|
861
|
+
breadcrumbsPrefix: ["response"],
|
|
862
|
+
}),
|
|
863
|
+
rawResponse: _response.rawResponse,
|
|
864
|
+
};
|
|
734
865
|
}
|
|
735
866
|
if (_response.error.reason === "status-code") {
|
|
736
867
|
switch (_response.error.statusCode) {
|
|
@@ -741,7 +872,7 @@ class Billing {
|
|
|
741
872
|
allowUnrecognizedEnumValues: true,
|
|
742
873
|
skipValidation: true,
|
|
743
874
|
breadcrumbsPrefix: ["response"],
|
|
744
|
-
}));
|
|
875
|
+
}), _response.rawResponse);
|
|
745
876
|
case 401:
|
|
746
877
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
747
878
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -749,7 +880,7 @@ class Billing {
|
|
|
749
880
|
allowUnrecognizedEnumValues: true,
|
|
750
881
|
skipValidation: true,
|
|
751
882
|
breadcrumbsPrefix: ["response"],
|
|
752
|
-
}));
|
|
883
|
+
}), _response.rawResponse);
|
|
753
884
|
case 403:
|
|
754
885
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
755
886
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -757,7 +888,15 @@ class Billing {
|
|
|
757
888
|
allowUnrecognizedEnumValues: true,
|
|
758
889
|
skipValidation: true,
|
|
759
890
|
breadcrumbsPrefix: ["response"],
|
|
760
|
-
}));
|
|
891
|
+
}), _response.rawResponse);
|
|
892
|
+
case 404:
|
|
893
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
894
|
+
unrecognizedObjectKeys: "passthrough",
|
|
895
|
+
allowUnrecognizedUnionMembers: true,
|
|
896
|
+
allowUnrecognizedEnumValues: true,
|
|
897
|
+
skipValidation: true,
|
|
898
|
+
breadcrumbsPrefix: ["response"],
|
|
899
|
+
}), _response.rawResponse);
|
|
761
900
|
case 500:
|
|
762
901
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
763
902
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -765,11 +904,12 @@ class Billing {
|
|
|
765
904
|
allowUnrecognizedEnumValues: true,
|
|
766
905
|
skipValidation: true,
|
|
767
906
|
breadcrumbsPrefix: ["response"],
|
|
768
|
-
}));
|
|
907
|
+
}), _response.rawResponse);
|
|
769
908
|
default:
|
|
770
909
|
throw new errors.SchematicError({
|
|
771
910
|
statusCode: _response.error.statusCode,
|
|
772
911
|
body: _response.error.body,
|
|
912
|
+
rawResponse: _response.rawResponse,
|
|
773
913
|
});
|
|
774
914
|
}
|
|
775
915
|
}
|
|
@@ -778,12 +918,14 @@ class Billing {
|
|
|
778
918
|
throw new errors.SchematicError({
|
|
779
919
|
statusCode: _response.error.statusCode,
|
|
780
920
|
body: _response.error.rawBody,
|
|
921
|
+
rawResponse: _response.rawResponse,
|
|
781
922
|
});
|
|
782
923
|
case "timeout":
|
|
783
924
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/invoices.");
|
|
784
925
|
case "unknown":
|
|
785
926
|
throw new errors.SchematicError({
|
|
786
927
|
message: _response.error.errorMessage,
|
|
928
|
+
rawResponse: _response.rawResponse,
|
|
787
929
|
});
|
|
788
930
|
}
|
|
789
931
|
});
|
|
@@ -795,12 +937,16 @@ class Billing {
|
|
|
795
937
|
* @throws {@link Schematic.BadRequestError}
|
|
796
938
|
* @throws {@link Schematic.UnauthorizedError}
|
|
797
939
|
* @throws {@link Schematic.ForbiddenError}
|
|
940
|
+
* @throws {@link Schematic.NotFoundError}
|
|
798
941
|
* @throws {@link Schematic.InternalServerError}
|
|
799
942
|
*
|
|
800
943
|
* @example
|
|
801
944
|
* await client.billing.listMeters()
|
|
802
945
|
*/
|
|
803
|
-
listMeters() {
|
|
946
|
+
listMeters(request = {}, requestOptions) {
|
|
947
|
+
return core.HttpResponsePromise.fromPromise(this.__listMeters(request, requestOptions));
|
|
948
|
+
}
|
|
949
|
+
__listMeters() {
|
|
804
950
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
805
951
|
var _a, _b, _c;
|
|
806
952
|
const { displayName, limit, offset } = request;
|
|
@@ -817,7 +963,7 @@ class Billing {
|
|
|
817
963
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
818
964
|
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, "billing/meter"),
|
|
819
965
|
method: "GET",
|
|
820
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
966
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
821
967
|
contentType: "application/json",
|
|
822
968
|
queryParameters: _queryParams,
|
|
823
969
|
requestType: "json",
|
|
@@ -826,13 +972,16 @@ class Billing {
|
|
|
826
972
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
827
973
|
});
|
|
828
974
|
if (_response.ok) {
|
|
829
|
-
return
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
975
|
+
return {
|
|
976
|
+
data: serializers.ListMetersResponse.parseOrThrow(_response.body, {
|
|
977
|
+
unrecognizedObjectKeys: "passthrough",
|
|
978
|
+
allowUnrecognizedUnionMembers: true,
|
|
979
|
+
allowUnrecognizedEnumValues: true,
|
|
980
|
+
skipValidation: true,
|
|
981
|
+
breadcrumbsPrefix: ["response"],
|
|
982
|
+
}),
|
|
983
|
+
rawResponse: _response.rawResponse,
|
|
984
|
+
};
|
|
836
985
|
}
|
|
837
986
|
if (_response.error.reason === "status-code") {
|
|
838
987
|
switch (_response.error.statusCode) {
|
|
@@ -843,7 +992,7 @@ class Billing {
|
|
|
843
992
|
allowUnrecognizedEnumValues: true,
|
|
844
993
|
skipValidation: true,
|
|
845
994
|
breadcrumbsPrefix: ["response"],
|
|
846
|
-
}));
|
|
995
|
+
}), _response.rawResponse);
|
|
847
996
|
case 401:
|
|
848
997
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
849
998
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -851,7 +1000,7 @@ class Billing {
|
|
|
851
1000
|
allowUnrecognizedEnumValues: true,
|
|
852
1001
|
skipValidation: true,
|
|
853
1002
|
breadcrumbsPrefix: ["response"],
|
|
854
|
-
}));
|
|
1003
|
+
}), _response.rawResponse);
|
|
855
1004
|
case 403:
|
|
856
1005
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
857
1006
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -859,7 +1008,15 @@ class Billing {
|
|
|
859
1008
|
allowUnrecognizedEnumValues: true,
|
|
860
1009
|
skipValidation: true,
|
|
861
1010
|
breadcrumbsPrefix: ["response"],
|
|
862
|
-
}));
|
|
1011
|
+
}), _response.rawResponse);
|
|
1012
|
+
case 404:
|
|
1013
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1014
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1015
|
+
allowUnrecognizedUnionMembers: true,
|
|
1016
|
+
allowUnrecognizedEnumValues: true,
|
|
1017
|
+
skipValidation: true,
|
|
1018
|
+
breadcrumbsPrefix: ["response"],
|
|
1019
|
+
}), _response.rawResponse);
|
|
863
1020
|
case 500:
|
|
864
1021
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
865
1022
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -867,11 +1024,12 @@ class Billing {
|
|
|
867
1024
|
allowUnrecognizedEnumValues: true,
|
|
868
1025
|
skipValidation: true,
|
|
869
1026
|
breadcrumbsPrefix: ["response"],
|
|
870
|
-
}));
|
|
1027
|
+
}), _response.rawResponse);
|
|
871
1028
|
default:
|
|
872
1029
|
throw new errors.SchematicError({
|
|
873
1030
|
statusCode: _response.error.statusCode,
|
|
874
1031
|
body: _response.error.body,
|
|
1032
|
+
rawResponse: _response.rawResponse,
|
|
875
1033
|
});
|
|
876
1034
|
}
|
|
877
1035
|
}
|
|
@@ -880,12 +1038,14 @@ class Billing {
|
|
|
880
1038
|
throw new errors.SchematicError({
|
|
881
1039
|
statusCode: _response.error.statusCode,
|
|
882
1040
|
body: _response.error.rawBody,
|
|
1041
|
+
rawResponse: _response.rawResponse,
|
|
883
1042
|
});
|
|
884
1043
|
case "timeout":
|
|
885
1044
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/meter.");
|
|
886
1045
|
case "unknown":
|
|
887
1046
|
throw new errors.SchematicError({
|
|
888
1047
|
message: _response.error.errorMessage,
|
|
1048
|
+
rawResponse: _response.rawResponse,
|
|
889
1049
|
});
|
|
890
1050
|
}
|
|
891
1051
|
});
|
|
@@ -897,6 +1057,7 @@ class Billing {
|
|
|
897
1057
|
* @throws {@link Schematic.BadRequestError}
|
|
898
1058
|
* @throws {@link Schematic.UnauthorizedError}
|
|
899
1059
|
* @throws {@link Schematic.ForbiddenError}
|
|
1060
|
+
* @throws {@link Schematic.NotFoundError}
|
|
900
1061
|
* @throws {@link Schematic.InternalServerError}
|
|
901
1062
|
*
|
|
902
1063
|
* @example
|
|
@@ -908,12 +1069,15 @@ class Billing {
|
|
|
908
1069
|
* })
|
|
909
1070
|
*/
|
|
910
1071
|
upsertBillingMeter(request, requestOptions) {
|
|
1072
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingMeter(request, requestOptions));
|
|
1073
|
+
}
|
|
1074
|
+
__upsertBillingMeter(request, requestOptions) {
|
|
911
1075
|
return __awaiter(this, void 0, void 0, function* () {
|
|
912
1076
|
var _a, _b, _c;
|
|
913
1077
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
914
1078
|
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, "billing/meter/upsert"),
|
|
915
1079
|
method: "POST",
|
|
916
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1080
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
917
1081
|
contentType: "application/json",
|
|
918
1082
|
requestType: "json",
|
|
919
1083
|
body: serializers.CreateMeterRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -922,13 +1086,16 @@ class Billing {
|
|
|
922
1086
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
923
1087
|
});
|
|
924
1088
|
if (_response.ok) {
|
|
925
|
-
return
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
1089
|
+
return {
|
|
1090
|
+
data: serializers.UpsertBillingMeterResponse.parseOrThrow(_response.body, {
|
|
1091
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1092
|
+
allowUnrecognizedUnionMembers: true,
|
|
1093
|
+
allowUnrecognizedEnumValues: true,
|
|
1094
|
+
skipValidation: true,
|
|
1095
|
+
breadcrumbsPrefix: ["response"],
|
|
1096
|
+
}),
|
|
1097
|
+
rawResponse: _response.rawResponse,
|
|
1098
|
+
};
|
|
932
1099
|
}
|
|
933
1100
|
if (_response.error.reason === "status-code") {
|
|
934
1101
|
switch (_response.error.statusCode) {
|
|
@@ -939,7 +1106,7 @@ class Billing {
|
|
|
939
1106
|
allowUnrecognizedEnumValues: true,
|
|
940
1107
|
skipValidation: true,
|
|
941
1108
|
breadcrumbsPrefix: ["response"],
|
|
942
|
-
}));
|
|
1109
|
+
}), _response.rawResponse);
|
|
943
1110
|
case 401:
|
|
944
1111
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
945
1112
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -947,7 +1114,7 @@ class Billing {
|
|
|
947
1114
|
allowUnrecognizedEnumValues: true,
|
|
948
1115
|
skipValidation: true,
|
|
949
1116
|
breadcrumbsPrefix: ["response"],
|
|
950
|
-
}));
|
|
1117
|
+
}), _response.rawResponse);
|
|
951
1118
|
case 403:
|
|
952
1119
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
953
1120
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -955,7 +1122,15 @@ class Billing {
|
|
|
955
1122
|
allowUnrecognizedEnumValues: true,
|
|
956
1123
|
skipValidation: true,
|
|
957
1124
|
breadcrumbsPrefix: ["response"],
|
|
958
|
-
}));
|
|
1125
|
+
}), _response.rawResponse);
|
|
1126
|
+
case 404:
|
|
1127
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1128
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1129
|
+
allowUnrecognizedUnionMembers: true,
|
|
1130
|
+
allowUnrecognizedEnumValues: true,
|
|
1131
|
+
skipValidation: true,
|
|
1132
|
+
breadcrumbsPrefix: ["response"],
|
|
1133
|
+
}), _response.rawResponse);
|
|
959
1134
|
case 500:
|
|
960
1135
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
961
1136
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -963,11 +1138,12 @@ class Billing {
|
|
|
963
1138
|
allowUnrecognizedEnumValues: true,
|
|
964
1139
|
skipValidation: true,
|
|
965
1140
|
breadcrumbsPrefix: ["response"],
|
|
966
|
-
}));
|
|
1141
|
+
}), _response.rawResponse);
|
|
967
1142
|
default:
|
|
968
1143
|
throw new errors.SchematicError({
|
|
969
1144
|
statusCode: _response.error.statusCode,
|
|
970
1145
|
body: _response.error.body,
|
|
1146
|
+
rawResponse: _response.rawResponse,
|
|
971
1147
|
});
|
|
972
1148
|
}
|
|
973
1149
|
}
|
|
@@ -976,12 +1152,14 @@ class Billing {
|
|
|
976
1152
|
throw new errors.SchematicError({
|
|
977
1153
|
statusCode: _response.error.statusCode,
|
|
978
1154
|
body: _response.error.rawBody,
|
|
1155
|
+
rawResponse: _response.rawResponse,
|
|
979
1156
|
});
|
|
980
1157
|
case "timeout":
|
|
981
1158
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/meter/upsert.");
|
|
982
1159
|
case "unknown":
|
|
983
1160
|
throw new errors.SchematicError({
|
|
984
1161
|
message: _response.error.errorMessage,
|
|
1162
|
+
rawResponse: _response.rawResponse,
|
|
985
1163
|
});
|
|
986
1164
|
}
|
|
987
1165
|
});
|
|
@@ -993,6 +1171,7 @@ class Billing {
|
|
|
993
1171
|
* @throws {@link Schematic.BadRequestError}
|
|
994
1172
|
* @throws {@link Schematic.UnauthorizedError}
|
|
995
1173
|
* @throws {@link Schematic.ForbiddenError}
|
|
1174
|
+
* @throws {@link Schematic.NotFoundError}
|
|
996
1175
|
* @throws {@link Schematic.InternalServerError}
|
|
997
1176
|
*
|
|
998
1177
|
* @example
|
|
@@ -1001,6 +1180,9 @@ class Billing {
|
|
|
1001
1180
|
* })
|
|
1002
1181
|
*/
|
|
1003
1182
|
listPaymentMethods(request, requestOptions) {
|
|
1183
|
+
return core.HttpResponsePromise.fromPromise(this.__listPaymentMethods(request, requestOptions));
|
|
1184
|
+
}
|
|
1185
|
+
__listPaymentMethods(request, requestOptions) {
|
|
1004
1186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1005
1187
|
var _a, _b, _c;
|
|
1006
1188
|
const { companyId, customerExternalId, limit, offset } = request;
|
|
@@ -1018,7 +1200,7 @@ class Billing {
|
|
|
1018
1200
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1019
1201
|
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, "billing/payment-methods"),
|
|
1020
1202
|
method: "GET",
|
|
1021
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1203
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1022
1204
|
contentType: "application/json",
|
|
1023
1205
|
queryParameters: _queryParams,
|
|
1024
1206
|
requestType: "json",
|
|
@@ -1027,13 +1209,16 @@ class Billing {
|
|
|
1027
1209
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1028
1210
|
});
|
|
1029
1211
|
if (_response.ok) {
|
|
1030
|
-
return
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1212
|
+
return {
|
|
1213
|
+
data: serializers.ListPaymentMethodsResponse.parseOrThrow(_response.body, {
|
|
1214
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1215
|
+
allowUnrecognizedUnionMembers: true,
|
|
1216
|
+
allowUnrecognizedEnumValues: true,
|
|
1217
|
+
skipValidation: true,
|
|
1218
|
+
breadcrumbsPrefix: ["response"],
|
|
1219
|
+
}),
|
|
1220
|
+
rawResponse: _response.rawResponse,
|
|
1221
|
+
};
|
|
1037
1222
|
}
|
|
1038
1223
|
if (_response.error.reason === "status-code") {
|
|
1039
1224
|
switch (_response.error.statusCode) {
|
|
@@ -1044,7 +1229,7 @@ class Billing {
|
|
|
1044
1229
|
allowUnrecognizedEnumValues: true,
|
|
1045
1230
|
skipValidation: true,
|
|
1046
1231
|
breadcrumbsPrefix: ["response"],
|
|
1047
|
-
}));
|
|
1232
|
+
}), _response.rawResponse);
|
|
1048
1233
|
case 401:
|
|
1049
1234
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1050
1235
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1052,7 +1237,7 @@ class Billing {
|
|
|
1052
1237
|
allowUnrecognizedEnumValues: true,
|
|
1053
1238
|
skipValidation: true,
|
|
1054
1239
|
breadcrumbsPrefix: ["response"],
|
|
1055
|
-
}));
|
|
1240
|
+
}), _response.rawResponse);
|
|
1056
1241
|
case 403:
|
|
1057
1242
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1058
1243
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1060,7 +1245,15 @@ class Billing {
|
|
|
1060
1245
|
allowUnrecognizedEnumValues: true,
|
|
1061
1246
|
skipValidation: true,
|
|
1062
1247
|
breadcrumbsPrefix: ["response"],
|
|
1063
|
-
}));
|
|
1248
|
+
}), _response.rawResponse);
|
|
1249
|
+
case 404:
|
|
1250
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1251
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1252
|
+
allowUnrecognizedUnionMembers: true,
|
|
1253
|
+
allowUnrecognizedEnumValues: true,
|
|
1254
|
+
skipValidation: true,
|
|
1255
|
+
breadcrumbsPrefix: ["response"],
|
|
1256
|
+
}), _response.rawResponse);
|
|
1064
1257
|
case 500:
|
|
1065
1258
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1066
1259
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1068,11 +1261,12 @@ class Billing {
|
|
|
1068
1261
|
allowUnrecognizedEnumValues: true,
|
|
1069
1262
|
skipValidation: true,
|
|
1070
1263
|
breadcrumbsPrefix: ["response"],
|
|
1071
|
-
}));
|
|
1264
|
+
}), _response.rawResponse);
|
|
1072
1265
|
default:
|
|
1073
1266
|
throw new errors.SchematicError({
|
|
1074
1267
|
statusCode: _response.error.statusCode,
|
|
1075
1268
|
body: _response.error.body,
|
|
1269
|
+
rawResponse: _response.rawResponse,
|
|
1076
1270
|
});
|
|
1077
1271
|
}
|
|
1078
1272
|
}
|
|
@@ -1081,12 +1275,14 @@ class Billing {
|
|
|
1081
1275
|
throw new errors.SchematicError({
|
|
1082
1276
|
statusCode: _response.error.statusCode,
|
|
1083
1277
|
body: _response.error.rawBody,
|
|
1278
|
+
rawResponse: _response.rawResponse,
|
|
1084
1279
|
});
|
|
1085
1280
|
case "timeout":
|
|
1086
1281
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/payment-methods.");
|
|
1087
1282
|
case "unknown":
|
|
1088
1283
|
throw new errors.SchematicError({
|
|
1089
1284
|
message: _response.error.errorMessage,
|
|
1285
|
+
rawResponse: _response.rawResponse,
|
|
1090
1286
|
});
|
|
1091
1287
|
}
|
|
1092
1288
|
});
|
|
@@ -1098,6 +1294,7 @@ class Billing {
|
|
|
1098
1294
|
* @throws {@link Schematic.BadRequestError}
|
|
1099
1295
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1100
1296
|
* @throws {@link Schematic.ForbiddenError}
|
|
1297
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1101
1298
|
* @throws {@link Schematic.InternalServerError}
|
|
1102
1299
|
*
|
|
1103
1300
|
* @example
|
|
@@ -1108,12 +1305,15 @@ class Billing {
|
|
|
1108
1305
|
* })
|
|
1109
1306
|
*/
|
|
1110
1307
|
upsertPaymentMethod(request, requestOptions) {
|
|
1308
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertPaymentMethod(request, requestOptions));
|
|
1309
|
+
}
|
|
1310
|
+
__upsertPaymentMethod(request, requestOptions) {
|
|
1111
1311
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1112
1312
|
var _a, _b, _c;
|
|
1113
1313
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1114
1314
|
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, "billing/payment-methods"),
|
|
1115
1315
|
method: "POST",
|
|
1116
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1316
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1117
1317
|
contentType: "application/json",
|
|
1118
1318
|
requestType: "json",
|
|
1119
1319
|
body: serializers.CreatePaymentMethodRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1122,13 +1322,16 @@ class Billing {
|
|
|
1122
1322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1123
1323
|
});
|
|
1124
1324
|
if (_response.ok) {
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1325
|
+
return {
|
|
1326
|
+
data: serializers.UpsertPaymentMethodResponse.parseOrThrow(_response.body, {
|
|
1327
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1328
|
+
allowUnrecognizedUnionMembers: true,
|
|
1329
|
+
allowUnrecognizedEnumValues: true,
|
|
1330
|
+
skipValidation: true,
|
|
1331
|
+
breadcrumbsPrefix: ["response"],
|
|
1332
|
+
}),
|
|
1333
|
+
rawResponse: _response.rawResponse,
|
|
1334
|
+
};
|
|
1132
1335
|
}
|
|
1133
1336
|
if (_response.error.reason === "status-code") {
|
|
1134
1337
|
switch (_response.error.statusCode) {
|
|
@@ -1139,7 +1342,7 @@ class Billing {
|
|
|
1139
1342
|
allowUnrecognizedEnumValues: true,
|
|
1140
1343
|
skipValidation: true,
|
|
1141
1344
|
breadcrumbsPrefix: ["response"],
|
|
1142
|
-
}));
|
|
1345
|
+
}), _response.rawResponse);
|
|
1143
1346
|
case 401:
|
|
1144
1347
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1145
1348
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1147,7 +1350,7 @@ class Billing {
|
|
|
1147
1350
|
allowUnrecognizedEnumValues: true,
|
|
1148
1351
|
skipValidation: true,
|
|
1149
1352
|
breadcrumbsPrefix: ["response"],
|
|
1150
|
-
}));
|
|
1353
|
+
}), _response.rawResponse);
|
|
1151
1354
|
case 403:
|
|
1152
1355
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1153
1356
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1155,7 +1358,15 @@ class Billing {
|
|
|
1155
1358
|
allowUnrecognizedEnumValues: true,
|
|
1156
1359
|
skipValidation: true,
|
|
1157
1360
|
breadcrumbsPrefix: ["response"],
|
|
1158
|
-
}));
|
|
1361
|
+
}), _response.rawResponse);
|
|
1362
|
+
case 404:
|
|
1363
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1364
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1365
|
+
allowUnrecognizedUnionMembers: true,
|
|
1366
|
+
allowUnrecognizedEnumValues: true,
|
|
1367
|
+
skipValidation: true,
|
|
1368
|
+
breadcrumbsPrefix: ["response"],
|
|
1369
|
+
}), _response.rawResponse);
|
|
1159
1370
|
case 500:
|
|
1160
1371
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1161
1372
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1163,11 +1374,12 @@ class Billing {
|
|
|
1163
1374
|
allowUnrecognizedEnumValues: true,
|
|
1164
1375
|
skipValidation: true,
|
|
1165
1376
|
breadcrumbsPrefix: ["response"],
|
|
1166
|
-
}));
|
|
1377
|
+
}), _response.rawResponse);
|
|
1167
1378
|
default:
|
|
1168
1379
|
throw new errors.SchematicError({
|
|
1169
1380
|
statusCode: _response.error.statusCode,
|
|
1170
1381
|
body: _response.error.body,
|
|
1382
|
+
rawResponse: _response.rawResponse,
|
|
1171
1383
|
});
|
|
1172
1384
|
}
|
|
1173
1385
|
}
|
|
@@ -1176,12 +1388,14 @@ class Billing {
|
|
|
1176
1388
|
throw new errors.SchematicError({
|
|
1177
1389
|
statusCode: _response.error.statusCode,
|
|
1178
1390
|
body: _response.error.rawBody,
|
|
1391
|
+
rawResponse: _response.rawResponse,
|
|
1179
1392
|
});
|
|
1180
1393
|
case "timeout":
|
|
1181
1394
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/payment-methods.");
|
|
1182
1395
|
case "unknown":
|
|
1183
1396
|
throw new errors.SchematicError({
|
|
1184
1397
|
message: _response.error.errorMessage,
|
|
1398
|
+
rawResponse: _response.rawResponse,
|
|
1185
1399
|
});
|
|
1186
1400
|
}
|
|
1187
1401
|
});
|
|
@@ -1193,15 +1407,19 @@ class Billing {
|
|
|
1193
1407
|
* @throws {@link Schematic.BadRequestError}
|
|
1194
1408
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1195
1409
|
* @throws {@link Schematic.ForbiddenError}
|
|
1410
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1196
1411
|
* @throws {@link Schematic.InternalServerError}
|
|
1197
1412
|
*
|
|
1198
1413
|
* @example
|
|
1199
1414
|
* await client.billing.searchBillingPrices()
|
|
1200
1415
|
*/
|
|
1201
|
-
searchBillingPrices() {
|
|
1416
|
+
searchBillingPrices(request = {}, requestOptions) {
|
|
1417
|
+
return core.HttpResponsePromise.fromPromise(this.__searchBillingPrices(request, requestOptions));
|
|
1418
|
+
}
|
|
1419
|
+
__searchBillingPrices() {
|
|
1202
1420
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1203
1421
|
var _a, _b, _c;
|
|
1204
|
-
const { ids, q, interval, usageType, price, limit, offset } = request;
|
|
1422
|
+
const { ids, q, interval, usageType, price, tiersMode, limit, offset } = request;
|
|
1205
1423
|
const _queryParams = {};
|
|
1206
1424
|
if (ids != null) {
|
|
1207
1425
|
if (Array.isArray(ids)) {
|
|
@@ -1225,6 +1443,11 @@ class Billing {
|
|
|
1225
1443
|
if (price != null) {
|
|
1226
1444
|
_queryParams["price"] = price.toString();
|
|
1227
1445
|
}
|
|
1446
|
+
if (tiersMode != null) {
|
|
1447
|
+
_queryParams["tiers_mode"] = serializers.SearchBillingPricesRequestTiersMode.jsonOrThrow(tiersMode, {
|
|
1448
|
+
unrecognizedObjectKeys: "strip",
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1228
1451
|
if (limit != null) {
|
|
1229
1452
|
_queryParams["limit"] = limit.toString();
|
|
1230
1453
|
}
|
|
@@ -1234,7 +1457,7 @@ class Billing {
|
|
|
1234
1457
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1235
1458
|
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, "billing/price"),
|
|
1236
1459
|
method: "GET",
|
|
1237
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1460
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1238
1461
|
contentType: "application/json",
|
|
1239
1462
|
queryParameters: _queryParams,
|
|
1240
1463
|
requestType: "json",
|
|
@@ -1243,13 +1466,16 @@ class Billing {
|
|
|
1243
1466
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1244
1467
|
});
|
|
1245
1468
|
if (_response.ok) {
|
|
1246
|
-
return
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1469
|
+
return {
|
|
1470
|
+
data: serializers.SearchBillingPricesResponse.parseOrThrow(_response.body, {
|
|
1471
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1472
|
+
allowUnrecognizedUnionMembers: true,
|
|
1473
|
+
allowUnrecognizedEnumValues: true,
|
|
1474
|
+
skipValidation: true,
|
|
1475
|
+
breadcrumbsPrefix: ["response"],
|
|
1476
|
+
}),
|
|
1477
|
+
rawResponse: _response.rawResponse,
|
|
1478
|
+
};
|
|
1253
1479
|
}
|
|
1254
1480
|
if (_response.error.reason === "status-code") {
|
|
1255
1481
|
switch (_response.error.statusCode) {
|
|
@@ -1260,7 +1486,7 @@ class Billing {
|
|
|
1260
1486
|
allowUnrecognizedEnumValues: true,
|
|
1261
1487
|
skipValidation: true,
|
|
1262
1488
|
breadcrumbsPrefix: ["response"],
|
|
1263
|
-
}));
|
|
1489
|
+
}), _response.rawResponse);
|
|
1264
1490
|
case 401:
|
|
1265
1491
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1266
1492
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1268,7 +1494,7 @@ class Billing {
|
|
|
1268
1494
|
allowUnrecognizedEnumValues: true,
|
|
1269
1495
|
skipValidation: true,
|
|
1270
1496
|
breadcrumbsPrefix: ["response"],
|
|
1271
|
-
}));
|
|
1497
|
+
}), _response.rawResponse);
|
|
1272
1498
|
case 403:
|
|
1273
1499
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1274
1500
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1276,7 +1502,15 @@ class Billing {
|
|
|
1276
1502
|
allowUnrecognizedEnumValues: true,
|
|
1277
1503
|
skipValidation: true,
|
|
1278
1504
|
breadcrumbsPrefix: ["response"],
|
|
1279
|
-
}));
|
|
1505
|
+
}), _response.rawResponse);
|
|
1506
|
+
case 404:
|
|
1507
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1508
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1509
|
+
allowUnrecognizedUnionMembers: true,
|
|
1510
|
+
allowUnrecognizedEnumValues: true,
|
|
1511
|
+
skipValidation: true,
|
|
1512
|
+
breadcrumbsPrefix: ["response"],
|
|
1513
|
+
}), _response.rawResponse);
|
|
1280
1514
|
case 500:
|
|
1281
1515
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1282
1516
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1284,11 +1518,12 @@ class Billing {
|
|
|
1284
1518
|
allowUnrecognizedEnumValues: true,
|
|
1285
1519
|
skipValidation: true,
|
|
1286
1520
|
breadcrumbsPrefix: ["response"],
|
|
1287
|
-
}));
|
|
1521
|
+
}), _response.rawResponse);
|
|
1288
1522
|
default:
|
|
1289
1523
|
throw new errors.SchematicError({
|
|
1290
1524
|
statusCode: _response.error.statusCode,
|
|
1291
1525
|
body: _response.error.body,
|
|
1526
|
+
rawResponse: _response.rawResponse,
|
|
1292
1527
|
});
|
|
1293
1528
|
}
|
|
1294
1529
|
}
|
|
@@ -1297,12 +1532,14 @@ class Billing {
|
|
|
1297
1532
|
throw new errors.SchematicError({
|
|
1298
1533
|
statusCode: _response.error.statusCode,
|
|
1299
1534
|
body: _response.error.rawBody,
|
|
1535
|
+
rawResponse: _response.rawResponse,
|
|
1300
1536
|
});
|
|
1301
1537
|
case "timeout":
|
|
1302
1538
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/price.");
|
|
1303
1539
|
case "unknown":
|
|
1304
1540
|
throw new errors.SchematicError({
|
|
1305
1541
|
message: _response.error.errorMessage,
|
|
1542
|
+
rawResponse: _response.rawResponse,
|
|
1306
1543
|
});
|
|
1307
1544
|
}
|
|
1308
1545
|
});
|
|
@@ -1314,10 +1551,12 @@ class Billing {
|
|
|
1314
1551
|
* @throws {@link Schematic.BadRequestError}
|
|
1315
1552
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1316
1553
|
* @throws {@link Schematic.ForbiddenError}
|
|
1554
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1317
1555
|
* @throws {@link Schematic.InternalServerError}
|
|
1318
1556
|
*
|
|
1319
1557
|
* @example
|
|
1320
1558
|
* await client.billing.upsertBillingPrice({
|
|
1559
|
+
* billingScheme: "per_unit",
|
|
1321
1560
|
* currency: "currency",
|
|
1322
1561
|
* externalAccountId: "external_account_id",
|
|
1323
1562
|
* interval: "interval",
|
|
@@ -1332,12 +1571,15 @@ class Billing {
|
|
|
1332
1571
|
* })
|
|
1333
1572
|
*/
|
|
1334
1573
|
upsertBillingPrice(request, requestOptions) {
|
|
1574
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingPrice(request, requestOptions));
|
|
1575
|
+
}
|
|
1576
|
+
__upsertBillingPrice(request, requestOptions) {
|
|
1335
1577
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1336
1578
|
var _a, _b, _c;
|
|
1337
1579
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1338
1580
|
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, "billing/price/upsert"),
|
|
1339
1581
|
method: "POST",
|
|
1340
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1582
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1341
1583
|
contentType: "application/json",
|
|
1342
1584
|
requestType: "json",
|
|
1343
1585
|
body: serializers.CreateBillingPriceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1346,13 +1588,16 @@ class Billing {
|
|
|
1346
1588
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1347
1589
|
});
|
|
1348
1590
|
if (_response.ok) {
|
|
1349
|
-
return
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1591
|
+
return {
|
|
1592
|
+
data: serializers.UpsertBillingPriceResponse.parseOrThrow(_response.body, {
|
|
1593
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1594
|
+
allowUnrecognizedUnionMembers: true,
|
|
1595
|
+
allowUnrecognizedEnumValues: true,
|
|
1596
|
+
skipValidation: true,
|
|
1597
|
+
breadcrumbsPrefix: ["response"],
|
|
1598
|
+
}),
|
|
1599
|
+
rawResponse: _response.rawResponse,
|
|
1600
|
+
};
|
|
1356
1601
|
}
|
|
1357
1602
|
if (_response.error.reason === "status-code") {
|
|
1358
1603
|
switch (_response.error.statusCode) {
|
|
@@ -1363,7 +1608,7 @@ class Billing {
|
|
|
1363
1608
|
allowUnrecognizedEnumValues: true,
|
|
1364
1609
|
skipValidation: true,
|
|
1365
1610
|
breadcrumbsPrefix: ["response"],
|
|
1366
|
-
}));
|
|
1611
|
+
}), _response.rawResponse);
|
|
1367
1612
|
case 401:
|
|
1368
1613
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1369
1614
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1371,7 +1616,7 @@ class Billing {
|
|
|
1371
1616
|
allowUnrecognizedEnumValues: true,
|
|
1372
1617
|
skipValidation: true,
|
|
1373
1618
|
breadcrumbsPrefix: ["response"],
|
|
1374
|
-
}));
|
|
1619
|
+
}), _response.rawResponse);
|
|
1375
1620
|
case 403:
|
|
1376
1621
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1377
1622
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1379,7 +1624,15 @@ class Billing {
|
|
|
1379
1624
|
allowUnrecognizedEnumValues: true,
|
|
1380
1625
|
skipValidation: true,
|
|
1381
1626
|
breadcrumbsPrefix: ["response"],
|
|
1382
|
-
}));
|
|
1627
|
+
}), _response.rawResponse);
|
|
1628
|
+
case 404:
|
|
1629
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1630
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1631
|
+
allowUnrecognizedUnionMembers: true,
|
|
1632
|
+
allowUnrecognizedEnumValues: true,
|
|
1633
|
+
skipValidation: true,
|
|
1634
|
+
breadcrumbsPrefix: ["response"],
|
|
1635
|
+
}), _response.rawResponse);
|
|
1383
1636
|
case 500:
|
|
1384
1637
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1385
1638
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1387,11 +1640,12 @@ class Billing {
|
|
|
1387
1640
|
allowUnrecognizedEnumValues: true,
|
|
1388
1641
|
skipValidation: true,
|
|
1389
1642
|
breadcrumbsPrefix: ["response"],
|
|
1390
|
-
}));
|
|
1643
|
+
}), _response.rawResponse);
|
|
1391
1644
|
default:
|
|
1392
1645
|
throw new errors.SchematicError({
|
|
1393
1646
|
statusCode: _response.error.statusCode,
|
|
1394
1647
|
body: _response.error.body,
|
|
1648
|
+
rawResponse: _response.rawResponse,
|
|
1395
1649
|
});
|
|
1396
1650
|
}
|
|
1397
1651
|
}
|
|
@@ -1400,12 +1654,14 @@ class Billing {
|
|
|
1400
1654
|
throw new errors.SchematicError({
|
|
1401
1655
|
statusCode: _response.error.statusCode,
|
|
1402
1656
|
body: _response.error.rawBody,
|
|
1657
|
+
rawResponse: _response.rawResponse,
|
|
1403
1658
|
});
|
|
1404
1659
|
case "timeout":
|
|
1405
1660
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/price/upsert.");
|
|
1406
1661
|
case "unknown":
|
|
1407
1662
|
throw new errors.SchematicError({
|
|
1408
1663
|
message: _response.error.errorMessage,
|
|
1664
|
+
rawResponse: _response.rawResponse,
|
|
1409
1665
|
});
|
|
1410
1666
|
}
|
|
1411
1667
|
});
|
|
@@ -1417,18 +1673,22 @@ class Billing {
|
|
|
1417
1673
|
* @throws {@link Schematic.BadRequestError}
|
|
1418
1674
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1419
1675
|
* @throws {@link Schematic.ForbiddenError}
|
|
1676
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1420
1677
|
* @throws {@link Schematic.InternalServerError}
|
|
1421
1678
|
*
|
|
1422
1679
|
* @example
|
|
1423
1680
|
* await client.billing.deleteBillingProduct("billing_id")
|
|
1424
1681
|
*/
|
|
1425
1682
|
deleteBillingProduct(billingId, requestOptions) {
|
|
1683
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteBillingProduct(billingId, requestOptions));
|
|
1684
|
+
}
|
|
1685
|
+
__deleteBillingProduct(billingId, requestOptions) {
|
|
1426
1686
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1427
1687
|
var _a, _b, _c;
|
|
1428
1688
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1429
1689
|
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, `billing/product/${encodeURIComponent(billingId)}`),
|
|
1430
1690
|
method: "DELETE",
|
|
1431
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1691
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1432
1692
|
contentType: "application/json",
|
|
1433
1693
|
requestType: "json",
|
|
1434
1694
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1436,13 +1696,16 @@ class Billing {
|
|
|
1436
1696
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1437
1697
|
});
|
|
1438
1698
|
if (_response.ok) {
|
|
1439
|
-
return
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1699
|
+
return {
|
|
1700
|
+
data: serializers.DeleteBillingProductResponse.parseOrThrow(_response.body, {
|
|
1701
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1702
|
+
allowUnrecognizedUnionMembers: true,
|
|
1703
|
+
allowUnrecognizedEnumValues: true,
|
|
1704
|
+
skipValidation: true,
|
|
1705
|
+
breadcrumbsPrefix: ["response"],
|
|
1706
|
+
}),
|
|
1707
|
+
rawResponse: _response.rawResponse,
|
|
1708
|
+
};
|
|
1446
1709
|
}
|
|
1447
1710
|
if (_response.error.reason === "status-code") {
|
|
1448
1711
|
switch (_response.error.statusCode) {
|
|
@@ -1453,7 +1716,7 @@ class Billing {
|
|
|
1453
1716
|
allowUnrecognizedEnumValues: true,
|
|
1454
1717
|
skipValidation: true,
|
|
1455
1718
|
breadcrumbsPrefix: ["response"],
|
|
1456
|
-
}));
|
|
1719
|
+
}), _response.rawResponse);
|
|
1457
1720
|
case 401:
|
|
1458
1721
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1459
1722
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1461,7 +1724,7 @@ class Billing {
|
|
|
1461
1724
|
allowUnrecognizedEnumValues: true,
|
|
1462
1725
|
skipValidation: true,
|
|
1463
1726
|
breadcrumbsPrefix: ["response"],
|
|
1464
|
-
}));
|
|
1727
|
+
}), _response.rawResponse);
|
|
1465
1728
|
case 403:
|
|
1466
1729
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1467
1730
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1469,7 +1732,15 @@ class Billing {
|
|
|
1469
1732
|
allowUnrecognizedEnumValues: true,
|
|
1470
1733
|
skipValidation: true,
|
|
1471
1734
|
breadcrumbsPrefix: ["response"],
|
|
1472
|
-
}));
|
|
1735
|
+
}), _response.rawResponse);
|
|
1736
|
+
case 404:
|
|
1737
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1738
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1739
|
+
allowUnrecognizedUnionMembers: true,
|
|
1740
|
+
allowUnrecognizedEnumValues: true,
|
|
1741
|
+
skipValidation: true,
|
|
1742
|
+
breadcrumbsPrefix: ["response"],
|
|
1743
|
+
}), _response.rawResponse);
|
|
1473
1744
|
case 500:
|
|
1474
1745
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1475
1746
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1477,11 +1748,12 @@ class Billing {
|
|
|
1477
1748
|
allowUnrecognizedEnumValues: true,
|
|
1478
1749
|
skipValidation: true,
|
|
1479
1750
|
breadcrumbsPrefix: ["response"],
|
|
1480
|
-
}));
|
|
1751
|
+
}), _response.rawResponse);
|
|
1481
1752
|
default:
|
|
1482
1753
|
throw new errors.SchematicError({
|
|
1483
1754
|
statusCode: _response.error.statusCode,
|
|
1484
1755
|
body: _response.error.body,
|
|
1756
|
+
rawResponse: _response.rawResponse,
|
|
1485
1757
|
});
|
|
1486
1758
|
}
|
|
1487
1759
|
}
|
|
@@ -1490,12 +1762,14 @@ class Billing {
|
|
|
1490
1762
|
throw new errors.SchematicError({
|
|
1491
1763
|
statusCode: _response.error.statusCode,
|
|
1492
1764
|
body: _response.error.rawBody,
|
|
1765
|
+
rawResponse: _response.rawResponse,
|
|
1493
1766
|
});
|
|
1494
1767
|
case "timeout":
|
|
1495
1768
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/{billing_id}.");
|
|
1496
1769
|
case "unknown":
|
|
1497
1770
|
throw new errors.SchematicError({
|
|
1498
1771
|
message: _response.error.errorMessage,
|
|
1772
|
+
rawResponse: _response.rawResponse,
|
|
1499
1773
|
});
|
|
1500
1774
|
}
|
|
1501
1775
|
});
|
|
@@ -1507,15 +1781,19 @@ class Billing {
|
|
|
1507
1781
|
* @throws {@link Schematic.BadRequestError}
|
|
1508
1782
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1509
1783
|
* @throws {@link Schematic.ForbiddenError}
|
|
1784
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1510
1785
|
* @throws {@link Schematic.InternalServerError}
|
|
1511
1786
|
*
|
|
1512
1787
|
* @example
|
|
1513
1788
|
* await client.billing.listProductPrices()
|
|
1514
1789
|
*/
|
|
1515
|
-
listProductPrices() {
|
|
1790
|
+
listProductPrices(request = {}, requestOptions) {
|
|
1791
|
+
return core.HttpResponsePromise.fromPromise(this.__listProductPrices(request, requestOptions));
|
|
1792
|
+
}
|
|
1793
|
+
__listProductPrices() {
|
|
1516
1794
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1517
1795
|
var _a, _b, _c;
|
|
1518
|
-
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
|
|
1796
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1519
1797
|
const _queryParams = {};
|
|
1520
1798
|
if (ids != null) {
|
|
1521
1799
|
if (Array.isArray(ids)) {
|
|
@@ -1537,12 +1815,18 @@ class Billing {
|
|
|
1537
1815
|
if (withoutLinkedToPlan != null) {
|
|
1538
1816
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1539
1817
|
}
|
|
1818
|
+
if (withOneTimeCharges != null) {
|
|
1819
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
1820
|
+
}
|
|
1540
1821
|
if (withZeroPrice != null) {
|
|
1541
1822
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1542
1823
|
}
|
|
1543
1824
|
if (withPricesOnly != null) {
|
|
1544
1825
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1545
1826
|
}
|
|
1827
|
+
if (isActive != null) {
|
|
1828
|
+
_queryParams["is_active"] = isActive.toString();
|
|
1829
|
+
}
|
|
1546
1830
|
if (limit != null) {
|
|
1547
1831
|
_queryParams["limit"] = limit.toString();
|
|
1548
1832
|
}
|
|
@@ -1552,7 +1836,7 @@ class Billing {
|
|
|
1552
1836
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1553
1837
|
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, "billing/product/prices"),
|
|
1554
1838
|
method: "GET",
|
|
1555
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1839
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1556
1840
|
contentType: "application/json",
|
|
1557
1841
|
queryParameters: _queryParams,
|
|
1558
1842
|
requestType: "json",
|
|
@@ -1561,13 +1845,16 @@ class Billing {
|
|
|
1561
1845
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1562
1846
|
});
|
|
1563
1847
|
if (_response.ok) {
|
|
1564
|
-
return
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1848
|
+
return {
|
|
1849
|
+
data: serializers.ListProductPricesResponse.parseOrThrow(_response.body, {
|
|
1850
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1851
|
+
allowUnrecognizedUnionMembers: true,
|
|
1852
|
+
allowUnrecognizedEnumValues: true,
|
|
1853
|
+
skipValidation: true,
|
|
1854
|
+
breadcrumbsPrefix: ["response"],
|
|
1855
|
+
}),
|
|
1856
|
+
rawResponse: _response.rawResponse,
|
|
1857
|
+
};
|
|
1571
1858
|
}
|
|
1572
1859
|
if (_response.error.reason === "status-code") {
|
|
1573
1860
|
switch (_response.error.statusCode) {
|
|
@@ -1578,7 +1865,7 @@ class Billing {
|
|
|
1578
1865
|
allowUnrecognizedEnumValues: true,
|
|
1579
1866
|
skipValidation: true,
|
|
1580
1867
|
breadcrumbsPrefix: ["response"],
|
|
1581
|
-
}));
|
|
1868
|
+
}), _response.rawResponse);
|
|
1582
1869
|
case 401:
|
|
1583
1870
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1584
1871
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1586,7 +1873,7 @@ class Billing {
|
|
|
1586
1873
|
allowUnrecognizedEnumValues: true,
|
|
1587
1874
|
skipValidation: true,
|
|
1588
1875
|
breadcrumbsPrefix: ["response"],
|
|
1589
|
-
}));
|
|
1876
|
+
}), _response.rawResponse);
|
|
1590
1877
|
case 403:
|
|
1591
1878
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1592
1879
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1594,7 +1881,15 @@ class Billing {
|
|
|
1594
1881
|
allowUnrecognizedEnumValues: true,
|
|
1595
1882
|
skipValidation: true,
|
|
1596
1883
|
breadcrumbsPrefix: ["response"],
|
|
1597
|
-
}));
|
|
1884
|
+
}), _response.rawResponse);
|
|
1885
|
+
case 404:
|
|
1886
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1887
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1888
|
+
allowUnrecognizedUnionMembers: true,
|
|
1889
|
+
allowUnrecognizedEnumValues: true,
|
|
1890
|
+
skipValidation: true,
|
|
1891
|
+
breadcrumbsPrefix: ["response"],
|
|
1892
|
+
}), _response.rawResponse);
|
|
1598
1893
|
case 500:
|
|
1599
1894
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1600
1895
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1602,11 +1897,12 @@ class Billing {
|
|
|
1602
1897
|
allowUnrecognizedEnumValues: true,
|
|
1603
1898
|
skipValidation: true,
|
|
1604
1899
|
breadcrumbsPrefix: ["response"],
|
|
1605
|
-
}));
|
|
1900
|
+
}), _response.rawResponse);
|
|
1606
1901
|
default:
|
|
1607
1902
|
throw new errors.SchematicError({
|
|
1608
1903
|
statusCode: _response.error.statusCode,
|
|
1609
1904
|
body: _response.error.body,
|
|
1905
|
+
rawResponse: _response.rawResponse,
|
|
1610
1906
|
});
|
|
1611
1907
|
}
|
|
1612
1908
|
}
|
|
@@ -1615,12 +1911,14 @@ class Billing {
|
|
|
1615
1911
|
throw new errors.SchematicError({
|
|
1616
1912
|
statusCode: _response.error.statusCode,
|
|
1617
1913
|
body: _response.error.rawBody,
|
|
1914
|
+
rawResponse: _response.rawResponse,
|
|
1618
1915
|
});
|
|
1619
1916
|
case "timeout":
|
|
1620
1917
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/product/prices.");
|
|
1621
1918
|
case "unknown":
|
|
1622
1919
|
throw new errors.SchematicError({
|
|
1623
1920
|
message: _response.error.errorMessage,
|
|
1921
|
+
rawResponse: _response.rawResponse,
|
|
1624
1922
|
});
|
|
1625
1923
|
}
|
|
1626
1924
|
});
|
|
@@ -1632,18 +1930,22 @@ class Billing {
|
|
|
1632
1930
|
* @throws {@link Schematic.BadRequestError}
|
|
1633
1931
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1634
1932
|
* @throws {@link Schematic.ForbiddenError}
|
|
1933
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1635
1934
|
* @throws {@link Schematic.InternalServerError}
|
|
1636
1935
|
*
|
|
1637
1936
|
* @example
|
|
1638
1937
|
* await client.billing.deleteProductPrice("billing_id")
|
|
1639
1938
|
*/
|
|
1640
1939
|
deleteProductPrice(billingId, requestOptions) {
|
|
1940
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteProductPrice(billingId, requestOptions));
|
|
1941
|
+
}
|
|
1942
|
+
__deleteProductPrice(billingId, requestOptions) {
|
|
1641
1943
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1642
1944
|
var _a, _b, _c;
|
|
1643
1945
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1644
1946
|
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, `billing/product/prices/${encodeURIComponent(billingId)}`),
|
|
1645
1947
|
method: "DELETE",
|
|
1646
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1948
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1647
1949
|
contentType: "application/json",
|
|
1648
1950
|
requestType: "json",
|
|
1649
1951
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -1651,13 +1953,16 @@ class Billing {
|
|
|
1651
1953
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1652
1954
|
});
|
|
1653
1955
|
if (_response.ok) {
|
|
1654
|
-
return
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1956
|
+
return {
|
|
1957
|
+
data: serializers.DeleteProductPriceResponse.parseOrThrow(_response.body, {
|
|
1958
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1959
|
+
allowUnrecognizedUnionMembers: true,
|
|
1960
|
+
allowUnrecognizedEnumValues: true,
|
|
1961
|
+
skipValidation: true,
|
|
1962
|
+
breadcrumbsPrefix: ["response"],
|
|
1963
|
+
}),
|
|
1964
|
+
rawResponse: _response.rawResponse,
|
|
1965
|
+
};
|
|
1661
1966
|
}
|
|
1662
1967
|
if (_response.error.reason === "status-code") {
|
|
1663
1968
|
switch (_response.error.statusCode) {
|
|
@@ -1668,7 +1973,7 @@ class Billing {
|
|
|
1668
1973
|
allowUnrecognizedEnumValues: true,
|
|
1669
1974
|
skipValidation: true,
|
|
1670
1975
|
breadcrumbsPrefix: ["response"],
|
|
1671
|
-
}));
|
|
1976
|
+
}), _response.rawResponse);
|
|
1672
1977
|
case 401:
|
|
1673
1978
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1674
1979
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1676,7 +1981,7 @@ class Billing {
|
|
|
1676
1981
|
allowUnrecognizedEnumValues: true,
|
|
1677
1982
|
skipValidation: true,
|
|
1678
1983
|
breadcrumbsPrefix: ["response"],
|
|
1679
|
-
}));
|
|
1984
|
+
}), _response.rawResponse);
|
|
1680
1985
|
case 403:
|
|
1681
1986
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1682
1987
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1684,7 +1989,15 @@ class Billing {
|
|
|
1684
1989
|
allowUnrecognizedEnumValues: true,
|
|
1685
1990
|
skipValidation: true,
|
|
1686
1991
|
breadcrumbsPrefix: ["response"],
|
|
1687
|
-
}));
|
|
1992
|
+
}), _response.rawResponse);
|
|
1993
|
+
case 404:
|
|
1994
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1995
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1996
|
+
allowUnrecognizedUnionMembers: true,
|
|
1997
|
+
allowUnrecognizedEnumValues: true,
|
|
1998
|
+
skipValidation: true,
|
|
1999
|
+
breadcrumbsPrefix: ["response"],
|
|
2000
|
+
}), _response.rawResponse);
|
|
1688
2001
|
case 500:
|
|
1689
2002
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1690
2003
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1692,11 +2005,12 @@ class Billing {
|
|
|
1692
2005
|
allowUnrecognizedEnumValues: true,
|
|
1693
2006
|
skipValidation: true,
|
|
1694
2007
|
breadcrumbsPrefix: ["response"],
|
|
1695
|
-
}));
|
|
2008
|
+
}), _response.rawResponse);
|
|
1696
2009
|
default:
|
|
1697
2010
|
throw new errors.SchematicError({
|
|
1698
2011
|
statusCode: _response.error.statusCode,
|
|
1699
2012
|
body: _response.error.body,
|
|
2013
|
+
rawResponse: _response.rawResponse,
|
|
1700
2014
|
});
|
|
1701
2015
|
}
|
|
1702
2016
|
}
|
|
@@ -1705,12 +2019,14 @@ class Billing {
|
|
|
1705
2019
|
throw new errors.SchematicError({
|
|
1706
2020
|
statusCode: _response.error.statusCode,
|
|
1707
2021
|
body: _response.error.rawBody,
|
|
2022
|
+
rawResponse: _response.rawResponse,
|
|
1708
2023
|
});
|
|
1709
2024
|
case "timeout":
|
|
1710
2025
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /billing/product/prices/{billing_id}.");
|
|
1711
2026
|
case "unknown":
|
|
1712
2027
|
throw new errors.SchematicError({
|
|
1713
2028
|
message: _response.error.errorMessage,
|
|
2029
|
+
rawResponse: _response.rawResponse,
|
|
1714
2030
|
});
|
|
1715
2031
|
}
|
|
1716
2032
|
});
|
|
@@ -1722,25 +2038,26 @@ class Billing {
|
|
|
1722
2038
|
* @throws {@link Schematic.BadRequestError}
|
|
1723
2039
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1724
2040
|
* @throws {@link Schematic.ForbiddenError}
|
|
2041
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1725
2042
|
* @throws {@link Schematic.InternalServerError}
|
|
1726
2043
|
*
|
|
1727
2044
|
* @example
|
|
1728
2045
|
* await client.billing.upsertBillingProduct({
|
|
1729
|
-
* active: true,
|
|
1730
|
-
* currency: "currency",
|
|
1731
2046
|
* externalId: "external_id",
|
|
1732
2047
|
* name: "name",
|
|
1733
|
-
* price: 1.1
|
|
1734
|
-
* quantity: 1
|
|
2048
|
+
* price: 1.1
|
|
1735
2049
|
* })
|
|
1736
2050
|
*/
|
|
1737
2051
|
upsertBillingProduct(request, requestOptions) {
|
|
2052
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingProduct(request, requestOptions));
|
|
2053
|
+
}
|
|
2054
|
+
__upsertBillingProduct(request, requestOptions) {
|
|
1738
2055
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1739
2056
|
var _a, _b, _c;
|
|
1740
2057
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1741
2058
|
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, "billing/product/upsert"),
|
|
1742
2059
|
method: "POST",
|
|
1743
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2060
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1744
2061
|
contentType: "application/json",
|
|
1745
2062
|
requestType: "json",
|
|
1746
2063
|
body: serializers.CreateBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -1749,13 +2066,16 @@ class Billing {
|
|
|
1749
2066
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1750
2067
|
});
|
|
1751
2068
|
if (_response.ok) {
|
|
1752
|
-
return
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
2069
|
+
return {
|
|
2070
|
+
data: serializers.UpsertBillingProductResponse.parseOrThrow(_response.body, {
|
|
2071
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2072
|
+
allowUnrecognizedUnionMembers: true,
|
|
2073
|
+
allowUnrecognizedEnumValues: true,
|
|
2074
|
+
skipValidation: true,
|
|
2075
|
+
breadcrumbsPrefix: ["response"],
|
|
2076
|
+
}),
|
|
2077
|
+
rawResponse: _response.rawResponse,
|
|
2078
|
+
};
|
|
1759
2079
|
}
|
|
1760
2080
|
if (_response.error.reason === "status-code") {
|
|
1761
2081
|
switch (_response.error.statusCode) {
|
|
@@ -1766,7 +2086,7 @@ class Billing {
|
|
|
1766
2086
|
allowUnrecognizedEnumValues: true,
|
|
1767
2087
|
skipValidation: true,
|
|
1768
2088
|
breadcrumbsPrefix: ["response"],
|
|
1769
|
-
}));
|
|
2089
|
+
}), _response.rawResponse);
|
|
1770
2090
|
case 401:
|
|
1771
2091
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1772
2092
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1774,7 +2094,7 @@ class Billing {
|
|
|
1774
2094
|
allowUnrecognizedEnumValues: true,
|
|
1775
2095
|
skipValidation: true,
|
|
1776
2096
|
breadcrumbsPrefix: ["response"],
|
|
1777
|
-
}));
|
|
2097
|
+
}), _response.rawResponse);
|
|
1778
2098
|
case 403:
|
|
1779
2099
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1780
2100
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1782,7 +2102,15 @@ class Billing {
|
|
|
1782
2102
|
allowUnrecognizedEnumValues: true,
|
|
1783
2103
|
skipValidation: true,
|
|
1784
2104
|
breadcrumbsPrefix: ["response"],
|
|
1785
|
-
}));
|
|
2105
|
+
}), _response.rawResponse);
|
|
2106
|
+
case 404:
|
|
2107
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2108
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2109
|
+
allowUnrecognizedUnionMembers: true,
|
|
2110
|
+
allowUnrecognizedEnumValues: true,
|
|
2111
|
+
skipValidation: true,
|
|
2112
|
+
breadcrumbsPrefix: ["response"],
|
|
2113
|
+
}), _response.rawResponse);
|
|
1786
2114
|
case 500:
|
|
1787
2115
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1788
2116
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1790,11 +2118,12 @@ class Billing {
|
|
|
1790
2118
|
allowUnrecognizedEnumValues: true,
|
|
1791
2119
|
skipValidation: true,
|
|
1792
2120
|
breadcrumbsPrefix: ["response"],
|
|
1793
|
-
}));
|
|
2121
|
+
}), _response.rawResponse);
|
|
1794
2122
|
default:
|
|
1795
2123
|
throw new errors.SchematicError({
|
|
1796
2124
|
statusCode: _response.error.statusCode,
|
|
1797
2125
|
body: _response.error.body,
|
|
2126
|
+
rawResponse: _response.rawResponse,
|
|
1798
2127
|
});
|
|
1799
2128
|
}
|
|
1800
2129
|
}
|
|
@@ -1803,12 +2132,14 @@ class Billing {
|
|
|
1803
2132
|
throw new errors.SchematicError({
|
|
1804
2133
|
statusCode: _response.error.statusCode,
|
|
1805
2134
|
body: _response.error.rawBody,
|
|
2135
|
+
rawResponse: _response.rawResponse,
|
|
1806
2136
|
});
|
|
1807
2137
|
case "timeout":
|
|
1808
2138
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/product/upsert.");
|
|
1809
2139
|
case "unknown":
|
|
1810
2140
|
throw new errors.SchematicError({
|
|
1811
2141
|
message: _response.error.errorMessage,
|
|
2142
|
+
rawResponse: _response.rawResponse,
|
|
1812
2143
|
});
|
|
1813
2144
|
}
|
|
1814
2145
|
});
|
|
@@ -1820,15 +2151,19 @@ class Billing {
|
|
|
1820
2151
|
* @throws {@link Schematic.BadRequestError}
|
|
1821
2152
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1822
2153
|
* @throws {@link Schematic.ForbiddenError}
|
|
2154
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1823
2155
|
* @throws {@link Schematic.InternalServerError}
|
|
1824
2156
|
*
|
|
1825
2157
|
* @example
|
|
1826
2158
|
* await client.billing.listBillingProducts()
|
|
1827
2159
|
*/
|
|
1828
|
-
listBillingProducts() {
|
|
2160
|
+
listBillingProducts(request = {}, requestOptions) {
|
|
2161
|
+
return core.HttpResponsePromise.fromPromise(this.__listBillingProducts(request, requestOptions));
|
|
2162
|
+
}
|
|
2163
|
+
__listBillingProducts() {
|
|
1829
2164
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1830
2165
|
var _a, _b, _c;
|
|
1831
|
-
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
|
|
2166
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1832
2167
|
const _queryParams = {};
|
|
1833
2168
|
if (ids != null) {
|
|
1834
2169
|
if (Array.isArray(ids)) {
|
|
@@ -1850,12 +2185,18 @@ class Billing {
|
|
|
1850
2185
|
if (withoutLinkedToPlan != null) {
|
|
1851
2186
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1852
2187
|
}
|
|
2188
|
+
if (withOneTimeCharges != null) {
|
|
2189
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
2190
|
+
}
|
|
1853
2191
|
if (withZeroPrice != null) {
|
|
1854
2192
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1855
2193
|
}
|
|
1856
2194
|
if (withPricesOnly != null) {
|
|
1857
2195
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1858
2196
|
}
|
|
2197
|
+
if (isActive != null) {
|
|
2198
|
+
_queryParams["is_active"] = isActive.toString();
|
|
2199
|
+
}
|
|
1859
2200
|
if (limit != null) {
|
|
1860
2201
|
_queryParams["limit"] = limit.toString();
|
|
1861
2202
|
}
|
|
@@ -1865,7 +2206,7 @@ class Billing {
|
|
|
1865
2206
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1866
2207
|
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, "billing/products"),
|
|
1867
2208
|
method: "GET",
|
|
1868
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2209
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1869
2210
|
contentType: "application/json",
|
|
1870
2211
|
queryParameters: _queryParams,
|
|
1871
2212
|
requestType: "json",
|
|
@@ -1874,13 +2215,16 @@ class Billing {
|
|
|
1874
2215
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1875
2216
|
});
|
|
1876
2217
|
if (_response.ok) {
|
|
1877
|
-
return
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2218
|
+
return {
|
|
2219
|
+
data: serializers.ListBillingProductsResponse.parseOrThrow(_response.body, {
|
|
2220
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2221
|
+
allowUnrecognizedUnionMembers: true,
|
|
2222
|
+
allowUnrecognizedEnumValues: true,
|
|
2223
|
+
skipValidation: true,
|
|
2224
|
+
breadcrumbsPrefix: ["response"],
|
|
2225
|
+
}),
|
|
2226
|
+
rawResponse: _response.rawResponse,
|
|
2227
|
+
};
|
|
1884
2228
|
}
|
|
1885
2229
|
if (_response.error.reason === "status-code") {
|
|
1886
2230
|
switch (_response.error.statusCode) {
|
|
@@ -1891,7 +2235,7 @@ class Billing {
|
|
|
1891
2235
|
allowUnrecognizedEnumValues: true,
|
|
1892
2236
|
skipValidation: true,
|
|
1893
2237
|
breadcrumbsPrefix: ["response"],
|
|
1894
|
-
}));
|
|
2238
|
+
}), _response.rawResponse);
|
|
1895
2239
|
case 401:
|
|
1896
2240
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1897
2241
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1899,7 +2243,7 @@ class Billing {
|
|
|
1899
2243
|
allowUnrecognizedEnumValues: true,
|
|
1900
2244
|
skipValidation: true,
|
|
1901
2245
|
breadcrumbsPrefix: ["response"],
|
|
1902
|
-
}));
|
|
2246
|
+
}), _response.rawResponse);
|
|
1903
2247
|
case 403:
|
|
1904
2248
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1905
2249
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1907,7 +2251,15 @@ class Billing {
|
|
|
1907
2251
|
allowUnrecognizedEnumValues: true,
|
|
1908
2252
|
skipValidation: true,
|
|
1909
2253
|
breadcrumbsPrefix: ["response"],
|
|
1910
|
-
}));
|
|
2254
|
+
}), _response.rawResponse);
|
|
2255
|
+
case 404:
|
|
2256
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2257
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2258
|
+
allowUnrecognizedUnionMembers: true,
|
|
2259
|
+
allowUnrecognizedEnumValues: true,
|
|
2260
|
+
skipValidation: true,
|
|
2261
|
+
breadcrumbsPrefix: ["response"],
|
|
2262
|
+
}), _response.rawResponse);
|
|
1911
2263
|
case 500:
|
|
1912
2264
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1913
2265
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1915,11 +2267,12 @@ class Billing {
|
|
|
1915
2267
|
allowUnrecognizedEnumValues: true,
|
|
1916
2268
|
skipValidation: true,
|
|
1917
2269
|
breadcrumbsPrefix: ["response"],
|
|
1918
|
-
}));
|
|
2270
|
+
}), _response.rawResponse);
|
|
1919
2271
|
default:
|
|
1920
2272
|
throw new errors.SchematicError({
|
|
1921
2273
|
statusCode: _response.error.statusCode,
|
|
1922
2274
|
body: _response.error.body,
|
|
2275
|
+
rawResponse: _response.rawResponse,
|
|
1923
2276
|
});
|
|
1924
2277
|
}
|
|
1925
2278
|
}
|
|
@@ -1928,12 +2281,14 @@ class Billing {
|
|
|
1928
2281
|
throw new errors.SchematicError({
|
|
1929
2282
|
statusCode: _response.error.statusCode,
|
|
1930
2283
|
body: _response.error.rawBody,
|
|
2284
|
+
rawResponse: _response.rawResponse,
|
|
1931
2285
|
});
|
|
1932
2286
|
case "timeout":
|
|
1933
2287
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products.");
|
|
1934
2288
|
case "unknown":
|
|
1935
2289
|
throw new errors.SchematicError({
|
|
1936
2290
|
message: _response.error.errorMessage,
|
|
2291
|
+
rawResponse: _response.rawResponse,
|
|
1937
2292
|
});
|
|
1938
2293
|
}
|
|
1939
2294
|
});
|
|
@@ -1945,15 +2300,19 @@ class Billing {
|
|
|
1945
2300
|
* @throws {@link Schematic.BadRequestError}
|
|
1946
2301
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1947
2302
|
* @throws {@link Schematic.ForbiddenError}
|
|
2303
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1948
2304
|
* @throws {@link Schematic.InternalServerError}
|
|
1949
2305
|
*
|
|
1950
2306
|
* @example
|
|
1951
2307
|
* await client.billing.countBillingProducts()
|
|
1952
2308
|
*/
|
|
1953
|
-
countBillingProducts() {
|
|
2309
|
+
countBillingProducts(request = {}, requestOptions) {
|
|
2310
|
+
return core.HttpResponsePromise.fromPromise(this.__countBillingProducts(request, requestOptions));
|
|
2311
|
+
}
|
|
2312
|
+
__countBillingProducts() {
|
|
1954
2313
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1955
2314
|
var _a, _b, _c;
|
|
1956
|
-
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withZeroPrice, withPricesOnly, limit, offset } = request;
|
|
2315
|
+
const { ids, name, q, priceUsageType, withoutLinkedToPlan, withOneTimeCharges, withZeroPrice, withPricesOnly, isActive, limit, offset, } = request;
|
|
1957
2316
|
const _queryParams = {};
|
|
1958
2317
|
if (ids != null) {
|
|
1959
2318
|
if (Array.isArray(ids)) {
|
|
@@ -1975,12 +2334,18 @@ class Billing {
|
|
|
1975
2334
|
if (withoutLinkedToPlan != null) {
|
|
1976
2335
|
_queryParams["without_linked_to_plan"] = withoutLinkedToPlan.toString();
|
|
1977
2336
|
}
|
|
2337
|
+
if (withOneTimeCharges != null) {
|
|
2338
|
+
_queryParams["with_one_time_charges"] = withOneTimeCharges.toString();
|
|
2339
|
+
}
|
|
1978
2340
|
if (withZeroPrice != null) {
|
|
1979
2341
|
_queryParams["with_zero_price"] = withZeroPrice.toString();
|
|
1980
2342
|
}
|
|
1981
2343
|
if (withPricesOnly != null) {
|
|
1982
2344
|
_queryParams["with_prices_only"] = withPricesOnly.toString();
|
|
1983
2345
|
}
|
|
2346
|
+
if (isActive != null) {
|
|
2347
|
+
_queryParams["is_active"] = isActive.toString();
|
|
2348
|
+
}
|
|
1984
2349
|
if (limit != null) {
|
|
1985
2350
|
_queryParams["limit"] = limit.toString();
|
|
1986
2351
|
}
|
|
@@ -1990,7 +2355,7 @@ class Billing {
|
|
|
1990
2355
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1991
2356
|
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, "billing/products/count"),
|
|
1992
2357
|
method: "GET",
|
|
1993
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2358
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
1994
2359
|
contentType: "application/json",
|
|
1995
2360
|
queryParameters: _queryParams,
|
|
1996
2361
|
requestType: "json",
|
|
@@ -1999,13 +2364,16 @@ class Billing {
|
|
|
1999
2364
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2000
2365
|
});
|
|
2001
2366
|
if (_response.ok) {
|
|
2002
|
-
return
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2367
|
+
return {
|
|
2368
|
+
data: serializers.CountBillingProductsResponse.parseOrThrow(_response.body, {
|
|
2369
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2370
|
+
allowUnrecognizedUnionMembers: true,
|
|
2371
|
+
allowUnrecognizedEnumValues: true,
|
|
2372
|
+
skipValidation: true,
|
|
2373
|
+
breadcrumbsPrefix: ["response"],
|
|
2374
|
+
}),
|
|
2375
|
+
rawResponse: _response.rawResponse,
|
|
2376
|
+
};
|
|
2009
2377
|
}
|
|
2010
2378
|
if (_response.error.reason === "status-code") {
|
|
2011
2379
|
switch (_response.error.statusCode) {
|
|
@@ -2016,7 +2384,7 @@ class Billing {
|
|
|
2016
2384
|
allowUnrecognizedEnumValues: true,
|
|
2017
2385
|
skipValidation: true,
|
|
2018
2386
|
breadcrumbsPrefix: ["response"],
|
|
2019
|
-
}));
|
|
2387
|
+
}), _response.rawResponse);
|
|
2020
2388
|
case 401:
|
|
2021
2389
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2022
2390
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2024,7 +2392,7 @@ class Billing {
|
|
|
2024
2392
|
allowUnrecognizedEnumValues: true,
|
|
2025
2393
|
skipValidation: true,
|
|
2026
2394
|
breadcrumbsPrefix: ["response"],
|
|
2027
|
-
}));
|
|
2395
|
+
}), _response.rawResponse);
|
|
2028
2396
|
case 403:
|
|
2029
2397
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2030
2398
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2032,7 +2400,15 @@ class Billing {
|
|
|
2032
2400
|
allowUnrecognizedEnumValues: true,
|
|
2033
2401
|
skipValidation: true,
|
|
2034
2402
|
breadcrumbsPrefix: ["response"],
|
|
2035
|
-
}));
|
|
2403
|
+
}), _response.rawResponse);
|
|
2404
|
+
case 404:
|
|
2405
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2406
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2407
|
+
allowUnrecognizedUnionMembers: true,
|
|
2408
|
+
allowUnrecognizedEnumValues: true,
|
|
2409
|
+
skipValidation: true,
|
|
2410
|
+
breadcrumbsPrefix: ["response"],
|
|
2411
|
+
}), _response.rawResponse);
|
|
2036
2412
|
case 500:
|
|
2037
2413
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2038
2414
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2040,11 +2416,12 @@ class Billing {
|
|
|
2040
2416
|
allowUnrecognizedEnumValues: true,
|
|
2041
2417
|
skipValidation: true,
|
|
2042
2418
|
breadcrumbsPrefix: ["response"],
|
|
2043
|
-
}));
|
|
2419
|
+
}), _response.rawResponse);
|
|
2044
2420
|
default:
|
|
2045
2421
|
throw new errors.SchematicError({
|
|
2046
2422
|
statusCode: _response.error.statusCode,
|
|
2047
2423
|
body: _response.error.body,
|
|
2424
|
+
rawResponse: _response.rawResponse,
|
|
2048
2425
|
});
|
|
2049
2426
|
}
|
|
2050
2427
|
}
|
|
@@ -2053,12 +2430,14 @@ class Billing {
|
|
|
2053
2430
|
throw new errors.SchematicError({
|
|
2054
2431
|
statusCode: _response.error.statusCode,
|
|
2055
2432
|
body: _response.error.rawBody,
|
|
2433
|
+
rawResponse: _response.rawResponse,
|
|
2056
2434
|
});
|
|
2057
2435
|
case "timeout":
|
|
2058
2436
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /billing/products/count.");
|
|
2059
2437
|
case "unknown":
|
|
2060
2438
|
throw new errors.SchematicError({
|
|
2061
2439
|
message: _response.error.errorMessage,
|
|
2440
|
+
rawResponse: _response.rawResponse,
|
|
2062
2441
|
});
|
|
2063
2442
|
}
|
|
2064
2443
|
});
|
|
@@ -2070,6 +2449,7 @@ class Billing {
|
|
|
2070
2449
|
* @throws {@link Schematic.BadRequestError}
|
|
2071
2450
|
* @throws {@link Schematic.UnauthorizedError}
|
|
2072
2451
|
* @throws {@link Schematic.ForbiddenError}
|
|
2452
|
+
* @throws {@link Schematic.NotFoundError}
|
|
2073
2453
|
* @throws {@link Schematic.InternalServerError}
|
|
2074
2454
|
*
|
|
2075
2455
|
* @example
|
|
@@ -2098,12 +2478,15 @@ class Billing {
|
|
|
2098
2478
|
* })
|
|
2099
2479
|
*/
|
|
2100
2480
|
upsertBillingSubscription(request, requestOptions) {
|
|
2481
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingSubscription(request, requestOptions));
|
|
2482
|
+
}
|
|
2483
|
+
__upsertBillingSubscription(request, requestOptions) {
|
|
2101
2484
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2102
2485
|
var _a, _b, _c;
|
|
2103
2486
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
2104
2487
|
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, "billing/subscription/upsert"),
|
|
2105
2488
|
method: "POST",
|
|
2106
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
2489
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.12", "User-Agent": "@schematichq/schematic-typescript-node/1.1.12", "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),
|
|
2107
2490
|
contentType: "application/json",
|
|
2108
2491
|
requestType: "json",
|
|
2109
2492
|
body: serializers.CreateBillingSubscriptionsRequestBody.jsonOrThrow(request, {
|
|
@@ -2114,13 +2497,16 @@ class Billing {
|
|
|
2114
2497
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
2115
2498
|
});
|
|
2116
2499
|
if (_response.ok) {
|
|
2117
|
-
return
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2500
|
+
return {
|
|
2501
|
+
data: serializers.UpsertBillingSubscriptionResponse.parseOrThrow(_response.body, {
|
|
2502
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2503
|
+
allowUnrecognizedUnionMembers: true,
|
|
2504
|
+
allowUnrecognizedEnumValues: true,
|
|
2505
|
+
skipValidation: true,
|
|
2506
|
+
breadcrumbsPrefix: ["response"],
|
|
2507
|
+
}),
|
|
2508
|
+
rawResponse: _response.rawResponse,
|
|
2509
|
+
};
|
|
2124
2510
|
}
|
|
2125
2511
|
if (_response.error.reason === "status-code") {
|
|
2126
2512
|
switch (_response.error.statusCode) {
|
|
@@ -2131,7 +2517,7 @@ class Billing {
|
|
|
2131
2517
|
allowUnrecognizedEnumValues: true,
|
|
2132
2518
|
skipValidation: true,
|
|
2133
2519
|
breadcrumbsPrefix: ["response"],
|
|
2134
|
-
}));
|
|
2520
|
+
}), _response.rawResponse);
|
|
2135
2521
|
case 401:
|
|
2136
2522
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2137
2523
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2139,7 +2525,7 @@ class Billing {
|
|
|
2139
2525
|
allowUnrecognizedEnumValues: true,
|
|
2140
2526
|
skipValidation: true,
|
|
2141
2527
|
breadcrumbsPrefix: ["response"],
|
|
2142
|
-
}));
|
|
2528
|
+
}), _response.rawResponse);
|
|
2143
2529
|
case 403:
|
|
2144
2530
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2145
2531
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2147,7 +2533,15 @@ class Billing {
|
|
|
2147
2533
|
allowUnrecognizedEnumValues: true,
|
|
2148
2534
|
skipValidation: true,
|
|
2149
2535
|
breadcrumbsPrefix: ["response"],
|
|
2150
|
-
}));
|
|
2536
|
+
}), _response.rawResponse);
|
|
2537
|
+
case 404:
|
|
2538
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2539
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2540
|
+
allowUnrecognizedUnionMembers: true,
|
|
2541
|
+
allowUnrecognizedEnumValues: true,
|
|
2542
|
+
skipValidation: true,
|
|
2543
|
+
breadcrumbsPrefix: ["response"],
|
|
2544
|
+
}), _response.rawResponse);
|
|
2151
2545
|
case 500:
|
|
2152
2546
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2153
2547
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -2155,11 +2549,12 @@ class Billing {
|
|
|
2155
2549
|
allowUnrecognizedEnumValues: true,
|
|
2156
2550
|
skipValidation: true,
|
|
2157
2551
|
breadcrumbsPrefix: ["response"],
|
|
2158
|
-
}));
|
|
2552
|
+
}), _response.rawResponse);
|
|
2159
2553
|
default:
|
|
2160
2554
|
throw new errors.SchematicError({
|
|
2161
2555
|
statusCode: _response.error.statusCode,
|
|
2162
2556
|
body: _response.error.body,
|
|
2557
|
+
rawResponse: _response.rawResponse,
|
|
2163
2558
|
});
|
|
2164
2559
|
}
|
|
2165
2560
|
}
|
|
@@ -2168,12 +2563,14 @@ class Billing {
|
|
|
2168
2563
|
throw new errors.SchematicError({
|
|
2169
2564
|
statusCode: _response.error.statusCode,
|
|
2170
2565
|
body: _response.error.rawBody,
|
|
2566
|
+
rawResponse: _response.rawResponse,
|
|
2171
2567
|
});
|
|
2172
2568
|
case "timeout":
|
|
2173
2569
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /billing/subscription/upsert.");
|
|
2174
2570
|
case "unknown":
|
|
2175
2571
|
throw new errors.SchematicError({
|
|
2176
2572
|
message: _response.error.errorMessage,
|
|
2573
|
+
rawResponse: _response.rawResponse,
|
|
2177
2574
|
});
|
|
2178
2575
|
}
|
|
2179
2576
|
});
|