@schematichq/schematic-typescript-node 1.5.8 → 1.5.10

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 (218) hide show
  1. package/README.md +1 -1
  2. package/dist/BaseClient.d.ts +12 -0
  3. package/dist/Client.d.ts +3 -0
  4. package/dist/api/errors/BadRequestError.d.ts +1 -0
  5. package/dist/api/errors/ForbiddenError.d.ts +1 -0
  6. package/dist/api/errors/InternalServerError.d.ts +1 -0
  7. package/dist/api/errors/NotFoundError.d.ts +1 -0
  8. package/dist/api/errors/UnauthorizedError.d.ts +1 -0
  9. package/dist/api/resources/accesstokens/client/Client.d.ts +2 -0
  10. package/dist/api/resources/accounts/client/Client.d.ts +70 -0
  11. package/dist/api/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +11 -0
  12. package/dist/api/resources/accounts/client/requests/index.d.ts +1 -0
  13. package/dist/api/resources/accounts/types/GetOnboardingStateResponse.d.ts +6 -0
  14. package/dist/api/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +6 -0
  15. package/dist/api/resources/accounts/types/index.d.ts +2 -0
  16. package/dist/api/resources/billing/client/Client.d.ts +48 -0
  17. package/dist/api/resources/catalogs/client/Client.d.ts +28 -0
  18. package/dist/api/resources/checkout/client/Client.d.ts +18 -0
  19. package/dist/api/resources/companies/client/Client.d.ts +139 -3
  20. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +3 -0
  21. package/dist/api/resources/companies/client/requests/CountEntityTraitsRequest.d.ts +18 -0
  22. package/dist/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.d.ts +1 -1
  23. package/dist/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.d.ts +1 -1
  24. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +3 -0
  25. package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +0 -2
  26. package/dist/api/resources/companies/client/requests/index.d.ts +1 -0
  27. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  28. package/dist/api/resources/companies/types/CountEntityTraitsParams.d.ts +12 -0
  29. package/dist/api/resources/companies/types/CountEntityTraitsResponse.d.ts +6 -0
  30. package/dist/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +6 -0
  31. package/dist/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +6 -0
  32. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  33. package/dist/api/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
  34. package/dist/api/resources/companies/types/index.d.ts +4 -0
  35. package/dist/api/resources/components/client/Client.d.ts +16 -0
  36. package/dist/api/resources/componentspublic/client/Client.d.ts +2 -0
  37. package/dist/api/resources/credits/client/Client.d.ts +62 -2
  38. package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +1 -1
  39. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -0
  40. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +1 -1
  41. package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +2 -0
  42. package/dist/api/resources/dataexports/client/Client.d.ts +8 -0
  43. package/dist/api/resources/entitlements/client/Client.d.ts +73 -0
  44. package/dist/api/resources/entitlements/client/requests/ListFeatureUsageHistoryRequest.d.ts +29 -0
  45. package/dist/api/resources/entitlements/client/requests/index.d.ts +1 -0
  46. package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +20 -0
  47. package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +6 -0
  48. package/dist/api/resources/entitlements/types/index.d.ts +2 -0
  49. package/dist/api/resources/events/client/Client.d.ts +12 -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 +18 -0
  53. package/dist/api/resources/licenses/client/Client.d.ts +6 -0
  54. package/dist/api/resources/planbundle/client/Client.d.ts +27 -6
  55. package/dist/api/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +11 -3
  56. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +6 -2
  57. package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +5 -2
  58. package/dist/api/resources/plangroups/client/Client.d.ts +8 -0
  59. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
  60. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
  61. package/dist/api/resources/planmigrations/client/Client.d.ts +22 -8
  62. package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +1 -1
  63. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +1 -1
  64. package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +4 -6
  65. package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +1 -1
  66. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +1 -1
  67. package/dist/api/resources/planmigrations/client/requests/PreviewMigrationRequestBody.d.ts +2 -2
  68. package/dist/api/resources/plans/client/Client.d.ts +46 -12
  69. package/dist/api/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -2
  70. package/dist/api/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +2 -2
  71. package/dist/api/resources/plans/client/requests/ListCustomPlanBillingsRequest.d.ts +3 -0
  72. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
  73. package/dist/api/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
  74. package/dist/api/resources/scheduledcheckout/client/Client.d.ts +8 -0
  75. package/dist/api/resources/webhooks/client/Client.d.ts +20 -0
  76. package/dist/api/types/AuditLogResponseData.d.ts +1 -0
  77. package/dist/api/types/BillingCollectionMethod.d.ts +5 -0
  78. package/dist/api/types/BillingCreditBundleResponseData.d.ts +2 -0
  79. package/dist/api/types/BillingCreditBundleView.d.ts +1 -0
  80. package/dist/api/types/BillingCreditGrantResponseData.d.ts +4 -0
  81. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +3 -1
  82. package/dist/api/types/CheckFlagRequestBody.d.ts +3 -0
  83. package/dist/api/types/CheckoutBundlePurchaseBehavior.d.ts +5 -0
  84. package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
  85. package/dist/api/types/CompanyBillingCheckoutSettings.d.ts +1 -0
  86. package/dist/api/types/CompanyFeatureUsageExportMetadata.d.ts +6 -0
  87. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +1 -0
  88. package/dist/api/types/ComponentCheckoutSettings.d.ts +2 -0
  89. package/dist/api/types/ComponentHydrateResponseData.d.ts +1 -1
  90. package/dist/api/types/ComponentPreviewResponseData.d.ts +1 -1
  91. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  92. package/dist/api/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
  93. package/dist/api/types/CreatePlanRequestBody.d.ts +1 -1
  94. package/dist/api/types/CreditCompanyGrantView.d.ts +2 -0
  95. package/dist/api/types/CustomPlanBillingResponseData.d.ts +4 -0
  96. package/dist/api/types/EntityTraitDefinitionUsage.d.ts +8 -0
  97. package/dist/api/types/EventBodyFlagCheck.d.ts +2 -0
  98. package/dist/api/types/FeatureUsageHistoryResponseData.d.ts +12 -0
  99. package/dist/api/types/GetOnboardingStateResp.d.ts +9 -0
  100. package/dist/api/types/ManagePlanRequest.d.ts +14 -0
  101. package/dist/api/types/MigrationProrationBehavior.d.ts +6 -0
  102. package/dist/api/types/OnboardingMilestone.d.ts +5 -0
  103. package/dist/api/types/OnboardingMilestoneView.d.ts +7 -0
  104. package/dist/api/types/OnboardingPath.d.ts +5 -0
  105. package/dist/api/types/OnboardingRequirement.d.ts +9 -0
  106. package/dist/api/types/OnboardingRequirementStatus.d.ts +6 -0
  107. package/dist/api/types/OnboardingRequirementView.d.ts +8 -0
  108. package/dist/api/types/OnboardingTrack.d.ts +5 -0
  109. package/dist/api/types/PlanBillingSource.d.ts +5 -0
  110. package/dist/api/types/PlanBundleResponseData.d.ts +1 -0
  111. package/dist/api/types/PlanChangeResponseData.d.ts +6 -0
  112. package/dist/api/types/PlanCreditGrantView.d.ts +1 -0
  113. package/dist/api/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
  114. package/dist/api/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
  115. package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
  116. package/dist/api/types/PreflightEventUsageRequestBody.d.ts +6 -0
  117. package/dist/api/types/PreflightRequestBody.d.ts +9 -0
  118. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -0
  119. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  120. package/dist/api/types/StripeIntegrationConfig.d.ts +2 -0
  121. package/dist/api/types/UpcomingInvoiceResponseData.d.ts +23 -0
  122. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +5 -2
  123. package/dist/api/types/UpsertCompanyRequestBody.d.ts +2 -0
  124. package/dist/api/types/UpsertUserRequestBody.d.ts +2 -0
  125. package/dist/api/types/UpsertUserSubRequestBody.d.ts +2 -0
  126. package/dist/api/types/WhoAmIResponseData.d.ts +1 -0
  127. package/dist/api/types/index.d.ts +17 -0
  128. package/dist/core/fetcher/redactUrl.d.ts +2 -0
  129. package/dist/core/requestBody.d.ts +12 -0
  130. package/dist/core/runtime/index.d.ts +1 -1
  131. package/dist/core/runtime/runtime.d.ts +19 -0
  132. package/dist/errors/SchematicError.d.ts +1 -0
  133. package/dist/errors/SchematicTimeoutError.d.ts +2 -2
  134. package/dist/events.d.ts +6 -0
  135. package/dist/index.js +9 -9
  136. package/dist/serialization/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +14 -0
  137. package/dist/serialization/resources/accounts/client/requests/index.d.ts +1 -0
  138. package/dist/serialization/resources/accounts/types/GetOnboardingStateResponse.d.ts +11 -0
  139. package/dist/serialization/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +11 -0
  140. package/dist/serialization/resources/accounts/types/index.d.ts +2 -0
  141. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  142. package/dist/serialization/resources/companies/types/CountEntityTraitsParams.d.ts +13 -0
  143. package/dist/serialization/resources/companies/types/CountEntityTraitsResponse.d.ts +12 -0
  144. package/dist/serialization/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +11 -0
  145. package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +11 -0
  146. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  147. package/dist/serialization/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
  148. package/dist/serialization/resources/companies/types/index.d.ts +4 -0
  149. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -0
  150. package/dist/serialization/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -0
  151. package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +16 -0
  152. package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +12 -0
  153. package/dist/serialization/resources/entitlements/types/index.d.ts +2 -0
  154. package/dist/serialization/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +2 -2
  155. package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +1 -1
  156. package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +1 -1
  157. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
  158. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
  159. package/dist/serialization/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +5 -3
  160. package/dist/serialization/resources/planmigrations/client/requests/PreviewMigrationRequestBody.d.ts +2 -1
  161. package/dist/serialization/resources/plans/client/requests/CreateBillingLinkedPlanRequestBody.d.ts +1 -1
  162. package/dist/serialization/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +2 -1
  163. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
  164. package/dist/serialization/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
  165. package/dist/serialization/types/AuditLogResponseData.d.ts +1 -0
  166. package/dist/serialization/types/BillingCollectionMethod.d.ts +7 -0
  167. package/dist/serialization/types/BillingCreditBundleResponseData.d.ts +1 -0
  168. package/dist/serialization/types/BillingCreditBundleView.d.ts +1 -0
  169. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +2 -0
  170. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +1 -0
  171. package/dist/serialization/types/CheckFlagRequestBody.d.ts +2 -0
  172. package/dist/serialization/types/CheckoutBundlePurchaseBehavior.d.ts +7 -0
  173. package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
  174. package/dist/serialization/types/CompanyBillingCheckoutSettings.d.ts +1 -0
  175. package/dist/serialization/types/CompanyFeatureUsageExportMetadata.d.ts +3 -0
  176. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +1 -0
  177. package/dist/serialization/types/ComponentCheckoutSettings.d.ts +3 -0
  178. package/dist/serialization/types/ComponentHydrateResponseData.d.ts +2 -2
  179. package/dist/serialization/types/ComponentPreviewResponseData.d.ts +2 -1
  180. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  181. package/dist/serialization/types/CreateCustomPlanBundlePlanRequestBody.d.ts +1 -1
  182. package/dist/serialization/types/CreatePlanRequestBody.d.ts +1 -1
  183. package/dist/serialization/types/CreditCompanyGrantView.d.ts +2 -0
  184. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +3 -0
  185. package/dist/serialization/types/EntityTraitDefinitionUsage.d.ts +14 -0
  186. package/dist/serialization/types/EventBodyFlagCheck.d.ts +1 -0
  187. package/dist/serialization/types/FeatureUsageHistoryResponseData.d.ts +14 -0
  188. package/dist/serialization/types/GetOnboardingStateResp.d.ts +19 -0
  189. package/dist/serialization/types/ManagePlanRequest.d.ts +8 -0
  190. package/dist/serialization/types/MigrationProrationBehavior.d.ts +7 -0
  191. package/dist/serialization/types/OnboardingMilestone.d.ts +7 -0
  192. package/dist/serialization/types/OnboardingMilestoneView.d.ts +14 -0
  193. package/dist/serialization/types/OnboardingPath.d.ts +7 -0
  194. package/dist/serialization/types/OnboardingRequirement.d.ts +7 -0
  195. package/dist/serialization/types/OnboardingRequirementStatus.d.ts +7 -0
  196. package/dist/serialization/types/OnboardingRequirementView.d.ts +15 -0
  197. package/dist/serialization/types/OnboardingTrack.d.ts +7 -0
  198. package/dist/serialization/types/PlanBillingSource.d.ts +7 -0
  199. package/dist/serialization/types/PlanBundleResponseData.d.ts +2 -0
  200. package/dist/serialization/types/PlanChangeResponseData.d.ts +4 -0
  201. package/dist/serialization/types/PlanCreditGrantView.d.ts +1 -0
  202. package/dist/serialization/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
  203. package/dist/serialization/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
  204. package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +2 -0
  205. package/dist/serialization/types/PreflightEventUsageRequestBody.d.ts +10 -0
  206. package/dist/serialization/types/PreflightRequestBody.d.ts +12 -0
  207. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -0
  208. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  209. package/dist/serialization/types/StripeIntegrationConfig.d.ts +1 -0
  210. package/dist/serialization/types/UpcomingInvoiceResponseData.d.ts +30 -0
  211. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  212. package/dist/serialization/types/UpsertCompanyRequestBody.d.ts +1 -0
  213. package/dist/serialization/types/UpsertUserRequestBody.d.ts +1 -0
  214. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  215. package/dist/serialization/types/WhoAmIResponseData.d.ts +1 -0
  216. package/dist/serialization/types/index.d.ts +17 -0
  217. package/dist/wasm/rulesengine.js +4 -4
  218. package/package.json +4 -1
