@schematichq/schematic-typescript-node 1.5.12 → 1.6.0

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 (106) hide show
  1. package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  2. package/dist/api/resources/credits/client/Client.d.ts +41 -5
  3. package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -0
  4. package/dist/api/resources/credits/client/requests/ReserveCreditsRequestBody.d.ts +18 -0
  5. package/dist/api/resources/credits/client/requests/index.d.ts +1 -0
  6. package/dist/api/resources/credits/types/ReleaseCreditReservationResponse.d.ts +6 -0
  7. package/dist/api/resources/credits/types/ReserveCreditsResponse.d.ts +6 -0
  8. package/dist/api/resources/credits/types/index.d.ts +2 -0
  9. package/dist/api/resources/features/client/Client.d.ts +18 -0
  10. package/dist/api/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +15 -0
  11. package/dist/api/resources/features/client/requests/index.d.ts +1 -0
  12. package/dist/api/resources/features/types/CheckAndReserveFlagResponse.d.ts +6 -0
  13. package/dist/api/resources/features/types/index.d.ts +1 -0
  14. package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  15. package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  16. package/dist/api/resources/plans/client/Client.d.ts +2 -0
  17. package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +3 -0
  18. package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +3 -0
  19. package/dist/api/resources/plans/types/CountPlansParams.d.ts +2 -0
  20. package/dist/api/resources/plans/types/ListPlansParams.d.ts +2 -0
  21. package/dist/api/types/BillingArrearsAnchor.d.ts +5 -0
  22. package/dist/api/types/BillingArrearsCadence.d.ts +5 -0
  23. package/dist/api/types/BillingCreditGrantResponseData.d.ts +7 -0
  24. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +12 -0
  25. package/dist/api/types/CheckAndReserveFlagResponseData.d.ts +35 -0
  26. package/dist/api/types/CheckoutDataResponseData.d.ts +2 -0
  27. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +6 -0
  28. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +12 -0
  29. package/dist/api/types/CreditCompanyGrantView.d.ts +7 -0
  30. package/dist/api/types/CreditReservationResponseData.d.ts +15 -0
  31. package/dist/api/types/CreditUsageReason.d.ts +2 -0
  32. package/dist/api/types/EventBodyTrack.d.ts +2 -0
  33. package/dist/api/types/EventDetailResponseData.d.ts +1 -0
  34. package/dist/api/types/EventResponseData.d.ts +1 -0
  35. package/dist/api/types/FlagCheckReservationResponseData.d.ts +15 -0
  36. package/dist/api/types/GetOnboardingStateResp.d.ts +2 -0
  37. package/dist/api/types/IssueTemporaryAccessTokenResponseData.d.ts +2 -1
  38. package/dist/api/types/OnboardingRequirement.d.ts +1 -0
  39. package/dist/api/types/OnboardingRoadmapView.d.ts +4 -0
  40. package/dist/api/types/PlanCreditGrantView.d.ts +6 -0
  41. package/dist/api/types/PlanGroupDetailResponseData.d.ts +1 -0
  42. package/dist/api/types/PlanGroupResponseData.d.ts +1 -0
  43. package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
  44. package/dist/api/types/RulesengineCompany.d.ts +1 -0
  45. package/dist/api/types/RulesengineCreditPostpaidConfig.d.ts +3 -0
  46. package/dist/api/types/SlackConnectInviteStatus.d.ts +8 -0
  47. package/dist/api/types/SlackConnectInviteView.d.ts +7 -0
  48. package/dist/api/types/TemporaryAccessTokenIssuerType.d.ts +5 -0
  49. package/dist/api/types/TemporaryAccessTokenResponseData.d.ts +2 -1
  50. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +12 -0
  51. package/dist/api/types/WebhookEventDetailResponseData.d.ts +1 -0
  52. package/dist/api/types/WebhookEventResponseData.d.ts +1 -0
  53. package/dist/api/types/index.d.ts +10 -1
  54. package/dist/index.js +9 -9
  55. package/dist/serialization/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +1 -0
  56. package/dist/serialization/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -0
  57. package/dist/serialization/resources/credits/client/requests/ReserveCreditsRequestBody.d.ts +13 -0
  58. package/dist/serialization/resources/credits/client/requests/index.d.ts +1 -0
  59. package/dist/serialization/resources/credits/types/ReleaseCreditReservationResponse.d.ts +11 -0
  60. package/dist/serialization/resources/credits/types/ReserveCreditsResponse.d.ts +11 -0
  61. package/dist/serialization/resources/credits/types/index.d.ts +2 -0
  62. package/dist/serialization/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +14 -0
  63. package/dist/serialization/resources/features/client/requests/index.d.ts +1 -0
  64. package/dist/serialization/resources/features/types/CheckAndReserveFlagResponse.d.ts +11 -0
  65. package/dist/serialization/resources/features/types/index.d.ts +1 -0
  66. package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +1 -0
  67. package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +1 -0
  68. package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
  69. package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
  70. package/dist/serialization/types/BillingArrearsAnchor.d.ts +7 -0
  71. package/dist/serialization/types/BillingArrearsCadence.d.ts +7 -0
  72. package/dist/serialization/types/BillingCreditGrantResponseData.d.ts +4 -0
  73. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +8 -0
  74. package/dist/serialization/types/CheckAndReserveFlagResponseData.d.ts +28 -0
  75. package/dist/serialization/types/CheckoutDataResponseData.d.ts +2 -0
  76. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +8 -0
  77. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +8 -0
  78. package/dist/serialization/types/CreditCompanyGrantView.d.ts +8 -0
  79. package/dist/serialization/types/CreditReservationResponseData.d.ts +17 -0
  80. package/dist/serialization/types/CreditUsageReason.d.ts +1 -1
  81. package/dist/serialization/types/EventBodyTrack.d.ts +1 -0
  82. package/dist/serialization/types/EventDetailResponseData.d.ts +1 -0
  83. package/dist/serialization/types/EventResponseData.d.ts +1 -0
  84. package/dist/serialization/types/FlagCheckReservationResponseData.d.ts +16 -0
  85. package/dist/serialization/types/GetOnboardingStateResp.d.ts +4 -0
  86. package/dist/serialization/types/IssueTemporaryAccessTokenResponseData.d.ts +3 -1
  87. package/dist/serialization/types/OnboardingRequirement.d.ts +1 -1
  88. package/dist/serialization/types/OnboardingRoadmapView.d.ts +10 -0
  89. package/dist/serialization/types/PlanCreditGrantView.d.ts +8 -0
  90. package/dist/serialization/types/PlanGroupDetailResponseData.d.ts +1 -0
  91. package/dist/serialization/types/PlanGroupResponseData.d.ts +1 -0
  92. package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
  93. package/dist/serialization/types/RulesengineCompany.d.ts +2 -0
  94. package/dist/serialization/types/RulesengineCreditPostpaidConfig.d.ts +9 -0
  95. package/dist/serialization/types/SlackConnectInviteStatus.d.ts +7 -0
  96. package/dist/serialization/types/SlackConnectInviteView.d.ts +13 -0
  97. package/dist/serialization/types/TemporaryAccessTokenIssuerType.d.ts +7 -0
  98. package/dist/serialization/types/TemporaryAccessTokenResponseData.d.ts +3 -1
  99. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +8 -0
  100. package/dist/serialization/types/WebhookEventDetailResponseData.d.ts +1 -0
  101. package/dist/serialization/types/WebhookEventResponseData.d.ts +1 -0
  102. package/dist/serialization/types/index.d.ts +10 -1
  103. package/dist/wasm/rulesengine.js +1 -1
  104. package/package.json +5 -4
  105. package/dist/api/types/ReleaseCreditLeaseRequestBody.d.ts +0 -1
  106. package/dist/serialization/types/ReleaseCreditLeaseRequestBody.d.ts +0 -7
