@schematichq/schematic-typescript-node 1.5.9 → 1.5.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/BaseClient.d.ts +12 -0
  2. package/dist/Client.d.ts +3 -0
  3. package/dist/api/errors/BadRequestError.d.ts +1 -0
  4. package/dist/api/errors/ForbiddenError.d.ts +1 -0
  5. package/dist/api/errors/InternalServerError.d.ts +1 -0
  6. package/dist/api/errors/NotFoundError.d.ts +1 -0
  7. package/dist/api/errors/PaymentRequiredError.d.ts +7 -0
  8. package/dist/api/errors/UnauthorizedError.d.ts +1 -0
  9. package/dist/api/errors/index.d.ts +1 -0
  10. package/dist/api/resources/accesstokens/client/Client.d.ts +2 -0
  11. package/dist/api/resources/accounts/client/Client.d.ts +42 -0
  12. package/dist/api/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +2 -0
  13. package/dist/api/resources/billing/client/Client.d.ts +91 -0
  14. package/dist/api/resources/billing/client/requests/ListCompanyBillingProfilesRequest.d.ts +20 -0
  15. package/dist/api/resources/billing/client/requests/UpdateCompanyBillingProfileRequestBody.d.ts +15 -0
  16. package/dist/api/resources/billing/client/requests/index.d.ts +2 -0
  17. package/dist/api/resources/billing/types/ListCompanyBillingProfilesParams.d.ts +13 -0
  18. package/dist/api/resources/billing/types/ListCompanyBillingProfilesResponse.d.ts +6 -0
  19. package/dist/api/resources/billing/types/UpdateCompanyBillingProfileResponse.d.ts +6 -0
  20. package/dist/api/resources/billing/types/index.d.ts +3 -0
  21. package/dist/api/resources/catalogs/client/Client.d.ts +28 -0
  22. package/dist/api/resources/checkout/client/Client.d.ts +18 -0
  23. package/dist/api/resources/companies/client/Client.d.ts +86 -0
  24. package/dist/api/resources/components/client/Client.d.ts +16 -0
  25. package/dist/api/resources/componentspublic/client/Client.d.ts +2 -0
  26. package/dist/api/resources/credits/client/Client.d.ts +183 -0
  27. package/dist/api/resources/credits/client/requests/CountCreditSpendPoliciesRequest.d.ts +24 -0
  28. package/dist/api/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +17 -0
  29. package/dist/api/resources/credits/client/requests/ListCreditSpendPoliciesRequest.d.ts +24 -0
  30. package/dist/api/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +8 -0
  31. package/dist/api/resources/credits/client/requests/index.d.ts +4 -0
  32. package/dist/api/resources/credits/types/CountCreditSpendPoliciesParams.d.ts +15 -0
  33. package/dist/api/resources/credits/types/CountCreditSpendPoliciesResponse.d.ts +6 -0
  34. package/dist/api/resources/credits/types/CreateCreditSpendPolicyResponse.d.ts +6 -0
  35. package/dist/api/resources/credits/types/DeleteCreditSpendPolicyResponse.d.ts +6 -0
  36. package/dist/api/resources/credits/types/GetCreditSpendPolicyResponse.d.ts +6 -0
  37. package/dist/api/resources/credits/types/ListCreditSpendPoliciesParams.d.ts +15 -0
  38. package/dist/api/resources/credits/types/ListCreditSpendPoliciesResponse.d.ts +6 -0
  39. package/dist/api/resources/credits/types/UpdateCreditSpendPolicyResponse.d.ts +6 -0
  40. package/dist/api/resources/credits/types/index.d.ts +8 -0
  41. package/dist/api/resources/dataexports/client/Client.d.ts +8 -0
  42. package/dist/api/resources/entitlements/client/Client.d.ts +50 -0
  43. package/dist/api/resources/events/client/Client.d.ts +62 -0
  44. package/dist/api/resources/events/client/requests/UpsertOtlpEnvironmentSettingsRequestBody.d.ts +13 -0
  45. package/dist/api/resources/events/client/requests/index.d.ts +1 -0
  46. package/dist/api/resources/events/types/DeleteOtlpEnvironmentSettingsResponse.d.ts +6 -0
  47. package/dist/api/resources/events/types/GetOtlpEnvironmentSettingsResponse.d.ts +6 -0
  48. package/dist/api/resources/events/types/UpsertOtlpEnvironmentSettingsResponse.d.ts +6 -0
  49. package/dist/api/resources/events/types/index.d.ts +3 -0
  50. package/dist/api/resources/features/client/Client.d.ts +34 -0
  51. package/dist/api/resources/insights/client/Client.d.ts +12 -0
  52. package/dist/api/resources/integrationsapi/client/Client.d.ts +101 -0
  53. package/dist/api/resources/integrationsapi/client/requests/ClaimStripeSandboxKeysRequestBody.d.ts +9 -0
  54. package/dist/api/resources/integrationsapi/client/requests/InstallStripeSandboxRequestBody.d.ts +12 -0
  55. package/dist/api/resources/integrationsapi/client/requests/index.d.ts +2 -0
  56. package/dist/api/resources/integrationsapi/types/ClaimStripeSandboxKeysResponse.d.ts +6 -0
  57. package/dist/api/resources/integrationsapi/types/GetStripeSandboxClaimLinkResponse.d.ts +6 -0
  58. package/dist/api/resources/integrationsapi/types/GetStripeSandboxKeysResponse.d.ts +6 -0
  59. package/dist/api/resources/integrationsapi/types/InstallStripeClaimableSandboxResponse.d.ts +6 -0
  60. package/dist/api/resources/integrationsapi/types/ListStripeSandboxCountriesResponse.d.ts +6 -0
  61. package/dist/api/resources/integrationsapi/types/index.d.ts +5 -0
  62. package/dist/api/resources/licenses/client/Client.d.ts +6 -0
  63. package/dist/api/resources/planbundle/client/Client.d.ts +6 -2
  64. package/dist/api/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +0 -1
  65. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +0 -1
  66. package/dist/api/resources/plangroups/client/Client.d.ts +6 -0
  67. package/dist/api/resources/planmigrations/client/Client.d.ts +58 -5
  68. package/dist/api/resources/planmigrations/client/requests/CompleteMigrationNowRequestBody.d.ts +8 -0
  69. package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +1 -1
  70. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +1 -1
  71. package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +1 -1
  72. package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +1 -1
  73. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +1 -1
  74. package/dist/api/resources/planmigrations/client/requests/index.d.ts +1 -0
  75. package/dist/api/resources/planmigrations/types/CancelMigrationResponse.d.ts +6 -0
  76. package/dist/api/resources/planmigrations/types/CompleteMigrationNowResponse.d.ts +6 -0
  77. package/dist/api/resources/planmigrations/types/index.d.ts +2 -0
  78. package/dist/api/resources/plans/client/Client.d.ts +37 -4
  79. package/dist/api/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -2
  80. package/dist/api/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +1 -2
  81. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +5 -1
  82. package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +4 -0
  83. package/dist/api/resources/scheduledcheckout/client/Client.d.ts +8 -0
  84. package/dist/api/resources/webhooks/client/Client.d.ts +20 -0
  85. package/dist/api/types/AuditLogResponseData.d.ts +1 -0
  86. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +1 -1
  87. package/dist/api/types/ClaimedStripeSandboxKeysResponseData.d.ts +5 -0
  88. package/dist/api/types/CompanyBillingProfileResponseData.d.ts +17 -0
  89. package/dist/api/types/CompanyDetailResponseData.d.ts +3 -0
  90. package/dist/api/types/CompanyOverrideResponseData.d.ts +2 -0
  91. package/dist/api/types/ComponentHydrateResponseData.d.ts +1 -1
  92. package/dist/api/types/ComponentPreviewResponseData.d.ts +1 -1
  93. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  94. package/dist/api/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
  95. package/dist/api/types/CreatePlanRequestBody.d.ts +1 -1
  96. package/dist/api/types/CreditLeaseResponseData.d.ts +1 -0
  97. package/dist/api/types/CreditSpendPolicyResponseData.d.ts +12 -0
  98. package/dist/api/types/CreditSpendPolicyScope.d.ts +6 -0
  99. package/dist/api/types/CustomPlanBillingResponseData.d.ts +2 -0
  100. package/dist/api/types/EventBodyInference.d.ts +4 -2
  101. package/dist/api/types/GetOnboardingStateResp.d.ts +6 -0
  102. package/dist/api/types/OnboardingRequirement.d.ts +1 -0
  103. package/dist/api/types/OnboardingRequirementView.d.ts +1 -0
  104. package/dist/api/types/OnboardingStripeImport.d.ts +6 -0
  105. package/dist/api/types/OtlpEnvironmentSettingsResponseData.d.ts +10 -0
  106. package/dist/api/types/PendingMigrationResponseData.d.ts +8 -0
  107. package/dist/api/types/PlanChangeResponseData.d.ts +6 -0
  108. package/dist/api/types/PlanVersionCompanyMigrationResponseData.d.ts +2 -0
  109. package/dist/api/types/PlanVersionCompanyMigrationStatus.d.ts +1 -0
  110. package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
  111. package/dist/api/types/PlanVersionMigrationStatus.d.ts +1 -0
  112. package/dist/api/types/PlanVersionMigrationStrategy.d.ts +1 -0
  113. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -0
  114. package/dist/api/types/RuleConditionDetailResponseData.d.ts +1 -0
  115. package/dist/api/types/RuleConditionPlanVersionResponseData.d.ts +7 -0
  116. package/dist/api/types/StripeIntegrationConfig.d.ts +8 -0
  117. package/dist/api/types/StripeSandboxClaimLink.d.ts +6 -0
  118. package/dist/api/types/StripeSandboxCountriesResponseData.d.ts +3 -0
  119. package/dist/api/types/StripeSandboxInstallResponseData.d.ts +10 -0
  120. package/dist/api/types/StripeSandboxKeysResponseData.d.ts +5 -0
  121. package/dist/api/types/UpcomingInvoiceResponseData.d.ts +23 -0
  122. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  123. package/dist/api/types/index.d.ts +13 -0
  124. package/dist/core/fetcher/redactUrl.d.ts +2 -0
  125. package/dist/core/requestBody.d.ts +12 -0
  126. package/dist/core/runtime/index.d.ts +1 -1
  127. package/dist/core/runtime/runtime.d.ts +19 -0
  128. package/dist/credits/lease-store.d.ts +17 -8
  129. package/dist/errors/SchematicError.d.ts +1 -0
  130. package/dist/errors/SchematicTimeoutError.d.ts +2 -2
  131. package/dist/events.d.ts +6 -0
  132. package/dist/index.js +25 -9
  133. package/dist/serialization/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +2 -0
  134. package/dist/serialization/resources/billing/client/requests/UpdateCompanyBillingProfileRequestBody.d.ts +16 -0
  135. package/dist/serialization/resources/billing/client/requests/index.d.ts +1 -0
  136. package/dist/serialization/resources/billing/types/ListCompanyBillingProfilesParams.d.ts +14 -0
  137. package/dist/serialization/resources/billing/types/ListCompanyBillingProfilesResponse.d.ts +12 -0
  138. package/dist/serialization/resources/billing/types/UpdateCompanyBillingProfileResponse.d.ts +11 -0
  139. package/dist/serialization/resources/billing/types/index.d.ts +3 -0
  140. package/dist/serialization/resources/credits/client/requests/CreateCreditSpendPolicyRequestBody.d.ts +13 -0
  141. package/dist/serialization/resources/credits/client/requests/UpdateCreditSpendPolicyRequestBody.d.ts +10 -0
  142. package/dist/serialization/resources/credits/client/requests/index.d.ts +2 -0
  143. package/dist/serialization/resources/credits/types/CountCreditSpendPoliciesParams.d.ts +16 -0
  144. package/dist/serialization/resources/credits/types/CountCreditSpendPoliciesResponse.d.ts +12 -0
  145. package/dist/serialization/resources/credits/types/CreateCreditSpendPolicyResponse.d.ts +11 -0
  146. package/dist/serialization/resources/credits/types/DeleteCreditSpendPolicyResponse.d.ts +11 -0
  147. package/dist/serialization/resources/credits/types/GetCreditSpendPolicyResponse.d.ts +11 -0
  148. package/dist/serialization/resources/credits/types/ListCreditSpendPoliciesParams.d.ts +16 -0
  149. package/dist/serialization/resources/credits/types/ListCreditSpendPoliciesResponse.d.ts +12 -0
  150. package/dist/serialization/resources/credits/types/UpdateCreditSpendPolicyResponse.d.ts +11 -0
  151. package/dist/serialization/resources/credits/types/index.d.ts +8 -0
  152. package/dist/serialization/resources/events/client/requests/UpsertOtlpEnvironmentSettingsRequestBody.d.ts +13 -0
  153. package/dist/serialization/resources/events/client/requests/index.d.ts +1 -0
  154. package/dist/serialization/resources/events/types/DeleteOtlpEnvironmentSettingsResponse.d.ts +11 -0
  155. package/dist/serialization/resources/events/types/GetOtlpEnvironmentSettingsResponse.d.ts +11 -0
  156. package/dist/serialization/resources/events/types/UpsertOtlpEnvironmentSettingsResponse.d.ts +11 -0
  157. package/dist/serialization/resources/events/types/index.d.ts +3 -0
  158. package/dist/serialization/resources/integrationsapi/client/requests/ClaimStripeSandboxKeysRequestBody.d.ts +9 -0
  159. package/dist/serialization/resources/integrationsapi/client/requests/InstallStripeSandboxRequestBody.d.ts +12 -0
  160. package/dist/serialization/resources/integrationsapi/client/requests/index.d.ts +2 -0
  161. package/dist/serialization/resources/integrationsapi/types/ClaimStripeSandboxKeysResponse.d.ts +11 -0
  162. package/dist/serialization/resources/integrationsapi/types/GetStripeSandboxClaimLinkResponse.d.ts +11 -0
  163. package/dist/serialization/resources/integrationsapi/types/GetStripeSandboxKeysResponse.d.ts +11 -0
  164. package/dist/serialization/resources/integrationsapi/types/InstallStripeClaimableSandboxResponse.d.ts +11 -0
  165. package/dist/serialization/resources/integrationsapi/types/ListStripeSandboxCountriesResponse.d.ts +11 -0
  166. package/dist/serialization/resources/integrationsapi/types/index.d.ts +5 -0
  167. package/dist/serialization/resources/planmigrations/client/requests/CompleteMigrationNowRequestBody.d.ts +10 -0
  168. package/dist/serialization/resources/planmigrations/client/requests/index.d.ts +1 -0
  169. package/dist/serialization/resources/planmigrations/types/CancelMigrationResponse.d.ts +11 -0
  170. package/dist/serialization/resources/planmigrations/types/CompleteMigrationNowResponse.d.ts +11 -0
  171. package/dist/serialization/resources/planmigrations/types/index.d.ts +2 -0
  172. package/dist/serialization/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -1
  173. package/dist/serialization/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +1 -1
  174. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +2 -0
  175. package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +2 -0
  176. package/dist/serialization/types/AuditLogResponseData.d.ts +1 -0
  177. package/dist/serialization/types/ClaimedStripeSandboxKeysResponseData.d.ts +11 -0
  178. package/dist/serialization/types/CompanyBillingProfileResponseData.d.ts +25 -0
  179. package/dist/serialization/types/CompanyDetailResponseData.d.ts +5 -0
  180. package/dist/serialization/types/CompanyOverrideResponseData.d.ts +3 -0
  181. package/dist/serialization/types/ComponentHydrateResponseData.d.ts +2 -2
  182. package/dist/serialization/types/ComponentPreviewResponseData.d.ts +2 -1
  183. package/dist/serialization/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
  184. package/dist/serialization/types/CreatePlanRequestBody.d.ts +1 -1
  185. package/dist/serialization/types/CreditLeaseResponseData.d.ts +1 -0
  186. package/dist/serialization/types/CreditSpendPolicyResponseData.d.ts +18 -0
  187. package/dist/serialization/types/CreditSpendPolicyScope.d.ts +7 -0
  188. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +1 -0
  189. package/dist/serialization/types/EventBodyInference.d.ts +1 -0
  190. package/dist/serialization/types/GetOnboardingStateResp.d.ts +7 -0
  191. package/dist/serialization/types/OnboardingRequirement.d.ts +1 -1
  192. package/dist/serialization/types/OnboardingRequirementView.d.ts +1 -0
  193. package/dist/serialization/types/OnboardingStripeImport.d.ts +7 -0
  194. package/dist/serialization/types/OtlpEnvironmentSettingsResponseData.d.ts +16 -0
  195. package/dist/serialization/types/PendingMigrationResponseData.d.ts +14 -0
  196. package/dist/serialization/types/PlanChangeResponseData.d.ts +4 -0
  197. package/dist/serialization/types/PlanVersionCompanyMigrationResponseData.d.ts +1 -0
  198. package/dist/serialization/types/PlanVersionCompanyMigrationStatus.d.ts +1 -1
  199. package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +1 -0
  200. package/dist/serialization/types/PlanVersionMigrationStatus.d.ts +1 -1
  201. package/dist/serialization/types/PlanVersionMigrationStrategy.d.ts +1 -1
  202. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -0
  203. package/dist/serialization/types/RuleConditionDetailResponseData.d.ts +2 -0
  204. package/dist/serialization/types/RuleConditionPlanVersionResponseData.d.ts +13 -0
  205. package/dist/serialization/types/StripeIntegrationConfig.d.ts +4 -0
  206. package/dist/serialization/types/StripeSandboxClaimLink.d.ts +12 -0
  207. package/dist/serialization/types/StripeSandboxCountriesResponseData.d.ts +9 -0
  208. package/dist/serialization/types/StripeSandboxInstallResponseData.d.ts +17 -0
  209. package/dist/serialization/types/StripeSandboxKeysResponseData.d.ts +11 -0
  210. package/dist/serialization/types/UpcomingInvoiceResponseData.d.ts +30 -0
  211. package/dist/serialization/types/index.d.ts +13 -0
  212. package/dist/wasm/rulesengine.d.ts +1 -1
  213. package/dist/wasm/rulesengine.js +30 -30
  214. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
