@schematichq/schematic-typescript-node 1.6.3 → 1.6.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 (125) hide show
  1. package/README.md +18 -3
  2. package/dist/api/resources/accounts/client/requests/UpdateEnvironmentRequestBody.d.ts +1 -0
  3. package/dist/api/resources/credits/client/Client.d.ts +24 -4
  4. package/dist/api/resources/credits/client/requests/AcquireCreditLeaseRequestBody.d.ts +2 -0
  5. package/dist/api/resources/credits/client/requests/CountCreditEventLedgerRequest.d.ts +1 -1
  6. package/dist/api/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +8 -4
  7. package/dist/api/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +2 -0
  8. package/dist/api/resources/credits/client/requests/GetCreditSpendPolicyUsageRequest.d.ts +13 -0
  9. package/dist/api/resources/credits/client/requests/ListCreditEventLedgerRequest.d.ts +1 -1
  10. package/dist/api/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +3 -0
  11. package/dist/api/resources/credits/client/requests/index.d.ts +1 -0
  12. package/dist/api/resources/credits/types/GetCreditSpendPolicyUsageParams.d.ts +8 -0
  13. package/dist/api/resources/credits/types/GetCreditSpendPolicyUsageResponse.d.ts +6 -0
  14. package/dist/api/resources/credits/types/index.d.ts +2 -0
  15. package/dist/api/resources/entitlements/client/Client.d.ts +69 -0
  16. package/dist/api/resources/entitlements/client/requests/CountCompanyUserUsageRequest.d.ts +29 -0
  17. package/dist/api/resources/entitlements/client/requests/GetCompanyUserUsageMetricsRequest.d.ts +16 -0
  18. package/dist/api/resources/entitlements/client/requests/ListCompanyUserUsageRequest.d.ts +29 -0
  19. package/dist/api/resources/entitlements/client/requests/index.d.ts +3 -0
  20. package/dist/api/resources/entitlements/types/CountCompanyUserUsageParams.d.ts +20 -0
  21. package/dist/api/resources/entitlements/types/CountCompanyUserUsageResponse.d.ts +6 -0
  22. package/dist/api/resources/entitlements/types/GetCompanyUserUsageMetricsParams.d.ts +11 -0
  23. package/dist/api/resources/entitlements/types/GetCompanyUserUsageMetricsResponse.d.ts +6 -0
  24. package/dist/api/resources/entitlements/types/ListCompanyUserUsageParams.d.ts +20 -0
  25. package/dist/api/resources/entitlements/types/ListCompanyUserUsageResponse.d.ts +6 -0
  26. package/dist/api/resources/entitlements/types/index.d.ts +6 -0
  27. package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
  28. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +2 -0
  29. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +2 -0
  30. package/dist/api/resources/planmigrations/client/Client.d.ts +2 -0
  31. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +2 -0
  32. package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +3 -0
  33. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +2 -0
  34. package/dist/api/resources/planmigrations/types/CountMigrationsParams.d.ts +1 -0
  35. package/dist/api/resources/planmigrations/types/ListMigrationsParams.d.ts +1 -0
  36. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +5 -0
  37. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
  38. package/dist/api/types/CaptureRawEvent.d.ts +2 -0
  39. package/dist/api/types/CheckFlagsResponseData.d.ts +2 -0
  40. package/dist/api/types/CompanyDetailResponseData.d.ts +1 -0
  41. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +1 -0
  42. package/dist/api/types/CompanyUserUsageMetricsResponseData.d.ts +11 -0
  43. package/dist/api/types/CompanyUserUsageResponseData.d.ts +15 -0
  44. package/dist/api/types/CompanyUserUsageRowResponseData.d.ts +13 -0
  45. package/dist/api/types/ComponentDisplaySettings.d.ts +1 -0
  46. package/dist/api/types/ComponentSettingsResponseData.d.ts +1 -0
  47. package/dist/api/types/CreditEventLedgerResponseData.d.ts +3 -1
  48. package/dist/api/types/CreditEventType.d.ts +3 -0
  49. package/dist/api/types/CreditLedgerEntryKind.d.ts +10 -0
  50. package/dist/api/types/CreditSpendPolicy.d.ts +21 -0
  51. package/dist/api/types/CreditSpendPolicyResponseData.d.ts +9 -0
  52. package/dist/api/types/CreditSpendWindow.d.ts +6 -0
  53. package/dist/api/types/CreditSpendWindowUnit.d.ts +6 -0
  54. package/dist/api/types/CustomPlanBillingResponseData.d.ts +2 -0
  55. package/dist/api/types/EnvironmentDetailResponseData.d.ts +1 -0
  56. package/dist/api/types/EnvironmentResponseData.d.ts +1 -0
  57. package/dist/api/types/EstimatedPlanTotal.d.ts +6 -0
  58. package/dist/api/types/PendingMigrationResponseData.d.ts +8 -0
  59. package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
  60. package/dist/api/types/PlanVersionMigrationStrategy.d.ts +1 -0
  61. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  62. package/dist/api/types/RulesengineCompany.d.ts +1 -0
  63. package/dist/api/types/RulesengineCreditSpendPolicy.d.ts +21 -0
  64. package/dist/api/types/RulesengineCreditSpendPolicyScope.d.ts +6 -0
  65. package/dist/api/types/RulesengineCreditSpendWindow.d.ts +6 -0
  66. package/dist/api/types/RulesengineUser.d.ts +1 -0
  67. package/dist/api/types/UserUsageMetric.d.ts +5 -0
  68. package/dist/api/types/index.d.ts +12 -0
  69. package/dist/datastream/datastream-client.d.ts +2 -2
  70. package/dist/index.js +9 -9
  71. package/dist/serialization/resources/accounts/client/requests/UpdateEnvironmentRequestBody.d.ts +1 -0
  72. package/dist/serialization/resources/credits/client/requests/AcquireCreditLeaseRequestBody.d.ts +1 -0
  73. package/dist/serialization/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +4 -1
  74. package/dist/serialization/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +1 -0
  75. package/dist/serialization/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +3 -0
  76. package/dist/serialization/resources/credits/types/GetCreditSpendPolicyUsageParams.d.ts +11 -0
  77. package/dist/serialization/resources/credits/types/GetCreditSpendPolicyUsageResponse.d.ts +12 -0
  78. package/dist/serialization/resources/credits/types/index.d.ts +2 -0
  79. package/dist/serialization/resources/entitlements/types/CountCompanyUserUsageParams.d.ts +16 -0
  80. package/dist/serialization/resources/entitlements/types/CountCompanyUserUsageResponse.d.ts +12 -0
  81. package/dist/serialization/resources/entitlements/types/GetCompanyUserUsageMetricsParams.d.ts +11 -0
  82. package/dist/serialization/resources/entitlements/types/GetCompanyUserUsageMetricsResponse.d.ts +12 -0
  83. package/dist/serialization/resources/entitlements/types/ListCompanyUserUsageParams.d.ts +16 -0
  84. package/dist/serialization/resources/entitlements/types/ListCompanyUserUsageResponse.d.ts +12 -0
  85. package/dist/serialization/resources/entitlements/types/index.d.ts +6 -0
  86. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  87. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  88. package/dist/serialization/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +1 -0
  89. package/dist/serialization/resources/planmigrations/types/CountMigrationsParams.d.ts +1 -0
  90. package/dist/serialization/resources/planmigrations/types/ListMigrationsParams.d.ts +1 -0
  91. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +2 -0
  92. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -0
  93. package/dist/serialization/types/CaptureRawEvent.d.ts +2 -0
  94. package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -0
  95. package/dist/serialization/types/CompanyDetailResponseData.d.ts +1 -0
  96. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +2 -0
  97. package/dist/serialization/types/CompanyUserUsageMetricsResponseData.d.ts +13 -0
  98. package/dist/serialization/types/CompanyUserUsageResponseData.d.ts +15 -0
  99. package/dist/serialization/types/CompanyUserUsageRowResponseData.d.ts +14 -0
  100. package/dist/serialization/types/ComponentDisplaySettings.d.ts +1 -0
  101. package/dist/serialization/types/ComponentSettingsResponseData.d.ts +1 -0
  102. package/dist/serialization/types/CreditEventLedgerResponseData.d.ts +4 -1
  103. package/dist/serialization/types/CreditEventType.d.ts +1 -1
  104. package/dist/serialization/types/CreditLedgerEntryKind.d.ts +7 -0
  105. package/dist/serialization/types/CreditSpendPolicy.d.ts +19 -0
  106. package/dist/serialization/types/CreditSpendPolicyResponseData.d.ts +7 -0
  107. package/dist/serialization/types/CreditSpendWindow.d.ts +10 -0
  108. package/dist/serialization/types/CreditSpendWindowUnit.d.ts +7 -0
  109. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +1 -0
  110. package/dist/serialization/types/EnvironmentDetailResponseData.d.ts +1 -0
  111. package/dist/serialization/types/EnvironmentResponseData.d.ts +1 -0
  112. package/dist/serialization/types/EstimatedPlanTotal.d.ts +12 -0
  113. package/dist/serialization/types/PendingMigrationResponseData.d.ts +5 -0
  114. package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +1 -0
  115. package/dist/serialization/types/PlanVersionMigrationStrategy.d.ts +1 -1
  116. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  117. package/dist/serialization/types/RulesengineCompany.d.ts +2 -0
  118. package/dist/serialization/types/RulesengineCreditSpendPolicy.d.ts +19 -0
  119. package/dist/serialization/types/RulesengineCreditSpendPolicyScope.d.ts +7 -0
  120. package/dist/serialization/types/RulesengineCreditSpendWindow.d.ts +10 -0
  121. package/dist/serialization/types/RulesengineUser.d.ts +2 -0
  122. package/dist/serialization/types/UserUsageMetric.d.ts +7 -0
  123. package/dist/serialization/types/index.d.ts +12 -0
  124. package/dist/wrapper.d.ts +2 -2
  125. package/package.json +3 -3
