@schematichq/schematic-typescript-node 1.5.7 → 1.5.9

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 (199) hide show
  1. package/README.md +1 -1
  2. package/dist/api/resources/accounts/client/Client.d.ts +28 -0
  3. package/dist/api/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +11 -0
  4. package/dist/api/resources/accounts/client/requests/index.d.ts +1 -0
  5. package/dist/api/resources/accounts/types/GetOnboardingStateResponse.d.ts +6 -0
  6. package/dist/api/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +6 -0
  7. package/dist/api/resources/accounts/types/index.d.ts +2 -0
  8. package/dist/api/resources/companies/client/Client.d.ts +88 -3
  9. package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +3 -0
  10. package/dist/api/resources/companies/client/requests/CountEntityKeysRequest.d.ts +18 -0
  11. package/dist/api/resources/companies/client/requests/CountEntityTraitsRequest.d.ts +18 -0
  12. package/dist/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.d.ts +1 -1
  13. package/dist/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.d.ts +1 -1
  14. package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +3 -0
  15. package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +0 -2
  16. package/dist/api/resources/companies/client/requests/index.d.ts +2 -0
  17. package/dist/api/resources/companies/types/CountCompaniesParams.d.ts +2 -0
  18. package/dist/api/resources/companies/types/CountEntityKeysParams.d.ts +12 -0
  19. package/dist/api/resources/companies/types/CountEntityKeysResponse.d.ts +6 -0
  20. package/dist/api/resources/companies/types/CountEntityTraitsParams.d.ts +12 -0
  21. package/dist/api/resources/companies/types/CountEntityTraitsResponse.d.ts +6 -0
  22. package/dist/api/resources/companies/types/DeleteEntityKeyDefinitionResponse.d.ts +6 -0
  23. package/dist/api/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +6 -0
  24. package/dist/api/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +6 -0
  25. package/dist/api/resources/companies/types/ListCompaniesParams.d.ts +2 -0
  26. package/dist/api/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
  27. package/dist/api/resources/companies/types/index.d.ts +7 -0
  28. package/dist/api/resources/credits/client/Client.d.ts +2 -2
  29. package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +1 -1
  30. package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +2 -0
  31. package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +1 -1
  32. package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +2 -0
  33. package/dist/api/resources/entitlements/client/Client.d.ts +23 -0
  34. package/dist/api/resources/entitlements/client/requests/ListFeatureUsageHistoryRequest.d.ts +29 -0
  35. package/dist/api/resources/entitlements/client/requests/index.d.ts +1 -0
  36. package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +20 -0
  37. package/dist/api/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +6 -0
  38. package/dist/api/resources/entitlements/types/index.d.ts +2 -0
  39. package/dist/api/resources/planbundle/client/Client.d.ts +23 -6
  40. package/dist/api/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +12 -3
  41. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +7 -2
  42. package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +5 -2
  43. package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
  44. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
  45. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
  46. package/dist/api/resources/planmigrations/client/Client.d.ts +4 -8
  47. package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +1 -1
  48. package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +1 -1
  49. package/dist/api/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +4 -6
  50. package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +1 -1
  51. package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +1 -1
  52. package/dist/api/resources/planmigrations/client/requests/PreviewMigrationRequestBody.d.ts +2 -2
  53. package/dist/api/resources/plans/client/Client.d.ts +10 -9
  54. package/dist/api/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +1 -0
  55. package/dist/api/resources/plans/client/requests/ListCustomPlanBillingsRequest.d.ts +3 -0
  56. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
  57. package/dist/api/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
  58. package/dist/api/types/BillingCollectionMethod.d.ts +5 -0
  59. package/dist/api/types/BillingCreditBundleResponseData.d.ts +2 -0
  60. package/dist/api/types/BillingCreditBundleView.d.ts +1 -0
  61. package/dist/api/types/BillingCreditGrantResponseData.d.ts +4 -0
  62. package/dist/api/types/BillingCreditView.d.ts +1 -1
  63. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +2 -0
  64. package/dist/api/types/BillingProductRecordResponseData.d.ts +12 -0
  65. package/dist/api/types/CheckFlagRequestBody.d.ts +3 -0
  66. package/dist/api/types/CheckoutBundlePurchaseBehavior.d.ts +5 -0
  67. package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
  68. package/dist/api/types/CompanyBillingCheckoutSettings.d.ts +1 -0
  69. package/dist/api/types/CompanyFeatureUsageExportMetadata.d.ts +15 -2
  70. package/dist/api/types/CompanyFeatureUsageExportMetadataSortOrderDirection.d.ts +6 -0
  71. package/dist/api/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +7 -0
  72. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +1 -0
  73. package/dist/api/types/ComponentCheckoutSettings.d.ts +2 -0
  74. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +2 -0
  75. package/dist/api/types/CreditCompanyGrantView.d.ts +2 -0
  76. package/dist/api/types/CustomPlanBillingResponseData.d.ts +4 -0
  77. package/dist/api/types/DataExportMetadata.d.ts +4 -1
  78. package/dist/api/types/DataExportType.d.ts +1 -0
  79. package/dist/api/types/EntityTraitDefinitionUsage.d.ts +8 -0
  80. package/dist/api/types/EventBodyFlagCheck.d.ts +2 -0
  81. package/dist/api/types/EventExportMetadata.d.ts +19 -0
  82. package/dist/api/types/EventExportMetadataEventTypesItem.d.ts +7 -0
  83. package/dist/api/types/FeatureUsageHistoryResponseData.d.ts +12 -0
  84. package/dist/api/types/FeatureView.d.ts +1 -1
  85. package/dist/api/types/GetOnboardingStateResp.d.ts +9 -0
  86. package/dist/api/types/ManagePlanRequest.d.ts +14 -0
  87. package/dist/api/types/MigrationProrationBehavior.d.ts +6 -0
  88. package/dist/api/types/OnboardingMilestone.d.ts +5 -0
  89. package/dist/api/types/OnboardingMilestoneView.d.ts +7 -0
  90. package/dist/api/types/OnboardingPath.d.ts +5 -0
  91. package/dist/api/types/OnboardingRequirement.d.ts +9 -0
  92. package/dist/api/types/OnboardingRequirementStatus.d.ts +6 -0
  93. package/dist/api/types/OnboardingRequirementView.d.ts +7 -0
  94. package/dist/api/types/OnboardingTrack.d.ts +5 -0
  95. package/dist/api/types/PlanBillingSource.d.ts +5 -0
  96. package/dist/api/types/PlanBundleResponseData.d.ts +1 -0
  97. package/dist/api/types/PlanCreditGrantView.d.ts +1 -0
  98. package/dist/api/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
  99. package/dist/api/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
  100. package/dist/api/types/PlanVersionMigrationResponseData.d.ts +1 -0
  101. package/dist/api/types/PreflightEventUsageRequestBody.d.ts +6 -0
  102. package/dist/api/types/PreflightRequestBody.d.ts +9 -0
  103. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -0
  104. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  105. package/dist/api/types/TestWebhookResponseData.d.ts +1 -0
  106. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +4 -2
  107. package/dist/api/types/UpsertCompanyRequestBody.d.ts +2 -0
  108. package/dist/api/types/UpsertUserRequestBody.d.ts +2 -0
  109. package/dist/api/types/UpsertUserSubRequestBody.d.ts +2 -0
  110. package/dist/api/types/WhoAmIResponseData.d.ts +1 -0
  111. package/dist/api/types/index.d.ts +21 -0
  112. package/dist/index.js +9 -9
  113. package/dist/serialization/resources/accounts/client/requests/UpdateOnboardingStateRequestBody.d.ts +14 -0
  114. package/dist/serialization/resources/accounts/client/requests/index.d.ts +1 -0
  115. package/dist/serialization/resources/accounts/types/GetOnboardingStateResponse.d.ts +11 -0
  116. package/dist/serialization/resources/accounts/types/UpdateOnboardingStateResponse.d.ts +11 -0
  117. package/dist/serialization/resources/accounts/types/index.d.ts +2 -0
  118. package/dist/serialization/resources/companies/types/CountCompaniesParams.d.ts +1 -0
  119. package/dist/serialization/resources/companies/types/CountEntityKeysParams.d.ts +13 -0
  120. package/dist/serialization/resources/companies/types/CountEntityKeysResponse.d.ts +12 -0
  121. package/dist/serialization/resources/companies/types/CountEntityTraitsParams.d.ts +13 -0
  122. package/dist/serialization/resources/companies/types/CountEntityTraitsResponse.d.ts +12 -0
  123. package/dist/serialization/resources/companies/types/DeleteEntityKeyDefinitionResponse.d.ts +11 -0
  124. package/dist/serialization/resources/companies/types/DeleteEntityTraitDefinitionResponse.d.ts +11 -0
  125. package/dist/serialization/resources/companies/types/GetEntityTraitDefinitionUsageResponse.d.ts +11 -0
  126. package/dist/serialization/resources/companies/types/ListCompaniesParams.d.ts +1 -0
  127. package/dist/serialization/resources/companies/types/ListPlanChangesParams.d.ts +0 -1
  128. package/dist/serialization/resources/companies/types/index.d.ts +7 -0
  129. package/dist/serialization/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -0
  130. package/dist/serialization/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -0
  131. package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryParams.d.ts +16 -0
  132. package/dist/serialization/resources/entitlements/types/ListFeatureUsageHistoryResponse.d.ts +12 -0
  133. package/dist/serialization/resources/entitlements/types/index.d.ts +2 -0
  134. package/dist/serialization/resources/planbundle/client/requests/CreateCustomPlanBundleRequestBody.d.ts +2 -2
  135. package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +1 -1
  136. package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +1 -1
  137. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
  138. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
  139. package/dist/serialization/resources/planmigrations/client/requests/CreateMigrationInput.d.ts +5 -3
  140. package/dist/serialization/resources/planmigrations/client/requests/PreviewMigrationRequestBody.d.ts +2 -1
  141. package/dist/serialization/resources/plans/client/requests/CreateCustomPlanRequestBody.d.ts +1 -0
  142. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +3 -0
  143. package/dist/serialization/resources/plans/types/ListCustomPlanBillingsParams.d.ts +2 -0
  144. package/dist/serialization/types/BillingCollectionMethod.d.ts +7 -0
  145. package/dist/serialization/types/BillingCreditBundleResponseData.d.ts +1 -0
  146. package/dist/serialization/types/BillingCreditBundleView.d.ts +1 -0
  147. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +2 -0
  148. package/dist/serialization/types/BillingCreditView.d.ts +2 -2
  149. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +1 -0
  150. package/dist/serialization/types/BillingProductRecordResponseData.d.ts +18 -0
  151. package/dist/serialization/types/CheckFlagRequestBody.d.ts +2 -0
  152. package/dist/serialization/types/CheckoutBundlePurchaseBehavior.d.ts +7 -0
  153. package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
  154. package/dist/serialization/types/CompanyBillingCheckoutSettings.d.ts +1 -0
  155. package/dist/serialization/types/CompanyFeatureUsageExportMetadata.d.ts +9 -1
  156. package/dist/serialization/types/CompanyFeatureUsageExportMetadataSortOrderDirection.d.ts +7 -0
  157. package/dist/serialization/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +7 -0
  158. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +1 -0
  159. package/dist/serialization/types/ComponentCheckoutSettings.d.ts +3 -0
  160. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  161. package/dist/serialization/types/CreditCompanyGrantView.d.ts +2 -0
  162. package/dist/serialization/types/CustomPlanBillingResponseData.d.ts +3 -0
  163. package/dist/serialization/types/DataExportMetadata.d.ts +5 -1
  164. package/dist/serialization/types/DataExportType.d.ts +1 -1
  165. package/dist/serialization/types/EntityTraitDefinitionUsage.d.ts +14 -0
  166. package/dist/serialization/types/EventBodyFlagCheck.d.ts +1 -0
  167. package/dist/serialization/types/EventExportMetadata.d.ts +17 -0
  168. package/dist/serialization/types/EventExportMetadataEventTypesItem.d.ts +7 -0
  169. package/dist/serialization/types/FeatureUsageHistoryResponseData.d.ts +14 -0
  170. package/dist/serialization/types/FeatureView.d.ts +2 -2
  171. package/dist/serialization/types/GetOnboardingStateResp.d.ts +19 -0
  172. package/dist/serialization/types/ManagePlanRequest.d.ts +8 -0
  173. package/dist/serialization/types/MigrationProrationBehavior.d.ts +7 -0
  174. package/dist/serialization/types/OnboardingMilestone.d.ts +7 -0
  175. package/dist/serialization/types/OnboardingMilestoneView.d.ts +14 -0
  176. package/dist/serialization/types/OnboardingPath.d.ts +7 -0
  177. package/dist/serialization/types/OnboardingRequirement.d.ts +7 -0
  178. package/dist/serialization/types/OnboardingRequirementStatus.d.ts +7 -0
  179. package/dist/serialization/types/OnboardingRequirementView.d.ts +14 -0
  180. package/dist/serialization/types/OnboardingTrack.d.ts +7 -0
  181. package/dist/serialization/types/PlanBillingSource.d.ts +7 -0
  182. package/dist/serialization/types/PlanBundleResponseData.d.ts +2 -0
  183. package/dist/serialization/types/PlanCreditGrantView.d.ts +1 -0
  184. package/dist/serialization/types/PlanVersionMigrationPreviewCompanyResponseData.d.ts +1 -0
  185. package/dist/serialization/types/PlanVersionMigrationPreviewResponseData.d.ts +1 -0
  186. package/dist/serialization/types/PlanVersionMigrationResponseData.d.ts +2 -0
  187. package/dist/serialization/types/PreflightEventUsageRequestBody.d.ts +10 -0
  188. package/dist/serialization/types/PreflightRequestBody.d.ts +12 -0
  189. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -0
  190. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  191. package/dist/serialization/types/TestWebhookResponseData.d.ts +1 -0
  192. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +1 -0
  193. package/dist/serialization/types/UpsertCompanyRequestBody.d.ts +1 -0
  194. package/dist/serialization/types/UpsertUserRequestBody.d.ts +1 -0
  195. package/dist/serialization/types/UpsertUserSubRequestBody.d.ts +1 -0
  196. package/dist/serialization/types/WhoAmIResponseData.d.ts +1 -0
  197. package/dist/serialization/types/index.d.ts +21 -0
  198. package/dist/wasm/rulesengine.js +4 -4
  199. package/package.json +4 -1
