@schematichq/schematic-typescript-node 1.6.1 → 1.6.3

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 (82) hide show
  1. package/README.md +2 -0
  2. package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +1 -0
  3. package/dist/api/resources/credits/client/requests/AcquireCreditLeaseRequestBody.d.ts +1 -0
  4. package/dist/api/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +3 -0
  5. package/dist/api/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +5 -1
  6. package/dist/api/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +5 -1
  7. package/dist/api/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +5 -1
  8. package/dist/api/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +4 -2
  9. package/dist/api/types/BillingArrearsCadence.d.ts +1 -0
  10. package/dist/api/types/BillingCreditGrantReason.d.ts +3 -0
  11. package/dist/api/types/BillingCreditResponseData.d.ts +1 -0
  12. package/dist/api/types/BillingPlanCreditGrantBillingMode.d.ts +5 -0
  13. package/dist/api/types/BillingPlanCreditGrantPriceTierResponseData.d.ts +10 -0
  14. package/dist/api/types/BillingPlanCreditGrantResponseData.d.ts +12 -0
  15. package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +2 -0
  16. package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +2 -0
  17. package/dist/api/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +1 -0
  18. package/dist/api/types/CompanyPlanCreditGrantView.d.ts +3 -0
  19. package/dist/api/types/CreateBillingPlanCreditGrantRequestBody.d.ts +11 -1
  20. package/dist/api/types/CreateEntitlementInBundleRequestBody.d.ts +5 -1
  21. package/dist/api/types/CreditEventLedgerResponseData.d.ts +2 -0
  22. package/dist/api/types/CreditGrantPriceTierRequestBody.d.ts +8 -0
  23. package/dist/api/types/CreditTransferReason.d.ts +7 -0
  24. package/dist/api/types/InvoiceRequestBody.d.ts +1 -0
  25. package/dist/api/types/InvoiceResponseData.d.ts +2 -0
  26. package/dist/api/types/ManagePlanRequest.d.ts +2 -0
  27. package/dist/api/types/PlanCreditGrantView.d.ts +3 -0
  28. package/dist/api/types/PlanEntitlementResponseData.d.ts +5 -1
  29. package/dist/api/types/PreviewSubscriptionFinanceResponseData.d.ts +2 -0
  30. package/dist/api/types/RulesengineComparableOperator.d.ts +11 -0
  31. package/dist/api/types/RulesengineCondition.d.ts +1 -1
  32. package/dist/api/types/UpcomingInvoiceResponseData.d.ts +2 -0
  33. package/dist/api/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +11 -1
  34. package/dist/api/types/UsageBasedEntitlementRequestBody.d.ts +5 -1
  35. package/dist/api/types/UsageBasedEntitlementResponseData.d.ts +1 -1
  36. package/dist/api/types/index.d.ts +5 -0
  37. package/dist/cache/redis.d.ts +11 -0
  38. package/dist/credits/check.d.ts +10 -5
  39. package/dist/credits/index.d.ts +3 -3
  40. package/dist/credits/lease-manager.d.ts +74 -2
  41. package/dist/credits/lease-store.d.ts +27 -11
  42. package/dist/credits/redis-lease-store.d.ts +2 -2
  43. package/dist/credits/types.d.ts +1 -0
  44. package/dist/index.js +12 -10
  45. package/dist/serialization/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +1 -0
  46. package/dist/serialization/resources/credits/client/requests/ExtendCreditLeaseRequestBody.d.ts +1 -0
  47. package/dist/serialization/resources/entitlements/client/requests/CreateBillingLinkedPlanEntitlementRequestBody.d.ts +4 -0
  48. package/dist/serialization/resources/entitlements/client/requests/CreatePlanEntitlementRequestBody.d.ts +4 -0
  49. package/dist/serialization/resources/entitlements/client/requests/UpdatePlanEntitlementRequestBody.d.ts +4 -0
  50. package/dist/serialization/resources/features/client/requests/CheckAndReserveFlagRequestBody.d.ts +1 -0
  51. package/dist/serialization/types/BillingArrearsCadence.d.ts +1 -1
  52. package/dist/serialization/types/BillingCreditGrantReason.d.ts +1 -1
  53. package/dist/serialization/types/BillingCreditResponseData.d.ts +2 -0
  54. package/dist/serialization/types/BillingPlanCreditGrantBillingMode.d.ts +7 -0
  55. package/dist/serialization/types/BillingPlanCreditGrantPriceTierResponseData.d.ts +12 -0
  56. package/dist/serialization/types/BillingPlanCreditGrantResponseData.d.ts +10 -0
  57. package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
  58. package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
  59. package/dist/serialization/types/CompanyFeatureUsageExportMetadataVisibleColumnsItem.d.ts +1 -1
  60. package/dist/serialization/types/CompanyPlanCreditGrantView.d.ts +5 -0
  61. package/dist/serialization/types/CreateBillingPlanCreditGrantRequestBody.d.ts +8 -0
  62. package/dist/serialization/types/CreateEntitlementInBundleRequestBody.d.ts +4 -0
  63. package/dist/serialization/types/CreditEventLedgerResponseData.d.ts +3 -0
  64. package/dist/serialization/types/CreditGrantPriceTierRequestBody.d.ts +11 -0
  65. package/dist/serialization/types/CreditTransferReason.d.ts +7 -0
  66. package/dist/serialization/types/InvoiceRequestBody.d.ts +1 -0
  67. package/dist/serialization/types/InvoiceResponseData.d.ts +1 -0
  68. package/dist/serialization/types/ManagePlanRequest.d.ts +1 -0
  69. package/dist/serialization/types/PlanCreditGrantView.d.ts +5 -0
  70. package/dist/serialization/types/PlanEntitlementResponseData.d.ts +4 -0
  71. package/dist/serialization/types/PreviewSubscriptionFinanceResponseData.d.ts +1 -0
  72. package/dist/serialization/types/RulesengineComparableOperator.d.ts +7 -0
  73. package/dist/serialization/types/RulesengineCondition.d.ts +2 -2
  74. package/dist/serialization/types/UpcomingInvoiceResponseData.d.ts +1 -0
  75. package/dist/serialization/types/UpdateBillingPlanCreditGrantRequestBody.d.ts +8 -0
  76. package/dist/serialization/types/UsageBasedEntitlementRequestBody.d.ts +4 -0
  77. package/dist/serialization/types/index.d.ts +5 -0
  78. package/dist/wasm/rulesengine.d.ts +1 -0
  79. package/dist/wasm/rulesengine.js +34 -4
  80. package/dist/wasm/rulesengine_bg.wasm.d.ts +2 -0
  81. package/dist/wrapper.d.ts +50 -16
  82. package/package.json +3 -3
