@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
|
@@ -76,27 +76,607 @@ class Plans {
|
|
|
76
76
|
* })
|
|
77
77
|
*/
|
|
78
78
|
updateCompanyPlans(companyPlanId, request, requestOptions) {
|
|
79
|
+
return core.HttpResponsePromise.fromPromise(this.__updateCompanyPlans(companyPlanId, request, requestOptions));
|
|
80
|
+
}
|
|
81
|
+
__updateCompanyPlans(companyPlanId, request, requestOptions) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
83
|
+
var _a, _b, _c;
|
|
84
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SchematicEnvironment.Default, `company-plans/${encodeURIComponent(companyPlanId)}`),
|
|
86
|
+
method: "PUT",
|
|
87
|
+
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),
|
|
88
|
+
contentType: "application/json",
|
|
89
|
+
requestType: "json",
|
|
90
|
+
body: serializers.UpdateCompanyPlansRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
91
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
92
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
93
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
94
|
+
});
|
|
95
|
+
if (_response.ok) {
|
|
96
|
+
return {
|
|
97
|
+
data: serializers.UpdateCompanyPlansResponse.parseOrThrow(_response.body, {
|
|
98
|
+
unrecognizedObjectKeys: "passthrough",
|
|
99
|
+
allowUnrecognizedUnionMembers: true,
|
|
100
|
+
allowUnrecognizedEnumValues: true,
|
|
101
|
+
skipValidation: true,
|
|
102
|
+
breadcrumbsPrefix: ["response"],
|
|
103
|
+
}),
|
|
104
|
+
rawResponse: _response.rawResponse,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
if (_response.error.reason === "status-code") {
|
|
108
|
+
switch (_response.error.statusCode) {
|
|
109
|
+
case 400:
|
|
110
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
111
|
+
unrecognizedObjectKeys: "passthrough",
|
|
112
|
+
allowUnrecognizedUnionMembers: true,
|
|
113
|
+
allowUnrecognizedEnumValues: true,
|
|
114
|
+
skipValidation: true,
|
|
115
|
+
breadcrumbsPrefix: ["response"],
|
|
116
|
+
}), _response.rawResponse);
|
|
117
|
+
case 401:
|
|
118
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
119
|
+
unrecognizedObjectKeys: "passthrough",
|
|
120
|
+
allowUnrecognizedUnionMembers: true,
|
|
121
|
+
allowUnrecognizedEnumValues: true,
|
|
122
|
+
skipValidation: true,
|
|
123
|
+
breadcrumbsPrefix: ["response"],
|
|
124
|
+
}), _response.rawResponse);
|
|
125
|
+
case 403:
|
|
126
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
127
|
+
unrecognizedObjectKeys: "passthrough",
|
|
128
|
+
allowUnrecognizedUnionMembers: true,
|
|
129
|
+
allowUnrecognizedEnumValues: true,
|
|
130
|
+
skipValidation: true,
|
|
131
|
+
breadcrumbsPrefix: ["response"],
|
|
132
|
+
}), _response.rawResponse);
|
|
133
|
+
case 404:
|
|
134
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
135
|
+
unrecognizedObjectKeys: "passthrough",
|
|
136
|
+
allowUnrecognizedUnionMembers: true,
|
|
137
|
+
allowUnrecognizedEnumValues: true,
|
|
138
|
+
skipValidation: true,
|
|
139
|
+
breadcrumbsPrefix: ["response"],
|
|
140
|
+
}), _response.rawResponse);
|
|
141
|
+
case 500:
|
|
142
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
143
|
+
unrecognizedObjectKeys: "passthrough",
|
|
144
|
+
allowUnrecognizedUnionMembers: true,
|
|
145
|
+
allowUnrecognizedEnumValues: true,
|
|
146
|
+
skipValidation: true,
|
|
147
|
+
breadcrumbsPrefix: ["response"],
|
|
148
|
+
}), _response.rawResponse);
|
|
149
|
+
default:
|
|
150
|
+
throw new errors.SchematicError({
|
|
151
|
+
statusCode: _response.error.statusCode,
|
|
152
|
+
body: _response.error.body,
|
|
153
|
+
rawResponse: _response.rawResponse,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
switch (_response.error.reason) {
|
|
158
|
+
case "non-json":
|
|
159
|
+
throw new errors.SchematicError({
|
|
160
|
+
statusCode: _response.error.statusCode,
|
|
161
|
+
body: _response.error.rawBody,
|
|
162
|
+
rawResponse: _response.rawResponse,
|
|
163
|
+
});
|
|
164
|
+
case "timeout":
|
|
165
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /company-plans/{company_plan_id}.");
|
|
166
|
+
case "unknown":
|
|
167
|
+
throw new errors.SchematicError({
|
|
168
|
+
message: _response.error.errorMessage,
|
|
169
|
+
rawResponse: _response.rawResponse,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
176
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
177
|
+
*
|
|
178
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
179
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
180
|
+
* @throws {@link Schematic.NotFoundError}
|
|
181
|
+
* @throws {@link Schematic.InternalServerError}
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* await client.plans.getAudience("plan_audience_id")
|
|
185
|
+
*/
|
|
186
|
+
getAudience(planAudienceId, requestOptions) {
|
|
187
|
+
return core.HttpResponsePromise.fromPromise(this.__getAudience(planAudienceId, requestOptions));
|
|
188
|
+
}
|
|
189
|
+
__getAudience(planAudienceId, requestOptions) {
|
|
190
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
191
|
+
var _a, _b, _c;
|
|
192
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
193
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
194
|
+
method: "GET",
|
|
195
|
+
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),
|
|
196
|
+
contentType: "application/json",
|
|
197
|
+
requestType: "json",
|
|
198
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
199
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
200
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
201
|
+
});
|
|
202
|
+
if (_response.ok) {
|
|
203
|
+
return {
|
|
204
|
+
data: serializers.GetAudienceResponse.parseOrThrow(_response.body, {
|
|
205
|
+
unrecognizedObjectKeys: "passthrough",
|
|
206
|
+
allowUnrecognizedUnionMembers: true,
|
|
207
|
+
allowUnrecognizedEnumValues: true,
|
|
208
|
+
skipValidation: true,
|
|
209
|
+
breadcrumbsPrefix: ["response"],
|
|
210
|
+
}),
|
|
211
|
+
rawResponse: _response.rawResponse,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
if (_response.error.reason === "status-code") {
|
|
215
|
+
switch (_response.error.statusCode) {
|
|
216
|
+
case 401:
|
|
217
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
218
|
+
unrecognizedObjectKeys: "passthrough",
|
|
219
|
+
allowUnrecognizedUnionMembers: true,
|
|
220
|
+
allowUnrecognizedEnumValues: true,
|
|
221
|
+
skipValidation: true,
|
|
222
|
+
breadcrumbsPrefix: ["response"],
|
|
223
|
+
}), _response.rawResponse);
|
|
224
|
+
case 403:
|
|
225
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
226
|
+
unrecognizedObjectKeys: "passthrough",
|
|
227
|
+
allowUnrecognizedUnionMembers: true,
|
|
228
|
+
allowUnrecognizedEnumValues: true,
|
|
229
|
+
skipValidation: true,
|
|
230
|
+
breadcrumbsPrefix: ["response"],
|
|
231
|
+
}), _response.rawResponse);
|
|
232
|
+
case 404:
|
|
233
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
234
|
+
unrecognizedObjectKeys: "passthrough",
|
|
235
|
+
allowUnrecognizedUnionMembers: true,
|
|
236
|
+
allowUnrecognizedEnumValues: true,
|
|
237
|
+
skipValidation: true,
|
|
238
|
+
breadcrumbsPrefix: ["response"],
|
|
239
|
+
}), _response.rawResponse);
|
|
240
|
+
case 500:
|
|
241
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
242
|
+
unrecognizedObjectKeys: "passthrough",
|
|
243
|
+
allowUnrecognizedUnionMembers: true,
|
|
244
|
+
allowUnrecognizedEnumValues: true,
|
|
245
|
+
skipValidation: true,
|
|
246
|
+
breadcrumbsPrefix: ["response"],
|
|
247
|
+
}), _response.rawResponse);
|
|
248
|
+
default:
|
|
249
|
+
throw new errors.SchematicError({
|
|
250
|
+
statusCode: _response.error.statusCode,
|
|
251
|
+
body: _response.error.body,
|
|
252
|
+
rawResponse: _response.rawResponse,
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
switch (_response.error.reason) {
|
|
257
|
+
case "non-json":
|
|
258
|
+
throw new errors.SchematicError({
|
|
259
|
+
statusCode: _response.error.statusCode,
|
|
260
|
+
body: _response.error.rawBody,
|
|
261
|
+
rawResponse: _response.rawResponse,
|
|
262
|
+
});
|
|
263
|
+
case "timeout":
|
|
264
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-audiences/{plan_audience_id}.");
|
|
265
|
+
case "unknown":
|
|
266
|
+
throw new errors.SchematicError({
|
|
267
|
+
message: _response.error.errorMessage,
|
|
268
|
+
rawResponse: _response.rawResponse,
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
275
|
+
* @param {Schematic.UpdateAudienceRequestBody} request
|
|
276
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
|
+
*
|
|
278
|
+
* @throws {@link Schematic.BadRequestError}
|
|
279
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
280
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
281
|
+
* @throws {@link Schematic.NotFoundError}
|
|
282
|
+
* @throws {@link Schematic.InternalServerError}
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* await client.plans.updateAudience("plan_audience_id", {
|
|
286
|
+
* conditionGroups: [{
|
|
287
|
+
* conditions: [{
|
|
288
|
+
* conditionType: "company",
|
|
289
|
+
* operator: "eq",
|
|
290
|
+
* resourceIds: ["resource_ids"]
|
|
291
|
+
* }]
|
|
292
|
+
* }],
|
|
293
|
+
* conditions: [{
|
|
294
|
+
* conditionType: "company",
|
|
295
|
+
* operator: "eq",
|
|
296
|
+
* resourceIds: ["resource_ids"]
|
|
297
|
+
* }]
|
|
298
|
+
* })
|
|
299
|
+
*/
|
|
300
|
+
updateAudience(planAudienceId, request, requestOptions) {
|
|
301
|
+
return core.HttpResponsePromise.fromPromise(this.__updateAudience(planAudienceId, request, requestOptions));
|
|
302
|
+
}
|
|
303
|
+
__updateAudience(planAudienceId, request, requestOptions) {
|
|
304
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
305
|
+
var _a, _b, _c;
|
|
306
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
307
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
308
|
+
method: "PUT",
|
|
309
|
+
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),
|
|
310
|
+
contentType: "application/json",
|
|
311
|
+
requestType: "json",
|
|
312
|
+
body: serializers.UpdateAudienceRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
313
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
314
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
315
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
316
|
+
});
|
|
317
|
+
if (_response.ok) {
|
|
318
|
+
return {
|
|
319
|
+
data: serializers.UpdateAudienceResponse.parseOrThrow(_response.body, {
|
|
320
|
+
unrecognizedObjectKeys: "passthrough",
|
|
321
|
+
allowUnrecognizedUnionMembers: true,
|
|
322
|
+
allowUnrecognizedEnumValues: true,
|
|
323
|
+
skipValidation: true,
|
|
324
|
+
breadcrumbsPrefix: ["response"],
|
|
325
|
+
}),
|
|
326
|
+
rawResponse: _response.rawResponse,
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
if (_response.error.reason === "status-code") {
|
|
330
|
+
switch (_response.error.statusCode) {
|
|
331
|
+
case 400:
|
|
332
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
333
|
+
unrecognizedObjectKeys: "passthrough",
|
|
334
|
+
allowUnrecognizedUnionMembers: true,
|
|
335
|
+
allowUnrecognizedEnumValues: true,
|
|
336
|
+
skipValidation: true,
|
|
337
|
+
breadcrumbsPrefix: ["response"],
|
|
338
|
+
}), _response.rawResponse);
|
|
339
|
+
case 401:
|
|
340
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
341
|
+
unrecognizedObjectKeys: "passthrough",
|
|
342
|
+
allowUnrecognizedUnionMembers: true,
|
|
343
|
+
allowUnrecognizedEnumValues: true,
|
|
344
|
+
skipValidation: true,
|
|
345
|
+
breadcrumbsPrefix: ["response"],
|
|
346
|
+
}), _response.rawResponse);
|
|
347
|
+
case 403:
|
|
348
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
349
|
+
unrecognizedObjectKeys: "passthrough",
|
|
350
|
+
allowUnrecognizedUnionMembers: true,
|
|
351
|
+
allowUnrecognizedEnumValues: true,
|
|
352
|
+
skipValidation: true,
|
|
353
|
+
breadcrumbsPrefix: ["response"],
|
|
354
|
+
}), _response.rawResponse);
|
|
355
|
+
case 404:
|
|
356
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
357
|
+
unrecognizedObjectKeys: "passthrough",
|
|
358
|
+
allowUnrecognizedUnionMembers: true,
|
|
359
|
+
allowUnrecognizedEnumValues: true,
|
|
360
|
+
skipValidation: true,
|
|
361
|
+
breadcrumbsPrefix: ["response"],
|
|
362
|
+
}), _response.rawResponse);
|
|
363
|
+
case 500:
|
|
364
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
365
|
+
unrecognizedObjectKeys: "passthrough",
|
|
366
|
+
allowUnrecognizedUnionMembers: true,
|
|
367
|
+
allowUnrecognizedEnumValues: true,
|
|
368
|
+
skipValidation: true,
|
|
369
|
+
breadcrumbsPrefix: ["response"],
|
|
370
|
+
}), _response.rawResponse);
|
|
371
|
+
default:
|
|
372
|
+
throw new errors.SchematicError({
|
|
373
|
+
statusCode: _response.error.statusCode,
|
|
374
|
+
body: _response.error.body,
|
|
375
|
+
rawResponse: _response.rawResponse,
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
switch (_response.error.reason) {
|
|
380
|
+
case "non-json":
|
|
381
|
+
throw new errors.SchematicError({
|
|
382
|
+
statusCode: _response.error.statusCode,
|
|
383
|
+
body: _response.error.rawBody,
|
|
384
|
+
rawResponse: _response.rawResponse,
|
|
385
|
+
});
|
|
386
|
+
case "timeout":
|
|
387
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-audiences/{plan_audience_id}.");
|
|
388
|
+
case "unknown":
|
|
389
|
+
throw new errors.SchematicError({
|
|
390
|
+
message: _response.error.errorMessage,
|
|
391
|
+
rawResponse: _response.rawResponse,
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* @param {string} planAudienceId - plan_audience_id
|
|
398
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
399
|
+
*
|
|
400
|
+
* @throws {@link Schematic.BadRequestError}
|
|
401
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
402
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
403
|
+
* @throws {@link Schematic.NotFoundError}
|
|
404
|
+
* @throws {@link Schematic.InternalServerError}
|
|
405
|
+
*
|
|
406
|
+
* @example
|
|
407
|
+
* await client.plans.deleteAudience("plan_audience_id")
|
|
408
|
+
*/
|
|
409
|
+
deleteAudience(planAudienceId, requestOptions) {
|
|
410
|
+
return core.HttpResponsePromise.fromPromise(this.__deleteAudience(planAudienceId, requestOptions));
|
|
411
|
+
}
|
|
412
|
+
__deleteAudience(planAudienceId, requestOptions) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
var _a, _b, _c;
|
|
415
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
416
|
+
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, `plan-audiences/${encodeURIComponent(planAudienceId)}`),
|
|
417
|
+
method: "DELETE",
|
|
418
|
+
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),
|
|
419
|
+
contentType: "application/json",
|
|
420
|
+
requestType: "json",
|
|
421
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
422
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
423
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
424
|
+
});
|
|
425
|
+
if (_response.ok) {
|
|
426
|
+
return {
|
|
427
|
+
data: serializers.DeleteAudienceResponse.parseOrThrow(_response.body, {
|
|
428
|
+
unrecognizedObjectKeys: "passthrough",
|
|
429
|
+
allowUnrecognizedUnionMembers: true,
|
|
430
|
+
allowUnrecognizedEnumValues: true,
|
|
431
|
+
skipValidation: true,
|
|
432
|
+
breadcrumbsPrefix: ["response"],
|
|
433
|
+
}),
|
|
434
|
+
rawResponse: _response.rawResponse,
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
if (_response.error.reason === "status-code") {
|
|
438
|
+
switch (_response.error.statusCode) {
|
|
439
|
+
case 400:
|
|
440
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
441
|
+
unrecognizedObjectKeys: "passthrough",
|
|
442
|
+
allowUnrecognizedUnionMembers: true,
|
|
443
|
+
allowUnrecognizedEnumValues: true,
|
|
444
|
+
skipValidation: true,
|
|
445
|
+
breadcrumbsPrefix: ["response"],
|
|
446
|
+
}), _response.rawResponse);
|
|
447
|
+
case 401:
|
|
448
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
449
|
+
unrecognizedObjectKeys: "passthrough",
|
|
450
|
+
allowUnrecognizedUnionMembers: true,
|
|
451
|
+
allowUnrecognizedEnumValues: true,
|
|
452
|
+
skipValidation: true,
|
|
453
|
+
breadcrumbsPrefix: ["response"],
|
|
454
|
+
}), _response.rawResponse);
|
|
455
|
+
case 403:
|
|
456
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
457
|
+
unrecognizedObjectKeys: "passthrough",
|
|
458
|
+
allowUnrecognizedUnionMembers: true,
|
|
459
|
+
allowUnrecognizedEnumValues: true,
|
|
460
|
+
skipValidation: true,
|
|
461
|
+
breadcrumbsPrefix: ["response"],
|
|
462
|
+
}), _response.rawResponse);
|
|
463
|
+
case 404:
|
|
464
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
465
|
+
unrecognizedObjectKeys: "passthrough",
|
|
466
|
+
allowUnrecognizedUnionMembers: true,
|
|
467
|
+
allowUnrecognizedEnumValues: true,
|
|
468
|
+
skipValidation: true,
|
|
469
|
+
breadcrumbsPrefix: ["response"],
|
|
470
|
+
}), _response.rawResponse);
|
|
471
|
+
case 500:
|
|
472
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
473
|
+
unrecognizedObjectKeys: "passthrough",
|
|
474
|
+
allowUnrecognizedUnionMembers: true,
|
|
475
|
+
allowUnrecognizedEnumValues: true,
|
|
476
|
+
skipValidation: true,
|
|
477
|
+
breadcrumbsPrefix: ["response"],
|
|
478
|
+
}), _response.rawResponse);
|
|
479
|
+
default:
|
|
480
|
+
throw new errors.SchematicError({
|
|
481
|
+
statusCode: _response.error.statusCode,
|
|
482
|
+
body: _response.error.body,
|
|
483
|
+
rawResponse: _response.rawResponse,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
switch (_response.error.reason) {
|
|
488
|
+
case "non-json":
|
|
489
|
+
throw new errors.SchematicError({
|
|
490
|
+
statusCode: _response.error.statusCode,
|
|
491
|
+
body: _response.error.rawBody,
|
|
492
|
+
rawResponse: _response.rawResponse,
|
|
493
|
+
});
|
|
494
|
+
case "timeout":
|
|
495
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-audiences/{plan_audience_id}.");
|
|
496
|
+
case "unknown":
|
|
497
|
+
throw new errors.SchematicError({
|
|
498
|
+
message: _response.error.errorMessage,
|
|
499
|
+
rawResponse: _response.rawResponse,
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* @param {Schematic.ListPlanTraitsRequest} request
|
|
506
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
507
|
+
*
|
|
508
|
+
* @throws {@link Schematic.BadRequestError}
|
|
509
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
510
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
511
|
+
* @throws {@link Schematic.NotFoundError}
|
|
512
|
+
* @throws {@link Schematic.InternalServerError}
|
|
513
|
+
*
|
|
514
|
+
* @example
|
|
515
|
+
* await client.plans.listPlanTraits()
|
|
516
|
+
*/
|
|
517
|
+
listPlanTraits(request = {}, requestOptions) {
|
|
518
|
+
return core.HttpResponsePromise.fromPromise(this.__listPlanTraits(request, requestOptions));
|
|
519
|
+
}
|
|
520
|
+
__listPlanTraits() {
|
|
521
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
522
|
+
var _a, _b, _c;
|
|
523
|
+
const { ids, planId, traitId, limit, offset } = request;
|
|
524
|
+
const _queryParams = {};
|
|
525
|
+
if (ids != null) {
|
|
526
|
+
if (Array.isArray(ids)) {
|
|
527
|
+
_queryParams["ids"] = ids.map((item) => item);
|
|
528
|
+
}
|
|
529
|
+
else {
|
|
530
|
+
_queryParams["ids"] = ids;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
if (planId != null) {
|
|
534
|
+
_queryParams["plan_id"] = planId;
|
|
535
|
+
}
|
|
536
|
+
if (traitId != null) {
|
|
537
|
+
_queryParams["trait_id"] = traitId;
|
|
538
|
+
}
|
|
539
|
+
if (limit != null) {
|
|
540
|
+
_queryParams["limit"] = limit.toString();
|
|
541
|
+
}
|
|
542
|
+
if (offset != null) {
|
|
543
|
+
_queryParams["offset"] = offset.toString();
|
|
544
|
+
}
|
|
545
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
546
|
+
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, "plan-traits"),
|
|
547
|
+
method: "GET",
|
|
548
|
+
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),
|
|
549
|
+
contentType: "application/json",
|
|
550
|
+
queryParameters: _queryParams,
|
|
551
|
+
requestType: "json",
|
|
552
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
553
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
554
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
555
|
+
});
|
|
556
|
+
if (_response.ok) {
|
|
557
|
+
return {
|
|
558
|
+
data: serializers.ListPlanTraitsResponse.parseOrThrow(_response.body, {
|
|
559
|
+
unrecognizedObjectKeys: "passthrough",
|
|
560
|
+
allowUnrecognizedUnionMembers: true,
|
|
561
|
+
allowUnrecognizedEnumValues: true,
|
|
562
|
+
skipValidation: true,
|
|
563
|
+
breadcrumbsPrefix: ["response"],
|
|
564
|
+
}),
|
|
565
|
+
rawResponse: _response.rawResponse,
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
if (_response.error.reason === "status-code") {
|
|
569
|
+
switch (_response.error.statusCode) {
|
|
570
|
+
case 400:
|
|
571
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
572
|
+
unrecognizedObjectKeys: "passthrough",
|
|
573
|
+
allowUnrecognizedUnionMembers: true,
|
|
574
|
+
allowUnrecognizedEnumValues: true,
|
|
575
|
+
skipValidation: true,
|
|
576
|
+
breadcrumbsPrefix: ["response"],
|
|
577
|
+
}), _response.rawResponse);
|
|
578
|
+
case 401:
|
|
579
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
580
|
+
unrecognizedObjectKeys: "passthrough",
|
|
581
|
+
allowUnrecognizedUnionMembers: true,
|
|
582
|
+
allowUnrecognizedEnumValues: true,
|
|
583
|
+
skipValidation: true,
|
|
584
|
+
breadcrumbsPrefix: ["response"],
|
|
585
|
+
}), _response.rawResponse);
|
|
586
|
+
case 403:
|
|
587
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
588
|
+
unrecognizedObjectKeys: "passthrough",
|
|
589
|
+
allowUnrecognizedUnionMembers: true,
|
|
590
|
+
allowUnrecognizedEnumValues: true,
|
|
591
|
+
skipValidation: true,
|
|
592
|
+
breadcrumbsPrefix: ["response"],
|
|
593
|
+
}), _response.rawResponse);
|
|
594
|
+
case 404:
|
|
595
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
596
|
+
unrecognizedObjectKeys: "passthrough",
|
|
597
|
+
allowUnrecognizedUnionMembers: true,
|
|
598
|
+
allowUnrecognizedEnumValues: true,
|
|
599
|
+
skipValidation: true,
|
|
600
|
+
breadcrumbsPrefix: ["response"],
|
|
601
|
+
}), _response.rawResponse);
|
|
602
|
+
case 500:
|
|
603
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
604
|
+
unrecognizedObjectKeys: "passthrough",
|
|
605
|
+
allowUnrecognizedUnionMembers: true,
|
|
606
|
+
allowUnrecognizedEnumValues: true,
|
|
607
|
+
skipValidation: true,
|
|
608
|
+
breadcrumbsPrefix: ["response"],
|
|
609
|
+
}), _response.rawResponse);
|
|
610
|
+
default:
|
|
611
|
+
throw new errors.SchematicError({
|
|
612
|
+
statusCode: _response.error.statusCode,
|
|
613
|
+
body: _response.error.body,
|
|
614
|
+
rawResponse: _response.rawResponse,
|
|
615
|
+
});
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
switch (_response.error.reason) {
|
|
619
|
+
case "non-json":
|
|
620
|
+
throw new errors.SchematicError({
|
|
621
|
+
statusCode: _response.error.statusCode,
|
|
622
|
+
body: _response.error.rawBody,
|
|
623
|
+
rawResponse: _response.rawResponse,
|
|
624
|
+
});
|
|
625
|
+
case "timeout":
|
|
626
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits.");
|
|
627
|
+
case "unknown":
|
|
628
|
+
throw new errors.SchematicError({
|
|
629
|
+
message: _response.error.errorMessage,
|
|
630
|
+
rawResponse: _response.rawResponse,
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
/**
|
|
636
|
+
* @param {Schematic.CreatePlanTraitRequestBody} request
|
|
637
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
638
|
+
*
|
|
639
|
+
* @throws {@link Schematic.BadRequestError}
|
|
640
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
641
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
642
|
+
* @throws {@link Schematic.NotFoundError}
|
|
643
|
+
* @throws {@link Schematic.InternalServerError}
|
|
644
|
+
*
|
|
645
|
+
* @example
|
|
646
|
+
* await client.plans.createPlanTrait({
|
|
647
|
+
* planId: "plan_id",
|
|
648
|
+
* traitId: "trait_id",
|
|
649
|
+
* traitValue: "trait_value"
|
|
650
|
+
* })
|
|
651
|
+
*/
|
|
652
|
+
createPlanTrait(request, requestOptions) {
|
|
653
|
+
return core.HttpResponsePromise.fromPromise(this.__createPlanTrait(request, requestOptions));
|
|
654
|
+
}
|
|
655
|
+
__createPlanTrait(request, requestOptions) {
|
|
79
656
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
657
|
var _a, _b, _c;
|
|
81
658
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
82
|
-
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,
|
|
83
|
-
method: "
|
|
84
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
659
|
+
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, "plan-traits"),
|
|
660
|
+
method: "POST",
|
|
661
|
+
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),
|
|
85
662
|
contentType: "application/json",
|
|
86
663
|
requestType: "json",
|
|
87
|
-
body: serializers.
|
|
664
|
+
body: serializers.CreatePlanTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
88
665
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
89
666
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
90
667
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
668
|
});
|
|
92
669
|
if (_response.ok) {
|
|
93
|
-
return
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
670
|
+
return {
|
|
671
|
+
data: serializers.CreatePlanTraitResponse.parseOrThrow(_response.body, {
|
|
672
|
+
unrecognizedObjectKeys: "passthrough",
|
|
673
|
+
allowUnrecognizedUnionMembers: true,
|
|
674
|
+
allowUnrecognizedEnumValues: true,
|
|
675
|
+
skipValidation: true,
|
|
676
|
+
breadcrumbsPrefix: ["response"],
|
|
677
|
+
}),
|
|
678
|
+
rawResponse: _response.rawResponse,
|
|
679
|
+
};
|
|
100
680
|
}
|
|
101
681
|
if (_response.error.reason === "status-code") {
|
|
102
682
|
switch (_response.error.statusCode) {
|
|
@@ -107,7 +687,7 @@ class Plans {
|
|
|
107
687
|
allowUnrecognizedEnumValues: true,
|
|
108
688
|
skipValidation: true,
|
|
109
689
|
breadcrumbsPrefix: ["response"],
|
|
110
|
-
}));
|
|
690
|
+
}), _response.rawResponse);
|
|
111
691
|
case 401:
|
|
112
692
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
113
693
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -115,7 +695,7 @@ class Plans {
|
|
|
115
695
|
allowUnrecognizedEnumValues: true,
|
|
116
696
|
skipValidation: true,
|
|
117
697
|
breadcrumbsPrefix: ["response"],
|
|
118
|
-
}));
|
|
698
|
+
}), _response.rawResponse);
|
|
119
699
|
case 403:
|
|
120
700
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
121
701
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -123,7 +703,7 @@ class Plans {
|
|
|
123
703
|
allowUnrecognizedEnumValues: true,
|
|
124
704
|
skipValidation: true,
|
|
125
705
|
breadcrumbsPrefix: ["response"],
|
|
126
|
-
}));
|
|
706
|
+
}), _response.rawResponse);
|
|
127
707
|
case 404:
|
|
128
708
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
129
709
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -131,7 +711,7 @@ class Plans {
|
|
|
131
711
|
allowUnrecognizedEnumValues: true,
|
|
132
712
|
skipValidation: true,
|
|
133
713
|
breadcrumbsPrefix: ["response"],
|
|
134
|
-
}));
|
|
714
|
+
}), _response.rawResponse);
|
|
135
715
|
case 500:
|
|
136
716
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
137
717
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -139,11 +719,12 @@ class Plans {
|
|
|
139
719
|
allowUnrecognizedEnumValues: true,
|
|
140
720
|
skipValidation: true,
|
|
141
721
|
breadcrumbsPrefix: ["response"],
|
|
142
|
-
}));
|
|
722
|
+
}), _response.rawResponse);
|
|
143
723
|
default:
|
|
144
724
|
throw new errors.SchematicError({
|
|
145
725
|
statusCode: _response.error.statusCode,
|
|
146
726
|
body: _response.error.body,
|
|
727
|
+
rawResponse: _response.rawResponse,
|
|
147
728
|
});
|
|
148
729
|
}
|
|
149
730
|
}
|
|
@@ -152,18 +733,20 @@ class Plans {
|
|
|
152
733
|
throw new errors.SchematicError({
|
|
153
734
|
statusCode: _response.error.statusCode,
|
|
154
735
|
body: _response.error.rawBody,
|
|
736
|
+
rawResponse: _response.rawResponse,
|
|
155
737
|
});
|
|
156
738
|
case "timeout":
|
|
157
|
-
throw new errors.SchematicTimeoutError("Timeout exceeded when calling
|
|
739
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plan-traits.");
|
|
158
740
|
case "unknown":
|
|
159
741
|
throw new errors.SchematicError({
|
|
160
742
|
message: _response.error.errorMessage,
|
|
743
|
+
rawResponse: _response.rawResponse,
|
|
161
744
|
});
|
|
162
745
|
}
|
|
163
746
|
});
|
|
164
747
|
}
|
|
165
748
|
/**
|
|
166
|
-
* @param {string}
|
|
749
|
+
* @param {string} planTraitId - plan_trait_id
|
|
167
750
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
168
751
|
*
|
|
169
752
|
* @throws {@link Schematic.UnauthorizedError}
|
|
@@ -172,15 +755,18 @@ class Plans {
|
|
|
172
755
|
* @throws {@link Schematic.InternalServerError}
|
|
173
756
|
*
|
|
174
757
|
* @example
|
|
175
|
-
* await client.plans.
|
|
758
|
+
* await client.plans.getPlanTrait("plan_trait_id")
|
|
176
759
|
*/
|
|
177
|
-
|
|
760
|
+
getPlanTrait(planTraitId, requestOptions) {
|
|
761
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlanTrait(planTraitId, requestOptions));
|
|
762
|
+
}
|
|
763
|
+
__getPlanTrait(planTraitId, requestOptions) {
|
|
178
764
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
765
|
var _a, _b, _c;
|
|
180
766
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
181
|
-
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, `plan-
|
|
767
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
182
768
|
method: "GET",
|
|
183
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
769
|
+
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),
|
|
184
770
|
contentType: "application/json",
|
|
185
771
|
requestType: "json",
|
|
186
772
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -188,13 +774,16 @@ class Plans {
|
|
|
188
774
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
189
775
|
});
|
|
190
776
|
if (_response.ok) {
|
|
191
|
-
return
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
777
|
+
return {
|
|
778
|
+
data: serializers.GetPlanTraitResponse.parseOrThrow(_response.body, {
|
|
779
|
+
unrecognizedObjectKeys: "passthrough",
|
|
780
|
+
allowUnrecognizedUnionMembers: true,
|
|
781
|
+
allowUnrecognizedEnumValues: true,
|
|
782
|
+
skipValidation: true,
|
|
783
|
+
breadcrumbsPrefix: ["response"],
|
|
784
|
+
}),
|
|
785
|
+
rawResponse: _response.rawResponse,
|
|
786
|
+
};
|
|
198
787
|
}
|
|
199
788
|
if (_response.error.reason === "status-code") {
|
|
200
789
|
switch (_response.error.statusCode) {
|
|
@@ -205,7 +794,7 @@ class Plans {
|
|
|
205
794
|
allowUnrecognizedEnumValues: true,
|
|
206
795
|
skipValidation: true,
|
|
207
796
|
breadcrumbsPrefix: ["response"],
|
|
208
|
-
}));
|
|
797
|
+
}), _response.rawResponse);
|
|
209
798
|
case 403:
|
|
210
799
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
211
800
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -213,7 +802,7 @@ class Plans {
|
|
|
213
802
|
allowUnrecognizedEnumValues: true,
|
|
214
803
|
skipValidation: true,
|
|
215
804
|
breadcrumbsPrefix: ["response"],
|
|
216
|
-
}));
|
|
805
|
+
}), _response.rawResponse);
|
|
217
806
|
case 404:
|
|
218
807
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
219
808
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -221,7 +810,7 @@ class Plans {
|
|
|
221
810
|
allowUnrecognizedEnumValues: true,
|
|
222
811
|
skipValidation: true,
|
|
223
812
|
breadcrumbsPrefix: ["response"],
|
|
224
|
-
}));
|
|
813
|
+
}), _response.rawResponse);
|
|
225
814
|
case 500:
|
|
226
815
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
227
816
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -229,11 +818,12 @@ class Plans {
|
|
|
229
818
|
allowUnrecognizedEnumValues: true,
|
|
230
819
|
skipValidation: true,
|
|
231
820
|
breadcrumbsPrefix: ["response"],
|
|
232
|
-
}));
|
|
821
|
+
}), _response.rawResponse);
|
|
233
822
|
default:
|
|
234
823
|
throw new errors.SchematicError({
|
|
235
824
|
statusCode: _response.error.statusCode,
|
|
236
825
|
body: _response.error.body,
|
|
826
|
+
rawResponse: _response.rawResponse,
|
|
237
827
|
});
|
|
238
828
|
}
|
|
239
829
|
}
|
|
@@ -242,19 +832,21 @@ class Plans {
|
|
|
242
832
|
throw new errors.SchematicError({
|
|
243
833
|
statusCode: _response.error.statusCode,
|
|
244
834
|
body: _response.error.rawBody,
|
|
835
|
+
rawResponse: _response.rawResponse,
|
|
245
836
|
});
|
|
246
837
|
case "timeout":
|
|
247
|
-
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-
|
|
838
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits/{plan_trait_id}.");
|
|
248
839
|
case "unknown":
|
|
249
840
|
throw new errors.SchematicError({
|
|
250
841
|
message: _response.error.errorMessage,
|
|
842
|
+
rawResponse: _response.rawResponse,
|
|
251
843
|
});
|
|
252
844
|
}
|
|
253
845
|
});
|
|
254
846
|
}
|
|
255
847
|
/**
|
|
256
|
-
* @param {string}
|
|
257
|
-
* @param {Schematic.
|
|
848
|
+
* @param {string} planTraitId - plan_trait_id
|
|
849
|
+
* @param {Schematic.UpdatePlanTraitRequestBody} request
|
|
258
850
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
259
851
|
*
|
|
260
852
|
* @throws {@link Schematic.BadRequestError}
|
|
@@ -264,43 +856,39 @@ class Plans {
|
|
|
264
856
|
* @throws {@link Schematic.InternalServerError}
|
|
265
857
|
*
|
|
266
858
|
* @example
|
|
267
|
-
* await client.plans.
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
* conditionType: "company",
|
|
271
|
-
* operator: "eq",
|
|
272
|
-
* resourceIds: ["resource_ids"]
|
|
273
|
-
* }]
|
|
274
|
-
* }],
|
|
275
|
-
* conditions: [{
|
|
276
|
-
* conditionType: "company",
|
|
277
|
-
* operator: "eq",
|
|
278
|
-
* resourceIds: ["resource_ids"]
|
|
279
|
-
* }]
|
|
859
|
+
* await client.plans.updatePlanTrait("plan_trait_id", {
|
|
860
|
+
* planId: "plan_id",
|
|
861
|
+
* traitValue: "trait_value"
|
|
280
862
|
* })
|
|
281
863
|
*/
|
|
282
|
-
|
|
864
|
+
updatePlanTrait(planTraitId, request, requestOptions) {
|
|
865
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePlanTrait(planTraitId, request, requestOptions));
|
|
866
|
+
}
|
|
867
|
+
__updatePlanTrait(planTraitId, request, requestOptions) {
|
|
283
868
|
return __awaiter(this, void 0, void 0, function* () {
|
|
284
869
|
var _a, _b, _c;
|
|
285
870
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
286
|
-
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, `plan-
|
|
871
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
287
872
|
method: "PUT",
|
|
288
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
873
|
+
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),
|
|
289
874
|
contentType: "application/json",
|
|
290
875
|
requestType: "json",
|
|
291
|
-
body: serializers.
|
|
876
|
+
body: serializers.UpdatePlanTraitRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
292
877
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
293
878
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
294
879
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
295
880
|
});
|
|
296
881
|
if (_response.ok) {
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
882
|
+
return {
|
|
883
|
+
data: serializers.UpdatePlanTraitResponse.parseOrThrow(_response.body, {
|
|
884
|
+
unrecognizedObjectKeys: "passthrough",
|
|
885
|
+
allowUnrecognizedUnionMembers: true,
|
|
886
|
+
allowUnrecognizedEnumValues: true,
|
|
887
|
+
skipValidation: true,
|
|
888
|
+
breadcrumbsPrefix: ["response"],
|
|
889
|
+
}),
|
|
890
|
+
rawResponse: _response.rawResponse,
|
|
891
|
+
};
|
|
304
892
|
}
|
|
305
893
|
if (_response.error.reason === "status-code") {
|
|
306
894
|
switch (_response.error.statusCode) {
|
|
@@ -311,7 +899,7 @@ class Plans {
|
|
|
311
899
|
allowUnrecognizedEnumValues: true,
|
|
312
900
|
skipValidation: true,
|
|
313
901
|
breadcrumbsPrefix: ["response"],
|
|
314
|
-
}));
|
|
902
|
+
}), _response.rawResponse);
|
|
315
903
|
case 401:
|
|
316
904
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
317
905
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -319,7 +907,7 @@ class Plans {
|
|
|
319
907
|
allowUnrecognizedEnumValues: true,
|
|
320
908
|
skipValidation: true,
|
|
321
909
|
breadcrumbsPrefix: ["response"],
|
|
322
|
-
}));
|
|
910
|
+
}), _response.rawResponse);
|
|
323
911
|
case 403:
|
|
324
912
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
325
913
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -327,7 +915,7 @@ class Plans {
|
|
|
327
915
|
allowUnrecognizedEnumValues: true,
|
|
328
916
|
skipValidation: true,
|
|
329
917
|
breadcrumbsPrefix: ["response"],
|
|
330
|
-
}));
|
|
918
|
+
}), _response.rawResponse);
|
|
331
919
|
case 404:
|
|
332
920
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
333
921
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -335,7 +923,7 @@ class Plans {
|
|
|
335
923
|
allowUnrecognizedEnumValues: true,
|
|
336
924
|
skipValidation: true,
|
|
337
925
|
breadcrumbsPrefix: ["response"],
|
|
338
|
-
}));
|
|
926
|
+
}), _response.rawResponse);
|
|
339
927
|
case 500:
|
|
340
928
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
341
929
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -343,11 +931,12 @@ class Plans {
|
|
|
343
931
|
allowUnrecognizedEnumValues: true,
|
|
344
932
|
skipValidation: true,
|
|
345
933
|
breadcrumbsPrefix: ["response"],
|
|
346
|
-
}));
|
|
934
|
+
}), _response.rawResponse);
|
|
347
935
|
default:
|
|
348
936
|
throw new errors.SchematicError({
|
|
349
937
|
statusCode: _response.error.statusCode,
|
|
350
938
|
body: _response.error.body,
|
|
939
|
+
rawResponse: _response.rawResponse,
|
|
351
940
|
});
|
|
352
941
|
}
|
|
353
942
|
}
|
|
@@ -356,35 +945,41 @@ class Plans {
|
|
|
356
945
|
throw new errors.SchematicError({
|
|
357
946
|
statusCode: _response.error.statusCode,
|
|
358
947
|
body: _response.error.rawBody,
|
|
948
|
+
rawResponse: _response.rawResponse,
|
|
359
949
|
});
|
|
360
950
|
case "timeout":
|
|
361
|
-
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-
|
|
951
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plan-traits/{plan_trait_id}.");
|
|
362
952
|
case "unknown":
|
|
363
953
|
throw new errors.SchematicError({
|
|
364
954
|
message: _response.error.errorMessage,
|
|
955
|
+
rawResponse: _response.rawResponse,
|
|
365
956
|
});
|
|
366
957
|
}
|
|
367
958
|
});
|
|
368
959
|
}
|
|
369
960
|
/**
|
|
370
|
-
* @param {string}
|
|
961
|
+
* @param {string} planTraitId - plan_trait_id
|
|
371
962
|
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
372
963
|
*
|
|
373
964
|
* @throws {@link Schematic.BadRequestError}
|
|
374
965
|
* @throws {@link Schematic.UnauthorizedError}
|
|
375
966
|
* @throws {@link Schematic.ForbiddenError}
|
|
967
|
+
* @throws {@link Schematic.NotFoundError}
|
|
376
968
|
* @throws {@link Schematic.InternalServerError}
|
|
377
969
|
*
|
|
378
970
|
* @example
|
|
379
|
-
* await client.plans.
|
|
971
|
+
* await client.plans.deletePlanTrait("plan_trait_id")
|
|
380
972
|
*/
|
|
381
|
-
|
|
973
|
+
deletePlanTrait(planTraitId, requestOptions) {
|
|
974
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePlanTrait(planTraitId, requestOptions));
|
|
975
|
+
}
|
|
976
|
+
__deletePlanTrait(planTraitId, requestOptions) {
|
|
382
977
|
return __awaiter(this, void 0, void 0, function* () {
|
|
383
978
|
var _a, _b, _c;
|
|
384
979
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
385
|
-
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, `plan-
|
|
980
|
+
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, `plan-traits/${encodeURIComponent(planTraitId)}`),
|
|
386
981
|
method: "DELETE",
|
|
387
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
982
|
+
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),
|
|
388
983
|
contentType: "application/json",
|
|
389
984
|
requestType: "json",
|
|
390
985
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -392,13 +987,16 @@ class Plans {
|
|
|
392
987
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
393
988
|
});
|
|
394
989
|
if (_response.ok) {
|
|
395
|
-
return
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
990
|
+
return {
|
|
991
|
+
data: serializers.DeletePlanTraitResponse.parseOrThrow(_response.body, {
|
|
992
|
+
unrecognizedObjectKeys: "passthrough",
|
|
993
|
+
allowUnrecognizedUnionMembers: true,
|
|
994
|
+
allowUnrecognizedEnumValues: true,
|
|
995
|
+
skipValidation: true,
|
|
996
|
+
breadcrumbsPrefix: ["response"],
|
|
997
|
+
}),
|
|
998
|
+
rawResponse: _response.rawResponse,
|
|
999
|
+
};
|
|
402
1000
|
}
|
|
403
1001
|
if (_response.error.reason === "status-code") {
|
|
404
1002
|
switch (_response.error.statusCode) {
|
|
@@ -409,7 +1007,7 @@ class Plans {
|
|
|
409
1007
|
allowUnrecognizedEnumValues: true,
|
|
410
1008
|
skipValidation: true,
|
|
411
1009
|
breadcrumbsPrefix: ["response"],
|
|
412
|
-
}));
|
|
1010
|
+
}), _response.rawResponse);
|
|
413
1011
|
case 401:
|
|
414
1012
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
415
1013
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -417,7 +1015,7 @@ class Plans {
|
|
|
417
1015
|
allowUnrecognizedEnumValues: true,
|
|
418
1016
|
skipValidation: true,
|
|
419
1017
|
breadcrumbsPrefix: ["response"],
|
|
420
|
-
}));
|
|
1018
|
+
}), _response.rawResponse);
|
|
421
1019
|
case 403:
|
|
422
1020
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
423
1021
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -425,7 +1023,15 @@ class Plans {
|
|
|
425
1023
|
allowUnrecognizedEnumValues: true,
|
|
426
1024
|
skipValidation: true,
|
|
427
1025
|
breadcrumbsPrefix: ["response"],
|
|
428
|
-
}));
|
|
1026
|
+
}), _response.rawResponse);
|
|
1027
|
+
case 404:
|
|
1028
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1029
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1030
|
+
allowUnrecognizedUnionMembers: true,
|
|
1031
|
+
allowUnrecognizedEnumValues: true,
|
|
1032
|
+
skipValidation: true,
|
|
1033
|
+
breadcrumbsPrefix: ["response"],
|
|
1034
|
+
}), _response.rawResponse);
|
|
429
1035
|
case 500:
|
|
430
1036
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
431
1037
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -433,11 +1039,12 @@ class Plans {
|
|
|
433
1039
|
allowUnrecognizedEnumValues: true,
|
|
434
1040
|
skipValidation: true,
|
|
435
1041
|
breadcrumbsPrefix: ["response"],
|
|
436
|
-
}));
|
|
1042
|
+
}), _response.rawResponse);
|
|
437
1043
|
default:
|
|
438
1044
|
throw new errors.SchematicError({
|
|
439
1045
|
statusCode: _response.error.statusCode,
|
|
440
1046
|
body: _response.error.body,
|
|
1047
|
+
rawResponse: _response.rawResponse,
|
|
441
1048
|
});
|
|
442
1049
|
}
|
|
443
1050
|
}
|
|
@@ -446,12 +1053,145 @@ class Plans {
|
|
|
446
1053
|
throw new errors.SchematicError({
|
|
447
1054
|
statusCode: _response.error.statusCode,
|
|
448
1055
|
body: _response.error.rawBody,
|
|
1056
|
+
rawResponse: _response.rawResponse,
|
|
449
1057
|
});
|
|
450
1058
|
case "timeout":
|
|
451
|
-
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-
|
|
1059
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plan-traits/{plan_trait_id}.");
|
|
1060
|
+
case "unknown":
|
|
1061
|
+
throw new errors.SchematicError({
|
|
1062
|
+
message: _response.error.errorMessage,
|
|
1063
|
+
rawResponse: _response.rawResponse,
|
|
1064
|
+
});
|
|
1065
|
+
}
|
|
1066
|
+
});
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* @param {Schematic.CountPlanTraitsRequest} request
|
|
1070
|
+
* @param {Plans.RequestOptions} requestOptions - Request-specific configuration.
|
|
1071
|
+
*
|
|
1072
|
+
* @throws {@link Schematic.BadRequestError}
|
|
1073
|
+
* @throws {@link Schematic.UnauthorizedError}
|
|
1074
|
+
* @throws {@link Schematic.ForbiddenError}
|
|
1075
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1076
|
+
* @throws {@link Schematic.InternalServerError}
|
|
1077
|
+
*
|
|
1078
|
+
* @example
|
|
1079
|
+
* await client.plans.countPlanTraits()
|
|
1080
|
+
*/
|
|
1081
|
+
countPlanTraits(request = {}, requestOptions) {
|
|
1082
|
+
return core.HttpResponsePromise.fromPromise(this.__countPlanTraits(request, requestOptions));
|
|
1083
|
+
}
|
|
1084
|
+
__countPlanTraits() {
|
|
1085
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1086
|
+
var _a, _b, _c;
|
|
1087
|
+
const { ids, planId, traitId, limit, offset } = request;
|
|
1088
|
+
const _queryParams = {};
|
|
1089
|
+
if (ids != null) {
|
|
1090
|
+
if (Array.isArray(ids)) {
|
|
1091
|
+
_queryParams["ids"] = ids.map((item) => item);
|
|
1092
|
+
}
|
|
1093
|
+
else {
|
|
1094
|
+
_queryParams["ids"] = ids;
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
if (planId != null) {
|
|
1098
|
+
_queryParams["plan_id"] = planId;
|
|
1099
|
+
}
|
|
1100
|
+
if (traitId != null) {
|
|
1101
|
+
_queryParams["trait_id"] = traitId;
|
|
1102
|
+
}
|
|
1103
|
+
if (limit != null) {
|
|
1104
|
+
_queryParams["limit"] = limit.toString();
|
|
1105
|
+
}
|
|
1106
|
+
if (offset != null) {
|
|
1107
|
+
_queryParams["offset"] = offset.toString();
|
|
1108
|
+
}
|
|
1109
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1110
|
+
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, "plan-traits/count"),
|
|
1111
|
+
method: "GET",
|
|
1112
|
+
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),
|
|
1113
|
+
contentType: "application/json",
|
|
1114
|
+
queryParameters: _queryParams,
|
|
1115
|
+
requestType: "json",
|
|
1116
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
1117
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
1118
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1119
|
+
});
|
|
1120
|
+
if (_response.ok) {
|
|
1121
|
+
return {
|
|
1122
|
+
data: serializers.CountPlanTraitsResponse.parseOrThrow(_response.body, {
|
|
1123
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1124
|
+
allowUnrecognizedUnionMembers: true,
|
|
1125
|
+
allowUnrecognizedEnumValues: true,
|
|
1126
|
+
skipValidation: true,
|
|
1127
|
+
breadcrumbsPrefix: ["response"],
|
|
1128
|
+
}),
|
|
1129
|
+
rawResponse: _response.rawResponse,
|
|
1130
|
+
};
|
|
1131
|
+
}
|
|
1132
|
+
if (_response.error.reason === "status-code") {
|
|
1133
|
+
switch (_response.error.statusCode) {
|
|
1134
|
+
case 400:
|
|
1135
|
+
throw new Schematic.BadRequestError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1136
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1137
|
+
allowUnrecognizedUnionMembers: true,
|
|
1138
|
+
allowUnrecognizedEnumValues: true,
|
|
1139
|
+
skipValidation: true,
|
|
1140
|
+
breadcrumbsPrefix: ["response"],
|
|
1141
|
+
}), _response.rawResponse);
|
|
1142
|
+
case 401:
|
|
1143
|
+
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1144
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1145
|
+
allowUnrecognizedUnionMembers: true,
|
|
1146
|
+
allowUnrecognizedEnumValues: true,
|
|
1147
|
+
skipValidation: true,
|
|
1148
|
+
breadcrumbsPrefix: ["response"],
|
|
1149
|
+
}), _response.rawResponse);
|
|
1150
|
+
case 403:
|
|
1151
|
+
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1152
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1153
|
+
allowUnrecognizedUnionMembers: true,
|
|
1154
|
+
allowUnrecognizedEnumValues: true,
|
|
1155
|
+
skipValidation: true,
|
|
1156
|
+
breadcrumbsPrefix: ["response"],
|
|
1157
|
+
}), _response.rawResponse);
|
|
1158
|
+
case 404:
|
|
1159
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1160
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1161
|
+
allowUnrecognizedUnionMembers: true,
|
|
1162
|
+
allowUnrecognizedEnumValues: true,
|
|
1163
|
+
skipValidation: true,
|
|
1164
|
+
breadcrumbsPrefix: ["response"],
|
|
1165
|
+
}), _response.rawResponse);
|
|
1166
|
+
case 500:
|
|
1167
|
+
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1168
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1169
|
+
allowUnrecognizedUnionMembers: true,
|
|
1170
|
+
allowUnrecognizedEnumValues: true,
|
|
1171
|
+
skipValidation: true,
|
|
1172
|
+
breadcrumbsPrefix: ["response"],
|
|
1173
|
+
}), _response.rawResponse);
|
|
1174
|
+
default:
|
|
1175
|
+
throw new errors.SchematicError({
|
|
1176
|
+
statusCode: _response.error.statusCode,
|
|
1177
|
+
body: _response.error.body,
|
|
1178
|
+
rawResponse: _response.rawResponse,
|
|
1179
|
+
});
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
switch (_response.error.reason) {
|
|
1183
|
+
case "non-json":
|
|
1184
|
+
throw new errors.SchematicError({
|
|
1185
|
+
statusCode: _response.error.statusCode,
|
|
1186
|
+
body: _response.error.rawBody,
|
|
1187
|
+
rawResponse: _response.rawResponse,
|
|
1188
|
+
});
|
|
1189
|
+
case "timeout":
|
|
1190
|
+
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plan-traits/count.");
|
|
452
1191
|
case "unknown":
|
|
453
1192
|
throw new errors.SchematicError({
|
|
454
1193
|
message: _response.error.errorMessage,
|
|
1194
|
+
rawResponse: _response.rawResponse,
|
|
455
1195
|
});
|
|
456
1196
|
}
|
|
457
1197
|
});
|
|
@@ -463,12 +1203,16 @@ class Plans {
|
|
|
463
1203
|
* @throws {@link Schematic.BadRequestError}
|
|
464
1204
|
* @throws {@link Schematic.UnauthorizedError}
|
|
465
1205
|
* @throws {@link Schematic.ForbiddenError}
|
|
1206
|
+
* @throws {@link Schematic.NotFoundError}
|
|
466
1207
|
* @throws {@link Schematic.InternalServerError}
|
|
467
1208
|
*
|
|
468
1209
|
* @example
|
|
469
1210
|
* await client.plans.listPlans()
|
|
470
1211
|
*/
|
|
471
|
-
listPlans() {
|
|
1212
|
+
listPlans(request = {}, requestOptions) {
|
|
1213
|
+
return core.HttpResponsePromise.fromPromise(this.__listPlans(request, requestOptions));
|
|
1214
|
+
}
|
|
1215
|
+
__listPlans() {
|
|
472
1216
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
473
1217
|
var _a, _b, _c;
|
|
474
1218
|
const { companyId, hasProductId, ids, planType, q, withoutEntitlementFor, withoutProductId, withoutPaidProductId, limit, offset, } = request;
|
|
@@ -513,7 +1257,7 @@ class Plans {
|
|
|
513
1257
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
514
1258
|
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, "plans"),
|
|
515
1259
|
method: "GET",
|
|
516
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1260
|
+
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),
|
|
517
1261
|
contentType: "application/json",
|
|
518
1262
|
queryParameters: _queryParams,
|
|
519
1263
|
requestType: "json",
|
|
@@ -522,13 +1266,16 @@ class Plans {
|
|
|
522
1266
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
523
1267
|
});
|
|
524
1268
|
if (_response.ok) {
|
|
525
|
-
return
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
1269
|
+
return {
|
|
1270
|
+
data: serializers.ListPlansResponse.parseOrThrow(_response.body, {
|
|
1271
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1272
|
+
allowUnrecognizedUnionMembers: true,
|
|
1273
|
+
allowUnrecognizedEnumValues: true,
|
|
1274
|
+
skipValidation: true,
|
|
1275
|
+
breadcrumbsPrefix: ["response"],
|
|
1276
|
+
}),
|
|
1277
|
+
rawResponse: _response.rawResponse,
|
|
1278
|
+
};
|
|
532
1279
|
}
|
|
533
1280
|
if (_response.error.reason === "status-code") {
|
|
534
1281
|
switch (_response.error.statusCode) {
|
|
@@ -539,7 +1286,7 @@ class Plans {
|
|
|
539
1286
|
allowUnrecognizedEnumValues: true,
|
|
540
1287
|
skipValidation: true,
|
|
541
1288
|
breadcrumbsPrefix: ["response"],
|
|
542
|
-
}));
|
|
1289
|
+
}), _response.rawResponse);
|
|
543
1290
|
case 401:
|
|
544
1291
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
545
1292
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -547,7 +1294,7 @@ class Plans {
|
|
|
547
1294
|
allowUnrecognizedEnumValues: true,
|
|
548
1295
|
skipValidation: true,
|
|
549
1296
|
breadcrumbsPrefix: ["response"],
|
|
550
|
-
}));
|
|
1297
|
+
}), _response.rawResponse);
|
|
551
1298
|
case 403:
|
|
552
1299
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
553
1300
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -555,7 +1302,15 @@ class Plans {
|
|
|
555
1302
|
allowUnrecognizedEnumValues: true,
|
|
556
1303
|
skipValidation: true,
|
|
557
1304
|
breadcrumbsPrefix: ["response"],
|
|
558
|
-
}));
|
|
1305
|
+
}), _response.rawResponse);
|
|
1306
|
+
case 404:
|
|
1307
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1308
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1309
|
+
allowUnrecognizedUnionMembers: true,
|
|
1310
|
+
allowUnrecognizedEnumValues: true,
|
|
1311
|
+
skipValidation: true,
|
|
1312
|
+
breadcrumbsPrefix: ["response"],
|
|
1313
|
+
}), _response.rawResponse);
|
|
559
1314
|
case 500:
|
|
560
1315
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
561
1316
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -563,11 +1318,12 @@ class Plans {
|
|
|
563
1318
|
allowUnrecognizedEnumValues: true,
|
|
564
1319
|
skipValidation: true,
|
|
565
1320
|
breadcrumbsPrefix: ["response"],
|
|
566
|
-
}));
|
|
1321
|
+
}), _response.rawResponse);
|
|
567
1322
|
default:
|
|
568
1323
|
throw new errors.SchematicError({
|
|
569
1324
|
statusCode: _response.error.statusCode,
|
|
570
1325
|
body: _response.error.body,
|
|
1326
|
+
rawResponse: _response.rawResponse,
|
|
571
1327
|
});
|
|
572
1328
|
}
|
|
573
1329
|
}
|
|
@@ -576,12 +1332,14 @@ class Plans {
|
|
|
576
1332
|
throw new errors.SchematicError({
|
|
577
1333
|
statusCode: _response.error.statusCode,
|
|
578
1334
|
body: _response.error.rawBody,
|
|
1335
|
+
rawResponse: _response.rawResponse,
|
|
579
1336
|
});
|
|
580
1337
|
case "timeout":
|
|
581
1338
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans.");
|
|
582
1339
|
case "unknown":
|
|
583
1340
|
throw new errors.SchematicError({
|
|
584
1341
|
message: _response.error.errorMessage,
|
|
1342
|
+
rawResponse: _response.rawResponse,
|
|
585
1343
|
});
|
|
586
1344
|
}
|
|
587
1345
|
});
|
|
@@ -593,6 +1351,7 @@ class Plans {
|
|
|
593
1351
|
* @throws {@link Schematic.BadRequestError}
|
|
594
1352
|
* @throws {@link Schematic.UnauthorizedError}
|
|
595
1353
|
* @throws {@link Schematic.ForbiddenError}
|
|
1354
|
+
* @throws {@link Schematic.NotFoundError}
|
|
596
1355
|
* @throws {@link Schematic.InternalServerError}
|
|
597
1356
|
*
|
|
598
1357
|
* @example
|
|
@@ -603,12 +1362,15 @@ class Plans {
|
|
|
603
1362
|
* })
|
|
604
1363
|
*/
|
|
605
1364
|
createPlan(request, requestOptions) {
|
|
1365
|
+
return core.HttpResponsePromise.fromPromise(this.__createPlan(request, requestOptions));
|
|
1366
|
+
}
|
|
1367
|
+
__createPlan(request, requestOptions) {
|
|
606
1368
|
return __awaiter(this, void 0, void 0, function* () {
|
|
607
1369
|
var _a, _b, _c;
|
|
608
1370
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
609
1371
|
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, "plans"),
|
|
610
1372
|
method: "POST",
|
|
611
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1373
|
+
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),
|
|
612
1374
|
contentType: "application/json",
|
|
613
1375
|
requestType: "json",
|
|
614
1376
|
body: serializers.CreatePlanRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -617,13 +1379,16 @@ class Plans {
|
|
|
617
1379
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
618
1380
|
});
|
|
619
1381
|
if (_response.ok) {
|
|
620
|
-
return
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
1382
|
+
return {
|
|
1383
|
+
data: serializers.CreatePlanResponse.parseOrThrow(_response.body, {
|
|
1384
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1385
|
+
allowUnrecognizedUnionMembers: true,
|
|
1386
|
+
allowUnrecognizedEnumValues: true,
|
|
1387
|
+
skipValidation: true,
|
|
1388
|
+
breadcrumbsPrefix: ["response"],
|
|
1389
|
+
}),
|
|
1390
|
+
rawResponse: _response.rawResponse,
|
|
1391
|
+
};
|
|
627
1392
|
}
|
|
628
1393
|
if (_response.error.reason === "status-code") {
|
|
629
1394
|
switch (_response.error.statusCode) {
|
|
@@ -634,7 +1399,7 @@ class Plans {
|
|
|
634
1399
|
allowUnrecognizedEnumValues: true,
|
|
635
1400
|
skipValidation: true,
|
|
636
1401
|
breadcrumbsPrefix: ["response"],
|
|
637
|
-
}));
|
|
1402
|
+
}), _response.rawResponse);
|
|
638
1403
|
case 401:
|
|
639
1404
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
640
1405
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -642,7 +1407,7 @@ class Plans {
|
|
|
642
1407
|
allowUnrecognizedEnumValues: true,
|
|
643
1408
|
skipValidation: true,
|
|
644
1409
|
breadcrumbsPrefix: ["response"],
|
|
645
|
-
}));
|
|
1410
|
+
}), _response.rawResponse);
|
|
646
1411
|
case 403:
|
|
647
1412
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
648
1413
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -650,7 +1415,15 @@ class Plans {
|
|
|
650
1415
|
allowUnrecognizedEnumValues: true,
|
|
651
1416
|
skipValidation: true,
|
|
652
1417
|
breadcrumbsPrefix: ["response"],
|
|
653
|
-
}));
|
|
1418
|
+
}), _response.rawResponse);
|
|
1419
|
+
case 404:
|
|
1420
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1421
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1422
|
+
allowUnrecognizedUnionMembers: true,
|
|
1423
|
+
allowUnrecognizedEnumValues: true,
|
|
1424
|
+
skipValidation: true,
|
|
1425
|
+
breadcrumbsPrefix: ["response"],
|
|
1426
|
+
}), _response.rawResponse);
|
|
654
1427
|
case 500:
|
|
655
1428
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
656
1429
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -658,11 +1431,12 @@ class Plans {
|
|
|
658
1431
|
allowUnrecognizedEnumValues: true,
|
|
659
1432
|
skipValidation: true,
|
|
660
1433
|
breadcrumbsPrefix: ["response"],
|
|
661
|
-
}));
|
|
1434
|
+
}), _response.rawResponse);
|
|
662
1435
|
default:
|
|
663
1436
|
throw new errors.SchematicError({
|
|
664
1437
|
statusCode: _response.error.statusCode,
|
|
665
1438
|
body: _response.error.body,
|
|
1439
|
+
rawResponse: _response.rawResponse,
|
|
666
1440
|
});
|
|
667
1441
|
}
|
|
668
1442
|
}
|
|
@@ -671,12 +1445,14 @@ class Plans {
|
|
|
671
1445
|
throw new errors.SchematicError({
|
|
672
1446
|
statusCode: _response.error.statusCode,
|
|
673
1447
|
body: _response.error.rawBody,
|
|
1448
|
+
rawResponse: _response.rawResponse,
|
|
674
1449
|
});
|
|
675
1450
|
case "timeout":
|
|
676
1451
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling POST /plans.");
|
|
677
1452
|
case "unknown":
|
|
678
1453
|
throw new errors.SchematicError({
|
|
679
1454
|
message: _response.error.errorMessage,
|
|
1455
|
+
rawResponse: _response.rawResponse,
|
|
680
1456
|
});
|
|
681
1457
|
}
|
|
682
1458
|
});
|
|
@@ -694,12 +1470,15 @@ class Plans {
|
|
|
694
1470
|
* await client.plans.getPlan("plan_id")
|
|
695
1471
|
*/
|
|
696
1472
|
getPlan(planId, requestOptions) {
|
|
1473
|
+
return core.HttpResponsePromise.fromPromise(this.__getPlan(planId, requestOptions));
|
|
1474
|
+
}
|
|
1475
|
+
__getPlan(planId, requestOptions) {
|
|
697
1476
|
return __awaiter(this, void 0, void 0, function* () {
|
|
698
1477
|
var _a, _b, _c;
|
|
699
1478
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
700
1479
|
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, `plans/${encodeURIComponent(planId)}`),
|
|
701
1480
|
method: "GET",
|
|
702
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1481
|
+
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),
|
|
703
1482
|
contentType: "application/json",
|
|
704
1483
|
requestType: "json",
|
|
705
1484
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -707,13 +1486,16 @@ class Plans {
|
|
|
707
1486
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
708
1487
|
});
|
|
709
1488
|
if (_response.ok) {
|
|
710
|
-
return
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
1489
|
+
return {
|
|
1490
|
+
data: serializers.GetPlanResponse.parseOrThrow(_response.body, {
|
|
1491
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1492
|
+
allowUnrecognizedUnionMembers: true,
|
|
1493
|
+
allowUnrecognizedEnumValues: true,
|
|
1494
|
+
skipValidation: true,
|
|
1495
|
+
breadcrumbsPrefix: ["response"],
|
|
1496
|
+
}),
|
|
1497
|
+
rawResponse: _response.rawResponse,
|
|
1498
|
+
};
|
|
717
1499
|
}
|
|
718
1500
|
if (_response.error.reason === "status-code") {
|
|
719
1501
|
switch (_response.error.statusCode) {
|
|
@@ -724,7 +1506,7 @@ class Plans {
|
|
|
724
1506
|
allowUnrecognizedEnumValues: true,
|
|
725
1507
|
skipValidation: true,
|
|
726
1508
|
breadcrumbsPrefix: ["response"],
|
|
727
|
-
}));
|
|
1509
|
+
}), _response.rawResponse);
|
|
728
1510
|
case 403:
|
|
729
1511
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
730
1512
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -732,7 +1514,7 @@ class Plans {
|
|
|
732
1514
|
allowUnrecognizedEnumValues: true,
|
|
733
1515
|
skipValidation: true,
|
|
734
1516
|
breadcrumbsPrefix: ["response"],
|
|
735
|
-
}));
|
|
1517
|
+
}), _response.rawResponse);
|
|
736
1518
|
case 404:
|
|
737
1519
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
738
1520
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -740,7 +1522,7 @@ class Plans {
|
|
|
740
1522
|
allowUnrecognizedEnumValues: true,
|
|
741
1523
|
skipValidation: true,
|
|
742
1524
|
breadcrumbsPrefix: ["response"],
|
|
743
|
-
}));
|
|
1525
|
+
}), _response.rawResponse);
|
|
744
1526
|
case 500:
|
|
745
1527
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
746
1528
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -748,11 +1530,12 @@ class Plans {
|
|
|
748
1530
|
allowUnrecognizedEnumValues: true,
|
|
749
1531
|
skipValidation: true,
|
|
750
1532
|
breadcrumbsPrefix: ["response"],
|
|
751
|
-
}));
|
|
1533
|
+
}), _response.rawResponse);
|
|
752
1534
|
default:
|
|
753
1535
|
throw new errors.SchematicError({
|
|
754
1536
|
statusCode: _response.error.statusCode,
|
|
755
1537
|
body: _response.error.body,
|
|
1538
|
+
rawResponse: _response.rawResponse,
|
|
756
1539
|
});
|
|
757
1540
|
}
|
|
758
1541
|
}
|
|
@@ -761,12 +1544,14 @@ class Plans {
|
|
|
761
1544
|
throw new errors.SchematicError({
|
|
762
1545
|
statusCode: _response.error.statusCode,
|
|
763
1546
|
body: _response.error.rawBody,
|
|
1547
|
+
rawResponse: _response.rawResponse,
|
|
764
1548
|
});
|
|
765
1549
|
case "timeout":
|
|
766
1550
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans/{plan_id}.");
|
|
767
1551
|
case "unknown":
|
|
768
1552
|
throw new errors.SchematicError({
|
|
769
1553
|
message: _response.error.errorMessage,
|
|
1554
|
+
rawResponse: _response.rawResponse,
|
|
770
1555
|
});
|
|
771
1556
|
}
|
|
772
1557
|
});
|
|
@@ -788,12 +1573,15 @@ class Plans {
|
|
|
788
1573
|
* })
|
|
789
1574
|
*/
|
|
790
1575
|
updatePlan(planId, request, requestOptions) {
|
|
1576
|
+
return core.HttpResponsePromise.fromPromise(this.__updatePlan(planId, request, requestOptions));
|
|
1577
|
+
}
|
|
1578
|
+
__updatePlan(planId, request, requestOptions) {
|
|
791
1579
|
return __awaiter(this, void 0, void 0, function* () {
|
|
792
1580
|
var _a, _b, _c;
|
|
793
1581
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
794
1582
|
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, `plans/${encodeURIComponent(planId)}`),
|
|
795
1583
|
method: "PUT",
|
|
796
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1584
|
+
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),
|
|
797
1585
|
contentType: "application/json",
|
|
798
1586
|
requestType: "json",
|
|
799
1587
|
body: serializers.UpdatePlanRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -802,13 +1590,16 @@ class Plans {
|
|
|
802
1590
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
803
1591
|
});
|
|
804
1592
|
if (_response.ok) {
|
|
805
|
-
return
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1593
|
+
return {
|
|
1594
|
+
data: serializers.UpdatePlanResponse.parseOrThrow(_response.body, {
|
|
1595
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1596
|
+
allowUnrecognizedUnionMembers: true,
|
|
1597
|
+
allowUnrecognizedEnumValues: true,
|
|
1598
|
+
skipValidation: true,
|
|
1599
|
+
breadcrumbsPrefix: ["response"],
|
|
1600
|
+
}),
|
|
1601
|
+
rawResponse: _response.rawResponse,
|
|
1602
|
+
};
|
|
812
1603
|
}
|
|
813
1604
|
if (_response.error.reason === "status-code") {
|
|
814
1605
|
switch (_response.error.statusCode) {
|
|
@@ -819,7 +1610,7 @@ class Plans {
|
|
|
819
1610
|
allowUnrecognizedEnumValues: true,
|
|
820
1611
|
skipValidation: true,
|
|
821
1612
|
breadcrumbsPrefix: ["response"],
|
|
822
|
-
}));
|
|
1613
|
+
}), _response.rawResponse);
|
|
823
1614
|
case 401:
|
|
824
1615
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
825
1616
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -827,7 +1618,7 @@ class Plans {
|
|
|
827
1618
|
allowUnrecognizedEnumValues: true,
|
|
828
1619
|
skipValidation: true,
|
|
829
1620
|
breadcrumbsPrefix: ["response"],
|
|
830
|
-
}));
|
|
1621
|
+
}), _response.rawResponse);
|
|
831
1622
|
case 403:
|
|
832
1623
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
833
1624
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -835,7 +1626,7 @@ class Plans {
|
|
|
835
1626
|
allowUnrecognizedEnumValues: true,
|
|
836
1627
|
skipValidation: true,
|
|
837
1628
|
breadcrumbsPrefix: ["response"],
|
|
838
|
-
}));
|
|
1629
|
+
}), _response.rawResponse);
|
|
839
1630
|
case 404:
|
|
840
1631
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
841
1632
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -843,7 +1634,7 @@ class Plans {
|
|
|
843
1634
|
allowUnrecognizedEnumValues: true,
|
|
844
1635
|
skipValidation: true,
|
|
845
1636
|
breadcrumbsPrefix: ["response"],
|
|
846
|
-
}));
|
|
1637
|
+
}), _response.rawResponse);
|
|
847
1638
|
case 500:
|
|
848
1639
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
849
1640
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -851,11 +1642,12 @@ class Plans {
|
|
|
851
1642
|
allowUnrecognizedEnumValues: true,
|
|
852
1643
|
skipValidation: true,
|
|
853
1644
|
breadcrumbsPrefix: ["response"],
|
|
854
|
-
}));
|
|
1645
|
+
}), _response.rawResponse);
|
|
855
1646
|
default:
|
|
856
1647
|
throw new errors.SchematicError({
|
|
857
1648
|
statusCode: _response.error.statusCode,
|
|
858
1649
|
body: _response.error.body,
|
|
1650
|
+
rawResponse: _response.rawResponse,
|
|
859
1651
|
});
|
|
860
1652
|
}
|
|
861
1653
|
}
|
|
@@ -864,12 +1656,14 @@ class Plans {
|
|
|
864
1656
|
throw new errors.SchematicError({
|
|
865
1657
|
statusCode: _response.error.statusCode,
|
|
866
1658
|
body: _response.error.rawBody,
|
|
1659
|
+
rawResponse: _response.rawResponse,
|
|
867
1660
|
});
|
|
868
1661
|
case "timeout":
|
|
869
1662
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plans/{plan_id}.");
|
|
870
1663
|
case "unknown":
|
|
871
1664
|
throw new errors.SchematicError({
|
|
872
1665
|
message: _response.error.errorMessage,
|
|
1666
|
+
rawResponse: _response.rawResponse,
|
|
873
1667
|
});
|
|
874
1668
|
}
|
|
875
1669
|
});
|
|
@@ -881,18 +1675,22 @@ class Plans {
|
|
|
881
1675
|
* @throws {@link Schematic.BadRequestError}
|
|
882
1676
|
* @throws {@link Schematic.UnauthorizedError}
|
|
883
1677
|
* @throws {@link Schematic.ForbiddenError}
|
|
1678
|
+
* @throws {@link Schematic.NotFoundError}
|
|
884
1679
|
* @throws {@link Schematic.InternalServerError}
|
|
885
1680
|
*
|
|
886
1681
|
* @example
|
|
887
1682
|
* await client.plans.deletePlan("plan_id")
|
|
888
1683
|
*/
|
|
889
1684
|
deletePlan(planId, requestOptions) {
|
|
1685
|
+
return core.HttpResponsePromise.fromPromise(this.__deletePlan(planId, requestOptions));
|
|
1686
|
+
}
|
|
1687
|
+
__deletePlan(planId, requestOptions) {
|
|
890
1688
|
return __awaiter(this, void 0, void 0, function* () {
|
|
891
1689
|
var _a, _b, _c;
|
|
892
1690
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
893
1691
|
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, `plans/${encodeURIComponent(planId)}`),
|
|
894
1692
|
method: "DELETE",
|
|
895
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1693
|
+
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),
|
|
896
1694
|
contentType: "application/json",
|
|
897
1695
|
requestType: "json",
|
|
898
1696
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -900,13 +1698,16 @@ class Plans {
|
|
|
900
1698
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
901
1699
|
});
|
|
902
1700
|
if (_response.ok) {
|
|
903
|
-
return
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
1701
|
+
return {
|
|
1702
|
+
data: serializers.DeletePlanResponse.parseOrThrow(_response.body, {
|
|
1703
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1704
|
+
allowUnrecognizedUnionMembers: true,
|
|
1705
|
+
allowUnrecognizedEnumValues: true,
|
|
1706
|
+
skipValidation: true,
|
|
1707
|
+
breadcrumbsPrefix: ["response"],
|
|
1708
|
+
}),
|
|
1709
|
+
rawResponse: _response.rawResponse,
|
|
1710
|
+
};
|
|
910
1711
|
}
|
|
911
1712
|
if (_response.error.reason === "status-code") {
|
|
912
1713
|
switch (_response.error.statusCode) {
|
|
@@ -917,7 +1718,7 @@ class Plans {
|
|
|
917
1718
|
allowUnrecognizedEnumValues: true,
|
|
918
1719
|
skipValidation: true,
|
|
919
1720
|
breadcrumbsPrefix: ["response"],
|
|
920
|
-
}));
|
|
1721
|
+
}), _response.rawResponse);
|
|
921
1722
|
case 401:
|
|
922
1723
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
923
1724
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -925,7 +1726,7 @@ class Plans {
|
|
|
925
1726
|
allowUnrecognizedEnumValues: true,
|
|
926
1727
|
skipValidation: true,
|
|
927
1728
|
breadcrumbsPrefix: ["response"],
|
|
928
|
-
}));
|
|
1729
|
+
}), _response.rawResponse);
|
|
929
1730
|
case 403:
|
|
930
1731
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
931
1732
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -933,7 +1734,15 @@ class Plans {
|
|
|
933
1734
|
allowUnrecognizedEnumValues: true,
|
|
934
1735
|
skipValidation: true,
|
|
935
1736
|
breadcrumbsPrefix: ["response"],
|
|
936
|
-
}));
|
|
1737
|
+
}), _response.rawResponse);
|
|
1738
|
+
case 404:
|
|
1739
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1740
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1741
|
+
allowUnrecognizedUnionMembers: true,
|
|
1742
|
+
allowUnrecognizedEnumValues: true,
|
|
1743
|
+
skipValidation: true,
|
|
1744
|
+
breadcrumbsPrefix: ["response"],
|
|
1745
|
+
}), _response.rawResponse);
|
|
937
1746
|
case 500:
|
|
938
1747
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
939
1748
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -941,11 +1750,12 @@ class Plans {
|
|
|
941
1750
|
allowUnrecognizedEnumValues: true,
|
|
942
1751
|
skipValidation: true,
|
|
943
1752
|
breadcrumbsPrefix: ["response"],
|
|
944
|
-
}));
|
|
1753
|
+
}), _response.rawResponse);
|
|
945
1754
|
default:
|
|
946
1755
|
throw new errors.SchematicError({
|
|
947
1756
|
statusCode: _response.error.statusCode,
|
|
948
1757
|
body: _response.error.body,
|
|
1758
|
+
rawResponse: _response.rawResponse,
|
|
949
1759
|
});
|
|
950
1760
|
}
|
|
951
1761
|
}
|
|
@@ -954,12 +1764,14 @@ class Plans {
|
|
|
954
1764
|
throw new errors.SchematicError({
|
|
955
1765
|
statusCode: _response.error.statusCode,
|
|
956
1766
|
body: _response.error.rawBody,
|
|
1767
|
+
rawResponse: _response.rawResponse,
|
|
957
1768
|
});
|
|
958
1769
|
case "timeout":
|
|
959
1770
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling DELETE /plans/{plan_id}.");
|
|
960
1771
|
case "unknown":
|
|
961
1772
|
throw new errors.SchematicError({
|
|
962
1773
|
message: _response.error.errorMessage,
|
|
1774
|
+
rawResponse: _response.rawResponse,
|
|
963
1775
|
});
|
|
964
1776
|
}
|
|
965
1777
|
});
|
|
@@ -977,17 +1789,20 @@ class Plans {
|
|
|
977
1789
|
*
|
|
978
1790
|
* @example
|
|
979
1791
|
* await client.plans.upsertBillingProductPlan("plan_id", {
|
|
980
|
-
*
|
|
1792
|
+
* chargeType: "one_time",
|
|
981
1793
|
* isTrialable: true
|
|
982
1794
|
* })
|
|
983
1795
|
*/
|
|
984
1796
|
upsertBillingProductPlan(planId, request, requestOptions) {
|
|
1797
|
+
return core.HttpResponsePromise.fromPromise(this.__upsertBillingProductPlan(planId, request, requestOptions));
|
|
1798
|
+
}
|
|
1799
|
+
__upsertBillingProductPlan(planId, request, requestOptions) {
|
|
985
1800
|
return __awaiter(this, void 0, void 0, function* () {
|
|
986
1801
|
var _a, _b, _c;
|
|
987
1802
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
988
1803
|
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, `plans/${encodeURIComponent(planId)}/billing_products`),
|
|
989
1804
|
method: "PUT",
|
|
990
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1805
|
+
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),
|
|
991
1806
|
contentType: "application/json",
|
|
992
1807
|
requestType: "json",
|
|
993
1808
|
body: serializers.UpsertBillingProductRequestBody.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -996,13 +1811,16 @@ class Plans {
|
|
|
996
1811
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
997
1812
|
});
|
|
998
1813
|
if (_response.ok) {
|
|
999
|
-
return
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1814
|
+
return {
|
|
1815
|
+
data: serializers.UpsertBillingProductPlanResponse.parseOrThrow(_response.body, {
|
|
1816
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1817
|
+
allowUnrecognizedUnionMembers: true,
|
|
1818
|
+
allowUnrecognizedEnumValues: true,
|
|
1819
|
+
skipValidation: true,
|
|
1820
|
+
breadcrumbsPrefix: ["response"],
|
|
1821
|
+
}),
|
|
1822
|
+
rawResponse: _response.rawResponse,
|
|
1823
|
+
};
|
|
1006
1824
|
}
|
|
1007
1825
|
if (_response.error.reason === "status-code") {
|
|
1008
1826
|
switch (_response.error.statusCode) {
|
|
@@ -1013,7 +1831,7 @@ class Plans {
|
|
|
1013
1831
|
allowUnrecognizedEnumValues: true,
|
|
1014
1832
|
skipValidation: true,
|
|
1015
1833
|
breadcrumbsPrefix: ["response"],
|
|
1016
|
-
}));
|
|
1834
|
+
}), _response.rawResponse);
|
|
1017
1835
|
case 401:
|
|
1018
1836
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1019
1837
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1021,7 +1839,7 @@ class Plans {
|
|
|
1021
1839
|
allowUnrecognizedEnumValues: true,
|
|
1022
1840
|
skipValidation: true,
|
|
1023
1841
|
breadcrumbsPrefix: ["response"],
|
|
1024
|
-
}));
|
|
1842
|
+
}), _response.rawResponse);
|
|
1025
1843
|
case 403:
|
|
1026
1844
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1027
1845
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1029,7 +1847,7 @@ class Plans {
|
|
|
1029
1847
|
allowUnrecognizedEnumValues: true,
|
|
1030
1848
|
skipValidation: true,
|
|
1031
1849
|
breadcrumbsPrefix: ["response"],
|
|
1032
|
-
}));
|
|
1850
|
+
}), _response.rawResponse);
|
|
1033
1851
|
case 404:
|
|
1034
1852
|
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1035
1853
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1037,7 +1855,7 @@ class Plans {
|
|
|
1037
1855
|
allowUnrecognizedEnumValues: true,
|
|
1038
1856
|
skipValidation: true,
|
|
1039
1857
|
breadcrumbsPrefix: ["response"],
|
|
1040
|
-
}));
|
|
1858
|
+
}), _response.rawResponse);
|
|
1041
1859
|
case 500:
|
|
1042
1860
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1043
1861
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1045,11 +1863,12 @@ class Plans {
|
|
|
1045
1863
|
allowUnrecognizedEnumValues: true,
|
|
1046
1864
|
skipValidation: true,
|
|
1047
1865
|
breadcrumbsPrefix: ["response"],
|
|
1048
|
-
}));
|
|
1866
|
+
}), _response.rawResponse);
|
|
1049
1867
|
default:
|
|
1050
1868
|
throw new errors.SchematicError({
|
|
1051
1869
|
statusCode: _response.error.statusCode,
|
|
1052
1870
|
body: _response.error.body,
|
|
1871
|
+
rawResponse: _response.rawResponse,
|
|
1053
1872
|
});
|
|
1054
1873
|
}
|
|
1055
1874
|
}
|
|
@@ -1058,12 +1877,14 @@ class Plans {
|
|
|
1058
1877
|
throw new errors.SchematicError({
|
|
1059
1878
|
statusCode: _response.error.statusCode,
|
|
1060
1879
|
body: _response.error.rawBody,
|
|
1880
|
+
rawResponse: _response.rawResponse,
|
|
1061
1881
|
});
|
|
1062
1882
|
case "timeout":
|
|
1063
1883
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling PUT /plans/{plan_id}/billing_products.");
|
|
1064
1884
|
case "unknown":
|
|
1065
1885
|
throw new errors.SchematicError({
|
|
1066
1886
|
message: _response.error.errorMessage,
|
|
1887
|
+
rawResponse: _response.rawResponse,
|
|
1067
1888
|
});
|
|
1068
1889
|
}
|
|
1069
1890
|
});
|
|
@@ -1075,12 +1896,16 @@ class Plans {
|
|
|
1075
1896
|
* @throws {@link Schematic.BadRequestError}
|
|
1076
1897
|
* @throws {@link Schematic.UnauthorizedError}
|
|
1077
1898
|
* @throws {@link Schematic.ForbiddenError}
|
|
1899
|
+
* @throws {@link Schematic.NotFoundError}
|
|
1078
1900
|
* @throws {@link Schematic.InternalServerError}
|
|
1079
1901
|
*
|
|
1080
1902
|
* @example
|
|
1081
1903
|
* await client.plans.countPlans()
|
|
1082
1904
|
*/
|
|
1083
|
-
countPlans() {
|
|
1905
|
+
countPlans(request = {}, requestOptions) {
|
|
1906
|
+
return core.HttpResponsePromise.fromPromise(this.__countPlans(request, requestOptions));
|
|
1907
|
+
}
|
|
1908
|
+
__countPlans() {
|
|
1084
1909
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
1085
1910
|
var _a, _b, _c;
|
|
1086
1911
|
const { companyId, hasProductId, ids, planType, q, withoutEntitlementFor, withoutProductId, withoutPaidProductId, limit, offset, } = request;
|
|
@@ -1125,7 +1950,7 @@ class Plans {
|
|
|
1125
1950
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
1126
1951
|
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, "plans/count"),
|
|
1127
1952
|
method: "GET",
|
|
1128
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@schematichq/schematic-typescript-node", "X-Fern-SDK-Version": "1.1.
|
|
1953
|
+
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),
|
|
1129
1954
|
contentType: "application/json",
|
|
1130
1955
|
queryParameters: _queryParams,
|
|
1131
1956
|
requestType: "json",
|
|
@@ -1134,13 +1959,16 @@ class Plans {
|
|
|
1134
1959
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
1135
1960
|
});
|
|
1136
1961
|
if (_response.ok) {
|
|
1137
|
-
return
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1962
|
+
return {
|
|
1963
|
+
data: serializers.CountPlansResponse.parseOrThrow(_response.body, {
|
|
1964
|
+
unrecognizedObjectKeys: "passthrough",
|
|
1965
|
+
allowUnrecognizedUnionMembers: true,
|
|
1966
|
+
allowUnrecognizedEnumValues: true,
|
|
1967
|
+
skipValidation: true,
|
|
1968
|
+
breadcrumbsPrefix: ["response"],
|
|
1969
|
+
}),
|
|
1970
|
+
rawResponse: _response.rawResponse,
|
|
1971
|
+
};
|
|
1144
1972
|
}
|
|
1145
1973
|
if (_response.error.reason === "status-code") {
|
|
1146
1974
|
switch (_response.error.statusCode) {
|
|
@@ -1151,7 +1979,7 @@ class Plans {
|
|
|
1151
1979
|
allowUnrecognizedEnumValues: true,
|
|
1152
1980
|
skipValidation: true,
|
|
1153
1981
|
breadcrumbsPrefix: ["response"],
|
|
1154
|
-
}));
|
|
1982
|
+
}), _response.rawResponse);
|
|
1155
1983
|
case 401:
|
|
1156
1984
|
throw new Schematic.UnauthorizedError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1157
1985
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1159,7 +1987,7 @@ class Plans {
|
|
|
1159
1987
|
allowUnrecognizedEnumValues: true,
|
|
1160
1988
|
skipValidation: true,
|
|
1161
1989
|
breadcrumbsPrefix: ["response"],
|
|
1162
|
-
}));
|
|
1990
|
+
}), _response.rawResponse);
|
|
1163
1991
|
case 403:
|
|
1164
1992
|
throw new Schematic.ForbiddenError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1165
1993
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1167,7 +1995,15 @@ class Plans {
|
|
|
1167
1995
|
allowUnrecognizedEnumValues: true,
|
|
1168
1996
|
skipValidation: true,
|
|
1169
1997
|
breadcrumbsPrefix: ["response"],
|
|
1170
|
-
}));
|
|
1998
|
+
}), _response.rawResponse);
|
|
1999
|
+
case 404:
|
|
2000
|
+
throw new Schematic.NotFoundError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
2001
|
+
unrecognizedObjectKeys: "passthrough",
|
|
2002
|
+
allowUnrecognizedUnionMembers: true,
|
|
2003
|
+
allowUnrecognizedEnumValues: true,
|
|
2004
|
+
skipValidation: true,
|
|
2005
|
+
breadcrumbsPrefix: ["response"],
|
|
2006
|
+
}), _response.rawResponse);
|
|
1171
2007
|
case 500:
|
|
1172
2008
|
throw new Schematic.InternalServerError(serializers.ApiError.parseOrThrow(_response.error.body, {
|
|
1173
2009
|
unrecognizedObjectKeys: "passthrough",
|
|
@@ -1175,11 +2011,12 @@ class Plans {
|
|
|
1175
2011
|
allowUnrecognizedEnumValues: true,
|
|
1176
2012
|
skipValidation: true,
|
|
1177
2013
|
breadcrumbsPrefix: ["response"],
|
|
1178
|
-
}));
|
|
2014
|
+
}), _response.rawResponse);
|
|
1179
2015
|
default:
|
|
1180
2016
|
throw new errors.SchematicError({
|
|
1181
2017
|
statusCode: _response.error.statusCode,
|
|
1182
2018
|
body: _response.error.body,
|
|
2019
|
+
rawResponse: _response.rawResponse,
|
|
1183
2020
|
});
|
|
1184
2021
|
}
|
|
1185
2022
|
}
|
|
@@ -1188,12 +2025,14 @@ class Plans {
|
|
|
1188
2025
|
throw new errors.SchematicError({
|
|
1189
2026
|
statusCode: _response.error.statusCode,
|
|
1190
2027
|
body: _response.error.rawBody,
|
|
2028
|
+
rawResponse: _response.rawResponse,
|
|
1191
2029
|
});
|
|
1192
2030
|
case "timeout":
|
|
1193
2031
|
throw new errors.SchematicTimeoutError("Timeout exceeded when calling GET /plans/count.");
|
|
1194
2032
|
case "unknown":
|
|
1195
2033
|
throw new errors.SchematicError({
|
|
1196
2034
|
message: _response.error.errorMessage,
|
|
2035
|
+
rawResponse: _response.rawResponse,
|
|
1197
2036
|
});
|
|
1198
2037
|
}
|
|
1199
2038
|
});
|