@@ -11,6 +11,8 @@ export interface PublishPlanVersionRequestBody {
11
11
  address?: Schematic.CustomerBillingAddress;
12
12
  /** The date the subscription's billing period renews on. Only honored on a first publish that starts a subscription. */
13
13
  billingCycleAnchor?: Date;
14
+ /** The date the contract term starts. A past date backdates the subscription so the first invoice covers the term from this date to the renewal date. Requires billing_cycle_anchor. Only honored on a first publish that starts a subscription. */
15
+ billingStartDate?: Date;
14
16
  couponExternalId?: string;
15
17
  customFieldValues?: Schematic.CheckoutFieldValue[];
16
18
  customerEmail?: string;
@@ -20,9 +22,12 @@ export interface PublishPlanVersionRequestBody {
20
22
  phone?: string;
21
23
  /** When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true. */
22
24
  prorateFirstPeriod?: boolean;
25
+ /** How Stripe handles the price difference when companies are migrated. With migration_strategy immediate, omitted means create_prorations. With end_of_billing_period only none is accepted and means the same as omitting it: the change lands on the renewal boundary, so there is nothing to prorate. With scheduled any value is accepted and omitted means none. Not accepted with leave. */
23
26
  prorationBehavior?: Schematic.MigrationProrationBehavior;
24
27
  /** Refuse the publish if any company would be migrated onto the new version */
25
28
  requireNoMigration?: boolean;
29
+ /** When every company moves, for migration_strategy scheduled. Must be in the future; the migration runs within about a minute of this time. Not accepted with other strategies. */
30
+ scheduledAt?: Date;
26
31
  /** Whether Stripe emails the invoice when it is finalized. Defaults to true. */
27
32
  sendInvoice?: boolean;
28
33
  taxId?: Schematic.TaxIdInput;
@@ -9,6 +9,8 @@ export interface RetryCustomPlanBillingRequestBody {
9
9
  activationStrategy?: Schematic.CustomPlanActivationStrategy;
10
10
  /** The date the subscription's billing period renews on. Only honored when the retry creates a subscription. */
11
11
  billingCycleAnchor?: Date;
12
+ /** The date the contract term starts. A past date backdates the subscription so the first invoice covers the term from this date to the renewal date. Requires billing_cycle_anchor. When both are omitted, the term pinned at finalize is reissued. Only honored when the retry creates a subscription. */
13
+ billingStartDate?: Date;
12
14
  customerEmail: string;
13
15
  daysUntilDue?: number;
14
16
  /** When true, the partial period between the subscription starting and its renewal date is billed pro rata straight away. When false that period is free and no invoice is raised until the renewal date. Only applies alongside billing_cycle_anchor. Defaults to true. */
@@ -1,5 +1,7 @@
1
1
  export interface CaptureRawEvent {
2
2
  capturedAt: Date;
3
+ contextSignature?: string;
4
+ contextSignatureChecked?: boolean;
3
5
  eventId?: string;
4
6
  rawBytes: string;
5
7
  remoteIp: string;
@@ -2,6 +2,8 @@ import type * as Schematic from "../index";
2
2
  export interface CheckFlagsResponseData {
3
3
  /** Lease-aware credit balances keyed by credit ID, covering every credit type the company holds a balance in */
4
4
  creditBalances?: Record<string, Schematic.CompanyCreditBalance>;
5
+ /** Credit spend policies binding the evaluated company and user; empty when none bind. Each response carries the whole set, so replace any previously received set with it. Advisory: the flag values do not reflect them, since a check names no draw amount */
6
+ creditSpendPolicies: Schematic.CreditSpendPolicy[];
5
7
  flags: Schematic.CheckFlagResponseData[];
6
8
  plan?: Schematic.DatastreamCompanyPlan;
7
9
  }
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface CompanyDetailResponseData {
3
3
  addOns: Schematic.CompanyPlanWithBillingSubView[];
4
4
  billingCreditBalances?: Record<string, number>;
5
+ billingEmail?: string;
5
6
  billingProfile?: Schematic.CompanyBillingProfileResponseData;
6
7
  billingProfiles?: Schematic.CompanyBillingProfileResponseData[];
7
8
  billingSubscription?: Schematic.BillingSubscriptionView;
@@ -25,6 +25,7 @@ export interface CompanyPlanDetailResponseData {
25
25
  description: string;
26
26
  draftVersion?: Schematic.PlanVersionResponseData;
27
27
  entitlements?: Schematic.PlanEntitlementResponseData[];
28
+ estimatedTotals?: Schematic.EstimatedPlanTotal[];
28
29
  features: Schematic.FeatureInPlanResponseData[];
29
30
  icon: Schematic.PlanIcon;
30
31
  id: string;
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageMetricsResponseData {
3
+ /** End of the usage window (exclusive) */
4
+ endTime: Date;
5
+ /** Event-based features the company has user-attributed usage for in the window; a feature with usage but no entitlement is still listed */
6
+ features: Schematic.FeatureResponseData[];
7
+ /** Whether the company consumed any credits in the window */
8
+ hasCredits: boolean;
9
+ /** Start of the usage window */
10
+ startTime: Date;
11
+ }
@@ -0,0 +1,15 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageResponseData {
3
+ /** End of the usage window (exclusive) */
4
+ endTime: Date;
5
+ /** This page of per-user consumption within the window, heaviest first */
6
+ rows: Schematic.CompanyUserUsageRowResponseData[];
7
+ /** Start of the usage window */
8
+ startTime: Date;
9
+ /** The heaviest user's fraction (0-1) of consumption, measured across every user in the window and not just this page */
10
+ topUserShare: number;
11
+ /** Consumption across every user in the window including unattributed, not just this page */
12
+ total: number;
13
+ /** Consumption from events sent without a user; not a user, so it is excluded from rows and from the count, and returned on every page. Null when the window has none */
14
+ unattributed?: Schematic.CompanyUserUsageRowResponseData;
15
+ }
@@ -0,0 +1,13 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyUserUsageRowResponseData {
3
+ /** When the user last used the feature within the window; null for the credits metric, which aggregates balances rather than timestamped events */
4
+ lastSeen?: Date;
5
+ /** This row's fraction (0-1) of consumption within the window, including unattributed consumption */
6
+ share: number;
7
+ /** The user the consumption is attributed to; null for consumption from events sent without a user */
8
+ user?: Schematic.UserResponseData;
9
+ /** The user the consumption is attributed to; null for unattributed consumption */
10
+ userId?: string;
11
+ /** The user's consumption of the metric within the window */
12
+ value: number;
13
+ }
@@ -1,6 +1,7 @@
1
1
  export interface ComponentDisplaySettings {
2
2
  showAsMonthlyPrices: boolean;
3
3
  showCredits: boolean;
4
+ showEstimatedTotal: boolean;
4
5
  showFeatureDescription: boolean;
5
6
  showHardLimit: boolean;
6
7
  showPeriodToggle: boolean;
@@ -1,6 +1,7 @@
1
1
  export interface ComponentSettingsResponseData {
2
2
  showAsMonthlyPrices: boolean;
3
3
  showCredits: boolean;
4
+ showEstimatedTotal: boolean;
4
5
  showFeatureDescription: boolean;
5
6
  showHardLimit: boolean;
6
7
  showPeriodToggle: boolean;
@@ -3,11 +3,12 @@ export interface CreditEventLedgerResponseData {
3
3
  amount: number;
4
4
  autoTopupLogId?: string;
5
5
  billingCreditBundleId?: string;
6
- billingCreditId: string;
6
+ billingCreditId?: string;
7
7
  company?: Schematic.CompanyLedgerResponseData;
8
8
  companyId: string;
9
9
  credit?: Schematic.BillingCreditLedgerResponseData;
10
10
  creditName: string;
11
+ currency?: string;
11
12
  environmentId: string;
12
13
  eventAt: Date;
13
14
  eventId: string;
@@ -24,6 +25,7 @@ export interface CreditEventLedgerResponseData {
24
25
  grantQuantityRemaining?: number;
25
26
  grantReason?: Schematic.BillingCreditGrantReason;
26
27
  grantValidFrom?: Date;
28
+ kind: Schematic.CreditLedgerEntryKind;
27
29
  planId?: string;
28
30
  quantityConsumed?: number;
29
31
  quantityRemainingAtZeroOut?: number;
@@ -1,5 +1,8 @@
1
1
  export declare const CreditEventType: {
2
+ readonly Adjustment: "adjustment";
3
+ readonly Charge: "charge";
2
4
  readonly Grant: "grant";
5
+ readonly Settlement: "settlement";
3
6
  readonly Transfer: "transfer";
4
7
  readonly Usage: "usage";
5
8
  readonly ZeroOut: "zero_out";
@@ -0,0 +1,10 @@
1
+ export declare const CreditLedgerEntryKind: {
2
+ readonly Adjustment: "adjustment";
3
+ readonly Charge: "charge";
4
+ readonly Drawdown: "drawdown";
5
+ readonly Grant: "grant";
6
+ readonly Settlement: "settlement";
7
+ readonly Transfer: "transfer";
8
+ readonly ZeroOut: "zero_out";
9
+ };
10
+ export type CreditLedgerEntryKind = (typeof CreditLedgerEntryKind)[keyof typeof CreditLedgerEntryKind];
@@ -0,0 +1,21 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CreditSpendPolicy {
3
+ /** How much of the limit is already spent in the current period */
4
+ consumed?: number;
5
+ /** The credit the policy limits */
6
+ creditId: string;
7
+ /** The ID of the policy */
8
+ id: string;
9
+ /** How the limit is applied */
10
+ kind: string;
11
+ /** The name the account gave the policy */
12
+ label?: string;
13
+ /** The ceiling, in credits */
14
+ limit: number;
15
+ /** For a windowed limit, when the current period ends and consumed no longer applies */
16
+ resetsAt?: Date;
17
+ /** Whether the policy limits the company or one user */
18
+ scope: Schematic.CreditSpendPolicyScope;
19
+ /** For a windowed limit, the period it accumulates over */
20
+ window?: Schematic.CreditSpendWindow;
21
+ }
@@ -2,11 +2,20 @@ import type * as Schematic from "../index";
2
2
  export interface CreditSpendPolicyResponseData {
3
3
  billingCreditId: string;
4
4
  companyId?: string;
5
+ /** Credits spent in the current window. Set only by the usage route, and only for a window cap. */
6
+ consumed?: number;
5
7
  createdAt: Date;
8
+ /** Credits left in the current window. Set only by the usage route, and only for a window cap. */
9
+ headroom?: number;
6
10
  id: string;
7
11
  label?: string;
8
12
  maxPerDraw?: number;
13
+ /** When the current window ends. Set only by the usage route, and only for a window cap. */
14
+ resetsAt?: Date;
9
15
  scopeType: Schematic.CreditSpendPolicyScope;
10
16
  updatedAt: Date;
11
17
  userId?: string;
18
+ windowAmount?: number;
19
+ windowCount: number;
20
+ windowUnit?: Schematic.CreditSpendWindowUnit;
12
21
  }
@@ -0,0 +1,6 @@
1
+ export interface CreditSpendWindow {
2
+ /** How many units make up one period */
3
+ count: number;
4
+ /** The period the limit accumulates over */
5
+ unit: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ export declare const CreditSpendWindowUnit: {
2
+ readonly Hour: "hour";
3
+ readonly Day: "day";
4
+ readonly BillingPeriod: "billing_period";
5
+ };
6
+ export type CreditSpendWindowUnit = (typeof CreditSpendWindowUnit)[keyof typeof CreditSpendWindowUnit];
@@ -3,6 +3,8 @@ export interface CustomPlanBillingResponseData {
3
3
  activationStrategy: Schematic.CustomPlanActivationStrategy;
4
4
  /** The billing period renewal date pinned when the subscription started, when one was set. When no invoice exists yet, the first invoice is raised on this date. */
5
5
  billingCycleAnchor?: Date;
6
+ /** The date the contract term starts, when the operator pinned one. A past date was backdated onto the subscription so the first period runs from the contract date rather than from finalization. */
7
+ billingStartDate?: Date;
6
8
  companyId: string;
7
9
  createdAt: Date;
8
10
  daysUntilDue: number;
@@ -5,5 +5,6 @@ export interface EnvironmentDetailResponseData {
5
5
  environmentType: Schematic.EnvironmentType;
6
6
  id: string;
7
7
  name: string;
8
+ requireContextSignature: boolean;
8
9
  updatedAt: Date;
9
10
  }
@@ -4,5 +4,6 @@ export interface EnvironmentResponseData {
4
4
  environmentType: Schematic.EnvironmentType;
5
5
  id: string;
6
6
  name: string;
7
+ requireContextSignature: boolean;
7
8
  updatedAt: Date;
8
9
  }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../index";
2
+ export interface EstimatedPlanTotal {
3
+ amount: number;
4
+ currency: string;
5
+ period: Schematic.PlanPriceCadence;
6
+ }
@@ -1,6 +1,14 @@
1
+ import type * as Schematic from "../index";
1
2
  export interface PendingMigrationResponseData {
3
+ /** When the company moves to the new version: the migration's date for a scheduled migration, or the end of the company's current billing period. Null when no date can be named yet, for example when the company's only subscription is past due or set to cancel; the company then moves at the next opportunity. */
4
+ effectiveAt?: Date;
2
5
  migrationId: string;
6
+ /** How the price difference is billed when the company moves. Always none for an end-of-billing-period migration. */
7
+ prorationBehavior?: Schematic.MigrationProrationBehavior;
8
+ /** Deprecated; use effective_at, which carries the same value. */
3
9
  scheduledFor?: Date;
10
+ /** Whether the company moves at the end of its billing period (end_of_billing_period) or on a specific date (scheduled). The type is shared with plan version migrations, but only those two values appear here: an immediate migration never pends. */
11
+ strategy: Schematic.PlanVersionMigrationStrategy;
4
12
  toPlanId: string;
5
13
  toPlanName: string;
6
14
  toPlanVersionId: string;
@@ -14,6 +14,7 @@ export interface PlanVersionMigrationResponseData {
14
14
  planVersionIdTo: string;
15
15
  planVersionIdsFrom: string[];
16
16
  prorationBehavior?: Schematic.MigrationProrationBehavior;
17
+ scheduledAt?: Date;
17
18
  skippedCompanies: number;
18
19
  startedAt?: Date;
19
20
  status: Schematic.PlanVersionMigrationStatus;
@@ -2,5 +2,6 @@ export declare const PlanVersionMigrationStrategy: {
2
2
  readonly EndOfBillingPeriod: "end_of_billing_period";
3
3
  readonly Immediate: "immediate";
4
4
  readonly Leave: "leave";
5
+ readonly Scheduled: "scheduled";
5
6
  };
6
7
  export type PlanVersionMigrationStrategy = (typeof PlanVersionMigrationStrategy)[keyof typeof PlanVersionMigrationStrategy];
@@ -1,6 +1,6 @@
1
1
  /** The current schema version hash for rules engine types. The first enum value is always the current version. */
2
2
  export declare const RulesEngineSchemaVersion: {
3
- readonly V94B8F7A7: "v94b8f7a7";
3
+ readonly Vf4A06160: "vf4a06160";
4
4
  readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
5
5
  };
6
6
  export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
@@ -5,6 +5,7 @@ export interface RulesengineCompany {
5
5
  billingProductIds: string[];
6
6
  creditBalances: Record<string, number>;
7
7
  creditPostpaid?: Record<string, Schematic.RulesengineCreditPostpaidConfig>;
8
+ creditSpendPolicies?: Schematic.RulesengineCreditSpendPolicy[];
8
9
  entitlements?: Schematic.RulesengineFeatureEntitlement[];
9
10
  environmentId: string;
10
11
  id: string;
@@ -0,0 +1,21 @@
1
+ import type * as Schematic from "../index";
2
+ export interface RulesengineCreditSpendPolicy {
3
+ /** How much of the limit is already spent in the current period */
4
+ consumed?: number;
5
+ /** The credit the policy limits */
6
+ creditId: string;
7
+ /** The ID of the policy */
8
+ id: string;
9
+ /** How the limit is applied */
10
+ kind: string;
11
+ /** The name the account gave the policy */
12
+ label?: string;
13
+ /** The ceiling, in credits */
14
+ limit: number;
15
+ /** For a windowed limit, when the current period ends and consumed no longer applies */
16
+ resetsAt?: Date;
17
+ /** Whether the policy limits the company or one user */
18
+ scope: Schematic.RulesengineCreditSpendPolicyScope;
19
+ /** For a windowed limit, the period it accumulates over */
20
+ window?: Schematic.RulesengineCreditSpendWindow;
21
+ }
@@ -0,0 +1,6 @@
1
+ export declare const RulesengineCreditSpendPolicyScope: {
2
+ readonly Company: "company";
3
+ readonly User: "user";
4
+ readonly Group: "group";
5
+ };
6
+ export type RulesengineCreditSpendPolicyScope = (typeof RulesengineCreditSpendPolicyScope)[keyof typeof RulesengineCreditSpendPolicyScope];
@@ -0,0 +1,6 @@
1
+ export interface RulesengineCreditSpendWindow {
2
+ /** How many units make up one period */
3
+ count: number;
4
+ /** The period the limit accumulates over */
5
+ unit: string;
6
+ }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface RulesengineUser {
3
3
  accountId: string;
4
+ creditSpendPolicies?: Schematic.RulesengineCreditSpendPolicy[];
4
5
  environmentId: string;
5
6
  id: string;
6
7
  keys: Record<string, string>;
@@ -0,0 +1,5 @@
1
+ export declare const UserUsageMetric: {
2
+ readonly Credits: "credits";
3
+ readonly Feature: "feature";
4
+ };
5
+ export type UserUsageMetric = (typeof UserUsageMetric)[keyof typeof UserUsageMetric];
@@ -123,6 +123,9 @@ export * from "./CompanyPlanWithBillingSubView";
123
123
  export * from "./CompanyResponseData";
124
124
  export * from "./CompanySubscriptionResponseData";
125
125
  export * from "./CompanyTaxIdView";
126
+ export * from "./CompanyUserUsageMetricsResponseData";
127
+ export * from "./CompanyUserUsageResponseData";
128
+ export * from "./CompanyUserUsageRowResponseData";
126
129
  export * from "./ComparableOperator";
127
130
  export * from "./CompatiblePlans";
128
131
  export * from "./CompatiblePlansResponseData";
@@ -173,9 +176,13 @@ export * from "./CreditGrantExpiryRequestBody";
173
176
  export * from "./CreditGrantPriceTierRequestBody";
174
177
  export * from "./CreditGrantSortOrder";
175
178
  export * from "./CreditLeaseResponseData";
179
+ export * from "./CreditLedgerEntryKind";
176
180
  export * from "./CreditReservationResponseData";
181
+ export * from "./CreditSpendPolicy";
177
182
  export * from "./CreditSpendPolicyResponseData";
178
183
  export * from "./CreditSpendPolicyScope";
184
+ export * from "./CreditSpendWindow";
185
+ export * from "./CreditSpendWindowUnit";
179
186
  export * from "./CreditsAutoTopupCompanySummary";
180
187
  export * from "./CreditsAutoTopupCreditSummary";
181
188
  export * from "./CreditsAutoTopupHardFailure";
@@ -229,6 +236,7 @@ export * from "./EnvironmentResponseData";
229
236
  export * from "./EnvironmentTraitUsageTimeSeriesResponseData";
230
237
  export * from "./EnvironmentType";
231
238
  export * from "./EnvironmentUsagePointResponseData";
239
+ export * from "./EstimatedPlanTotal";
232
240
  export * from "./EventBody";
233
241
  export * from "./EventBodyFlagCheck";
234
242
  export * from "./EventBodyIdentify";
@@ -385,6 +393,9 @@ export * from "./RulesengineCondition";
385
393
  export * from "./RulesengineConditionGroup";
386
394
  export * from "./RulesengineConditionType";
387
395
  export * from "./RulesengineCreditPostpaidConfig";
396
+ export * from "./RulesengineCreditSpendPolicy";
397
+ export * from "./RulesengineCreditSpendPolicyScope";
398
+ export * from "./RulesengineCreditSpendWindow";
388
399
  export * from "./RulesengineEntitlementValueType";
389
400
  export * from "./RulesengineEntityType";
390
401
  export * from "./RulesengineFeatureEntitlement";
@@ -459,6 +470,7 @@ export * from "./UserFeatureUsageResponseData";
459
470
  export * from "./UserResponseData";
460
471
  export * from "./UserUsageByCompanyResponseData";
461
472
  export * from "./UserUsageDetailResponseData";
473
+ export * from "./UserUsageMetric";
462
474
  export * from "./WarningTier";
463
475
  export * from "./WarningTierRequestBody";
464
476
  export * from "./WarningTierResponseData";
@@ -33,9 +33,9 @@ export interface DataStreamClientOptions {
33
33
  flagCache?: CacheProvider<Schematic.RulesengineFlag>;
34
34
  /** Enable replicator mode for external data synchronization */
35
35
  replicatorMode?: boolean;
36
- /** Health check URL for replicator mode */
36
+ /** Health check URL for replicator mode (default: http://localhost:8090/ready) */
37
37
  replicatorHealthURL?: string;
38
- /** Health check interval for replicator mode in milliseconds */
38
+ /** Health check interval for replicator mode in milliseconds (default: 30 seconds) */
39
39
  replicatorHealthCheck?: number;
40
40
  }
41
41
  /**