@@ -14,6 +14,7 @@ export interface CompanyPlanCreditGrantView {
14
14
  companyAutoTopupAmount?: number;
15
15
  companyAutoTopupEnabled?: boolean;
16
16
  companyAutoTopupThresholdCredits?: number;
17
+ companyCreditAmount: number;
17
18
  createdAt: Date;
18
19
  credit?: Schematic.BillingCreditView;
19
20
  creditAmount: number;
@@ -1,8 +1,10 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface ComponentCheckoutSettings {
3
+ bundlePurchaseBehavior: Schematic.CheckoutBundlePurchaseBehavior;
3
4
  collectAddress: boolean;
4
5
  collectEmail: boolean;
5
6
  collectPhone: boolean;
7
+ collectTaxId: boolean;
6
8
  prorationBehavior: Schematic.ProrationBehavior;
7
9
  taxCollectionEnabled: boolean;
8
10
  }
@@ -12,6 +12,8 @@ export interface CreateBillingPlanCreditGrantRequestBody {
12
12
  autoTopupThresholdCredits?: number;
13
13
  autoTopupThresholdPercent?: number;
14
14
  canBuyBundles?: boolean;
15
+ /** Credits granted once per company on top of the per-license amount. Only valid when scaling is per_license. Defaults to 0. */
16
+ companyCreditAmount?: number;
15
17
  creditAmount: number;
16
18
  creditId: string;
17
19
  expiryType?: Schematic.BillingCreditExpiryType;
@@ -3,6 +3,7 @@ export interface CreditCompanyGrantView {
3
3
  billingCreditBundleId?: string;
4
4
  billingCreditId: string;
5
5
  companyId: string;
6
+ companyLicenseId?: string;
6
7
  companyName: string;
7
8
  createdAt: Date;
8
9
  creditDescription: string;
@@ -16,6 +17,7 @@ export interface CreditCompanyGrantView {
16
17
  expiryUnitCount?: number;
17
18
  grantReason: Schematic.BillingCreditGrantReason;
18
19
  id: string;
20
+ licenseName?: string;
19
21
  planId?: string;
20
22
  planName?: string;
21
23
  pluralName?: string;
@@ -1,12 +1,16 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface CustomPlanBillingResponseData {
3
3
  activationStrategy: Schematic.CustomPlanActivationStrategy;
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
+ billingCycleAnchor?: Date;
4
6
  companyId: string;
5
7
  createdAt: Date;
6
8
  daysUntilDue: number;
7
9
  externalInvoiceId?: string;
8
10
  id: string;
9
11
  paidAt?: Date;
12
+ /** The flow that created this billing record: a custom plan, or a standard plan assigned by invoice through Manage Plan. */
13
+ planBillingSource: Schematic.PlanBillingSource;
10
14
  planId: string;
11
15
  publishedAt?: Date;
12
16
  sendInvoice: boolean;
@@ -1,5 +1,5 @@
1
1
  import type * as Schematic from "../index";
2
- export type DataExportMetadata = Schematic.DataExportMetadata.AuditLog | Schematic.DataExportMetadata.CompanyFeatureUsage;
2
+ export type DataExportMetadata = Schematic.DataExportMetadata.AuditLog | Schematic.DataExportMetadata.CompanyFeatureUsage | Schematic.DataExportMetadata.Event;
3
3
  export declare namespace DataExportMetadata {
4
4
  interface AuditLog extends Schematic.AuditLogExportMetadata {
5
5
  exportType: "audit-log";
@@ -7,4 +7,7 @@ export declare namespace DataExportMetadata {
7
7
  interface CompanyFeatureUsage extends Schematic.CompanyFeatureUsageExportMetadata {
8
8
  exportType: "company-feature-usage";
9
9
  }
10
+ interface Event extends Schematic.EventExportMetadata {
11
+ exportType: "event";
12
+ }
10
13
  }
@@ -1,5 +1,6 @@
1
1
  export declare const DataExportType: {
2
2
  readonly AuditLog: "audit-log";
3
3
  readonly CompanyFeatureUsage: "company-feature-usage";
4
+ readonly Event: "event";
4
5
  };
5
6
  export type DataExportType = (typeof DataExportType)[keyof typeof DataExportType];
@@ -0,0 +1,8 @@
1
+ export interface EntityTraitDefinitionUsage {
2
+ checkoutFieldConfigCount: number;
3
+ companyOverrideCount: number;
4
+ featureCount: number;
5
+ planEntitlementCount: number;
6
+ planTraitCount: number;
7
+ ruleConditionCount: number;
8
+ }
@@ -7,6 +7,8 @@ export interface EventBodyFlagCheck {
7
7
  flagId?: string;
8
8
  /** The key of the flag being checked */
9
9
  flagKey: string;
10
+ /** Whether the check was a preflight, asking whether an action would be allowed rather than reporting one that happened. Absent on ordinary checks */
11
+ preflight?: boolean;
10
12
  /** The reason why the value was returned */
11
13
  reason: string;
12
14
  /** Key-value pairs used to to identify company for which the flag was checked */
@@ -0,0 +1,19 @@
1
+ import type * as Schematic from "../index";
2
+ export interface EventExportMetadata {
3
+ /** Restrict the export to events for this company ID (starting with 'comp_') */
4
+ companyId?: string;
5
+ /** Restrict the export to events captured at or before this time */
6
+ endTime?: Date;
7
+ /** Restrict the export to track events with this subtype */
8
+ eventSubtype?: string;
9
+ /** Restrict the export to these event types (e.g. "track", "identify"); defaults to track, identify and inference events. Flag check events are only exported when requested here explicitly, and require a flag_id. */
10
+ eventTypes?: Schematic.EventExportMetadataEventTypesItem[];
11
+ /** Restrict the export to flag-check events for this flag ID (starting with 'flag_') */
12
+ flagId?: string;
13
+ /** Account member emails to notify when the export completes; empty means the artifact is only retrievable via the API */
14
+ notificationEmailRecipientEmailAddresses?: string[];
15
+ /** Restrict the export to events captured at or after this time */
16
+ startTime?: Date;
17
+ /** Restrict the export to events for this user ID (starting with 'user_') */
18
+ userId?: string;
19
+ }
@@ -0,0 +1,7 @@
1
+ export declare const EventExportMetadataEventTypesItem: {
2
+ readonly FlagCheck: "flag_check";
3
+ readonly Identify: "identify";
4
+ readonly Inference: "inference";
5
+ readonly Track: "track";
6
+ };
7
+ export type EventExportMetadataEventTypesItem = (typeof EventExportMetadataEventTypesItem)[keyof typeof EventExportMetadataEventTypesItem];
@@ -0,0 +1,12 @@
1
+ export interface FeatureUsageHistoryResponseData {
2
+ /** Companies are identified by ID only. To report against your own identifiers, resolve them once via the companies API and cache the mapping; keys are not repeated on every row. */
3
+ companyId: string;
4
+ eventSubtype: string;
5
+ featureId: string;
6
+ /** Exclusive end of the period this usage covers */
7
+ periodEnd: Date;
8
+ /** Inclusive start of the period this usage covers */
9
+ periodStart: Date;
10
+ /** Usage recorded within this period; an incremental total, not a running one */
11
+ usage: number;
12
+ }
@@ -2,7 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface FeatureView {
3
3
  accountId: string;
4
4
  billingLinkedResource?: Schematic.BillingLinkedResourceResponseData;
5
- billingProduct?: Schematic.BillingProductResponseData;
5
+ billingProduct?: Schematic.BillingProductRecordResponseData;
6
6
  createdAt: Date;
7
7
  description: string;
8
8
  eventSubtype?: string;
@@ -0,0 +1,9 @@
1
+ import type * as Schematic from "../index";
2
+ export interface GetOnboardingStateResp {
3
+ environmentId?: string;
4
+ milestones: Schematic.OnboardingMilestoneView[];
5
+ path?: Schematic.OnboardingPath;
6
+ requirements: Schematic.OnboardingRequirementView[];
7
+ suggestedNext: Schematic.OnboardingRequirement[];
8
+ track?: Schematic.OnboardingTrack;
9
+ }
@@ -1,21 +1,35 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface ManagePlanRequest {
3
+ /** If true, the company gets the plan only once the first invoice is paid. Only applies to an invoiced subscription. Defaults to false. */
4
+ activateOnPayment?: boolean;
3
5
  addOnSelections: Schematic.PlanSelection[];
4
6
  basePlanId?: string;
5
7
  basePlanPriceId?: string;
6
8
  basePlanVersionId?: string;
9
+ /** The date the subscription's billing period renews on. Only honored when starting a new subscription; changing the anchor on an existing subscription is not supported. */
10
+ billingCycleAnchor?: Date;
11
+ /** Address the invoice is sent to. Required when collection_method is send_invoice. */
12
+ billingEmail?: string;
7
13
  /** The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription. */
8
14
  billingEntityId?: string;
9
15
  /** If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. */
10
16
  cancelImmediately?: boolean;
17
+ /** How the subscription is paid: charged to a payment method on file, or invoiced with payment terms. Invoicing is only available when starting a new subscription. Defaults to charge_automatically. */
18
+ collectionMethod?: Schematic.BillingCollectionMethod;
11
19
  companyId: string;
12
20
  couponExternalId?: string;
13
21
  creditBundles: Schematic.UpdateCreditBundleRequestBody[];
14
22
  customFieldValues: Schematic.CheckoutFieldValue[];
23
+ /** Payment terms in days for an invoiced subscription. Defaults to 30. */
24
+ daysUntilDue?: number;
15
25
  payInAdvanceEntitlements: Schematic.UpdatePayInAdvanceRequestBody[];
16
26
  paymentMethodExternalId?: string;
17
27
  promoCode?: string;
18
28
  /** If true and cancel_immediately is true, issue prorated credit. Only applies when removing all plans. Defaults to true. */
19
29
  prorate?: boolean;
30
+ /** 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. */
31
+ prorateFirstPeriod?: boolean;
32
+ /** Whether Stripe emails the invoice when it is finalized. Only applies to an invoiced subscription. Defaults to true. */
33
+ sendInvoice?: boolean;
20
34
  trialEnd?: Date;
21
35
  }
@@ -0,0 +1,6 @@
1
+ export declare const MigrationProrationBehavior: {
2
+ readonly AlwaysInvoice: "always_invoice";
3
+ readonly CreateProrations: "create_prorations";
4
+ readonly None: "none";
5
+ };
6
+ export type MigrationProrationBehavior = (typeof MigrationProrationBehavior)[keyof typeof MigrationProrationBehavior];
@@ -0,0 +1,5 @@
1
+ export declare const OnboardingMilestone: {
2
+ readonly Evaluated: "evaluated";
3
+ readonly Implemented: "implemented";
4
+ };
5
+ export type OnboardingMilestone = (typeof OnboardingMilestone)[keyof typeof OnboardingMilestone];
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface OnboardingMilestoneView {
3
+ id: Schematic.OnboardingMilestone;
4
+ missing: Schematic.OnboardingRequirement[];
5
+ progress: number;
6
+ reachedAt?: Date;
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare const OnboardingPath: {
2
+ readonly Agent: "agent";
3
+ readonly App: "app";
4
+ };
5
+ export type OnboardingPath = (typeof OnboardingPath)[keyof typeof OnboardingPath];
@@ -0,0 +1,9 @@
1
+ export declare const OnboardingRequirement: {
2
+ readonly ConnectBilling: "connect_billing";
3
+ readonly CreateApiKey: "create_api_key";
4
+ readonly FirstFlagCheck: "first_flag_check";
5
+ readonly ImportCompanies: "import_companies";
6
+ readonly ModelPackaging: "model_packaging";
7
+ readonly SendEvents: "send_events";
8
+ };
9
+ export type OnboardingRequirement = (typeof OnboardingRequirement)[keyof typeof OnboardingRequirement];
@@ -0,0 +1,6 @@
1
+ export declare const OnboardingRequirementStatus: {
2
+ readonly Available: "available";
3
+ readonly Blocked: "blocked";
4
+ readonly Complete: "complete";
5
+ };
6
+ export type OnboardingRequirementStatus = (typeof OnboardingRequirementStatus)[keyof typeof OnboardingRequirementStatus];
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface OnboardingRequirementView {
3
+ blockedBy?: Schematic.OnboardingRequirement[];
4
+ id: Schematic.OnboardingRequirement;
5
+ satisfiedBy?: string;
6
+ status: Schematic.OnboardingRequirementStatus;
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare const OnboardingTrack: {
2
+ readonly Catalog: "catalog";
3
+ readonly SinglePlan: "single_plan";
4
+ };
5
+ export type OnboardingTrack = (typeof OnboardingTrack)[keyof typeof OnboardingTrack];
@@ -0,0 +1,5 @@
1
+ export declare const PlanBillingSource: {
2
+ readonly CustomPlan: "custom_plan";
3
+ readonly ManagePlan: "manage_plan";
4
+ };
5
+ export type PlanBillingSource = (typeof PlanBillingSource)[keyof typeof PlanBillingSource];
@@ -4,4 +4,5 @@ export interface PlanBundleResponseData {
4
4
  creditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
5
5
  entitlements?: Schematic.PlanEntitlementResponseData[];
6
6
  plan?: Schematic.PlanResponseData;
7
+ planVersion?: Schematic.PlanVersionResponseData;
7
8
  }
@@ -11,6 +11,7 @@ export interface PlanCreditGrantView {
11
11
  billingCreditAutoTopupThresholdCredits?: number;
12
12
  billingCreditAutoTopupThresholdPercent?: number;
13
13
  billingCreditCanBuyBundles: boolean;
14
+ companyCreditAmount: number;
14
15
  createdAt: Date;
15
16
  credit?: Schematic.BillingCreditView;
16
17
  creditAmount: number;
@@ -5,4 +5,5 @@ export interface PlanVersionMigrationPreviewCompanyResponseData {
5
5
  note?: string;
6
6
  planVersionIdFrom?: string;
7
7
  willUpdateSubscription: boolean;
8
+ wouldFail: boolean;
8
9
  }
@@ -1,4 +1,5 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface PlanVersionMigrationPreviewResponseData {
3
3
  companies: Schematic.PlanVersionMigrationPreviewCompanyResponseData[];
4
+ hasBillingChanges: boolean;
4
5
  }
@@ -10,6 +10,7 @@ export interface PlanVersionMigrationResponseData {
10
10
  planVersionIdFrom?: string;
11
11
  planVersionIdTo: string;
12
12
  planVersionIdsFrom: string[];
13
+ prorationBehavior?: Schematic.MigrationProrationBehavior;
13
14
  skippedCompanies: number;
14
15
  startedAt?: Date;
15
16
  status: Schematic.PlanVersionMigrationStatus;
@@ -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;
@@ -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];
@@ -1,4 +1,5 @@
1
1
  export interface TestWebhookResponseData {
2
+ failureReason?: string;
2
3
  responseCode: number;
3
4
  success: boolean;
4
5
  }
@@ -12,17 +12,19 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
12
12
  autoTopupThresholdCredits?: number;
13
13
  autoTopupThresholdPercent?: number;
14
14
  canBuyBundles?: boolean;
15
+ /** Credits granted once per company on top of the per-license amount. Only valid when the grant scales per license. */
16
+ companyCreditAmount?: number;
15
17
  creditAmount?: number;
16
18
  expiryType?: Schematic.BillingCreditExpiryType;
17
19
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
18
20
  expiryUnitCount?: number;
19
- /** The license whose quantity scales this grant. Cannot be changed after creation. */
21
+ /** The license whose quantity scales this grant. Cleared when the grant moves off per-license scaling. */
20
22
  licenseId?: string;
21
23
  resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
22
24
  resetStart: Schematic.BillingPlanCreditGrantResetStart;
23
25
  resetType?: Schematic.BillingPlanCreditGrantResetType;
24
26
  /** 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
27
  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. */
28
+ /** 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
29
  scaling?: Schematic.PlanCreditGrantScaling;
28
30
  }
@@ -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";
@@ -49,6 +50,7 @@ export * from "./BillingProductPriceInterval";
49
50
  export * from "./BillingProductPriceResponseData";
50
51
  export * from "./BillingProductPriceTierResponseData";
51
52
  export * from "./BillingProductPricing";
53
+ export * from "./BillingProductRecordResponseData";
52
54
  export * from "./BillingProductResponseData";
53
55
  export * from "./BillingProviderType";
54
56
  export * from "./BillingStrategy";
@@ -79,6 +81,7 @@ export * from "./CheckFlagRequestBody";
79
81
  export * from "./CheckFlagResponseData";
80
82
  export * from "./CheckFlagsBulkResponseData";
81
83
  export * from "./CheckFlagsResponseData";
84
+ export * from "./CheckoutBundlePurchaseBehavior";
82
85
  export * from "./CheckoutDataResponseData";
83
86
  export * from "./CheckoutFieldInput";
84
87
  export * from "./CheckoutFieldResponseData";
@@ -98,6 +101,8 @@ export * from "./CompanyCreditBalanceResponseData";
98
101
  export * from "./CompanyDetailResponseData";
99
102
  export * from "./CompanyEventPeriodMetricsResponseData";
100
103
  export * from "./CompanyFeatureUsageExportMetadata";
104
+ export * from "./CompanyFeatureUsageExportMetadataSortOrderDirection";
105
+ export * from "./CompanyFeatureUsageExportMetadataVisibleColumnsItem";
101
106
  export * from "./CompanyLedgerResponseData";
102
107
  export * from "./CompanyMatchingCriteria";
103
108
  export * from "./CompanyMembershipDetailResponseData";
@@ -201,6 +206,7 @@ export * from "./EntityKeyDefinitionResponseData";
201
206
  export * from "./EntityKeyDetailResponseData";
202
207
  export * from "./EntityKeyResponseData";
203
208
  export * from "./EntityTraitDefinitionResponseData";
209
+ export * from "./EntityTraitDefinitionUsage";
204
210
  export * from "./EntityTraitDetailResponseData";
205
211
  export * from "./EntityTraitResponseData";
206
212
  export * from "./EntityTraitValue";
@@ -218,6 +224,8 @@ export * from "./EventBodyIdentifyCompany";
218
224
  export * from "./EventBodyInference";
219
225
  export * from "./EventBodyTrack";
220
226
  export * from "./EventDetailResponseData";
227
+ export * from "./EventExportMetadata";
228
+ export * from "./EventExportMetadataEventTypesItem";
221
229
  export * from "./EventResponseData";
222
230
  export * from "./EventStatus";
223
231
  export * from "./EventSummaryResponseData";
@@ -232,6 +240,7 @@ export * from "./FeatureLifecyclePhase";
232
240
  export * from "./FeatureResponseData";
233
241
  export * from "./FeatureType";
234
242
  export * from "./FeatureUsageDetailResponseData";
243
+ export * from "./FeatureUsageHistoryResponseData";
235
244
  export * from "./FeatureUsageLegacyResponseData";
236
245
  export * from "./FeatureUsageResponseData";
237
246
  export * from "./FeatureUsageTimeSeriesResponseData";
@@ -242,6 +251,7 @@ export * from "./FlagResponseData";
242
251
  export * from "./FlagType";
243
252
  export * from "./FlagView";
244
253
  export * from "./GenericPreviewObject";
254
+ export * from "./GetOnboardingStateResp";
245
255
  export * from "./InsightsSummaryResponseData";
246
256
  export * from "./InstallIntegrationRequestBody";
247
257
  export * from "./IntegrationCapabilities";
@@ -271,11 +281,20 @@ export * from "./MetricPeriod";
271
281
  export * from "./MetricPeriodMonthReset";
272
282
  export * from "./MetronomeIntegrationConfig";
273
283
  export * from "./MigrationErrorCode";
284
+ export * from "./MigrationProrationBehavior";
274
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";
275
293
  export * from "./OrbIntegrationConfig";
276
294
  export * from "./OrderedPlansInGroup";
277
295
  export * from "./PaymentMethodRequestBody";
278
296
  export * from "./PaymentMethodResponseData";
297
+ export * from "./PlanBillingSource";
279
298
  export * from "./PlanBundleAction";
280
299
  export * from "./PlanBundleCreditGrantRequestBody";
281
300
  export * from "./PlanBundleEntitlementRequestBody";
@@ -318,6 +337,8 @@ export * from "./PlanVersionResponseData";
318
337
  export * from "./PlanVersionSnapshotView";
319
338
  export * from "./PlanVersionStatus";
320
339
  export * from "./PlanViewPublicResponseData";
340
+ export * from "./PreflightEventUsageRequestBody";
341
+ export * from "./PreflightRequestBody";
321
342
  export * from "./PreviewObject";
322
343
  export * from "./PreviewObjectResponseData";
323
344
  export * from "./PreviewSubscriptionChangeResponseData";