@tinycloud/sdk-services 3.2.6-beta.4 → 3.3.0-beta.11
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/dist/{BaseService-1Ug6y7DC.d.cts → BaseService-Cc6Ueicm.d.cts} +1 -1
- package/dist/{BaseService-Bn07Vudy.d.ts → BaseService-DOdXd7sr.d.ts} +1 -1
- package/dist/encryption/index.cjs +8 -0
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +2 -2
- package/dist/encryption/index.d.ts +2 -2
- package/dist/encryption/index.js +8 -0
- package/dist/encryption/index.js.map +1 -1
- package/dist/index.cjs +345 -203
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +107 -7
- package/dist/index.d.ts +107 -7
- package/dist/index.js +344 -203
- package/dist/index.js.map +1 -1
- package/dist/internal/decrypt-transport-response-error.d.cts +1 -1
- package/dist/internal/decrypt-transport-response-error.d.ts +1 -1
- package/dist/kv/index.cjs +66 -21
- package/dist/kv/index.cjs.map +1 -1
- package/dist/kv/index.d.cts +4 -4
- package/dist/kv/index.d.ts +4 -4
- package/dist/kv/index.js +66 -21
- package/dist/kv/index.js.map +1 -1
- package/dist/kv/replication/grantPolicy.cjs +82 -0
- package/dist/kv/replication/grantPolicy.cjs.map +1 -0
- package/dist/kv/replication/grantPolicy.d.cts +19 -0
- package/dist/kv/replication/grantPolicy.d.ts +19 -0
- package/dist/kv/replication/grantPolicy.js +50 -0
- package/dist/kv/replication/grantPolicy.js.map +1 -0
- package/dist/kv/replication/index.cjs +571 -128
- package/dist/kv/replication/index.cjs.map +1 -1
- package/dist/kv/replication/index.d.cts +3 -3
- package/dist/kv/replication/index.d.ts +3 -3
- package/dist/kv/replication/index.js +571 -128
- package/dist/kv/replication/index.js.map +1 -1
- package/dist/{scope-BnyVPZ5E.d.ts → scope-B-m6cKH-.d.ts} +310 -7
- package/dist/{scope-CQ5kmHlt.d.cts → scope-B7oeKdLM.d.cts} +310 -7
- package/dist/sql/index.cjs +70 -36
- package/dist/sql/index.cjs.map +1 -1
- package/dist/sql/index.d.cts +2 -2
- package/dist/sql/index.d.ts +2 -2
- package/dist/sql/index.js +70 -36
- package/dist/sql/index.js.map +1 -1
- package/dist/{types-gmdUiorz.d.cts → types-BjH0ZtGy.d.cts} +6 -0
- package/dist/{types-gmdUiorz.d.ts → types-BjH0ZtGy.d.ts} +6 -0
- package/package.json +16 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as IServiceContext, c as InvokeFunction, d as InvokeAnyFunction, F as FetchFunction, S as ServiceSession, e as RetryPolicy, T as TelemetryConfig, I as IService, E as EventHandler, b as ServiceError, R as Result, P as PermissionHint, f as StorageQuotaInfo } from './types-
|
|
2
|
-
export { g as ErrorCode, h as ErrorCodes, i as FetchRequestInit, j as FetchResponse, k as InvocationFact, l as InvocationFacts, m as InvokeAnyEntry, n as ServiceErrorEvent, o as ServiceHeaders, p as ServiceRequestEvent, q as ServiceResponseEvent, r as ServiceRetryEvent, s as TelemetryEventHandler, t as TelemetryEvents, u as TelemetrySpanEvent, v as defaultRetryPolicy, w as err, x as ok, y as serviceError } from './types-
|
|
1
|
+
import { a as IServiceContext, c as InvokeFunction, d as InvokeAnyFunction, F as FetchFunction, S as ServiceSession, e as RetryPolicy, T as TelemetryConfig, I as IService, E as EventHandler, b as ServiceError, R as Result, P as PermissionHint, f as StorageQuotaInfo } from './types-BjH0ZtGy.cjs';
|
|
2
|
+
export { g as ErrorCode, h as ErrorCodes, i as FetchRequestInit, j as FetchResponse, k as InvocationFact, l as InvocationFacts, m as InvokeAnyEntry, n as ServiceErrorEvent, o as ServiceHeaders, p as ServiceRequestEvent, q as ServiceResponseEvent, r as ServiceRetryEvent, s as TelemetryEventHandler, t as TelemetryEvents, u as TelemetrySpanEvent, v as defaultRetryPolicy, w as err, x as ok, y as serviceError } from './types-BjH0ZtGy.cjs';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { B as BaseService } from './BaseService-
|
|
5
|
-
export { a as BaseServiceOptions, R as RequestSignal, S as ServiceConstructor, b as ServiceRegistration } from './BaseService-
|
|
4
|
+
import { B as BaseService } from './BaseService-Cc6Ueicm.cjs';
|
|
5
|
+
export { a as BaseServiceOptions, R as RequestSignal, S as ServiceConstructor, b as ServiceRegistration } from './BaseService-Cc6Ueicm.cjs';
|
|
6
6
|
import { IKVService } from './kv/index.cjs';
|
|
7
7
|
export { IPrefixedKVService, KVService, PrefixedKVService } from './kv/index.cjs';
|
|
8
|
-
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING,
|
|
8
|
+
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, aq as DEFAULT_SIGNED_READ_URL_EXPIRY_MS, ar as KVAction, as as KVActionType, at as KVBatchPutItem, au as KVBatchPutOptions, av as KVBatchPutResponse, aw as KVBatchReadResponse, ax as KVChange, ay as KVChangesAuthority, az as KVChangesOptions, aA as KVChangesResponse, aB as KVCreateSignedReadUrlOptions, aC as KVDeleteOptions, aD as KVGetOptions, aE as KVHeadOptions, aF as KVListOptions, b as KVListPage, aG as KVListResponse, aH as KVPutOptions, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, a as KVReplicationController, K as KVReplicationDeps, aI as KVResponse, aJ as KVResponseHeaders, aK as KVServiceConfig, aL as KVSignedReadUrlResponse, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, P as PendingWriteStore, m as PinnedKey, w as PurgeTarget, x as ReplicaAccountGate, y as ReplicaAdmitHook, z as ReplicaAuthorityState, B as ReplicaBrowserGateAccess, D as ReplicaBrowserGateSnapshot, E as ReplicaBrowserGateTx, F as ReplicaBrowserPageAdmission, G as ReplicaClock, H as ReplicaCoverage, I as ReplicaDeliveryDecision, J as ReplicaDenyInput, M as ReplicaDenyOutcome, N as ReplicaDevice, O as ReplicaEraseReport, Q as ReplicaGateAccess, S as ReplicaGateReason, T as ReplicaGateScope, U as ReplicaGateSnapshot, V as ReplicaGateTx, W as ReplicaGatedError, X as ReplicaGatedHandle, Y as ReplicaGatedSpec, Z as ReplicaGatedStorage, _ as ReplicaGrantInfo, $ as ReplicaGuardedStore, a0 as ReplicaInspectedStatus, a1 as ReplicaLifecycleGate, a2 as ReplicaPageAdmission, a3 as ReplicaPartitionEraser, a4 as ReplicaPartitionIndexEntry, a5 as ReplicaPeerCommit, a6 as ReplicaPrivateGateHash, a7 as ReplicaPurgeIntent, a8 as ReplicaQuotaLedger, a9 as ReplicaQuotaSpec, aa as ReplicaSessionStamp, ab as ReplicaStampedReply, ac as ReplicaState, ad as ReplicaStatusEntry, ae as ReplicationAuthority, af as ReplicationControl, ag as ReplicationEvent, R as ReplicationIdentity, ah as ReplicationOptions, ai as ReplicationPurgeReport, aj as ReplicationReason, ak as ReplicationScheduler, al as ResolvedReplicationOptions, am as SaltedHash, an as canonicalReplicationIdentity, ao as replicationIdentityKey, ap as requiresSecretsOptIn } from './scope-B7oeKdLM.cjs';
|
|
9
9
|
export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './kv/replication/grantPolicyTypes.cjs';
|
|
10
10
|
export { BatchOptions, BatchResponse, DatabaseHandle, ExecuteOptions, ExecuteResponse, IDatabaseHandle, ISQLMigrations, ISQLService, QueryOptions, QueryResponse, SQLAction, SQLActionType, SQLMigrations, SQLService, SQLServiceConfig, SqlMigration, SqlMigrationApplyOptions, SqlMigrationApplyResponse, SqlStatement, SqlValue } from './sql/index.cjs';
|
|
11
11
|
import { IEncryptionService, DecryptCapabilityProof } from './encryption/index.cjs';
|
|
@@ -1057,6 +1057,29 @@ declare function authExpiredError(service: string): ServiceError;
|
|
|
1057
1057
|
* Create a service error for network issues.
|
|
1058
1058
|
*/
|
|
1059
1059
|
declare function networkError(service: string, message: string, cause?: Error): ServiceError;
|
|
1060
|
+
/**
|
|
1061
|
+
* Classify a node retry signal (tinycloud-node #347, TC-1054). The node's
|
|
1062
|
+
* bodies are plain text led by a stable token:
|
|
1063
|
+
* - `503 sql_busy: <stage>: ...` and `503 unavailable_retryable: ...` are
|
|
1064
|
+
* `NODE_BUSY`: nothing was applied; retry after `meta.retryAfterMs`.
|
|
1065
|
+
* - `503 request_timeout: ...` is `REQUEST_TIMEOUT`: the deadline passed before
|
|
1066
|
+
* any write began, so nothing was applied.
|
|
1067
|
+
* - `500 outcome_unknown: ...` is `OUTCOME_UNKNOWN`: a write may have been
|
|
1068
|
+
* applied; read back before retrying a non-idempotent operation.
|
|
1069
|
+
*
|
|
1070
|
+
* `meta.retryable` is the safe-to-retry verdict and `meta.retryAfterMs` the
|
|
1071
|
+
* node's `Retry-After` (the node sends whole seconds; anything else is
|
|
1072
|
+
* ignored). The SDK never retries on its own. Returns `undefined` for any
|
|
1073
|
+
* other response, including the bodyless 503/500 of nodes before 1.21, which
|
|
1074
|
+
* callers keep classifying as they always did.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function nodeRetryError(service: string, message: string, response: {
|
|
1077
|
+
status: number;
|
|
1078
|
+
statusText: string;
|
|
1079
|
+
headers: {
|
|
1080
|
+
get(name: string): string | null;
|
|
1081
|
+
};
|
|
1082
|
+
}, errorText: string): ServiceError | undefined;
|
|
1060
1083
|
/**
|
|
1061
1084
|
* Create a service error for timeouts.
|
|
1062
1085
|
*
|
|
@@ -1871,6 +1894,19 @@ interface VaultPutOptions {
|
|
|
1871
1894
|
* fails with `ALREADY_EXISTS`; it is never overwritten.
|
|
1872
1895
|
*/
|
|
1873
1896
|
ifNoneMatch?: "*";
|
|
1897
|
+
/**
|
|
1898
|
+
* Compare-and-swap: write only when the stored envelope still has this
|
|
1899
|
+
* strong ETag, passed exactly as {@link VaultEntry.etag} returned it
|
|
1900
|
+
* (including the quotes). Network-encrypted vaults only; cannot be combined
|
|
1901
|
+
* with `ifNoneMatch`.
|
|
1902
|
+
*
|
|
1903
|
+
* Failures are distinct codes: `ETAG_MISMATCH` (the value changed or was
|
|
1904
|
+
* deleted: re-read, re-apply, retry), `INVALID_ETAG` (malformed; never
|
|
1905
|
+
* retry), `OUTCOME_UNKNOWN` (the node may have applied the write, or a gateway
|
|
1906
|
+
* answered for it: read it back before retrying, with a freshly signed request) and `NODE_BUSY`
|
|
1907
|
+
* (nothing was written; retry).
|
|
1908
|
+
*/
|
|
1909
|
+
ifMatch?: string;
|
|
1874
1910
|
}
|
|
1875
1911
|
/**
|
|
1876
1912
|
* Options for vault get operations.
|
|
@@ -1880,8 +1916,25 @@ interface VaultGetOptions<T = unknown> {
|
|
|
1880
1916
|
deserialize?: (data: Uint8Array) => T;
|
|
1881
1917
|
/** Return raw decrypted bytes without deserialization */
|
|
1882
1918
|
raw?: boolean;
|
|
1883
|
-
/**
|
|
1919
|
+
/**
|
|
1920
|
+
* Force the underlying KV read to bypass replica read-through. Required for
|
|
1921
|
+
* a usable {@link VaultEntry.etag}: only network reads return one, because
|
|
1922
|
+
* a replica can serve a stale etag.
|
|
1923
|
+
*/
|
|
1884
1924
|
source?: "network";
|
|
1925
|
+
/**
|
|
1926
|
+
* Opt-in (default off): refuse an envelope whose AAD is not bound to this
|
|
1927
|
+
* vault's space and this key (`tinycloud.vault:<spaceId>:<key>`). The space
|
|
1928
|
+
* id is compared after normalizing the spelling of its EVM addresses
|
|
1929
|
+
* (checksummed and lowercase are the same space). An envelope with no AAD,
|
|
1930
|
+
* or with a different one, fails with `AAD_MISMATCH` (`aad_mismatch` from
|
|
1931
|
+
* `readNetworkEncrypted`) instead of decrypting. This stops a ciphertext
|
|
1932
|
+
* copied to another key from being accepted; it does not stop a freshly
|
|
1933
|
+
* encrypted forgery. A malformed stored value is a corrupt envelope, as without this
|
|
1934
|
+
* option. Network-encrypted vaults only: a master-key vault and `getShared` refuse it with
|
|
1935
|
+
* `STORAGE_ERROR` rather than skip the check.
|
|
1936
|
+
*/
|
|
1937
|
+
expectAad?: boolean;
|
|
1885
1938
|
/** Delegated KV service for reading from the grantor's space (used by getShared) */
|
|
1886
1939
|
kv?: {
|
|
1887
1940
|
get<V>(key: string, options?: {
|
|
@@ -1936,6 +1989,12 @@ interface VaultEntry<T> {
|
|
|
1936
1989
|
metadata: Record<string, string>;
|
|
1937
1990
|
/** Key ID used for encryption */
|
|
1938
1991
|
keyId: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* Strong ETag of the stored envelope, for {@link VaultPutOptions.ifMatch}.
|
|
1994
|
+
* Present only for network-encrypted reads made with `source: "network"`
|
|
1995
|
+
* (always for `readNetworkEncrypted`); never taken from a replica.
|
|
1996
|
+
*/
|
|
1997
|
+
etag?: string;
|
|
1939
1998
|
}
|
|
1940
1999
|
/**
|
|
1941
2000
|
* Safe classification for a network-encrypted vault read.
|
|
@@ -1962,6 +2021,10 @@ type VaultNetworkReadResult<T> = {
|
|
|
1962
2021
|
status: "decrypt_failed";
|
|
1963
2022
|
} | {
|
|
1964
2023
|
status: "invalid_payload";
|
|
2024
|
+
}
|
|
2025
|
+
/** Only with `expectAad`: the envelope is not bound to this space and key. */
|
|
2026
|
+
| {
|
|
2027
|
+
status: "aad_mismatch";
|
|
1965
2028
|
};
|
|
1966
2029
|
/**
|
|
1967
2030
|
* Structured error codes for vault operations.
|
|
@@ -2019,6 +2082,43 @@ type VaultErrorInput = {
|
|
|
2019
2082
|
meta?: Record<string, unknown>;
|
|
2020
2083
|
/** The typed KV error that refused the write (an `Error` carrying its `code`, `service` and `meta`). */
|
|
2021
2084
|
cause: ServiceError & Error;
|
|
2085
|
+
} | {
|
|
2086
|
+
/** `expectAad` read: the envelope's AAD is missing or bound to another space/key. */
|
|
2087
|
+
code: "AAD_MISMATCH";
|
|
2088
|
+
key: string;
|
|
2089
|
+
message: string;
|
|
2090
|
+
} | {
|
|
2091
|
+
/** `ifMatch` write refused (HTTP 412): the value changed or no longer exists. Re-read and retry. */
|
|
2092
|
+
code: "ETAG_MISMATCH";
|
|
2093
|
+
key: string;
|
|
2094
|
+
message: string;
|
|
2095
|
+
meta?: Record<string, unknown>;
|
|
2096
|
+
cause: ServiceError & Error;
|
|
2097
|
+
} | {
|
|
2098
|
+
/** `ifMatch` is not a strong ETag (HTTP 400, or rejected before sending). Never retry. */
|
|
2099
|
+
code: "INVALID_ETAG";
|
|
2100
|
+
key: string;
|
|
2101
|
+
message: string;
|
|
2102
|
+
meta?: Record<string, unknown>;
|
|
2103
|
+
cause?: ServiceError & Error;
|
|
2104
|
+
} | {
|
|
2105
|
+
/**
|
|
2106
|
+
* `ifMatch` write that may have been applied: the node's `outcome_unknown` (500), a gateway
|
|
2107
|
+
* answer that can follow a commit (500, 502, 503 without the node's busy body, 504, 520,
|
|
2108
|
+
* 522, 524) or a connection that failed after the request was sent. Re-read before retrying.
|
|
2109
|
+
*/
|
|
2110
|
+
code: "OUTCOME_UNKNOWN";
|
|
2111
|
+
key: string;
|
|
2112
|
+
message: string;
|
|
2113
|
+
meta?: Record<string, unknown>;
|
|
2114
|
+
cause: ServiceError & Error;
|
|
2115
|
+
} | {
|
|
2116
|
+
/** `ifMatch` write, the node's own busy/timeout answer (503 with its busy body): nothing was written. Safe to retry. */
|
|
2117
|
+
code: "NODE_BUSY";
|
|
2118
|
+
key: string;
|
|
2119
|
+
message: string;
|
|
2120
|
+
meta?: Record<string, unknown>;
|
|
2121
|
+
cause: ServiceError & Error;
|
|
2022
2122
|
} | {
|
|
2023
2123
|
code: "STORAGE_QUOTA_EXCEEDED" | "STORAGE_LIMIT_REACHED";
|
|
2024
2124
|
message: string;
|
|
@@ -2584,4 +2684,4 @@ declare class SecretsService implements ISecretsService {
|
|
|
2584
2684
|
listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
|
|
2585
2685
|
}
|
|
2586
2686
|
|
|
2587
|
-
export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, type IStorageService, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, MAX_SECRET_SCOPE_LENGTH, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, SECRET_SCOPE_RE, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretPutOptions, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, type StorageAccountUsage, type StorageFullEvent, type StorageFullHandler, StorageFullMonitor, StorageQuotaInfo, type StorageRejectionDetails, type StorageStatus, type StorageStatusOptions, type StorageUsage, type StorageUsageState, type SubscribeOptions, TC832_RESERVED_SCOPES, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, appSecretScope, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, parseStorageRejection, parseStorageStatus, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, storageUsageState, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
|
|
2687
|
+
export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, type IStorageService, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, MAX_SECRET_SCOPE_LENGTH, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, SECRET_SCOPE_RE, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretPutOptions, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, type StorageAccountUsage, type StorageFullEvent, type StorageFullHandler, StorageFullMonitor, StorageQuotaInfo, type StorageRejectionDetails, type StorageStatus, type StorageStatusOptions, type StorageUsage, type StorageUsageState, type SubscribeOptions, TC832_RESERVED_SCOPES, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, appSecretScope, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, nodeRetryError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, parseStorageRejection, parseStorageStatus, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, storageUsageState, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as IServiceContext, c as InvokeFunction, d as InvokeAnyFunction, F as FetchFunction, S as ServiceSession, e as RetryPolicy, T as TelemetryConfig, I as IService, E as EventHandler, b as ServiceError, R as Result, P as PermissionHint, f as StorageQuotaInfo } from './types-
|
|
2
|
-
export { g as ErrorCode, h as ErrorCodes, i as FetchRequestInit, j as FetchResponse, k as InvocationFact, l as InvocationFacts, m as InvokeAnyEntry, n as ServiceErrorEvent, o as ServiceHeaders, p as ServiceRequestEvent, q as ServiceResponseEvent, r as ServiceRetryEvent, s as TelemetryEventHandler, t as TelemetryEvents, u as TelemetrySpanEvent, v as defaultRetryPolicy, w as err, x as ok, y as serviceError } from './types-
|
|
1
|
+
import { a as IServiceContext, c as InvokeFunction, d as InvokeAnyFunction, F as FetchFunction, S as ServiceSession, e as RetryPolicy, T as TelemetryConfig, I as IService, E as EventHandler, b as ServiceError, R as Result, P as PermissionHint, f as StorageQuotaInfo } from './types-BjH0ZtGy.js';
|
|
2
|
+
export { g as ErrorCode, h as ErrorCodes, i as FetchRequestInit, j as FetchResponse, k as InvocationFact, l as InvocationFacts, m as InvokeAnyEntry, n as ServiceErrorEvent, o as ServiceHeaders, p as ServiceRequestEvent, q as ServiceResponseEvent, r as ServiceRetryEvent, s as TelemetryEventHandler, t as TelemetryEvents, u as TelemetrySpanEvent, v as defaultRetryPolicy, w as err, x as ok, y as serviceError } from './types-BjH0ZtGy.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { B as BaseService } from './BaseService-
|
|
5
|
-
export { a as BaseServiceOptions, R as RequestSignal, S as ServiceConstructor, b as ServiceRegistration } from './BaseService-
|
|
4
|
+
import { B as BaseService } from './BaseService-DOdXd7sr.js';
|
|
5
|
+
export { a as BaseServiceOptions, R as RequestSignal, S as ServiceConstructor, b as ServiceRegistration } from './BaseService-DOdXd7sr.js';
|
|
6
6
|
import { IKVService } from './kv/index.js';
|
|
7
7
|
export { IPrefixedKVService, KVService, PrefixedKVService } from './kv/index.js';
|
|
8
|
-
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING,
|
|
8
|
+
export { A as AuthorityRefusal, C as CLEAR_PENDING_WARNING, aq as DEFAULT_SIGNED_READ_URL_EXPIRY_MS, ar as KVAction, as as KVActionType, at as KVBatchPutItem, au as KVBatchPutOptions, av as KVBatchPutResponse, aw as KVBatchReadResponse, ax as KVChange, ay as KVChangesAuthority, az as KVChangesOptions, aA as KVChangesResponse, aB as KVCreateSignedReadUrlOptions, aC as KVDeleteOptions, aD as KVGetOptions, aE as KVHeadOptions, aF as KVListOptions, b as KVListPage, aG as KVListResponse, aH as KVPutOptions, c as KVReadThrough, d as KVReplicaHandle, e as KVReplicaSpec, f as KVReplicaStorage, a as KVReplicationController, K as KVReplicationDeps, aI as KVResponse, aJ as KVResponseHeaders, aK as KVServiceConfig, aL as KVSignedReadUrlResponse, L as LocalGetResult, g as LocalListResult, h as LocalReadMeta, i as LocalReplicaStatus, j as LocalSyncResult, k as PendingWriteRecord, l as PendingWriteState, P as PendingWriteStore, m as PinnedKey, w as PurgeTarget, x as ReplicaAccountGate, y as ReplicaAdmitHook, z as ReplicaAuthorityState, B as ReplicaBrowserGateAccess, D as ReplicaBrowserGateSnapshot, E as ReplicaBrowserGateTx, F as ReplicaBrowserPageAdmission, G as ReplicaClock, H as ReplicaCoverage, I as ReplicaDeliveryDecision, J as ReplicaDenyInput, M as ReplicaDenyOutcome, N as ReplicaDevice, O as ReplicaEraseReport, Q as ReplicaGateAccess, S as ReplicaGateReason, T as ReplicaGateScope, U as ReplicaGateSnapshot, V as ReplicaGateTx, W as ReplicaGatedError, X as ReplicaGatedHandle, Y as ReplicaGatedSpec, Z as ReplicaGatedStorage, _ as ReplicaGrantInfo, $ as ReplicaGuardedStore, a0 as ReplicaInspectedStatus, a1 as ReplicaLifecycleGate, a2 as ReplicaPageAdmission, a3 as ReplicaPartitionEraser, a4 as ReplicaPartitionIndexEntry, a5 as ReplicaPeerCommit, a6 as ReplicaPrivateGateHash, a7 as ReplicaPurgeIntent, a8 as ReplicaQuotaLedger, a9 as ReplicaQuotaSpec, aa as ReplicaSessionStamp, ab as ReplicaStampedReply, ac as ReplicaState, ad as ReplicaStatusEntry, ae as ReplicationAuthority, af as ReplicationControl, ag as ReplicationEvent, R as ReplicationIdentity, ah as ReplicationOptions, ai as ReplicationPurgeReport, aj as ReplicationReason, ak as ReplicationScheduler, al as ResolvedReplicationOptions, am as SaltedHash, an as canonicalReplicationIdentity, ao as replicationIdentityKey, ap as requiresSecretsOptIn } from './scope-B-m6cKH-.js';
|
|
9
9
|
export { ClampConsentAnchor, ConsentDeadlineMs, EffectiveGrantExpiry, EffectiveGrantExpiryInput, MintRemainingMs, NeedsSilentRenewal, ReplicaConsentAnchor, ReplicaConsentSource, ReplicaGrantPolicy } from './kv/replication/grantPolicyTypes.js';
|
|
10
10
|
export { BatchOptions, BatchResponse, DatabaseHandle, ExecuteOptions, ExecuteResponse, IDatabaseHandle, ISQLMigrations, ISQLService, QueryOptions, QueryResponse, SQLAction, SQLActionType, SQLMigrations, SQLService, SQLServiceConfig, SqlMigration, SqlMigrationApplyOptions, SqlMigrationApplyResponse, SqlStatement, SqlValue } from './sql/index.js';
|
|
11
11
|
import { IEncryptionService, DecryptCapabilityProof } from './encryption/index.js';
|
|
@@ -1057,6 +1057,29 @@ declare function authExpiredError(service: string): ServiceError;
|
|
|
1057
1057
|
* Create a service error for network issues.
|
|
1058
1058
|
*/
|
|
1059
1059
|
declare function networkError(service: string, message: string, cause?: Error): ServiceError;
|
|
1060
|
+
/**
|
|
1061
|
+
* Classify a node retry signal (tinycloud-node #347, TC-1054). The node's
|
|
1062
|
+
* bodies are plain text led by a stable token:
|
|
1063
|
+
* - `503 sql_busy: <stage>: ...` and `503 unavailable_retryable: ...` are
|
|
1064
|
+
* `NODE_BUSY`: nothing was applied; retry after `meta.retryAfterMs`.
|
|
1065
|
+
* - `503 request_timeout: ...` is `REQUEST_TIMEOUT`: the deadline passed before
|
|
1066
|
+
* any write began, so nothing was applied.
|
|
1067
|
+
* - `500 outcome_unknown: ...` is `OUTCOME_UNKNOWN`: a write may have been
|
|
1068
|
+
* applied; read back before retrying a non-idempotent operation.
|
|
1069
|
+
*
|
|
1070
|
+
* `meta.retryable` is the safe-to-retry verdict and `meta.retryAfterMs` the
|
|
1071
|
+
* node's `Retry-After` (the node sends whole seconds; anything else is
|
|
1072
|
+
* ignored). The SDK never retries on its own. Returns `undefined` for any
|
|
1073
|
+
* other response, including the bodyless 503/500 of nodes before 1.21, which
|
|
1074
|
+
* callers keep classifying as they always did.
|
|
1075
|
+
*/
|
|
1076
|
+
declare function nodeRetryError(service: string, message: string, response: {
|
|
1077
|
+
status: number;
|
|
1078
|
+
statusText: string;
|
|
1079
|
+
headers: {
|
|
1080
|
+
get(name: string): string | null;
|
|
1081
|
+
};
|
|
1082
|
+
}, errorText: string): ServiceError | undefined;
|
|
1060
1083
|
/**
|
|
1061
1084
|
* Create a service error for timeouts.
|
|
1062
1085
|
*
|
|
@@ -1871,6 +1894,19 @@ interface VaultPutOptions {
|
|
|
1871
1894
|
* fails with `ALREADY_EXISTS`; it is never overwritten.
|
|
1872
1895
|
*/
|
|
1873
1896
|
ifNoneMatch?: "*";
|
|
1897
|
+
/**
|
|
1898
|
+
* Compare-and-swap: write only when the stored envelope still has this
|
|
1899
|
+
* strong ETag, passed exactly as {@link VaultEntry.etag} returned it
|
|
1900
|
+
* (including the quotes). Network-encrypted vaults only; cannot be combined
|
|
1901
|
+
* with `ifNoneMatch`.
|
|
1902
|
+
*
|
|
1903
|
+
* Failures are distinct codes: `ETAG_MISMATCH` (the value changed or was
|
|
1904
|
+
* deleted: re-read, re-apply, retry), `INVALID_ETAG` (malformed; never
|
|
1905
|
+
* retry), `OUTCOME_UNKNOWN` (the node may have applied the write, or a gateway
|
|
1906
|
+
* answered for it: read it back before retrying, with a freshly signed request) and `NODE_BUSY`
|
|
1907
|
+
* (nothing was written; retry).
|
|
1908
|
+
*/
|
|
1909
|
+
ifMatch?: string;
|
|
1874
1910
|
}
|
|
1875
1911
|
/**
|
|
1876
1912
|
* Options for vault get operations.
|
|
@@ -1880,8 +1916,25 @@ interface VaultGetOptions<T = unknown> {
|
|
|
1880
1916
|
deserialize?: (data: Uint8Array) => T;
|
|
1881
1917
|
/** Return raw decrypted bytes without deserialization */
|
|
1882
1918
|
raw?: boolean;
|
|
1883
|
-
/**
|
|
1919
|
+
/**
|
|
1920
|
+
* Force the underlying KV read to bypass replica read-through. Required for
|
|
1921
|
+
* a usable {@link VaultEntry.etag}: only network reads return one, because
|
|
1922
|
+
* a replica can serve a stale etag.
|
|
1923
|
+
*/
|
|
1884
1924
|
source?: "network";
|
|
1925
|
+
/**
|
|
1926
|
+
* Opt-in (default off): refuse an envelope whose AAD is not bound to this
|
|
1927
|
+
* vault's space and this key (`tinycloud.vault:<spaceId>:<key>`). The space
|
|
1928
|
+
* id is compared after normalizing the spelling of its EVM addresses
|
|
1929
|
+
* (checksummed and lowercase are the same space). An envelope with no AAD,
|
|
1930
|
+
* or with a different one, fails with `AAD_MISMATCH` (`aad_mismatch` from
|
|
1931
|
+
* `readNetworkEncrypted`) instead of decrypting. This stops a ciphertext
|
|
1932
|
+
* copied to another key from being accepted; it does not stop a freshly
|
|
1933
|
+
* encrypted forgery. A malformed stored value is a corrupt envelope, as without this
|
|
1934
|
+
* option. Network-encrypted vaults only: a master-key vault and `getShared` refuse it with
|
|
1935
|
+
* `STORAGE_ERROR` rather than skip the check.
|
|
1936
|
+
*/
|
|
1937
|
+
expectAad?: boolean;
|
|
1885
1938
|
/** Delegated KV service for reading from the grantor's space (used by getShared) */
|
|
1886
1939
|
kv?: {
|
|
1887
1940
|
get<V>(key: string, options?: {
|
|
@@ -1936,6 +1989,12 @@ interface VaultEntry<T> {
|
|
|
1936
1989
|
metadata: Record<string, string>;
|
|
1937
1990
|
/** Key ID used for encryption */
|
|
1938
1991
|
keyId: string;
|
|
1992
|
+
/**
|
|
1993
|
+
* Strong ETag of the stored envelope, for {@link VaultPutOptions.ifMatch}.
|
|
1994
|
+
* Present only for network-encrypted reads made with `source: "network"`
|
|
1995
|
+
* (always for `readNetworkEncrypted`); never taken from a replica.
|
|
1996
|
+
*/
|
|
1997
|
+
etag?: string;
|
|
1939
1998
|
}
|
|
1940
1999
|
/**
|
|
1941
2000
|
* Safe classification for a network-encrypted vault read.
|
|
@@ -1962,6 +2021,10 @@ type VaultNetworkReadResult<T> = {
|
|
|
1962
2021
|
status: "decrypt_failed";
|
|
1963
2022
|
} | {
|
|
1964
2023
|
status: "invalid_payload";
|
|
2024
|
+
}
|
|
2025
|
+
/** Only with `expectAad`: the envelope is not bound to this space and key. */
|
|
2026
|
+
| {
|
|
2027
|
+
status: "aad_mismatch";
|
|
1965
2028
|
};
|
|
1966
2029
|
/**
|
|
1967
2030
|
* Structured error codes for vault operations.
|
|
@@ -2019,6 +2082,43 @@ type VaultErrorInput = {
|
|
|
2019
2082
|
meta?: Record<string, unknown>;
|
|
2020
2083
|
/** The typed KV error that refused the write (an `Error` carrying its `code`, `service` and `meta`). */
|
|
2021
2084
|
cause: ServiceError & Error;
|
|
2085
|
+
} | {
|
|
2086
|
+
/** `expectAad` read: the envelope's AAD is missing or bound to another space/key. */
|
|
2087
|
+
code: "AAD_MISMATCH";
|
|
2088
|
+
key: string;
|
|
2089
|
+
message: string;
|
|
2090
|
+
} | {
|
|
2091
|
+
/** `ifMatch` write refused (HTTP 412): the value changed or no longer exists. Re-read and retry. */
|
|
2092
|
+
code: "ETAG_MISMATCH";
|
|
2093
|
+
key: string;
|
|
2094
|
+
message: string;
|
|
2095
|
+
meta?: Record<string, unknown>;
|
|
2096
|
+
cause: ServiceError & Error;
|
|
2097
|
+
} | {
|
|
2098
|
+
/** `ifMatch` is not a strong ETag (HTTP 400, or rejected before sending). Never retry. */
|
|
2099
|
+
code: "INVALID_ETAG";
|
|
2100
|
+
key: string;
|
|
2101
|
+
message: string;
|
|
2102
|
+
meta?: Record<string, unknown>;
|
|
2103
|
+
cause?: ServiceError & Error;
|
|
2104
|
+
} | {
|
|
2105
|
+
/**
|
|
2106
|
+
* `ifMatch` write that may have been applied: the node's `outcome_unknown` (500), a gateway
|
|
2107
|
+
* answer that can follow a commit (500, 502, 503 without the node's busy body, 504, 520,
|
|
2108
|
+
* 522, 524) or a connection that failed after the request was sent. Re-read before retrying.
|
|
2109
|
+
*/
|
|
2110
|
+
code: "OUTCOME_UNKNOWN";
|
|
2111
|
+
key: string;
|
|
2112
|
+
message: string;
|
|
2113
|
+
meta?: Record<string, unknown>;
|
|
2114
|
+
cause: ServiceError & Error;
|
|
2115
|
+
} | {
|
|
2116
|
+
/** `ifMatch` write, the node's own busy/timeout answer (503 with its busy body): nothing was written. Safe to retry. */
|
|
2117
|
+
code: "NODE_BUSY";
|
|
2118
|
+
key: string;
|
|
2119
|
+
message: string;
|
|
2120
|
+
meta?: Record<string, unknown>;
|
|
2121
|
+
cause: ServiceError & Error;
|
|
2022
2122
|
} | {
|
|
2023
2123
|
code: "STORAGE_QUOTA_EXCEEDED" | "STORAGE_LIMIT_REACHED";
|
|
2024
2124
|
message: string;
|
|
@@ -2584,4 +2684,4 @@ declare class SecretsService implements ISecretsService {
|
|
|
2584
2684
|
listAll(): Promise<Result<SecretCatalogEntry[], SecretsError>>;
|
|
2585
2685
|
}
|
|
2586
2686
|
|
|
2587
|
-
export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, type IStorageService, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, MAX_SECRET_SCOPE_LENGTH, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, SECRET_SCOPE_RE, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretPutOptions, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, type StorageAccountUsage, type StorageFullEvent, type StorageFullHandler, StorageFullMonitor, StorageQuotaInfo, type StorageRejectionDetails, type StorageStatus, type StorageStatusOptions, type StorageUsage, type StorageUsageState, type SubscribeOptions, TC832_RESERVED_SCOPES, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, appSecretScope, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, parseStorageRejection, parseStorageStatus, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, storageUsageState, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
|
|
2687
|
+
export { type AuthorizationVerdict, BaseService, type ColumnInfo, type DataVaultConfig, DataVaultService, DecryptCapabilityProof, DuckDbAction, type DuckDbActionType, type DuckDbBatchOptions, type BatchResponse as DuckDbBatchResponse, DuckDbDatabaseHandle, type DuckDbExecuteOptions, type ExecuteResponse as DuckDbExecuteResponse, type DuckDbOptions, type DuckDbQueryOptions, type QueryResponse as DuckDbQueryResponse, DuckDbService, type DuckDbServiceConfig, type DuckDbStatement, type DuckDbValue, EventHandler, FetchFunction, GenericKVResponseSchema, type GenericKVResponseType, GenericResultSchema, type HookEvent, type HookServiceName, type HookStreamEvent, type HookStreamRetryConfig, type HookSubscription, type HookWebhookListOptions, type HookWebhookRecord, type HookWebhookRegistration, type HookWebhookScope, type HookWebhookUnregisterOptions, HooksService, type HooksServiceConfig, type IDataVaultService, type IDuckDbDatabaseHandle, type IDuckDbService, IEncryptionService, type IHooksService, IKVService, type ISecretsService, IService, IServiceContext, type IStorageService, InvokeAnyFunction, InvokeFunction, KVListResponseSchema, type KVListResponseType, KVListResultSchema, type KVListResultType, KVResponseHeadersSchema, type KVResponseHeadersType, MAX_SECRET_SCOPE_LENGTH, type ParsedSecretCatalogKey, PermissionHint, type QuotaConfig, type QuotaStatus, type ResolvedSecretPath, Result, RetryPolicy, RetryPolicySchema, type RetryPolicyType, SECRET_NAME_RE, SECRET_SCOPE_RE, STORAGE_FULL_MESSAGE, STORAGE_MANAGE_URL, STORAGE_NEARLY_FULL_RATIO, STORAGE_WRITE_TOO_LARGE_MESSAGE, type SchemaInfo, type SecretCatalogEntry, type SecretPayload, type SecretPutOptions, type SecretScopeOptions, type SecretsError, SecretsService, ServiceContext, type ServiceContextConfig, ServiceError, ServiceErrorEventSchema, type ServiceErrorEventType, ServiceErrorSchema, type ServiceErrorType, ServiceRequestEventSchema, type ServiceRequestEventType, ServiceResponseEventSchema, type ServiceResponseEventType, ServiceRetryEventSchema, type ServiceRetryEventType, ServiceSession, ServiceSessionSchema, type ServiceSessionType, type StorageAccountUsage, type StorageFullEvent, type StorageFullHandler, StorageFullMonitor, StorageQuotaInfo, type StorageRejectionDetails, type StorageStatus, type StorageStatusOptions, type StorageUsage, type StorageUsageState, type SubscribeOptions, TC832_RESERVED_SCOPES, type TableInfo, TelemetryConfig, TelemetrySpanEventSchema, type TelemetrySpanEventType, type TinyCloudDebugEnableOptions, type TinyCloudDebugEvent, type TinyCloudDebugLevel, TinyCloudDebugLogger, type TinyCloudDebugTimer, TinyCloudQuota, type ValidationError, type VaultCrypto, type VaultEntry, type VaultError, type VaultGetOptions, type VaultGrantOptions, VaultHeaders, type VaultListOptions, type VaultListPage, type VaultNetworkReadResult, VaultPublicSpaceKVActions, type VaultPutOptions, type ViewInfo, type WasmVaultFunctions, abortedError, appSecretScope, authExpiredError, authRequiredError, authUnauthorizedError, authorizationVerdictOf, canonicalizeSecretScope, clearTinyCloudDebugLogs, createKVResponseSchema, createResultSchema, createVaultCrypto, disableTinyCloudDebug, enableTinyCloudDebug, errorResult, getTinyCloudDebugLogs, installTinyCloudDebugGlobals, isStorageFullError, networkError, nodeRetryError, notFoundError, parseAuthError, parseCapabilityResource, parsePermissionHint, parsePermissionHintFromErrorText, parseSecretCatalogKey, parseStorageQuotaBytes, parseStorageRejection, parseStorageStatus, permissionDeniedError, resolveSecretListPrefix, resolveSecretPath, storageLimitReachedError, storageQuotaExceededError, storageRejectionError, storageUsageState, timeoutError, tinyCloudDebugLogger, validateKVListResponse, validateKVResponseHeaders, validateRetryPolicy, validateServiceError, validateServiceRequestEvent, validateServiceResponseEvent, validateServiceSession, validateTelemetrySpanEvent, validatedCapabilityOf, wrapError };
|