@schematichq/schematic-typescript-node 1.5.3 → 1.5.4

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.
Files changed (92) hide show
  1. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  2. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -0
  3. package/dist/api/resources/companies/client/Client.d.ts +34 -0
  4. package/dist/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.d.ts +9 -0
  5. package/dist/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.d.ts +9 -0
  6. package/dist/api/resources/companies/client/requests/index.d.ts +2 -0
  7. package/dist/api/resources/companies/types/GetBillingEntityChildSubscriptionsParams.d.ts +6 -0
  8. package/dist/api/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.d.ts +6 -0
  9. package/dist/api/resources/companies/types/GetCompanyBillingEntityParams.d.ts +6 -0
  10. package/dist/api/resources/companies/types/GetCompanyBillingEntityResponse.d.ts +6 -0
  11. package/dist/api/resources/companies/types/index.d.ts +4 -0
  12. package/dist/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +1 -0
  13. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +1 -0
  14. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +1 -0
  15. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +0 -1
  16. package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +0 -1
  17. package/dist/api/types/AccountMemberPermission.d.ts +1 -0
  18. package/dist/api/types/BillingCreditAutoTopupAvailability.d.ts +6 -0
  19. package/dist/api/types/BillingCreditGrantZeroedOutReason.d.ts +2 -0
  20. package/dist/api/types/BillingPlanCreditGrantResetCadence.d.ts +2 -0
  21. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +5 -0
  22. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  23. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  24. package/dist/api/types/CompanyBillingEntityResponseData.d.ts +5 -0
  25. package/dist/api/types/CompanyBillingEntitySubscriptionResponseData.d.ts +21 -0
  26. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +2 -0
  27. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  28. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +2 -0
  29. package/dist/api/types/EventBody.d.ts +1 -1
  30. package/dist/api/types/EventBodyInference.d.ts +30 -0
  31. package/dist/api/types/EventType.d.ts +1 -0
  32. package/dist/api/types/IntegrationsListResponseData.d.ts +1 -0
  33. package/dist/api/types/InvoiceRequestBody.d.ts +2 -0
  34. package/dist/api/types/InvoiceResponseData.d.ts +2 -0
  35. package/dist/api/types/ManagePlanRequest.d.ts +2 -0
  36. package/dist/api/types/MetronomeIntegrationConfig.d.ts +4 -1
  37. package/dist/api/types/PlanBundleResponseData.d.ts +0 -1
  38. package/dist/api/types/PlanCreditGrantView.d.ts +2 -0
  39. package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
  40. package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
  41. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  42. package/dist/api/types/PlanViewPublicResponseData.d.ts +2 -0
  43. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +2 -0
  44. package/dist/api/types/WarningTierRequestBody.d.ts +4 -0
  45. package/dist/api/types/WarningTierResponseData.d.ts +5 -0
  46. package/dist/api/types/index.d.ts +6 -0
  47. package/dist/index.js +9 -9
  48. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  49. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -0
  50. package/dist/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsParams.d.ts +9 -0
  51. package/dist/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.d.ts +12 -0
  52. package/dist/serialization/resources/companies/types/GetCompanyBillingEntityParams.d.ts +9 -0
  53. package/dist/serialization/resources/companies/types/GetCompanyBillingEntityResponse.d.ts +12 -0
  54. package/dist/serialization/resources/companies/types/index.d.ts +4 -0
  55. package/dist/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +2 -0
  56. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +2 -0
  57. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +2 -0
  58. package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +0 -2
  59. package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +0 -2
  60. package/dist/serialization/types/AccountMemberPermission.d.ts +1 -1
  61. package/dist/serialization/types/BillingCreditAutoTopupAvailability.d.ts +7 -0
  62. package/dist/serialization/types/BillingCreditGrantZeroedOutReason.d.ts +1 -1
  63. package/dist/serialization/types/BillingPlanCreditGrantResetCadence.d.ts +1 -1
  64. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +3 -0
  65. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  66. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  67. package/dist/serialization/types/CompanyBillingEntityResponseData.d.ts +11 -0
  68. package/dist/serialization/types/CompanyBillingEntitySubscriptionResponseData.d.ts +32 -0
  69. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +3 -0
  70. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +3 -0
  71. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  72. package/dist/serialization/types/EventBody.d.ts +2 -1
  73. package/dist/serialization/types/EventBodyInference.d.ts +22 -0
  74. package/dist/serialization/types/EventType.d.ts +1 -1
  75. package/dist/serialization/types/IntegrationsListResponseData.d.ts +1 -0
  76. package/dist/serialization/types/InvoiceRequestBody.d.ts +2 -0
  77. package/dist/serialization/types/InvoiceResponseData.d.ts +2 -0
  78. package/dist/serialization/types/ManagePlanRequest.d.ts +1 -0
  79. package/dist/serialization/types/MetronomeIntegrationConfig.d.ts +3 -1
  80. package/dist/serialization/types/PlanBundleResponseData.d.ts +0 -2
  81. package/dist/serialization/types/PlanCreditGrantView.d.ts +3 -0
  82. package/dist/serialization/types/PlanDetailResponseData.d.ts +3 -0
  83. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  84. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +3 -0
  85. package/dist/serialization/types/PlanViewPublicResponseData.d.ts +3 -0
  86. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  87. package/dist/serialization/types/WarningTierRequestBody.d.ts +10 -0
  88. package/dist/serialization/types/WarningTierResponseData.d.ts +11 -0
  89. package/dist/serialization/types/index.d.ts +6 -0
  90. package/dist/wasm/rulesengine.js +4 -4
  91. package/dist/wasm/rulesengine_bg.wasm.d.ts +1 -0
  92. package/package.json +1 -1