@@ -0,0 +1,6 @@
1
+ export interface PreflightEventUsageRequestBody {
2
+ /** The event subtype the usage would be recorded under */
3
+ eventSubtype: string;
4
+ /** How many units of the event subtype the action would record. Zero has no effect */
5
+ quantity: number;
6
+ }
@@ -0,0 +1,9 @@
1
+ import type * as Schematic from "../index";
2
+ export interface PreflightRequestBody {
3
+ /** Cost in credits of the action, keyed by credit ID, for callers that have already computed it. Takes precedence over usage and event_usage on credit balance conditions for the same credit. A cost of zero means the action is free, not that the input is absent */
4
+ creditCost?: Record<string, number>;
5
+ /** Usage of a specific event subtype. Preferred over usage when the subtype is known, since it only affects conditions measuring that subtype */
6
+ eventUsage?: Schematic.PreflightEventUsageRequestBody;
7
+ /** Quantity of usage to simulate against any numeric condition encountered while evaluating the flag. Zero has no effect */
8
+ usage?: number;
9
+ }
@@ -1,6 +1,7 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface PreviewSubscriptionFinanceResponseData {
3
3
  amountOff: number;
4
+ discountAmount: number;
4
5
  discounts: Schematic.PreviewSubscriptionDiscountResponseData[];
5
6
  dueNow: number;
6
7
  newCharges: number;
@@ -9,6 +10,7 @@ export interface PreviewSubscriptionFinanceResponseData {
9
10
  periodStart: Date;
10
11
  promoCodeApplied: boolean;
11
12
  proration: number;
13
+ prorationBilledAt?: Date;
12
14
  taxAmount?: number;
13
15
  taxDisplayName?: string;
14
16
  taxRequireBillingDetails: boolean;
@@ -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 V5B3E7220: "v5b3e7220";
3
+ readonly Vc8Eb8Df4: "vc8eb8df4";
4
4
  readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
5
5
  };
6
6
  export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
@@ -11,4 +11,6 @@ export interface StripeIntegrationConfig {
11
11
  liveMode: boolean;
12
12
  /** Onboarding URL returned during the v2 (Connect) install flow before activation */
13
13
  onboardUrl?: string;
14
+ /** App location that started the connect flow; the OAuth callback redirects back there on success */
15
+ returnTo?: string;
14
16
  }
@@ -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,18 +11,21 @@ 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;
16
+ /** Credits granted once per company on top of the per-license amount. Only valid when the grant scales per license. */
17
+ companyCreditAmount?: number;
15
18
  creditAmount?: number;
16
19
  expiryType?: Schematic.BillingCreditExpiryType;
17
20
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
18
21
  expiryUnitCount?: number;
19
- /** The license whose quantity scales this grant. Cannot be changed after creation. */
22
+ /** The license whose quantity scales this grant. Cleared when the grant moves off per-license scaling. */
20
23
  licenseId?: string;
21
24
  resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
22
25
  resetStart: Schematic.BillingPlanCreditGrantResetStart;
23
26
  resetType?: Schematic.BillingPlanCreditGrantResetType;
24
27
  /** Percentage of unused credits that carry over when this grant resets. Only applies when reset_type is plan_period. Rolled-over credits expire at the next reset and are not rolled again. */
25
28
  rolloverPercentage?: number;
26
- /** Whether the grant is a fixed amount per company, or issued once per license the company holds. Cannot be changed after creation. */
29
+ /** Whether the grant is a fixed amount per company, or issued once per license the company holds. Changing this re-issues the credits companies already hold for this grant. */
27
30
  scaling?: Schematic.PlanCreditGrantScaling;
28
31
  }
