@schematichq/schematic-typescript-node 1.5.1 → 1.5.2

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 (51) hide show
  1. package/dist/api/resources/billing/client/Client.d.ts +47 -0
  2. package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -0
  3. package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -0
  4. package/dist/api/resources/billing/types/DeleteBillingCouponResponse.d.ts +6 -0
  5. package/dist/api/resources/billing/types/DeleteBillingCustomerResponse.d.ts +6 -0
  6. package/dist/api/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +6 -0
  7. package/dist/api/resources/billing/types/ListBillingPricesParams.d.ts +2 -0
  8. package/dist/api/resources/billing/types/ListBillingProductPricesParams.d.ts +2 -0
  9. package/dist/api/resources/billing/types/index.d.ts +3 -0
  10. package/dist/api/resources/plans/client/Client.d.ts +1 -5
  11. package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +1 -6
  12. package/dist/api/resources/webhooks/client/Client.d.ts +18 -0
  13. package/dist/api/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
  14. package/dist/api/resources/webhooks/client/requests/index.d.ts +1 -0
  15. package/dist/api/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +6 -0
  16. package/dist/api/resources/webhooks/types/index.d.ts +1 -0
  17. package/dist/api/types/AccountMemberPermission.d.ts +0 -1
  18. package/dist/api/types/CheckFlagsResponseData.d.ts +2 -0
  19. package/dist/api/types/CompanyCreditBalance.d.ts +8 -0
  20. package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -0
  21. package/dist/api/types/FeatureEntitlement.d.ts +4 -0
  22. package/dist/api/types/RulesengineFeatureEntitlement.d.ts +4 -0
  23. package/dist/api/types/TestWebhookResponseData.d.ts +4 -0
  24. package/dist/api/types/index.d.ts +2 -0
  25. package/dist/credits/check.d.ts +9 -5
  26. package/dist/credits/types.d.ts +11 -9
  27. package/dist/datastream/merge.d.ts +1 -1
  28. package/dist/index.js +9 -9
  29. package/dist/rules-engine.d.ts +4 -0
  30. package/dist/serialization/resources/billing/types/DeleteBillingCouponResponse.d.ts +11 -0
  31. package/dist/serialization/resources/billing/types/DeleteBillingCustomerResponse.d.ts +11 -0
  32. package/dist/serialization/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +11 -0
  33. package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +1 -0
  34. package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -0
  35. package/dist/serialization/resources/billing/types/index.d.ts +3 -0
  36. package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +0 -2
  37. package/dist/serialization/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
  38. package/dist/serialization/resources/webhooks/client/requests/index.d.ts +1 -0
  39. package/dist/serialization/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +11 -0
  40. package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
  41. package/dist/serialization/types/AccountMemberPermission.d.ts +1 -1
  42. package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -0
  43. package/dist/serialization/types/CompanyCreditBalance.d.ts +11 -0
  44. package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +1 -0
  45. package/dist/serialization/types/FeatureEntitlement.d.ts +2 -0
  46. package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +2 -0
  47. package/dist/serialization/types/TestWebhookResponseData.d.ts +10 -0
  48. package/dist/serialization/types/index.d.ts +2 -0
  49. package/dist/wasm/rulesengine.js +4 -4
  50. package/dist/wrapper.d.ts +0 -30
  51. package/package.json +1 -1
@@ -9,13 +9,17 @@ export interface WasmFeatureEntitlement {
9
9
  softLimit?: number;
10
10
  usage?: number;
11
11
  eventName?: string;
12
+ eventSubtype?: string;
12
13
  metricPeriod?: Schematic.RulesengineMetricPeriod;
13
14
  monthReset?: Schematic.RulesengineMetricPeriodMonthReset;
14
15
  metricResetAt?: string;
15
16
  creditId?: string;
17
+ consumptionRate?: number;
16
18
  creditTotal?: number;
17
19
  creditUsed?: number;
18
20
  creditRemaining?: number;
21
+ creditReserved?: number;
22
+ creditSettled?: number;
19
23
  }