@@ -19,6 +19,7 @@ export declare namespace CreateInvoiceRequestBody {
19
19
  status?: InvoiceStatus.Raw | null;
20
20
  subscription_external_id?: string | null;
21
21
  subtotal: number;
22
+ total?: number | null;
22
23
  url?: string | null;
23
24
  }
24
25
  }
@@ -6,5 +6,6 @@ export declare namespace ExtendCreditLeaseRequestBody {
6
6
  interface Raw {
7
7
  additional_amount: number;
8
8
  expires_at?: string | null;
9
+ idempotency_key?: string | null;
9
10
  }
10
11
  }
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../../../../api/index";
2
2
  import * as core from "../../../../../core";
3
3
  import type * as serializers from "../../../../index";
4
+ import { BillingArrearsAnchor } from "../../../../types/BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "../../../../types/BillingArrearsCadence";
4
6
  import { BillingProviderType } from "../../../../types/BillingProviderType";
5
7
  import { BillingTiersMode } from "../../../../types/BillingTiersMode";
6
8
  import { CreatePriceTierRequestBody } from "../../../../types/CreatePriceTierRequestBody";
@@ -27,7 +29,9 @@ export declare namespace CreateBillingLinkedPlanEntitlementRequestBody {
27
29
  monthly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
28
30
  monthly_unit_price?: number | null;
29
31
  monthly_unit_price_decimal?: string | null;
32
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
30
33
  overage_billing_product_id?: string | null;
34
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
31
35
  plan_id: string;
32
36
  plan_version_id?: string | null;
33
37
  price_behavior?: EntitlementPriceBehavior.Raw | null;
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../../../../api/index";
2
2
  import * as core from "../../../../../core";
3
3
  import type * as serializers from "../../../../index";
4
+ import { BillingArrearsAnchor } from "../../../../types/BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "../../../../types/BillingArrearsCadence";
4
6
  import { BillingTiersMode } from "../../../../types/BillingTiersMode";
5
7
  import { CreatePriceTierRequestBody } from "../../../../types/CreatePriceTierRequestBody";
6
8
  import { CurrencyPriceRequestBody } from "../../../../types/CurrencyPriceRequestBody";
@@ -24,7 +26,9 @@ export declare namespace CreatePlanEntitlementRequestBody {
24
26
  monthly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
25
27
  monthly_unit_price?: number | null;
26
28
  monthly_unit_price_decimal?: string | null;
29
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
27
30
  overage_billing_product_id?: string | null;
31
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
28
32
  plan_id: string;
29
33
  plan_version_id?: string | null;
30
34
  price_behavior?: EntitlementPriceBehavior.Raw | null;
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../../../../api/index";
2
2
  import * as core from "../../../../../core";
3
3
  import type * as serializers from "../../../../index";
4
+ import { BillingArrearsAnchor } from "../../../../types/BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "../../../../types/BillingArrearsCadence";
4
6
  import { BillingTiersMode } from "../../../../types/BillingTiersMode";
5
7
  import { CreatePriceTierRequestBody } from "../../../../types/CreatePriceTierRequestBody";
6
8
  import { CurrencyPriceRequestBody } from "../../../../types/CurrencyPriceRequestBody";
@@ -23,7 +25,9 @@ export declare namespace UpdatePlanEntitlementRequestBody {
23
25
  monthly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
24
26
  monthly_unit_price?: number | null;
25
27
  monthly_unit_price_decimal?: string | null;
28
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
26
29
  overage_billing_product_id?: string | null;
30
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
27
31
  price_behavior?: EntitlementPriceBehavior.Raw | null;
28
32
  price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
29
33
  quarterly_metered_price_id?: string | null;
@@ -7,6 +7,7 @@ export declare namespace CheckAndReserveFlagRequestBody {
7
7
  interface Raw {
8
8
  company?: Record<string, string> | null;
9
9
  expires_at?: string | null;
10
+ idempotency_key?: string | null;
10
11
  preflight?: PreflightRequestBody.Raw | null;
11
12
  quantity?: number | null;
12
13
  user?: Record<string, string> | null;
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const BillingArrearsCadence: core.serialization.Schema<serializers.BillingArrearsCadence.Raw, Schematic.BillingArrearsCadence>;
5
5
  export declare namespace BillingArrearsCadence {
6
- type Raw = "end_of_billing_period" | "monthly";
6
+ type Raw = "end_of_billing_period" | "monthly" | "quarterly";
7
7
  }
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const BillingCreditGrantReason: core.serialization.Schema<serializers.BillingCreditGrantReason.Raw, Schematic.BillingCreditGrantReason>;
5
5
  export declare namespace BillingCreditGrantReason {
6
- type Raw = "adjustment" | "billing_credit_auto_topup" | "free" | "plan" | "purchased" | "rollover";
6
+ type Raw = "adjustment" | "billing_credit_auto_topup" | "free" | "plan" | "postpaid_forgiven" | "postpaid_overdraft" | "postpaid_settlement" | "purchased" | "rollover";
7
7
  }
@@ -3,6 +3,7 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  import { BillingCreditBurnStrategy } from "./BillingCreditBurnStrategy";
5
5
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
6
+ import { BillingCreditLedgerAuthority } from "./BillingCreditLedgerAuthority";
6
7
  import { BillingCreditRolloverPolicy } from "./BillingCreditRolloverPolicy";
7
8
  import { BillingPriceResponseData } from "./BillingPriceResponseData";
8
9
  import { BillingProductResponseData } from "./BillingProductResponseData";
@@ -20,6 +21,7 @@ export declare namespace BillingCreditResponseData {
20
21
  description: string;
21
22
  icon?: string | null;
22
23
  id: string;
24
+ ledger_authority: BillingCreditLedgerAuthority.Raw;
23
25
  name: string;
24
26
  plural_name?: string | null;
25
27
  price?: BillingPriceResponseData.Raw | null;
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const BillingPlanCreditGrantBillingMode: core.serialization.Schema<serializers.BillingPlanCreditGrantBillingMode.Raw, Schematic.BillingPlanCreditGrantBillingMode>;
5
+ export declare namespace BillingPlanCreditGrantBillingMode {
6
+ type Raw = "granted" | "billed";
7
+ }
@@ -0,0 +1,12 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const BillingPlanCreditGrantPriceTierResponseData: core.serialization.ObjectSchema<serializers.BillingPlanCreditGrantPriceTierResponseData.Raw, Schematic.BillingPlanCreditGrantPriceTierResponseData>;
5
+ export declare namespace BillingPlanCreditGrantPriceTierResponseData {
6
+ interface Raw {
7
+ from: number;
8
+ per_unit_price?: number | null;
9
+ per_unit_price_decimal?: string | null;
10
+ to?: number | null;
11
+ }
12
+ }
@@ -7,9 +7,13 @@ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvai
7
7
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
8
8
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
9
9
  import { BillingCreditResponseData } from "./BillingCreditResponseData";
10
+ import { BillingPlanCreditGrantBillingMode } from "./BillingPlanCreditGrantBillingMode";
11
+ import { BillingPlanCreditGrantPriceTierResponseData } from "./BillingPlanCreditGrantPriceTierResponseData";
10
12
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
11
13
  import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart";
12
14
  import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType";
15
+ import { BillingPriceResponseData } from "./BillingPriceResponseData";
16
+ import { BillingTiersMode } from "./BillingTiersMode";
13
17
  import { PlanCreditGrantScaling } from "./PlanCreditGrantScaling";
14
18
  import { PreviewObjectResponseData } from "./PreviewObjectResponseData";
15
19
  export declare const BillingPlanCreditGrantResponseData: core.serialization.ObjectSchema<serializers.BillingPlanCreditGrantResponseData.Raw, Schematic.BillingPlanCreditGrantResponseData>;
@@ -27,6 +31,7 @@ export declare namespace BillingPlanCreditGrantResponseData {
27
31
  auto_topup_self_service: boolean;
28
32
  auto_topup_threshold_credits?: number | null;
29
33
  auto_topup_threshold_percent?: number | null;
34
+ billing_mode: BillingPlanCreditGrantBillingMode.Raw;
30
35
  can_buy_bundles: boolean;
31
36
  company_credit_amount: number;
32
37
  created_at: string;
@@ -49,11 +54,16 @@ export declare namespace BillingPlanCreditGrantResponseData {
49
54
  postpaid_enabled: boolean;
50
55
  postpaid_rate_per_unit?: number | null;
51
56
  postpaid_rate_per_unit_decimal?: string | null;
57
+ price?: BillingPriceResponseData.Raw | null;
58
+ price_tiers: BillingPlanCreditGrantPriceTierResponseData.Raw[];
52
59
  reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null;
53
60
  reset_start?: BillingPlanCreditGrantResetStart.Raw | null;
54
61
  reset_type?: BillingPlanCreditGrantResetType.Raw | null;
55
62
  rollover_percentage: number;
56
63
  scaling: PlanCreditGrantScaling.Raw;
64
+ tier_mode?: BillingTiersMode.Raw | null;
65
+ unit_price?: number | null;
66
+ unit_price_decimal?: string | null;
57
67
  updated_at: string;
58
68
  }
59
69
  }
@@ -15,6 +15,7 @@ export declare namespace ChangeSubscriptionInternalRequestBody {
15
15
  company_id: string;
16
16
  coupon_external_id?: string | null;
17
17
  credit_bundles: UpdateCreditBundleRequestBody.Raw[];
18
+ currency?: string | null;
18
19
  custom_field_values: CheckoutFieldValue.Raw[];
19
20
  new_plan_id: string;
20
21
  new_price_id: string;
@@ -14,6 +14,7 @@ export declare namespace ChangeSubscriptionRequestBody {
14
14
  billing_entity_id?: string | null;
15
15
  coupon_external_id?: string | null;
16
16
  credit_bundles: UpdateCreditBundleRequestBody.Raw[];
17
+ currency?: string | null;
17
18
  custom_field_values: CheckoutFieldValue.Raw[];
18
19
  new_plan_id: string;
19
20
  new_price_id: string;
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const CompanyFeatureUsageExportMetadataVisibleColumnsItem: core.serialization.Schema<serializers.CompanyFeatureUsageExportMetadataVisibleColumnsItem.Raw, Schematic.CompanyFeatureUsageExportMetadataVisibleColumnsItem>;
5
5
  export declare namespace CompanyFeatureUsageExportMetadataVisibleColumnsItem {
6
- type Raw = "plan" | "subscription" | "users" | "last_seen_at";
6
+ type Raw = "plan" | "subscription" | "users" | "last_seen_at" | "created_at";
7
7
  }
@@ -7,9 +7,11 @@ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvai
7
7
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
8
8
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
9
9
  import { BillingCreditView } from "./BillingCreditView";
10
+ import { BillingPlanCreditGrantBillingMode } from "./BillingPlanCreditGrantBillingMode";
10
11
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
11
12
  import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart";
12
13
  import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType";
14
+ import { BillingPriceView } from "./BillingPriceView";
13
15
  import { GenericPreviewObject } from "./GenericPreviewObject";
14
16
  import { PlanCreditGrantScaling } from "./PlanCreditGrantScaling";
15
17
  export declare const CompanyPlanCreditGrantView: core.serialization.ObjectSchema<serializers.CompanyPlanCreditGrantView.Raw, Schematic.CompanyPlanCreditGrantView>;
@@ -32,6 +34,8 @@ export declare namespace CompanyPlanCreditGrantView {
32
34
  billing_credit_postpaid_enabled: boolean;
33
35
  billing_credit_postpaid_rate_per_unit?: number | null;
34
36
  billing_credit_postpaid_rate_per_unit_decimal?: string | null;
37
+ billing_mode: BillingPlanCreditGrantBillingMode.Raw;
38
+ billing_product_price_id?: string | null;
35
39
  company_auto_topup_amount?: number | null;
36
40
  company_auto_topup_enabled?: boolean | null;
37
41
  company_auto_topup_threshold_credits?: number | null;
@@ -52,6 +56,7 @@ export declare namespace CompanyPlanCreditGrantView {
52
56
  plan_id: string;
53
57
  plan_version_id?: string | null;
54
58
  plural_name?: string | null;
59
+ price?: BillingPriceView.Raw | null;
55
60
  reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null;
56
61
  reset_start?: BillingPlanCreditGrantResetStart.Raw | null;
57
62
  reset_type: BillingPlanCreditGrantResetType.Raw;
@@ -6,10 +6,13 @@ import { BillingArrearsCadence } from "./BillingArrearsCadence";
6
6
  import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
7
7
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
8
8
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
9
+ import { BillingPlanCreditGrantBillingMode } from "./BillingPlanCreditGrantBillingMode";
9
10
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
10
11
  import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart";
11
12
  import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType";
13
+ import { BillingTiersMode } from "./BillingTiersMode";
12
14
  import { CreditAutoTopupAmountType } from "./CreditAutoTopupAmountType";
15
+ import { CreditGrantPriceTierRequestBody } from "./CreditGrantPriceTierRequestBody";
13
16
  import { PlanCreditGrantScaling } from "./PlanCreditGrantScaling";
14
17
  export declare const CreateBillingPlanCreditGrantRequestBody: core.serialization.ObjectSchema<serializers.CreateBillingPlanCreditGrantRequestBody.Raw, Schematic.CreateBillingPlanCreditGrantRequestBody>;
15
18
  export declare namespace CreateBillingPlanCreditGrantRequestBody {
@@ -27,6 +30,7 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
27
30
  auto_topup_self_service?: boolean | null;
28
31
  auto_topup_threshold_credits?: number | null;
29
32
  auto_topup_threshold_percent?: number | null;
33
+ billing_mode?: BillingPlanCreditGrantBillingMode.Raw | null;
30
34
  can_buy_bundles?: boolean | null;
31
35
  company_credit_amount?: number | null;
32
36
  credit_amount: number;
@@ -41,10 +45,14 @@ export declare namespace CreateBillingPlanCreditGrantRequestBody {
41
45
  postpaid_enabled?: boolean | null;
42
46
  postpaid_rate_per_unit?: number | null;
43
47
  postpaid_rate_per_unit_decimal?: string | null;
48
+ price_tiers?: CreditGrantPriceTierRequestBody.Raw[] | null;
44
49
  reset_cadence: BillingPlanCreditGrantResetCadence.Raw;
45
50
  reset_start: BillingPlanCreditGrantResetStart.Raw;
46
51
  reset_type?: BillingPlanCreditGrantResetType.Raw | null;
47
52
  rollover_percentage?: number | null;
48
53
  scaling?: PlanCreditGrantScaling.Raw | null;
54
+ tier_mode?: BillingTiersMode.Raw | null;
55
+ unit_price?: number | null;
56
+ unit_price_decimal?: string | null;
49
57
  }
50
58
  }
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingArrearsAnchor } from "./BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "./BillingArrearsCadence";
4
6
  import { BillingTiersMode } from "./BillingTiersMode";
5
7
  import { CreatePriceTierRequestBody } from "./CreatePriceTierRequestBody";
6
8
  import { CurrencyPriceRequestBody } from "./CurrencyPriceRequestBody";
@@ -24,7 +26,9 @@ export declare namespace CreateEntitlementInBundleRequestBody {
24
26
  monthly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
25
27
  monthly_unit_price?: number | null;
26
28
  monthly_unit_price_decimal?: string | null;
29
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
27
30
  overage_billing_product_id?: string | null;
31
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
28
32
  plan_id: string;
29
33
  plan_version_id?: string | null;
30
34
  price_behavior?: EntitlementPriceBehavior.Raw | null;
@@ -8,6 +8,7 @@ import { BillingCreditGrantZeroedOutReason } from "./BillingCreditGrantZeroedOut
8
8
  import { BillingCreditLedgerResponseData } from "./BillingCreditLedgerResponseData";
9
9
  import { CompanyLedgerResponseData } from "./CompanyLedgerResponseData";
10
10
  import { CreditEventType } from "./CreditEventType";
11
+ import { CreditTransferReason } from "./CreditTransferReason";
11
12
  import { CreditUsageReason } from "./CreditUsageReason";
12
13
  import { FeatureLedgerResponseData } from "./FeatureLedgerResponseData";
13
14
  export declare const CreditEventLedgerResponseData: core.serialization.ObjectSchema<serializers.CreditEventLedgerResponseData.Raw, Schematic.CreditEventLedgerResponseData>;
@@ -42,8 +43,10 @@ export declare namespace CreditEventLedgerResponseData {
42
43
  quantity_remaining_at_zero_out?: number | null;
43
44
  source_id: number;
44
45
  to_grant_id?: string | null;
46
+ transfer_reason?: CreditTransferReason.Raw | null;
45
47
  usage_event_id?: string | null;
46
48
  usage_reason?: CreditUsageReason.Raw | null;
49
+ user_id?: string | null;
47
50
  zeroed_out_reason?: BillingCreditGrantZeroedOutReason.Raw | null;
48
51
  }
49
52
  }
@@ -0,0 +1,11 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const CreditGrantPriceTierRequestBody: core.serialization.ObjectSchema<serializers.CreditGrantPriceTierRequestBody.Raw, Schematic.CreditGrantPriceTierRequestBody>;
5
+ export declare namespace CreditGrantPriceTierRequestBody {
6
+ interface Raw {
7
+ per_unit_price?: number | null;
8
+ per_unit_price_decimal?: string | null;
9
+ up_to?: number | null;
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const CreditTransferReason: core.serialization.Schema<serializers.CreditTransferReason.Raw, Schematic.CreditTransferReason>;
5
+ export declare namespace CreditTransferReason {
6
+ type Raw = "overdraft_recovery" | "postpaid_debt_moved" | "postpaid_forgiven" | "postpaid_paid";
7
+ }
@@ -18,6 +18,7 @@ export declare namespace InvoiceRequestBody {
18
18
  status?: InvoiceStatus.Raw | null;
19
19
  subscription_external_id?: string | null;
20
20
  subtotal: number;
21
+ total?: number | null;
21
22
  url?: string | null;
22
23
  }
23
24
  }
@@ -25,6 +25,7 @@ export declare namespace InvoiceResponseData {
25
25
  status?: InvoiceStatus.Raw | null;
26
26
  subscription_external_id?: string | null;
27
27
  subtotal: number;
28
+ total?: number | null;
28
29
  updated_at: string;
29
30
  url?: string | null;
30
31
  }
@@ -22,6 +22,7 @@ export declare namespace ManagePlanRequest {
22
22
  company_id: string;
23
23
  coupon_external_id?: string | null;
24
24
  credit_bundles: UpdateCreditBundleRequestBody.Raw[];
25
+ currency?: string | null;
25
26
  custom_field_values: CheckoutFieldValue.Raw[];
26
27
  days_until_due?: number | null;
27
28
  pay_in_advance_entitlements: UpdatePayInAdvanceRequestBody.Raw[];
@@ -7,9 +7,11 @@ import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvai
7
7
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
8
8
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
9
9
  import { BillingCreditView } from "./BillingCreditView";
10
+ import { BillingPlanCreditGrantBillingMode } from "./BillingPlanCreditGrantBillingMode";
10
11
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
11
12
  import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart";
12
13
  import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType";
14
+ import { BillingPriceView } from "./BillingPriceView";
13
15
  import { GenericPreviewObject } from "./GenericPreviewObject";
14
16
  import { PlanCreditGrantScaling } from "./PlanCreditGrantScaling";
15
17
  export declare const PlanCreditGrantView: core.serialization.ObjectSchema<serializers.PlanCreditGrantView.Raw, Schematic.PlanCreditGrantView>;
@@ -32,6 +34,8 @@ export declare namespace PlanCreditGrantView {
32
34
  billing_credit_postpaid_enabled: boolean;
33
35
  billing_credit_postpaid_rate_per_unit?: number | null;
34
36
  billing_credit_postpaid_rate_per_unit_decimal?: string | null;
37
+ billing_mode: BillingPlanCreditGrantBillingMode.Raw;
38
+ billing_product_price_id?: string | null;
35
39
  company_credit_amount: number;
36
40
  created_at: string;
37
41
  credit?: BillingCreditView.Raw | null;
@@ -49,6 +53,7 @@ export declare namespace PlanCreditGrantView {
49
53
  plan_id: string;
50
54
  plan_version_id?: string | null;
51
55
  plural_name?: string | null;
56
+ price?: BillingPriceView.Raw | null;
52
57
  reset_cadence?: BillingPlanCreditGrantResetCadence.Raw | null;
53
58
  reset_start?: BillingPlanCreditGrantResetStart.Raw | null;
54
59
  reset_type: BillingPlanCreditGrantResetType.Raw;
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingArrearsAnchor } from "./BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "./BillingArrearsCadence";
4
6
  import { BillingCreditResponseData } from "./BillingCreditResponseData";
5
7
  import { BillingLinkedResourceResponseData } from "./BillingLinkedResourceResponseData";
6
8
  import { BillingPriceView } from "./BillingPriceView";
@@ -31,6 +33,8 @@ export declare namespace PlanEntitlementResponseData {
31
33
  metered_yearly_price?: BillingPriceView.Raw | null;
32
34
  metric_period?: MetricPeriod.Raw | null;
33
35
  metric_period_month_reset?: MetricPeriodMonthReset.Raw | null;
36
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
37
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
34
38
  plan?: PlanResponseData.Raw | null;
35
39
  plan_id: string;
36
40
  price_behavior?: EntitlementPriceBehavior.Raw | null;
@@ -7,6 +7,7 @@ export declare const PreviewSubscriptionFinanceResponseData: core.serialization.
7
7
  export declare namespace PreviewSubscriptionFinanceResponseData {
8
8
  interface Raw {
9
9
  amount_off: number;
10
+ currency: string;
10
11
  discount_amount: number;
11
12
  discounts: PreviewSubscriptionDiscountResponseData.Raw[];
12
13
  due_now: number;
@@ -0,0 +1,7 @@
1
+ import type * as Schematic from "../../api/index";
2
+ import * as core from "../../core";
3
+ import type * as serializers from "../index";
4
+ export declare const RulesengineComparableOperator: core.serialization.Schema<serializers.RulesengineComparableOperator.Raw, Schematic.RulesengineComparableOperator>;
5
+ export declare namespace RulesengineComparableOperator {
6
+ type Raw = "eq" | "gt" | "gte" | "is_empty" | "lt" | "lte" | "not_empty" | "ne";
7
+ }
@@ -1,7 +1,7 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
- import { ComparableOperator } from "./ComparableOperator";
4
+ import { RulesengineComparableOperator } from "./RulesengineComparableOperator";
5
5
  import { RulesengineConditionType } from "./RulesengineConditionType";
6
6
  import { RulesengineMetricPeriod } from "./RulesengineMetricPeriod";
7
7
  import { RulesengineMetricPeriodMonthReset } from "./RulesengineMetricPeriodMonthReset";
@@ -20,7 +20,7 @@ export declare namespace RulesengineCondition {
20
20
  metric_period?: RulesengineMetricPeriod.Raw | null;
21
21
  metric_period_month_reset?: RulesengineMetricPeriodMonthReset.Raw | null;
22
22
  metric_value?: number | null;
23
- operator: ComparableOperator.Raw;
23
+ operator: RulesengineComparableOperator.Raw;
24
24
  resource_ids: string[];
25
25
  trait_definition?: RulesengineTraitDefinition.Raw | null;
26
26
  trait_value: string;
@@ -24,6 +24,7 @@ export declare namespace UpcomingInvoiceResponseData {
24
24
  status?: InvoiceStatus.Raw | null;
25
25
  subscription_external_id?: string | null;
26
26
  subtotal: number;
27
+ total?: number | null;
27
28
  updated_at: string;
28
29
  url?: string | null;
29
30
  }
@@ -6,10 +6,13 @@ import { BillingArrearsCadence } from "./BillingArrearsCadence";
6
6
  import { BillingCreditAutoTopupAvailability } from "./BillingCreditAutoTopupAvailability";
7
7
  import { BillingCreditExpiryType } from "./BillingCreditExpiryType";
8
8
  import { BillingCreditExpiryUnit } from "./BillingCreditExpiryUnit";
9
+ import { BillingPlanCreditGrantBillingMode } from "./BillingPlanCreditGrantBillingMode";
9
10
  import { BillingPlanCreditGrantResetCadence } from "./BillingPlanCreditGrantResetCadence";
10
11
  import { BillingPlanCreditGrantResetStart } from "./BillingPlanCreditGrantResetStart";
11
12
  import { BillingPlanCreditGrantResetType } from "./BillingPlanCreditGrantResetType";
13
+ import { BillingTiersMode } from "./BillingTiersMode";
12
14
  import { CreditAutoTopupAmountType } from "./CreditAutoTopupAmountType";
15
+ import { CreditGrantPriceTierRequestBody } from "./CreditGrantPriceTierRequestBody";
13
16
  import { PlanCreditGrantScaling } from "./PlanCreditGrantScaling";
14
17
  export declare const UpdateBillingPlanCreditGrantRequestBody: core.serialization.ObjectSchema<serializers.UpdateBillingPlanCreditGrantRequestBody.Raw, Schematic.UpdateBillingPlanCreditGrantRequestBody>;
15
18
  export declare namespace UpdateBillingPlanCreditGrantRequestBody {
@@ -27,6 +30,7 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
27
30
  auto_topup_self_service?: boolean | null;
28
31
  auto_topup_threshold_credits?: number | null;
29
32
  auto_topup_threshold_percent?: number | null;
33
+ billing_mode?: BillingPlanCreditGrantBillingMode.Raw | null;
30
34
  can_buy_bundles?: boolean | null;
31
35
  company_credit_amount?: number | null;
32
36
  credit_amount?: number | null;
@@ -38,10 +42,14 @@ export declare namespace UpdateBillingPlanCreditGrantRequestBody {
38
42
  postpaid_enabled?: boolean | null;
39
43
  postpaid_rate_per_unit?: number | null;
40
44
  postpaid_rate_per_unit_decimal?: string | null;
45
+ price_tiers?: CreditGrantPriceTierRequestBody.Raw[] | null;
41
46
  reset_cadence: BillingPlanCreditGrantResetCadence.Raw;
42
47
  reset_start: BillingPlanCreditGrantResetStart.Raw;
43
48
  reset_type?: BillingPlanCreditGrantResetType.Raw | null;
44
49
  rollover_percentage?: number | null;
45
50
  scaling?: PlanCreditGrantScaling.Raw | null;
51
+ tier_mode?: BillingTiersMode.Raw | null;
52
+ unit_price?: number | null;
53
+ unit_price_decimal?: string | null;
46
54
  }
47
55
  }
@@ -1,6 +1,8 @@
1
1
  import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
+ import { BillingArrearsAnchor } from "./BillingArrearsAnchor";
5
+ import { BillingArrearsCadence } from "./BillingArrearsCadence";
4
6
  import { BillingTiersMode } from "./BillingTiersMode";
5
7
  import { CreatePriceTierRequestBody } from "./CreatePriceTierRequestBody";
6
8
  import { CurrencyPriceRequestBody } from "./CurrencyPriceRequestBody";
@@ -16,7 +18,9 @@ export declare namespace UsageBasedEntitlementRequestBody {
16
18
  monthly_price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
17
19
  monthly_unit_price?: number | null;
18
20
  monthly_unit_price_decimal?: string | null;
21
+ overage_billing_cadence?: BillingArrearsCadence.Raw | null;
19
22
  overage_billing_product_id?: string | null;
23
+ overage_invoice_anchor?: BillingArrearsAnchor.Raw | null;
20
24
  price_behavior?: EntitlementPriceBehavior.Raw | null;
21
25
  price_tiers?: CreatePriceTierRequestBody.Raw[] | null;
22
26
  quarterly_metered_price_id?: string | null;
@@ -37,6 +37,8 @@ export * from "./BillingCustomerSubscription";
37
37
  export * from "./BillingCustomerWithSubscriptionsResponseData";
38
38
  export * from "./BillingLinkedResourceResponseData";
39
39
  export * from "./BillingMeterResponseData";
40
+ export * from "./BillingPlanCreditGrantBillingMode";
41
+ export * from "./BillingPlanCreditGrantPriceTierResponseData";
40
42
  export * from "./BillingPlanCreditGrantResetCadence";
41
43
  export * from "./BillingPlanCreditGrantResetStart";
42
44
  export * from "./BillingPlanCreditGrantResetType";
@@ -168,6 +170,7 @@ export * from "./CreditEventLedgerResponseData";
168
170
  export * from "./CreditEventType";
169
171
  export * from "./CreditGrantDetail";
170
172
  export * from "./CreditGrantExpiryRequestBody";
173
+ export * from "./CreditGrantPriceTierRequestBody";
171
174
  export * from "./CreditGrantSortOrder";
172
175
  export * from "./CreditLeaseResponseData";
173
176
  export * from "./CreditReservationResponseData";
@@ -181,6 +184,7 @@ export * from "./CreditsAutoTopupSuccess";
181
184
  export * from "./CreditsCreditPurchaseSuccess";
182
185
  export * from "./CreditsWebhookCompanySummary";
183
186
  export * from "./CreditsWebhookCreditSummary";
187
+ export * from "./CreditTransferReason";
184
188
  export * from "./CreditTransferResponseData";
185
189
  export * from "./CreditTransferView";
186
190
  export * from "./CreditTriggerConfig";
@@ -376,6 +380,7 @@ export * from "./RulesEngineSchemaVersion";
376
380
  export * from "./RulesengineCheckFlagResult";
377
381
  export * from "./RulesengineCompany";
378
382
  export * from "./RulesengineCompanyMetric";
383
+ export * from "./RulesengineComparableOperator";
379
384
  export * from "./RulesengineCondition";
380
385
  export * from "./RulesengineConditionGroup";
381
386
  export * from "./RulesengineConditionType";
@@ -6,6 +6,7 @@ export class RulesEngineJS {
6
6
  [Symbol.dispose](): void;
7
7
  checkFlagWithOptions(flag_json: string, company_json?: string | null, user_json?: string | null, options_json?: string | null): string;
8
8
  checkFlag(flag_json: string, company_json?: string | null, user_json?: string | null): string;
9
+ checkFlags(flags_json: string, company_json?: string | null, user_json?: string | null): string;
9
10
  getVersionKey(): string;
10
11
  constructor();
11
12
  }