@@ -10,6 +10,8 @@ export interface UpsertCompanyRequestBody {
10
10
  lastSeenAt?: Date;
11
11
  name?: string;
12
12
  preventKeyRemap?: boolean;
13
+ /** Names of keys to remove from the company. Removing a key the company does not have does nothing, and a company must keep at least one key. */
14
+ removeKeys?: string[];
13
15
  /** A map of trait names to trait values */
14
16
  traits?: Record<string, unknown>;
15
17
  updateOnly?: boolean;
@@ -13,6 +13,8 @@ export interface UpsertUserRequestBody {
13
13
  keys: Record<string, string>;
14
14
  lastSeenAt?: Date;
15
15
  name?: string;
16
+ /** Names of keys to remove from the user. Removing a key the user does not have does nothing, and a user must keep at least one key. */
17
+ removeKeys?: string[];
16
18
  /** A map of trait names to trait values */
17
19
  traits?: Record<string, unknown>;
18
20
  updateOnly?: boolean;
@@ -9,6 +9,8 @@ export interface UpsertUserSubRequestBody {
9
9
  keys: Record<string, string>;
10
10
  lastSeenAt?: Date;
11
11
  name?: string;
12
+ /** Names of keys to remove from the user. Removing a key the user does not have does nothing, and a user must keep at least one key. */
13
+ removeKeys?: string[];
12
14
  /** A map of trait names to trait values */
13
15
  traits?: Record<string, unknown>;
14
16
  updateOnly?: boolean;
@@ -6,6 +6,7 @@ export interface WhoAmIResponseData {
6
6
  apiKeyId?: string;
7
7
  environmentId?: string;
8
8
  environments: Schematic.EnvironmentResponseData[];
9
+ onboardingComplete: boolean;
9
10
  stripeUserId?: string;
10
11
  userId?: string;
11
12
  userName?: string;
@@ -12,6 +12,7 @@ export * from "./ApiKeyScope";
12
12
  export * from "./AuditLogExportMetadata";
13
13
  export * from "./AuditLogListResponseData";
14
14
  export * from "./AuditLogResponseData";
15
+ export * from "./BillingCollectionMethod";
15
16
  export * from "./BillingCouponResponseData";
16
17
  export * from "./BillingCreditAutoTopupAvailability";
17
18
  export * from "./BillingCreditBundleResponseData";
@@ -80,6 +81,7 @@ export * from "./CheckFlagRequestBody";
80
81
  export * from "./CheckFlagResponseData";
81
82
  export * from "./CheckFlagsBulkResponseData";
82
83
  export * from "./CheckFlagsResponseData";
84
+ export * from "./CheckoutBundlePurchaseBehavior";
83
85
  export * from "./CheckoutDataResponseData";
84
86
  export * from "./CheckoutFieldInput";
85
87
  export * from "./CheckoutFieldResponseData";
@@ -204,6 +206,7 @@ export * from "./EntityKeyDefinitionResponseData";
204
206
  export * from "./EntityKeyDetailResponseData";
205
207
  export * from "./EntityKeyResponseData";
206
208
  export * from "./EntityTraitDefinitionResponseData";
209
+ export * from "./EntityTraitDefinitionUsage";
207
210
  export * from "./EntityTraitDetailResponseData";
208
211
  export * from "./EntityTraitResponseData";
209
212
  export * from "./EntityTraitValue";
@@ -237,6 +240,7 @@ export * from "./FeatureLifecyclePhase";
237
240
  export * from "./FeatureResponseData";
238
241
  export * from "./FeatureType";
239
242
  export * from "./FeatureUsageDetailResponseData";
243
+ export * from "./FeatureUsageHistoryResponseData";
240
244
  export * from "./FeatureUsageLegacyResponseData";
241
245
  export * from "./FeatureUsageResponseData";
242
246
  export * from "./FeatureUsageTimeSeriesResponseData";
@@ -247,6 +251,7 @@ export * from "./FlagResponseData";
247
251
  export * from "./FlagType";
248
252
  export * from "./FlagView";
249
253
  export * from "./GenericPreviewObject";
254
+ export * from "./GetOnboardingStateResp";
250
255
  export * from "./InsightsSummaryResponseData";
251
256
  export * from "./InstallIntegrationRequestBody";
252
257
  export * from "./IntegrationCapabilities";
@@ -276,11 +281,20 @@ export * from "./MetricPeriod";
276
281
  export * from "./MetricPeriodMonthReset";
277
282
  export * from "./MetronomeIntegrationConfig";
278
283
  export * from "./MigrationErrorCode";
284
+ export * from "./MigrationProrationBehavior";
279
285
  export * from "./MrrResponseData";
286
+ export * from "./OnboardingMilestone";
287
+ export * from "./OnboardingMilestoneView";
288
+ export * from "./OnboardingPath";
289
+ export * from "./OnboardingRequirement";
290
+ export * from "./OnboardingRequirementStatus";
291
+ export * from "./OnboardingRequirementView";
292
+ export * from "./OnboardingTrack";
280
293
  export * from "./OrbIntegrationConfig";
281
294
  export * from "./OrderedPlansInGroup";
282
295
  export * from "./PaymentMethodRequestBody";
283
296
  export * from "./PaymentMethodResponseData";
297
+ export * from "./PlanBillingSource";
284
298
  export * from "./PlanBundleAction";
285
299
  export * from "./PlanBundleCreditGrantRequestBody";
286
300
  export * from "./PlanBundleEntitlementRequestBody";
@@ -323,6 +337,8 @@ export * from "./PlanVersionResponseData";
323
337
  export * from "./PlanVersionSnapshotView";
324
338
  export * from "./PlanVersionStatus";
325
339
  export * from "./PlanViewPublicResponseData";
340
+ export * from "./PreflightEventUsageRequestBody";
341
+ export * from "./PreflightRequestBody";
326
342
  export * from "./PreviewObject";
327
343
  export * from "./PreviewObjectResponseData";
328
344
  export * from "./PreviewSubscriptionChangeResponseData";
@@ -391,6 +407,7 @@ export * from "./TraitDefinition";
391
407
  export * from "./TraitDefinitionComparableType";
392
408
  export * from "./TraitType";
393
409
  export * from "./TrialStatus";
410
+ export * from "./UpcomingInvoiceResponseData";
394
411
  export * from "./UpdateAddOnRequestBody";
395
412
  export * from "./UpdateAutoTopupOverrideRequestBody";
396
413
  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;
@@ -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;