@schematichq/schematic-typescript-node 1.4.3 → 1.4.5
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/LICENSE +1 -1
- package/dist/BaseClient.d.ts +1 -1
- package/dist/Client.d.ts +11 -0
- package/dist/api/resources/accesstokens/exports.d.ts +2 -0
- package/dist/api/resources/accounts/client/Client.d.ts +10 -10
- package/dist/api/resources/accounts/client/requests/CountApiKeysRequest.d.ts +2 -2
- package/dist/api/resources/accounts/client/requests/CountAuditLogsRequest.d.ts +2 -2
- package/dist/api/resources/accounts/client/requests/ListApiKeysRequest.d.ts +2 -2
- package/dist/api/resources/accounts/client/requests/ListAuditLogsRequest.d.ts +2 -2
- package/dist/api/resources/accounts/client/requests/ListEnvironmentsRequest.d.ts +2 -2
- package/dist/api/resources/accounts/exports.d.ts +2 -0
- package/dist/api/resources/billing/client/Client.d.ts +34 -34
- package/dist/api/resources/billing/client/requests/CountBillingProductsRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/CountCustomersRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/CreateBillingPriceRequestBody.d.ts +1 -1
- package/dist/api/resources/billing/client/requests/CreateBillingSubscriptionRequestBody.d.ts +3 -3
- package/dist/api/resources/billing/client/requests/CreateCouponRequestBody.d.ts +4 -4
- package/dist/api/resources/billing/client/requests/CreateInvoiceRequestBody.d.ts +4 -4
- package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -3
- package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -3
- package/dist/api/resources/billing/client/requests/ListBillingProductsRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/ListCouponsRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/ListCustomersWithSubscriptionsRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/ListInvoicesRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/ListMetersRequest.d.ts +2 -2
- package/dist/api/resources/billing/client/requests/ListPaymentMethodsRequest.d.ts +2 -2
- package/dist/api/resources/billing/exports.d.ts +2 -0
- package/dist/api/resources/checkout/client/Client.d.ts +8 -8
- package/dist/api/resources/checkout/exports.d.ts +2 -0
- package/dist/api/resources/companies/client/Client.d.ts +34 -28
- package/dist/api/resources/companies/client/requests/CountCompaniesRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/CountEntityKeyDefinitionsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/CountEntityTraitDefinitionsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/CountPlanTraitsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/CountUsersRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/GetActiveCompanySubscriptionRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/GetEntityTraitValuesRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListCompaniesRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListCompanyMembershipsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListEntityKeyDefinitionsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListEntityTraitDefinitionsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListPlanChangesRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListPlanTraitsRequest.d.ts +2 -2
- package/dist/api/resources/companies/client/requests/ListUsersRequest.d.ts +2 -2
- package/dist/api/resources/companies/exports.d.ts +2 -0
- package/dist/api/resources/components/client/Client.d.ts +4 -4
- package/dist/api/resources/components/client/requests/CountComponentsRequest.d.ts +2 -2
- package/dist/api/resources/components/client/requests/ListComponentsRequest.d.ts +2 -2
- package/dist/api/resources/components/exports.d.ts +2 -0
- package/dist/api/resources/componentspublic/exports.d.ts +2 -0
- package/dist/api/resources/credits/client/Client.d.ts +32 -32
- package/dist/api/resources/credits/client/requests/CountBillingCreditsGrantsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountBillingCreditsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountBillingPlanCreditGrantsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountCompanyGrantsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountCreditBundlesRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountCreditEventLedgerRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CountCreditLedgerRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/CreateCompanyCreditGrant.d.ts +1 -1
- package/dist/api/resources/credits/client/requests/CreateCreditBundleRequestBody.d.ts +1 -1
- package/dist/api/resources/credits/client/requests/GetEnrichedCreditLedgerRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListBillingCreditsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListBillingPlanCreditGrantsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListCompanyGrantsRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListCreditBundlesRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListCreditEventLedgerRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/ListGrantsForCreditRequest.d.ts +2 -2
- package/dist/api/resources/credits/client/requests/UpdateCreditBundleDetailsRequestBody.d.ts +1 -1
- package/dist/api/resources/credits/exports.d.ts +2 -0
- package/dist/api/resources/dataexports/exports.d.ts +2 -0
- package/dist/api/resources/entitlements/client/Client.d.ts +20 -20
- package/dist/api/resources/entitlements/client/requests/CountCompanyOverridesRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/CountFeatureCompaniesRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/CountFeatureUsageRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/CountFeatureUsersRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/CountPlanEntitlementsRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/ListCompanyOverridesRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/ListFeatureCompaniesRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/ListFeatureUsageRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/ListFeatureUsersRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/client/requests/ListPlanEntitlementsRequest.d.ts +2 -2
- package/dist/api/resources/entitlements/exports.d.ts +2 -0
- package/dist/api/resources/events/client/Client.d.ts +4 -4
- package/dist/api/resources/events/client/requests/GetEventSummariesRequest.d.ts +2 -2
- package/dist/api/resources/events/client/requests/ListEventsRequest.d.ts +2 -2
- package/dist/api/resources/events/exports.d.ts +2 -0
- package/dist/api/resources/features/client/Client.d.ts +9 -9
- package/dist/api/resources/features/client/requests/CountFeaturesRequest.d.ts +2 -2
- package/dist/api/resources/features/client/requests/CountFlagsRequest.d.ts +2 -2
- package/dist/api/resources/features/client/requests/ListFeaturesRequest.d.ts +2 -2
- package/dist/api/resources/features/client/requests/ListFlagsRequest.d.ts +2 -2
- package/dist/api/resources/features/client/requests/UpdateFlagRulesRequestBody.d.ts +1 -1
- package/dist/api/resources/features/exports.d.ts +2 -0
- package/dist/api/resources/planbundle/exports.d.ts +2 -0
- package/dist/api/resources/plangroups/exports.d.ts +2 -0
- package/dist/api/resources/planmigrations/client/Client.d.ts +8 -8
- package/dist/api/resources/planmigrations/client/requests/CountCompanyMigrationsRequest.d.ts +2 -2
- package/dist/api/resources/planmigrations/client/requests/CountMigrationsRequest.d.ts +2 -2
- package/dist/api/resources/planmigrations/client/requests/ListCompanyMigrationsRequest.d.ts +2 -2
- package/dist/api/resources/planmigrations/client/requests/ListMigrationsRequest.d.ts +2 -2
- package/dist/api/resources/planmigrations/exports.d.ts +2 -0
- package/dist/api/resources/plans/client/Client.d.ts +6 -4
- package/dist/api/resources/plans/client/requests/CountPlansRequest.d.ts +5 -2
- package/dist/api/resources/plans/client/requests/ListPlansRequest.d.ts +5 -2
- package/dist/api/resources/plans/exports.d.ts +2 -0
- package/dist/api/resources/plans/types/CountPlansParams.d.ts +2 -0
- package/dist/api/resources/plans/types/ListPlansParams.d.ts +2 -0
- package/dist/api/resources/scheduledcheckout/client/Client.d.ts +2 -2
- package/dist/api/resources/scheduledcheckout/client/requests/ListScheduledCheckoutsRequest.d.ts +2 -2
- package/dist/api/resources/scheduledcheckout/exports.d.ts +2 -0
- package/dist/api/resources/webhooks/client/Client.d.ts +8 -8
- package/dist/api/resources/webhooks/client/requests/CountWebhookEventsRequest.d.ts +2 -2
- package/dist/api/resources/webhooks/client/requests/CountWebhooksRequest.d.ts +2 -2
- package/dist/api/resources/webhooks/client/requests/ListWebhookEventsRequest.d.ts +2 -2
- package/dist/api/resources/webhooks/client/requests/ListWebhooksRequest.d.ts +2 -2
- package/dist/api/resources/webhooks/exports.d.ts +2 -0
- package/dist/api/types/CaptureRawEvent.d.ts +1 -1
- package/dist/api/types/ConditionGroupResponseData.d.ts +0 -1
- package/dist/api/types/ConditionGroupView.d.ts +0 -1
- package/dist/api/types/ConditionResponseData.d.ts +0 -1
- package/dist/api/types/ConditionView.d.ts +0 -1
- package/dist/api/types/DataEventPayload.d.ts +7 -0
- package/dist/api/types/ManagePlanRequest.d.ts +1 -0
- package/dist/api/types/PlanSelection.d.ts +1 -0
- package/dist/api/types/RuleView.d.ts +0 -1
- package/dist/api/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/api/types/WebScheduledDowngradeWebhookOutput.d.ts +10 -0
- package/dist/api/types/WebhookRequestType.d.ts +1 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/auth/HeaderAuthProvider.d.ts +14 -10
- package/dist/core/fetcher/BinaryResponse.d.ts +1 -1
- package/dist/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/core/fetcher/Fetcher.d.ts +1 -2
- package/dist/core/fetcher/index.d.ts +2 -0
- package/dist/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/core/headers.d.ts +2 -2
- package/dist/core/schemas/builders/record/index.d.ts +2 -2
- package/dist/core/schemas/builders/record/record.d.ts +2 -1
- package/dist/core/schemas/builders/record/types.d.ts +2 -0
- package/dist/datastream/merge.d.ts +30 -0
- package/dist/index.js +3 -3
- package/dist/serialization/resources/plans/types/CountPlansParams.d.ts +1 -0
- package/dist/serialization/resources/plans/types/ListPlansParams.d.ts +1 -0
- package/dist/serialization/types/CaptureRawEvent.d.ts +1 -1
- package/dist/serialization/types/ConditionGroupResponseData.d.ts +0 -1
- package/dist/serialization/types/ConditionGroupView.d.ts +0 -1
- package/dist/serialization/types/ConditionResponseData.d.ts +0 -1
- package/dist/serialization/types/ConditionView.d.ts +0 -1
- package/dist/serialization/types/DataEventPayload.d.ts +13 -0
- package/dist/serialization/types/ManagePlanRequest.d.ts +1 -0
- package/dist/serialization/types/PlanSelection.d.ts +1 -0
- package/dist/serialization/types/RuleView.d.ts +0 -1
- package/dist/serialization/types/RulesEngineSchemaVersion.d.ts +1 -1
- package/dist/serialization/types/WebScheduledDowngradeWebhookOutput.d.ts +17 -0
- package/dist/serialization/types/WebhookRequestType.d.ts +1 -1
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/wasm/rulesengine.d.ts +10 -0
- package/dist/wasm/rulesengine.js +193 -0
- package/dist/wasm/rulesengine_bg.wasm +0 -0
- package/dist/wasm/rulesengine_bg.wasm.d.ts +25 -0
- package/package.json +4 -4
|
@@ -11,6 +11,7 @@ export declare namespace CountPlansParams {
|
|
|
11
11
|
for_trial_expiry_plan?: boolean | null;
|
|
12
12
|
has_product_id?: boolean | null;
|
|
13
13
|
ids?: string[] | null;
|
|
14
|
+
include_draft_versions?: boolean | null;
|
|
14
15
|
limit?: number | null;
|
|
15
16
|
offset?: number | null;
|
|
16
17
|
plan_type?: PlanType.Raw | null;
|
|
@@ -11,6 +11,7 @@ export declare namespace ListPlansParams {
|
|
|
11
11
|
for_trial_expiry_plan?: boolean | null;
|
|
12
12
|
has_product_id?: boolean | null;
|
|
13
13
|
ids?: string[] | null;
|
|
14
|
+
include_draft_versions?: boolean | null;
|
|
14
15
|
limit?: number | null;
|
|
15
16
|
offset?: number | null;
|
|
16
17
|
plan_type?: PlanType.Raw | null;
|
|
@@ -20,7 +20,6 @@ export declare namespace ConditionResponseData {
|
|
|
20
20
|
metric_period_month_reset?: string | null;
|
|
21
21
|
metric_value?: number | null;
|
|
22
22
|
operator: string;
|
|
23
|
-
plan_version_id?: string | null;
|
|
24
23
|
resource_unspecified_ids: string[];
|
|
25
24
|
rule_id: string;
|
|
26
25
|
trait_entity_type?: EntityType.Raw | null;
|
|
@@ -25,7 +25,6 @@ export declare namespace ConditionView {
|
|
|
25
25
|
metric_period_month_reset?: string | null;
|
|
26
26
|
metric_value?: number | null;
|
|
27
27
|
operator: string;
|
|
28
|
-
plan_version_id?: string | null;
|
|
29
28
|
plan_versions: GenericPreviewObject.Raw[];
|
|
30
29
|
plans: GenericPreviewObject.Raw[];
|
|
31
30
|
resource_unspecified_ids: string[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as Schematic from "../../api/index";
|
|
2
|
+
import * as core from "../../core";
|
|
3
|
+
import type * as serializers from "../index";
|
|
4
|
+
import { EventType } from "./EventType";
|
|
5
|
+
export declare const DataEventPayload: core.serialization.ObjectSchema<serializers.DataEventPayload.Raw, Schematic.DataEventPayload>;
|
|
6
|
+
export declare namespace DataEventPayload {
|
|
7
|
+
interface Raw {
|
|
8
|
+
api_key: string;
|
|
9
|
+
body?: Record<string, unknown> | null;
|
|
10
|
+
sent_at?: string | null;
|
|
11
|
+
type: EventType.Raw;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -10,6 +10,7 @@ export declare namespace ManagePlanRequest {
|
|
|
10
10
|
add_on_selections: PlanSelection.Raw[];
|
|
11
11
|
base_plan_id?: string | null;
|
|
12
12
|
base_plan_price_id?: string | null;
|
|
13
|
+
base_plan_version_id?: string | null;
|
|
13
14
|
cancel_immediately?: boolean | null;
|
|
14
15
|
company_id: string;
|
|
15
16
|
coupon_external_id?: string | null;
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core";
|
|
|
3
3
|
import type * as serializers from "../index";
|
|
4
4
|
export declare const RulesEngineSchemaVersion: core.serialization.Schema<serializers.RulesEngineSchemaVersion.Raw, Schematic.RulesEngineSchemaVersion>;
|
|
5
5
|
export declare namespace RulesEngineSchemaVersion {
|
|
6
|
-
type Raw = "
|
|
6
|
+
type Raw = "v5f633cc3" | "placeholder-for-fern-compatibility";
|
|
7
7
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Schematic from "../../api/index";
|
|
2
|
+
import * as core from "../../core";
|
|
3
|
+
import type * as serializers from "../index";
|
|
4
|
+
import { CompanyResponseData } from "./CompanyResponseData";
|
|
5
|
+
import { PlanSnapshotView } from "./PlanSnapshotView";
|
|
6
|
+
export declare const WebScheduledDowngradeWebhookOutput: core.serialization.ObjectSchema<serializers.WebScheduledDowngradeWebhookOutput.Raw, Schematic.WebScheduledDowngradeWebhookOutput>;
|
|
7
|
+
export declare namespace WebScheduledDowngradeWebhookOutput {
|
|
8
|
+
interface Raw {
|
|
9
|
+
company?: CompanyResponseData.Raw | null;
|
|
10
|
+
execute_after: string;
|
|
11
|
+
from_plan?: PlanSnapshotView.Raw | null;
|
|
12
|
+
id: string;
|
|
13
|
+
scheduled_interval?: string | null;
|
|
14
|
+
scheduled_price?: number | null;
|
|
15
|
+
to_plan?: PlanSnapshotView.Raw | null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -3,5 +3,5 @@ import * as core from "../../core";
|
|
|
3
3
|
import type * as serializers from "../index";
|
|
4
4
|
export declare const WebhookRequestType: core.serialization.Schema<serializers.WebhookRequestType.Raw, Schematic.WebhookRequestType>;
|
|
5
5
|
export declare namespace WebhookRequestType {
|
|
6
|
-
type Raw = "subscription.trial.ended" | "company.created" | "company.deleted" | "company.override.created" | "company.override.deleted" | "company.override.expired" | "company.override.updated" | "company.plan_changed" | "company.updated" | "credit.limit.reached" | "credit.limit.warning" | "entitlement.limit.reached" | "entitlement.limit.warning" | "entitlement.soft_limit.reached" | "entitlement.soft_limit.warning" | "entitlement.tier_limit.reached" | "entitlement.tier_limit.warning" | "feature.created" | "feature.deleted" | "feature.updated" | "flag.created" | "flag.deleted" | "flag_rules.updated" | "flag.updated" | "plan.created" | "plan.deleted" | "plan.entitlement.created" | "plan.entitlement.deleted" | "plan.entitlement.updated" | "plan.updated" | "plan_version.deleted" | "rule.deleted" | "test.send" | "user.created" | "user.deleted" | "user.updated" | "auto.topup.hard.failure" | "auto.topup.retry.exceeded";
|
|
6
|
+
type Raw = "subscription.trial.ended" | "company.created" | "company.deleted" | "company.override.created" | "company.override.deleted" | "company.override.expired" | "company.override.updated" | "company.plan_changed" | "company.scheduled_downgrade" | "company.updated" | "credit.limit.reached" | "credit.limit.warning" | "entitlement.limit.reached" | "entitlement.limit.warning" | "entitlement.soft_limit.reached" | "entitlement.soft_limit.warning" | "entitlement.tier_limit.reached" | "entitlement.tier_limit.warning" | "feature.created" | "feature.deleted" | "feature.updated" | "flag.created" | "flag.deleted" | "flag_rules.updated" | "flag.updated" | "plan.created" | "plan.deleted" | "plan.entitlement.created" | "plan.entitlement.deleted" | "plan.entitlement.updated" | "plan.updated" | "plan_version.deleted" | "rule.deleted" | "test.send" | "user.created" | "user.deleted" | "user.updated" | "auto.topup.hard.failure" | "auto.topup.retry.exceeded";
|
|
7
7
|
}
|
|
@@ -136,6 +136,7 @@ export * from "./CreditUsage";
|
|
|
136
136
|
export * from "./CreditUsageAggregation";
|
|
137
137
|
export * from "./CustomPlanConfig";
|
|
138
138
|
export * from "./CustomPlanViewConfigResponseData";
|
|
139
|
+
export * from "./DataEventPayload";
|
|
139
140
|
export * from "./DataExportOutputFileType";
|
|
140
141
|
export * from "./DataExportResponseData";
|
|
141
142
|
export * from "./DataExportStatus";
|
|
@@ -328,4 +329,5 @@ export * from "./WebhookEventStatus";
|
|
|
328
329
|
export * from "./WebhookRequestType";
|
|
329
330
|
export * from "./WebhookResponseData";
|
|
330
331
|
export * from "./WebhookStatus";
|
|
332
|
+
export * from "./WebScheduledDowngradeWebhookOutput";
|
|
331
333
|
export * from "./WhoAmIResponseData";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
export class RulesEngineJS {
|
|
5
|
+
free(): void;
|
|
6
|
+
[Symbol.dispose](): void;
|
|
7
|
+
checkFlag(flag_json: string, company_json?: string | null, user_json?: string | null): string;
|
|
8
|
+
getVersionKey(): string;
|
|
9
|
+
constructor();
|
|
10
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/* @ts-self-types="./rulesengine.d.ts" */
|
|
2
|
+
|
|
3
|
+
class RulesEngineJS {
|
|
4
|
+
__destroy_into_raw() {
|
|
5
|
+
const ptr = this.__wbg_ptr;
|
|
6
|
+
this.__wbg_ptr = 0;
|
|
7
|
+
RulesEngineJSFinalization.unregister(this);
|
|
8
|
+
return ptr;
|
|
9
|
+
}
|
|
10
|
+
free() {
|
|
11
|
+
const ptr = this.__destroy_into_raw();
|
|
12
|
+
wasm.__wbg_rulesenginejs_free(ptr, 0);
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @param {string} flag_json
|
|
16
|
+
* @param {string | null} [company_json]
|
|
17
|
+
* @param {string | null} [user_json]
|
|
18
|
+
* @returns {string}
|
|
19
|
+
*/
|
|
20
|
+
checkFlag(flag_json, company_json, user_json) {
|
|
21
|
+
let deferred5_0;
|
|
22
|
+
let deferred5_1;
|
|
23
|
+
try {
|
|
24
|
+
const ptr0 = passStringToWasm0(flag_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
25
|
+
const len0 = WASM_VECTOR_LEN;
|
|
26
|
+
var ptr1 = isLikeNone(company_json) ? 0 : passStringToWasm0(company_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
27
|
+
var len1 = WASM_VECTOR_LEN;
|
|
28
|
+
var ptr2 = isLikeNone(user_json) ? 0 : passStringToWasm0(user_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
29
|
+
var len2 = WASM_VECTOR_LEN;
|
|
30
|
+
const ret = wasm.rulesenginejs_checkFlag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
31
|
+
var ptr4 = ret[0];
|
|
32
|
+
var len4 = ret[1];
|
|
33
|
+
if (ret[3]) {
|
|
34
|
+
ptr4 = 0; len4 = 0;
|
|
35
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
36
|
+
}
|
|
37
|
+
deferred5_0 = ptr4;
|
|
38
|
+
deferred5_1 = len4;
|
|
39
|
+
return getStringFromWasm0(ptr4, len4);
|
|
40
|
+
} finally {
|
|
41
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @returns {string}
|
|
46
|
+
*/
|
|
47
|
+
getVersionKey() {
|
|
48
|
+
let deferred1_0;
|
|
49
|
+
let deferred1_1;
|
|
50
|
+
try {
|
|
51
|
+
const ret = wasm.rulesenginejs_getVersionKey(this.__wbg_ptr);
|
|
52
|
+
deferred1_0 = ret[0];
|
|
53
|
+
deferred1_1 = ret[1];
|
|
54
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
55
|
+
} finally {
|
|
56
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
constructor() {
|
|
60
|
+
const ret = wasm.rulesenginejs_new();
|
|
61
|
+
this.__wbg_ptr = ret >>> 0;
|
|
62
|
+
RulesEngineJSFinalization.register(this, this.__wbg_ptr, this);
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (Symbol.dispose) RulesEngineJS.prototype[Symbol.dispose] = RulesEngineJS.prototype.free;
|
|
67
|
+
exports.RulesEngineJS = RulesEngineJS;
|
|
68
|
+
|
|
69
|
+
function __wbg_get_imports() {
|
|
70
|
+
const import0 = {
|
|
71
|
+
__proto__: null,
|
|
72
|
+
__wbg___wbindgen_throw_bd5a70920abf0236: function(arg0, arg1) {
|
|
73
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
74
|
+
},
|
|
75
|
+
__wbg_getTime_60f8d1fb5b61be64: function(arg0) {
|
|
76
|
+
const ret = arg0.getTime();
|
|
77
|
+
return ret;
|
|
78
|
+
},
|
|
79
|
+
__wbg_new_0_1211b165db93342c: function() {
|
|
80
|
+
const ret = new Date();
|
|
81
|
+
return ret;
|
|
82
|
+
},
|
|
83
|
+
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
84
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
85
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
86
|
+
return ret;
|
|
87
|
+
},
|
|
88
|
+
__wbindgen_init_externref_table: function() {
|
|
89
|
+
const table = wasm.__wbindgen_externrefs;
|
|
90
|
+
const offset = table.grow(4);
|
|
91
|
+
table.set(0, undefined);
|
|
92
|
+
table.set(offset + 0, undefined);
|
|
93
|
+
table.set(offset + 1, null);
|
|
94
|
+
table.set(offset + 2, true);
|
|
95
|
+
table.set(offset + 3, false);
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
return {
|
|
99
|
+
__proto__: null,
|
|
100
|
+
"./rulesengine_bg.js": import0,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const RulesEngineJSFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
105
|
+
? { register: () => {}, unregister: () => {} }
|
|
106
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_rulesenginejs_free(ptr >>> 0, 1));
|
|
107
|
+
|
|
108
|
+
function getStringFromWasm0(ptr, len) {
|
|
109
|
+
ptr = ptr >>> 0;
|
|
110
|
+
return decodeText(ptr, len);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
let cachedUint8ArrayMemory0 = null;
|
|
114
|
+
function getUint8ArrayMemory0() {
|
|
115
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
116
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
117
|
+
}
|
|
118
|
+
return cachedUint8ArrayMemory0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function isLikeNone(x) {
|
|
122
|
+
return x === undefined || x === null;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
126
|
+
if (realloc === undefined) {
|
|
127
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
128
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
129
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
130
|
+
WASM_VECTOR_LEN = buf.length;
|
|
131
|
+
return ptr;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let len = arg.length;
|
|
135
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
136
|
+
|
|
137
|
+
const mem = getUint8ArrayMemory0();
|
|
138
|
+
|
|
139
|
+
let offset = 0;
|
|
140
|
+
|
|
141
|
+
for (; offset < len; offset++) {
|
|
142
|
+
const code = arg.charCodeAt(offset);
|
|
143
|
+
if (code > 0x7F) break;
|
|
144
|
+
mem[ptr + offset] = code;
|
|
145
|
+
}
|
|
146
|
+
if (offset !== len) {
|
|
147
|
+
if (offset !== 0) {
|
|
148
|
+
arg = arg.slice(offset);
|
|
149
|
+
}
|
|
150
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
151
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
152
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
153
|
+
|
|
154
|
+
offset += ret.written;
|
|
155
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
WASM_VECTOR_LEN = offset;
|
|
159
|
+
return ptr;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function takeFromExternrefTable0(idx) {
|
|
163
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
164
|
+
wasm.__externref_table_dealloc(idx);
|
|
165
|
+
return value;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
169
|
+
cachedTextDecoder.decode();
|
|
170
|
+
function decodeText(ptr, len) {
|
|
171
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const cachedTextEncoder = new TextEncoder();
|
|
175
|
+
|
|
176
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
177
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
178
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
179
|
+
view.set(buf);
|
|
180
|
+
return {
|
|
181
|
+
read: arg.length,
|
|
182
|
+
written: buf.length
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
let WASM_VECTOR_LEN = 0;
|
|
188
|
+
|
|
189
|
+
const wasmPath = `${__dirname}/rulesengine_bg.wasm`;
|
|
190
|
+
const wasmBytes = require('fs').readFileSync(wasmPath);
|
|
191
|
+
const wasmModule = new WebAssembly.Module(wasmBytes);
|
|
192
|
+
let wasm = new WebAssembly.Instance(wasmModule, __wbg_get_imports()).exports;
|
|
193
|
+
wasm.__wbindgen_start();
|
|
Binary file
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const __wbg_rulesenginejs_free: (a: number, b: number) => void;
|
|
5
|
+
export const alloc: (a: number) => number;
|
|
6
|
+
export const checkFlag: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
7
|
+
export const checkFlagCombined: (a: number, b: number) => number;
|
|
8
|
+
export const dealloc: (a: number, b: number) => void;
|
|
9
|
+
export const getCurrentMetricPeriodStartForCalendarMetricPeriod: (a: number) => bigint;
|
|
10
|
+
export const getCurrentMetricPeriodStartForCompanyBillingSubscription: (a: number, b: number) => bigint;
|
|
11
|
+
export const getNextMetricPeriodStartForCalendarMetricPeriod: (a: number) => bigint;
|
|
12
|
+
export const getNextMetricPeriodStartForCompanyBillingSubscription: (a: number, b: number) => bigint;
|
|
13
|
+
export const getResultJson: () => number;
|
|
14
|
+
export const getResultJsonLength: () => number;
|
|
15
|
+
export const get_version_key_wasm: () => number;
|
|
16
|
+
export const rulesenginejs_checkFlag: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => [number, number, number, number];
|
|
17
|
+
export const rulesenginejs_getVersionKey: (a: number) => [number, number];
|
|
18
|
+
export const rulesenginejs_new: () => number;
|
|
19
|
+
export const test_function: () => number;
|
|
20
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
21
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
22
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
23
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
24
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
25
|
+
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schematichq/schematic-typescript-node",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"private": false,
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,12 +16,11 @@
|
|
|
16
16
|
"check": "biome check --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
17
17
|
"check:fix": "biome check --fix --unsafe --skip-parse-errors --no-errors-on-unmatched --max-diagnostics=none",
|
|
18
18
|
"build": "node build.js",
|
|
19
|
-
"prepack": "
|
|
19
|
+
"prepack": "",
|
|
20
20
|
"test": "jest --config jest.config.mjs",
|
|
21
21
|
"test:unit": "jest --selectProjects unit",
|
|
22
22
|
"test:wire": "jest --selectProjects wire",
|
|
23
23
|
"build:legacy": "tsc",
|
|
24
|
-
"pretest": "node scripts/generate-wasm-base64.js",
|
|
25
24
|
"test:cloudflare": "node scripts/test-cloudflare.mjs"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
@@ -45,7 +44,7 @@
|
|
|
45
44
|
"msw": "2.11.2",
|
|
46
45
|
"@types/node": "^18.19.70",
|
|
47
46
|
"typescript": "~5.7.2",
|
|
48
|
-
"@biomejs/biome": "2.3
|
|
47
|
+
"@biomejs/biome": "2.4.3",
|
|
49
48
|
"esbuild": "^0.25.9",
|
|
50
49
|
"miniflare": "^4.20260305.0"
|
|
51
50
|
},
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"files": [
|
|
67
66
|
"dist/**/*.js",
|
|
68
67
|
"dist/**/*.d.ts",
|
|
68
|
+
"dist/**/*.wasm",
|
|
69
69
|
"!dist/**/*.js.map",
|
|
70
70
|
"!dist/**/*.test.*",
|
|
71
71
|
"README.md"
|