1
  export declare const PlanVersionMigrationStatus: {
2
+ readonly Cancelled: "cancelled";
2
3
  readonly Completed: "completed";
3
4
  readonly Failed: "failed";
4
5
  readonly InProgress: "in_progress";
@@ -1,4 +1,5 @@
1
1
  export declare const PlanVersionMigrationStrategy: {
2
+ readonly EndOfBillingPeriod: "end_of_billing_period";
2
3
  readonly Immediate: "immediate";
3
4
  readonly Leave: "leave";
4
5
  };
@@ -10,6 +10,7 @@ export interface PreviewSubscriptionFinanceResponseData {
10
10
  periodStart: Date;
11
11
  promoCodeApplied: boolean;
12
12
  proration: number;
13
+ prorationBilledAt?: Date;
13
14
  taxAmount?: number;
14
15
  taxDisplayName?: string;
15
16
  taxRequireBillingDetails: boolean;
@@ -13,6 +13,7 @@ export interface RuleConditionDetailResponseData {
13
13
  metricPeriodMonthReset?: Schematic.MetricPeriodMonthReset;
14
14
  metricValue?: number;
15
15
  operator: Schematic.ComparableOperator;
16
+ planVersions?: Schematic.RuleConditionPlanVersionResponseData[];
16
17
  resourceIds: string[];
17
18
  resources: Schematic.PreviewObjectResponseData[];
18
19
  ruleId: string;
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface RuleConditionPlanVersionResponseData {
3
+ id: string;
4
+ name: string;
5
+ status: Schematic.PlanVersionStatus;
6
+ version: number;
7
+ }
@@ -3,6 +3,12 @@ export interface StripeIntegrationConfig {
3
3
  accountId?: string;
4
4
  /** Display name of the connected Stripe account */
5
5
  accountName?: string;
6
+ /** When Stripe deletes the sandbox if nobody claims it, 60 days from creation; absent on sandboxes created before it was recorded */
7
+ claimableSandboxExpiresAt?: Date;
8
+ /** Stripe claimable sandbox this connection was provisioned from; absent for an OAuth connect */
9
+ claimableSandboxId?: string;
10
+ /** Stripe's claim status for the sandbox: unclaimed, claimed, or live */
11
+ claimableSandboxStatus?: string;
6
12
  /** When importing Stripe customers, only update existing companies, do not create new companies */
7
13
  companyUpdateOnly?: boolean;
8
14
  /** Whether the integration is connected to a Stripe sandbox account */
@@ -11,4 +17,6 @@ export interface StripeIntegrationConfig {
11
17
  liveMode: boolean;
12
18
  /** Onboarding URL returned during the v2 (Connect) install flow before activation */
13
19
  onboardUrl?: string;
20
+ /** App location that started the connect flow; the OAuth callback redirects back there on success */
21
+ returnTo?: string;
14
22
  }
@@ -0,0 +1,6 @@
1
+ export interface StripeSandboxClaimLink {
2
+ claimUrl: string;
3
+ expiresAt?: Date;
4
+ sandboxId: string;
5
+ status: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface StripeSandboxCountriesResponseData {
2
+ countries: string[];
3
+ }
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../index";
2
+ export interface StripeSandboxInstallResponseData {
3
+ apiKeys?: Schematic.StripeSandboxKeysResponseData;
4
+ claimUrl: string;
5
+ claimUrlExpiresAt?: Date;
6
+ expiresAt?: Date;
7
+ install: Schematic.IntegrationInstallResponseData;
8
+ sandboxId: string;
9
+ stripeAccountId: string;
10
+ }
@@ -0,0 +1,5 @@
1
+ export interface StripeSandboxKeysResponseData {
2
+ mcp: string;
3
+ publishable: string;
4
+ secret: string;
5
+ }
@@ -0,0 +1,23 @@
1
+ import type * as Schematic from "../index";
2
+ export interface UpcomingInvoiceResponseData {
3
+ amountDue: number;
4
+ amountPaid: number;
5
+ amountRemaining: number;
6
+ collectionMethod: string;
7
+ companyId?: string;
8
+ createdAt: Date;
9
+ currency: string;
10
+ customerExternalId: string;
11
+ dueDate?: Date;
12
+ endingBalance: number;
13
+ environmentId: string;
14
+ externalId?: string;
15
+ paymentMethodExternalId?: string;
16
+ providerType: Schematic.BillingProviderType;
17
+ startingBalance: number;
18
+ status?: Schematic.InvoiceStatus;
19
+ subscriptionExternalId?: string;
20
+ subtotal: number;
21
+ updatedAt: Date;
22
+ url?: string;
23
+ }
@@ -11,6 +11,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
11
11
  autoTopupSelfService?: boolean;
12
12
  autoTopupThresholdCredits?: number;
13
13
  autoTopupThresholdPercent?: number;
14
+ /** Deprecated: use compatible_plan_ids on credit bundles instead. Still accepted; writes through to the credit's bundle compatibility. */
14
15
  canBuyBundles?: boolean;
15
16
  /** Credits granted once per company on top of the per-license amount. Only valid when the grant scales per license. */
16
17
  companyCreditAmount?: number;
@@ -89,6 +89,7 @@ export * from "./CheckoutFieldValue";
89
89
  export * from "./CheckoutFieldWithValue";
90
90
  export * from "./CheckoutSettingsResponseData";
91
91
  export * from "./CheckoutSubscription";
92
+ export * from "./ClaimedStripeSandboxKeysResponseData";
92
93
  export * from "./ClerkIntegrationConfig";
93
94
  export * from "./CompanyBillingAddressView";
94
95
  export * from "./CompanyBillingCheckoutSettings";
@@ -96,6 +97,7 @@ export * from "./CompanyBillingDetailsResponseData";
96
97
  export * from "./CompanyBillingDetailsView";
97
98
  export * from "./CompanyBillingEntityResponseData";
98
99
  export * from "./CompanyBillingEntitySubscriptionResponseData";
100
+ export * from "./CompanyBillingProfileResponseData";
99
101
  export * from "./CompanyCreditBalance";
100
102
  export * from "./CompanyCreditBalanceResponseData";
101
103
  export * from "./CompanyDetailResponseData";
@@ -165,6 +167,8 @@ export * from "./CreditGrantDetail";
165
167
  export * from "./CreditGrantExpiryRequestBody";
166
168
  export * from "./CreditGrantSortOrder";
167
169
  export * from "./CreditLeaseResponseData";
170
+ export * from "./CreditSpendPolicyResponseData";
171
+ export * from "./CreditSpendPolicyScope";
168
172
  export * from "./CreditsAutoTopupCompanySummary";
169
173
  export * from "./CreditsAutoTopupCreditSummary";
170
174
  export * from "./CreditsAutoTopupHardFailure";
@@ -289,11 +293,14 @@ export * from "./OnboardingPath";
289
293
  export * from "./OnboardingRequirement";
290
294
  export * from "./OnboardingRequirementStatus";
291
295
  export * from "./OnboardingRequirementView";
296
+ export * from "./OnboardingStripeImport";
292
297
  export * from "./OnboardingTrack";
293
298
  export * from "./OrbIntegrationConfig";
294
299
  export * from "./OrderedPlansInGroup";
300
+ export * from "./OtlpEnvironmentSettingsResponseData";
295
301
  export * from "./PaymentMethodRequestBody";
296
302
  export * from "./PaymentMethodResponseData";
303
+ export * from "./PendingMigrationResponseData";
297
304
  export * from "./PlanBillingSource";
298
305
  export * from "./PlanBundleAction";
299
306
  export * from "./PlanBundleCreditGrantRequestBody";
@@ -355,6 +362,7 @@ export * from "./Rule";
355
362
  export * from "./RuleConditionDetailResponseData";
356
363
  export * from "./RuleConditionGroupDetailResponseData";
357
364
  export * from "./RuleConditionGroupResponseData";
365
+ export * from "./RuleConditionPlanVersionResponseData";
358
366
  export * from "./RuleConditionResponseData";
359
367
  export * from "./RuleDetailResponseData";
360
368
  export * from "./RuleResponseData";
@@ -392,6 +400,10 @@ export * from "./SkippedEntitlementResponseData";
392
400
  export * from "./SortDirection";
393
401
  export * from "./StripeEmbedInfo";
394
402
  export * from "./StripeIntegrationConfig";
403
+ export * from "./StripeSandboxClaimLink";
404
+ export * from "./StripeSandboxCountriesResponseData";
405
+ export * from "./StripeSandboxInstallResponseData";
406
+ export * from "./StripeSandboxKeysResponseData";
395
407
  export * from "./SubscriptionStatus";
396
408
  export * from "./SubscriptionTraitUpdate";
397
409
  export * from "./SubscriptionType";
@@ -407,6 +419,7 @@ export * from "./TraitDefinition";
407
419
  export * from "./TraitDefinitionComparableType";
408
420
  export * from "./TraitType";
409
421
  export * from "./TrialStatus";
422
+ export * from "./UpcomingInvoiceResponseData";
410
423
  export * from "./UpdateAddOnRequestBody";
411
424
  export * from "./UpdateAutoTopupOverrideRequestBody";
412
425
  export * from "./UpdateBillingPlanCreditGrantRequestBody";
@@ -0,0 +1,2 @@
1
+ export declare const SENSITIVE_QUERY_PARAMS: Set<string>;
2
+ export declare function redactUrl(url: string): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Spreads caller-supplied `additionalBodyParameters` (from `requestOptions.additionalBodyParameters`)
3
+ * on top of the request body. Caller-supplied properties win over the endpoint body. When no
4
+ * additional body parameters are provided, the original body is returned unchanged so serialization
5
+ * is unaffected.
6
+ *
7
+ * The merge only applies to plain-object (JSON object) bodies. When the body is `null`/`undefined`
8
+ * the additional parameters become the body; when the body is an array or a primitive JSON value it
9
+ * is returned unchanged, since object properties cannot be spread into it. This mirrors the Python
10
+ * SDK, which only merges additional body parameters into mapping bodies.
11
+ */
12
+ export declare function mergeAdditionalBodyParameters(body: unknown, additionalBodyParameters: Record<string, unknown> | undefined): unknown;
@@ -1 +1 @@
1
- export { RUNTIME } from "./runtime";
1
+ export { getUserAgent, RUNTIME } from "./runtime";
@@ -6,4 +6,23 @@ export interface Runtime {
6
6
  type: "browser" | "web-worker" | "deno" | "bun" | "node" | "react-native" | "unknown" | "workerd" | "edge-runtime";
7
7
  version?: string;
8
8
  parsedVersion?: number;
9
+ /**
10
+ * The operating system the SDK is running on, when it can be determined
11
+ * (e.g. "linux", "darwin", "win32" on server runtimes). Undefined in
12
+ * environments where the OS is not observable (e.g. browsers).
13
+ */
14
+ os?: string;
15
+ /**
16
+ * The CPU architecture the SDK is running on, when it can be determined
17
+ * (e.g. "x64", "arm64" on server runtimes). Undefined in environments where
18
+ * the architecture is not observable (e.g. browsers).
19
+ */
20
+ arch?: string;
9
21
  }
22
+ /**
23
+ * Builds a structured User-Agent string of the form
24
+ * `{sdkName}/{sdkVersion} ({os}; {arch}) {runtime}/{runtimeVersion}`
25
+ * where the platform group and runtime segment are omitted gracefully when the
26
+ * underlying values cannot be determined (e.g. in a browser).
27
+ */
28
+ export declare function getUserAgent(sdkName: string, sdkVersion: string): string;
@@ -30,11 +30,18 @@ export interface ILeaseStore {
30
30
  * sharing the backend: if a live (unexpired) lease is already present —
31
31
  * even one with a different `leaseId`, e.g. acquired by a sibling pod that
32
32
  * raced this one — leave it untouched so its already-debited
33
- * `localRemainingCredits` wins. Returns `true` if it wrote a fresh row,
34
- * `false` if it kept an existing live lease (the caller should release the
35
- * lease it acquired ONLY if its ID differs from the installed one — the
36
- * server hands a racing acquire the same active lease back, and releasing
37
- * that would pull the shared lease out from under every sibling).
33
+ * `localRemainingCredits` wins. If the slot holds an *expired* row with
34
+ * the SAME `leaseId`, implementations must NOT rewrite it either:
35
+ * rewriting resets `localRemainingCredits` to the full grant, erasing
36
+ * debits whose reservations are still open (the idempotent server hands a
37
+ * racing acquire the same active lease back, and a stale response can
38
+ * land after the local row's expiry — especially when a concurrent extend
39
+ * pushed the server-side expiry forward). Instead, reconcile it like an
40
+ * extend: granted-to-total, expiry only forward, balance untouched.
41
+ * Returns `true` if it wrote a fresh row, `false` if it kept (or
42
+ * reconciled) an existing lease (the caller should release the lease it
43
+ * acquired ONLY if its ID differs from the installed one — releasing the
44
+ * shared lease would pull it out from under every sibling).
38
45
  */
39
46
  replace(entry: Omit<LeaseEntry, "localRemainingCredits">): Promise<boolean>;
40
47
  /**
@@ -98,9 +105,11 @@ export declare class LeaseStore implements ILeaseStore {
98
105
  * Replace (or insert) the lease for the given (company, creditType).
99
106
  * Resets `localRemainingCredits` to `grantedAmount` for a new lease.
100
107
  * If a live lease already occupies the slot — regardless of `leaseId` — it
101
- * is left alone so any already-debited `localRemainingCredits` wins.
102
- * Returns `true` if a fresh row was written, `false` if an existing live
103
- * lease was kept.
108
+ * is left alone so any already-debited `localRemainingCredits` wins. If
109
+ * the slot holds an expired row with the SAME `leaseId`, the entry is
110
+ * reconciled (granted-to-total, expiry forward) instead of rewritten —
111
+ * see `ILeaseStore.replace`. Returns `true` if a fresh row was written,
112
+ * `false` if an existing lease was kept.
104
113
  */
105
114
  replace(entry: Omit<LeaseEntry, "localRemainingCredits">): Promise<boolean>;
106
115
  /**
@@ -11,4 +11,5 @@ export declare class SchematicError extends Error {
11
11
  rawResponse?: core.RawResponse;
12
12
  cause?: unknown;
13
13
  });
14
+ get requestId(): string | undefined;
14
15
  }
@@ -1,5 +1,5 @@
1
- export declare class SchematicTimeoutError extends Error {
2
- readonly cause?: unknown;
1
+ import * as errors from "./index";
2
+ export declare class SchematicTimeoutError extends errors.SchematicError {
3
3
  constructor(message: string, opts?: {
4
4
  cause?: unknown;
5
5
  });
package/dist/events.d.ts CHANGED
@@ -24,6 +24,12 @@ declare class EventBuffer {
24
24
  private flushing;
25
25
  constructor(captureClient: EventCaptureClient, opts?: EventBufferOptions);
26
26
  flush(): Promise<void>;
27
+ /**
28
+ * Sends a single request's worth of events, retrying with exponential
29
+ * backoff. Failures are logged and the chunk is dropped, matching the
30
+ * buffer's contract that tracking never throws to the caller.
31
+ */
32
+ private sendChunk;
27
33
  push(event: CreateEventRequestBody): Promise<void>;
28
34
  stop(): Promise<void>;
29
35
  private startPeriodicFlush;