@@ -11,6 +11,7 @@ export declare namespace CreateBillingSubscriptionRequestBody {
11
11
  application_id?: string | null;
12
12
  cancel_at?: number | null;
13
13
  cancel_at_period_end: boolean;
14
+ company_id?: string | null;
14
15
  currency: string;
15
16
  customer_external_id: string;
16
17
  default_payment_method_external_id?: string | null;
@@ -12,8 +12,10 @@ export declare namespace CreateInvoiceRequestBody {
12
12
  currency: string;
13
13
  customer_external_id: string;
14
14
  due_date?: string | null;
15
+ ending_balance?: number | null;
15
16
  external_id?: string | null;
16
17
  payment_method_external_id?: string | null;
18
+ starting_balance?: number | null;
17
19
  status?: InvoiceStatus.Raw | null;
18
20
  subscription_external_id?: string | null;
19
21
  subtotal: number;
@@ -0,0 +1,9 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ export declare const GetBillingEntityChildSubscriptionsParams: core.serialization.ObjectSchema<serializers.GetBillingEntityChildSubscriptionsParams.Raw, Schematic.GetBillingEntityChildSubscriptionsParams>;
5
+ export declare namespace GetBillingEntityChildSubscriptionsParams {
6
+ interface Raw {
7
+ company_id?: string | null;
8
+ }
9
+ }
@@ -0,0 +1,12 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { CompanyBillingEntitySubscriptionResponseData } from "../../../types/CompanyBillingEntitySubscriptionResponseData";
5
+ import { GetBillingEntityChildSubscriptionsParams } from "./GetBillingEntityChildSubscriptionsParams";
6
+ export declare const GetBillingEntityChildSubscriptionsResponse: core.serialization.ObjectSchema<serializers.GetBillingEntityChildSubscriptionsResponse.Raw, Schematic.GetBillingEntityChildSubscriptionsResponse>;
7
+ export declare namespace GetBillingEntityChildSubscriptionsResponse {
8
+ interface Raw {
9
+ data: CompanyBillingEntitySubscriptionResponseData.Raw[];
10
+ params: GetBillingEntityChildSubscriptionsParams.Raw;
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ export declare const GetCompanyBillingEntityParams: core.serialization.ObjectSchema<serializers.GetCompanyBillingEntityParams.Raw, Schematic.GetCompanyBillingEntityParams>;
5
+ export declare namespace GetCompanyBillingEntityParams {
6
+ interface Raw {
7
+ company_id?: string | null;
8
+ }
9
+ }
@@ -0,0 +1,12 @@
1
+ import type * as Schematic from "../../../../api/index";
2
+ import * as core from "../../../../core";
3
+ import type * as serializers from "../../../index";
4
+ import { CompanyBillingEntityResponseData } from "../../../types/CompanyBillingEntityResponseData";
5
+ import { GetCompanyBillingEntityParams } from "./GetCompanyBillingEntityParams";
6
+ export declare const GetCompanyBillingEntityResponse: core.serialization.ObjectSchema<serializers.GetCompanyBillingEntityResponse.Raw, Schematic.GetCompanyBillingEntityResponse>;
7
+ export declare namespace GetCompanyBillingEntityResponse {
8
+ interface Raw {
9
+ data: CompanyBillingEntityResponseData.Raw[];
10
+ params: GetCompanyBillingEntityParams.Raw;
11
+ }
12
+ }
@@ -18,6 +18,10 @@ export * from "./DeleteUserByKeysResponse";
18
18
  export * from "./DeleteUserResponse";
19
19
  export * from "./GetActiveCompanySubscriptionParams";
20
20
  export * from "./GetActiveCompanySubscriptionResponse";
21
+ export * from "./GetBillingEntityChildSubscriptionsParams";
22
+ export * from "./GetBillingEntityChildSubscriptionsResponse";
23
+ export * from "./GetCompanyBillingEntityParams";
24
+ export * from "./GetCompanyBillingEntityResponse";
21
25
  export * from "./GetCompanyResponse";
22
26
  export * from "./GetEntityTraitDefinitionResponse";
23
27
  export * from "./GetEntityTraitValuesParams";
@@ -9,6 +9,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
9
9
  import { EntitlementValueType } from "../../../../types/EntitlementValueType";
10
10
  import { MetricPeriod } from "../../../../types/MetricPeriod";
11
11
  import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
12
+ import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
12
13
  export declare const CreateBillingLinkedPlanEntitlementRequestBody: core.serialization.Schema<serializers.CreateBillingLinkedPlanEntitlementRequestBody.Raw, Schematic.CreateBillingLinkedPlanEntitlementRequestBody>;
13
14
  export declare namespace CreateBillingLinkedPlanEntitlementRequestBody {
14
15
  interface Raw {
@@ -43,6 +44,7 @@ export declare namespace CreateBillingLinkedPlanEntitlementRequestBody {
43
44
  value_numeric?: number | null;
44
45
  value_trait_id?: string | null;
45
46
  value_type: EntitlementValueType.Raw;
47
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
46
48
  yearly_metered_price_id?: string | null;
47
49
  yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
48
50
  yearly_unit_price?: number | null;
@@ -8,6 +8,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
8
8
  import { EntitlementValueType } from "../../../../types/EntitlementValueType";
9
9
  import { MetricPeriod } from "../../../../types/MetricPeriod";
10
10
  import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
11
+ import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
11
12
  export declare const CreatePlanEntitlementRequestBody: core.serialization.Schema<serializers.CreatePlanEntitlementRequestBody.Raw, Schematic.CreatePlanEntitlementRequestBody>;
12
13
  export declare namespace CreatePlanEntitlementRequestBody {
13
14
  interface Raw {
@@ -40,6 +41,7 @@ export declare namespace CreatePlanEntitlementRequestBody {
40
41
  value_numeric?: number | null;
41
42
  value_trait_id?: string | null;
42
43
  value_type: EntitlementValueType.Raw;
44
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
43
45
  yearly_metered_price_id?: string | null;
44
46
  yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
45
47
  yearly_unit_price?: number | null;
@@ -8,6 +8,7 @@ import { EntitlementPriceBehavior } from "../../../../types/EntitlementPriceBeha
8
8
  import { EntitlementValueType } from "../../../../types/EntitlementValueType";
9
9
  import { MetricPeriod } from "../../../../types/MetricPeriod";
10
10
  import { MetricPeriodMonthReset } from "../../../../types/MetricPeriodMonthReset";
11
+ import { WarningTierRequestBody } from "../../../../types/WarningTierRequestBody";
11
12
  export declare const UpdatePlanEntitlementRequestBody: core.serialization.Schema<serializers.UpdatePlanEntitlementRequestBody.Raw, Schematic.UpdatePlanEntitlementRequestBody>;
12
13
  export declare namespace UpdatePlanEntitlementRequestBody {
13
14
  interface Raw {
@@ -37,6 +38,7 @@ export declare namespace UpdatePlanEntitlementRequestBody {
37
38
  value_numeric?: number | null;
38
39
  value_trait_id?: string | null;
39
40
  value_type: EntitlementValueType.Raw;
41
+ warning_tiers?: WarningTierRequestBody.Raw[] | null;
40
42
  yearly_metered_price_id?: string | null;
41
43
  yearly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
42
44
  yearly_unit_price?: number | null;
@@ -4,7 +4,6 @@ import type * as serializers from "../../../../index";
4
4
  import { CreatePlanRequestBody } from "../../../../types/CreatePlanRequestBody";
5
5
  import { PlanBundleCreditGrantRequestBody } from "../../../../types/PlanBundleCreditGrantRequestBody";
6
6
  import { PlanBundleEntitlementRequestBody } from "../../../../types/PlanBundleEntitlementRequestBody";
7
- import { UpdatePlanTraitTraitRequestBody } from "../../../../types/UpdatePlanTraitTraitRequestBody";
8
7
  import { UpsertBillingProductRequestBody } from "../../../../types/UpsertBillingProductRequestBody";
9
8
  export declare const CreatePlanBundleRequestBody: core.serialization.Schema<serializers.CreatePlanBundleRequestBody.Raw, Schematic.CreatePlanBundleRequestBody>;
10
9
  export declare namespace CreatePlanBundleRequestBody {
@@ -13,6 +12,5 @@ export declare namespace CreatePlanBundleRequestBody {
13
12
  credit_grants?: PlanBundleCreditGrantRequestBody.Raw[] | null;
14
13
  entitlements: PlanBundleEntitlementRequestBody.Raw[];
15
14
  plan?: CreatePlanRequestBody.Raw | null;
16
- traits?: UpdatePlanTraitTraitRequestBody.Raw[] | null;
17
15
  }
18
16
  }
@@ -4,7 +4,6 @@ import type * as serializers from "../../../../index";
4
4
  import { PlanBundleCreditGrantRequestBody } from "../../../../types/PlanBundleCreditGrantRequestBody";
5
5
  import { PlanBundleEntitlementRequestBody } from "../../../../types/PlanBundleEntitlementRequestBody";
6
6
  import { UpdatePlanRequestBody } from "../../../../types/UpdatePlanRequestBody";
7
- import { UpdatePlanTraitTraitRequestBody } from "../../../../types/UpdatePlanTraitTraitRequestBody";
8
7
  import { UpsertBillingProductRequestBody } from "../../../../types/UpsertBillingProductRequestBody";
9
8
  export declare const UpdatePlanBundleRequestBody: core.serialization.Schema<serializers.UpdatePlanBundleRequestBody.Raw, Schematic.UpdatePlanBundleRequestBody>;
10
9
  export declare namespace UpdatePlanBundleRequestBody {
@@ -14,6 +13,5 @@ export declare namespace UpdatePlanBundleRequestBody {
14
13
  entitlements: PlanBundleEntitlementRequestBody.Raw[];
15
14
  plan?: UpdatePlanRequestBody.Raw | null;
16
15
  plan_version_id?: string | null;
17
- traits?: UpdatePlanTraitTraitRequestBody.Raw[] | null;
18
16
  }
19
17
  }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const AccountMemberPermission: core.serialization.Schema<serializers.AccountMemberPermission.Raw, Schematic.AccountMemberPermission>;
5
5
  export declare namespace AccountMemberPermission {
6
- type Raw = "companies_edit" | "company_users_edit" | "components_edit" | "data_exports_edit" | "features_edit" | "flag_rules_edit" | "flags_edit" | "overrides_edit" | "plan_billing_edit" | "plan_entitlements_edit" | "plan_versions_edit" | "plans_edit" | "webhooks_edit" | "webhooks_reveal_secret";
6
+ type Raw = "companies_edit" | "company_users_edit" | "components_edit" | "custom_plans_edit" | "data_exports_edit" | "features_edit" | "flag_rules_edit" | "flags_edit" | "overrides_edit" | "plan_billing_edit" | "plan_entitlements_edit" | "plan_versions_edit" | "plans_edit" | "webhooks_edit" | "webhooks_reveal_secret";
7
7
  }
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const BillingCreditAutoTopupAvailability: core.serialization.Schema<serializers.BillingCreditAutoTopupAvailability.Raw, Schematic.BillingCreditAutoTopupAvailability>;
5
+ export declare namespace BillingCreditAutoTopupAvailability {
6
+ type Raw = "off" | "automatic" | "user_controlled";
7
+ }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const BillingCreditGrantZeroedOutReason: core.serialization.Schema<serializers.BillingCreditGrantZeroedOutReason.Raw, Schematic.BillingCreditGrantZeroedOutReason>;
5
5
  export declare namespace BillingCreditGrantZeroedOutReason {
6
- type Raw = "expired" | "manual" | "plan_change" | "plan_period_reset" | "reconciled";
6
+ type Raw = "customer_archived" | "expired" | "integration_uninstalled" | "manual" | "plan_change" | "plan_period_reset" | "reconciled";
7
7
  }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const BillingPlanCreditGrantResetCadence: core.serialization.Schema<serializers.BillingPlanCreditGrantResetCadence.Raw, Schematic.BillingPlanCreditGrantResetCadence>;
5
5
  export declare namespace BillingPlanCreditGrantResetCadence {
6
- type Raw = "daily" | "monthly" | "weekly" | "yearly";
6
+ type Raw = "daily" | "every_6_months" | "monthly" | "quarterly" | "weekly" | "yearly";
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
4
5
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
5
6
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
7
  import { BillingCreditResponseData } from "./BillingCreditResponseData";
@@ -13,6 +14,7 @@ export declare namespace BillingPlanCreditGrantResponseData {
13
14
  interface Raw {
14
15
  auto_topup_amount?: number | null;
15
16
  auto_topup_amount_type?: string | null;
17
+ auto_topup_availability: BillingCreditAutoTopupAvailability.Raw;
16
18
  auto_topup_enabled: boolean;
17
19
  auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
18
20
  auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -20,6 +22,7 @@ export declare namespace BillingPlanCreditGrantResponseData {
20
22
  auto_topup_self_service: boolean;
21
23
  auto_topup_threshold_credits?: number | null;
22
24
  auto_topup_threshold_percent?: number | null;
25
+ can_buy_bundles: boolean;
23
26
  created_at: string;
24
27
  credit?: BillingCreditResponseData.Raw | null;
25
28
  credit_amount: number;
@@ -11,6 +11,7 @@ export declare namespace ChangeSubscriptionInternalRequestBody {
11
11
  interface Raw {
12
12
  add_on_ids: UpdateAddOnRequestBody.Raw[];
13
13
  auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[];
14
+ billing_entity_id?: string | null;
14
15
  company_id: string;
15
16
  coupon_external_id?: string | null;
16
17
  credit_bundles: UpdateCreditBundleRequestBody.Raw[];
@@ -11,6 +11,7 @@ export declare namespace ChangeSubscriptionRequestBody {
11
11
  interface Raw {
12
12
  add_on_ids: UpdateAddOnRequestBody.Raw[];
13
13
  auto_topup_overrides: UpdateAutoTopupOverrideRequestBody.Raw[];
14
+ billing_entity_id?: string | null;
14
15
  coupon_external_id?: string | null;
15
16
  credit_bundles: UpdateCreditBundleRequestBody.Raw[];
16
17
  custom_field_values: CheckoutFieldValue.Raw[];
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ import { CompanyResponseData } from "./CompanyResponseData";
5
+ export declare const CompanyBillingEntityResponseData: core.serialization.ObjectSchema<serializers.CompanyBillingEntityResponseData.Raw, Schematic.CompanyBillingEntityResponseData>;
6
+ export declare namespace CompanyBillingEntityResponseData {
7
+ interface Raw {
8
+ billing_entity?: CompanyResponseData.Raw | null;
9
+ has_own_stripe_customer: boolean;
10
+ }
11
+ }
@@ -0,0 +1,32 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ import { BillingProductForSubscriptionResponseData } from "./BillingProductForSubscriptionResponseData";
5
+ import { BillingProviderType } from "./BillingProviderType";
6
+ import { BillingSubscriptionDiscountView } from "./BillingSubscriptionDiscountView";
7
+ import { CompanyResponseData } from "./CompanyResponseData";
8
+ import { InvoiceResponseData } from "./InvoiceResponseData";
9
+ import { PaymentMethodResponseData } from "./PaymentMethodResponseData";
10
+ export declare const CompanyBillingEntitySubscriptionResponseData: core.serialization.ObjectSchema<serializers.CompanyBillingEntitySubscriptionResponseData.Raw, Schematic.CompanyBillingEntitySubscriptionResponseData>;
11
+ export declare namespace CompanyBillingEntitySubscriptionResponseData {
12
+ interface Raw {
13
+ cancel_at?: string | null;
14
+ cancel_at_period_end: boolean;
15
+ company?: CompanyResponseData.Raw | null;
16
+ currency: string;
17
+ customer_external_id: string;
18
+ discounts: BillingSubscriptionDiscountView.Raw[];
19
+ expired_at?: string | null;
20
+ interval: string;
21
+ is_initial: boolean;
22
+ latest_invoice?: InvoiceResponseData.Raw | null;
23
+ payment_method?: PaymentMethodResponseData.Raw | null;
24
+ plan_name: string;
25
+ products: BillingProductForSubscriptionResponseData.Raw[];
26
+ provider_type: BillingProviderType.Raw;
27
+ status: string;
28
+ subscription_external_id: string;
29
+ total_price: number;
30
+ trial_end?: string | null;
31
+ }
32
+ }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
4
5
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
5
6
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
7
  import { BillingCreditView } from "./BillingCreditView";
@@ -13,6 +14,7 @@ export declare namespace CompanyPlanCreditGrantView {
13
14
  interface Raw {
14
15
  billing_credit_auto_topup_amount?: number | null;
15
16
  billing_credit_auto_topup_amount_type?: string | null;
17
+ billing_credit_auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
16
18
  billing_credit_auto_topup_enabled: boolean;
17
19
  billing_credit_auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
18
20
  billing_credit_auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -20,6 +22,7 @@ export declare namespace CompanyPlanCreditGrantView {
20
22
  billing_credit_auto_topup_self_service: boolean;
21
23
  billing_credit_auto_topup_threshold_credits?: number | null;
22
24
  billing_credit_auto_topup_threshold_percent?: number | null;
25
+ billing_credit_can_buy_bundles: boolean;
23
26
  company_auto_topup_amount?: number | null;
24
27
  company_auto_topup_enabled?: boolean | null;
25
28
  company_auto_topup_threshold_credits?: number | null;
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditResponseData } from "./BillingCreditResponseData";
4
5
  import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
5
6
  import { BillingPriceResponseData } from "./BillingPriceResponseData";
6
7
  import { BillingProductDetailResponseData } from "./BillingProductDetailResponseData";
@@ -31,11 +32,13 @@ export declare namespace CompanyPlanDetailResponseData {
31
32
  company_can_trial: boolean;
32
33
  company_count: number;
33
34
  company_id?: string | null;
35
+ company_logo_url?: string | null;
34
36
  company_name?: string | null;
35
37
  compatible_plan_ids: string[];
36
38
  controlled_by: BillingProviderType.Raw;
37
39
  copied_from_plan_id?: string | null;
38
40
  created_at: string;
41
+ credits: BillingCreditResponseData.Raw[];
39
42
  currency_prices: PlanCurrencyPricesResponseData.Raw[];
40
43
  current: boolean;
41
44
  custom: boolean;
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
4
5
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
5
6
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
7
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
@@ -13,6 +14,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
13
14
  apply_to_existing?: boolean | null;
14
15
  auto_topup_amount?: number | null;
15
16
  auto_topup_amount_type?: CreditAutoTopupAmountType.Raw | null;
17
+ auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
16
18
  auto_topup_enabled?: boolean | null;
17
19
  auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
18
20
  auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -20,6 +22,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
20
22
  auto_topup_self_service?: boolean | null;
21
23
  auto_topup_threshold_credits?: number | null;
22
24
  auto_topup_threshold_percent?: number | null;
25
+ can_buy_bundles?: boolean | null;
23
26
  credit_amount: number;
24
27
  credit_id: string;
25
28
  expiry_type?: BillingCreditExpiryType.Raw | null;
@@ -3,8 +3,9 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  import { EventBodyFlagCheck } from "./EventBodyFlagCheck";
5
5
  import { EventBodyIdentify } from "./EventBodyIdentify";
6
+ import { EventBodyInference } from "./EventBodyInference";
6
7
  import { EventBodyTrack } from "./EventBodyTrack";
7
8
  export declare const EventBody: core.serialization.Schema<serializers.EventBody.Raw, Schematic.EventBody>;
8
9
  export declare namespace EventBody {
9
- type Raw = EventBodyTrack.Raw | EventBodyFlagCheck.Raw | EventBodyIdentify.Raw;
10
+ type Raw = EventBodyTrack.Raw | EventBodyFlagCheck.Raw | EventBodyIdentify.Raw | EventBodyInference.Raw;
10
11
  }
@@ -0,0 +1,22 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const EventBodyInference: core.serialization.ObjectSchema<serializers.EventBodyInference.Raw, Schematic.EventBodyInference>;
5
+ export declare namespace EventBodyInference {
6
+ interface Raw {
7
+ cached_input_tokens?: number | null;
8
+ company: Record<string, string>;
9
+ cost?: string | null;
10
+ currency?: string | null;
11
+ event?: string | null;
12
+ input_tokens: number;
13
+ operation?: string | null;
14
+ output_tokens: number;
15
+ provider: string;
16
+ reasoning_tokens?: number | null;
17
+ request_model?: string | null;
18
+ requests?: number | null;
19
+ response_model: string;
20
+ user?: Record<string, string> | null;
21
+ }
22
+ }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const EventType: core.serialization.Schema<serializers.EventType.Raw, Schematic.EventType>;
5
5
  export declare namespace EventType {
6
- type Raw = "flag_check" | "identify" | "track";
6
+ type Raw = "flag_check" | "identify" | "inference" | "track";
7
7
  }
@@ -13,6 +13,7 @@ export declare namespace IntegrationsListResponseData {
13
13
  id: string;
14
14
  is_app_install: boolean;
15
15
  is_connect_install: boolean;
16
+ last_webhook_received_at?: string | null;
16
17
  state: IntegrationState.Raw;
17
18
  type: IntegrationType.Raw;
18
19
  }
@@ -12,7 +12,9 @@ export declare namespace InvoiceRequestBody {
12
12
  currency: string;
13
13
  customer_external_id: string;
14
14
  due_date?: string | null;
15
+ ending_balance?: number | null;
15
16
  payment_method_external_id?: string | null;
17
+ starting_balance?: number | null;
16
18
  status?: InvoiceStatus.Raw | null;
17
19
  subscription_external_id?: string | null;
18
20
  subtotal: number;
@@ -15,11 +15,13 @@ export declare namespace InvoiceResponseData {
15
15
  currency: string;
16
16
  customer_external_id: string;
17
17
  due_date?: string | null;
18
+ ending_balance: number;
18
19
  environment_id: string;
19
20
  external_id?: string | null;
20
21
  id: string;
21
22
  payment_method_external_id?: string | null;
22
23
  provider_type: BillingProviderType.Raw;
24
+ starting_balance: number;
23
25
  status?: InvoiceStatus.Raw | null;
24
26
  subscription_external_id?: string | null;
25
27
  subtotal: number;
@@ -12,6 +12,7 @@ export declare namespace ManagePlanRequest {
12
12
  base_plan_id?: string | null;
13
13
  base_plan_price_id?: string | null;
14
14
  base_plan_version_id?: string | null;
15
+ billing_entity_id?: string | null;
15
16
  cancel_immediately?: boolean | null;
16
17
  company_id: string;
17
18
  coupon_external_id?: string | null;
@@ -3,5 +3,7 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const MetronomeIntegrationConfig: core.serialization.ObjectSchema<serializers.MetronomeIntegrationConfig.Raw, Schematic.MetronomeIntegrationConfig>;
5
5
  export declare namespace MetronomeIntegrationConfig {
6
- type Raw = {};
6
+ interface Raw {
7
+ external_customer_id_key?: string | null;
8
+ }
7
9
  }
@@ -5,7 +5,6 @@ import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResp
5
5
  import { BillingProductPlanResponseData } from "./BillingProductPlanResponseData";
6
6
  import { PlanEntitlementResponseData } from "./PlanEntitlementResponseData";
7
7
  import { PlanResponseData } from "./PlanResponseData";
8
- import { PlanTraitResponseData } from "./PlanTraitResponseData";
9
8
  export declare const PlanBundleResponseData: core.serialization.ObjectSchema<serializers.PlanBundleResponseData.Raw, Schematic.PlanBundleResponseData>;
10
9
  export declare namespace PlanBundleResponseData {
11
10
  interface Raw {
@@ -13,6 +12,5 @@ export declare namespace PlanBundleResponseData {
13
12
  credit_grants?: BillingPlanCreditGrantResponseData.Raw[] | null;
14
13
  entitlements?: PlanEntitlementResponseData.Raw[] | null;
15
14
  plan?: PlanResponseData.Raw | null;
16
- traits?: PlanTraitResponseData.Raw[] | null;
17
15
  }
18
16
  }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
4
5
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
5
6
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
7
  import { BillingCreditView } from "./BillingCreditView";
@@ -13,6 +14,7 @@ export declare namespace PlanCreditGrantView {
13
14
  interface Raw {
14
15
  billing_credit_auto_topup_amount?: number | null;
15
16
  billing_credit_auto_topup_amount_type?: string | null;
17
+ billing_credit_auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
16
18
  billing_credit_auto_topup_enabled: boolean;
17
19
  billing_credit_auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
18
20
  billing_credit_auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -20,6 +22,7 @@ export declare namespace PlanCreditGrantView {
20
22
  billing_credit_auto_topup_self_service: boolean;
21
23
  billing_credit_auto_topup_threshold_credits?: number | null;
22
24
  billing_credit_auto_topup_threshold_percent?: number | null;
25
+ billing_credit_can_buy_bundles: boolean;
23
26
  created_at: string;
24
27
  credit?: BillingCreditView.Raw | null;
25
28
  credit_amount: number;
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditResponseData } from "./BillingCreditResponseData";
4
5
  import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
5
6
  import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResponseData";
6
7
  import { BillingPriceResponseData } from "./BillingPriceResponseData";
@@ -25,10 +26,12 @@ export declare namespace PlanDetailResponseData {
25
26
  charge_type: ChargeType.Raw;
26
27
  company_count: number;
27
28
  company_id?: string | null;
29
+ company_logo_url?: string | null;
28
30
  company_name?: string | null;
29
31
  controlled_by: BillingProviderType.Raw;
30
32
  copied_from_plan_id?: string | null;
31
33
  created_at: string;
34
+ credits: BillingCreditResponseData.Raw[];
32
35
  currency_prices: PlanCurrencyPricesResponseData.Raw[];
33
36
  description: string;
34
37
  draft_version?: PlanVersionResponseData.Raw | null;
@@ -13,6 +13,7 @@ import { FeatureResponseData } from "./FeatureResponseData";
13
13
  import { MetricPeriod } from "./MetricPeriod";
14
14
  import { MetricPeriodMonthReset } from "./MetricPeriodMonthReset";
15
15
  import { PlanResponseData } from "./PlanResponseData";
16
+ import { WarningTierResponseData } from "./WarningTierResponseData";
16
17
  export declare const PlanEntitlementResponseData: core.serialization.ObjectSchema<serializers.PlanEntitlementResponseData.Raw, Schematic.PlanEntitlementResponseData>;
17
18
  export declare namespace PlanEntitlementResponseData {
18
19
  interface Raw {
@@ -45,5 +46,6 @@ export declare namespace PlanEntitlementResponseData {
45
46
  value_trait?: EntityTraitDefinitionResponseData.Raw | null;
46
47
  value_trait_id?: string | null;
47
48
  value_type: EntitlementValueType.Raw;
49
+ warning_tiers: WarningTierResponseData.Raw[];
48
50
  }
49
51
  }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditResponseData } from "./BillingCreditResponseData";
4
5
  import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
5
6
  import { BillingPlanCreditGrantResponseData } from "./BillingPlanCreditGrantResponseData";
6
7
  import { BillingPriceResponseData } from "./BillingPriceResponseData";
@@ -28,11 +29,13 @@ export declare namespace PlanGroupPlanDetailResponseData {
28
29
  charge_type: ChargeType.Raw;
29
30
  company_count: number;
30
31
  company_id?: string | null;
32
+ company_logo_url?: string | null;
31
33
  company_name?: string | null;
32
34
  compatible_plan_ids: string[];
33
35
  controlled_by: BillingProviderType.Raw;
34
36
  copied_from_plan_id?: string | null;
35
37
  created_at: string;
38
+ credits: BillingCreditResponseData.Raw[];
36
39
  currency_prices: PlanCurrencyPricesResponseData.Raw[];
37
40
  custom_plan_config?: CustomPlanViewConfigResponseData.Raw | null;
38
41
  description: string;
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditResponseData } from "./BillingCreditResponseData";
4
5
  import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
5
6
  import { BillingPriceResponseData } from "./BillingPriceResponseData";
6
7
  import { BillingProductDetailResponseData } from "./BillingProductDetailResponseData";
@@ -28,11 +29,13 @@ export declare namespace PlanViewPublicResponseData {
28
29
  charge_type: ChargeType.Raw;
29
30
  company_count: number;
30
31
  company_id?: string | null;
32
+ company_logo_url?: string | null;
31
33
  company_name?: string | null;
32
34
  compatible_plan_ids: string[];
33
35
  controlled_by: BillingProviderType.Raw;
34
36
  copied_from_plan_id?: string | null;
35
37
  created_at: string;
38
+ credits: BillingCreditResponseData.Raw[];
36
39
  currency_prices: PlanCurrencyPricesResponseData.Raw[];
37
40
  custom: boolean;
38
41
  custom_plan_config?: CustomPlanConfig.Raw | null;
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
4
5
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
5
6
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
7
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
@@ -13,6 +14,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
13
14
  apply_to_existing?: boolean | null;
14
15
  auto_topup_amount?: number | null;
15
16
  auto_topup_amount_type?: CreditAutoTopupAmountType.Raw | null;
17
+ auto_topup_availability?: BillingCreditAutoTopupAvailability.Raw | null;
16
18
  auto_topup_enabled?: boolean | null;
17
19
  auto_topup_expiry_type?: BillingCreditExpiryType.Raw | null;
18
20
  auto_topup_expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -20,6 +22,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
20
22
  auto_topup_self_service?: boolean | null;
21
23
  auto_topup_threshold_credits?: number | null;
22
24
  auto_topup_threshold_percent?: number | null;
25
+ can_buy_bundles?: boolean | null;
23
26
  credit_amount?: number | null;
24
27
  expiry_type?: BillingCreditExpiryType.Raw | null;
25
28
  expiry_unit?: BillingCreditExpiryUnit.Raw | null;
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const WarningTierRequestBody: core.serialization.ObjectSchema<serializers.WarningTierRequestBody.Raw, Schematic.WarningTierRequestBody>;
5
+ export declare namespace WarningTierRequestBody {
6
+ interface Raw {
7
+ key: string;
8
+ value: number;
9
+ }
10
+ }