@schematichq/schematic-typescript-node 1.2.1 → 1.2.3
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/README.md +114 -0
- package/dist/Client.d.ts +2 -2
- package/dist/api/resources/accesstokens/client/Client.d.ts +3 -3
- package/dist/api/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +1 -3
- package/dist/api/resources/accounts/client/Client.d.ts +29 -8
- package/dist/api/resources/accounts/client/requests/CountApiKeysRequest.d.ts +4 -1
- package/dist/api/resources/accounts/client/requests/CountApiRequestsRequest.d.ts +7 -1
- package/dist/api/resources/accounts/client/requests/ListApiKeysRequest.d.ts +4 -1
- package/dist/api/resources/accounts/client/requests/ListApiRequestsRequest.d.ts +7 -1
- package/dist/api/resources/accounts/client/requests/ListEnvironmentsRequest.d.ts +4 -1
- package/dist/api/resources/accounts/types/ListApiKeysResponse.d.ts +0 -1
- package/dist/api/resources/accounts/types/ListApiRequestsResponse.d.ts +0 -1
- package/dist/api/resources/accounts/types/ListEnvironmentsResponse.d.ts +0 -1
- package/dist/api/resources/billing/client/Client.d.ts +87 -15
- package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +12 -1
- package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +7 -1
- package/dist/api/resources/billing/client/requests/{CreateBillingSubscriptionsRequestBody.d.ts → CreateBillingSubscriptionRequestBody.d.ts} +3 -2
- package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +12 -1
- package/dist/api/resources/billing/client/requests/ListCouponsRequest.d.ts +6 -1
- package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.d.ts +7 -1
- package/dist/api/resources/billing/client/requests/ListInvoicesRequest.d.ts +4 -1
- package/dist/api/resources/billing/client/requests/ListMetersRequest.d.ts +5 -1
- package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +4 -1
- package/dist/api/resources/billing/client/requests/ListProductPricesRequest.d.ts +12 -1
- package/dist/api/resources/billing/client/requests/SearchBillingPricesRequest.d.ts +28 -3
- package/dist/api/resources/billing/client/requests/index.d.ts +1 -1
- package/dist/api/resources/billing/types/CreateBillingSubscriptionRequestBodyTrialEndSetting.d.ts +8 -0
- package/dist/api/resources/billing/types/ListBillingProductsResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListCouponsResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListCustomersWithSubscriptionsResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListInvoicesResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListMetersResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListPaymentMethodsResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/ListProductPricesResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/SearchBillingPricesParams.d.ts +7 -0
- package/dist/api/resources/billing/types/SearchBillingPricesResponse.d.ts +0 -1
- package/dist/api/resources/billing/types/index.d.ts +2 -2
- package/dist/api/resources/checkout/client/Client.d.ts +59 -3
- package/dist/api/resources/checkout/types/CheckoutInternalResponse.d.ts +1 -1
- package/dist/api/resources/checkout/types/ManagePlanResponse.d.ts +9 -0
- package/dist/api/resources/checkout/types/PreviewManagePlanResponse.d.ts +9 -0
- package/dist/api/resources/checkout/types/index.d.ts +2 -0
- package/dist/api/resources/companies/client/Client.d.ts +132 -19
- package/dist/api/resources/companies/client/requests/CountCompaniesForAdvancedFilterRequest.d.ts +15 -2
- package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +9 -1
- package/dist/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.d.ts +6 -1
- package/dist/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.d.ts +7 -1
- package/dist/api/resources/companies/client/requests/CountPlanTraitsRequest.d.ts +6 -1
- package/dist/api/resources/companies/client/requests/CountUsersRequest.d.ts +7 -1
- package/dist/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.d.ts +5 -1
- package/dist/api/resources/companies/client/requests/GetActiveDealsRequest.d.ts +3 -1
- package/dist/api/resources/companies/client/requests/GetEntityTraitValuesRequest.d.ts +4 -1
- package/dist/api/resources/companies/client/requests/ListCompaniesForAdvancedFilterRequest.d.ts +15 -2
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +9 -1
- package/dist/api/resources/companies/client/requests/ListCompanyMembershipsRequest.d.ts +6 -1
- package/dist/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.d.ts +6 -1
- package/dist/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.d.ts +7 -1
- package/dist/api/resources/companies/client/requests/ListPlanTraitsRequest.d.ts +6 -1
- package/dist/api/resources/companies/client/requests/ListUsersRequest.d.ts +7 -1
- package/dist/api/resources/companies/client/requests/UpdatePlanTraitBulkRequestBody.d.ts +18 -0
- package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
- package/dist/api/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +3 -1
- package/dist/api/resources/companies/types/GetActiveCompanySubscriptionResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/GetActiveDealsResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/GetEntityTraitValuesResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +3 -1
- package/dist/api/resources/companies/types/ListCompaniesForAdvancedFilterResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListCompaniesResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListCompanyMembershipsResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListEntityKeyDefinitionsResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListEntityTraitDefinitionsResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListPlanTraitsResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/ListUsersResponse.d.ts +0 -1
- package/dist/api/resources/companies/types/UpdatePlanTraitsBulkResponse.d.ts +9 -0
- package/dist/api/resources/companies/types/index.d.ts +1 -0
- package/dist/api/resources/components/client/Client.d.ts +17 -6
- package/dist/api/resources/components/client/requests/CountComponentsRequest.d.ts +5 -1
- package/dist/api/resources/components/client/requests/ListComponentsRequest.d.ts +5 -1
- package/dist/api/resources/components/client/requests/PreviewComponentDataRequest.d.ts +4 -1
- package/dist/api/resources/components/types/ListComponentsResponse.d.ts +0 -1
- package/dist/api/resources/credits/client/Client.d.ts +104 -12
- package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +5 -1
- package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +5 -1
- package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +6 -1
- package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +7 -1
- package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +33 -0
- package/dist/api/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +4 -0
- package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +5 -0
- package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -1
- package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +33 -0
- package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +5 -1
- package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +6 -1
- package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +7 -1
- package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +7 -1
- package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +5 -1
- package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -0
- package/dist/api/resources/credits/client/requests/index.d.ts +2 -0
- package/dist/api/resources/credits/types/CountCreditLedgerParams.d.ts +19 -0
- package/dist/api/resources/credits/types/CountCreditLedgerRequestPeriod.d.ts +10 -0
- package/dist/api/resources/credits/types/CountCreditLedgerResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/CountCreditLedgerResponseParamsPeriod.d.ts +10 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +11 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetType.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateCompanyCreditGrantExpiryType.d.ts +11 -0
- package/dist/api/resources/credits/types/CreateCompanyCreditGrantExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +5 -2
- package/dist/api/resources/credits/types/CreateCreditBundleRequestBodyExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +19 -0
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerRequestPeriod.d.ts +10 -0
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +9 -0
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerResponseParamsPeriod.d.ts +10 -0
- package/dist/api/resources/credits/types/ListBillingCreditsResponse.d.ts +0 -1
- package/dist/api/resources/credits/types/ListBillingPlanCreditGrantsResponse.d.ts +0 -1
- package/dist/api/resources/credits/types/ListCompanyGrantsResponse.d.ts +0 -1
- package/dist/api/resources/credits/types/ListCreditBundlesResponse.d.ts +0 -1
- package/dist/api/resources/credits/types/ListGrantsForCreditResponse.d.ts +0 -1
- package/dist/api/resources/credits/types/UpdateCreditBundleDetailsRequestBodyExpiryType.d.ts +5 -2
- package/dist/api/resources/credits/types/UpdateCreditBundleDetailsRequestBodyExpiryUnit.d.ts +8 -0
- package/dist/api/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +2 -1
- package/dist/api/resources/credits/types/index.d.ts +15 -0
- package/dist/api/resources/crm/client/Client.d.ts +8 -4
- package/dist/api/resources/crm/client/requests/ListCrmProductsRequest.d.ts +5 -1
- package/dist/api/resources/crm/types/ListCrmProductsResponse.d.ts +0 -1
- package/dist/api/resources/dataexports/client/Client.d.ts +3 -3
- package/dist/api/resources/entitlements/client/Client.d.ts +65 -13
- package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +8 -1
- package/dist/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.d.ts +4 -1
- package/dist/api/resources/entitlements/client/requests/CountFeatureUsageRequest.d.ts +7 -1
- package/dist/api/resources/entitlements/client/requests/CountFeatureUsersRequest.d.ts +4 -1
- package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +8 -1
- package/dist/api/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +8 -1
- package/dist/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.d.ts +4 -1
- package/dist/api/resources/entitlements/client/requests/ListFeatureUsageRequest.d.ts +7 -1
- package/dist/api/resources/entitlements/client/requests/ListFeatureUsersRequest.d.ts +4 -1
- package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +8 -1
- package/dist/api/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +1 -0
- package/dist/api/resources/entitlements/types/ListCompanyOverridesResponse.d.ts +0 -1
- package/dist/api/resources/entitlements/types/ListFeatureCompaniesResponse.d.ts +0 -1
- package/dist/api/resources/entitlements/types/ListFeatureUsageResponse.d.ts +0 -1
- package/dist/api/resources/entitlements/types/ListFeatureUsersResponse.d.ts +0 -1
- package/dist/api/resources/entitlements/types/ListPlanEntitlementsResponse.d.ts +0 -1
- package/dist/api/resources/events/client/Client.d.ts +16 -5
- package/dist/api/resources/events/client/requests/GetEventSummariesRequest.d.ts +5 -1
- package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +8 -1
- package/dist/api/resources/events/types/GetEventSummariesResponse.d.ts +0 -1
- package/dist/api/resources/events/types/ListEventsResponse.d.ts +0 -1
- package/dist/api/resources/features/client/Client.d.ts +31 -7
- package/dist/api/resources/features/client/requests/CountFeaturesRequest.d.ts +11 -1
- package/dist/api/resources/features/client/requests/CountFlagsRequest.d.ts +9 -1
- package/dist/api/resources/features/client/requests/ListFeaturesRequest.d.ts +11 -1
- package/dist/api/resources/features/client/requests/ListFlagsRequest.d.ts +9 -1
- package/dist/api/resources/features/types/CountFeaturesParams.d.ts +1 -0
- package/dist/api/resources/features/types/CountFlagsParams.d.ts +1 -0
- package/dist/api/resources/features/types/ListAudienceCompaniesResponse.d.ts +0 -1
- package/dist/api/resources/features/types/ListAudienceUsersResponse.d.ts +0 -1
- package/dist/api/resources/features/types/ListFeaturesParams.d.ts +1 -0
- package/dist/api/resources/features/types/ListFeaturesResponse.d.ts +0 -1
- package/dist/api/resources/features/types/ListFlagsParams.d.ts +1 -0
- package/dist/api/resources/features/types/ListFlagsResponse.d.ts +0 -1
- package/dist/api/resources/plangroups/client/Client.d.ts +21 -5
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +22 -1
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +22 -1
- package/dist/api/resources/plans/client/Client.d.ts +50 -5
- package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +31 -1
- package/dist/api/resources/plans/client/requests/ListPlanIssuesRequest.d.ts +12 -0
- package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +31 -1
- package/dist/api/resources/plans/client/requests/index.d.ts +1 -0
- package/dist/api/resources/plans/types/CountPlansParams.d.ts +8 -0
- package/dist/api/resources/plans/types/ListPlanIssuesParams.d.ts +9 -0
- package/dist/api/resources/plans/types/ListPlanIssuesResponse.d.ts +9 -0
- package/dist/api/resources/plans/types/ListPlansParams.d.ts +8 -0
- package/dist/api/resources/plans/types/ListPlansResponse.d.ts +0 -1
- package/dist/api/resources/plans/types/index.d.ts +2 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +25 -7
- package/dist/api/resources/webhooks/client/requests/CountWebhookEventsRequest.d.ts +6 -1
- package/dist/api/resources/webhooks/client/requests/CountWebhooksRequest.d.ts +5 -1
- package/dist/api/resources/webhooks/client/requests/ListWebhookEventsRequest.d.ts +6 -1
- package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +5 -1
- package/dist/api/resources/webhooks/types/ListWebhookEventsResponse.d.ts +0 -1
- package/dist/api/resources/webhooks/types/ListWebhooksResponse.d.ts +0 -1
- package/dist/api/types/ApiKeyCreateResponseData.d.ts +0 -3
- package/dist/api/types/ApiKeyRequestResponseData.d.ts +0 -3
- package/dist/api/types/ApiKeyResponseData.d.ts +0 -3
- package/dist/api/types/BillingCreditBundleResponseData.d.ts +1 -0
- package/dist/api/types/BillingCreditBundleView.d.ts +1 -0
- package/dist/api/types/BillingCreditLedgerResponseData.d.ts +11 -0
- package/dist/api/types/BillingCustomerResponseData.d.ts +0 -3
- package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
- package/dist/api/types/BillingProductDetailResponseData.d.ts +2 -1
- package/dist/api/types/BillingProductForSubscriptionResponseData.d.ts +2 -0
- package/dist/api/types/BillingProductPlanResponseData.d.ts +0 -3
- package/dist/api/types/BillingProductPricing.d.ts +2 -0
- package/dist/api/types/BillingProductResponseData.d.ts +2 -1
- package/dist/api/types/BillingSubscriptionView.d.ts +0 -3
- package/dist/api/types/CheckFlagResponseData.d.ts +0 -3
- package/dist/api/types/CheckFlagsResponseData.d.ts +0 -3
- package/dist/api/types/CheckoutDataResponseData.d.ts +0 -3
- package/dist/api/types/CheckoutSettingsResponseData.d.ts +8 -0
- package/dist/api/types/CheckoutSubscription.d.ts +25 -0
- package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
- package/dist/api/types/CompanyLedgerResponseData.d.ts +8 -0
- package/dist/api/types/CompanyOverrideNoteResponseData.d.ts +11 -0
- package/dist/api/types/CompanyOverrideResponseData.d.ts +1 -0
- package/dist/api/types/CompanyPlanDetailResponseData.d.ts +1 -0
- package/dist/api/types/CompanyViewWithFeatureUsageResponseData.d.ts +1 -0
- package/dist/api/types/ComponentCheckoutSettings.d.ts +9 -0
- package/dist/api/types/ComponentHydrateResponseData.d.ts +4 -0
- package/dist/api/types/ComponentPreviewResponseData.d.ts +4 -3
- package/dist/api/types/ComponentResponseData.d.ts +0 -3
- package/dist/api/types/Condition.d.ts +21 -0
- package/dist/api/types/ConditionGroup.d.ts +7 -0
- package/dist/api/types/CountResponse.d.ts +2 -4
- package/dist/api/types/CreditCompanyGrantView.d.ts +3 -0
- package/dist/api/types/CreditGrantDetail.d.ts +10 -0
- package/dist/api/types/CreditGrantDetailGrantReason.d.ts +9 -0
- package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +27 -0
- package/dist/api/types/CreditUsage.d.ts +14 -0
- package/dist/api/types/CreditUsageResponseData.d.ts +14 -0
- package/dist/api/types/CrmDealResponseData.d.ts +0 -3
- package/dist/api/types/CrmLineItemResponseData.d.ts +0 -3
- package/dist/api/types/CrmProductResponseData.d.ts +0 -3
- package/dist/api/types/DataExportResponseData.d.ts +0 -3
- package/dist/api/types/EnvironmentDetailResponseData.d.ts +0 -3
- package/dist/api/types/EnvironmentResponseData.d.ts +0 -3
- package/dist/api/types/FeatureCompanyResponseData.d.ts +34 -1
- package/dist/api/types/FeatureCompanyResponseDataCreditGrantReason.d.ts +12 -0
- package/dist/api/types/FeatureCompanyUserResponseDataAllocationType.d.ts +2 -1
- package/dist/api/types/FeatureLedgerResponseData.d.ts +9 -0
- package/dist/api/types/FeatureUsageDataResponseData.d.ts +8 -0
- package/dist/api/types/FeatureUsageResponseData.d.ts +25 -0
- package/dist/api/types/FeatureUsageResponseDataCreditGrantReason.d.ts +12 -0
- package/dist/api/types/IssueTemporaryAccessTokenResponseData.d.ts +0 -3
- package/dist/api/types/ManagePlanPreviewResponseResponseData.d.ts +7 -0
- package/dist/api/types/ManagePlanRequest.d.ts +15 -0
- package/dist/api/types/ManagePlanResponseResponseData.d.ts +8 -0
- package/dist/api/types/PlanAudienceDetailResponseData.d.ts +0 -3
- package/dist/api/types/PlanCreditGrantView.d.ts +4 -0
- package/dist/api/types/PlanDetailResponseData.d.ts +1 -0
- package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
- package/dist/api/types/PlanGroupDetailResponseData.d.ts +16 -3
- package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +1 -0
- package/dist/api/types/PlanGroupResponseData.d.ts +11 -3
- package/dist/api/types/PlanIssueResponseData.d.ts +9 -0
- package/dist/api/types/PlanSelection.d.ts +7 -0
- package/dist/api/types/PlanTraitResponseData.d.ts +0 -3
- package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +0 -3
- package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +3 -0
- package/dist/api/types/RawEventBatchResponseData.d.ts +0 -3
- package/dist/api/types/Rule.d.ts +16 -0
- package/dist/api/types/RulesDetailResponseData.d.ts +0 -3
- package/dist/api/types/SegmentStatusResp.d.ts +0 -3
- package/dist/api/types/TraitDefinition.d.ts +8 -0
- package/dist/api/types/UpdatePlanTraitTraitRequestBody.d.ts +7 -0
- package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +1 -0
- package/dist/api/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/dist/api/types/index.d.ts +24 -0
- package/dist/index.js +3 -3
- package/dist/serialization/resources/accesstokens/client/requests/IssueTemporaryAccessTokenRequestBody.d.ts +0 -1
- package/dist/serialization/resources/billing/client/requests/{CreateBillingSubscriptionsRequestBody.d.ts → CreateBillingSubscriptionRequestBody.d.ts} +5 -4
- package/dist/serialization/resources/billing/client/requests/index.d.ts +1 -1
- package/dist/serialization/resources/billing/types/CreateBillingSubscriptionRequestBodyTrialEndSetting.d.ts +10 -0
- package/dist/serialization/resources/billing/types/SearchBillingPricesParams.d.ts +4 -0
- package/dist/serialization/resources/billing/types/index.d.ts +2 -2
- package/dist/serialization/resources/checkout/types/CheckoutInternalResponse.d.ts +2 -2
- package/dist/serialization/resources/checkout/types/ManagePlanResponse.d.ts +14 -0
- package/dist/serialization/resources/checkout/types/PreviewManagePlanResponse.d.ts +14 -0
- package/dist/serialization/resources/checkout/types/index.d.ts +2 -0
- package/dist/serialization/resources/companies/client/requests/UpdatePlanTraitBulkRequestBody.d.ts +14 -0
- package/dist/serialization/resources/companies/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/companies/types/CountCompaniesForAdvancedFilterParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/ListCompaniesForAdvancedFilterParams.d.ts +1 -0
- package/dist/serialization/resources/companies/types/UpdatePlanTraitsBulkResponse.d.ts +14 -0
- package/dist/serialization/resources/companies/types/index.d.ts +1 -0
- package/dist/serialization/resources/credits/client/requests/CreateBillingPlanCreditGrantRequestBody.d.ts +7 -0
- package/dist/serialization/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +6 -0
- package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -1
- package/dist/serialization/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +2 -0
- package/dist/serialization/resources/credits/types/CountCreditLedgerParams.d.ts +20 -0
- package/dist/serialization/resources/credits/types/CountCreditLedgerRequestPeriod.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CountCreditLedgerResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/CountCreditLedgerResponseParamsPeriod.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyExpiryType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateBillingPlanCreditGrantRequestBodyResetType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateCompanyCreditGrantExpiryType.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateCompanyCreditGrantExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryType.d.ts +1 -1
- package/dist/serialization/resources/credits/types/CreateCreditBundleRequestBodyExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +20 -0
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerRequestPeriod.d.ts +10 -0
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +15 -0
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerResponseParamsPeriod.d.ts +10 -0
- package/dist/serialization/resources/credits/types/UpdateCreditBundleDetailsRequestBodyExpiryType.d.ts +1 -1
- package/dist/serialization/resources/credits/types/UpdateCreditBundleDetailsRequestBodyExpiryUnit.d.ts +10 -0
- package/dist/serialization/resources/credits/types/ZeroOutGrantRequestBodyReason.d.ts +1 -1
- package/dist/serialization/resources/credits/types/index.d.ts +15 -0
- package/dist/serialization/resources/entitlements/client/requests/CreateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdateCompanyOverrideRequestBody.d.ts +1 -0
- package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +1 -0
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +13 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +13 -0
- package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +4 -0
- package/dist/serialization/resources/plans/types/ListPlanIssuesParams.d.ts +12 -0
- package/dist/serialization/resources/plans/types/ListPlanIssuesResponse.d.ts +15 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +4 -0
- package/dist/serialization/resources/plans/types/index.d.ts +2 -0
- package/dist/serialization/types/BillingCreditBundleResponseData.d.ts +1 -0
- package/dist/serialization/types/BillingCreditBundleView.d.ts +1 -0
- package/dist/serialization/types/BillingCreditLedgerResponseData.d.ts +17 -0
- package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +7 -0
- package/dist/serialization/types/BillingProductDetailResponseData.d.ts +1 -1
- package/dist/serialization/types/BillingProductForSubscriptionResponseData.d.ts +2 -0
- package/dist/serialization/types/BillingProductPricing.d.ts +2 -0
- package/dist/serialization/types/BillingProductResponseData.d.ts +1 -1
- package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +14 -0
- package/dist/serialization/types/CheckoutSubscription.d.ts +31 -0
- package/dist/serialization/types/CompanyDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanyLedgerResponseData.d.ts +14 -0
- package/dist/serialization/types/CompanyOverrideNoteResponseData.d.ts +17 -0
- package/dist/serialization/types/CompanyOverrideResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanyViewWithFeatureUsageResponseData.d.ts +2 -0
- package/dist/serialization/types/ComponentCheckoutSettings.d.ts +15 -0
- package/dist/serialization/types/ComponentHydrateResponseData.d.ts +5 -0
- package/dist/serialization/types/ComponentPreviewResponseData.d.ts +5 -0
- package/dist/serialization/types/Condition.d.ts +27 -0
- package/dist/serialization/types/ConditionGroup.d.ts +13 -0
- package/dist/serialization/types/CountResponse.d.ts +1 -1
- package/dist/serialization/types/CreditCompanyGrantView.d.ts +3 -0
- package/dist/serialization/types/CreditGrantDetail.d.ts +16 -0
- package/dist/serialization/types/CreditGrantDetailGrantReason.d.ts +10 -0
- package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +35 -0
- package/dist/serialization/types/CreditUsage.d.ts +20 -0
- package/dist/serialization/types/CreditUsageResponseData.d.ts +20 -0
- package/dist/serialization/types/FeatureCompanyResponseData.d.ts +28 -0
- package/dist/serialization/types/FeatureCompanyResponseDataCreditGrantReason.d.ts +10 -0
- package/dist/serialization/types/FeatureCompanyUserResponseDataAllocationType.d.ts +1 -1
- package/dist/serialization/types/FeatureLedgerResponseData.d.ts +15 -0
- package/dist/serialization/types/FeatureUsageDataResponseData.d.ts +9 -0
- package/dist/serialization/types/FeatureUsageResponseData.d.ts +17 -0
- package/dist/serialization/types/FeatureUsageResponseDataCreditGrantReason.d.ts +10 -0
- package/dist/serialization/types/ManagePlanPreviewResponseResponseData.d.ts +13 -0
- package/dist/serialization/types/ManagePlanRequest.d.ts +23 -0
- package/dist/serialization/types/ManagePlanResponseResponseData.d.ts +14 -0
- package/dist/serialization/types/PlanCreditGrantView.d.ts +4 -0
- package/dist/serialization/types/PlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanEntitlementResponseData.d.ts +1 -0
- package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +18 -0
- package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
- package/dist/serialization/types/PlanGroupResponseData.d.ts +12 -0
- package/dist/serialization/types/PlanIssueResponseData.d.ts +15 -0
- package/dist/serialization/types/PlanSelection.d.ts +13 -0
- package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +3 -0
- package/dist/serialization/types/Rule.d.ts +23 -0
- package/dist/serialization/types/TraitDefinition.d.ts +14 -0
- package/dist/serialization/types/UpdatePlanTraitTraitRequestBody.d.ts +13 -0
- package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +1 -0
- package/dist/serialization/types/UsageBasedEntitlementResponseData.d.ts +1 -0
- package/dist/serialization/types/index.d.ts +24 -0
- package/dist/wrapper.d.ts +8 -0
- package/package.json +2 -1
- package/dist/api/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +0 -8
- package/dist/serialization/resources/billing/types/CreateBillingSubscriptionsRequestBodyTrialEndSetting.d.ts +0 -10
package/README.md
CHANGED
|
@@ -83,6 +83,78 @@ const client = new SchematicClient({
|
|
|
83
83
|
client.close();
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
### Custom Logging
|
|
87
|
+
|
|
88
|
+
You can provide your own logger implementation to control how the Schematic client logs messages. The logger must implement the `Logger` interface with `error`, `warn`, `info`, and `debug` methods:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { SchematicClient, Logger } from "@schematichq/schematic-typescript-node";
|
|
92
|
+
|
|
93
|
+
// Example using a custom logger (could be Winston, Pino, etc.)
|
|
94
|
+
class CustomLogger implements Logger {
|
|
95
|
+
error(message: string, ...args: any[]): void {
|
|
96
|
+
// Your custom error logging logic
|
|
97
|
+
console.error(`[ERROR] ${message}`, ...args);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
warn(message: string, ...args: any[]): void {
|
|
101
|
+
// Your custom warning logging logic
|
|
102
|
+
console.warn(`[WARN] ${message}`, ...args);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
info(message: string, ...args: any[]): void {
|
|
106
|
+
// Your custom info logging logic
|
|
107
|
+
console.info(`[INFO] ${message}`, ...args);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
debug(message: string, ...args: any[]): void {
|
|
111
|
+
// Your custom debug logging logic
|
|
112
|
+
console.debug(`[DEBUG] ${message}`, ...args);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const apiKey = process.env.SCHEMATIC_API_KEY;
|
|
117
|
+
const client = new SchematicClient({
|
|
118
|
+
apiKey,
|
|
119
|
+
logger: new CustomLogger(),
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
// interactions with the client
|
|
123
|
+
|
|
124
|
+
client.close();
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Example using a popular logging library like Winston:
|
|
128
|
+
|
|
129
|
+
```ts
|
|
130
|
+
import winston from 'winston';
|
|
131
|
+
import { SchematicClient } from "@schematichq/schematic-typescript-node";
|
|
132
|
+
|
|
133
|
+
// Create a Winston logger instance
|
|
134
|
+
const winstonLogger = winston.createLogger({
|
|
135
|
+
level: 'debug',
|
|
136
|
+
format: winston.format.combine(
|
|
137
|
+
winston.format.timestamp(),
|
|
138
|
+
winston.format.json()
|
|
139
|
+
),
|
|
140
|
+
transports: [
|
|
141
|
+
new winston.transports.Console(),
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
const apiKey = process.env.SCHEMATIC_API_KEY;
|
|
146
|
+
const client = new SchematicClient({
|
|
147
|
+
apiKey,
|
|
148
|
+
logger: winstonLogger, // Winston logger directly implements the Logger interface
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// interactions with the client
|
|
152
|
+
|
|
153
|
+
client.close();
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
If no logger is provided, the client will use a default console logger that outputs to the standard console methods.
|
|
157
|
+
|
|
86
158
|
## Usage examples
|
|
87
159
|
|
|
88
160
|
A number of these examples use `keys` to identify companies and users. Learn more about keys [here](https://docs.schematichq.com/developer_resources/key_management).
|
|
@@ -268,6 +340,48 @@ client
|
|
|
268
340
|
client.close();
|
|
269
341
|
```
|
|
270
342
|
|
|
343
|
+
### Checking multiple flags
|
|
344
|
+
|
|
345
|
+
The `checkFlags` method allows you to efficiently check multiple feature flags in a single operation. When you provide specific flag keys, it will only return the flag values for those flags, leveraging intelligent caching to minimize API calls.
|
|
346
|
+
|
|
347
|
+
```ts
|
|
348
|
+
import { SchematicClient } from "@schematichq/schematic-typescript-node";
|
|
349
|
+
|
|
350
|
+
const apiKey = process.env.SCHEMATIC_API_KEY;
|
|
351
|
+
const client = new SchematicClient({ apiKey });
|
|
352
|
+
|
|
353
|
+
const evaluationCtx = {
|
|
354
|
+
company: { id: "your-company-id" },
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
// Check specific flags by providing an array of flag keys
|
|
358
|
+
client
|
|
359
|
+
.checkFlags(evaluationCtx, ["feature-flag-1", "feature-flag-2", "feature-flag-3"])
|
|
360
|
+
.then((flagResults) => {
|
|
361
|
+
flagResults.forEach((result) => {
|
|
362
|
+
console.log(`Flag ${result.flag}: ${result.value} (${result.reason})`);
|
|
363
|
+
if (result.value) {
|
|
364
|
+
// This flag is enabled
|
|
365
|
+
} else {
|
|
366
|
+
// This flag is disabled
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
})
|
|
370
|
+
.catch(console.error);
|
|
371
|
+
|
|
372
|
+
// Or check all available flags by omitting the keys parameter
|
|
373
|
+
client
|
|
374
|
+
.checkFlags(evaluationCtx)
|
|
375
|
+
.then((flagResults) => {
|
|
376
|
+
flagResults.forEach((result) => {
|
|
377
|
+
console.log(`Flag ${result.flag}: ${result.value}`);
|
|
378
|
+
});
|
|
379
|
+
})
|
|
380
|
+
.catch(console.error);
|
|
381
|
+
|
|
382
|
+
client.close();
|
|
383
|
+
```
|
|
384
|
+
|
|
271
385
|
### Other API operations
|
|
272
386
|
|
|
273
387
|
The Schematic API supports many operations beyond these, accessible via the API modules on the client, `Accounts`, `Billing`, `Companies`, `Entitlements`, `Events`, `Features`, and `Plans`.
|
package/dist/Client.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare namespace SchematicClient {
|
|
|
23
23
|
environment?: core.Supplier<environments.SchematicEnvironment | string>;
|
|
24
24
|
/** Specify a custom URL to connect the client to. */
|
|
25
25
|
baseUrl?: core.Supplier<string>;
|
|
26
|
-
apiKey
|
|
26
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
27
27
|
fetcher?: core.FetchFunction;
|
|
28
28
|
}
|
|
29
29
|
interface RequestOptions {
|
|
@@ -54,7 +54,7 @@ export declare class SchematicClient {
|
|
|
54
54
|
protected _plangroups: Plangroups | undefined;
|
|
55
55
|
protected _accesstokens: Accesstokens | undefined;
|
|
56
56
|
protected _webhooks: Webhooks | undefined;
|
|
57
|
-
constructor(_options
|
|
57
|
+
constructor(_options?: SchematicClient.Options);
|
|
58
58
|
get accounts(): Accounts;
|
|
59
59
|
get features(): Features;
|
|
60
60
|
get billing(): Billing;
|
|
@@ -9,7 +9,7 @@ export declare namespace Accesstokens {
|
|
|
9
9
|
environment?: core.Supplier<environments.SchematicEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
fetcher?: core.FetchFunction;
|
|
14
14
|
}
|
|
15
15
|
interface RequestOptions {
|
|
@@ -25,7 +25,7 @@ export declare namespace Accesstokens {
|
|
|
25
25
|
}
|
|
26
26
|
export declare class Accesstokens {
|
|
27
27
|
protected readonly _options: Accesstokens.Options;
|
|
28
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Accesstokens.Options);
|
|
29
29
|
/**
|
|
30
30
|
* @param {Schematic.IssueTemporaryAccessTokenRequestBody} request
|
|
31
31
|
* @param {Accesstokens.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -46,6 +46,6 @@ export declare class Accesstokens {
|
|
|
46
46
|
issueTemporaryAccessToken(request: Schematic.IssueTemporaryAccessTokenRequestBody, requestOptions?: Accesstokens.RequestOptions): core.HttpResponsePromise<Schematic.IssueTemporaryAccessTokenResponse>;
|
|
47
47
|
private __issueTemporaryAccessToken;
|
|
48
48
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
49
|
-
"X-Schematic-Api-Key": string;
|
|
49
|
+
"X-Schematic-Api-Key": string | undefined;
|
|
50
50
|
}>;
|
|
51
51
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace Accounts {
|
|
|
9
9
|
environment?: core.Supplier<environments.SchematicEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
fetcher?: core.FetchFunction;
|
|
14
14
|
}
|
|
15
15
|
interface RequestOptions {
|
|
@@ -25,7 +25,7 @@ export declare namespace Accounts {
|
|
|
25
25
|
}
|
|
26
26
|
export declare class Accounts {
|
|
27
27
|
protected readonly _options: Accounts.Options;
|
|
28
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Accounts.Options);
|
|
29
29
|
/**
|
|
30
30
|
* @param {Schematic.ListApiKeysRequest} request
|
|
31
31
|
* @param {Accounts.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -38,7 +38,10 @@ export declare class Accounts {
|
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* await client.accounts.listApiKeys({
|
|
41
|
-
*
|
|
41
|
+
* environmentId: "environment_id",
|
|
42
|
+
* requireEnvironment: true,
|
|
43
|
+
* limit: 1,
|
|
44
|
+
* offset: 1
|
|
42
45
|
* })
|
|
43
46
|
*/
|
|
44
47
|
listApiKeys(request: Schematic.ListApiKeysRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.ListApiKeysResponse>;
|
|
@@ -117,7 +120,10 @@ export declare class Accounts {
|
|
|
117
120
|
*
|
|
118
121
|
* @example
|
|
119
122
|
* await client.accounts.countApiKeys({
|
|
120
|
-
*
|
|
123
|
+
* environmentId: "environment_id",
|
|
124
|
+
* requireEnvironment: true,
|
|
125
|
+
* limit: 1,
|
|
126
|
+
* offset: 1
|
|
121
127
|
* })
|
|
122
128
|
*/
|
|
123
129
|
countApiKeys(request: Schematic.CountApiKeysRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.CountApiKeysResponse>;
|
|
@@ -133,7 +139,13 @@ export declare class Accounts {
|
|
|
133
139
|
* @throws {@link Schematic.InternalServerError}
|
|
134
140
|
*
|
|
135
141
|
* @example
|
|
136
|
-
* await client.accounts.listApiRequests(
|
|
142
|
+
* await client.accounts.listApiRequests({
|
|
143
|
+
* q: "q",
|
|
144
|
+
* requestType: "request_type",
|
|
145
|
+
* environmentId: "environment_id",
|
|
146
|
+
* limit: 1,
|
|
147
|
+
* offset: 1
|
|
148
|
+
* })
|
|
137
149
|
*/
|
|
138
150
|
listApiRequests(request?: Schematic.ListApiRequestsRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.ListApiRequestsResponse>;
|
|
139
151
|
private __listApiRequests;
|
|
@@ -162,7 +174,13 @@ export declare class Accounts {
|
|
|
162
174
|
* @throws {@link Schematic.InternalServerError}
|
|
163
175
|
*
|
|
164
176
|
* @example
|
|
165
|
-
* await client.accounts.countApiRequests(
|
|
177
|
+
* await client.accounts.countApiRequests({
|
|
178
|
+
* q: "q",
|
|
179
|
+
* requestType: "request_type",
|
|
180
|
+
* environmentId: "environment_id",
|
|
181
|
+
* limit: 1,
|
|
182
|
+
* offset: 1
|
|
183
|
+
* })
|
|
166
184
|
*/
|
|
167
185
|
countApiRequests(request?: Schematic.CountApiRequestsRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.CountApiRequestsResponse>;
|
|
168
186
|
private __countApiRequests;
|
|
@@ -177,7 +195,10 @@ export declare class Accounts {
|
|
|
177
195
|
* @throws {@link Schematic.InternalServerError}
|
|
178
196
|
*
|
|
179
197
|
* @example
|
|
180
|
-
* await client.accounts.listEnvironments(
|
|
198
|
+
* await client.accounts.listEnvironments({
|
|
199
|
+
* limit: 1,
|
|
200
|
+
* offset: 1
|
|
201
|
+
* })
|
|
181
202
|
*/
|
|
182
203
|
listEnvironments(request?: Schematic.ListEnvironmentsRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.ListEnvironmentsResponse>;
|
|
183
204
|
private __listEnvironments;
|
|
@@ -259,6 +280,6 @@ export declare class Accounts {
|
|
|
259
280
|
quickstart(requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Schematic.QuickstartResponse>;
|
|
260
281
|
private __quickstart;
|
|
261
282
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
262
|
-
"X-Schematic-Api-Key": string;
|
|
283
|
+
"X-Schematic-Api-Key": string | undefined;
|
|
263
284
|
}>;
|
|
264
285
|
}
|
|
@@ -9,7 +9,7 @@ export declare namespace Billing {
|
|
|
9
9
|
environment?: core.Supplier<environments.SchematicEnvironment | string>;
|
|
10
10
|
/** Specify a custom URL to connect the client to. */
|
|
11
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
-
apiKey
|
|
12
|
+
apiKey?: core.Supplier<string | undefined>;
|
|
13
13
|
fetcher?: core.FetchFunction;
|
|
14
14
|
}
|
|
15
15
|
interface RequestOptions {
|
|
@@ -25,7 +25,7 @@ export declare namespace Billing {
|
|
|
25
25
|
}
|
|
26
26
|
export declare class Billing {
|
|
27
27
|
protected readonly _options: Billing.Options;
|
|
28
|
-
constructor(_options
|
|
28
|
+
constructor(_options?: Billing.Options);
|
|
29
29
|
/**
|
|
30
30
|
* @param {Schematic.ListCouponsRequest} request
|
|
31
31
|
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -37,7 +37,12 @@ export declare class Billing {
|
|
|
37
37
|
* @throws {@link Schematic.InternalServerError}
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
|
-
* await client.billing.listCoupons(
|
|
40
|
+
* await client.billing.listCoupons({
|
|
41
|
+
* isActive: true,
|
|
42
|
+
* q: "q",
|
|
43
|
+
* limit: 1,
|
|
44
|
+
* offset: 1
|
|
45
|
+
* })
|
|
41
46
|
*/
|
|
42
47
|
listCoupons(request?: Schematic.ListCouponsRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListCouponsResponse>;
|
|
43
48
|
private __listCoupons;
|
|
@@ -99,7 +104,13 @@ export declare class Billing {
|
|
|
99
104
|
* @throws {@link Schematic.InternalServerError}
|
|
100
105
|
*
|
|
101
106
|
* @example
|
|
102
|
-
* await client.billing.listCustomersWithSubscriptions(
|
|
107
|
+
* await client.billing.listCustomersWithSubscriptions({
|
|
108
|
+
* name: "name",
|
|
109
|
+
* failedToImport: true,
|
|
110
|
+
* q: "q",
|
|
111
|
+
* limit: 1,
|
|
112
|
+
* offset: 1
|
|
113
|
+
* })
|
|
103
114
|
*/
|
|
104
115
|
listCustomersWithSubscriptions(request?: Schematic.ListCustomersWithSubscriptionsRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListCustomersWithSubscriptionsResponse>;
|
|
105
116
|
private __listCustomersWithSubscriptions;
|
|
@@ -114,7 +125,13 @@ export declare class Billing {
|
|
|
114
125
|
* @throws {@link Schematic.InternalServerError}
|
|
115
126
|
*
|
|
116
127
|
* @example
|
|
117
|
-
* await client.billing.countCustomers(
|
|
128
|
+
* await client.billing.countCustomers({
|
|
129
|
+
* name: "name",
|
|
130
|
+
* failedToImport: true,
|
|
131
|
+
* q: "q",
|
|
132
|
+
* limit: 1,
|
|
133
|
+
* offset: 1
|
|
134
|
+
* })
|
|
118
135
|
*/
|
|
119
136
|
countCustomers(request?: Schematic.CountCustomersRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.CountCustomersResponse>;
|
|
120
137
|
private __countCustomers;
|
|
@@ -130,8 +147,11 @@ export declare class Billing {
|
|
|
130
147
|
*
|
|
131
148
|
* @example
|
|
132
149
|
* await client.billing.listInvoices({
|
|
150
|
+
* companyId: "company_id",
|
|
133
151
|
* customerExternalId: "customer_external_id",
|
|
134
|
-
* subscriptionExternalId: "subscription_external_id"
|
|
152
|
+
* subscriptionExternalId: "subscription_external_id",
|
|
153
|
+
* limit: 1,
|
|
154
|
+
* offset: 1
|
|
135
155
|
* })
|
|
136
156
|
*/
|
|
137
157
|
listInvoices(request: Schematic.ListInvoicesRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListInvoicesResponse>;
|
|
@@ -170,7 +190,11 @@ export declare class Billing {
|
|
|
170
190
|
* @throws {@link Schematic.InternalServerError}
|
|
171
191
|
*
|
|
172
192
|
* @example
|
|
173
|
-
* await client.billing.listMeters(
|
|
193
|
+
* await client.billing.listMeters({
|
|
194
|
+
* displayName: "display_name",
|
|
195
|
+
* limit: 1,
|
|
196
|
+
* offset: 1
|
|
197
|
+
* })
|
|
174
198
|
*/
|
|
175
199
|
listMeters(request?: Schematic.ListMetersRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListMetersResponse>;
|
|
176
200
|
private __listMeters;
|
|
@@ -206,7 +230,10 @@ export declare class Billing {
|
|
|
206
230
|
*
|
|
207
231
|
* @example
|
|
208
232
|
* await client.billing.listPaymentMethods({
|
|
209
|
-
*
|
|
233
|
+
* companyId: "company_id",
|
|
234
|
+
* customerExternalId: "customer_external_id",
|
|
235
|
+
* limit: 1,
|
|
236
|
+
* offset: 1
|
|
210
237
|
* })
|
|
211
238
|
*/
|
|
212
239
|
listPaymentMethods(request: Schematic.ListPaymentMethodsRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListPaymentMethodsResponse>;
|
|
@@ -241,7 +268,19 @@ export declare class Billing {
|
|
|
241
268
|
* @throws {@link Schematic.InternalServerError}
|
|
242
269
|
*
|
|
243
270
|
* @example
|
|
244
|
-
* await client.billing.searchBillingPrices(
|
|
271
|
+
* await client.billing.searchBillingPrices({
|
|
272
|
+
* forInitialPlan: true,
|
|
273
|
+
* forTrialExpiryPlan: true,
|
|
274
|
+
* productId: "product_id",
|
|
275
|
+
* interval: "interval",
|
|
276
|
+
* price: 1,
|
|
277
|
+
* q: "q",
|
|
278
|
+
* requiresPaymentMethod: true,
|
|
279
|
+
* tiersMode: "volume",
|
|
280
|
+
* usageType: "licensed",
|
|
281
|
+
* limit: 1,
|
|
282
|
+
* offset: 1
|
|
283
|
+
* })
|
|
245
284
|
*/
|
|
246
285
|
searchBillingPrices(request?: Schematic.SearchBillingPricesRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.SearchBillingPricesResponse>;
|
|
247
286
|
private __searchBillingPrices;
|
|
@@ -299,7 +338,18 @@ export declare class Billing {
|
|
|
299
338
|
* @throws {@link Schematic.InternalServerError}
|
|
300
339
|
*
|
|
301
340
|
* @example
|
|
302
|
-
* await client.billing.listProductPrices(
|
|
341
|
+
* await client.billing.listProductPrices({
|
|
342
|
+
* name: "name",
|
|
343
|
+
* q: "q",
|
|
344
|
+
* priceUsageType: "licensed",
|
|
345
|
+
* withoutLinkedToPlan: true,
|
|
346
|
+
* withOneTimeCharges: true,
|
|
347
|
+
* withZeroPrice: true,
|
|
348
|
+
* withPricesOnly: true,
|
|
349
|
+
* isActive: true,
|
|
350
|
+
* limit: 1,
|
|
351
|
+
* offset: 1
|
|
352
|
+
* })
|
|
303
353
|
*/
|
|
304
354
|
listProductPrices(request?: Schematic.ListProductPricesRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListProductPricesResponse>;
|
|
305
355
|
private __listProductPrices;
|
|
@@ -348,7 +398,18 @@ export declare class Billing {
|
|
|
348
398
|
* @throws {@link Schematic.InternalServerError}
|
|
349
399
|
*
|
|
350
400
|
* @example
|
|
351
|
-
* await client.billing.listBillingProducts(
|
|
401
|
+
* await client.billing.listBillingProducts({
|
|
402
|
+
* name: "name",
|
|
403
|
+
* q: "q",
|
|
404
|
+
* priceUsageType: "licensed",
|
|
405
|
+
* withoutLinkedToPlan: true,
|
|
406
|
+
* withOneTimeCharges: true,
|
|
407
|
+
* withZeroPrice: true,
|
|
408
|
+
* withPricesOnly: true,
|
|
409
|
+
* isActive: true,
|
|
410
|
+
* limit: 1,
|
|
411
|
+
* offset: 1
|
|
412
|
+
* })
|
|
352
413
|
*/
|
|
353
414
|
listBillingProducts(request?: Schematic.ListBillingProductsRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.ListBillingProductsResponse>;
|
|
354
415
|
private __listBillingProducts;
|
|
@@ -363,12 +424,23 @@ export declare class Billing {
|
|
|
363
424
|
* @throws {@link Schematic.InternalServerError}
|
|
364
425
|
*
|
|
365
426
|
* @example
|
|
366
|
-
* await client.billing.countBillingProducts(
|
|
427
|
+
* await client.billing.countBillingProducts({
|
|
428
|
+
* name: "name",
|
|
429
|
+
* q: "q",
|
|
430
|
+
* priceUsageType: "licensed",
|
|
431
|
+
* withoutLinkedToPlan: true,
|
|
432
|
+
* withOneTimeCharges: true,
|
|
433
|
+
* withZeroPrice: true,
|
|
434
|
+
* withPricesOnly: true,
|
|
435
|
+
* isActive: true,
|
|
436
|
+
* limit: 1,
|
|
437
|
+
* offset: 1
|
|
438
|
+
* })
|
|
367
439
|
*/
|
|
368
440
|
countBillingProducts(request?: Schematic.CountBillingProductsRequest, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.CountBillingProductsResponse>;
|
|
369
441
|
private __countBillingProducts;
|
|
370
442
|
/**
|
|
371
|
-
* @param {Schematic.
|
|
443
|
+
* @param {Schematic.CreateBillingSubscriptionRequestBody} request
|
|
372
444
|
* @param {Billing.RequestOptions} requestOptions - Request-specific configuration.
|
|
373
445
|
*
|
|
374
446
|
* @throws {@link Schematic.BadRequestError}
|
|
@@ -402,9 +474,9 @@ export declare class Billing {
|
|
|
402
474
|
* totalPrice: 1
|
|
403
475
|
* })
|
|
404
476
|
*/
|
|
405
|
-
upsertBillingSubscription(request: Schematic.
|
|
477
|
+
upsertBillingSubscription(request: Schematic.CreateBillingSubscriptionRequestBody, requestOptions?: Billing.RequestOptions): core.HttpResponsePromise<Schematic.UpsertBillingSubscriptionResponse>;
|
|
406
478
|
private __upsertBillingSubscription;
|
|
407
479
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
408
|
-
"X-Schematic-Api-Key": string;
|
|
480
|
+
"X-Schematic-Api-Key": string | undefined;
|
|
409
481
|
}>;
|
|
410
482
|
}
|
|
@@ -4,7 +4,18 @@
|
|
|
4
4
|
import * as Schematic from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
7
|
+
* {
|
|
8
|
+
* name: "name",
|
|
9
|
+
* q: "q",
|
|
10
|
+
* priceUsageType: "licensed",
|
|
11
|
+
* withoutLinkedToPlan: true,
|
|
12
|
+
* withOneTimeCharges: true,
|
|
13
|
+
* withZeroPrice: true,
|
|
14
|
+
* withPricesOnly: true,
|
|
15
|
+
* isActive: true,
|
|
16
|
+
* limit: 1,
|
|
17
|
+
* offset: 1
|
|
18
|
+
* }
|
|
8
19
|
*/
|
|
9
20
|
export interface CountBillingProductsRequest {
|
|
10
21
|
ids?: string | string[];
|
|
@@ -28,11 +28,12 @@ import * as Schematic from "../../../../index";
|
|
|
28
28
|
* totalPrice: 1
|
|
29
29
|
* }
|
|
30
30
|
*/
|
|
31
|
-
export interface
|
|
31
|
+
export interface CreateBillingSubscriptionRequestBody {
|
|
32
32
|
cancelAt?: number;
|
|
33
33
|
cancelAtPeriodEnd: boolean;
|
|
34
34
|
currency: string;
|
|
35
35
|
customerExternalId: string;
|
|
36
|
+
defaultPaymentMethodExternalId?: string;
|
|
36
37
|
defaultPaymentMethodId?: string;
|
|
37
38
|
discounts: Schematic.BillingSubscriptionDiscount[];
|
|
38
39
|
expiredAt: Date;
|
|
@@ -45,5 +46,5 @@ export interface CreateBillingSubscriptionsRequestBody {
|
|
|
45
46
|
subscriptionExternalId: string;
|
|
46
47
|
totalPrice: number;
|
|
47
48
|
trialEnd?: number;
|
|
48
|
-
trialEndSetting?: Schematic.
|
|
49
|
+
trialEndSetting?: Schematic.CreateBillingSubscriptionRequestBodyTrialEndSetting;
|
|
49
50
|
}
|
|
@@ -4,7 +4,18 @@
|
|
|
4
4
|
import * as Schematic from "../../../../index";
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
|
-
* {
|
|
7
|
+
* {
|
|
8
|
+
* name: "name",
|
|
9
|
+
* q: "q",
|
|
10
|
+
* priceUsageType: "licensed",
|
|
11
|
+
* withoutLinkedToPlan: true,
|
|
12
|
+
* withOneTimeCharges: true,
|
|
13
|
+
* withZeroPrice: true,
|
|
14
|
+
* withPricesOnly: true,
|
|
15
|
+
* isActive: true,
|
|
16
|
+
* limit: 1,
|
|
17
|
+
* offset: 1
|
|
18
|
+
* }
|
|
8
19
|
*/
|
|
9
20
|
export interface ListBillingProductsRequest {
|
|
10
21
|
ids?: string | string[];
|