@schematichq/schematic-typescript-node 1.4.8 → 1.5.1
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.
- package/README.md +111 -6
- package/dist/Client.d.ts +8 -0
- package/dist/api/resources/credits/client/Client.d.ts +0 -48
- package/dist/api/resources/credits/client/requests/index.d.ts +0 -2
- package/dist/api/resources/credits/types/index.d.ts +0 -4
- package/dist/api/resources/plangroups/client/Client.d.ts +2 -0
- package/dist/api/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +4 -0
- package/dist/api/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +4 -0
- package/dist/api/resources/plans/client/Client.d.ts +1 -5
- package/dist/api/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +1 -6
- package/dist/api/types/BillingCreditGrantZeroedOutReason.d.ts +1 -0
- package/dist/api/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/api/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/api/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/api/types/FeatureEntitlement.d.ts +5 -1
- package/dist/api/types/PlanChangeResponseData.d.ts +2 -0
- package/dist/api/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/dist/api/types/RulesengineFeatureEntitlement.d.ts +5 -1
- package/dist/api/types/index.d.ts +0 -2
- package/dist/cache/redis.d.ts +29 -2
- package/dist/credits/check.d.ts +49 -0
- package/dist/credits/index.d.ts +7 -0
- package/dist/credits/lease-manager.d.ts +68 -0
- package/dist/credits/lease-store.d.ts +133 -0
- package/dist/credits/redis-lease-store.d.ts +30 -0
- package/dist/credits/redis-reservation-store.d.ts +46 -0
- package/dist/credits/reservation-store.d.ts +64 -0
- package/dist/credits/track.d.ts +44 -0
- package/dist/credits/types.d.ts +175 -0
- package/dist/datastream/datastream-client.d.ts +19 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +85 -3
- package/dist/rules-engine.d.ts +3 -1
- package/dist/serialization/resources/credits/types/index.d.ts +0 -4
- package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts +3 -0
- package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts +0 -2
- package/dist/serialization/types/BillingCreditGrantZeroedOutReason.d.ts +1 -1
- package/dist/serialization/types/ChangeSubscriptionInternalRequestBody.d.ts +1 -0
- package/dist/serialization/types/ChangeSubscriptionRequestBody.d.ts +1 -0
- package/dist/serialization/types/CheckoutSettingsResponseData.d.ts +3 -0
- package/dist/serialization/types/FeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/PlanChangeResponseData.d.ts +1 -0
- package/dist/serialization/types/PreviewSubscriptionChangeResponseData.d.ts +3 -0
- package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/index.d.ts +0 -2
- package/dist/wasm/rulesengine.js +4 -4
- package/dist/wrapper.d.ts +158 -6
- package/package.json +5 -4
- package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +0 -26
- package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +0 -26
- package/dist/api/resources/credits/types/CountCreditLedgerParams.d.ts +0 -16
- package/dist/api/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -6
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -16
- package/dist/api/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -6
- package/dist/api/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -25
- package/dist/api/types/CreditLedgerPeriod.d.ts +0 -7
- package/dist/serialization/resources/credits/types/CountCreditLedgerParams.d.ts +0 -17
- package/dist/serialization/resources/credits/types/CountCreditLedgerResponse.d.ts +0 -12
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerParams.d.ts +0 -17
- package/dist/serialization/resources/credits/types/GetEnrichedCreditLedgerResponse.d.ts +0 -12
- package/dist/serialization/types/CreditLedgerEnrichedEntryResponseData.d.ts +0 -33
- package/dist/serialization/types/CreditLedgerPeriod.d.ts +0 -7
package/dist/rules-engine.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import * as Schematic from
|
|
1
|
+
import * as Schematic from "./api/types";
|
|
2
|
+
import type { CheckFlagOptions } from "./wrapper";
|
|
2
3
|
/** Entitlement details returned by the WASM rules engine */
|
|
3
4
|
export interface WasmFeatureEntitlement {
|
|
4
5
|
featureId: string;
|
|
@@ -40,6 +41,7 @@ export declare class RulesEngineClient {
|
|
|
40
41
|
constructor();
|
|
41
42
|
initialize(): Promise<void>;
|
|
42
43
|
checkFlag(flag: object, company?: object | null, user?: object | null): Promise<WasmCheckFlagResult>;
|
|
44
|
+
checkFlagWithOptions(flag: object, company?: object | null, user?: object | null, options?: CheckFlagOptions | null): Promise<WasmCheckFlagResult>;
|
|
43
45
|
/**
|
|
44
46
|
* Get the version key of the WASM rules engine.
|
|
45
47
|
* Useful for debugging and compatibility checking.
|
|
@@ -11,8 +11,6 @@ export * from "./CountCreditBundlesParams";
|
|
|
11
11
|
export * from "./CountCreditBundlesResponse";
|
|
12
12
|
export * from "./CountCreditEventLedgerParams";
|
|
13
13
|
export * from "./CountCreditEventLedgerResponse";
|
|
14
|
-
export * from "./CountCreditLedgerParams";
|
|
15
|
-
export * from "./CountCreditLedgerResponse";
|
|
16
14
|
export * from "./CreateBillingCreditResponse";
|
|
17
15
|
export * from "./CreateBillingPlanCreditGrantResponse";
|
|
18
16
|
export * from "./CreateCreditBundleResponse";
|
|
@@ -21,8 +19,6 @@ export * from "./DeleteBillingPlanCreditGrantResponse";
|
|
|
21
19
|
export * from "./DeleteCreditBundleResponse";
|
|
22
20
|
export * from "./ExtendCreditLeaseResponse";
|
|
23
21
|
export * from "./GetCreditBundleResponse";
|
|
24
|
-
export * from "./GetEnrichedCreditLedgerParams";
|
|
25
|
-
export * from "./GetEnrichedCreditLedgerResponse";
|
|
26
22
|
export * from "./GetSingleBillingCreditResponse";
|
|
27
23
|
export * from "./GetSingleBillingPlanCreditGrantResponse";
|
|
28
24
|
export * from "./GrantBillingCreditsToCompanyResponse";
|
package/dist/serialization/resources/plangroups/client/requests/CreatePlanGroupRequestBody.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ export declare namespace CreatePlanGroupRequestBody {
|
|
|
23
23
|
fallback_plan_id?: string | null;
|
|
24
24
|
initial_plan_id?: string | null;
|
|
25
25
|
initial_plan_price_id?: string | null;
|
|
26
|
+
opt_in_enabled: boolean;
|
|
27
|
+
opt_in_text?: string | null;
|
|
28
|
+
opt_in_title?: string | null;
|
|
26
29
|
ordered_add_ons: OrderedPlansInGroup.Raw[];
|
|
27
30
|
ordered_bundle_list: PlanGroupBundleOrder.Raw[];
|
|
28
31
|
ordered_plans: OrderedPlansInGroup.Raw[];
|
package/dist/serialization/resources/plangroups/client/requests/UpdatePlanGroupRequestBody.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ export declare namespace UpdatePlanGroupRequestBody {
|
|
|
23
23
|
fallback_plan_id?: string | null;
|
|
24
24
|
initial_plan_id?: string | null;
|
|
25
25
|
initial_plan_price_id?: string | null;
|
|
26
|
+
opt_in_enabled: boolean;
|
|
27
|
+
opt_in_text?: string | null;
|
|
28
|
+
opt_in_title?: string | null;
|
|
26
29
|
ordered_add_ons: OrderedPlansInGroup.Raw[];
|
|
27
30
|
ordered_bundle_list: PlanGroupBundleOrder.Raw[];
|
|
28
31
|
ordered_plans: OrderedPlansInGroup.Raw[];
|
package/dist/serialization/resources/plans/client/requests/RetryCustomPlanBillingRequestBody.d.ts
CHANGED
|
@@ -2,13 +2,11 @@ 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 { CustomPlanActivationStrategy } from "../../../../types/CustomPlanActivationStrategy";
|
|
5
|
-
import { UpdatePayInAdvanceRequestBody } from "../../../../types/UpdatePayInAdvanceRequestBody";
|
|
6
5
|
export declare const RetryCustomPlanBillingRequestBody: core.serialization.Schema<serializers.RetryCustomPlanBillingRequestBody.Raw, Schematic.RetryCustomPlanBillingRequestBody>;
|
|
7
6
|
export declare namespace RetryCustomPlanBillingRequestBody {
|
|
8
7
|
interface Raw {
|
|
9
8
|
activation_strategy?: CustomPlanActivationStrategy.Raw | null;
|
|
10
9
|
customer_email: string;
|
|
11
10
|
days_until_due?: number | null;
|
|
12
|
-
pay_in_advance: UpdatePayInAdvanceRequestBody.Raw[];
|
|
13
11
|
}
|
|
14
12
|
}
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core";
|
|
|
3
3
|
import type * as serializers from "../index";
|
|
4
4
|
export declare const BillingCreditGrantZeroedOutReason: core.serialization.Schema<serializers.BillingCreditGrantZeroedOutReason.Raw, Schematic.BillingCreditGrantZeroedOutReason>;
|
|
5
5
|
export declare namespace BillingCreditGrantZeroedOutReason {
|
|
6
|
-
type Raw = "expired" | "manual" | "plan_change" | "plan_period_reset";
|
|
6
|
+
type Raw = "expired" | "manual" | "plan_change" | "plan_period_reset" | "reconciled";
|
|
7
7
|
}
|
|
@@ -17,6 +17,7 @@ export declare namespace ChangeSubscriptionInternalRequestBody {
|
|
|
17
17
|
custom_field_values: CheckoutFieldValue.Raw[];
|
|
18
18
|
new_plan_id: string;
|
|
19
19
|
new_price_id: string;
|
|
20
|
+
opt_in_accepted?: boolean | null;
|
|
20
21
|
pay_in_advance: UpdatePayInAdvanceRequestBody.Raw[];
|
|
21
22
|
payment_method_id?: string | null;
|
|
22
23
|
promo_code?: string | null;
|
|
@@ -16,6 +16,7 @@ export declare namespace ChangeSubscriptionRequestBody {
|
|
|
16
16
|
custom_field_values: CheckoutFieldValue.Raw[];
|
|
17
17
|
new_plan_id: string;
|
|
18
18
|
new_price_id: string;
|
|
19
|
+
opt_in_accepted?: boolean | null;
|
|
19
20
|
pay_in_advance: UpdatePayInAdvanceRequestBody.Raw[];
|
|
20
21
|
payment_method_id?: string | null;
|
|
21
22
|
promo_code?: string | null;
|
|
@@ -10,6 +10,8 @@ export declare namespace FeatureEntitlement {
|
|
|
10
10
|
allocation?: number | null;
|
|
11
11
|
credit_id?: string | null;
|
|
12
12
|
credit_remaining?: number | null;
|
|
13
|
+
credit_reserved?: number | null;
|
|
14
|
+
credit_settled?: number | null;
|
|
13
15
|
credit_total?: number | null;
|
|
14
16
|
credit_used?: number | null;
|
|
15
17
|
event_name?: string | null;
|
|
@@ -28,6 +28,7 @@ export declare namespace PlanChangeResponseData {
|
|
|
28
28
|
created_at: string;
|
|
29
29
|
environment_id: string;
|
|
30
30
|
id: string;
|
|
31
|
+
is_version_upgrade: boolean;
|
|
31
32
|
previous_base_plan?: PlanSnapshotView.Raw | null;
|
|
32
33
|
previous_base_plan_version?: PlanVersionSnapshotView.Raw | null;
|
|
33
34
|
request_id?: string | null;
|
|
@@ -11,6 +11,9 @@ export declare namespace PreviewSubscriptionChangeResponseData {
|
|
|
11
11
|
finance?: PreviewSubscriptionFinanceResponseData.Raw | null;
|
|
12
12
|
is_scheduled_downgrade: boolean;
|
|
13
13
|
new_charges: number;
|
|
14
|
+
opt_in_required: boolean;
|
|
15
|
+
opt_in_text?: string | null;
|
|
16
|
+
opt_in_title?: string | null;
|
|
14
17
|
payment_method_required: boolean;
|
|
15
18
|
percent_off: number;
|
|
16
19
|
period_start: string;
|
|
@@ -10,6 +10,8 @@ export declare namespace RulesengineFeatureEntitlement {
|
|
|
10
10
|
allocation?: number | null;
|
|
11
11
|
credit_id?: string | null;
|
|
12
12
|
credit_remaining?: number | null;
|
|
13
|
+
credit_reserved?: number | null;
|
|
14
|
+
credit_settled?: number | null;
|
|
13
15
|
credit_total?: number | null;
|
|
14
16
|
credit_used?: number | null;
|
|
15
17
|
event_name?: string | null;
|
|
@@ -137,8 +137,6 @@ export * from "./CreditGrantDetail";
|
|
|
137
137
|
export * from "./CreditGrantExpiryRequestBody";
|
|
138
138
|
export * from "./CreditGrantSortOrder";
|
|
139
139
|
export * from "./CreditLeaseResponseData";
|
|
140
|
-
export * from "./CreditLedgerEnrichedEntryResponseData";
|
|
141
|
-
export * from "./CreditLedgerPeriod";
|
|
142
140
|
export * from "./CreditsAutoTopupCompanySummary";
|
|
143
141
|
export * from "./CreditsAutoTopupCreditSummary";
|
|
144
142
|
export * from "./CreditsAutoTopupHardFailure";
|