/* tslint:disable */ /* eslint-disable */ /** * The `ReadableStreamType` enum. * * *This API requires the following crate features to be activated: `ReadableStreamType`* */ export type ReadableStreamType = "bytes"; /** * A WASM wrapper for the Rust `cedarling::AuthorizeResult` struct. * Represents the result of an authorization request. */ export class AuthorizeResult { private constructor(); free(): void; [Symbol.dispose](): void; /** * Convert `AuthorizeResult` to json string value */ json_string(): string; /** * Result of authorization * true means `ALLOW` * false means `Deny` * * this field is [`bool`] type to be compatible with [authzen Access Evaluation Decision](https://openid.github.io/authzen/#section-6.2.1). */ decision: boolean; /** * Request ID of the authorization request */ request_id: string; /** * Cedar authorization response for the request. */ response: AuthorizeResultResponse; } /** * A WASM wrapper for the Rust `cedar_policy::Response` struct. * Represents the result of an authorization request. */ export class AuthorizeResultResponse { private constructor(); free(): void; [Symbol.dispose](): void; /** * Authorization decision */ readonly decision: boolean; /** * Diagnostics providing more information on how this decision was reached */ readonly diagnostics: Diagnostics; } /** * WASM wrapper for * `cedarling::BatchAuthorizeResponse>`. * Same shape as [`BatchAuthorizeUnsignedResponse`] with multi-issuer results. */ export class BatchAuthorizeMultiIssuerResponse { private constructor(); free(): void; [Symbol.dispose](): void; /** * Shared correlation id stamped on every per-item decision log entry. */ readonly batch_id: string; /** * Per-item results in input order — each slot is a * [`BatchItemMultiIssuerResult`]. */ readonly results: BatchItemMultiIssuerResult[]; } /** * WASM wrapper for `cedarling::BatchAuthorizeResponse>`. * * Carries a shared `batch_id` (UUIDv7) alongside per-item results. Each result * is a [`BatchItemUnsignedResult`] — Cedar decision on `is_ok()`, per-item * build failure on `error`. `results[i]` corresponds to `items[i]`. */ export class BatchAuthorizeUnsignedResponse { private constructor(); free(): void; [Symbol.dispose](): void; /** * Shared correlation id stamped on every per-item decision log entry. */ readonly batch_id: string; /** * Per-item results in input order — each slot is a * [`BatchItemUnsignedResult`]. */ readonly results: BatchItemUnsignedResult[]; } /** * Per-item build failure surfaced inside a batch response at `results[i]` * when Cedar couldn't be reached for that item. */ export class BatchItemError { private constructor(); free(): void; [Symbol.dispose](): void; /** * Stable variant slug — `action_parse`, `resource_build`, `context_build`, * `principal_build`, `schema_validation`, `multi_issuer_entity`, * `request_validation`. */ readonly category: string; /** * Position of the failing item in the original `items` vector. */ readonly item_index: number; /** * Human-readable diagnostic. Safe to log. */ readonly message: string; } /** * Multi-issuer analog of [`BatchItemUnsignedResult`]. */ export class BatchItemMultiIssuerResult { private constructor(); free(): void; [Symbol.dispose](): void; /** * The multi-issuer decision if `is_ok()`; throws otherwise. */ unwrap(): MultiIssuerAuthorizeResult; /** * The per-item error if `!is_ok()`; `undefined` otherwise. */ readonly error: BatchItemError | undefined; /** * `true` when Cedar evaluated this item. */ readonly is_ok: boolean; } /** * One slot in a batch response's `results` array. Callers switch on * `is_ok()` — on `true`, read `unwrap()`; on `false`, read `error()`. */ export class BatchItemUnsignedResult { private constructor(); free(): void; [Symbol.dispose](): void; /** * The Cedar decision if `is_ok()`; throws otherwise. */ unwrap(): AuthorizeResult; /** * The per-item error if `!is_ok()`; `undefined` otherwise. */ readonly error: BatchItemError | undefined; /** * `true` when Cedar evaluated this item (Allow or Deny); `false` when it * failed to build. */ readonly is_ok: boolean; } /** * The instance of the Cedarling application. */ export class Cedarling { private constructor(); free(): void; [Symbol.dispose](): void; /** * Collect every value of the annotation `key` across the given policies, * preserving duplicates. Unknown policy IDs are silently skipped. * * # Arguments * * * `policy_ids` - List of policy IDs to search. Typically * `result.response.diagnostics.reason` from an authorization result. * * `key` - The annotation key to collect values for (e.g. `"redirect"`). * * # Example * * ```javascript * const redirects = cedarling.annotation_values(result.response.diagnostics.reason, "redirect"); * // ["/upgrade"] * ``` */ annotation_values(policy_ids: string[], key: string): string[]; /** * Return the annotations of each given policy, grouped by policy ID * the loss-free companion to `annotations_map`. Unknown policy IDs are * silently skipped. * * # Arguments * * * `policy_ids` - List of policy IDs whose annotations should be returned * grouped by policy ID. Typically `result.response.diagnostics.reason` from * an authorization result. * * # Example * * ```javascript * const byPolicy = cedarling.annotations_by_policy(result.response.diagnostics.reason); * // { "5": { redirect: "/upgrade", tier: "premium" } } * ``` */ annotations_by_policy(policy_ids: string[]): any; /** * Merge the annotations (`@key("value")`) of the given policies into a single object. * * Intended for resolving the determining policies of an authorization decision: * pass `result.response.diagnostics.reason`. * * Lossy: if the same annotation key appears on several policies, one value wins * arbitrarily. Use `annotation_values` / `annotations_by_policy` when duplicates * matter. Unknown policy IDs are silently skipped. * * # Arguments * * * `policy_ids` - List of policy IDs whose annotations should be merged into * a single object. Typically `result.response.diagnostics.reason` from an * authorization result. * * # Example * * ```javascript * const annotations = cedarling.annotations_map(result.response.diagnostics.reason); * // { redirect: "/upgrade", tier: "premium" } * ``` */ annotations_map(policy_ids: string[]): any; /** * Authorize multi-issuer request. * Makes authorization decision based on multiple JWT tokens from different issuers. * * # Arguments * * * `request` - JSON string representation of [`AuthorizeMultiIssuerRequest`]. * * # Example * * ```javascript * const result = await cedarling.authorize_multi_issuer(JSON.stringify(request)); * ``` */ authorize_multi_issuer(request: string): Promise; /** * Authorize a batch of multi-issuer requests against one shared token set. * * Tokens are validated and token/issuer entities are built once, then * each item is evaluated in input order. Batch-level failures (validation, * JWT verification, status-list refresh) reject the whole call; per-item * failures are returned as `BatchItemError` results and exposed by WASM * with `is_ok=false` and `error`, while genuine Cedar denials remain * `AuthorizeResult` values with `decision=false`. * * # Arguments * * * `request` - JSON string representation of [`BatchAuthorizeMultiIssuerRequest`]. * * # Example * * ```javascript * const result = await cedarling.authorize_multi_issuer_batch(JSON.stringify(batchRequest)); * ``` */ authorize_multi_issuer_batch(request: string): Promise; /** * Authorize an unsigned request carrying an optional single principal. * Makes an authorization decision based on the [`RequestUnsigned`]. * * When `principal` is omitted / `null` on the JS side the core uses Cedar * partial evaluation; residual-dependent requests fail closed with * `Decision::Deny` and surface residual policy ids in * `response.diagnostics.reason`. * * # Arguments * * * `request` - JSON string representation of [`RequestUnsigned`]. * * # Example * * ```javascript * const result = await cedarling.authorize_unsigned(JSON.stringify(request)); * ``` */ authorize_unsigned(request: string): Promise; /** * Authorize a batch of unsigned requests against one shared principal. * * Setup work (principal build + pushed-data snapshot) runs once and each * item is evaluated in input order. Results are returned inside a * [`BatchAuthorizeUnsignedResponse`] carrying the shared `batch_id`. * Batch-level failures (validation, principal parse) reject the whole * call; per-item failures are returned as `BatchItemError` results and * exposed by WASM with `is_ok=false` and `error`, while genuine Cedar * denials remain `AuthorizeResult` values with `decision=false`. * # Arguments * * * `request` - JSON string representation of [`BatchAuthorizeUnsignedRequest`]. * * # Example * * ```javascript * const result = await cedarling.authorize_unsigned_batch(JSON.stringify(batchRequest)); * ``` */ authorize_unsigned_batch(request: string): Promise; /** * Clear all entries from the data store. * * # Example * * ```javascript * cedarling.clear_data_ctx(); * console.log("All data entries cleared"); * ``` */ clear_data_ctx(): void; /** * Get trusted issuer identifiers that failed to load. * * # Example * * ```javascript * const ids = cedarling.failed_trusted_issuer_ids(); * ``` */ failed_trusted_issuer_ids(): Array; /** * Get a value from the data store by key. * Returns null if the key doesn't exist or the entry has expired. * * # Arguments * * * `key` - A string key for the data entry to retrieve * * # Example * * ```javascript * const value = cedarling.get_data_ctx("user:123"); * if (value !== null) { * console.log(value.name); // "John" * } * ``` */ get_data_ctx(key: string): any; /** * Get a data entry with full metadata by key. * Returns null if the key doesn't exist or the entry has expired. * * # Arguments * * * `key` - A string key for the data entry to retrieve * * # Example * * ```javascript * const entry = cedarling.get_data_entry_ctx("user:123"); * if (entry !== null) { * console.log(entry.key); // "user:123" * console.log(entry.value); // { name: "John", age: 30 } * console.log(entry.data_type); // "Record" * console.log(entry.created_at); // "2024-01-01T12:00:00Z" * console.log(entry.access_count); // 5 * } * ``` */ get_data_entry_ctx(key: string): DataEntry | undefined; /** * Get specific log entry. * Returns `Map` with values or `null`. */ get_log_by_id(id: string): any; /** * Returns a list of all log ids. * Returns `Array` of `String` */ get_log_ids(): Array; /** * Get logs by request_id. * Return log entries that match the given request_id. */ get_logs_by_request_id(request_id: string): any[]; /** * Get log by request_id and tag, like composite key `request_id` + `log_kind`. * Tag can be `log_kind`, `log_level`. * Return log entries that match the given request_id and tag. */ get_logs_by_request_id_and_tag(request_id: string, tag: string): any[]; /** * Get logs by tag, like `log_kind` or `log level`. * Tag can be `log_kind`, `log_level`. */ get_logs_by_tag(tag: string): any[]; /** * Get statistics about the data store. * * # Example * * ```javascript * const stats = cedarling.get_stats_ctx(); * console.log(`Entries: ${stats.entry_count}/${stats.max_entries || 'unlimited'}`); * console.log(`Capacity: ${stats.capacity_usage_percent.toFixed(2)}%`); * console.log(`Total size: ${stats.total_size_bytes} bytes`); * ``` */ get_stats_ctx(): DataStoreStats; /** * Check whether a trusted issuer was loaded by `iss` claim. * * # Arguments * * * `iss_claim` - Issuer `iss` claim value to check. * * # Example * * ```javascript * const ok = cedarling.is_trusted_issuer_loaded_by_iss("https://issuer.example.org"); * ``` */ is_trusted_issuer_loaded_by_iss(iss_claim: string): boolean; /** * Check whether a trusted issuer was loaded by issuer identifier. * * # Arguments * * * `issuer_id` - Trusted issuer identifier to check. * * # Example * * ```javascript * const ok = cedarling.is_trusted_issuer_loaded_by_name("issuer_id"); * ``` */ is_trusted_issuer_loaded_by_name(issuer_id: string): boolean; /** * List all entries with their metadata. * Returns an array of DataEntry objects. * * # Example * * ```javascript * const entries = cedarling.list_data_ctx(); * entries.forEach(entry => { * console.log(`${entry.key}: ${entry.data_type} (accessed ${entry.access_count} times)`); * }); * ``` */ list_data_ctx(): Array; /** * Get trusted issuer identifiers loaded successfully. * * # Example * * ```javascript * const ids = cedarling.loaded_trusted_issuer_ids(); * ``` */ loaded_trusted_issuer_ids(): Array; /** * Get the number of trusted issuers loaded successfully. * * # Example * * ```javascript * const loadedCount = cedarling.loaded_trusted_issuers_count(); * ``` */ loaded_trusted_issuers_count(): number; /** * Create a new instance of the Cedarling application. * Assume that config is `Object` */ static new(config: object): Promise; /** * Create a new instance of the Cedarling application. * Assume that config is `Map` */ static new_from_map(config: Map): Promise; /** * Get logs and remove them from the storage. * Returns `Array` of `Map` */ pop_logs(): Array; /** * Push a value into the data store with an optional TTL. * If the key already exists, the value will be replaced. * If TTL is not provided, the default TTL from configuration is used. * * # Arguments * * * `key` - A string key for the data entry (must not be empty) * * `value` - The value to store (any JSON-serializable JavaScript value: object, array, string, number, boolean) * * `ttl_secs` - Optional TTL in seconds (undefined/null uses default from config) * * # Example * * ```javascript * cedarling.push_data_ctx("user:123", { name: "John", age: 30 }, 3600); * cedarling.push_data_ctx("config", { setting: "value" }); // Uses default TTL * ``` */ push_data_ctx(key: string, value: any, ttl_secs?: bigint | null): void; /** * Remove a value from the data store by key. * Returns true if the key existed and was removed, false otherwise. * * # Arguments * * * `key` - A string key for the data entry to remove * * # Example * * ```javascript * const removed = cedarling.remove_data_ctx("user:123"); * if (removed) { * console.log("Entry was successfully removed"); * } * ``` */ remove_data_ctx(key: string): boolean; /** * Closes the connections to the Lock Server and pushes all available logs. */ shut_down(): Promise; /** * Get the total number of trusted issuer entries discovered. * * # Example * * ```javascript * const total = cedarling.total_issuers(); * ``` */ total_issuers(): number; } /** * A WASM wrapper for the Rust `cedarling::DataEntry` struct. * Represents a data entry in the DataStore with value and metadata. */ export class DataEntry { private constructor(); free(): void; [Symbol.dispose](): void; /** * Convert `DataEntry` to json string value */ json_string(): string; /** * Get the value stored in this entry as a JavaScript object */ value(): any; /** * Number of times this entry has been accessed */ access_count: bigint; /** * Timestamp when this entry was created (RFC 3339 format) */ created_at: string; /** * The inferred Cedar type of the value */ data_type: string; /** * Timestamp when this entry expires (RFC 3339 format), or null if no TTL */ get expires_at(): string | undefined; /** * Timestamp when this entry expires (RFC 3339 format), or null if no TTL */ set expires_at(value: string | null | undefined); /** * The key for this entry */ key: string; } /** * A WASM wrapper for the Rust `cedarling::DataStoreStats` struct. * Statistics about the DataStore. */ export class DataStoreStats { private constructor(); free(): void; [Symbol.dispose](): void; /** * Convert `DataStoreStats` to json string value */ json_string(): string; /** * Average size per entry in bytes (0 if no entries) */ avg_entry_size_bytes: number; /** * Percentage of capacity used (0.0-100.0, based on entry count) */ capacity_usage_percent: number; /** * Number of entries currently stored */ entry_count: number; /** * Maximum number of entries allowed (0 = unlimited) */ max_entries: number; /** * Maximum size per entry in bytes (0 = unlimited) */ max_entry_size: number; /** * Memory usage threshold percentage (from config) */ memory_alert_threshold: number; /** * Whether memory usage exceeds the alert threshold */ memory_alert_triggered: boolean; /** * Whether metrics tracking is enabled */ metrics_enabled: boolean; /** * Total size of all entries in bytes (approximate, based on JSON serialization) */ total_size_bytes: number; } /** * Diagnostics * =========== * * Provides detailed information about how a policy decision was made, including policies that contributed to the decision and any errors encountered during evaluation. */ export class Diagnostics { private constructor(); free(): void; [Symbol.dispose](): void; /** * Errors that occurred during authorization. The errors should be * treated as unordered, since policies may be evaluated in any order. */ readonly errors: PolicyEvaluationError[]; /** * `PolicyId`s of the policies that contributed to the decision. * If no policies applied to the request, this set will be empty. * * The ids should be treated as unordered, */ readonly reason: string[]; } export class IntoUnderlyingByteSource { private constructor(); free(): void; [Symbol.dispose](): void; cancel(): void; pull(controller: ReadableByteStreamController): Promise; start(controller: ReadableByteStreamController): void; readonly autoAllocateChunkSize: number; readonly type: ReadableStreamType; } export class IntoUnderlyingSink { private constructor(); free(): void; [Symbol.dispose](): void; abort(reason: any): Promise; close(): Promise; write(chunk: any): Promise; } export class IntoUnderlyingSource { private constructor(); free(): void; [Symbol.dispose](): void; cancel(): void; pull(controller: ReadableStreamDefaultController): Promise; } /** * A WASM wrapper for the Rust `cedarling::MultiIssuerAuthorizeResult` struct. * Represents the result of a multi-issuer authorization request. */ export class MultiIssuerAuthorizeResult { private constructor(); free(): void; [Symbol.dispose](): void; /** * Convert `MultiIssuerAuthorizeResult` to json string value */ json_string(): string; /** * Result of authorization * true means `ALLOW` * false means `Deny` */ decision: boolean; /** * Request ID of the authorization request */ request_id: string; /** * Result of Cedar policy authorization */ response: AuthorizeResultResponse; } /** * PolicyEvaluationError * ===================== * * Represents an error that occurred when evaluating a Cedar policy. */ export class PolicyEvaluationError { private constructor(); free(): void; [Symbol.dispose](): void; /** * Underlying evaluation error string representation */ readonly error: string; /** * Id of the policy with an error */ readonly id: string; } /** * Create a new instance of the Cedarling application. * This function can take as config parameter the eather `Map` other `Object` */ export function init(config: any): Promise; /** * Create a new instance of the Cedarling application from archive bytes. * * This function allows loading a policy store from a Cedar Archive (.cjar) * that was fetched with custom logic (e.g., with authentication headers). * * # Arguments * * `config` - Bootstrap configuration (Map or Object). Policy store config is ignored. * * `archive_bytes` - The .cjar archive bytes (Uint8Array) * * # Example * ```javascript * const response = await fetch(url, { headers: { Authorization: 'Bearer ...' } }); * const bytes = new Uint8Array(await response.arrayBuffer()); * const cedarling = await init_from_archive_bytes(config, bytes); * ``` */ export function init_from_archive_bytes(config: any, archive_bytes: Uint8Array): Promise; export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly __wbg_authorizeresult_free: (a: number, b: number) => void; readonly __wbg_authorizeresultresponse_free: (a: number, b: number) => void; readonly __wbg_batchauthorizemultiissuerresponse_free: (a: number, b: number) => void; readonly __wbg_batchitemerror_free: (a: number, b: number) => void; readonly __wbg_batchitemmultiissuerresult_free: (a: number, b: number) => void; readonly __wbg_cedarling_free: (a: number, b: number) => void; readonly __wbg_dataentry_free: (a: number, b: number) => void; readonly __wbg_datastorestats_free: (a: number, b: number) => void; readonly __wbg_diagnostics_free: (a: number, b: number) => void; readonly __wbg_get_authorizeresult_decision: (a: number) => number; readonly __wbg_get_authorizeresult_request_id: (a: number, b: number) => void; readonly __wbg_get_authorizeresult_response: (a: number) => number; readonly __wbg_get_dataentry_access_count: (a: number) => bigint; readonly __wbg_get_dataentry_created_at: (a: number, b: number) => void; readonly __wbg_get_dataentry_data_type: (a: number, b: number) => void; readonly __wbg_get_dataentry_expires_at: (a: number, b: number) => void; readonly __wbg_get_dataentry_key: (a: number, b: number) => void; readonly __wbg_get_datastorestats_avg_entry_size_bytes: (a: number) => number; readonly __wbg_get_datastorestats_capacity_usage_percent: (a: number) => number; readonly __wbg_get_datastorestats_entry_count: (a: number) => number; readonly __wbg_get_datastorestats_max_entries: (a: number) => number; readonly __wbg_get_datastorestats_max_entry_size: (a: number) => number; readonly __wbg_get_datastorestats_memory_alert_threshold: (a: number) => number; readonly __wbg_get_datastorestats_memory_alert_triggered: (a: number) => number; readonly __wbg_get_datastorestats_metrics_enabled: (a: number) => number; readonly __wbg_get_datastorestats_total_size_bytes: (a: number) => number; readonly __wbg_policyevaluationerror_free: (a: number, b: number) => void; readonly __wbg_set_authorizeresult_decision: (a: number, b: number) => void; readonly __wbg_set_authorizeresult_request_id: (a: number, b: number, c: number) => void; readonly __wbg_set_authorizeresult_response: (a: number, b: number) => void; readonly __wbg_set_dataentry_access_count: (a: number, b: bigint) => void; readonly __wbg_set_dataentry_created_at: (a: number, b: number, c: number) => void; readonly __wbg_set_dataentry_data_type: (a: number, b: number, c: number) => void; readonly __wbg_set_dataentry_expires_at: (a: number, b: number, c: number) => void; readonly __wbg_set_dataentry_key: (a: number, b: number, c: number) => void; readonly __wbg_set_datastorestats_avg_entry_size_bytes: (a: number, b: number) => void; readonly __wbg_set_datastorestats_capacity_usage_percent: (a: number, b: number) => void; readonly __wbg_set_datastorestats_entry_count: (a: number, b: number) => void; readonly __wbg_set_datastorestats_max_entries: (a: number, b: number) => void; readonly __wbg_set_datastorestats_max_entry_size: (a: number, b: number) => void; readonly __wbg_set_datastorestats_memory_alert_threshold: (a: number, b: number) => void; readonly __wbg_set_datastorestats_memory_alert_triggered: (a: number, b: number) => void; readonly __wbg_set_datastorestats_metrics_enabled: (a: number, b: number) => void; readonly __wbg_set_datastorestats_total_size_bytes: (a: number, b: number) => void; readonly authorizeresult_json_string: (a: number, b: number) => void; readonly authorizeresultresponse_decision: (a: number) => number; readonly authorizeresultresponse_diagnostics: (a: number) => number; readonly batchauthorizemultiissuerresponse_batch_id: (a: number, b: number) => void; readonly batchauthorizemultiissuerresponse_results: (a: number, b: number) => void; readonly batchauthorizeunsignedresponse_results: (a: number, b: number) => void; readonly batchitemerror_category: (a: number, b: number) => void; readonly batchitemerror_item_index: (a: number) => number; readonly batchitemerror_message: (a: number, b: number) => void; readonly batchitemmultiissuerresult_error: (a: number) => number; readonly batchitemmultiissuerresult_is_ok: (a: number) => number; readonly batchitemmultiissuerresult_unwrap: (a: number, b: number) => void; readonly batchitemunsignedresult_unwrap: (a: number, b: number) => void; readonly cedarling_annotation_values: (a: number, b: number, c: number, d: number, e: number, f: number) => void; readonly cedarling_annotations_by_policy: (a: number, b: number, c: number, d: number) => void; readonly cedarling_annotations_map: (a: number, b: number, c: number, d: number) => void; readonly cedarling_authorize_multi_issuer: (a: number, b: number, c: number) => number; readonly cedarling_authorize_multi_issuer_batch: (a: number, b: number, c: number) => number; readonly cedarling_authorize_unsigned: (a: number, b: number, c: number) => number; readonly cedarling_authorize_unsigned_batch: (a: number, b: number, c: number) => number; readonly cedarling_clear_data_ctx: (a: number, b: number) => void; readonly cedarling_failed_trusted_issuer_ids: (a: number) => number; readonly cedarling_get_data_ctx: (a: number, b: number, c: number, d: number) => void; readonly cedarling_get_data_entry_ctx: (a: number, b: number, c: number, d: number) => void; readonly cedarling_get_log_by_id: (a: number, b: number, c: number, d: number) => void; readonly cedarling_get_log_ids: (a: number) => number; readonly cedarling_get_logs_by_request_id: (a: number, b: number, c: number, d: number) => void; readonly cedarling_get_logs_by_request_id_and_tag: (a: number, b: number, c: number, d: number, e: number, f: number) => void; readonly cedarling_get_stats_ctx: (a: number, b: number) => void; readonly cedarling_is_trusted_issuer_loaded_by_iss: (a: number, b: number, c: number) => number; readonly cedarling_is_trusted_issuer_loaded_by_name: (a: number, b: number, c: number) => number; readonly cedarling_list_data_ctx: (a: number, b: number) => void; readonly cedarling_loaded_trusted_issuer_ids: (a: number) => number; readonly cedarling_loaded_trusted_issuers_count: (a: number) => number; readonly cedarling_new: (a: number) => number; readonly cedarling_new_from_map: (a: number) => number; readonly cedarling_pop_logs: (a: number, b: number) => void; readonly cedarling_push_data_ctx: (a: number, b: number, c: number, d: number, e: number, f: number, g: bigint) => void; readonly cedarling_remove_data_ctx: (a: number, b: number, c: number, d: number) => void; readonly cedarling_shut_down: (a: number) => number; readonly cedarling_total_issuers: (a: number) => number; readonly dataentry_json_string: (a: number, b: number) => void; readonly dataentry_value: (a: number, b: number) => void; readonly datastorestats_json_string: (a: number, b: number) => void; readonly diagnostics_errors: (a: number, b: number) => void; readonly diagnostics_reason: (a: number, b: number) => void; readonly init: (a: number) => number; readonly init_from_archive_bytes: (a: number, b: number) => number; readonly multiissuerauthorizeresult_json_string: (a: number, b: number) => void; readonly policyevaluationerror_error: (a: number, b: number) => void; readonly policyevaluationerror_id: (a: number, b: number) => void; readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void; readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void; readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void; readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number; readonly intounderlyingbytesource_cancel: (a: number) => void; readonly intounderlyingbytesource_pull: (a: number, b: number) => number; readonly intounderlyingbytesource_start: (a: number, b: number) => void; readonly intounderlyingbytesource_type: (a: number) => number; readonly intounderlyingsink_abort: (a: number, b: number) => number; readonly intounderlyingsink_close: (a: number) => number; readonly intounderlyingsink_write: (a: number, b: number) => number; readonly intounderlyingsource_cancel: (a: number) => void; readonly intounderlyingsource_pull: (a: number, b: number) => number; readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number; readonly rust_zstd_wasm_shim_free: (a: number) => void; readonly rust_zstd_wasm_shim_malloc: (a: number) => number; readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void; readonly __wbg_get_multiissuerauthorizeresult_decision: (a: number) => number; readonly __wbg_set_multiissuerauthorizeresult_response: (a: number, b: number) => void; readonly __wbg_set_multiissuerauthorizeresult_request_id: (a: number, b: number, c: number) => void; readonly __wbg_set_multiissuerauthorizeresult_decision: (a: number, b: number) => void; readonly __wbg_get_multiissuerauthorizeresult_response: (a: number) => number; readonly __wbg_get_multiissuerauthorizeresult_request_id: (a: number, b: number) => void; readonly __wbg_multiissuerauthorizeresult_free: (a: number, b: number) => void; readonly __wbg_batchitemunsignedresult_free: (a: number, b: number) => void; readonly __wbg_batchauthorizeunsignedresponse_free: (a: number, b: number) => void; readonly batchitemunsignedresult_is_ok: (a: number) => number; readonly batchitemunsignedresult_error: (a: number) => number; readonly batchauthorizeunsignedresponse_batch_id: (a: number, b: number) => void; readonly cedarling_get_logs_by_tag: (a: number, b: number, c: number, d: number) => void; readonly __wasm_bindgen_func_elem_8906: (a: number, b: number, c: number, d: number) => void; readonly __wasm_bindgen_func_elem_8972: (a: number, b: number, c: number, d: number) => void; readonly __wasm_bindgen_func_elem_12458: (a: number, b: number, c: number) => void; readonly __wasm_bindgen_func_elem_8741: (a: number, b: number) => void; readonly __wbindgen_export: (a: number, b: number) => number; readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_export3: (a: number) => void; readonly __wbindgen_export4: (a: number, b: number) => void; readonly __wbindgen_add_to_stack_pointer: (a: number) => number; readonly __wbindgen_export5: (a: number, b: number, c: number) => void; } export type SyncInitInput = BufferSource | WebAssembly.Module; /** * Instantiates the given `module`, which can either be bytes or * a precompiled `WebAssembly.Module`. * * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. * * @returns {InitOutput} */ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. * * @returns {Promise} */ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise;