@schematichq/schematic-typescript-node 1.5.3 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  2. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -0
  3. package/dist/api/resources/companies/client/Client.d.ts +34 -0
  4. package/dist/api/resources/companies/client/requests/GetBillingEntityChildSubscriptionsRequest.d.ts +9 -0
  5. package/dist/api/resources/companies/client/requests/GetCompanyBillingEntityRequest.d.ts +9 -0
  6. package/dist/api/resources/companies/client/requests/index.d.ts +2 -0
  7. package/dist/api/resources/companies/types/GetBillingEntityChildSubscriptionsParams.d.ts +6 -0
  8. package/dist/api/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.d.ts +6 -0
  9. package/dist/api/resources/companies/types/GetCompanyBillingEntityParams.d.ts +6 -0
  10. package/dist/api/resources/companies/types/GetCompanyBillingEntityResponse.d.ts +6 -0
  11. package/dist/api/resources/companies/types/index.d.ts +4 -0
  12. package/dist/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +1 -0
  13. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +1 -0
  14. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +1 -0
  15. package/dist/api/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +0 -1
  16. package/dist/api/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +0 -1
  17. package/dist/api/types/AccountMemberPermission.d.ts +1 -0
  18. package/dist/api/types/BillingCreditAutoTopupAvailability.d.ts +6 -0
  19. package/dist/api/types/BillingCreditGrantZeroedOutReason.d.ts +2 -0
  20. package/dist/api/types/BillingPlanCreditGrantResetCadence.d.ts +2 -0
  21. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +5 -0
  22. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  23. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  24. package/dist/api/types/CompanyBillingEntityResponseData.d.ts +5 -0
  25. package/dist/api/types/CompanyBillingEntitySubscriptionResponseData.d.ts +21 -0
  26. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +2 -0
  27. package/dist/api/types/CompanyPlanDetailResponseData.d.ts +2 -0
  28. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +2 -0
  29. package/dist/api/types/EventBody.d.ts +1 -1
  30. package/dist/api/types/EventBodyInference.d.ts +30 -0
  31. package/dist/api/types/EventType.d.ts +1 -0
  32. package/dist/api/types/IntegrationsListResponseData.d.ts +1 -0
  33. package/dist/api/types/InvoiceRequestBody.d.ts +2 -0
  34. package/dist/api/types/InvoiceResponseData.d.ts +2 -0
  35. package/dist/api/types/ManagePlanRequest.d.ts +2 -0
  36. package/dist/api/types/MetronomeIntegrationConfig.d.ts +4 -1
  37. package/dist/api/types/PlanBundleResponseData.d.ts +0 -1
  38. package/dist/api/types/PlanCreditGrantView.d.ts +2 -0
  39. package/dist/api/types/PlanDetailResponseData.d.ts +2 -0
  40. package/dist/api/types/PlanEntitlementResponseData.d.ts +1 -0
  41. package/dist/api/types/PlanGroupPlanDetailResponseData.d.ts +2 -0
  42. package/dist/api/types/PlanViewPublicResponseData.d.ts +2 -0
  43. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +2 -0
  44. package/dist/api/types/WarningTierRequestBody.d.ts +4 -0
  45. package/dist/api/types/WarningTierResponseData.d.ts +5 -0
  46. package/dist/api/types/index.d.ts +6 -0
  47. package/dist/index.js +9 -9
  48. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  49. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +2 -0
  50. package/dist/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsParams.d.ts +9 -0
  51. package/dist/serialization/resources/companies/types/GetBillingEntityChildSubscriptionsResponse.d.ts +12 -0
  52. package/dist/serialization/resources/companies/types/GetCompanyBillingEntityParams.d.ts +9 -0
  53. package/dist/serialization/resources/companies/types/GetCompanyBillingEntityResponse.d.ts +12 -0
  54. package/dist/serialization/resources/companies/types/index.d.ts +4 -0
  55. package/dist/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +2 -0
  56. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +2 -0
  57. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +2 -0
  58. package/dist/serialization/resources/planbundle/client/requests/CreatePlanBundleRequestBody.d.ts +0 -2
  59. package/dist/serialization/resources/planbundle/client/requests/UpdatePlanBundleRequestBody.d.ts +0 -2
  60. package/dist/serialization/types/AccountMemberPermission.d.ts +1 -1
  61. package/dist/serialization/types/BillingCreditAutoTopupAvailability.d.ts +7 -0
  62. package/dist/serialization/types/BillingCreditGrantZeroedOutReason.d.ts +1 -1
  63. package/dist/serialization/types/BillingPlanCreditGrantResetCadence.d.ts +1 -1
  64. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +3 -0
  65. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  66. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  67. package/dist/serialization/types/CompanyBillingEntityResponseData.d.ts +11 -0
  68. package/dist/serialization/types/CompanyBillingEntitySubscriptionResponseData.d.ts +32 -0
  69. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +3 -0
  70. package/dist/serialization/types/CompanyPlanDetailResponseData.d.ts +3 -0
  71. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  72. package/dist/serialization/types/EventBody.d.ts +2 -1
  73. package/dist/serialization/types/EventBodyInference.d.ts +22 -0
  74. package/dist/serialization/types/EventType.d.ts +1 -1
  75. package/dist/serialization/types/IntegrationsListResponseData.d.ts +1 -0
  76. package/dist/serialization/types/InvoiceRequestBody.d.ts +2 -0
  77. package/dist/serialization/types/InvoiceResponseData.d.ts +2 -0
  78. package/dist/serialization/types/ManagePlanRequest.d.ts +1 -0
  79. package/dist/serialization/types/MetronomeIntegrationConfig.d.ts +3 -1
  80. package/dist/serialization/types/PlanBundleResponseData.d.ts +0 -2
  81. package/dist/serialization/types/PlanCreditGrantView.d.ts +3 -0
  82. package/dist/serialization/types/PlanDetailResponseData.d.ts +3 -0
  83. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +2 -0
  84. package/dist/serialization/types/PlanGroupPlanDetailResponseData.d.ts +3 -0
  85. package/dist/serialization/types/PlanViewPublicResponseData.d.ts +3 -0
  86. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +3 -0
  87. package/dist/serialization/types/WarningTierRequestBody.d.ts +10 -0
  88. package/dist/serialization/types/WarningTierResponseData.d.ts +11 -0
  89. package/dist/serialization/types/index.d.ts +6 -0
  90. package/dist/wasm/rulesengine.js +4 -4
  91. package/dist/wasm/rulesengine_bg.wasm.d.ts +1 -0
  92. package/package.json +1 -1