@@ -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 Vc8Eb8Df4: "vc8eb8df4";
3
+ readonly V94B8F7A7: "v94b8f7a7";
4
4
  readonly PlaceholderForFernCompatibility: "placeholder-for-fern-compatibility";
5
5
  };
6
6
  export type RulesEngineSchemaVersion = (typeof RulesEngineSchemaVersion)[keyof typeof RulesEngineSchemaVersion];
@@ -4,6 +4,7 @@ export interface RulesengineCompany {
4
4
  basePlanId?: string;
5
5
  billingProductIds: string[];
6
6
  creditBalances: Record<string, number>;
7
+ creditPostpaid?: Record<string, Schematic.RulesengineCreditPostpaidConfig>;
7
8
  entitlements?: Schematic.RulesengineFeatureEntitlement[];
8
9
  environmentId: string;
9
10
  id: string;
@@ -0,0 +1,3 @@
1
+ export interface RulesengineCreditPostpaidConfig {
2
+ overdraftLimit?: number;
3
+ }
@@ -0,0 +1,8 @@
1
+ export declare const SlackConnectInviteStatus: {
2
+ readonly Accepted: "accepted";
3
+ readonly Declined: "declined";
4
+ readonly Dismissed: "dismissed";
5
+ readonly Expired: "expired";
6
+ readonly Pending: "pending";
7
+ };
8
+ export type SlackConnectInviteStatus = (typeof SlackConnectInviteStatus)[keyof typeof SlackConnectInviteStatus];
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../index";
2
+ export interface SlackConnectInviteView {
3
+ canResendAt?: Date;
4
+ email: string;
5
+ sentAt: Date;
6
+ status: Schematic.SlackConnectInviteStatus;
7
+ }
@@ -0,0 +1,5 @@
1
+ export declare const TemporaryAccessTokenIssuerType: {
2
+ readonly ApiKey: "api_key";
3
+ readonly PricingRoadmap: "pricing_roadmap";
4
+ };
5
+ export type TemporaryAccessTokenIssuerType = (typeof TemporaryAccessTokenIssuerType)[keyof typeof TemporaryAccessTokenIssuerType];
@@ -1,10 +1,11 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface TemporaryAccessTokenResponseData {
3
- apiKeyId: string;
3
+ apiKeyId?: string;
4
4
  createdAt: Date;
5
5
  environmentId: string;
6
6
  expiredAt: Date;
7
7
  id: string;
8
+ issuerType: Schematic.TemporaryAccessTokenIssuerType;
8
9
  resourceType: Schematic.TemporaryAccessTokenResourceType;
9
10
  updatedAt: Date;
10
11
  }
@@ -1,6 +1,10 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface UpdateBillingPlanCreditGrantRequestBody {
3
3
  applyToExisting?: boolean;
4
+ /** Which boundary closes a monthly arrears window: the subscription's own recurrence (billing_period_start) or the calendar month (month_end). Only applies when arrears_cadence is monthly; defaults to billing_period_start. Send null to fall back to the default. */
5
+ arrearsAnchor?: Schematic.BillingArrearsAnchor;
6
+ /** How often postpaid charges are closed and invoiced: end_of_billing_period (the default) or monthly. Send null to fall back to the default. */
7
+ arrearsCadence?: Schematic.BillingArrearsCadence;
4
8
  autoTopupAmount?: number;
5
9
  autoTopupAmountType?: Schematic.CreditAutoTopupAmountType;
6
10
  autoTopupAvailability?: Schematic.BillingCreditAutoTopupAvailability;
@@ -21,6 +25,14 @@ export interface UpdateBillingPlanCreditGrantRequestBody {
21
25
  expiryUnitCount?: number;
22
26
  /** The license whose quantity scales this grant. Cleared when the grant moves off per-license scaling. */
23
27
  licenseId?: string;
28
+ /** Optional limit on how far the balance may go below zero, in credits. It is a floor on the balance rather than an allowance per invoice window: the balance may run down to minus this figure, and beyond it the flag check denies the same way an exhausted balance does with postpaid off. Nothing resets when an invoice window rolls, so a company that reaches the limit stays denied until a new grant lands or the negative balance is settled. Send null to remove the limit. */
29
+ overdraftLimit?: number;
30
+ /** Whether consumption may continue past a zero balance. When false (the default) the flag check denies once the balance is exhausted, which is the existing behavior. When true, consumption continues and accrues at postpaid_rate_per_unit, settled on arrears_cadence. Intended for invoice-billed customers on net terms, who have no card for auto top-up to charge. */
31
+ postpaidEnabled?: boolean;
32
+ /** Amount charged per credit consumed past a zero balance, in the currency's minor unit. Send null to clear it, in which case an enabled grant falls back to the credit's own cost basis (price_per_unit). */
33
+ postpaidRatePerUnit?: number;
34
+ /** Decimal string form of postpaid_rate_per_unit, for rates finer than one minor unit (for example 0.0002). Takes precedence over postpaid_rate_per_unit when both are set, matching how the credit's own price_per_unit_decimal behaves. Send null to clear it. */
35
+ postpaidRatePerUnitDecimal?: string;
24
36
  resetCadence: Schematic.BillingPlanCreditGrantResetCadence;
25
37
  resetStart: Schematic.BillingPlanCreditGrantResetStart;
26
38
  resetType?: Schematic.BillingPlanCreditGrantResetType;
@@ -1,5 +1,6 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface WebhookEventDetailResponseData {
3
+ attemptCount: number;
3
4
  createdAt: Date;
4
5
  id: string;
5
6
  payload?: string;
@@ -1,5 +1,6 @@
1
1
  import type * as Schematic from "../index";
2
2
  export interface WebhookEventResponseData {
3
+ attemptCount: number;
3
4
  createdAt: Date;
4
5
  id: string;
5
6
  payload?: string;
@@ -12,6 +12,8 @@ export * from "./ApiKeyScope";
12
12
  export * from "./AuditLogExportMetadata";
13
13
  export * from "./AuditLogListResponseData";
14
14
  export * from "./AuditLogResponseData";
15
+ export * from "./BillingArrearsAnchor";
16
+ export * from "./BillingArrearsCadence";
15
17
  export * from "./BillingCollectionMethod";
16
18
  export * from "./BillingCouponResponseData";
17
19
  export * from "./BillingCreditAutoTopupAvailability";
@@ -77,6 +79,7 @@ export * from "./CatalogResponseData";
77
79
  export * from "./ChangeSubscriptionInternalRequestBody";
78
80
  export * from "./ChangeSubscriptionRequestBody";
79
81
  export * from "./ChargeType";
82
+ export * from "./CheckAndReserveFlagResponseData";
80
83
  export * from "./CheckFlagRequestBody";
81
84
  export * from "./CheckFlagResponseData";
82
85
  export * from "./CheckFlagsBulkResponseData";
@@ -167,6 +170,7 @@ export * from "./CreditGrantDetail";
167
170
  export * from "./CreditGrantExpiryRequestBody";
168
171
  export * from "./CreditGrantSortOrder";
169
172
  export * from "./CreditLeaseResponseData";
173
+ export * from "./CreditReservationResponseData";
170
174
  export * from "./CreditSpendPolicyResponseData";
171
175
  export * from "./CreditSpendPolicyScope";
172
176
  export * from "./CreditsAutoTopupCompanySummary";
@@ -249,6 +253,7 @@ export * from "./FeatureUsageLegacyResponseData";
249
253
  export * from "./FeatureUsageResponseData";
250
254
  export * from "./FeatureUsageTimeSeriesResponseData";
251
255
  export * from "./FeatureView";
256
+ export * from "./FlagCheckReservationResponseData";
252
257
  export * from "./FlagDetailResponseData";
253
258
  export * from "./FlagInPlanResponseData";
254
259
  export * from "./FlagResponseData";
@@ -293,6 +298,7 @@ export * from "./OnboardingPath";
293
298
  export * from "./OnboardingRequirement";
294
299
  export * from "./OnboardingRequirementStatus";
295
300
  export * from "./OnboardingRequirementView";
301
+ export * from "./OnboardingRoadmapView";
296
302
  export * from "./OnboardingStripeImport";
297
303
  export * from "./OnboardingTrack";
298
304
  export * from "./OrbIntegrationConfig";
@@ -357,7 +363,6 @@ export * from "./PublicPlansResponseData";
357
363
  export * from "./QuickstartResp";
358
364
  export * from "./RawEventBatchResponseData";
359
365
  export * from "./RawEventResponseData";
360
- export * from "./ReleaseCreditLeaseRequestBody";
361
366
  export * from "./Rule";
362
367
  export * from "./RuleConditionDetailResponseData";
363
368
  export * from "./RuleConditionGroupDetailResponseData";
@@ -374,6 +379,7 @@ export * from "./RulesengineCompanyMetric";
374
379
  export * from "./RulesengineCondition";
375
380
  export * from "./RulesengineConditionGroup";
376
381
  export * from "./RulesengineConditionType";
382
+ export * from "./RulesengineCreditPostpaidConfig";
377
383
  export * from "./RulesengineEntitlementValueType";
378
384
  export * from "./RulesengineEntityType";
379
385
  export * from "./RulesengineFeatureEntitlement";
@@ -397,6 +403,8 @@ export * from "./ScheduledDowngradeResponseData";
397
403
  export * from "./SegmentStatusResp";
398
404
  export * from "./SkippedEntitlementErrorResponseData";
399
405
  export * from "./SkippedEntitlementResponseData";
406
+ export * from "./SlackConnectInviteStatus";
407
+ export * from "./SlackConnectInviteView";
400
408
  export * from "./SortDirection";
401
409
  export * from "./StripeEmbedInfo";
402
410
  export * from "./StripeIntegrationConfig";
@@ -409,6 +417,7 @@ export * from "./SubscriptionTraitUpdate";
409
417
  export * from "./SubscriptionType";
410
418
  export * from "./TaxIdInput";
411
419
  export * from "./TaxIdType";
420
+ export * from "./TemporaryAccessTokenIssuerType";
412
421
  export * from "./TemporaryAccessTokenResourceType";
413
422
  export * from "./TemporaryAccessTokenResponseData";
414
423
  export * from "./TestWebhookResponseData";