20
24
  /** Result returned by the WASM rules engine */
21
25
  export interface WasmCheckFlagResult {
@@ -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
+ import { DeleteResponse } from "../../../types/DeleteResponse";
5
+ export declare const DeleteBillingCouponResponse: core.serialization.ObjectSchema<serializers.DeleteBillingCouponResponse.Raw, Schematic.DeleteBillingCouponResponse>;
6
+ export declare namespace DeleteBillingCouponResponse {
7
+ interface Raw {
8
+ data: DeleteResponse.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -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
+ import { DeleteResponse } from "../../../types/DeleteResponse";
5
+ export declare const DeleteBillingCustomerResponse: core.serialization.ObjectSchema<serializers.DeleteBillingCustomerResponse.Raw, Schematic.DeleteBillingCustomerResponse>;
6
+ export declare namespace DeleteBillingCustomerResponse {
7
+ interface Raw {
8
+ data: DeleteResponse.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -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
+ import { DeleteResponse } from "../../../types/DeleteResponse";
5
+ export declare const DeleteBillingInvoiceResponse: core.serialization.ObjectSchema<serializers.DeleteBillingInvoiceResponse.Raw, Schematic.DeleteBillingInvoiceResponse>;
6
+ export declare namespace DeleteBillingInvoiceResponse {
7
+ interface Raw {
8
+ data: DeleteResponse.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -15,6 +15,7 @@ export declare namespace ListBillingPricesParams {
15
15
  is_active?: boolean | null;
16
16
  limit?: number | null;
17
17
  offset?: number | null;
18
+ plan_version_id?: string | null;
18
19
  price?: number | null;
19
20
  product_id?: string | null;
20
21
  product_ids?: string[] | null;
@@ -15,6 +15,7 @@ export declare namespace ListBillingProductPricesParams {
15
15
  is_active?: boolean | null;
16
16
  limit?: number | null;
17
17
  offset?: number | null;
18
+ plan_version_id?: string | null;
18
19
  price?: number | null;
19
20
  product_id?: string | null;
20
21
  product_ids?: string[] | null;
@@ -2,6 +2,9 @@ export * from "./CountBillingProductsParams";
2
2
  export * from "./CountBillingProductsResponse";
3
3
  export * from "./CountCustomersParams";
4
4
  export * from "./CountCustomersResponse";
5
+ export * from "./DeleteBillingCouponResponse";
6
+ export * from "./DeleteBillingCustomerResponse";
7
+ export * from "./DeleteBillingInvoiceResponse";
5
8
  export * from "./DeleteBillingProductResponse";
6
9
  export * from "./DeletePaymentMethodByExternalIdResponse";
7
10
  export * from "./DeleteProductPriceResponse";
@@ -3,7 +3,6 @@ import * as core from "../../../../../core";
3
3
  import type * as serializers from "../../../../index";
4
4
  import { CustomPlanActivationStrategy } from "../../../../types/CustomPlanActivationStrategy";
5
5
  import { PlanVersionMigrationStrategy } from "../../../../types/PlanVersionMigrationStrategy";
6
- import { UpdatePayInAdvanceRequestBody } from "../../../../types/UpdatePayInAdvanceRequestBody";
7
6
  export declare const PublishPlanVersionRequestBody: core.serialization.Schema<serializers.PublishPlanVersionRequestBody.Raw, Schematic.PublishPlanVersionRequestBody>;
8
7
  export declare namespace PublishPlanVersionRequestBody {
9
8
  interface Raw {
@@ -12,6 +11,5 @@ export declare namespace PublishPlanVersionRequestBody {
12
11
  days_until_due?: number | null;
13
12
  excluded_company_ids: string[];
14
13
  migration_strategy: PlanVersionMigrationStrategy.Raw;
15
- pay_in_advance: UpdatePayInAdvanceRequestBody.Raw[];
16
14
  }
17
15
  }
@@ -0,0 +1,10 @@
1
+ import type * as Schematic from "../../../../../api/index";
2
+ import * as core from "../../../../../core";
3
+ import type * as serializers from "../../../../index";
4
+ import { WebhookRequestType } from "../../../../types/WebhookRequestType";
5
+ export declare const TestWebhookRequestBody: core.serialization.Schema<serializers.TestWebhookRequestBody.Raw, Schematic.TestWebhookRequestBody>;
6
+ export declare namespace TestWebhookRequestBody {
7
+ interface Raw {
8
+ request_type: WebhookRequestType.Raw;
9
+ }
10
+ }
@@ -1,2 +1,3 @@
1
1
  export { CreateWebhookRequestBody } from "./CreateWebhookRequestBody";
2
+ export { TestWebhookRequestBody } from "./TestWebhookRequestBody";
2
3
  export { UpdateWebhookRequestBody } from "./UpdateWebhookRequestBody";
@@ -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
+ import { TestWebhookResponseData } from "../../../types/TestWebhookResponseData";
5
+ export declare const SendTestWebhookActionResponse: core.serialization.ObjectSchema<serializers.SendTestWebhookActionResponse.Raw, Schematic.SendTestWebhookActionResponse>;
6
+ export declare namespace SendTestWebhookActionResponse {
7
+ interface Raw {
8
+ data: TestWebhookResponseData.Raw;
9
+ params: Record<string, unknown>;
10
+ }
11
+ }
@@ -10,4 +10,5 @@ export * from "./ListWebhookEventsParams";
10
10
  export * from "./ListWebhookEventsResponse";
11
11
  export * from "./ListWebhooksParams";
12
12
  export * from "./ListWebhooksResponse";
13
+ export * from "./SendTestWebhookActionResponse";
13
14
  export * from "./UpdateWebhookResponse";
@@ -3,5 +3,5 @@ import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  export declare const AccountMemberPermission: core.serialization.Schema<serializers.AccountMemberPermission.Raw, Schematic.AccountMemberPermission>;
5
5
  export declare namespace AccountMemberPermission {
6
- type Raw = "billing_credits_edit" | "companies_edit" | "company_users_edit" | "components_edit" | "data_exports_edit" | "features_edit" | "flag_rules_edit" | "flags_edit" | "overrides_edit" | "plan_billing_edit" | "plan_entitlements_edit" | "plan_versions_edit" | "plans_edit" | "webhooks_edit" | "webhooks_reveal_secret";
6
+ type Raw = "companies_edit" | "company_users_edit" | "components_edit" | "data_exports_edit" | "features_edit" | "flag_rules_edit" | "flags_edit" | "overrides_edit" | "plan_billing_edit" | "plan_entitlements_edit" | "plan_versions_edit" | "plans_edit" | "webhooks_edit" | "webhooks_reveal_secret";
7
7
  }
@@ -2,10 +2,12 @@ import type * as Schematic from "../../api/index";
2
2
  import * as core from "../../core";
3
3
  import type * as serializers from "../index";
4
4
  import { CheckFlagResponseData } from "./CheckFlagResponseData";
5
+ import { CompanyCreditBalance } from "./CompanyCreditBalance";
5
6
  import { DatastreamCompanyPlan } from "./DatastreamCompanyPlan";
6
7
  export declare const CheckFlagsResponseData: core.serialization.ObjectSchema<serializers.CheckFlagsResponseData.Raw, Schematic.CheckFlagsResponseData>;
7
8
  export declare namespace CheckFlagsResponseData {
8
9
  interface Raw {
10
+ credit_balances?: Record<string, CompanyCreditBalance.Raw> | null;
9
11
  flags: CheckFlagResponseData.Raw[];
10
12
  plan?: DatastreamCompanyPlan.Raw | null;
11
13
  }
@@ -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 CompanyCreditBalance: core.serialization.ObjectSchema<serializers.CompanyCreditBalance.Raw, Schematic.CompanyCreditBalance>;
5
+ export declare namespace CompanyCreditBalance {
6
+ interface Raw {
7
+ remaining: number;
8
+ reserved: number;
9
+ settled: number;
10
+ }
11
+ }
@@ -16,6 +16,7 @@ export declare namespace CompanySubscriptionResponseData {
16
16
  discounts: BillingSubscriptionDiscountView.Raw[];
17
17
  expired_at?: string | null;
18
18
  interval: string;
19
+ is_initial: boolean;
19
20
  latest_invoice?: InvoiceResponseData.Raw | null;
20
21
  payment_method?: PaymentMethodResponseData.Raw | null;
21
22
  products: BillingProductForSubscriptionResponseData.Raw[];
@@ -8,6 +8,7 @@ export declare const FeatureEntitlement: core.serialization.ObjectSchema<seriali
8
8
  export declare namespace FeatureEntitlement {
9
9
  interface Raw {
10
10
  allocation?: number | null;
11
+ consumption_rate?: number | null;
11
12
  credit_id?: string | null;
12
13
  credit_remaining?: number | null;
13
14
  credit_reserved?: number | null;
@@ -15,6 +16,7 @@ export declare namespace FeatureEntitlement {
15
16
  credit_total?: number | null;
16
17
  credit_used?: number | null;
17
18
  event_name?: string | null;
19
+ event_subtype?: string | null;
18
20
  feature_id: string;
19
21
  feature_key: string;
20
22
  metric_period?: MetricPeriod.Raw | null;
@@ -8,6 +8,7 @@ export declare const RulesengineFeatureEntitlement: core.serialization.ObjectSch
8
8
  export declare namespace RulesengineFeatureEntitlement {
9
9
  interface Raw {
10
10
  allocation?: number | null;
11
+ consumption_rate?: number | null;
11
12
  credit_id?: string | null;
12
13
  credit_remaining?: number | null;
13
14
  credit_reserved?: number | null;
@@ -15,6 +16,7 @@ export declare namespace RulesengineFeatureEntitlement {
15
16
  credit_total?: number | null;
16
17
  credit_used?: number | null;
17
18
  event_name?: string | null;
19
+ event_subtype?: string | null;
18
20
  feature_id: string;
19
21
  feature_key: string;
20
22
  metric_period?: RulesengineMetricPeriod.Raw | null;
@@ -0,0 +1,10 @@
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 TestWebhookResponseData: core.serialization.ObjectSchema<serializers.TestWebhookResponseData.Raw, Schematic.TestWebhookResponseData>;
5
+ export declare namespace TestWebhookResponseData {
6
+ interface Raw {
7
+ response_code: number;
8
+ success: boolean;
9
+ }
10
+ }
@@ -73,6 +73,7 @@ export * from "./CheckoutFieldWithValue";
73
73
  export * from "./CheckoutSettingsResponseData";
74
74
  export * from "./CheckoutSubscription";
75
75
  export * from "./ClerkIntegrationConfig";
76
+ export * from "./CompanyCreditBalance";
76
77
  export * from "./CompanyCreditBalanceResponseData";
77
78
  export * from "./CompanyDetailResponseData";
78
79
  export * from "./CompanyEventPeriodMetricsResponseData";
@@ -339,6 +340,7 @@ export * from "./SubscriptionTraitUpdate";
339
340
  export * from "./SubscriptionType";
340
341
  export * from "./TemporaryAccessTokenResourceType";
341
342
  export * from "./TemporaryAccessTokenResponseData";
343
+ export * from "./TestWebhookResponseData";
342
344
  export * from "./TimeSeriesGranularity";
343
345
  export * from "./TopFeatureByUsageResponseData";
344
346
  export * from "./TopFeaturesByUsageResponseData";