@@ -29,6 +29,7 @@ export interface CreateBillingSubscriptionRequestBody {
29
29
  applicationId?: string;
30
30
  cancelAt?: number;
31
31
  cancelAtPeriodEnd: boolean;
32
+ companyId?: string;
32
33
  currency: string;
33
34
  customerExternalId: string;
34
35
  defaultPaymentMethodExternalId?: string;
@@ -19,8 +19,10 @@ export interface CreateInvoiceRequestBody {
19
19
  currency: string;
20
20
  customerExternalId: string;
21
21
  dueDate?: Date;
22
+ endingBalance?: number;
22
23
  externalId?: string;
23
24
  paymentMethodExternalId?: string;
25
+ startingBalance?: number;
24
26
  status?: Schematic.InvoiceStatus;
25
27
  subscriptionExternalId?: string;
26
28
  subtotal: number;
@@ -196,6 +196,40 @@ export declare class CompaniesClient {
196
196
  */
197
197
  lookupCompany(request: Schematic.LookupCompanyRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.LookupCompanyResponse>;
198
198
  private __lookupCompany;
199
+ /**
200
+ * @param {Schematic.GetCompanyBillingEntityRequest} request
201
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
202
+ *
203
+ * @throws {@link Schematic.BadRequestError}
204
+ * @throws {@link Schematic.UnauthorizedError}
205
+ * @throws {@link Schematic.ForbiddenError}
206
+ * @throws {@link Schematic.NotFoundError}
207
+ * @throws {@link Schematic.InternalServerError}
208
+ *
209
+ * @example
210
+ * await client.companies.getCompanyBillingEntity({
211
+ * companyId: "company_id"
212
+ * })
213
+ */
214
+ getCompanyBillingEntity(request?: Schematic.GetCompanyBillingEntityRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.GetCompanyBillingEntityResponse>;
215
+ private __getCompanyBillingEntity;
216
+ /**
217
+ * @param {Schematic.GetBillingEntityChildSubscriptionsRequest} request
218
+ * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
219
+ *
220
+ * @throws {@link Schematic.BadRequestError}
221
+ * @throws {@link Schematic.UnauthorizedError}
222
+ * @throws {@link Schematic.ForbiddenError}
223
+ * @throws {@link Schematic.NotFoundError}
224
+ * @throws {@link Schematic.InternalServerError}
225
+ *
226
+ * @example
227
+ * await client.companies.getBillingEntityChildSubscriptions({
228
+ * companyId: "company_id"
229
+ * })
230
+ */
231
+ getBillingEntityChildSubscriptions(request?: Schematic.GetBillingEntityChildSubscriptionsRequest, requestOptions?: CompaniesClient.RequestOptions): core.HttpResponsePromise<Schematic.GetBillingEntityChildSubscriptionsResponse>;
232
+ private __getBillingEntityChildSubscriptions;
199
233
  /**
200
234
  * @param {Schematic.ListCompanyMembershipsRequest} request
201
235
  * @param {CompaniesClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * companyId: "company_id"
5
+ * }
6
+ */
7
+ export interface GetBillingEntityChildSubscriptionsRequest {
8
+ companyId?: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * companyId: "company_id"
5
+ * }
6
+ */
7
+ export interface GetCompanyBillingEntityRequest {
8
+ companyId?: string;
9
+ }
@@ -6,6 +6,8 @@ export type { CountUsersRequest } from "./CountUsersRequest";
6
6
  export type { CreateEntityTraitDefinitionRequestBody } from "./CreateEntityTraitDefinitionRequestBody";
7
7
  export type { DeleteCompanyRequest } from "./DeleteCompanyRequest";
8
8
  export type { GetActiveCompanySubscriptionRequest } from "./GetActiveCompanySubscriptionRequest";
9
+ export type { GetBillingEntityChildSubscriptionsRequest } from "./GetBillingEntityChildSubscriptionsRequest";
10
+ export type { GetCompanyBillingEntityRequest } from "./GetCompanyBillingEntityRequest";
9
11
  export type { GetEntityTraitValuesRequest } from "./GetEntityTraitValuesRequest";
10
12
  export type { GetOrCreateCompanyMembershipRequestBody } from "./GetOrCreateCompanyMembershipRequestBody";
11
13
  export type { ListCompaniesRequest } from "./ListCompaniesRequest";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Input parameters
3
+ */
4
+ export interface GetBillingEntityChildSubscriptionsParams {
5
+ companyId?: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface GetBillingEntityChildSubscriptionsResponse {
3
+ data: Schematic.CompanyBillingEntitySubscriptionResponseData[];
4
+ /** Input parameters */
5
+ params: Schematic.GetBillingEntityChildSubscriptionsParams;
6
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Input parameters
3
+ */
4
+ export interface GetCompanyBillingEntityParams {
5
+ companyId?: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type * as Schematic from "../../../index";
2
+ export interface GetCompanyBillingEntityResponse {
3
+ data: Schematic.CompanyBillingEntityResponseData[];
4
+ /** Input parameters */
5
+ params: Schematic.GetCompanyBillingEntityParams;
6
+ }
@@ -18,6 +18,10 @@ export * from "./DeleteUserByKeysResponse";
18
18
  export * from "./DeleteUserResponse";
19
19
  export * from "./GetActiveCompanySubscriptionParams";
20
20
  export * from "./GetActiveCompanySubscriptionResponse";
21
+ export * from "./GetBillingEntityChildSubscriptionsParams";
22
+ export * from "./GetBillingEntityChildSubscriptionsResponse";
23
+ export * from "./GetCompanyBillingEntityParams";
24
+ export * from "./GetCompanyBillingEntityResponse";
21
25
  export * from "./GetCompanyResponse";
22
26
  export * from "./GetEntityTraitDefinitionResponse";
23
27
  export * from "./GetEntityTraitValuesParams";
@@ -43,6 +43,7 @@ export interface CreateBillingLinkedPlanEntitlementRequestBody {
43
43
  valueNumeric?: number;
44
44
  valueTraitId?: string;
45
45
  valueType: Schematic.EntitlementValueType;
46
+ warningTiers?: Schematic.WarningTierRequestBody[];
46
47
  yearlyMeteredPriceId?: string;
47
48
  yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
48
49
  yearlyUnitPrice?: number;
@@ -39,6 +39,7 @@ export interface CreatePlanEntitlementRequestBody {
39
39
  valueNumeric?: number;
40
40
  valueTraitId?: string;
41
41
  valueType: Schematic.EntitlementValueType;
42
+ warningTiers?: Schematic.WarningTierRequestBody[];
42
43
  yearlyMeteredPriceId?: string;
43
44
  yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
44
45
  yearlyUnitPrice?: number;
@@ -34,6 +34,7 @@ export interface UpdatePlanEntitlementRequestBody {
34
34
  valueNumeric?: number;
35
35
  valueTraitId?: string;
36
36
  valueType: Schematic.EntitlementValueType;
37
+ warningTiers?: Schematic.WarningTierRequestBody[];
37
38
  yearlyMeteredPriceId?: string;
38
39
  yearlyPriceTiers?: Schematic.CreatePriceTierRequestBody[];
39
40
  yearlyUnitPrice?: number;
@@ -12,5 +12,4 @@ export interface CreatePlanBundleRequestBody {
12
12
  creditGrants?: Schematic.PlanBundleCreditGrantRequestBody[];
13
13
  entitlements: Schematic.PlanBundleEntitlementRequestBody[];
14
14
  plan?: Schematic.CreatePlanRequestBody;
15
- traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
16
15
  }
@@ -13,5 +13,4 @@ export interface UpdatePlanBundleRequestBody {
13
13
  entitlements: Schematic.PlanBundleEntitlementRequestBody[];
14
14
  plan?: Schematic.UpdatePlanRequestBody;
15
15
  planVersionId?: string;
16
- traits?: Schematic.UpdatePlanTraitTraitRequestBody[];
17
16
  }
@@ -2,6 +2,7 @@ export declare const AccountMemberPermission: {
2
2
  readonly CompaniesEdit: "companies_edit";
3
3
  readonly CompanyUsersEdit: "company_users_edit";
4
4
  readonly ComponentsEdit: "components_edit";
5
+ readonly CustomPlansEdit: "custom_plans_edit";
5
6
  readonly DataExportsEdit: "data_exports_edit";
6
7
  readonly FeaturesEdit: "features_edit";
7
8
  readonly FlagRulesEdit: "flag_rules_edit";
@@ -0,0 +1,6 @@
1
+ export declare const BillingCreditAutoTopupAvailability: {
2
+ readonly Off: "off";
3
+ readonly Automatic: "automatic";
4
+ readonly UserControlled: "user_controlled";
5
+ };
6
+ export type BillingCreditAutoTopupAvailability = (typeof BillingCreditAutoTopupAvailability)[keyof typeof BillingCreditAutoTopupAvailability];
@@ -1,5 +1,7 @@
1
1
  export declare const BillingCreditGrantZeroedOutReason: {
2
+ readonly CustomerArchived: "customer_archived";
2
3
  readonly Expired: "expired";
4
+ readonly IntegrationUninstalled: "integration_uninstalled";
3
5
  readonly Manual: "manual";
4
6
  readonly PlanChange: "plan_change";
5
7
  readonly PlanPeriodReset: "plan_period_reset";
@@ -1,6 +1,8 @@
1
1
  export declare const BillingPlanCreditGrantResetCadence: {
2
2
  readonly Daily: "daily";
3
+ readonly Every6Months: "every_6_months";
3
4
  readonly Monthly: "monthly";
5
+ readonly Quarterly: "quarterly";
4
6
  readonly Weekly: "weekly";
5
7
  readonly Yearly: "yearly";
6
8
  };
@@ -2,13 +2,18 @@ import type * as Schematic from "../index";
2
2
  export interface BillingPlanCreditGrantResponseData {
3
3
  autoTopupAmount?: number;
4
4
  autoTopupAmountType?: string;
5
+ autoTopupAvailability: Schematic.BillingCreditAutoTopupAvailability;
6
+ /** Derived from auto_topup_availability; use that instead. */
5
7
  autoTopupEnabled: boolean;
6
8
  autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
7
9
  autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
8
10
  autoTopupExpiryUnitCount?: number;
11
+ /** Derived from auto_topup_availability; use that instead. */
9
12
  autoTopupSelfService: boolean;
10
13
  autoTopupThresholdCredits?: number;
11
14
  autoTopupThresholdPercent?: number;
15
+ /** Whether buyers can purchase one-time credit bundles on this grant, independent of auto top-up availability. */
16
+ canBuyBundles: boolean;
12
17
  createdAt: Date;
13
18
  credit?: Schematic.BillingCreditResponseData;
14
19
  creditAmount: number;
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface ChangeSubscriptionInternalRequestBody {
3
3
  addOnIds: Schematic.UpdateAddOnRequestBody[];
4
4
  autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[];
5
+ billingEntityId?: string;
5
6
  companyId: string;
6
7
  couponExternalId?: string;
7
8
  creditBundles: Schematic.UpdateCreditBundleRequestBody[];
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface ChangeSubscriptionRequestBody {
3
3
  addOnIds: Schematic.UpdateAddOnRequestBody[];
4
4
  autoTopupOverrides: Schematic.UpdateAutoTopupOverrideRequestBody[];
5
+ billingEntityId?: string;
5
6
  couponExternalId?: string;
6
7
  creditBundles: Schematic.UpdateCreditBundleRequestBody[];
7
8
  customFieldValues: Schematic.CheckoutFieldValue[];
@@ -0,0 +1,5 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyBillingEntityResponseData {
3
+ billingEntity?: Schematic.CompanyResponseData;
4
+ hasOwnStripeCustomer: boolean;
5
+ }
@@ -0,0 +1,21 @@
1
+ import type * as Schematic from "../index";
2
+ export interface CompanyBillingEntitySubscriptionResponseData {
3
+ cancelAt?: Date;
4
+ cancelAtPeriodEnd: boolean;
5
+ company?: Schematic.CompanyResponseData;
6
+ currency: string;
7
+ customerExternalId: string;
8
+ discounts: Schematic.BillingSubscriptionDiscountView[];
9
+ expiredAt?: Date;
10
+ interval: string;
11
+ isInitial: boolean;
12
+ latestInvoice?: Schematic.InvoiceResponseData;
13
+ paymentMethod?: Schematic.PaymentMethodResponseData;
14
+ planName: string;
15
+ products: Schematic.BillingProductForSubscriptionResponseData[];
16
+ providerType: Schematic.BillingProviderType;
17
+ status: string;
18
+ subscriptionExternalId: string;
19
+ totalPrice: number;
20
+ trialEnd?: Date;
21
+ }
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface CompanyPlanCreditGrantView {
3
3
  billingCreditAutoTopupAmount?: number;
4
4
  billingCreditAutoTopupAmountType?: string;
5
+ billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
5
6
  billingCreditAutoTopupEnabled: boolean;
6
7
  billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType;
7
8
  billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -9,6 +10,7 @@ export interface CompanyPlanCreditGrantView {
9
10
  billingCreditAutoTopupSelfService: boolean;
10
11
  billingCreditAutoTopupThresholdCredits?: number;
11
12
  billingCreditAutoTopupThresholdPercent?: number;
13
+ billingCreditCanBuyBundles: boolean;
12
14
  companyAutoTopupAmount?: number;
13
15
  companyAutoTopupEnabled?: boolean;
14
16
  companyAutoTopupThresholdCredits?: number;
@@ -10,11 +10,13 @@ export interface CompanyPlanDetailResponseData {
10
10
  companyCanTrial: boolean;
11
11
  companyCount: number;
12
12
  companyId?: string;
13
+ companyLogoUrl?: string;
13
14
  companyName?: string;
14
15
  compatiblePlanIds: string[];
15
16
  controlledBy: Schematic.BillingProviderType;
16
17
  copiedFromPlanId?: string;
17
18
  createdAt: Date;
19
+ credits: Schematic.BillingCreditResponseData[];
18
20
  currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
19
21
  current: boolean;
20
22
  custom: boolean;
@@ -3,6 +3,7 @@ export interface CreateBillingPlanCreditGrantRequestBody {
3
3
  applyToExisting?: boolean;
4
4
  autoTopupAmount?: number;
5
5
  autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
6
+ autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
6
7
  autoTopupEnabled?: boolean;
7
8
  autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
8
9
  autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -10,6 +11,7 @@ export interface CreateBillingPlanCreditGrantRequestBody {
10
11
  autoTopupSelfService?: boolean;
11
12
  autoTopupThresholdCredits?: number;
12
13
  autoTopupThresholdPercent?: number;
14
+ canBuyBundles?: boolean;
13
15
  creditAmount: number;
14
16
  creditId: string;
15
17
  expiryType?: Schematic.BillingCreditExpiryType;
@@ -1,2 +1,2 @@
1
1
  import type * as Schematic from "../index";
2
- export type EventBody = Schematic.EventBodyTrack | Schematic.EventBodyFlagCheck | Schematic.EventBodyIdentify;
2
+ export type EventBody = Schematic.EventBodyTrack | Schematic.EventBodyFlagCheck | Schematic.EventBodyIdentify | Schematic.EventBodyInference;
@@ -0,0 +1,30 @@
1
+ export interface EventBodyInference {
2
+ /** Number of input tokens served from cache */
3
+ cachedInputTokens?: number;
4
+ /** Key-value pairs to identify the company associated with the inference event */
5
+ company: Record<string, string>;
6
+ /** Provided cost of the inference request as a decimal string; derived from model pricing when omitted */
7
+ cost?: string;
8
+ /** ISO 4217 currency code for the provided cost; defaults to 'usd' */
9
+ currency?: string;
10
+ /** Optional track event name to fan out for usage-based billing */
11
+ event?: string;
12
+ /** Number of input tokens for the inference request */
13
+ inputTokens: number;
14
+ /** The inference operation; defaults to 'chat' */
15
+ operation?: string;
16
+ /** Number of output tokens for the inference request */
17
+ outputTokens: number;
18
+ /** The inference provider (e.g. 'anthropic', 'openai') */
19
+ provider: string;
20
+ /** Number of reasoning tokens for the inference request */
21
+ reasoningTokens?: number;
22
+ /** The model requested for the inference request */
23
+ requestModel?: string;
24
+ /** Number of requests represented by this event; defaults to 1 */
25
+ requests?: number;
26
+ /** The model that served the inference response */
27
+ responseModel: string;
28
+ /** Key-value pairs to identify the user associated with the inference event */
29
+ user?: Record<string, string>;
30
+ }
@@ -1,6 +1,7 @@
1
1
  export declare const EventType: {
2
2
  readonly FlagCheck: "flag_check";
3
3
  readonly Identify: "identify";
4
+ readonly Inference: "inference";
4
5
  readonly Track: "track";
5
6
  };
6
7
  export type EventType = (typeof EventType)[keyof typeof EventType];
@@ -5,6 +5,7 @@ export interface IntegrationsListResponseData {
5
5
  id: string;
6
6
  isAppInstall: boolean;
7
7
  isConnectInstall: boolean;
8
+ lastWebhookReceivedAt?: Date;
8
9
  state: Schematic.IntegrationState;
9
10
  type: Schematic.IntegrationType;
10
11
  }
@@ -7,7 +7,9 @@ export interface InvoiceRequestBody {
7
7
  currency: string;
8
8
  customerExternalId: string;
9
9
  dueDate?: Date;
10
+ endingBalance?: number;
10
11
  paymentMethodExternalId?: string;
12
+ startingBalance?: number;
11
13
  status?: Schematic.InvoiceStatus;
12
14
  subscriptionExternalId?: string;
13
15
  subtotal: number;
@@ -9,11 +9,13 @@ export interface InvoiceResponseData {
9
9
  currency: string;
10
10
  customerExternalId: string;
11
11
  dueDate?: Date;
12
+ endingBalance: number;
12
13
  environmentId: string;
13
14
  externalId?: string;
14
15
  id: string;
15
16
  paymentMethodExternalId?: string;
16
17
  providerType: Schematic.BillingProviderType;
18
+ startingBalance: number;
17
19
  status?: Schematic.InvoiceStatus;
18
20
  subscriptionExternalId?: string;
19
21
  subtotal: number;
@@ -4,6 +4,8 @@ export interface ManagePlanRequest {
4
4
  basePlanId?: string;
5
5
  basePlanPriceId?: string;
6
6
  basePlanVersionId?: string;
7
+ /** The company that pays for this subscription. Must already have a Stripe customer. Only honored when starting a new subscription. */
8
+ billingEntityId?: string;
7
9
  /** If false, subscription cancels at period end. Only applies when removing all plans. Defaults to true. */
8
10
  cancelImmediately?: boolean;
9
11
  companyId: string;
@@ -1 +1,4 @@
1
- export type MetronomeIntegrationConfig = {};
1
+ export interface MetronomeIntegrationConfig {
2
+ /** Schematic company key used to store the Metronome customer's ingest alias; when unset, imported customers carry only metronome_customer_id */
3
+ externalCustomerIdKey?: string;
4
+ }
@@ -4,5 +4,4 @@ export interface PlanBundleResponseData {
4
4
  creditGrants?: Schematic.BillingPlanCreditGrantResponseData[];
5
5
  entitlements?: Schematic.PlanEntitlementResponseData[];
6
6
  plan?: Schematic.PlanResponseData;
7
- traits?: Schematic.PlanTraitResponseData[];
8
7
  }
@@ -2,6 +2,7 @@ import type * as Schematic from "../index";
2
2
  export interface PlanCreditGrantView {
3
3
  billingCreditAutoTopupAmount?: number;
4
4
  billingCreditAutoTopupAmountType?: string;
5
+ billingCreditAutoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
5
6
  billingCreditAutoTopupEnabled: boolean;
6
7
  billingCreditAutoTopupExpiryType?: Schematic.BillingCreditExpiryType;
7
8
  billingCreditAutoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -9,6 +10,7 @@ export interface PlanCreditGrantView {
9
10
  billingCreditAutoTopupSelfService: boolean;
10
11
  billingCreditAutoTopupThresholdCredits?: number;
11
12
  billingCreditAutoTopupThresholdPercent?: number;
13
+ billingCreditCanBuyBundles: boolean;
12
14
  createdAt: Date;
13
15
  credit?: Schematic.BillingCreditView;
14
16
  creditAmount: number;
@@ -8,10 +8,12 @@ export interface PlanDetailResponseData {
8
8
  chargeType: Schematic.ChargeType;
9
9
  companyCount: number;
10
10
  companyId?: string;
11
+ companyLogoUrl?: string;
11
12
  companyName?: string;
12
13
  controlledBy: Schematic.BillingProviderType;
13
14
  copiedFromPlanId?: string;
14
15
  createdAt: Date;
16
+ credits: Schematic.BillingCreditResponseData[];
15
17
  currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
16
18
  description: string;
17
19
  draftVersion?: Schematic.PlanVersionResponseData;
@@ -30,4 +30,5 @@ export interface PlanEntitlementResponseData {
30
30
  valueTrait?: Schematic.EntityTraitDefinitionResponseData;
31
31
  valueTraitId?: string;
32
32
  valueType: Schematic.EntitlementValueType;
33
+ warningTiers: Schematic.WarningTierResponseData[];
33
34
  }
@@ -9,11 +9,13 @@ export interface PlanGroupPlanDetailResponseData {
9
9
  chargeType: Schematic.ChargeType;
10
10
  companyCount: number;
11
11
  companyId?: string;
12
+ companyLogoUrl?: string;
12
13
  companyName?: string;
13
14
  compatiblePlanIds: string[];
14
15
  controlledBy: Schematic.BillingProviderType;
15
16
  copiedFromPlanId?: string;
16
17
  createdAt: Date;
18
+ credits: Schematic.BillingCreditResponseData[];
17
19
  currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
18
20
  customPlanConfig?: Schematic.CustomPlanViewConfigResponseData;
19
21
  description: string;
@@ -9,11 +9,13 @@ export interface PlanViewPublicResponseData {
9
9
  chargeType: Schematic.ChargeType;
10
10
  companyCount: number;
11
11
  companyId?: string;
12
+ companyLogoUrl?: string;
12
13
  companyName?: string;
13
14
  compatiblePlanIds: string[];
14
15
  controlledBy: Schematic.BillingProviderType;
15
16
  copiedFromPlanId?: string;
16
17
  createdAt: Date;
18
+ credits: Schematic.BillingCreditResponseData[];
17
19
  currencyPrices: Schematic.PlanCurrencyPricesResponseData[];
18
20
  custom: boolean;
19
21
  customPlanConfig?: Schematic.CustomPlanConfig;
@@ -3,6 +3,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
3
3
  applyToExisting?: boolean;
4
4
  autoTopupAmount?: number;
5
5
  autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
6
+ autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
6
7
  autoTopupEnabled?: boolean;
7
8
  autoTopupExpiryType?: Schematic.BillingCreditExpiryType;
8
9
  autoTopupExpiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -10,6 +11,7 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
10
11
  autoTopupSelfService?: boolean;
11
12
  autoTopupThresholdCredits?: number;
12
13
  autoTopupThresholdPercent?: number;
14
+ canBuyBundles?: boolean;
13
15
  creditAmount?: number;
14
16
  expiryType?: Schematic.BillingCreditExpiryType;
15
17
  expiryUnit?: Schematic.BillingCreditExpiryUnit;
@@ -0,0 +1,4 @@
1
+ export interface WarningTierRequestBody {
2
+ key: string;
3
+ value: number;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface WarningTierResponseData {
2
+ id: string;
3
+ key: string;
4
+ value: number;
5
+ }
@@ -12,6 +12,7 @@ export * from "./ApiKeyScope";
12
12
  export * from "./AuditLogListResponseData";
13
13
  export * from "./AuditLogResponseData";
14
14
  export * from "./BillingCouponResponseData";
15
+ export * from "./BillingCreditAutoTopupAvailability";
15
16
  export * from "./BillingCreditBundleResponseData";
16
17
  export * from "./BillingCreditBundleStatus";
17
18
  export * from "./BillingCreditBundleType";
@@ -73,6 +74,8 @@ export * from "./CheckoutFieldWithValue";
73
74
  export * from "./CheckoutSettingsResponseData";
74
75
  export * from "./CheckoutSubscription";
75
76
  export * from "./ClerkIntegrationConfig";
77
+ export * from "./CompanyBillingEntityResponseData";
78
+ export * from "./CompanyBillingEntitySubscriptionResponseData";
76
79
  export * from "./CompanyCreditBalance";
77
80
  export * from "./CompanyCreditBalanceResponseData";
78
81
  export * from "./CompanyDetailResponseData";
@@ -187,6 +190,7 @@ export * from "./EventBody";
187
190
  export * from "./EventBodyFlagCheck";
188
191
  export * from "./EventBodyIdentify";
189
192
  export * from "./EventBodyIdentifyCompany";
193
+ export * from "./EventBodyInference";
190
194
  export * from "./EventBodyTrack";
191
195
  export * from "./EventDetailResponseData";
192
196
  export * from "./EventResponseData";
@@ -367,6 +371,8 @@ export * from "./UsageBasedEntitlementResponseData";
367
371
  export * from "./UsageTimeSeriesPointResponseData";
368
372
  export * from "./UserDetailResponseData";
369
373
  export * from "./UserResponseData";
374
+ export * from "./WarningTierRequestBody";
375
+ export * from "./WarningTierResponseData";
370
376
  export * from "./WebFeatureUsageWebhookOutput";
371
377
  export * from "./WebhookEventDetailResponseData";
372
378
  export * from "./WebhookEventResponseData";